import * as THREE from 'three'; // cavity export function cavity(sphereRadius=300, sphereFactor=0.5, cylinderRadius=40, cylinderHeight=600) { const cavityObject = new THREE.Object3D(); const cavitymaterial = new THREE.MeshLambertMaterial({color: 0xb0b0b0}); const cavitygeometry = new THREE.SphereGeometry(sphereRadius, 32, 32); const cavitymesh = new THREE.Mesh(cavitygeometry, cavitymaterial); cavitymesh.scale.setZ(sphereFactor); cavityObject.add(cavitymesh); const rfGeometry = new THREE.CylinderGeometry(cylinderRadius, cylinderRadius, cylinderHeight, 20, 2, false, 0, Math.PI * 2); const rfMesh = new THREE.Mesh(rfGeometry, cavitymaterial); // rfMesh.rotateX(Math.PI * 0.5); rfMesh.position.set(0, sphereRadius, 0); cavityObject.add(rfMesh); return cavityObject; }