array-pack-2d
Quickly pack a nested 2D array into a typed array – useful for flattening point data into a WebGL-friendly format
Last updated 13 years ago by hughsk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install array-pack-2d 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.0                                ...           latest (10 years ago)

5 Versions

  • 1.0.0                                ...           10 years ago
  • 0.1.1                                ...           12 years ago
  • 0.1.0                                ...           13 years ago
  • 0.0.1                                ...           13 years ago
  • 0.0.0                                ...           13 years ago
Maintainers (1)
Downloads
Total 14
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 1
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE