Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

Index

Variables

Const EDGE_INDEX

EDGE_INDEX: number[] = [-1, -1, 4, 0, 2, 0, 2, 0, 0, 0, -1, -1, 0, 0, 0, 0,6, 0, 4, 0, -1, -1, 2, 0, 6, 0, 4, 0, 6, 0, -1, -1]

Const NEXT_EDGES

NEXT_EDGES: number[] = [0, -1, 1, 0, 0, 1, -1, 0]

Const S10

S10: number[] = [6, 4, 2, 16, 6, 22, 2, 28]

Const S5

S5: number[] = [4, 8, 0, 2, 0, 26, 4, 14]

Const contourVertex

contourVertex: Fn5<ReadonlyVec, number, number, number, number, Vec>[] = [(src, w, x, y, iso) => [x + mix(src, w, x, y, x + 1, y, iso), y],(src, w, x, y, iso) => [x + 1, y + mix(src, w, x + 1, y, x + 1, y + 1, iso)],(src, w, x, y, iso) => [x + mix(src, w, x, y + 1, x + 1, y + 1, iso), y + 1],(src, w, x, y, iso) => [x, y + mix(src, w, x, y, x, y + 1, iso)]]

Functions

Const cellValue

  • cellValue(src: ReadonlyVec, w: number, idx: number): number
  • Parameters

    • src: ReadonlyVec
    • w: number
    • idx: number

    Returns number

Const encodeCrossings

  • encodeCrossings(src: ReadonlyVec, w: number, h: number, iso: number): Uint8Array
  • Parameters

    • src: ReadonlyVec
    • w: number
    • h: number
    • iso: number

    Returns Uint8Array

isolines

  • isolines(src: ReadonlyVec, w: number, h: number, iso: number): Generator<Vec[], void, unknown>
  • Parameters

    • src: ReadonlyVec
    • w: number
    • h: number
    • iso: number

    Returns Generator<Vec[], void, unknown>

Const mix

  • mix(src: ReadonlyVec, w: number, x1: number, y1: number, x2: number, y2: number, iso: number): number
  • Parameters

    • src: ReadonlyVec
    • w: number
    • x1: number
    • y1: number
    • x2: number
    • y2: number
    • iso: number

    Returns number

Const setBorder

  • setBorder(src: Vec, w: number, h: number, val: number): Vec
  • Parameters

    • src: Vec
    • w: number
    • h: number
    • val: number

    Returns Vec

Generated using TypeDoc