{"name":"troika-three-utils","version":"0.36.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":"b3f14acd6e6c4fac1bfc4254b859e552f14d67ed","bugs":{"url":"https://github.com/protectwise/troika/issues"},"homepage":"https://github.com/protectwise/troika#readme","_id":"troika-three-utils@0.36.0","_nodeVersion":"12.16.1","_npmVersion":"lerna/3.22.1/node@v12.16.1+x64 (darwin)","dist":{"integrity":"sha512-XW7Q0sqdTDROIvQIYJsHOObJf0ndx7ody4vfyLwk4SIuCaFakkPiuNLIrx1as1l1OSRTeg9bfMVZkHt8Tft/cw==","shasum":"2051d1366dc792dd89916f5c549843f11435ce06","tarball":"http://registry-npm.ywwl.com/troika-three-utils/download/troika-three-utils-0.36.0.tgz","fileCount":17,"unpackedSize":131555,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyYTgCRA9TVsSAnZWagAAg5sP/1zTyYZl4QRhM3+T83iT\ndNNGDpmZEcl+rnuPGeqkrI8oyKGzNkUU5UQf7F5+jUddMCbgK4OZfjDCC9JW\nU+DR2WoQd8zcmuXQ+3Gjl1+3zeBr75QYqGhjmdXBz64EjvHlGq56WOQLJbsL\nNOZ+V2LySVNnBIdYsBQ9GiUjoCsH94XOXOvDnb6CPHHZiDy3vxg/lIaeQNA0\nIp668aUTMgPYua0K/1eIubxcJKG0LrSPFA0jZsQe+tpf/dDmgm6ahBUWq2Cv\n58hLXYAOmpJnDcNySiFl8QsxolHAMhMpGYWR3oBFRRii+P3uvNMOWB/892Ic\nY0b3QHFITKn8Bk69XZBrxrmWW5P/ksz4xw32PJFztSCZqpn5/2oW0JUx4wG+\n1Jq8TVYebwHakc6wD7dZ7fWAPaGK3y0uW16foIWp+Ao9vgpkZegvEaRJCzRR\n6fsAgWNMuQZ2jD79H1xpPCGKgPQiiqj5StUtFQRG9yDrSljlQsKlS53oKXye\nTjUlv1SmwwC9yrFAZmNG40lx4PQ54q2l7Revx5qWTs8OZhVg2StaYziaEVDk\n00/TQAY6Ln8zzRbELwowwBuUUndbtWUHqJ7wUE9d7kQT6mKUkfo//Jmpng1U\nckARJfRiDbqUPSv1ObH2eI/MIcNB2v2KxlQT8TFcNXjz+q4xmXVpOCAcz6SA\nnEKg\r\n=UkcY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC857KmiodY7YBP+GxInQAnMRbbneZeSaKP4SU0YCsE+QIgdyjBFEk5/moCuLYYHPHyAVMq13X9QDcKVfMmvEgM8iE="}],"size":36990,"noattachment":false,"key":"/troika-three-utils/-/troika-three-utils-0.36.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.36.0_1607042272463_0.31553675582073026"},"_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":1607042272662,"_cnpm_publish_time":1607042272662,"dist-tags":{"latest":"0.53.1"}}