Hello all,
This is my 6th day with Three.js. Learned a lot from all the resources. I can now load a Draco compressed gltf with the gltf-pipeline. All the textures Automatically load absolutely perfect.
Now I want to use clipping planes to perform a cross section of the loaded gltf.
I got some inspiration from threejs example.
That too was achieved, but by selecting each individual material and assigning the values, including manual loading of the texture. I tried
object.traverse((o) => {
if (o.isMesh) {
o.material.emissive = new THREE.Color( 0x00ffff );
o.material.clippingPlanes= new THREE.clippingPlanes('localPlane');
o.material.side = new THREE.side.double;
}
});
ReferenceError: “Three is not defined”
All I want is to add
// ***** Clipping setup (material): *****
side: THREE.DoubleSide,
clippingPlanes: [ localPlane ],
clipShadows: true
for all default materials.
Any pointers are much appreciated.
Thanks for you time.
Take care!