Questions tagged [threecsg]

ThreeCSG is a JavaScript wrapper for the csg.js library enabling the use of constructive solid geometry boolean operations with Three.js.

ThreeCSG is a JavaScript wrapper for the csg.js library enabling the use of constructive solid geometry boolean operations with Three.js. Constructive solid geometry allows for the creation of complex objects by combining simpler 3D solids.

35 questions
0
votes
1 answer

Three.js CSG How to change result's material and color?

I'd like to get MeshLambertMaterial on this particular object 'result' which I get after making union of two meshes: var lathe = new THREE.Mesh(latheGeometry); var cube_bsp = new ThreeBSP( lathe ); var box = new THREE.BoxGeometry( 2,30,3); var sub…
0
votes
0 answers

CSG operation not working with objloader using THREE.js

I am trying to perform a subtraction on 2 mesh files imported from objloader using THREE.js and ThreeCSG but it is not working. Here is a piece of code: loader= new THREE.OBJLoader (); loader.load ('../obj/obj/obj/tool.obj', function (object) { …
Arezoo Tony
  • 69
  • 1
  • 8
0
votes
0 answers

Strange result with ThreeCSG and subtract

I'm learning three.js and for a project i need to create an inersection between a cylinder and a sphere. Here is the interesting part of the code : var sphere_mesh_3 = createSphereMesh(rayon_1, 145, color);//,-2,2,-2,2); sphere_mesh_3.position.z…
0
votes
1 answer

Why mesh created with ThreeBSP.js is not working properly with any material other than MeshNormalMaterial?

The dice looks like a dice only if I use MeshNormalMaterial in the second last line (result = resultBSP.toMesh(materialNormal);). With any other material it just looks like a cube with no subtraction (dots) on it. The ThreeBSP (ThreeCSG upgrade)…
0
votes
1 answer

How add texture to a three.js after it has gone throught a CSG.js process?

This my code: var materialNormal = new THREE.MeshNormalMaterial(); var cubeGeometry = new THREE.CubeGeometry( 20, 500, 1000, 1, 1, 1 ); var cubeMesh = new THREE.Mesh( cubeGeometry ); cubeMesh.position.set(-50, 60, 0); //scene.add(cubeMesh);…
1 2
3