Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "fill"

Index

Functions

Functions

Const fill

  • Fills Vec2/3/4 view based buffer, supporting arbitrary component and element layouts of both the input and output buffers. The out vector is used as write cursor over the underlying buffer and will be filled with the components of vector v.

    example
    fill(
      new Vec2(new Float32Array(12)),
      new Vec2([1, 2]),
      3, // num elements
      4  // stride
    )
    // Float32Array [1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 0, 0]

    Parameters

    • out: IVector<any>

      target vector / wrapped buffer

    • v: IVector<any>

      fill vector

    • num: number

      number of elements to fill

    • Default value so: number = out.length * out.stride

      output stride

    Returns Vec

Generated using TypeDoc