{"name":"troika-three-utils","version":"0.52.5","author":{"name":"Jason Johnston","email":"jason.johnston@protectwise.com"},"license":"MIT","_id":"troika-three-utils@0.52.5","maintainers":[{"name":"lojjic","email":"jason@lojjic.com"}],"homepage":"https://github.com/protectwise/troika#readme","bugs":{"url":"https://github.com/protectwise/troika/issues"},"dist":{"shasum":"865b269d155bb5e8f1c1c8d6ccbf123022cb4293","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.52.5.tgz","fileCount":40,"integrity":"sha512-WsePbcX8RtfidRfsxK1eCZCjF81ZDzAKHH/evLs0hdV2wpoCb0vArGZHdzdOJrSS3k4zfdtbKDaBh8+phkrYnw==","signatures":[{"sig":"MEYCIQCcK7as0OS3vZgAr9jE77BmYASLwDN1CKoN+frhAN4PZwIhAPID5cqL0QawESGmC1nXL0TnXJIWW9qt2hG8dnJNDQHl","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCo2h5DYih/ggWbcwp5kcmhhTyD/myqK3zSm+4YlIfX/gIhAO2A+2fVc/kKES2ITCdAGPlkH+WC2Pg5YSFlZrM/jndO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":160882,"size":38111,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.52.5.tgz"},"main":"dist/troika-three-utils.umd.js","module":"dist/troika-three-utils.esm.js","gitHead":"2280cf77383163220912d6e07f69e25eb3505e68","_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.52.5_1784906752589_0.5232636939316255","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":1784906752774,"_cnpm_publish_time":1784906752774,"dist-tags":{"latest":"0.53.1"}}