{"name":"troika-three-utils","version":"0.53.0","author":{"name":"Jason Johnston","email":"jason.johnston@protectwise.com"},"license":"MIT","_id":"troika-three-utils@0.53.0","maintainers":[{"name":"lojjic","email":"jason@lojjic.com"}],"homepage":"https://github.com/protectwise/troika#readme","bugs":{"url":"https://github.com/protectwise/troika/issues"},"dist":{"shasum":"a81b003f9fea06db9e18ce46b57142f55038c4b9","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.53.0.tgz","fileCount":40,"integrity":"sha512-dWX+K1l/Km4uIPQ1knJl5l6d7Q/vbeKj8mDKPoImcYhEgBVUfXitSBueoPEDwJo3b7o3myo4+blnCOHU10d7lg==","signatures":[{"sig":"MEYCIQCgIChZJb+vqzotf1Kanftpt2HS1jK9GvUBJD7rY+Kz9AIhAOJbSVa9u5/ELdaiD0O+XqY5CPsFTENmSLUWF+Mf8kIc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCuXPx+R4foFYRnfbDIyN/4D3xq6kqE0ajfrJq+DZS9rQIgDIKed+35pmqkF22cuDTxt7yZ3EWYnTAQA6tnzyB/xHo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":160881,"size":38115,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.53.0.tgz"},"main":"dist/troika-three-utils.umd.js","module":"dist/troika-three-utils.esm.js","gitHead":"a24a35964de2d8187e0808a3f0c06a8d85e7f4a9","_npmUser":{"name":"lojjic","email":"jason@lojjic.com"},"module:src":"src/index.js","repository":{"url":"git+https://github.com/protectwise/troika.git","type":"git","directory":"packages/troika-three-utils"},"_npmVersion":"lerna/4.0.0/node@v22.16.0+arm64 (darwin)","description":"Various utilities related to Three.js","directories":{},"sideEffects":false,"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"peerDependencies":{"three":">=0.125.0"},"_npmOperationalInternal":{"tmp":"tmp/troika-three-utils_0.53.0_1784905056513_0.4278189403021584","host":"s3://npm-registry-packages-npm-production"},"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":1784905056615,"_cnpm_publish_time":1784905056615,"dist-tags":{"latest":"0.53.1"}}