text: !function(){var e,t;e=this,t=function(e,t){"use strict";const o=new t.Euler(0,0,0,"YXZ"),n=new t.Vector3,i={type:"change"},r={type:"lock"},c={type:"unlock"},s=Math.PI/2;class m extends t.EventDispatcher{constructor(e,m){super(),void 0===m&&(console.warn('THREE.PointerLockControls: The second parameter "domElement" is now mandatory.'),m=document.body),this.domElement=m,this.isLocked=!1,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.pointerSpeed=1;const d=this;function u(t){if(!1===d.isLocked)return;const n=t.movementX||t.mozMovementX||t.webkitMovementX||0,r=t.movementY||t.mozMovementY||t.webkitMovementY||0;o.setFromQuaternion(e.quaternion),o.y-=.002*n*d.pointerSpeed,o.x-=.002*r*d.pointerSpeed,o.x=Math.max(s-d.maxPolarAngle,Math.min(s-d.minPolarAngle,o.x)),e.quaternion.setFromEuler(o),d.dispatchEvent(i)}function l(){d.domElement.ownerDocument.pointerLockElement===d.domElement?(d.dispatchEvent(r),d.isLocked=!0):(d.dispatchEvent(c),d.isLocked=!1)}function a(){console.error("THREE.PointerLockControls: Unable to use Pointer Lock API")}this.connect=function(){d.domElement.ownerDocument.addEventListener("mousemove",u),d.domElement.ownerDocument.addEventListener("pointerlockchange",l),d.domElement.ownerDocument.addEventListener("pointerlockerror",a)},this.disconnect=function(){d.domElement.ownerDocument.removeEventListener("mousemove",u),d.domElement.ownerDocument.removeEventListener("pointerlockchange",l),d.domElement.ownerDocument.removeEventListener("pointerlockerror",a)},this.dispose=function(){this.disconnect()},this.getObject=function(){return e},this.getDirection=function(){const o=new t.Vector3(0,0,-1);return function(t){return t.copy(o).applyQuaternion(e.quaternion)}}(),this.moveForward=function(t){n.setFromMatrixColumn(e.matrix,0),n.crossVectors(e.up,n),e.position.addScaledVector(n,t)},this.moveRight=function(t){n.setFromMatrixColumn(e.matrix,0),e.position.addScaledVector(n,t)},this.lock=function(){this.domElement.requestPointerLock()},this.unlock=function(){d.domElement.ownerDocument.exitPointerLock()},this.connect()}}e.PointerLockControls=m,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("three")):"function"==typeof define&&define.amd?define(["exports","three"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).THREE=e["THREE-STD"]||{},e.THREE)}();
  