{"_id":"gl-to-dtype","_rev":"812793","name":"gl-to-dtype","description":"turns a gl type into a dtype string","dist-tags":{"latest":"1.1.0"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"time":{"modified":"2024-07-02T13:58:34.000Z","created":"2015-05-25T04:23:35.673Z","1.1.0":"2015-05-25T13:51:49.603Z","1.0.0":"2015-05-25T04:23:35.673Z"},"users":{},"author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"repository":{"type":"git","url":"git://github.com/mattdesl/gl-to-dtype.git"},"versions":{"1.1.0":{"name":"gl-to-dtype","version":"1.1.0","description":"turns a gl type into a dtype string","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{},"devDependencies":{"faucet":"0.0.1","gl-constants":"^1.0.0","tape":"^4.0.0"},"scripts":{"test":"node test.js | faucet"},"keywords":["dtype","gl","constant","flag","flags","texture","float","uint8","uint8_clamped"],"repository":{"type":"git","url":"git://github.com/mattdesl/gl-to-dtype.git"},"homepage":"https://github.com/mattdesl/gl-to-dtype","bugs":{"url":"https://github.com/mattdesl/gl-to-dtype/issues"},"gitHead":"20bf806a135ee85a2a904baa0599b6395e494229","_id":"gl-to-dtype@1.1.0","_shasum":"b89c62d73c0a151b6902f22a5f69ca5eac1d1be9","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"b89c62d73c0a151b6902f22a5f69ca5eac1d1be9","tarball":"http://registry-npm.ywwl.com/gl-to-dtype/download/gl-to-dtype-1.1.0.tgz","integrity":"sha512-4tzE1J6P+QBWll4HqDz5FqsCZm2rM4wQP5WR1z0jRTUBDHlrkLrNGOV6r53HoGY9pkBHrjffsQVW9Mz3vKw3sQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBc6gLHdSx1IyveRKMrzdyqZUEIwY8VWqlRygB+dumvTAiEA0Vzpm7bKeFEZDUvWv6H/RkkcXRZMSlOVniHfnlrgJNQ="}],"size":1867,"noattachment":false,"key":"/gl-to-dtype/-/gl-to-dtype-1.1.0.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"directories":{},"publish_time":1432561909603,"_cnpm_publish_time":1432561909603},"1.0.0":{"name":"gl-to-dtype","version":"1.0.0","description":"turns a gl type into a dtype string","main":"index.js","license":"MIT","author":{"name":"Matt DesLauriers","email":"dave.des@gmail.com","url":"https://github.com/mattdesl"},"dependencies":{},"devDependencies":{"faucet":"0.0.1","gl-constants":"^1.0.0","tape":"^4.0.0"},"scripts":{"test":"node test.js | faucet"},"keywords":["dtype","gl","constant","flag","flags","texture","float","uint8","uint8_clamped"],"repository":{"type":"git","url":"git://github.com/mattdesl/gl-to-dtype.git"},"homepage":"https://github.com/mattdesl/gl-to-dtype","bugs":{"url":"https://github.com/mattdesl/gl-to-dtype/issues"},"gitHead":"65d698c69f8f8fdda4250545947d9a9389f99ba6","_id":"gl-to-dtype@1.0.0","_shasum":"f9cf7e55b50d99fafe916dae8e1e14b94f4135f5","_from":".","_npmVersion":"2.1.18","_nodeVersion":"0.10.32","_npmUser":{"name":"mattdesl","email":"dave.des@gmail.com"},"dist":{"shasum":"f9cf7e55b50d99fafe916dae8e1e14b94f4135f5","tarball":"http://registry-npm.ywwl.com/gl-to-dtype/download/gl-to-dtype-1.0.0.tgz","integrity":"sha512-2vNccK/8NpddotI6kPTr5Fxz0x76C9WxM7m27j4sJ2mvUazc9ezR6VHSHJdMfYFryqthyHW29scr1F30DUuPVg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbPf4e452RRiVuQ7AR7ExlrtehGb8Ge8dT6lGaN137VwIhAJ4qQqNwHFxpFw42+orIKV28JPeJqHyHnE4tDdJ9t2oI"}],"size":1800,"noattachment":false,"key":"/gl-to-dtype/-/gl-to-dtype-1.0.0.tgz"},"maintainers":[{"name":"mattdesl","email":"dave.des@gmail.com"}],"directories":{},"publish_time":1432527815673,"_cnpm_publish_time":1432527815673}},"readme":"# gl-to-dtype\n\n[![stable](http://badges.github.io/stability-badges/dist/stable.svg)](http://github.com/badges/stability-badges)\n\nTurns a WebGL constant into a [dtype](https://www.npmjs.com/package/dtype) string.\n\n```js\nvar asDtype = require('gl-to-dtype')\nvar dtype = require('dtype')\n\nvar glType = gl.FLOAT\nvar type = asDtype(glType)\nvar array = new (dtype(type))(16)\n```\n\nConverts the following:\n\n```js\ngl.FLOAT          -> 'float32'\ngl.UNSIGNED_INT   -> 'uint32'\ngl.INT            -> 'int32'\ngl.UNSIGNED_SHORT -> 'uint16'\ngl.SHORT          -> 'int16'\ngl.UNSIGNED_BYTE  -> 'uint8'\ngl.BYTE           -> 'int8'\ngl.UNSIGNED_SHORT_4_4_4_4 -> 'uint16'\ngl.UNSIGNED_SHORT_5_5_5_1 -> 'uint16'\ngl.UNSIGNED_SHORT_5_6_5 -> 'uint16'\n```\n\n## Usage\n\n[![NPM](https://nodei.co/npm/gl-to-dtype.png)](https://www.npmjs.com/package/gl-to-dtype)\n\n#### `require('gl-to-dtype')(glType)`\n\nTakes `glType` constant and returns a string representation aligning with [ndarray](https://www.npmjs.com/package/ndarray), [dtype](https://www.npmjs.com/package/dtype) and other modules.\n\nReturns `null` if the flag isn't recognized as a supported type.\n\n## License\n\nMIT, see [LICENSE.md](http://github.com/mattdesl/gl-to-dtype/blob/master/LICENSE.md) for details.\n","_attachments":{},"homepage":"https://github.com/mattdesl/gl-to-dtype","bugs":{"url":"https://github.com/mattdesl/gl-to-dtype/issues"},"license":"MIT"}