@@ 52,17 52,20 @@ export function BasicCube(position) {
// A simple cube with gravity
export function ThrowingCube(position) {
+ let size = 0.05 + Math.random() / 10.0;
const cube = new Cube(
position,
- new BoxGeometry(0.1, 0.1, 0.1),
+ new BoxGeometry(size, size, size),
new MeshLambertMaterial({
color: new Color(0.2, 0.2, 0.2),
}),
);
+ size = size / 2;
+
cube.BuildPhysics(
RigidBodyDesc.dynamic().setTranslation(position.x, position.y, position.z),
- ColliderDesc.cuboid(0.05, 0.05, 0.05).setMass(1.0),
+ ColliderDesc.cuboid(size, size, size).setMass(1.0),
);
return cube;