{"name":"troika-three-utils","version":"0.33.1","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":"0c397b65aac6137ce1b4417e55d0deeb77b5ee5f","bugs":{"url":"https://github.com/protectwise/troika/issues"},"homepage":"https://github.com/protectwise/troika#readme","_id":"troika-three-utils@0.33.1","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-cT1k+kSMRFGj4W+xKdvXk8ZNHvalVYN46Ist9Xnt0ZkhwHIjMZ5MD0Jaesq7js9nxiXRxR8HPcbjkwuiL25jMA==","shasum":"628f0d69cd5d6b6847c488b1964ad89650332d74","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.33.1.tgz","fileCount":17,"unpackedSize":131092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfdnvuCRA9TVsSAnZWagAAl2oQAJQclXG5mFjoBEGkOHGg\no7z5v5NpG+6oFphTpNZ9207y6A1QkKQqYVDimhlej7Ezuld/tLH6C6MC8A2w\nrvpPNrc26jOdQPvXTh7cnIAbOQlJiijCiOgdVwJvebZJu4ANhDuX0YUo8vmG\n1JMJ12eLqKBhLPxO1GCEIYKt5Kd9Nv69Rh+GclXKR7lq8fDWTKy5dNX+pk5/\nseqR6clsQGYCzQyuvyt315oGhbx78E9Pv91+3JECY7x+sA1fMpuYfjUlhxXC\npHLLalPZMBCZnI4f86LIky1TGeUKoGUGTXcE5I3jZxWujaIsvRgJBWQeTRZ7\n9F/JsVIaW0gMoySyIi7dBz4qkrIMkOhdatpp9ydGwTfWktj19A0d7Vf4q4O9\nlM+88OSWC0L/avXapbl44FqToZ81HoHNfhJHLLpL3MLtSjGpuOZaSRcGcwJi\nhx3wZcJRiVXFxzl0jonB/umS963/eX7s6mrrMwsHOHn8gl9QrBiqqJKiFLIZ\nS8UlHydwYWhEg7i3cwhlUUhJjQpReGm98VNYEQ+b7D+AkCV+pM1F0/XWXMKu\nqO+r0CwQ6S2WKpobt9ZHDr7rgHS8s6IZUcMib4XHXW3n6Gut4N8QjNlqKbJM\nh0lHQjnevvVGATM5Q2QMIRVq/447NskaQolHsIjcYe72vHC00CVao4qG4cTZ\nwVAD\r\n=Gpcs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDL1pFvnNV8EjToeN5MGsqHRN3auSexWO/uojJ9TNKQxAIhAJt8SriO85qCoCIIC4DIP7PNmb945Oodh84YaIFuscp9"}],"size":36934,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.33.1.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.33.1_1601600494182_0.9100989947525417"},"_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":1601600494415,"_cnpm_publish_time":1601600494415,"dist-tags":{"latest":"0.53.1"}}