{"id":16580534,"url":"https://github.com/looeee/threejs-csg","last_synced_at":"2025-03-16T20:31:41.251Z","repository":{"id":39057661,"uuid":"267004177","full_name":"looeee/threejs-csg","owner":"looeee","description":"Constructive Solid Geometry for three.js, ES6 + BufferGeometry","archived":false,"fork":false,"pushed_at":"2023-03-05T12:00:14.000Z","size":6700,"stargazers_count":136,"open_issues_count":11,"forks_count":16,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-27T13:37:25.618Z","etag":null,"topics":["3d","3d-graphics","3d-models","boolean-operations","constructive-solid-geometry","csg","threejs","threejs-csg","webgl","webgl2"],"latest_commit_sha":null,"homepage":"https://csg.lewy.blue/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/looeee.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-26T09:45:54.000Z","updated_at":"2025-01-07T07:35:41.000Z","dependencies_parsed_at":"2023-02-01T00:31:04.659Z","dependency_job_id":null,"html_url":"https://github.com/looeee/threejs-csg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looeee%2Fthreejs-csg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looeee%2Fthreejs-csg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looeee%2Fthreejs-csg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/looeee%2Fthreejs-csg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/looeee","download_url":"https://codeload.github.com/looeee/threejs-csg/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243830922,"owners_count":20354850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-graphics","3d-models","boolean-operations","constructive-solid-geometry","csg","threejs","threejs-csg","webgl","webgl2"],"created_at":"2024-10-11T22:25:58.424Z","updated_at":"2025-03-16T20:31:40.175Z","avatar_url":"https://github.com/looeee.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# threejs-csg (Experimental)\n\nConstructive Solid Geometry for three.js, ES6 + BufferGeometry.\n\nNote: I have stopped working on this for now and there are bugs, although it should work for simple shapes. \n\n# Developing\n\nRun `npm install` then `npm start`\n\nTo view the demo, direct your browser to\nhttp://127.0.0.1:8080/demo/tests/index.html\n\n# Usage\n\n```\nconst box = new Mesh(new BoxBufferGeometry(0.2, 0.2, 1), material);\nbox.position.set(0.1, 0.1, 0);\n\nconst sphere = new Mesh(new SphereBufferGeometry(0.1), material);\nsphere.position.set(0, 0, -0.3);\n\nconst sphereB = sphere.clone();\nsphereB.position.set(0, 0, 0.3);\n\nconst csg = new CSG();\n\ncsg.subtract([box, sphere, sphereB]);\n// csg.union([box, sphere, sphereB]);\n// csg.intersect([box, sphere]);\n\nconst resultMesh = csg.toMesh();\n```\n\n# TODO\n\n* Only the material from the first mesh is used.\n* Vertex colors are ignored.\n* Make it faster!! \n\n# Prior Work\n\nhttp://evanw.github.io/csg.js/docs\n\nhttps://github.com/jscad/csg.js\n\nhttp://sandervanrossen.blogspot.com/2010/05/csg-operations.html\n\nhttps://www.geometrictools.com/Documentation/ClipMesh.pdf\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooeee%2Fthreejs-csg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flooeee%2Fthreejs-csg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flooeee%2Fthreejs-csg/lists"}