diff --git a/src/gltf-component-mappings.js b/src/gltf-component-mappings.js index d4236ebc668720568713a33f7ed0fde780abd220..55fe0ab34400e4025ae531b96b7aab5b7abf1c7b 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,