{"name":"troika-three-utils","version":"0.46.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.0"},"gitHead":"35c7e224bd18df91952377d00609da049fd67384","bugs":{"url":"https://github.com/protectwise/troika/issues"},"homepage":"https://github.com/protectwise/troika#readme","_id":"troika-three-utils@0.46.0","_nodeVersion":"14.17.3","_npmVersion":"lerna/4.0.0/node@v14.17.3+x64 (darwin)","dist":{"integrity":"sha512-llHyrXAcwzr0bpg80GxsIp73N7FuImm4WCrKDJkAqcAsWmE5pfP9+Qzw+oMWK1P/AdHQ79eOrOl9NjyW4aOw0w==","shasum":"6d97a9bf08f2260285edf2bb0be6328dd3d50eec","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.46.0.tgz","fileCount":21,"unpackedSize":122480,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiI9/EACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqOtQ//d8a9MGP00gQt2ycuMJmgX6GESeIhcOG9zgiouTM/DnEd1tqk\r\n72N/4DQ2Eb5xlkEJMv/bBJeqH/byHpZfeMniDG+T2zsq93FNB9gEsaNV/r7T\r\nuEADMb97hfBEwNggINMZHmcpgavIokqyeP4oZolyUKucsAQi0lyD3i1qkLhc\r\n4vsh4Q5Lj6hMfNHgWjTR+Stm3WOLp8yimKtBYgXxkrYdBUPyjNiqhdm85wb7\r\n3WLiv7cUS7RlAcArtMZrlj0ZnTqHklIqHprKwmZ7VlZlCdwtZqC85VBteseR\r\nZxYgLHY02r5lW3eupeFwSUORF2n3POMVug9lIKfxAIXm6S7aV4qHECEM/aFU\r\nhSAjT1zFgjI0Tpm7XClCqPEDsFoCiBSbIBYEzS4KIZI4jgsb4eZ3TFQBHW1u\r\nJxDoqffISD0EIcLGE2Ayn2zvhBcSZKYbLZDI4YSr94fe6+cx97P7hCCu5GQ9\r\n9VPGYpGkqFYTK0HgpnbLEAvEPr1cPpsD8a3F6dP/Bv3Opfe41/LTMYBeZJae\r\niQf4q8YDjDCv/vEfAhZBLgtV40rlEk0rhZJCj8bLEpeqn6d5AX09ZhysAilE\r\nIw+NPTPfTiU7+1pQnd8kWxC7uCmscPh9z7cyhBXEGHpsQ1oSUvfKmSMtxdvb\r\nBWx+UFa1OLd2OaYOtiVdHEb+JToIlDF2SAg=\r\n=LAjE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDc4VFXZJoetGmDYep4G0jVfcNmqEs0s8oH0NR9SndrKAiEA1DE6TAKuFtwgmgV7L2eWzJoQom7lGNzVuKD+rcj7r/I="}],"size":31090,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.46.0.tgz"},"_npmUser":{"name":"lojjic","email":"jason+npm@lojjic.com"},"directories":{},"maintainers":[{"name":"lojjic","email":"jason+npm@lojjic.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/troika-three-utils_0.46.0_1646518211810_0.6860228577156979"},"_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":1646518212018,"_cnpm_publish_time":1646518212018,"dist-tags":{"latest":"0.53.1"}}