From d81fa05e2ed3c970116d9f3f02c45bb862c810ea Mon Sep 17 00:00:00 2001 From: Robert Long <robert@robertlong.me> Date: Wed, 7 Nov 2018 17:35:59 -0800 Subject: [PATCH] Don't reuse the box-collider orientation quaternion. --- src/gltf-component-mappings.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gltf-component-mappings.js b/src/gltf-component-mappings.js index 1bca96496..42ed68e63 100644 --- a/src/gltf-component-mappings.js +++ b/src/gltf-component-mappings.js @@ -34,11 +34,10 @@ AFRAME.GLTFModelPlus.registerComponent( "shape", (() => { const euler = new THREE.Euler(); - const orientation = new THREE.Quaternion(); return (el, componentName, componentData) => { const { scale, rotation } = componentData; euler.set(rotation.x, rotation.y, rotation.z); - orientation.setFromEuler(euler); + const orientation = new THREE.Quaternion().setFromEuler(euler); el.setAttribute(componentName, { shape: "box", offset: componentData.position, -- GitLab