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,EAAI,GAAK,EAAO,MAAQ,EACpC,EAAO,QAAW,KAAK,OAAO,EAAI,GAAK,EAAO,OAAS,GAG7D,CACX,IAGJ,OAAO,kBAAkB,cAAe,CAEpC,KAAM,WAGF,KAAK,UAAY,IAEjB,KAAK,YAAc,IAAI,MAAM,WAC7B,KAAK,MAAQ,IAAI,MAAM,QAAQ,EAAG,EAAG,GAErC,KAAK,aAAe,KAAK,aAAa,KAAK,MAC3C,SAAS,iBAAiB,aAAc,KAAK,aACjD,EAEA,MAAA,GACI,SAAS,oBAAoB,aAAc,KAAK,aACpD,EAEA,aAAc,SAAU,GACpB,KAAK,WAAW,EACpB,EAEA,WAAY,SAAU,GAElB,MAAM,EAAK,EAAI,OAET,EAAS,KAAK,IAAI,KAAK,WAAY,EAAG,KAC5C,KAAK,GAAG,SAAS,SAAS,eAAe,EAC7C","file":"/gh/diarmidmackenzie/aframe-examples@master/components/mouse-manipulation.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /gh/diarmidmackenzie/aframe-examples@master/components/mouse-manipulation.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","// Add this to the same entity as the cursor component.\nAFRAME.registerComponent('mouse-manipulation', {\n\n    schema: {\n        debug: {type: 'boolean', default: false},\n        showHints: {type: 'boolean', default: true},\n    },\n\n    events: {\n        mousedown: function(evt) { this.mouseDown(evt) }, \n        mouseup:  function(evt) { this.mouseUp(evt) },\n        mouseenter: function(evt) { this.mouseEnter(evt) }, \n        mouseleave:  function(evt) { this.mouseLeave(evt) }\n    },\n    \n    init() {\n        // cursor must have an ID so that we can refence it when attaching an object-parent\n        console.assert(this.el.id)\n    \n        // This is a rate per second.  We scale distance by this factor per second.\n        // Take a root of this to get a scaling factor.\n        this.moveSpeed = 3;\n    \n        // variable to track any grabbed element\n        this.grabbedEl = null;\n\n        // We create 2 children beneath the camera\n        // - cursorTracker.  This is set up to match the orientation of the cursor\n        //                   (which does not match the camera, when using rayOrigin: mouse)\n        this.camera = document.querySelector('[camera]')\n        this.cursorTracker = document.createElement('a-entity')\n        this.cursorTracker.setAttribute('cursor-tracker', `cursor:#${this.el.id}`)\n        this.camera.appendChild(this.cursorTracker)\n\n        // A container for any entity that can be grabbed.\n        // For mouse controls, this is a child of the cursor tracker.\n        // (this helps with move in/out, rotation etc. of grabbed entity)\n        this.cursorContactPoint = document.createElement('a-entity')\n        this.cursorContactPoint.setAttribute('id', `${this.el.id}-cursor-contact-point`)\n        if (this.data.debug) {\n            this.cursorContactPoint.setAttribute('geometry', \"primitive:box; height:0.1; width: 0.1; depth:0.1\")\n            this.cursorContactPoint.setAttribute('material', \"color: blue\")\n        }\n        \n        this.cursorTracker.appendChild(this.cursorContactPoint)\n\n        // A container for any entity that can be grabbed.\n        // This is a child of the camera, for controls where the object\n        // shouldn't follow the mouse pointer, e.g. rotation.\n        // (this helps with move in/out, rotation etc. of grabbed entity)\n        this.cameraContactPoint = document.createElement('a-entity')\n        this.cameraContactPoint.setAttribute('id', `${this.el.id}-camera-contact-point`)\n        if (this.data.debug) {\n            this.cameraContactPoint.setAttribute('geometry', \"primitive:box; height:0.1; width: 0.1; depth:0.1\")\n            this.cameraContactPoint.setAttribute('material', \"color: red\")\n        }\n        this.camera.appendChild(this.cameraContactPoint)\n\n        // for working\n        this.vector1 = new THREE.Vector3()\n        this.vector2 = new THREE.Vector3()\n\n        this.windowMouseUp = this.windowMouseUp.bind(this)\n        this.windowMouseDown = this.windowMouseDown.bind(this)\n\n        window.addEventListener('mouseup', this.windowMouseUp);\n        window.addEventListener('mousedown', this.windowMouseDown);\n        window.addEventListener('contextmenu', event => event.preventDefault());\n\n        // state of mouse buttons\n        this.lbDown = false\n        this.mbDown = false\n        this.rbDown = false\n\n        // adjustments to control ratio of mouse pixels to radians for otations.\n        this.radiansPerMousePixel = 0.01\n    },\n\n    update: function() {\n  \n        if (this.data.showHints) {\n            this.createHints()\n        }\n        else {\n            this.removeHints()\n        }\n        \n    },\n\n    remove() {\n\n        this.removeHints()\n\n        this.cursorTracker.parentNode.removeChild(this.cursorTracker)\n        this.cameraContactPoint.parentNode.removeChild(this.cameraContactPoint)\n\n        window.removeEventListener('mouseup', this.windowMouseUp);\n        window.removeEventListener('mousedown', this.windowMouseDown);\n    },\n\n    windowMouseDown(evt) {\n\n        // we are looking for the original mouseEvent, which has details of buttons pressed\n        // And we need to have registered an element to be grabbed.\n        if (evt.buttons === undefined) return;\n        if (!this.grabbedEl) return;\n\n        if (this.data.debug) console.log(\"MouseDown:\", evt)\n\n        this.recordMouseButtonsState(evt)\n        this.updateMouseControls()\n        this.updateHints()\n\n        if (this.lbDown) {\n            // left button is pressed (either just pressed or already down) \n            // - grab to cursor contact point\n            this.grabElToContactPoint(this.cursorContactPoint,\n                                          `#${this.el.id}-cursor-contact-point`)\n\n        }\n        else {\n            // right or middle button - grab to camera contact point\n            this.grabElToContactPoint(this.cameraContactPoint,\n                                      `#${this.el.id}-camera-contact-point`)\n        }\n    },\n\n    windowMouseUp(evt) {\n        // we are looking for the original mouseEvent, which has details of buttons pressed\n        // And we need to have a grabbed element.\n        if (evt.buttons === undefined) return;\n        if (!this.grabbedEl) return;\n\n        if (this.data.debug) console.log(\"MouseUp:\", evt)\n\n        this.recordMouseButtonsState(evt)\n        this.updateMouseControls()\n        this.updateHints()\n        \n        // Reparenting\n        if (this.lbDown) {\n            // left button is still down\n            // leave attached to cursor contact point.\n            if (this.data.debug) console.log(\"Left button still down\")\n        }\n        else if (evt.buttons === 0){\n            // no button now pressed.\n            if (this.data.debug) console.log(\"No buttons down - releasing\")\n            this.releaseEl()\n        }\n        else if (evt.button === 0) {\n            if (this.data.debug) console.log(\"Left button released, middle or right still down\")\n            // left button released, but right or middle button still down \n            // - grab to camera contact point\n            this.grabElToContactPoint(this.cameraContactPoint,\n                                      `#${this.el.id}-camera-contact-point`)\n        }\n    },\n\n    recordMouseButtonsState(evt) {\n        this.lbDown = (evt.buttons & 1)\n        this.mbDown = (evt.buttons & 4)\n        this.rbDown = (evt.buttons & 2)\n\n        if (this.data.debug) {\n            console.log(\"this.lbDown:\", this.lbDown)\n            console.log(\"this.rbDown:\", this.rbDown)\n            console.log(\"this.mbDown:\", this.mbDown)\n        }\n    },\n\n    updateMouseControls() {\n\n        if (this.lbDown) {\n            this.cursorContactPoint.setAttribute(\"mouse-dolly\", \"\")\n        }\n        else if (this.rbDown){\n            this.cursorContactPoint.removeAttribute(\"mouse-dolly\")\n            this.cameraContactPoint.setAttribute(\"mouse-dolly\", \"\")\n\n        }\n        else {\n            this.cursorContactPoint.removeAttribute(\"mouse-dolly\")\n            this.cameraContactPoint.removeAttribute(\"mouse-dolly\")\n        }\n\n        if (this.rbDown) {\n            this.cameraContactPoint.setAttribute(\"mouse-pitch-yaw\", \"\")\n        }\n        else {\n            this.cameraContactPoint.removeAttribute(\"mouse-pitch-yaw\")\n        }\n\n        if (this.mbDown) {\n            this.cameraContactPoint.setAttribute(\"mouse-roll\", \"\")\n        }\n        else {\n            this.cameraContactPoint.removeAttribute(\"mouse-roll\")\n        }\n    },\n\n    createHints() {\n\n        if (!this.data.showHints) return\n\n        this.hints = document.createElement('a-entity')\n        this.hints.setAttribute(\"label\", \"overwrite: true; forceDesktopMode: true\")   \n        this.hints.setAttribute(\"mouse-manipulation-hints\", \"\")\n        this.el.appendChild(this.hints)\n\n        this.updateHints()\n    },\n\n    updateHints() {\n\n        if (!this.data.showHints) return\n\n        const show = (x) => { this.hints.setAttribute(\"mouse-manipulation-hints\", \"view\", x) }\n        \n        if (this.lbDown) {\n            show(\"left\")\n        }\n        else if (this.rbDown) {\n            show(\"right\")\n        }\n        else if (this.mbDown) {\n            show(\"middle\")\n        }\n        else if (this.hoverEl) {\n            show(\"hover\")\n        }\n        else {\n            show(\"none\")\n        }\n    },\n\n    removeHints() {\n\n        if (this.hints) {\n            this.hints.parentNode.removeChild(this.hints)\n            this.hints = null\n        }\n    },\n\n    // records details of grabbed object, but actual grabbing is deferred to be handled on MouseEvent\n    // based on detail about which button is pressed (not avalable on this event)\n    mouseDown(evt) {\n  \n        const intersections = this.getIntersections(evt.target);\n    \n        if (intersections.length === 0)  return;\n    \n        const element = intersections[0]\n        var newGrabbedEl = this.getRaycastTarget(element)\n\n        if (this.grabbedEl && \n            this.grabbedEl !== newGrabbedEl) {\n            console.warn(\"Grabbed 2nd element without releasing the first:\", newGrabbedEl.id, this.grabbedEl.id)\n        }\n\n        this.grabbedEl = newGrabbedEl\n        \n    },\n\n    // Ensure an element has a usable ID.\n    // If it has no ID, add one.\n    // If it has an ID but it's not usable to identify the element...\n    // ...log an error (preferable to creating confusion by modifying existing IDs)\n    assureUsableId(el) {\n\n        if (!el.id) {\n            // No ID, just set one\n            el.setAttribute(\"id\", Math.random().toString(36).slice(2))\n        }\n        else {\n            const reference = document.getElementById(el.id)\n            if (reference !== el) {\n                console.error(`Element ID for ${el.id} does not unambiguously identify it.  Check for duplicate IDs.`)\n            }\n        }\n    },\n\n    // Get scene graph parent element of an element.\n    // Includes the case where the parent is the a-scene.\n    getParentEl(el) {\n\n        const parentObject = el.object3D.parent\n\n        if (parentObject.type === 'Scene') {\n            return(this.el.sceneEl)\n        }\n        else {\n            return parentObject.el\n        }\n    },\n\n    grabElToContactPoint(contactPoint, contactPointSelector) {\n\n        // Save record of original parent, and make sure it has a usable ID.\n        if (!this.originalParentEl) {\n            this.originalParentEl = this.getParentEl(this.grabbedEl)\n        }\n        this.assureUsableId(this.originalParentEl)\n\n        // set up a contact point at the position of the grabbed entity\n        const pos = contactPoint.object3D.position\n        this.grabbedEl.object3D.getWorldPosition(pos)\n        contactPoint.object3D.parent.worldToLocal(pos)\n        this.grabbedEl.setAttribute('object-parent', 'parent', contactPointSelector)\n\n        this.hints.object3D.position.set(0, 0 , 0)\n        contactPoint.object3D.add(this.hints.object3D)\n    },\n\n    releaseEl() {\n        const contactPoint = this.grabbedEl.object3D.parent\n        this.grabbedEl.setAttribute('object-parent', 'parent', `#${this.originalParentEl.id}`)\n        this.grabbedEl = null\n        this.originalParentEl = null\n        \n        this.el.object3D.add(this.hints.object3D)\n\n        if (this.hoverEl) {\n            const pos = this.hints.object3D.position\n            this.hoverEl.object3D.getWorldPosition(pos)\n            this.hints.object3D.parent.worldToLocal(pos)\n        }\n    },\n\n    mouseUp() {\n        // all work done on MouseEvent, where we have detail as to *which* button is pressed.\n    },\n\n    getRaycastTarget(el) {\n        if (el.components['raycast-target']) {\n            return el.components['raycast-target'].target\n        }\n        else {\n            return el\n        }\n    },\n\n    mouseEnter(evt) {\n\n        // similar logic to mouseDown - could be commonized\n        // or we could even *only* do some of this processing on mouseenter?\n        const intersections = this.getIntersections(evt.target);\n    \n        if (intersections.length === 0)  return;\n    \n        const element = intersections[0]\n\n        this.hoverEl = this.getRaycastTarget(element)\n        if (this.data.debug) console.log(\"HoverEl set:\", this.hoverEl)\n        \n        // don't do actual hover display behaviour when another entity is already grabbed.\n        // (but do do the state tracking bits - above).\n        if (this.grabbedEl) return;\n\n        const contactPoint = this.cursorContactPoint\n        const pos = this.hints.object3D.position\n        this.hoverEl.object3D.getWorldPosition(pos)\n        this.hints.object3D.parent.worldToLocal(pos)\n\n        this.updateHints()\n    },\n\n    mouseLeave(evt) {\n        this.hoverEl = null\n        if (this.data.debug) console.log(\"HoverEl cleared\")\n        this.updateHints()\n    },\n\n    getIntersections(cursorEl) {\n  \n        const els = cursorEl.components.raycaster.intersectedEls\n        return els\n    }\n\n});\n\nAFRAME.registerComponent('mouse-manipulation-hints', {\n    schema: {\n        view: {type: 'string',\n               oneOf: ['none', 'hover', 'left', 'middle', 'right'],\n               default: 'none'}\n    },\n\n    init() {\n        this.views = {}\n        const views = this.views\n\n        this.createHoverView()\n        this.createLeftView()\n        this.createRightView()\n        this.createMiddleView()\n    },\n\n    createHoverView() {\n\n        const views = this.views\n        views.hover = document.createElement('a-entity')\n        views.hover.setAttribute('id', 'hint-hover')\n        this.el.appendChild(views.hover)\n\n        const rows = [[\"left-mouse\", \"move-arrows\", \"left-mouse\", \"pitch-yaw-arrow\"],\n                      [\"mouse-wheel\", \"in-out-arrow\", \"middle-mouse\", \"roll\"]]\n\n        const rotations = [[0, 0, 0, 0],\n                           [0, 0, 0, 0]]\n        \n        const reflections = [[1, 1, -1, 1],\n                             [1, 1, 1, 1]]\n\n        this.addRowsToView(views.hover, rows, rotations, reflections, \"above\")\n    },\n\n    createLeftView() {\n\n        const views = this.views\n        views.left = document.createElement('a-entity')\n        views.left.setAttribute('id', 'hint-left')\n        //views.left.setAttribute(\"text\", \"value: left; align: center; anchor: center\")        \n        this.el.appendChild(views.left)\n\n        const rows = [[\"mouse-wheel\", \"in-out-arrow\"]]\n        const rotations = [[0, 0]]\n        const reflections = [[1, 1]]\n\n        this.addRowsToView(views.left, rows, rotations, reflections, \"below\")\n\n        const cRows = [[\"left-arrow\"],\n                       [\"left-arrow\"],\n                       [\"left-arrow\"],\n                       [\"left-arrow\"]]\n        const cRotations = [[270], [90], [0], [180]]\n        const cReflections = [[1], [1], [1], [1]]\n\n        this.addRowsToView(views.left, cRows, cRotations, cReflections, \"compass\")\n    },\n\n    createRightView() {\n\n        const views = this.views\n        views.right = document.createElement('a-entity')\n        views.right.setAttribute('id', 'hint-right')\n        this.el.appendChild(views.right)\n\n        const rows = [[\"mouse-wheel\", \"in-out-arrow\"]]\n        const rotations = [[0, 0]]\n        const reflections = [[1, 1]]\n\n        this.addRowsToView(views.right, rows, rotations, reflections, \"below\")\n\n        const cRows = [[\"yaw-arrow\"],\n                       [\"yaw-arrow\"],\n                       [\"yaw-arrow\"],\n                       [\"yaw-arrow\"]]\n        const cRotations = [[90], [90], [0], [0]]\n        const cReflections = [[1], [-1], [-1], [1]]\n\n        this.addRowsToView(views.right, cRows, cRotations, cReflections, \"compass\")\n    },\n\n    createMiddleView() {\n\n        const views = this.views\n\n        views.middle = document.createElement('a-entity')\n        views.middle.setAttribute('id', 'hint-middle')\n        this.el.appendChild(views.middle)\n\n        const rows = [[\"roll\"]]\n        const aRotations = [[0]]\n        const bRotations = [[180]]\n        const reflections = [[1]]\n\n        this.addRowsToView(views.middle, rows, aRotations, reflections, \"above\")\n        this.addRowsToView(views.middle, rows, bRotations, reflections, \"below\")\n    },\n\n    addRowsToView(view, rows, rotations, reflections, layout) {\n\n        const spacing = 0.15\n        const imgSize = 0.1\n        const iconsPath = \"https://cdn.jsdelivr.net/gh/diarmidmackenzie/aframe-examples@latest/assets/icons/\"\n\n        var xOffset, yOffset\n        \n        xOffset = -((rows[0].length - 1) * spacing / 2)\n        yOffset = 0.2 + rows.length * spacing / 2 \n        \n        if (layout === \"below\") {\n            yOffset -= 0.5\n        }\n        \n        function createIcon(iconName, xPos, yPos, rotation, reflect) {\n\n            const icon = document.createElement('a-image')\n            const src = `${iconsPath}${iconName}.svg`\n\n            icon.setAttribute(\"src\", src)\n            icon.object3D.position.set(xPos, yPos, 0)\n            icon.object3D.rotation.set(0, 0, THREE.MathUtils.degToRad(rotation))\n            icon.object3D.scale.set(imgSize * reflect, imgSize, imgSize)\n            view.appendChild(icon)\n        }\n\n        function createRow(row, xStart, yPos, rowIndex) {\n\n            row.forEach((iconName, index) => {\n                createIcon(iconName, xStart + (index * spacing), yPos,\n                           rotations[rowIndex][index],\n                           reflections[rowIndex][index])\n            })\n        }\n\n        if ((layout === \"above\") ||\n            (layout === \"below\"))\n         {\n            // lay rows out in a grid above the entity\n            rows.forEach((row, index) => {\n                createRow(row, xOffset, yOffset - (index * spacing), index)\n            })\n        }\n        else if (layout === \"compass\") {\n            // lay rows out at N, S, E & W positions.\n            console.assert(rows.length == 4)\n\n            const radius = 0.4\n            \n            createRow(rows[0], 0, radius, 0) // N\n            createRow(rows[1], 0, -radius, 1) // S\n            createRow(rows[2], -radius, 0, 2) // E\n            createRow(rows[3], radius, 0, 3) // W\n\n        }\n    },\n\n    update() {\n\n        const show = (x) => { x.object3D.visible = true }\n        const hide = (x) => { x.object3D.visible = false }\n\n        const views = this.views\n\n        hide(views.hover)\n        hide(views.left)\n        hide(views.right)\n        hide(views.middle)\n        \n        const viewToShow = views[this.data.view]\n        if (viewToShow) {\n            show(viewToShow)\n        }\n    }\n})\n  \nAFRAME.registerComponent('mouse-pitch-yaw', {\n\n    schema: {\n        // whether to only allow rotation on a single axis (whichever moves first)\n        singleAxis : {type: 'boolean', default: false},\n        // Number of mouse pixels movement required to lock onto an axis.\n        threshold : {type: 'number', default: 5}\n    },\n\n    init: function () {\n  \n        this.axis = null\n        this.cumX = 0\n        this.cumY = 0\n\n        this.xQuaternion = new THREE.Quaternion();\n        this.yQuaternion = new THREE.Quaternion();\n        this.yAxis = new THREE.Vector3(0, 1, 0);\n        this.xAxis = new THREE.Vector3(1, 0, 0);\n    \n        this.onMouseMove = this.onMouseMove.bind(this);\n        document.addEventListener('mousemove', this.onMouseMove);\n    },\n\n\n    remove() {\n        document.removeEventListener('mousemove', this.onMouseMove);\n    },\n    \n    onMouseMove: function (evt) {\n        this.rotateModel(evt);\n    },\n  \n    rotateModel: function (evt) {\n\n        // get normalized vector perpendicular to camera to use as xAxis (to pitch around)\n        this.xAxis.copy(this.el.object3D.position)\n        this.xAxis.normalize()\n        this.xAxis.cross(this.yAxis)\n        //console.log(\"xAxis: \", this.xAxis)\n\n        var dX = evt.movementX;\n        var dY = evt.movementY;\n\n        // constrain to single axis if required.\n        if (this.data.singleAxis) {\n\n            // cumulative movements in X & Y.  Used to measure vs. threshold for\n            // single axis movement.\n            this.cumX += dX\n            this.cumY += dY\n\n            if (!this.axis && \n                ((Math.abs(this.cumX) > this.data.threshold) ||\n                 (Math.abs(this.cumY) > this.data.threshold))) {\n                this.axis = (Math.abs(this.cumX) > Math.abs(this.cumY)) ? \"x\" : \"y\"\n            }\n\n            if (this.axis === \"x\") {\n                dY = 0\n            }\n            else if (this.axis === \"y\"){\n                dX = 0\n            }\n            else {\n                // if not locked onto an axis yet, don't allow amny movement.\n                dX = 0\n                dY = 0\n            }\n        }\n    \n        this.xQuaternion.setFromAxisAngle(this.yAxis, dX / 200)\n        this.yQuaternion.setFromAxisAngle(this.xAxis, dY / 200)\n    \n        this.el.object3D.quaternion.premultiply(this.xQuaternion);\n        this.el.object3D.quaternion.premultiply(this.yQuaternion);\n\n        // avoid issues that can result from accumulation of small Floating Point inaccuracies.\n        this.el.object3D.quaternion.normalize()\n    }\n});\n\nAFRAME.registerComponent('mouse-roll', {\n\n    schema: {\n        slowdownRadius: {type: 'number', default: 50}\n    },\n\n    init: function () {\n  \n        this.zQuaternion = new THREE.Quaternion();\n        this.zAxis = new THREE.Vector3(0, 0, 1);\n    \n        this.onMouseMove = this.onMouseMove.bind(this);\n        document.addEventListener('mousemove', this.onMouseMove);\n\n        this.currPointer = new THREE.Vector2()\n        this.prevPointer = new THREE.Vector2()\n\n        this.el.setAttribute(\"entity-screen-position\", \"\")\n\n        this.modelPos = new THREE.Vector2()\n        this.el.components['entity-screen-position'].getEntityScreenPosition(this.modelPos)\n    },\n    \n\n    remove() {\n        this.el.removeAttribute(\"entity-screen-position\")\n        document.removeEventListener('mousemove', this.onMouseMove);\n    },\n    \n    onMouseMove: function (evt) {\n        this.rotateModel(evt);\n    },\n  \n    rotateModel: function (evt) {\n\n        // get normalized vector away from camera to use as zAxis (to roll around)\n        this.zAxis.copy(this.el.object3D.position)\n        this.zAxis.multiplyScalar(-1)\n        this.zAxis.normalize()\n        //console.log(\"zAxis: \", this.zAxis)\n\n        this.el.components['entity-screen-position'].getEntityScreenPosition(this.modelPos)\n        //console.log(\"Model position on screen:\", this.modelPos)\n\n        const dX = evt.movementX;\n        const dY = evt.movementY;\n        this.currPointer.set(evt.clientX, evt.clientY)\n        this.currPointer.sub(this.modelPos)\n        this.prevPointer.set(evt.clientX - dX, evt.clientY - dY)\n        this.prevPointer.sub(this.modelPos)\n\n        let angle = this.prevPointer.angle() - this.currPointer.angle()\n\n        // Normalize to rangw PI -> -PI, so that scaling angle down doesn't give unexpected results.\n        if (angle < (-Math.PI)) angle += (2 * Math.PI)\n        if (angle > (Math.PI)) angle -= (2 * Math.PI)\n        \n        const distanceToCenter = Math.min(this.currPointer.length(), this.prevPointer.length())\n        if (distanceToCenter  < this.data.slowdownRadius) {\n            const scaleFactor = distanceToCenter / this.data.slowdownRadius\n            angle *= scaleFactor\n        }\n        \n        this.zQuaternion.setFromAxisAngle(this.zAxis, angle)\n        this.el.object3D.quaternion.premultiply(this.zQuaternion);\n    }\n});\n\n// Make available the screen position of an entity\nAFRAME.registerComponent('entity-screen-position', {\n\n    init: function () {\n  \n        this.vector = new THREE.Vector3()\n\n        // need to keep an up-to-date view of canvs bounds\n        this.canvasBounds = document.body.getBoundingClientRect();\n        this.updateCanvasBounds = AFRAME.utils.debounce(() => {\n            this.canvasBounds = this.el.sceneEl.canvas.getBoundingClientRect()\n          }, 500);\n        \n        window.addEventListener('resize', this.updateCanvasBounds);\n        window.addEventListener('scroll', this.updateCanvasBounds);\n\n        this.getEntityScreenPosition = this.getEntityScreenPosition.bind(this)\n    },\n    \n\n    remove() {\n        window.removeEventListener('resize', this.updateCanvasBounds);\n        window.removeEventListener('scroll', this.updateCanvasBounds);\n    },\n\n    getEntityScreenPosition(vector2) {\n\n        this.el.object3D.getWorldPosition(this.vector)\n        //console.log(\"World Position:\", this.vector)\n        this.vector.project(this.el.sceneEl.camera)\n\n        //console.log(\"Projected vector x, y:\", this.vector.x, this.vector.y)\n\n        const bounds = this.canvasBounds;\n        //console.log(\"Canvas Bounds:\", bounds)\n        vector2.set((this.vector.x + 1) * bounds.width / 2,\n                     bounds.height - ((this.vector.y + 1) * bounds.height / 2))\n        //console.log(\"Model position on screen:\", vector2)\n\n        return vector2\n    }\n});\n\nAFRAME.registerComponent('mouse-dolly', {\n\n    init: function () {\n\n        // 1 - no movement; < 1 = reverse movement.\n        this.moveSpeed = 1.3\n  \n        this.zQuaternion = new THREE.Quaternion();\n        this.zAxis = new THREE.Vector3(0, 0, 1);\n    \n        this.onMouseWheel = this.onMouseWheel.bind(this);\n        document.addEventListener('mousewheel', this.onMouseWheel);\n    },\n\n    remove() {\n        document.removeEventListener('mousewheel', this.onMouseWheel);\n    },\n    \n    onMouseWheel: function (evt) {\n        this.dollyModel(evt);\n    },\n  \n    dollyModel: function (evt) {\n\n        const dY = evt.deltaY;\n\n        const scalar = Math.pow(this.moveSpeed, -dY/400);\n        this.el.object3D.position.multiplyScalar(scalar)\n    }\n});\n  "]}