{"name":"troika-three-utils","version":"0.34.0","description":"Various utilities related to Three.js","author":{"name":"Jason Johnston","email":"jason.johnston@protectwise.com"},"repository":{"type":"git","url":"git+https://github.com/protectwise/troika.git","directory":"packages/troika-three-utils"},"license":"MIT","sideEffects":false,"main":"dist/troika-three-utils.umd.js","module":"dist/troika-three-utils.esm.js","module:src":"src/index.js","peerDependencies":{"three":"0.103.x - 0.121.x"},"gitHead":"b19cd3aff4b0876253d76b3fc66b7e2a1f16a7e5","bugs":{"url":"https://github.com/protectwise/troika/issues"},"homepage":"https://github.com/protectwise/troika#readme","_id":"troika-three-utils@0.34.0","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-6Dm6FzGFpuiehjKkm3wAV3e+SPnHQ+GxwXnHFToKLcQ1/gVDOIL69BWCosrlEUb0SUOQjQv6sd5QpNT6IIewpQ==","shasum":"9c34b31e8f6fd978af4be21382b7a21108ffd3e6","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.34.0.tgz","fileCount":17,"unpackedSize":134405,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfjQhdCRA9TVsSAnZWagAA0ZUQAJXr0WyGXswaK7bjLfbB\nIXjOHGcGSBPWw6A8TJEhNjK2Zv4aLYEjZpIBehbkhCQEP4YpDIdJ/+vUTwxM\nwuUjDwUpulWIh6sbE4Y9k2zp8UJoRMqh+8I/lqRDq8RzoqZwD0WW1MxWmeD/\njcl08HxI/1kHk8FLjw+ryE16wXT3k10UnpTRccMl66b3QDklQ+6tYSeY1BQd\n9rMrHh5St3ZjHaGj9hrP3wawDfCW2tnko97anpInBprUri4TyG3XBpAhArA0\nl/Uc3ba21T7Zc5QdHtF122hr/73L95wRXMNRbytRCeRkBNIQfT+CVfvu0/Pv\nCW74ZQThcKHDXWCc5BIN5+KcKTQh8E8VXBU07ODd70B2AhxzJT1Ca7gsRyYv\nqFwwmbredfeRf0TOM/wcaj+WIpQLTVk18BTMAWyEUy2fGZZrjhocyVbjtMKK\nnjcLS4y/5kvD5KP5NjkCc+/4/imnWIm4s7uSs0ic/0hr3n6zWlMjZDgeZP2B\nbIy3XPKJTNRbsauGOMrbKb/oI98cBOse7DlYMEVpcZ3l5WKrzJKijB7TVylf\ne2StiADZnkDI0tT7HRYupWyI6bJ6Hy4B+V9R0f1geeZ5ywVJeauOrWsklN3K\n6SuwuXVG+sZgmOfcwHW5SHRD80frBYJyadTBOnhCRfkKO57kOFHbR6u9EtPq\n7pYY\r\n=1xpy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBZzLymU/HDKQCVRpfykUm8/+NNVM9P65ZKLAhqYBkARAiB5SDVAKQo/TKFrP3JyGGkK1vaUHIkm0WRvK5E/1EW9Ww=="}],"size":37317,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.34.0.tgz"},"maintainers":[{"name":"lojjic","email":"jason+npm@lojjic.com"}],"_npmUser":{"name":"lojjic","email":"jason+npm@lojjic.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/troika-three-utils_0.34.0_1603078236953_0.10448856655689176"},"_hasShrinkwrap":false,"readme":"# Troika Three.js Utilities\n\nThis package provides various utilities for working with [Three.js](https://github.com/mrdoob/three.js), particularly having to do with shaders. It is used by [Troika 3D](../troika-3d), but has no dependencies itself other than Three.js, so it can be used outside the Troika framework.\n\n\n## Installation\n\nGet it from [NPM](https://www.npmjs.com/package/troika-three-utils):\n\n```sh\nnpm install troika-three-utils\n```\n\nYou will also need to install a compatible version of [Three.js](https://threejs.org); see the [notes on Three.js versions in the Getting Started docs](../../docs/getting-started/setup.md#threejs) for details.\n\n```sh\nnpm install three\n```\n\n\n## Provided Utilities\n\nSeveral utilities are provided; for a full list follow the imports in [index.js](./src/index.js) to their source files, where each is documented in JSDoc comments.\n\nSome of the most useful ones are:\n\n\n### createDerivedMaterial()\n\nThis utility allows you to easily _extend_ existing Three.js materials with your own custom shader code. This is an incredibly powerful tool, and is the  secret behind most of Troika's shader-driven tools like `troika-three-text`, `three-instanced-uniforms-mesh`, and `BezierMesh`. \n\nSee the [createDerivedMaterial documentation page](./docs/createDerivedMaterial.md) and its [source code with JSDoc](./src/DerivedMaterial.js) for details.\n\n\n### BezierMesh\n\nThis creates a cylindrical mesh and bends it along a 3D cubic bezier path between two points, in a custom derived vertex shader. This is useful for visually connecting objects in 3D space with a line that has thickness to it.\n\nSee the [BezierMesh documentation page](./docs/BezierMesh.md) and its [source code with JSDoc](./src/BezierMesh.js) for details.\n\n\n### InstancedUniformsMesh\n\n> NOTE: InstancedUniformsMesh has been moved to [its own `three-instanced-uniforms-mesh` package](https://github.com/protectwise/troika/tree/master/packages/three-instanced-uniforms-mesh).\n","publish_time":1603078237144,"_cnpm_publish_time":1603078237144,"dist-tags":{"latest":"0.53.1"}}