Looking for Updated plug-in for CSG

is your version support plane subtract operator?

looking for CSG version support plane.subtract operator

.

import * as THREE from 'three';
import { CSG } from 'three-csg-ts';

// Make 2 meshes..
const plane= new THREE.Mesh(new THREE.PlaneGeometry(3, 3, 1, 1), new THREE.MeshNormalMaterial());
const box = new THREE.Mesh(new THREE.BoxGeometry(2, 2, 2), new THREE.MeshNormalMaterial());
);

// Make sure the .matrix of each mesh is current
box.updateMatrix();
plane.updateMatrix();

// Perform CSG operations
// The result is a THREE.Mesh that you can add to your scene...
//this result was wrong.
const subRes = CSG.subtract(plane, box);
1 Like