|
@@ -321,7 +321,7 @@
|
|
case 1:
|
|
case 1:
|
|
// Sphere
|
|
// Sphere
|
|
var radius = 1 + Math.random() * objectSize;
|
|
var radius = 1 + Math.random() * objectSize;
|
|
- threeObject = new THREE.Mesh( new THREE.SphereGeometry( radius, 20, 20 ), createObjectMaterial() );
|
|
|
|
|
|
+ threeObject = new THREE.Mesh( new THREE.SphereBufferGeometry( radius, 20, 20 ), createObjectMaterial() );
|
|
shape = new Ammo.btSphereShape( radius );
|
|
shape = new Ammo.btSphereShape( radius );
|
|
shape.setMargin( margin );
|
|
shape.setMargin( margin );
|
|
break;
|
|
break;
|
|
@@ -330,7 +330,7 @@
|
|
var sx = 1 + Math.random() * objectSize;
|
|
var sx = 1 + Math.random() * objectSize;
|
|
var sy = 1 + Math.random() * objectSize;
|
|
var sy = 1 + Math.random() * objectSize;
|
|
var sz = 1 + Math.random() * objectSize;
|
|
var sz = 1 + Math.random() * objectSize;
|
|
- threeObject = new THREE.Mesh( new THREE.BoxGeometry( sx, sy, sz, 1, 1, 1 ), createObjectMaterial() );
|
|
|
|
|
|
+ threeObject = new THREE.Mesh( new THREE.BoxBufferGeometry( sx, sy, sz, 1, 1, 1 ), createObjectMaterial() );
|
|
shape = new Ammo.btBoxShape( new Ammo.btVector3( sx * 0.5, sy * 0.5, sz * 0.5 ) );
|
|
shape = new Ammo.btBoxShape( new Ammo.btVector3( sx * 0.5, sy * 0.5, sz * 0.5 ) );
|
|
shape.setMargin( margin );
|
|
shape.setMargin( margin );
|
|
break;
|
|
break;
|
|
@@ -338,7 +338,7 @@
|
|
// Cylinder
|
|
// Cylinder
|
|
var radius = 1 + Math.random() * objectSize;
|
|
var radius = 1 + Math.random() * objectSize;
|
|
var height = 1 + Math.random() * objectSize;
|
|
var height = 1 + Math.random() * objectSize;
|
|
- threeObject = new THREE.Mesh( new THREE.CylinderGeometry( radius, radius, height, 20, 1 ), createObjectMaterial() );
|
|
|
|
|
|
+ threeObject = new THREE.Mesh( new THREE.CylinderBufferGeometry( radius, radius, height, 20, 1 ), createObjectMaterial() );
|
|
shape = new Ammo.btCylinderShape( new Ammo.btVector3( radius, height * 0.5, radius ) );
|
|
shape = new Ammo.btCylinderShape( new Ammo.btVector3( radius, height * 0.5, radius ) );
|
|
shape.setMargin(margin);
|
|
shape.setMargin(margin);
|
|
break;
|
|
break;
|
|
@@ -346,7 +346,7 @@
|
|
// Cone
|
|
// Cone
|
|
var radius = 1 + Math.random() * objectSize;
|
|
var radius = 1 + Math.random() * objectSize;
|
|
var height = 2 + Math.random() * objectSize;
|
|
var height = 2 + Math.random() * objectSize;
|
|
- threeObject = new THREE.Mesh( new THREE.CylinderGeometry( 0, radius, height, 20, 2 ), createObjectMaterial() );
|
|
|
|
|
|
+ threeObject = new THREE.Mesh( new THREE.ConeBufferGeometry( radius, height, 20, 2 ), createObjectMaterial() );
|
|
shape = new Ammo.btConeShape( radius, height );
|
|
shape = new Ammo.btConeShape( radius, height );
|
|
break;
|
|
break;
|
|
}
|
|
}
|