note: Utilizing Three-CSG for the purpose of merging geometries in Three.js.
An error is being thrown stating
Uncaught ThreeBSP: Given geometry is unsupported
when an instance of THREE.Mesh is passed into the ThreeBSP
method of the library.
Any insights on why this error is occurring? Below is a snippet of the code I am working with. The object being passed into the library method is confirmed as an instanceof
THREE.Mesh
within the js file. Thus, it is perplexing as to why the error is being generated. Any assistance on this matter would be highly appreciated!
import THREE from 'three';
import CSG from 'three-csg';
[...]
export const meshFactory = () => {
const cone = {};
cone.geometry = new THREE.CylinderGeometry(5, 100, 100, 32);
cone.mesh = new THREE.Mesh(cone.geometry);
console.log(cone.mesh instanceof THREE.Mesh); // returns true
const coneBSP = new CSG(cone.mesh); // error occurs here as it seems the instance is not recognized as THREE.Mesh or other valid instances
[...]
};
Appreciate your help, James.