{"_id":"@coconut-xr/xmaterials","_rev":"3-c64c9e952f464baf9b84544e1ca8da19","name":"@coconut-xr/xmaterials","dist-tags":{"latest":"0.0.3"},"versions":{"0.0.0":{"name":"@coconut-xr/xmaterials","version":"0.0.0","description":"collection of materials for interactive immersive experiences","keywords":["three.js","3d","webxr","shader","glsl"],"homepage":"https://coconut-xr.github.io/xmaterials","repository":{"type":"git","url":"git+ssh://git@github.com/coconut-xr/xmaterials.git"},"scripts":{"build":"tsc -p tsconfig.build.json","check":"run-s check:prettier check:eslint","check:prettier":"prettier --check src/**/*.ts","check:eslint":"eslint src","fix":"run-s fix:prettier fix:eslint","fix:prettier":"prettier --write src/**/*.ts","fix:eslint":"eslint src --fix"},"main":"dist/index.js","type":"module","author":{"name":"Bela Bohlender"},"license":"SEE LICENSE IN LICENSE","devDependencies":{"@types/three":"^0.146.0","npm-run-all":"^4.1.5","prettier":"^2.8.0","three":"^0.147.0","typescript":"^4.9.3","@typescript-eslint/eslint-plugin":"^5.45.1","@typescript-eslint/parser":"^5.45.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.31.11","eslint-plugin-react-hooks":"^4.6.0","eslint":"^8.29.0"},"peerDependencies":{"three":">=0.140.0"},"types":"./dist/index.d.ts","gitHead":"f2e2611f0e213457c779cc099ea4fa2a7902bf8f","bugs":{"url":"https://github.com/coconut-xr/xmaterials/issues"},"_id":"@coconut-xr/xmaterials@0.0.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-8C2XCdYME5DsuPBX7UOA2RpIYJqd0Op2WWK2QHhrigvWnryB13v9axDyNcAFmx8ur511DHLbXzbfsV6biUB5GA==","shasum":"7be0ae53d45c64d6f8d104e8a9a6aa68236ce5d6","tarball":"https://registry.npmjs.org/@coconut-xr/xmaterials/-/xmaterials-0.0.0.tgz","fileCount":13,"unpackedSize":27933,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC9OMY430fksd4LwcmcdNfLML8jNSCn4ZqxtxAsjadd0wIhALWhGVySei0q1EczHYyWf6GcIJ+kAt3QrIf8TyHVQ1OX"}]},"_npmUser":{"name":"bbohlender","email":"bbohlender@coconut-capital.com"},"directories":{},"maintainers":[{"name":"cc-mjahn","email":"mjahn@coconut-capital.com"},{"name":"bbohlender","email":"bbohlender@coconut-capital.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmaterials_0.0.0_1687975948573_0.5414924937497201"},"_hasShrinkwrap":false},"0.0.1":{"name":"@coconut-xr/xmaterials","version":"0.0.1","description":"collection of materials for interactive immersive experiences","keywords":["three.js","3d","webxr","shader","glsl"],"homepage":"https://coconut-xr.github.io/xmaterials","repository":{"type":"git","url":"git+ssh://git@github.com/coconut-xr/xmaterials.git"},"scripts":{"build":"tsc -p tsconfig.build.json","check":"run-s check:prettier check:eslint","check:prettier":"prettier --check src/**/*.ts","check:eslint":"eslint src","fix":"run-s fix:prettier fix:eslint","fix:prettier":"prettier --write src/**/*.ts","fix:eslint":"eslint src --fix"},"main":"dist/index.js","type":"module","author":{"name":"Bela Bohlender"},"license":"SEE LICENSE IN LICENSE","devDependencies":{"@types/three":"^0.146.0","npm-run-all":"^4.1.5","prettier":"^2.8.0","three":"^0.147.0","typescript":"^4.9.3","@typescript-eslint/eslint-plugin":"^5.45.1","@typescript-eslint/parser":"^5.45.1","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.31.11","eslint-plugin-react-hooks":"^4.6.0","eslint":"^8.29.0"},"peerDependencies":{"three":">=0.140.0"},"types":"./dist/index.d.ts","gitHead":"6e336c0ccb107b29d4573e4269b873130a16f843","bugs":{"url":"https://github.com/coconut-xr/xmaterials/issues"},"_id":"@coconut-xr/xmaterials@0.0.1","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-PEWCPrC9V0BckRWHoZSkKZO/id5vTakEsP/yNUyr9nfWujHy+nPL01gsvBJ5yEhGM7ybmNkXMFWRjt/4ikTPWA==","shasum":"ec745e67779e8889e9f1bbdb61fb906f71002684","tarball":"https://registry.npmjs.org/@coconut-xr/xmaterials/-/xmaterials-0.0.1.tgz","fileCount":13,"unpackedSize":28844,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuuX1EWeAvdGX9v4gLgRQXFHkbsVfmZASqu+efglJYwwIhAIxWQFHv6pXZUhe0SY4x1UUmb1PG+UOtefgtI4MpeT1W"}]},"_npmUser":{"name":"bbohlender","email":"bbohlender@coconut-capital.com"},"directories":{},"maintainers":[{"name":"cc-mjahn","email":"mjahn@coconut-capital.com"},{"name":"bbohlender","email":"bbohlender@coconut-capital.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmaterials_0.0.1_1687990029929_0.3599924066407807"},"_hasShrinkwrap":false},"0.0.2":{"name":"@coconut-xr/xmaterials","version":"0.0.2","description":"collection of materials for interactive immersive experiences","keywords":["three.js","3d","webxr","shader","glsl"],"homepage":"https://coconut-xr.github.io/xmaterials","repository":{"type":"git","url":"git+ssh://git@github.com/coconut-xr/xmaterials.git"},"scripts":{"build":"tsc -p tsconfig.build.json","check":"run-s check:prettier check:eslint","check:prettier":"prettier --check src/**/*.ts","check:eslint":"eslint src","fix":"run-s fix:prettier fix:eslint","fix:prettier":"prettier --write src/**/*.ts","fix:eslint":"eslint src --fix"},"main":"dist/index.js","type":"module","author":{"name":"Bela Bohlender"},"license":"SEE LICENSE IN LICENSE","devDependencies":{"@types/three":"^0.146.0","@typescript-eslint/eslint-plugin":"^5.45.1","@typescript-eslint/parser":"^5.45.1","eslint":"^8.29.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.31.11","eslint-plugin-react-hooks":"^4.6.0","npm-run-all":"^4.1.5","prettier":"^2.8.0","three":"^0.153.0","typescript":"^4.9.3"},"peerDependencies":{"three":">=0.140.0"},"types":"./dist/index.d.ts","gitHead":"1286149bd8406172f44bebc9d1ae65a27b3a4aaa","bugs":{"url":"https://github.com/coconut-xr/xmaterials/issues"},"_id":"@coconut-xr/xmaterials@0.0.2","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-1XwK3C8wRGUhw+KRgr3DTihdcJKIWi1jBKDWHe9xxW+y9j3ly9IxKI1Zdnzo0EpiRoOOhuIssaurgbx03h1lug==","shasum":"8fc6595c19085374b567e4ae5bcef8d40391f7c3","tarball":"https://registry.npmjs.org/@coconut-xr/xmaterials/-/xmaterials-0.0.2.tgz","fileCount":13,"unpackedSize":28890,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGWumCEMlt5oef8hmiFuaUQVBYruNNkHrvkaU4fsqSKXAiEAhbadoa7Wom/+DLh2ZunG52Gjmg4GxD17zWpT6l/YjEc="}]},"_npmUser":{"name":"bbohlender","email":"bbohlender@coconut-capital.com"},"directories":{},"maintainers":[{"name":"cc-mjahn","email":"mjahn@coconut-capital.com"},{"name":"bbohlender","email":"bbohlender@coconut-capital.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmaterials_0.0.2_1687993179948_0.39056235189568955"},"_hasShrinkwrap":false},"0.0.3":{"name":"@coconut-xr/xmaterials","version":"0.0.3","description":"collection of materials for interactive immersive experiences","keywords":["three.js","3d","webxr","shader","glsl"],"homepage":"https://coconut-xr.github.io/xmaterials","repository":{"type":"git","url":"git+ssh://git@github.com/coconut-xr/xmaterials.git"},"scripts":{"build":"tsc -p tsconfig.build.json","check":"run-s check:prettier check:eslint","check:prettier":"prettier --check src/**/*.ts","check:eslint":"eslint src","fix":"run-s fix:prettier fix:eslint","fix:prettier":"prettier --write src/**/*.ts","fix:eslint":"eslint src --fix"},"main":"dist/index.js","type":"module","author":{"name":"Bela Bohlender"},"license":"SEE LICENSE IN LICENSE","devDependencies":{"@types/three":"^0.146.0","@typescript-eslint/eslint-plugin":"^5.45.1","@typescript-eslint/parser":"^5.45.1","eslint":"^8.29.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.31.11","eslint-plugin-react-hooks":"^4.6.0","npm-run-all":"^4.1.5","prettier":"^2.8.0","three":"^0.153.0","typescript":"^4.9.3"},"peerDependencies":{"three":">=0.140.0"},"types":"./dist/index.d.ts","gitHead":"f9071c0e995c0b9a230e77efc2d216e41b3a2f84","bugs":{"url":"https://github.com/coconut-xr/xmaterials/issues"},"_id":"@coconut-xr/xmaterials@0.0.3","_nodeVersion":"18.16.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-lqchBqGz5cbKzIAZhVHR/BvHH9ReS6rtZo+FMU/Ra4B/htJGA1UgzjTor6ybUuRLHgB9o1MWcW9GJ2KX/qukNg==","shasum":"286a95a9cf19dc68e0fa1fdad2f9c16783a02e2c","tarball":"https://registry.npmjs.org/@coconut-xr/xmaterials/-/xmaterials-0.0.3.tgz","fileCount":13,"unpackedSize":30929,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH5FbBmMmk5ATkBsHHHVHVRqcSu4ojx1HWmHJS4Vgb24AiBqML1yYY+Iv/D9Afyosiv2nFt0j/xAKGYwegIqqTOKWQ=="}]},"_npmUser":{"name":"bbohlender","email":"bbohlender@coconut-capital.com"},"directories":{},"maintainers":[{"name":"cc-mjahn","email":"mjahn@coconut-capital.com"},{"name":"bbohlender","email":"bbohlender@coconut-capital.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/xmaterials_0.0.3_1688051031838_0.15717082208545463"},"_hasShrinkwrap":false}},"time":{"created":"2023-06-28T18:12:28.509Z","0.0.0":"2023-06-28T18:12:28.737Z","modified":"2023-06-29T15:03:52.131Z","0.0.1":"2023-06-28T22:07:10.180Z","0.0.2":"2023-06-28T22:59:40.162Z","0.0.3":"2023-06-29T15:03:52.007Z"},"maintainers":[{"name":"cc-mjahn","email":"mjahn@coconut-capital.com"},{"name":"bbohlender","email":"bbohlender@coconut-capital.com"}],"description":"collection of materials for interactive immersive experiences","homepage":"https://coconut-xr.github.io/xmaterials","keywords":["three.js","3d","webxr","shader","glsl"],"repository":{"type":"git","url":"git+ssh://git@github.com/coconut-xr/xmaterials.git"},"author":{"name":"Bela Bohlender"},"bugs":{"url":"https://github.com/coconut-xr/xmaterials/issues"},"license":"SEE LICENSE IN LICENSE","readme":"# @coconut-xr/xmaterials\n\n\n[![Version](https://img.shields.io/npm/v/@coconut-xr/xmaterials?style=flat-square)](https://npmjs.com/package/@coconut-xr/xmaterials)\n[![License](https://img.shields.io/github/license/coconut-xr/xmaterials.svg?style=flat-square)](https://github.com/coconut-xr/xmaterials/blob/master/LICENSE)\n[![Twitter](https://img.shields.io/twitter/follow/coconut_xr?style=flat-square)](https://twitter.com/coconut_xr)\n[![Discord](https://img.shields.io/discord/1087727032240185424?style=flat-square&label=discord)](https://discord.gg/RbyaXJJaJM)\n\n`npm i @coconut-xr/xmaterials`\n\n_A collection of materials for interactive immersive experiences._\n\n# Usage\n\n**with Three.js**\n\n```ts\nconst MeshFadeBasicMaterial = makeFadeMaterial(MeshBasicMaterial);\nconst mesh = new Mesh(\n  new BoxGeometry(),\n  new MeshFadeBasicMaterial({ transparent: true, color: \"blue\" }),\n);\nmesh.scale(0.1, 0.1, 1);\n```\n\n**with R3F**\n\n```tsx\nconst MeshFadeBasicMaterial = makeFadeMaterial(MeshBasicMaterial);\nextend({ MeshFadeBasicMaterial });\n\n<mesh scale={[0.1, 0.1, 1]}>\n  <boxGeometry />\n  <meshFadeBasicMaterial transparent color=\"blue\" />\n</mesh>;\n```\n\n# Materials\n\n- **makeCursorMaterial** - _creates a radial opacity effect on a plane_\n\n- **makeBorderMaterial** - _displays a border with various effects on a plane_\n  - borderRadius - radius of the corners (_top-left, top-right, bottom-right, bottom-left_) - default is `(0, 0, 0, 0)`\n  - borderColor - color of the border - default is `(0, 0, 0)`\n  - borderSize - size of the border on all edges (_top, right, bottom, left_) - default is `(0, 0, 0, 0)`\n  - borderOpacity - opacity of the border (requires `transparent=true`) - default is `1`\n  - ratio - aspect ratio of the target plane - default is `1`\n  - borderBend - bends the normals of the border in the direction of the border - default is `0.5`\n\n- **makeFadeMaterial** - _fades the opacity by mapping the z-position of the geometry from -0.5 to 0.5 on the z-axis_\n\n- **makeHighlightMaterial** - _displays a highlight effect based on the distance of up to 2 world positions_\n  - position1 - `Vector3` - position of the first highlighting element - default is `(Infinity, Infinity, Infinity)`\n  - position2 - `Vector3` - position of the second highlighting element - default is `(Infinity, Infinity, Infinity)`\n  - highlightOpacity - `number` - opacity of the highlight - default is `1`\n  - highlightDistance - `number` - distance at which the highlight should start to appear - default is `1`\n  - highlightColor - `Vector3` - color of the highlight - default is `(1, 1, 1)`\n","readmeFilename":"README.md"}