after creating a litte scenario, with three.js, I tried to implemented Physi.js.
I am stuck on the first object, a cube, I try to change to Physi.js. Firefox console tells me, that "object.material is undefined" at Physi.js line 899.
I tried the following:
this.cube = new Physijs.BoxMesh(
new THREE.CubeGeometry( 100, 100, 100 ),
Physijs.createMaterial(
new THREE.MeshBasicMaterial ( { color : 0x00ff00 } )
,.4,.8),0
);
also this:
this.cube = new Physijs.BoxMesh(
new THREE.CubeGeometry( 100, 100, 100 ),
new THREE.MeshBasicMaterial ( { color : 0x00ff00 } )
);
and also this:
box.material = new THREE.MeshLambertMaterial({
color: 0x00FF00
});
box.material = Physijs.createMaterial( box.material, 0.4, 0.6 );
box.geometry = new THREE.CubeGeometry( 4, 4, 4 );
All lead to the same error, with chandlerprall-Physijs-1558502.
Please tell me, what I am missing here.
Thanks in advance.