function addSphere1() {
let shape = new CANNON.Sphere(radius); // Step 1
var body = new CANNON.Body({ mass: 0 });
body.addShape(shape);
body.position.set(0,0,0);
world.addBody(body);
}
|
function addSphere2() {
var shape = new THREE.SphereGeometry( radius, 32, 32 );
var mat = new THREE.MeshNormalMaterial();
var mesh = new THREE.Mesh( shape, mat );
mesh.position.set(0, 0, 0);
scene2.add( mesh );
}
|