{"_id":"troika-three-utils@0.53.1","bugs":{"url":"https://github.com/protectwise/troika/issues"},"dist":{"shasum":"f3a7852b90e758f422b2c1f25d3bc48da9cf4fa2","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.53.1.tgz","fileCount":40,"integrity":"sha512-xgf/risxw+sYt0uiAEhpiNvS9l0kQwiqvLMBCik4Ikx+IWYkVVfMtH/QN5UnYH2bYAre6+tSsY/Lwep6HCW2hg==","signatures":[{"sig":"MEQCIA/V6JgPZinvxM/xdPzOm4wBf2N2W1/VAvCAtTmUZTLwAiAwGjjGkUHF+K/IJmGcLr/j+ZwreH2FCrpjf3N2SheA+Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICbaH3sYnzz+q9dkTRHsVcsHLdXhP6J0iI88VGS+aa0sAiB6cqJ4BETxNaCX8fiafT0gQCYMPTKeuhE1b+ULWE7CDQ=="}],"unpackedSize":161124,"size":38180,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.53.1.tgz"},"main":"dist/troika-three-utils.umd.js","name":"troika-three-utils","author":{"name":"Jason Johnston","email":"jason.johnston@protectwise.com"},"module":"dist/troika-three-utils.esm.js","gitHead":"9c89d51f828f94a21e33d6f24b38128d78014d5f","license":"MIT","version":"0.53.1","_npmUser":{"name":"lojjic","email":"jason@lojjic.com"},"homepage":"https://github.com/protectwise/troika#readme","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":{},"maintainers":[{"name":"lojjic","email":"jason@lojjic.com"}],"sideEffects":false,"_nodeVersion":"22.16.0","_hasShrinkwrap":false,"peerDependencies":{"three":">=0.125.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/troika-three-utils_0.53.1_1793632164138_0.6513030839539916"},"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":1793632164217,"_cnpm_publish_time":1793632164217,"dist-tags":{"latest":"0.53.1"}}