{"_id":"@alancnet/three-csg","_rev":"1-5a16e38410b475397c8bd5728cb143e9","name":"@alancnet/three-csg","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@alancnet/three-csg","version":"0.0.1","description":"> A [THREE.js](http://threejs.org/) plugin to allow implementing boolean operations on THREE Objects(Mesh, Geometry). The boolean operations are supported by [csg.js](http://threejs.org/). For an overview of the CSG process, see the orginal [csg.js](https","main":"index.js","scripts":{"build":"rollup -c","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/oathihs/ThreeCSG.git"},"author":{"name":"Stan Guo"},"license":"ISC","bugs":{"url":"https://github.com/oathihs/ThreeCSG/issues"},"homepage":"https://github.com/oathihs/ThreeCSG","devDependencies":{"rollup":"^0.26.3"},"gitHead":"31acd04e2eba0f3689d2a5c0a8a50d0d907ee816","_id":"@alancnet/three-csg@0.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.11.0","_npmUser":{"name":"alancnet","email":"npm@alanc.net"},"dist":{"integrity":"sha512-P9QxnFJSoqBzQ3FjAdIIIwbnl3UibZP79semwj2suhr1W4sllPwnnAY3hzqU2xER8JIsYzFl8b6kxznEPfQMEg==","shasum":"eab4e3e0b45acaf5e867a33dc97cbb1250ed333d","tarball":"https://registry.npmjs.org/@alancnet/three-csg/-/three-csg-0.0.1.tgz","fileCount":9,"unpackedSize":603746,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcMX0fCRA9TVsSAnZWagAAbmcP/A3JntYkmWsXGElfJOpI\nL7f2JvRfskotCgDHauAnLsc00nR/LmFK7YwoTtVFIOQzA75ogRhhdi4gTMSo\n8Txtybvo2SrCMk4yaWo3qDkLOXd9UYl0EGORuYMDSC+L/LALq4ZqPEeqfzC1\nPVbdE+tDYt5EBJogZohY7Y99A6YrRZsifX8miU0Ba363mxZ265yAWTnYnpSM\nW1R5j1ljDWb7bnRxNU3xsgXTNa2+YASLdkmkAPUhsU79byu8lqIrXrF8o6Tg\n9uqzfrC5r3fxeNdGW1Ho+gC2juuokHLaF6eVv2xYc5EXdQMWg/DAN3P2SeUg\nmDfqdfvRqMFkss9b4AyMNxoEmhnYE+M/lAD6v1OTP+yhxiGGxJgxJ+clnibk\nFFBgUUZafhsLFDojfB/FZ22RqNDPz36KCHQ+cR8uP0vGAAOCU9UfjOzC0vDI\nP8mkAovs3basACMCvqQr8Kz7i02+K5w1OCWp1l9RUaNCBr9ZrgRD32st24aa\nAKRNDAR8EKkU8fR8b7D44xUatgaijfAs6zRp9ArOGc9G1SqgoBnVWJJM4C51\n4kFikzqEqUQ2EuvUZXY2bwPIty/FTqa4PYRxiJtfDkBJaJQn92mWmKNHoTL2\nK9aFfvVXSiPDp1uHkkPsluDsGk1Xchh7ItOQ29z6461JK3xQehvRuBLT+eZf\n/1+w\r\n=9hS+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFpsmz8wt0RZrbtFQPh9OsWpNPfYUUEiF+rjw6ZcdH3QIhAKo+qf64WLvptg6O9iRdscKuQaxlQL9EDtug7YsXQPUt"}]},"maintainers":[{"name":"alancnet","email":"npm@alanc.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/three-csg_0.0.1_1546747166776_0.8464323384532795"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-06T03:59:26.602Z","0.0.1":"2019-01-06T03:59:26.916Z","modified":"2022-04-04T12:33:00.185Z"},"maintainers":[{"name":"alancnet","email":"npm@alanc.net"}],"description":"> A [THREE.js](http://threejs.org/) plugin to allow implementing boolean operations on THREE Objects(Mesh, Geometry). The boolean operations are supported by [csg.js](http://threejs.org/). For an overview of the CSG process, see the orginal [csg.js](https","homepage":"https://github.com/oathihs/ThreeCSG","repository":{"type":"git","url":"git+https://github.com/oathihs/ThreeCSG.git"},"author":{"name":"Stan Guo"},"bugs":{"url":"https://github.com/oathihs/ThreeCSG/issues"},"license":"ISC","readme":"# THREE.CSG\r\n> A [THREE.js](http://threejs.org/) plugin to allow implementing boolean operations on THREE Objects(Mesh, Geometry). The boolean operations are supported by [csg.js](http://threejs.org/). For an overview of the CSG process, see the orginal [csg.js](https://evanw.github.io/csg.js/) code.\r\n\r\n## Include in Your HTML\r\nRemember to include THREE.js before including this plugin.\r\n``` bash\r\n<script src=\"dist/THREE.CSG.js\"></script>\r\n```\r\n\r\n\r\n## Usage\r\n\r\n### Convert between THREE object and CSG object\r\n``` bash\r\n# convert THREE.Geometry to CSG format\r\nvar csg = THREE.CSG.fromGeometry(geometry)\r\n\r\n# convert THREE.Mesh to CSG format\r\nvar csg = THREE.CSG.fromMesh(mesh)\r\n\r\n# convert to THREE.Geometry\r\nvar geometry = THREE.CSG.toGeometry(csg)\r\n\r\n# convert to THREE.Mesh\r\nvar mesh = THREE.CSG.toMesh(csg, material)\r\n```\r\n\r\n### Boolean Operations\r\n``` bash\r\n# Union\r\nvar result = A.union(B)\r\n\r\n# Subtract\r\nvar result = A.subtract(B)\r\n\r\n# Intersect\r\nvar result = A.intersect(B)\r\n```\r\nNOTE: Both A and B should be in CSG format for boolean operations.\r\n\r\n## Live Demo\r\n[live Demo](http://oathihs.github.io/ThreeCSG/)\r\n\r\n## Development\r\n``` bash\r\n# install dependencies\r\nnpm install\r\n\r\n# build for production\r\nnpm run build\r\n```\r\n","readmeFilename":"README.md"}