提交 e4553094 编写于 作者: F foijord

updated SEA3D examples to not access matrix elements directly

上级 efe95756
......@@ -1603,7 +1603,7 @@ THREE.SEA3D.prototype.updateTransform = function ( obj3d, sea ) {
var mtx = THREE.SEA3D.MTXBUF, vec = THREE.SEA3D.VECBUF;
if ( sea.transform ) mtx.elements.set( sea.transform );
if ( sea.transform ) mtx.fromArray( sea.transform );
else mtx.makeTranslation( sea.position.x, sea.position.y, sea.position.z );
// matrix
......
......@@ -159,7 +159,7 @@ THREE.SEA3D.prototype.readRigidBodyBase = function ( sea ) {
} else {
THREE.SEA3D.MTXBUF.elements.set( sea.transform );
THREE.SEA3D.MTXBUF.fromArray( sea.transform );
transform = SEA3D.AMMO.getTransformFromMatrix( THREE.SEA3D.MTXBUF );
......@@ -265,7 +265,7 @@ THREE.SEA3D.prototype.readCarController = function ( sea ) {
if ( wheel.offset ) {
var offset = new THREE.Matrix4();
offset.elements.set( wheel.offset );
offset.fromArray( wheel.offset );
target.physics.offset = offset;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册