{"_id":"@dailies-studio/tsl-textures","name":"@dailies-studio/tsl-textures","dist-tags":{"latest":"3.0.4"},"versions":{"3.0.4":{"name":"@dailies-studio/tsl-textures","version":"3.0.4","description":"Vendored fork of tsl-textures@3.0.4 (Pavel Boytchev, MIT) carrying the perlin-noise/static-noise clamp fix.","type":"module","main":"./src/tsl-textures.js","module":"./src/tsl-textures.js","exports":{"./tsl-textures.js":{"require":"./dist/cjs/tsl-textures.cjs","import":"./dist/tsl-textures.js"},".":{"require":"./dist/cjs/tsl-textures.cjs","import":"./dist/tsl-textures.js"}},"keywords":["texture","tsl","three.js"],"homepage":"https://boytchev.github.io/tsl-textures/","author":{"name":"Pavel Boytchev"},"license":"MIT","peerDependencies":{"three":"^0.185.1"},"_id":"@dailies-studio/tsl-textures@3.0.4","_integrity":"sha512-ay//OYyupYgdBKpNX3h5CLrACL79bzq+3tJt3xGbn2cWnyFi3LzmiZyZJbSqUJaBmBEFKy5452P41lfeRpBQlA==","_resolved":"C:\\Users\\Kanishak\\AppData\\Local\\Temp\\6ef06245371bf61f52b11acc0df7eda9\\dailies-studio-tsl-textures-3.0.4.tgz","_from":"file:dailies-studio-tsl-textures-3.0.4.tgz","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-ay//OYyupYgdBKpNX3h5CLrACL79bzq+3tJt3xGbn2cWnyFi3LzmiZyZJbSqUJaBmBEFKy5452P41lfeRpBQlA==","shasum":"1c3870e2ba527eee598497e2a4854fc56c9ad4de","tarball":"https://registry.npmjs.org/@dailies-studio/tsl-textures/-/tsl-textures-3.0.4.tgz","fileCount":62,"unpackedSize":499121,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDoALRNNWRc7023qSr312rSD4MDiHukXNUmguOBsLh2MAiBO9psQetmPJ5A2Ddns+gAD6u55Exxc38npnzVjWsEyDA=="}]},"_npmUser":{"name":"kani_shak","email":"i.kanishakm@gmail.com"},"directories":{},"maintainers":[{"name":"kani_shak","email":"i.kanishakm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tsl-textures_3.0.4_1786861965683_0.16694109795753698"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T06:32:45.539Z","3.0.4":"2026-08-16T06:32:45.852Z","modified":"2026-08-16T06:32:46.086Z"},"maintainers":[{"name":"kani_shak","email":"i.kanishakm@gmail.com"}],"description":"Vendored fork of tsl-textures@3.0.4 (Pavel Boytchev, MIT) carrying the perlin-noise/static-noise clamp fix.","homepage":"https://boytchev.github.io/tsl-textures/","keywords":["texture","tsl","three.js"],"author":{"name":"Pavel Boytchev"},"license":"MIT","readme":"# tsl-textures\n\n> This is a vendored fork of tsl-textures@3.0.4 (Pavel Boytchev, MIT) carrying the perlin-noise/static-noise clamp fix until it lands upstream: upstream calls `clamp(0, 1, k)`, but three's `clamp` signature is `(value, min, max)`, so the fix replaces it with `k.min(1)` in `perlinNoiseRaw` and `staticNoiseRaw`.\n\nA collection of Three.js Shading Language (TSL) textures &ndash;\nthese are online real-time procedural generators of 3D textures.\n\nPick a texture from the [Project home page](https://boytchev.github.io/tsl-textures/).\n\n\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/planet/screenshot.jpg\" width=\"200\">](https://boytchev.github.io/tsl-textures/examples/planet/index.html)\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/normal-map/screenshot.jpg\" width=\"200\">](https://boytchev.github.io/tsl-textures/examples/normal-map/index.html)\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/wooden-toys/screenshot.jpg\" width=\"200\">](https://boytchev.github.io/tsl-textures/examples/wooden-toys/index.html)\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/protozoa/screenshot.jpg\" width=\"200\">](https://boytchev.github.io/tsl-textures/examples/protozoa/index.html)\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/neck-massage/screenshot.jpg\" width=\"200\">](https://boytchev.github.io/tsl-textures/examples/neck-massage/index.html)\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/watermelon/screenshot.jpg\" width=\"200\">](https://boytchev.github.io/tsl-textures/examples/watermelon/index.html)\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/texture-in-motion/screenshot.jpg\" width=\"200\">](https://boytchev.github.io/tsl-textures/examples/texture-in-motion/index.html)\n\n<!--\n#### Example \"Planet\"\n\nUses [planet.js](https://boytchev.github.io/tsl-textures/docs/planet.html)\nfor both the planet and its moon; and [stars.js](https://boytchev.github.io/tsl-textures/docs/stars.html)\nfor the stars. Click on the image for a live demo.\n\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/example-planet.jpg\">](https://boytchev.github.io/tsl-textures/examples/example-planet.html)\n\n\n#### Example \"Normal map\"\n\nUses tsl-utils.js to generate two normal maps and the transition between them.\nThe normal are created directly without using any of the TSL texture generators.\nClick on the image for a live demo.\n\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/example-normal-map.jpg\">](https://boytchev.github.io/tsl-textures/examples/example-normal-map.html)\n\n\n#### Example \"Wooden toys\"\n\nUses [wood.js](https://boytchev.github.io/tsl-textures/docs/wood.html) texture\nto convert flat-color 3D models (an ambulance, a race car and a luxury SUV from\nCar Kit (1.4) by Kenney [www.kenney.nl](https://www.kenney.nl/)) into wooden toys.\nAll the wood textures are procedurally generated in real-time. Click on the image\nfor a live demo. (Note: non-WebGPU browsers might need 30+ seconds to start up.)\n\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/example-wooden-toys.jpg\">](https://boytchev.github.io/tsl-textures/examples/example-wooden-toys.html)\n\n\n#### Example \"Protozoa\"\n\nUses [protozoa.js](https://boytchev.github.io/tsl-textures/docs/protozoa.html)\ntexture to create a dynamic blob with microorganisms floating innside. A space\nstation is constructed arounnd the blob. The surface of the station is made of\na Dyson sphere texture from [dyson-texture.js](https://boytchev.github.io/tsl-textures/docs/dyson-sphere.html).\nClick on the image for a live demo.\n\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/example-protozoa.jpg\">](https://boytchev.github.io/tsl-textures/examples/example-protozoa.html)\n\n\n#### Example \"Neck massage\"\n\nUses [rotator.js](https://boytchev.github.io/tsl-textures/docs/rotator.html)\ntexture that applies soft matrices on model vertices. This allows to make\ngradual rotation that looks like stretching skin and flexing muscles. The\nanimation does not use skinning or morphing, the model is not preprocessed\nin any way, and no additional vertex data is added. Click on the image\nfor a live demo. \n\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/example-neck-massage.jpg\">](https://boytchev.github.io/tsl-textures/examples/example-neck-massage.html)\n\n\n#### Example \"Watermelon supersphere\"\n\nUses [supersphere.js](https://boytchev.github.io/tsl-textures/docs/supersphere.html)\ntexture to generate the shape of a [supersphere](https://mathworld.wolfram.com/Supersphere.html)\nand [watermelon.js](https://boytchev.github.io/tsl-textures/docs/watermelon.html)\ntexture to color the surface in a watermelon pattern. Both the shape and the pattern\nare continuously changing. Click on the image for a live demo.\n\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/example-watermelon-supersphere.jpg\">](https://boytchev.github.io/tsl-textures/examples/example-watermelon-supersphere.html)\n\n\n#### Example \"Texture in motion\"\n\nUses [dyson-sphere.js](https://boytchev.github.io/tsl-textures/docs/dyson-sphere.html),\n[camouflage.js](https://boytchev.github.io/tsl-textures/docs/camouflage.html),\n[dalmatian-spots.js](https://boytchev.github.io/tsl-textures/docs/dalmatian-spots.html) and\n[planet.js](https://boytchev.github.io/tsl-textures/docs/planet.html) textures\nand applies them on the elements of an animated GLTF model. Textures are blended\nvia a TSL function. Click on the image for a live demo. (Note: non-WebGPU browsers\nmight need 30+ seconds to start up.)\n\n[<img src=\"https://boytchev.github.io/tsl-textures/examples/example-texture-in-motion.jpg\">](https://boytchev.github.io/tsl-textures/examples/example-texture-in-motion.html)\n-->\n\n## Usage\n\n### Use with NPM\n\n**Install**\n```bat\nnpm install three tsl-textures\n```\n\n**Use in a javascript file**\n```js\n// Important: Use `webgpu` version of Three.js\nimport * as THREE from 'three/webgpu';\n\n// Import your desired texture\nimport { polkaDots } from 'tsl-textures/polka-dots';\n\n// Create the renderer. Important: Use `WebGPURenderer`\nrenderer = new THREE.WebGPURenderer({antialias: true});\n\n// ... Create your Three.js scene, camera, lights, etc.\n\n// Create geometry\nconst objectGeometry = new THREE.IcosahedronGeometry(1, 12)\n\n// Create material: Important: Use `Node` Material\nobjectMaterial = new THREE.MeshStandardNodeMaterial({\n    color: 0xCCCCCC,\n    roughness: 0.5,\n    metalness: 0.0,\n});\n\n// Apply texture to the material's `colorNode` property\nobjectMaterial.colorNode = polkaDots ( {\n    count: 2,\n    size: 0.6,\n    blur: 0.22,\n    color: new THREE.Color(0),\n    background: new THREE.Color(16777215)\n} );\n\n// Assign Geometry and Material to a Mesh\nobject = new THREE.Mesh(objectGeometry, objectMaterial);\n\n// Render\nrenderer.render( scene, camera );\n```\n","readmeFilename":"README.md","_rev":"1-690b87d9819b5c56acf95d1470adf9b3"}