JSPM

array-pack-2d

0.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1477
  • Score
    100M100P100Q112734F
  • License MIT

Quickly pack a nested 2D array into a typed array – useful for flattening point data into a WebGL-friendly format

Package Exports

  • array-pack-2d

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (array-pack-2d) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

array-pack-2d experimental

Quickly pack a nested 2D array into a typed array – useful for flattening point data into a WebGL-friendly format.

Usage

array-pack-2d

packed = pack(array, [type])

Takes a nested 2D array and packs it into a flat, packed one. By default this will be a Float32Array, but you can specify a custom type too: this can be a constructor such as Uint8Array, or a dtype string such as "float32" or "uint8".

License

MIT. See LICENSE.md for details.