From a3f22312c51e685495a188f994d78413af52bc3f Mon Sep 17 00:00:00 2001 From: Jerome Etienne Date: Sat, 12 Aug 2017 15:12:40 +0100 Subject: [PATCH] added ARjs.HitTesting.Result.prototype.applyQuaternion --- three.js/src/new-api/arjs-hittesting.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/three.js/src/new-api/arjs-hittesting.js b/three.js/src/new-api/arjs-hittesting.js index 7d17040..baf3c0f 100644 --- a/three.js/src/new-api/arjs-hittesting.js +++ b/three.js/src/new-api/arjs-hittesting.js @@ -144,4 +144,19 @@ ARjs.HitTesting.Result.prototype.applyPosition = function(object3d){ object3d.position.copy(this.position) object3d.updateMatrix() + + return this +} + +/** + * Apply to a controlled object3d + * + * @param {THREE.Object3D} object3d - the result to apply + */ +ARjs.HitTesting.Result.prototype.applyQuaternion = function(object3d){ + object3d.quaternion.copy(this.quaternion) + + object3d.updateMatrix() + + return this } -- GitLab