提交 5213158c 编写于 作者: J Jerome Etienne

more on object3d-glmatrix

上级 6478e3ba
......@@ -5,6 +5,8 @@
- handle scene graph with world matrix
-
- remove THREE.EventDispatched for signals.js
---
## Remove three.js dependancy
......
......@@ -39,6 +39,14 @@ ARjs.Object3D.prototype.decomposeMatrix = function(){
return this
}
ARjs.Object3D.prototype.localToWorldPosition = function(vector3){
var out = ARjs.Math.Vector3.create()
this.updateMatrixWorld()
ARjs.Math.Matrix4.getTranslation(out, this.matrix)
ARjs.Math.Vector3.add(out, vector3)
return out
}
//////////////////////////////////////////////////////////////////////////////
// .updateMatrix + .updateMatrixWorld
//////////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册