{"name":"troika-three-utils","version":"0.37.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.x - 0.121.x"},"gitHead":"f2c9c725b22a88ca3275c39150d75f6894ea3503","bugs":{"url":"https://github.com/protectwise/troika/issues"},"homepage":"https://github.com/protectwise/troika#readme","_id":"troika-three-utils@0.37.0","_nodeVersion":"12.18.3","_npmVersion":"lerna/3.22.1/node@v12.18.3+x64 (linux)","dist":{"integrity":"sha512-z2WH/GXl47GmmhaAFPucoSYxqhhw7uHa5gIO2U5sodNzY09oyzjlzaHdenIMp+UHV4PLEpqMimvqlc3UnyUhmg==","shasum":"7ecdf3975fb12888a2d1fc21a83d254ac6e760ee","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.37.0.tgz","fileCount":19,"unpackedSize":142248,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBQ3iCRA9TVsSAnZWagAAJKUQAIr7ABamA22mlrBcnUSN\nUdzAQzSboCT4JOGt6tPsL93bOAgfvapfZW0dCwHn0zxSxin7/0UND6hfseh5\nFA1SK8OgCnJNVG4e7sJR8he5vI8aFQBkDxYAl4fsJIM3J4empPWLg1c9Vsnc\ns3STrzJDpjwgQsBTehkb65to83foN7RVfUcSfFkudHrMPldD0cl+SfPES8rv\nZTjtiSkeO8lUST6pSiyPl4AMev9mw7Gk19yW+KTSLCJcOL5NHsakfpfxLtxw\nqUqBaQjMo6V00GgIh5K+NEjJPrg698zaFy2deNunITwK7VvT3d9uizuai4u7\nF4juC79x0oMzpkNesGqzzv6HdBHGf/qLAOMzEu6YzGpVYnVkyS2TAqi0dHFA\nfiOsd4OCQjzM2x6UzZG3jNK5bhMfRZN5vhlypN4e+9X7Zvm98pZoxAbwne4O\nIxGD3XfJqPDTzEJHhd21yvmYhl3MtUGKtWSGjMScaYMjqiw7BToQ97PMKCi+\ntqmOhJxkMialndrN8SlYxGjx19Oiha6Y4T6b92dCjvT0hlyoOM3jepJYEng+\n+WDKLHHhqs1XzUpmHGoOh62FgN4vae02So95kS9xCuW3oFUzPG2AB/PyREme\nd1VJ4iJI9nMpxRjcO+5V90GWee9qpRlC6ilIr0us2Bkatj451eGACMdqZfHs\npuGH\r\n=nZ99\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2rW7I7b7fbJ6BT4fmJUk0Myb7WJwIDaQWsCveLxDwdAiEAkfT587DoPxeFc1rTXsFhA9UuYSi5WKxrGNE6nGPSACM="}],"size":39895,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.37.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.37.0_1610943969887_0.6357615539911685"},"_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":1610943969994,"_cnpm_publish_time":1610943969994,"dist-tags":{"latest":"0.53.1"}}