{"name":"troika-three-utils","version":"0.47.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.125.0"},"gitHead":"f20187dfa6a07de046b4e6a3948e75483b8e2ee5","bugs":{"url":"https://github.com/protectwise/troika/issues"},"homepage":"https://github.com/protectwise/troika#readme","_id":"troika-three-utils@0.47.0","_nodeVersion":"16.14.0","_npmVersion":"lerna/4.0.0/node@v16.14.0+x64 (darwin)","dist":{"integrity":"sha512-yoVTQxVbpQX3a55giIwqwq6hyJA6oYvq7kaNGwFTeicoWmTZCqqTbytafx1gcuL5umrtw5MYgsxYUSOha+xp5w==","shasum":"4749334ad2ae043767916f79bcc365cbb5ea64b5","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.47.0.tgz","fileCount":19,"unpackedSize":111739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBEJzTpZYPXk50YtlsJtb/+gqzqWj2i6+CSkZyBJShN9AiEA+qpI0MdyvudYx8mfXmN0pvfgigfz9GK3lYog4FRCQqU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjmp9SACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmofuhAAn2Kz3iW4gVwuOVwt9K1qJZk/pkHICRxCTqGc7ZAB+D0G7D7e\r\nmYw4zIqtwBLo1Rsp9Go1ZVlLXoNgjTS/qloOjwMRKuaXOlDc4Y+Q3LWCbWeD\r\npFv9FRAfVgWfGbr+b8QNh8jfAA5qdHuxOTlgU2p6TgIpyBegyDgEx5lGbtNY\r\nSwfgI2vWM8uWACew+CrmWliOGGGnVmwIt85i2vrrbxwlrvbllSRtxmMbWRj/\r\nzBv628N7LRZS8QwCxl5xnNsmu7IljZmfRtO5QPPCWbFb6w5BInlehLHWSyA8\r\nQhaz2lr5+rgO8KS/oFgFDMJZkSqcM72De1I1TOiCFSORZtbk43LR/oWmPfy8\r\nUCEkEZjNM54hgd/LGS4sGh9tR/cfJCn/zuXscmfxJKkkCS2/uZwgvUEjtPZr\r\nWGYfboqH5/D/W80HViSP7jTHFuH0WiyfWHR01uKwZ6fa9zVoR1DWuev6mqw5\r\ngTyuoiWKpVSqpdmSgXcHq7KdEBRXI38euRQmKOk5aE5OrU0wY5AEdSpv8+yr\r\nwBdaulVSPBDxvdlLPclRH0/dq8Hvnaio/W3u9e8AJnTL8uRb+v5BFKE8IbVe\r\nwdjTXBz6ikiRLO5LdMPVXTP91fZv8etNQ0h/UcLt0E29m5wimyfulfU0UMyT\r\noAm/lQpUCEXNZUkxbmojYF6V5LG03mjkniQ=\r\n=CZBd\r\n-----END PGP SIGNATURE-----\r\n","size":23439,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.47.0.tgz"},"_npmUser":{"name":"lojjic","email":"jason@lojjic.com"},"directories":{},"maintainers":[{"name":"lojjic","email":"jason@lojjic.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/troika-three-utils_0.47.0_1671077714329_0.44252487625077563"},"_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":1671077714514,"_cnpm_publish_time":1671077714514,"dist-tags":{"latest":"0.53.1"}}