diff --git a/dist/three-story-controls.esm.js b/dist/three-story-controls.esm.js index 3022291..bb08d91 100644 --- a/dist/three-story-controls.esm.js +++ b/dist/three-story-controls.esm.js @@ -558,17 +558,23 @@ class BaseAdaptor extends EventDispatcher { } } -const defaultProps$9 = { +const defaultProps$a = { keyMapping: { forward: ['ArrowUp', 'w', 'W'], backward: ['ArrowDown', 's', 'S'], left: ['ArrowLeft', 'a', 'A'], right: ['ArrowRight', 'd', 'D'], + rollLeft: ['Q', 'q'], + rollRight: ['E', 'e'], + tiltDown: ['F', 'f'], + tiltUp: ['R', 'r'], + panRight: ['C', 'c'], + panLeft: ['Z', 'z'], up: ['u', 'U'], down: ['n', 'N'], }, dampingFactor: 0.5, - incrementor: 1, + incrementor: 0.1, preventBubbling: true, }; /** @@ -594,7 +600,7 @@ const defaultProps$9 = { class KeyboardAdaptor extends BaseAdaptor { constructor(props) { super(); - Object.assign(this, defaultProps$9, props); + Object.assign(this, defaultProps$a, props); const values = {}; for (const key in this.keyMapping) { values[key] = 0; @@ -664,7 +670,7 @@ class KeyboardAdaptor extends BaseAdaptor { } } -const defaultProps$8 = { +const defaultProps$9 = { domElement: document.body, dampingFactor: 0.5, shouldNormalize: true, @@ -713,7 +719,7 @@ class PointerAdaptor extends BaseAdaptor { this.cache = []; this.lastDownTime = 0; this.lastUpTime = 0; - Object.assign(this, defaultProps$8, props); + Object.assign(this, defaultProps$9, props); this.damper = new Damper({ values: { x: null, y: null }, dampingFactor: this.dampingFactor, @@ -835,7 +841,7 @@ class PointerAdaptor extends BaseAdaptor { } } -const defaultProps$7 = { +const defaultProps$8 = { startOffset: '0px', endOffset: '0px', buffer: 0.1, @@ -858,7 +864,7 @@ const defaultProps$7 = { class ScrollAdaptor extends BaseAdaptor { constructor(props) { super(); - Object.assign(this, defaultProps$7, props); + Object.assign(this, defaultProps$8, props); this.lastSeenScrollValue = window.scrollY || -1; this.previousScrollValue = this.lastSeenScrollValue; this.values = { @@ -944,7 +950,7 @@ class ScrollAdaptor extends BaseAdaptor { } } -const defaultProps$6 = { +const defaultProps$7 = { domElement: document.body, thresholdX: 60, thresholdY: 60, @@ -967,7 +973,7 @@ const defaultProps$6 = { class SwipeAdaptor extends BaseAdaptor { constructor(props = {}) { super(); - Object.assign(this, defaultProps$6, props); + Object.assign(this, defaultProps$7, props); this.onPointerUp = this.onPointerUp.bind(this); this.onPointerDown = this.onPointerDown.bind(this); } @@ -1008,7 +1014,7 @@ class SwipeAdaptor extends BaseAdaptor { } } -const defaultProps$5 = { +const defaultProps$6 = { dampingFactor: 0.5, thresholdX: 15, thresholdY: 15, @@ -1032,7 +1038,7 @@ class WheelAdaptor extends BaseAdaptor { constructor(props) { super(); this.lastThresholdTrigger = 0; - Object.assign(this, defaultProps$5, props); + Object.assign(this, defaultProps$6, props); this.damper = new Damper({ values: { x: 0, y: 0 }, dampingFactor: this.dampingFactor, @@ -1089,7 +1095,7 @@ class WheelAdaptor extends BaseAdaptor { } } -const defaultProps$4 = { +const defaultProps$5 = { domElement: document.body, pointerDampFactor: 0.3, pointerScaleFactor: 4, @@ -1131,6 +1137,124 @@ const defaultProps$4 = { */ class FreeMovementControls { /** {@inheritDoc three-story-controls#FreeMovementControlsProps#} */ + constructor(cameraRig, props = {}) { + this.enabled = false; + this.cameraRig = cameraRig; + this.wheelScaleFactor = props.wheelScaleFactor || defaultProps$5.wheelScaleFactor; + this.pointerScaleFactor = props.pointerScaleFactor || defaultProps$5.pointerScaleFactor; + this.panDegreeFactor = props.panDegreeFactor || defaultProps$5.panDegreeFactor; + this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps$5.tiltDegreeFactor; + this.keyboardAdaptor = new KeyboardAdaptor({ + type: 'continuous', + dampingFactor: props.keyboardDampFactor || defaultProps$5.keyboardDampFactor, + incrementor: props.keyboardScaleFactor || defaultProps$5.keyboardScaleFactor, + }); + this.wheelAdaptor = new WheelAdaptor({ + type: 'continuous', + dampingFactor: props.wheelDampFactor || defaultProps$5.wheelDampFactor, + domElement: props.domElement || defaultProps$5.domElement, + }); + this.pointerAdaptor = new PointerAdaptor({ + domElement: props.domElement || defaultProps$5.domElement, + dampingFactor: props.pointerDampFactor || defaultProps$5.pointerDampFactor, + }); + this.onWheel = this.onWheel.bind(this); + this.onKey = this.onKey.bind(this); + this.onPointer = this.onPointer.bind(this); + } + isEnabled() { + return this.enabled; + } + enable() { + this.wheelAdaptor.connect(); + this.keyboardAdaptor.connect(); + this.pointerAdaptor.connect(); + this.wheelAdaptor.addEventListener('update', this.onWheel); + this.keyboardAdaptor.addEventListener('update', this.onKey); + this.pointerAdaptor.addEventListener('update', this.onPointer); + this.enabled = true; + } + disable() { + this.wheelAdaptor.disconnect(); + this.keyboardAdaptor.disconnect(); + this.pointerAdaptor.disconnect(); + this.wheelAdaptor.removeEventListener('update', this.onWheel); + this.keyboardAdaptor.removeEventListener('update', this.onKey); + this.pointerAdaptor.removeEventListener('update', this.onPointer); + this.enabled = false; + } + onWheel(event) { + this.cameraRig.do(CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor); + this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.wheelScaleFactor); + } + onKey(event) { + this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward); + this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left); + this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down); + } + onPointer(event) { + switch (event.pointerCount) { + case 1: + this.cameraRig.do(CameraAction.Pan, event.deltas.x * this.panDegreeFactor); + this.cameraRig.do(CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor); + break; + case 2: + this.cameraRig.do(CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor); + this.cameraRig.do(CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor); + break; + } + } + update(time) { + if (this.enabled) { + this.keyboardAdaptor.update(); + this.wheelAdaptor.update(); + this.pointerAdaptor.update(time); + } + } +} + +const defaultProps$4 = { + domElement: document.body, + pointerDampFactor: 0.3, + pointerScaleFactor: 4, + keyboardDampFactor: 0.5, + keyboardScaleFactor: 0.5, + wheelDampFactor: 0.25, + wheelScaleFactor: 0.05, + panDegreeFactor: Math.PI / 4, + tiltDegreeFactor: Math.PI / 10, +}; +/** + * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events. + * @remarks + * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events. + * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera. + * + * + * Note: CSS property `touch-action: none` will probably be needed on listener element. + * + * See {@link three-story-controls#FreeMovementPlusControlsProps} for all properties that can be passed to the constructor. + * + * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO } + * + * @example + * ```js + * const scene = new Scene() + * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000) + * const cameraRig = new CameraRig(camera, scene) + * const controls = new FreeMovementPlusControls(cameraRig) + * + * controls.enable() + * + * // render loop + * function animate(t) { + * controls.update(t) + * } + * ``` + * + */ +class FreeMovementPlusControls { + /** {@inheritDoc three-story-controls#FreeMovementPlusControlsProps#} */ constructor(cameraRig, props = {}) { this.enabled = false; this.cameraRig = cameraRig; @@ -1185,6 +1309,9 @@ class FreeMovementControls { this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward); this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left); this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down); + this.cameraRig.do(CameraAction.Roll, event.values.rollRight / 30 - event.values.rollLeft / 30); + this.cameraRig.do(CameraAction.Tilt, event.values.tiltDown / 30 - event.values.tiltUp / 30); + this.cameraRig.do(CameraAction.Pan, event.values.panLeft / 30 - event.values.panRight / 30); } onPointer(event) { switch (event.pointerCount) { @@ -2202,5 +2329,5 @@ class CameraHelper { } } -export { Axis, BaseAdaptor, CameraAction, CameraHelper, CameraRig, Damper, FreeMovementControls, KeyboardAdaptor, PathPointsControls, PointerAdaptor, RigComponent, ScrollAdaptor, ScrollControls, StoryPointsControls, SwipeAdaptor, ThreeDOFControls, WheelAdaptor }; +export { Axis, BaseAdaptor, CameraAction, CameraHelper, CameraRig, Damper, FreeMovementControls, FreeMovementPlusControls, KeyboardAdaptor, PathPointsControls, PointerAdaptor, RigComponent, ScrollAdaptor, ScrollControls, StoryPointsControls, SwipeAdaptor, ThreeDOFControls, WheelAdaptor }; //# sourceMappingURL=three-story-controls.esm.js.map diff --git a/dist/three-story-controls.esm.js.map b/dist/three-story-controls.esm.js.map index 8426e27..89d6043 100644 --- a/dist/three-story-controls.esm.js.map +++ b/dist/three-story-controls.esm.js.map @@ -1 +1 @@ -{"version":3,"file":"three-story-controls.esm.js","sources":["../src/Damper.ts","../src/CameraRig.ts","../src/adaptors/BaseAdaptor.ts","../src/adaptors/KeyboardAdaptor.ts","../src/adaptors/PointerAdaptor.ts","../src/adaptors/ScrollAdaptor.ts","../src/adaptors/SwipeAdaptor.ts","../src/adaptors/WheelAdaptor.ts","../src/controlschemes/FreeMovementControls.ts","../src/controlschemes/ScrollControls.ts","../src/controlschemes/StoryPointsControls.ts","../src/controlschemes/PathPointsControls.ts","../src/controlschemes/ThreeDOFControls.ts","../node_modules/style-inject/dist/style-inject.es.js","../src/camerahelper/index.ts"],"sourcesContent":["export interface DamperValues {\n /** A value to dampen, set to its initial state */\n [key: string]: number | null\n}\n\nexport interface DamperProps {\n /** Values to be dampened */\n values: DamperValues\n /** Multiplier used on each update to approach the target value, should be between 0 and 1, where 1 is no damping */\n dampingFactor: number\n /** Amount of permitted error before a value is considered to have 'reached' its target. Defaults to 0.001 */\n epsilon?: number\n}\n\n/**\n * Damper uses simple linear damping for a given collection of values.\n * On every call to update, the damper will approach a given set of target values.\n * @example\n * ```js\n * const damper = new Damper({\n * values: {x: 0, y: 0},\n * dampingFactor: 0.4\n * })\n *\n * damper.setTarget({ x: 1, y: 100 })\n * damper.update() // would generally be called in an animation loop\n * const values = damper.getCurrentValues() // values.x = 0.4; values.y = 40\n * ```\n */\n\nexport class Damper {\n private dampingFactor: number\n private epsilon = 0.001\n private values: DamperValues = {}\n private targetValues: DamperValues = {}\n private deltaValues: DamperValues = {}\n private hasReached: boolean\n\n constructor(props: DamperProps) {\n Object.assign(this.values, props.values)\n Object.assign(this.targetValues, props.values)\n this.deltaValues = {}\n for (const key in this.values) {\n this.deltaValues[key] = 0\n }\n this.dampingFactor = props.dampingFactor\n if (props.epsilon) this.epsilon = props.epsilon\n this.hasReached = true\n }\n\n /**\n * Update the damper, should generally be called on every frame\n */\n update(): void {\n const deltas = {}\n let approached = true\n\n for (const key in this.values) {\n deltas[key] = this.targetValues[key] - this.values[key]\n approached = approached && Math.abs(deltas[key]) < this.epsilon\n }\n\n if (approached) {\n for (const key in this.values) {\n this.deltaValues[key] = deltas[key]\n this.values[key] = this.targetValues[key]\n }\n this.hasReached = true\n } else {\n for (const key in this.values) {\n this.deltaValues[key] = this.dampingFactor * deltas[key]\n this.values[key] += this.deltaValues[key]\n }\n }\n }\n\n /**\n * Set the target values the damper needs to approach\n * @param target DamperValues the damper needs to approach\n */\n setTarget(target: DamperValues): void {\n for (const key in target) {\n this.targetValues[key] = target[key]\n }\n this.hasReached = false\n }\n\n /**\n * Increment/Decrement a specifc damper target value\n * @param key The key of the value to modify\n * @param value The amount to modify the target by\n */\n addToTarget(key: string, value: number): void {\n this.targetValues[key] += value\n this.hasReached = false\n }\n\n /**\n * Reset all damper values to the fiven number\n * @param value Number to reset all damper values to\n */\n resetAll(value: number): void {\n for (const key in this.values) {\n this.targetValues[key] = value\n this.values[key] = value\n this.deltaValues[key] = 0\n }\n this.hasReached = true\n }\n\n /**\n * Reset damper values as described by the given DamperValues object\n * @param values DamperValues object to reset the damper to\n */\n resetData(values: DamperValues): void {\n for (const key in values) {\n this.targetValues[key] = values[key]\n this.values[key] = values[key]\n this.deltaValues[key] = 0\n }\n this.hasReached = true\n }\n\n /**\n * Get the current values\n * @returns DamperValues object with the current values of the damper\n */\n getCurrentValues(): DamperValues {\n return { ...this.values }\n }\n\n /**\n * Get the change in values since the last update call\n * @returns DamperValues object with the amount the values changed since the last `update()` call\n */\n getDeltaValues(): DamperValues {\n return { ...this.deltaValues }\n }\n\n /**\n * Whether the damper has reached its target\n * @returns Whether the damper has reached its target (within permissible error range)\n */\n reachedTarget(): boolean {\n return this.hasReached\n }\n}\n","import {\n Vector3,\n Quaternion,\n Object3D,\n Camera,\n PerspectiveCamera,\n Scene,\n AnimationMixer,\n AnimationClip,\n EventDispatcher,\n Euler,\n} from 'three'\n\nimport gsap from 'gsap'\n\n/**\n * Event: Fired when CameraRig starts a transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveStart', handlerFunction)\n * ```\n * */\nexport interface CameraMoveStartEvent {\n type: 'CameraMoveStart'\n}\n\n/**\n * Event: Fired on every tick of CameraRig's transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveUpdate', handlerFunction)\n * ```\n * */\nexport interface CameraMoveUpdateEvent {\n type: 'CameraMoveUpdate'\n /** Percentage of transition completed, between 0 and 1. */\n progress: number\n}\n\n/**\n * Event: Fired when CameraRig ends a transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveEnd', handlerFunction)\n * ```\n * */\nexport interface CameraMoveEndEvent {\n type: 'CameraMoveEnd'\n}\n\n/**\n * Enum of camera actions used to control a {@link three-story-controls#CameraRig}\n */\nexport enum CameraAction {\n Pan = 'Pan',\n Tilt = 'Tilt',\n Roll = 'Roll',\n Truck = 'Truck',\n Pedestal = 'Pedestal',\n Dolly = 'Dolly',\n Zoom = 'Zoom',\n}\n\n/**\n * Enum of {@link three-story-controls#CameraRig} parts\n */\nexport enum RigComponent {\n Body = 'body',\n Head = 'head',\n Eyes = 'eyes',\n}\n\n/**\n * Enum of axes\n */\nexport enum Axis {\n X = 'x',\n Y = 'y',\n Z = 'z',\n}\n\n/**\n * Describe whether rig should translate along current rotation in each action axis\n */\nexport interface TranslateGuide {\n [CameraAction.Pan]: boolean\n [CameraAction.Tilt]: boolean\n [CameraAction.Roll]: boolean\n}\n\n/**\n * Mapping of rotation action to axis\n */\nexport interface ActionAxes {\n [CameraAction.Pan]: Axis\n [CameraAction.Tilt]: Axis\n [CameraAction.Roll]: Axis\n}\n\nconst AxisVector = {\n [Axis.X]: new Vector3(1, 0, 0),\n [Axis.Y]: new Vector3(0, 1, 0),\n [Axis.Z]: new Vector3(0, 0, 1),\n}\n\nconst ActionMappingByUpAxis = {\n [Axis.X]: {\n [CameraAction.Pan]: Axis.X,\n [CameraAction.Tilt]: Axis.Z,\n [CameraAction.Roll]: Axis.Y,\n },\n [Axis.Y]: {\n [CameraAction.Pan]: Axis.Y,\n [CameraAction.Tilt]: Axis.X,\n [CameraAction.Roll]: Axis.Z,\n },\n [Axis.Z]: {\n [CameraAction.Pan]: Axis.Z,\n [CameraAction.Tilt]: Axis.Y,\n [CameraAction.Roll]: Axis.X,\n },\n}\n\n/**\n * The CameraRig holds the camera, and can respond to {@link three-story-controls#CameraAction}s such as Pan/Tilt/Dolly etc. It can also be controlled along a given path (in the form of an `AnimationClip`), or tweened to specified points.\n *\n * @remarks\n * The rig is constructed of three objects, analagous to a body, head and eyes. The camera is nested in the eyes and is never transformed directly.\n *\n * Instead of specifying the axis to rotate/translate the camera, {@link three-story-controls#CameraAction}s are used. The rotation order of actions is always `Pan` then `Tilt` then `Roll`.\n * The mapping of these actions to axes depends on the up axis, which defaults to `Y` (but can be changed with the {@link CameraRig.setUpAxis | setUpAxis() method}):\n *\n * * `CameraAction.Pan` rotates around the `Y` axis\n *\n * * `CameraAction.Tilt` rotates around the `X` axis\n *\n * * `CameraAction.Roll` rotates around the `Z` axis\n *\n * * `CameraAction.Dolly` translates on the `Z` axis\n *\n * * `CameraAction.Truck` translates on the `X` axis\n *\n * * `CameraAction.Pedestal` translates on the `Y` axis\n *\n * Translations will be applied to the 'body' of the rig, and rotations to the 'eyes'. If an animation clip is provided, or the camera is tweened to a specific location,\n * the rotations will be applied to the 'head', thus leaving the 'eyes' free to 'look around' from this base position.\n *\n * Additionally, the default setup assumes that the rig will move forward/backward (`Dolly`) in the direction the camera is panned to.\n * This can be configured through {@link CameraRig.translateAlong | translateAlong property}.\n * It can also be overwritten by providing the component name to the {@link CameraRig.do | do() method}, see {@link https://github.com/nytimes/three-story-controls/blob/main/src/controlschemes/ThreeDOFControls.ts#L96 | ThreeDOFControls implementation} for an example.\n *\n * To move the rig along a specified path, use the {@link CameraRig.setAnimationClip | setAnimationClip() method},\n * and set the names for the `Translation` and `Rotation` objects to match those of the clip. The clip should have a `VectorKeyframeTrack` for the outer position/translation object,\n * and a `QuaternionKeyframeTrack` for the inner orientation/rotation object.\n *\n * See {@link three-story-controls#CameraMoveStartEvent}, {@link three-story-controls#CameraMoveUpdateEvent} and {@link three-story-controls#CameraMoveEndEvent} for emitted event signatures.\n */\nexport class CameraRig extends EventDispatcher {\n readonly camera: Camera\n readonly scene: Scene\n private body: Object3D\n private head: Object3D\n private eyes: Object3D\n private cameraIsInRig: boolean\n private inTransit = false\n private upAxis: Axis = Axis.Y\n private actionAxes: ActionAxes = ActionMappingByUpAxis[this.upAxis]\n private hasAnimation = false\n private animationClip: AnimationClip\n private mixer: AnimationMixer\n private animationTranslationObjectName = 'Translation'\n private animationRotationObjectName = 'Rotation'\n\n public translateAlong: TranslateGuide = {\n [CameraAction.Tilt]: false,\n [CameraAction.Pan]: true,\n [CameraAction.Roll]: false,\n }\n\n // Constructor\n constructor(camera: Camera, scene: Scene) {\n super()\n this.camera = camera\n this.scene = scene\n this.body = new Object3D()\n this.head = new Object3D()\n this.eyes = new Object3D()\n this.head.name = this.animationRotationObjectName\n this.body.name = this.animationTranslationObjectName\n this.body.rotation.order = this.getRotationOrder()\n this.head.rotation.order = this.getRotationOrder()\n this.eyes.rotation.order = this.getRotationOrder()\n this.scene.add(this.body.add(this.head.add(this.eyes.add(this.camera))))\n this.cameraIsInRig = true\n this.unpackTransform()\n }\n\n /**\n * Get the axis for a given action\n * @param action\n * @returns x | y | z\n */\n getAxisFor(action: CameraAction): string {\n return this.actionAxes[action]\n }\n\n /**\n * Get the axis' vector for a given action\n * @param action\n * @returns Normalized vector for the axis\n */\n getAxisVectorFor(action: CameraAction): Vector3 {\n return AxisVector[this.actionAxes[action]]\n }\n\n /**\n * Main method for controlling the camera\n * @param action - Action to perform\n * @param amount - Amount to move/rotate/etc\n * @param rigComponent - Override the default component to perform the action on\n */\n do(action: CameraAction, amount: number, rigComponent?: RigComponent): void {\n const targetComponent = this[rigComponent]\n\n switch (action) {\n case CameraAction.Pan:\n case CameraAction.Tilt:\n case CameraAction.Roll: {\n const axis = this.getAxisVectorFor(action)\n if (targetComponent) {\n targetComponent.rotateOnAxis(axis, amount)\n } else if (this.translateAlong[action]) {\n this.body.rotateOnAxis(axis, amount)\n } else {\n this.eyes.rotateOnAxis(axis, amount)\n }\n break\n }\n\n case CameraAction.Truck: {\n const axis = this.getAxisVectorFor(CameraAction.Tilt)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Pedestal: {\n const axis = this.getAxisVectorFor(CameraAction.Pan)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Dolly: {\n const axis = this.getAxisVectorFor(CameraAction.Roll)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Zoom: {\n if (this.camera instanceof PerspectiveCamera) {\n this.camera.fov = amount\n this.camera.updateProjectionMatrix()\n }\n break\n }\n\n default:\n break\n }\n }\n\n /**\n * Get world position and orientation of the camera\n */\n getWorldCoordinates(): { position: Vector3; quaternion: Quaternion } {\n const position = new Vector3()\n this.camera.getWorldPosition(position)\n const quaternion = new Quaternion()\n this.camera.getWorldQuaternion(quaternion)\n return { position, quaternion }\n }\n\n /**\n * Sets world coordinates for the camera, and configures rig component transforms accordingly.\n * @param param0\n */\n setWorldCoordinates({ position, quaternion }: { position: Vector3; quaternion: Quaternion }): void {\n const currentRotation = new Euler().setFromQuaternion(quaternion, this.getRotationOrder())\n const actions = [CameraAction.Pan, CameraAction.Tilt, CameraAction.Roll]\n this.eyes.position.set(0, 0, 0)\n this.eyes.rotation.set(0, 0, 0)\n this.head.position.set(0, 0, 0)\n this.head.rotation.set(0, 0, 0)\n this.body.position.copy(position)\n actions.forEach((action) => {\n const axis = this.getAxisFor(action)\n if (this.translateAlong[action]) {\n this.body.rotation[axis] = currentRotation[axis]\n } else {\n this.eyes.rotation[axis] = currentRotation[axis]\n }\n })\n this.camera.rotation.set(0, 0, 0)\n this.camera.position.set(0, 0, 0)\n }\n\n /**\n * Packs transfrom into the body and head, and 0s out transforms of the eyes. Useful for preparing the\n * rig for control through an animation clip.\n */\n packTransform(): void {\n const { position, quaternion } = this.getWorldCoordinates()\n this.body.position.copy(position)\n this.body.rotation.set(0, 0, 0)\n this.head.quaternion.copy(quaternion)\n this.head.position.set(0, 0, 0)\n this.eyes.position.set(0, 0, 0)\n this.eyes.rotation.set(0, 0, 0)\n }\n\n /**\n * Unpacks the current camera world coordinates and distributes transforms\n * across the rig componenets.\n */\n unpackTransform(): void {\n const { position, quaternion } = this.getWorldCoordinates()\n this.setWorldCoordinates({ position, quaternion })\n }\n\n /**\n * Disassemble the camera from the rig and attach it to the scene.\n */\n disassemble(): void {\n if (this.cameraIsInRig) {\n this.scene.attach(this.camera)\n this.cameraIsInRig = false\n }\n }\n\n /**\n * Place the camera back in the rig\n */\n assemble(): void {\n if (!this.cameraIsInRig) {\n this.eyes.attach(this.camera)\n this.unpackTransform()\n this.cameraIsInRig = true\n }\n }\n\n /**\n * Get the rotation order as a string compatible with what three.js uses\n */\n getRotationOrder(): string {\n return Object.values(this.actionAxes).join('').toUpperCase()\n }\n\n /**\n * Whether the camera is currently attached to the rig\n */\n isInRig(): boolean {\n return this.cameraIsInRig\n }\n\n /**\n * If the camera is in the middle of a transition\n */\n isMoving(): boolean {\n return this.inTransit\n }\n\n /**\n * Set the up axis for the camera\n * @param axis - New Up axis\n */\n setUpAxis(axis: Axis): void {\n this.upAxis = axis\n this.actionAxes = ActionMappingByUpAxis[this.upAxis]\n this.body.rotation.order = this.getRotationOrder()\n }\n\n /**\n * Set an animation clip for the rig\n * @param {AnimationClip} clip - AnimationClip containing a VectorKeyFrameTrack for position and a QuaternionKeyFrameTrack for rotation\n * @param {string} translationObjectName - Name of translation object\n * @param {string} rotationObjectName - Name of rotation object\n */\n setAnimationClip(clip: AnimationClip, translationObjectName?: string, rotationObjectName?: string): void {\n this.animationClip = clip\n if (translationObjectName) this.animationTranslationObjectName = translationObjectName\n if (rotationObjectName) this.animationRotationObjectName = rotationObjectName\n this.hasAnimation = true\n // hack. threejs skips last frame when seek time = clip duration\n this.animationClip.duration += 0.01\n this.mixer = new AnimationMixer(this.body)\n const action = this.mixer.clipAction(this.animationClip)\n action.clampWhenFinished = true\n action.play()\n }\n\n /**\n * Transition to a specific position and orientation in world space.\n * Transform on eyes will be reset to 0 as a result of this.\n * @param position\n * @param quaternion\n * @param duration\n * @param ease\n * @param useSlerp\n */\n flyTo(position: Vector3, quaternion: Quaternion, duration = 1, ease = 'power1', useSlerp = true): void {\n if (!this.isMoving()) {\n const currentCoords = this.getWorldCoordinates()\n const currentValues = {\n px: currentCoords.position.x,\n py: currentCoords.position.y,\n pz: currentCoords.position.z,\n qx: currentCoords.quaternion.x,\n qy: currentCoords.quaternion.y,\n qz: currentCoords.quaternion.z,\n qw: currentCoords.quaternion.w,\n slerpAmt: 0,\n }\n const targetValues = {\n px: position.x,\n py: position.y,\n pz: position.z,\n qx: quaternion.x,\n qy: quaternion.y,\n qz: quaternion.z,\n qw: quaternion.w,\n slerpAmt: 1,\n }\n const tempQuaternion = new Quaternion()\n const startQuaternion = new Quaternion(currentValues.qx, currentValues.qy, currentValues.qz, currentValues.qw)\n const onStart = (): void => {\n this.inTransit = true\n this.packTransform()\n this.dispatchEvent({ type: 'CameraMoveStart' } as CameraMoveStartEvent)\n }\n const onUpdate = (tween): void => {\n this.body.position.set(currentValues.px, currentValues.py, currentValues.pz)\n if (useSlerp) {\n tempQuaternion.slerpQuaternions(startQuaternion, quaternion, currentValues.slerpAmt)\n this.head.setRotationFromQuaternion(tempQuaternion)\n } else {\n this.head.quaternion.set(currentValues.qx, currentValues.qy, currentValues.qz, currentValues.qw)\n }\n this.dispatchEvent({\n type: 'CameraMoveUpdate',\n progress: tween.progress(),\n } as CameraMoveUpdateEvent)\n }\n const onComplete = (): void => {\n this.inTransit = false\n this.unpackTransform()\n this.dispatchEvent({ type: 'CameraMoveEnd' } as CameraMoveEndEvent)\n }\n gsap.to(currentValues, {\n duration,\n ease,\n ...targetValues,\n onStart,\n onUpdate: function () {\n onUpdate(this)\n },\n onComplete,\n })\n }\n }\n\n /**\n * Transition to a specific keyframe on the animation clip\n * Transform on eyes will be reset to 0 as a result of this.\n * @param frame - frame\n * @param duration - duration\n * @param ease - ease\n */\n flyToKeyframe(frame: number, duration = 1, ease = 'power1'): void {\n if (this.hasAnimation && !this.isMoving()) {\n const currentValues = {\n time: this.mixer.time,\n }\n const targetValues = {\n time: this.animationClip.tracks[0].times[frame],\n }\n const onStart = (): void => {\n this.inTransit = true\n this.dispatchEvent({ type: 'CameraMoveStart' } as CameraMoveStartEvent)\n }\n const onUpdate = (tween): void => {\n this.mixer.setTime(currentValues.time)\n this.dispatchEvent({\n type: 'CameraMoveUpdate',\n progress: tween.progress(),\n } as CameraMoveUpdateEvent)\n }\n const onComplete = (): void => {\n this.inTransit = false\n this.dispatchEvent({ type: 'CameraMoveEnd' } as CameraMoveEndEvent)\n }\n gsap.to(currentValues, {\n duration,\n ease,\n ...targetValues,\n onStart,\n onUpdate: function () {\n onUpdate(this)\n },\n onComplete,\n })\n }\n }\n\n /**\n * @param percentage - percentage of animation clip to move to, between 0 and 1\n */\n setAnimationPercentage(percentage: number): void {\n if (this.hasAnimation) {\n const percent = Math.max(\n 0,\n Math.min(percentage * this.animationClip.duration, this.animationClip.duration - 0.0001),\n )\n this.mixer.setTime(percent)\n }\n }\n\n /**\n * @param time - timestamp of animation clip to move to\n */\n setAnimationTime(time: number): void {\n if (this.hasAnimation) this.mixer.setTime(time)\n }\n\n /**\n * @param frame - frame of animation clip to move to\n */\n setAnimationKeyframe(frame: number): void {\n if (this.hasAnimation) this.mixer.setTime(this.animationClip.tracks[0].times[frame])\n }\n}\n","import { EventDispatcher } from 'three'\n\nexport abstract class BaseAdaptor extends EventDispatcher {\n constructor() {\n super()\n }\n abstract connect(): void\n abstract disconnect(): void\n abstract update(time?: number): void\n abstract isEnabled(): boolean\n}\n\nexport interface DiscreteEvent {\n type: 'trigger'\n}\n\nexport interface ContinuousEvent {\n type: 'update'\n}\n\nexport interface IntertiaCompleteEvent {\n type: 'inertiacomplete'\n}\n","import { BaseAdaptor, DiscreteEvent, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when a key in a `discrete` KeyboardAdaptor's mapping is released (`onKeyUp`)\n * @example\n * ```javascript\n * adaptor.on('trigger', () => { // do something })\n * ```\n * */\nexport interface KeyboardAdaptorDiscreteEvent extends DiscreteEvent {\n /** KeyMapping key that triggered the event */\n trigger: string\n}\n\n/**\n * Event: Fired when a key in a `continuous` KeyboardAdaptor's mapping is pressed (`onKeyDown`)\n * @example\n * ```javascript\n * adaptor.on('update', () => { // do something })\n * ```\n * */\nexport interface KeyboardAdaptorContinuousEvent extends ContinuousEvent {\n values: DamperValues\n deltas: DamperValues\n}\n\n/**\n * A discrete adaptor works as a trigger - only firing events on keyup,\n * whereas a continuous adaptor continuously fires events on keydown\n * */\nexport type KeyboardAdaptorType = 'discrete' | 'continuous'\n\n/**\n * Key-value pairs of semantic labels associated with an array of keys (corresponding to `KeybordEvent.keys` values)\n */\nexport interface KeyMapping {\n /** The key is a semantic label, and the string[] is a corresponding collection of event.keys */\n [key: string]: string[]\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#KeyboardAdaptor} constructor\n */\nexport interface KeyboardAdaptorProps {\n /** 'discrete' or 'continuous' */\n type: KeyboardAdaptorType\n /**\n * Default key mapping uses forward/backward/up/down/left/right as semanic labels, with WASD and arrow keys mapped appropriately:\n * @example keyMapping\n * ```javascript\n * {\n * forward: ['ArrowUp', 'w', 'W'],\n * backward: ['ArrowDown', 's', 'S'],\n * left: ['ArrowLeft', 'a', 'A'],\n * right: ['ArrowRight', 'd', 'D'],\n * up: ['u', 'U'],\n * down: ['n', 'N'],\n * }\n * ```\n * */\n keyMapping?: KeyMapping\n /** Only used for continuous adaptor, value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Only used for continuous adaptor, the amount to increment the target value on each keydown event. Defaults to 1 */\n incrementor?: number\n /** Prevent event bubbling. Defaults to true */\n preventBubbling?: boolean\n}\n\nconst defaultProps: Partial = {\n keyMapping: {\n forward: ['ArrowUp', 'w', 'W'],\n backward: ['ArrowDown', 's', 'S'],\n left: ['ArrowLeft', 'a', 'A'],\n right: ['ArrowRight', 'd', 'D'],\n up: ['u', 'U'],\n down: ['n', 'N'],\n },\n dampingFactor: 0.5,\n incrementor: 1,\n preventBubbling: true,\n}\n\n/**\n * Parse keyboard events and emit either dampened values for continuous keypresses, or trigger events named according to a provided keymapping.\n * @remarks\n * See {@link three-story-controls#KeyboardAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#KeyboardAdaptorDiscreteEvent} and {@link three-story-controls#KeyboardAdaptorContinuousEvent} for emitted event signatures.\n * @example Continuous adaptor\n * ```javascript\n * const keyboardAdaptor = new KeyboardAdaptor({ type: 'continuous', dampingFactor: 0.2 })\n * keyboardAdaptor.connect()\n * keyboardAdaptor.addEventListener('update', (event) => {\n * cube.rotation.y += event.deltas.right - event.deltas.left\n * cube.rotation.x += event.deltas.up - event.deltas.down\n * )}\n * function animate() {\n * keyboardAdaptor.update()\n * window.requestAnimationFrame(animate)\n * }\n * animate()\n * ```\n */\nexport class KeyboardAdaptor extends BaseAdaptor {\n private type: KeyboardAdaptorType\n private damper: Damper\n private dampingFactor: number\n private incrementor: number\n private keyMapping: KeyMapping\n private connected: boolean\n private preventBubbling: boolean\n\n constructor(props: KeyboardAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n const values = {}\n for (const key in this.keyMapping) {\n values[key] = 0\n }\n this.damper = new Damper({\n values,\n dampingFactor: this.dampingFactor,\n })\n this.onKeyUp = this.onKeyUp.bind(this)\n this.onKeyDown = this.onKeyDown.bind(this)\n }\n\n connect(): void {\n document.addEventListener('keyup', this.onKeyUp, true)\n document.addEventListener('keydown', this.onKeyDown, true)\n this.connected = true\n }\n\n disconnect(): void {\n document.removeEventListener('keyup', this.onKeyUp, true)\n document.removeEventListener('keydown', this.onKeyDown, true)\n this.connected = false\n }\n\n update(): void {\n if (this.type === 'continuous' && !this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.damper.getCurrentValues(),\n deltas: this.damper.getDeltaValues(),\n } as KeyboardAdaptorContinuousEvent)\n if (this.damper.reachedTarget()) {\n this.damper.resetAll(0)\n this.dispatchEvent({\n type: 'inertiacomplete',\n } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onKeyUp(event: KeyboardEvent): void {\n if (this.type === 'discrete') {\n for (const name in this.keyMapping) {\n if (this.keyMapping[name].includes(event.key)) {\n if (this.preventBubbling) event.preventDefault()\n this.dispatchEvent({\n type: 'trigger',\n trigger: name,\n } as KeyboardAdaptorDiscreteEvent)\n break\n }\n }\n }\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n if (this.type === 'continuous') {\n for (const name in this.keyMapping) {\n if (this.keyMapping[name].includes(event.key)) {\n if (this.preventBubbling) event.preventDefault()\n this.damper.addToTarget(name, this.incrementor)\n break\n }\n }\n }\n }\n}\n","import { BaseAdaptor, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\ninterface Coordinates extends DamperValues {\n x: number\n y: number\n}\n\n/**\n * Event: Fired when when `PointerEvent`s are triggered\n * @example\n * ```javascript\n * adaptor.on('trigger', (e) => {\n * console.log('x/y coordinates', e.values.x, e.values.y)\n * })\n * ```\n * */\nexport interface PointerAdaptorEvent extends ContinuousEvent {\n /** Dampened x and y pointer coordinates */\n values: Coordinates\n /** Pointer coordinate change since previous update */\n deltas: Coordinates\n /** Number of pointers registered */\n pointerCount: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#PointerAdaptor} constructor\n */\nexport interface PointerAdaptorProps {\n /** DOM element that should listen for pointer events. Defaults to `document.body` */\n domElement?: HTMLElement\n /** Damping value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Whether to normalize the pointer position values. Defaults to true */\n shouldNormalize?: boolean\n /** If values are normalized, whether they should be in -1 to 1 range. Defaults to true. */\n normalizeAroundZero?: boolean\n /** Debounce for registering a change in the pointer count, in ms. Defaults to 100. */\n multipointerThreshold?: number\n}\n\nconst defaultProps: PointerAdaptorProps = {\n domElement: document.body,\n dampingFactor: 0.5,\n shouldNormalize: true,\n normalizeAroundZero: true,\n multipointerThreshold: 100,\n}\n\n/**\n * Parse pointer events to emit dampened, normalized coordinates along with the pointer count (for detecting multi-touch or drag events)\n * @remarks\n * See {@link three-story-controls#PointerAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#PointerAdaptorEvent} for emitted event signatures.\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n * @example Pointer adaptor\n * ```javascript\n * const pointerAdaptor = new PointerAdaptor()\n * pointerAdaptor.connect()\n * pointerAdaptor.addEventListener('update', (event) => {\n * switch(event.pointerCount) {\n * case 0:\n * cube.scale.x = event.values.x\n * cube.scale.y = event.values.y\n * break\n * case 1:\n * cube.position.x += event.deltas.x\n * cube.position.y -= event.deltas.y\n * break\n * default:\n * break\n * }\n * })\n *\n * // in RAF loop:\n * function animate(t) {\n * pointerAdaptor.update(t)\n * }\n * ```\n */\nexport class PointerAdaptor extends BaseAdaptor {\n private domElement = document.body\n private dampingFactor: number\n private shouldNormalize = true\n private normalizeAroundZero = true\n private multipointerThreshold: number\n private damper: Damper\n private connected: boolean\n private width: number\n private height: number\n private pointerCount = 0\n private recordedPosition = false\n private cache: Array = []\n private lastDownTime = 0\n private lastUpTime = 0\n\n constructor(props: PointerAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.damper = new Damper({\n values: { x: null, y: null },\n dampingFactor: this.dampingFactor,\n })\n this.setDimensions()\n this.onPointerMove = this.onPointerMove.bind(this)\n this.onPointerUp = this.onPointerUp.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n this.onResize = this.onResize.bind(this)\n }\n\n connect(): void {\n this.domElement.addEventListener('pointermove', this.onPointerMove, { passive: true })\n this.domElement.addEventListener('pointerdown', this.onPointerDown, { passive: true })\n this.domElement.addEventListener('pointerleave', this.onPointerUp, { passive: true })\n this.domElement.addEventListener('pointerup', this.onPointerUp, { passive: true })\n window.addEventListener('resize', this.onResize)\n this.connected = true\n }\n\n disconnect(): void {\n this.domElement.removeEventListener('pointermove', this.onPointerMove)\n this.domElement.removeEventListener('pointerdown', this.onPointerDown)\n this.domElement.removeEventListener('pointerleave', this.onPointerUp)\n this.domElement.removeEventListener('pointerup', this.onPointerUp)\n this.connected = false\n }\n\n update(time: number): void {\n if (\n this.pointerCount !== this.cache.length &&\n time - this.lastDownTime > this.multipointerThreshold &&\n time - this.lastUpTime > this.multipointerThreshold\n ) {\n this.pointerCount = this.cache.length\n if (this.pointerCount === 0) {\n this.damper.resetAll(null)\n this.recordedPosition = false\n } else {\n this.damper.resetData(this.getPointerPosition(this.cache[0]))\n this.recordedPosition = true\n }\n }\n\n if (!this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.shouldNormalize\n ? this.normalize(this.damper.getCurrentValues() as Coordinates, this.normalizeAroundZero)\n : this.damper.getCurrentValues(),\n deltas: this.shouldNormalize\n ? this.normalize(this.damper.getDeltaValues() as Coordinates, false)\n : this.damper.getDeltaValues(),\n pointerCount: this.pointerCount,\n } as PointerAdaptorEvent)\n if (this.damper.reachedTarget()) {\n this.dispatchEvent({ type: 'inertiacomplete' } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private setDimensions(): void {\n this.width = this.domElement.getBoundingClientRect().width\n this.height = this.domElement.getBoundingClientRect().height\n }\n\n private getPointerPosition(event: PointerEvent): Coordinates {\n // event.offsetLeft is still experimental\n return {\n x: Math.max(0, Math.min(this.width, event.x - this.domElement.offsetLeft)),\n y: Math.max(0, Math.min(this.height, event.y - this.domElement.offsetTop)),\n }\n }\n\n private normalize(values: Coordinates, aroundZero: boolean): Coordinates {\n let x = values.x / this.width\n let y = values.y / this.height\n if (aroundZero) {\n x = x * 2 - 1\n y = y * 2 - 1\n }\n return { x, y }\n }\n\n private onPointerMove(event: PointerEvent): void {\n if (this.pointerCount === this.cache.length) {\n if (this.cache.length === 0) {\n if (!this.recordedPosition) {\n this.damper.resetData(this.getPointerPosition(event))\n this.recordedPosition = true\n } else {\n this.damper.setTarget(this.getPointerPosition(event))\n }\n } else {\n if (event.pointerId === this.cache[0].pointerId) {\n this.damper.setTarget(this.getPointerPosition(event))\n }\n }\n }\n }\n\n private onPointerDown(event: PointerEvent): void {\n // only deals with left mouse button right now\n // TODO: add some logic for optional right button events\n if (event.button === 0) {\n this.cache.push(event)\n this.lastDownTime = window.performance.now()\n }\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (event.button === 0 || event.type === 'pointerleave') {\n for (let i = 0; i < this.cache.length; i++) {\n if (this.cache[i].pointerId == event.pointerId) {\n this.cache.splice(i, 1)\n break\n }\n }\n this.lastUpTime = window.performance.now()\n }\n }\n\n private onResize(): void {\n this.setDimensions()\n }\n}\n","import { BaseAdaptor, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when when the 'in view' amount of the given DOM element changes\n */\nexport interface ScrollAdaptorEvent extends ContinuousEvent {\n values: DamperValues\n dampenedValues: DamperValues\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ScrollAdaptor} constructor\n */\nexport interface ScrollAdaptorProps {\n /** Long DOM Element to observe */\n scrollElement: HTMLElement\n /** Offset to start registering scroll, in px or vh. Default starts when top of element is at bottom of viewport. */\n startOffset?: string\n /** Offset to end registering scroll, in px or vh. Default ends when bottom of element is at top of viewport. */\n endOffset?: string\n /** Buffer before and after element to start registering scroll. Number between 0 and 1, defaults to 0.1 */\n buffer?: number\n /** Value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n}\n\nconst defaultProps: Partial = {\n startOffset: '0px',\n endOffset: '0px',\n buffer: 0.1,\n dampingFactor: 0.5,\n}\n\n/**\n * Emits normalized values for the amount a given DOM element has been scrolled through.\n * @remarks\n * See {@link three-story-controls#ScrollAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#ScrollAdaptorEvent} for emitted event signatures.\n * @example Scroll adaptor\n * ```javascript\n * const scrollAdaptor = new ScrollAdaptor({ scrollElement: document.querySelector('.scroller'), dampingFactor: 0.1 })\n * scrollAdaptor.connect()\n * scrollAdaptor.addEventListener('update', (event) => {\n * cube.rotation.y = event.dampenedValues.scrollPercent*Math.PI*2\n * })\n * ```\n */\nexport class ScrollAdaptor extends BaseAdaptor {\n private scrollElement: HTMLElement\n private damper: Damper\n private dampingFactor: number\n private connected: boolean\n private values: DamperValues\n private lastSeenScrollValue: number\n private previousScrollValue: number\n private startPosition: number\n private endPosition: number\n private distance: number\n private bufferedStartPosition: number\n private bufferedEndPosition: number\n private startOffset: string\n private endOffset: string\n private buffer: number\n private resizeObserver: ResizeObserver\n\n constructor(props: ScrollAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.lastSeenScrollValue = window.scrollY || -1\n this.previousScrollValue = this.lastSeenScrollValue\n this.values = {\n scrollPx: null,\n scrollPercent: null,\n }\n this.damper = new Damper({\n values: this.values,\n dampingFactor: this.dampingFactor,\n })\n this.calculateDimensions = this.calculateDimensions.bind(this)\n this.onScroll = this.onScroll.bind(this)\n this.resizeObserver = new ResizeObserver(this.calculateDimensions)\n this.calculateDimensions()\n }\n\n connect(): void {\n window.addEventListener('scroll', this.onScroll, { passive: true })\n this.resizeObserver.observe(document.body)\n this.connected = true\n }\n\n disconnect(): void {\n window.removeEventListener('scroll', this.onScroll)\n this.resizeObserver.unobserve(document.body)\n this.connected = false\n }\n\n update(): void {\n if (\n this.lastSeenScrollValue !== this.previousScrollValue &&\n this.lastSeenScrollValue >= this.bufferedStartPosition &&\n this.lastSeenScrollValue <= this.bufferedEndPosition\n ) {\n const scrollPx = Math.max(0, Math.min(this.distance, this.lastSeenScrollValue - this.startPosition))\n const scrollPercent = Math.max(0, Math.min(1, scrollPx / this.distance))\n this.values = {\n scrollPx,\n scrollPercent,\n }\n this.damper.setTarget(this.values)\n this.previousScrollValue = this.lastSeenScrollValue\n }\n if (!this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.values,\n dampenedValues: this.damper.getCurrentValues(),\n } as ScrollAdaptorEvent)\n if (this.damper.reachedTarget()) {\n this.dispatchEvent({ type: 'inertiacomplete' } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n parseOffset(offset: string): number {\n let amount = 0\n if (offset) {\n amount = parseInt(offset)\n if (offset.indexOf('vh') !== -1) {\n amount = (amount * window.innerHeight) / 100\n } else if (this.distance && offset.indexOf('%') !== -1) {\n amount = (amount * this.distance) / 100\n }\n }\n return amount\n }\n\n private calculateOffset(element: HTMLElement): number {\n if (!element) return 0\n return this.calculateOffset(element.offsetParent as HTMLElement) + element.offsetTop\n }\n\n private calculateDimensions(): void {\n const elementHeight = this.scrollElement.clientHeight\n const offsetTop = this.calculateOffset(this.scrollElement)\n this.startPosition = offsetTop - window.innerHeight + this.parseOffset(this.startOffset)\n this.endPosition = offsetTop + elementHeight + this.parseOffset(this.endOffset)\n this.distance = this.endPosition - this.startPosition\n this.bufferedStartPosition = Math.max(0, this.startPosition * (1 - this.buffer))\n this.bufferedEndPosition = Math.min(\n this.endPosition * (1 + this.buffer),\n document.body.getBoundingClientRect().height,\n )\n }\n\n private onScroll(): void {\n this.lastSeenScrollValue = window.scrollY\n }\n}\n","import { BaseAdaptor, DiscreteEvent } from './BaseAdaptor'\n\n/**\n * Event: Fired when when swipe are registered\n * @remarks\n * The sign represents the direction of the swipe,\n * y = 1 when swiping down-to-up, and x = 1 when swiping left-to-right\n * */\nexport interface SwipeAdaptorEvent extends DiscreteEvent {\n x: -1 | 1 | 0\n y: -1 | 1 | 0\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#SwipeAdaptor} constructor\n */\nexport interface SwipeAdaptorProps {\n /** DOM element to listen to events on. Defaults to document.body */\n domElement?: HTMLElement\n /** Threshold of pointer's deltaX to trigger events. Defaults to 60 */\n thresholdX?: number\n /** Threshold of pointer's deltaY to trigger events. Defaults to 60 */\n thresholdY?: number\n}\n\nconst defaultProps: SwipeAdaptorProps = {\n domElement: document.body,\n thresholdX: 60,\n thresholdY: 60,\n}\n\n/**\n * Emits events in response to swipe gestures above a given threshold.\n * @remarks\n * See {@link three-story-controls#SwipeAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#SwipeAdaptorEvent} for emitted event signatures.\n * Note: CSS property `touch-action: none` will probably be needed on listener element\n * @example Swipe adaptor\n * ```javascript\n * const swipeAdaptor = new SwipeAdaptor()\n * swipeAdaptor.connect()\n * swipeAdaptor.addEventListener('trigger', (event) => {\n * cube.scale.y += event.y*0.1\n * })\n * ```\n */\nexport class SwipeAdaptor extends BaseAdaptor {\n private domElement: HTMLElement\n private thresholdX: number\n private thresholdY: number\n private startX: number\n private startY: number\n private connected: boolean\n\n constructor(props: SwipeAdaptorProps = {}) {\n super()\n Object.assign(this, defaultProps, props)\n this.onPointerUp = this.onPointerUp.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n }\n\n connect(): void {\n this.domElement.addEventListener('pointerdown', this.onPointerDown, { passive: true })\n this.domElement.addEventListener('pointerup', this.onPointerUp, { passive: true })\n this.connected = true\n }\n\n disconnect(): void {\n this.domElement.removeEventListener('pointerdown', this.onPointerDown)\n this.domElement.removeEventListener('pointerup', this.onPointerUp)\n this.connected = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onPointerDown(event: PointerEvent): void {\n if (event.pointerType !== 'mouse' && event.isPrimary) {\n this.startX = event.screenX\n this.startY = event.screenY\n }\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (event.pointerType !== 'mouse' && event.isPrimary) {\n const diffX = event.screenX - this.startX\n const diffY = event.screenY - this.startY\n if (Math.abs(diffX) >= this.thresholdX || Math.abs(diffY) >= this.thresholdY) {\n this.dispatchEvent({\n type: 'trigger',\n x: Math.abs(diffX) >= this.thresholdX ? Math.sign(diffX) : 0,\n y: Math.abs(diffY) >= this.thresholdY ? Math.sign(-1 * diffY) : 0,\n } as SwipeAdaptorEvent)\n }\n }\n }\n}\n","import { BaseAdaptor, DiscreteEvent, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when when discrete `wheel` events are registered\n * @remarks\n * The sign represents the the direction of the wheel event that caused the event to trigger\n * */\nexport interface WheelAdaptorDiscreteEvent extends DiscreteEvent {\n x: -1 | 1 | 0\n y: -1 | 1 | 0\n}\n\n/**\n * Event: Fired on a continuous `WheelAdaptor` in response to `wheel` events\n * @remarks\n * DamperValues have `x` and `y` keys.\n * */\nexport interface WheelAdaptorContinuousEvent extends ContinuousEvent {\n values: DamperValues\n deltas: DamperValues\n}\n\n/**\n * A discrete adaptor works as a trigger - only firing events when wheel events pass a given threshold,\n * whereas a continuous adaptor continuously fires events on wheel\n * */\nexport type WheelAdaptorType = 'discrete' | 'continuous'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#WheelAdaptor} constructor\n */\nexport interface WheelAdaptorProps {\n /** 'discrete' or 'continuous' */\n type: WheelAdaptorType\n /** DOM element to listen to events on. Defaults to window */\n domElement?: HTMLElement\n /** Only used for continuous adaptor, value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Only used for discrete adaptor, threshold of wheel.deltaX to trigger events. Defaults to 15 */\n thresholdX?: number\n /** Only used for discrete adaptor, threshold of wheel.deltaY to trigger events. Defaults to 15 */\n thresholdY?: number\n /** Only used for discrete adaptor, rest duration between firing trigger events. Defaults to 700 */\n debounceDuration?: number\n}\n\nconst defaultProps: Partial = {\n dampingFactor: 0.5,\n thresholdX: 15,\n thresholdY: 15,\n debounceDuration: 700,\n}\n\n/**\n * Parse mouse wheel events and emit either dampened values, or trigger events for swipes that cross a given threshold.\n * @remarks\n * See {@link three-story-controls#WheelAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#WheelAdaptorDiscreteEvent} and {@link three-story-controls#WheelAdaptorContinuousEvent} for emitted event signatures.\n * @example Discrete adaptor\n * ```javascript\n * const wheelAdaptor = new WheelAdaptor({ type: 'discrete' })\n * wheelAdaptor.connect()\n * wheelAdaptor.addEventListener('trigger', (event) => {\n * cube.scale.y += event.y*0.1\n * })\n * ```\n */\nexport class WheelAdaptor extends BaseAdaptor {\n private type: WheelAdaptorType\n private domElement: HTMLElement\n private dampingFactor: number\n private damper: Damper\n private thresholdX: number\n private thresholdY: number\n private debounceDuration: number\n private lastThresholdTrigger = 0\n private connected: boolean\n\n constructor(props: WheelAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.damper = new Damper({\n values: { x: 0, y: 0 },\n dampingFactor: this.dampingFactor,\n })\n this.onWheel = this.onWheel.bind(this)\n }\n\n connect(): void {\n const element = this.domElement || window\n element.addEventListener('wheel', this.onWheel, { passive: true })\n this.connected = true\n }\n\n disconnect(): void {\n const element = this.domElement || window\n element.removeEventListener('wheel', this.onWheel)\n this.connected = false\n }\n\n update(): void {\n if (this.type === 'continuous' && !this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.damper.getCurrentValues(),\n deltas: this.damper.getDeltaValues(),\n } as WheelAdaptorContinuousEvent)\n if (this.damper.reachedTarget()) {\n this.damper.resetAll(0)\n this.dispatchEvent({\n type: 'inertiacomplete',\n } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onWheel(event: WheelEvent): void {\n if (this.type === 'continuous') {\n this.damper.addToTarget('x', event.deltaX)\n this.damper.addToTarget('y', event.deltaY)\n } else if (this.type === 'discrete') {\n if (Math.abs(event.deltaX) >= this.thresholdX || Math.abs(event.deltaY) >= this.thresholdY) {\n const now = window.performance.now()\n if (now - this.lastThresholdTrigger > this.debounceDuration) {\n this.lastThresholdTrigger = now\n this.dispatchEvent({\n type: 'trigger',\n x: Math.abs(event.deltaX) >= this.thresholdX ? Math.sign(event.deltaX) : 0,\n y: Math.abs(event.deltaY) >= this.thresholdY ? Math.sign(event.deltaY) : 0,\n } as WheelAdaptorDiscreteEvent)\n }\n }\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#FreeMovementControls} constructor\n */\nexport interface FreeMovementControlsProps {\n domElement?: HTMLElement\n /** Damping factor between 0 and 1. Defaults to 0.3 */\n pointerDampFactor?: number\n /** Mutiplier for two-pointer translation. Defaults to 4 */\n pointerScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.5 */\n keyboardDampFactor?: number\n /** Mutiplier for keyboard translation. Defaults to 0.5 */\n keyboardScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.25 */\n wheelDampFactor?: number\n /** Mutiplier for wheel translation. Defaults to 0.05 */\n wheelScaleFactor?: number\n /** Mutiplier for panning. Defaults to Math.PI / 4 */\n panDegreeFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 10 */\n tiltDegreeFactor?: number\n}\n\nconst defaultProps: FreeMovementControlsProps = {\n domElement: document.body,\n pointerDampFactor: 0.3,\n pointerScaleFactor: 4,\n keyboardDampFactor: 0.5,\n keyboardScaleFactor: 0.5,\n wheelDampFactor: 0.25,\n wheelScaleFactor: 0.05,\n panDegreeFactor: Math.PI / 4,\n tiltDegreeFactor: Math.PI / 10,\n}\n\n/**\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * @remarks\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#FreeMovementControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n *\n */\nexport class FreeMovementControls implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private wheelAdaptor: WheelAdaptor\n private pointerAdaptor: PointerAdaptor\n private wheelScaleFactor: number\n private pointerScaleFactor: number\n private panDegreeFactor: number\n private tiltDegreeFactor: number\n private enabled = false\n\n /** {@inheritDoc three-story-controls#FreeMovementControlsProps#} */\n constructor(cameraRig: CameraRig, props: FreeMovementControlsProps = {}) {\n this.cameraRig = cameraRig\n\n this.wheelScaleFactor = props.wheelScaleFactor || defaultProps.wheelScaleFactor\n this.pointerScaleFactor = props.pointerScaleFactor || defaultProps.pointerScaleFactor\n this.panDegreeFactor = props.panDegreeFactor || defaultProps.panDegreeFactor\n this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps.tiltDegreeFactor\n\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'continuous',\n dampingFactor: props.keyboardDampFactor || defaultProps.keyboardDampFactor,\n incrementor: props.keyboardScaleFactor || defaultProps.keyboardScaleFactor,\n })\n\n this.wheelAdaptor = new WheelAdaptor({\n type: 'continuous',\n dampingFactor: props.wheelDampFactor || defaultProps.wheelDampFactor,\n domElement: props.domElement || defaultProps.domElement,\n })\n\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.pointerDampFactor || defaultProps.pointerDampFactor,\n })\n\n this.onWheel = this.onWheel.bind(this)\n this.onKey = this.onKey.bind(this)\n this.onPointer = this.onPointer.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.wheelAdaptor.connect()\n this.keyboardAdaptor.connect()\n this.pointerAdaptor.connect()\n this.wheelAdaptor.addEventListener('update', this.onWheel)\n this.keyboardAdaptor.addEventListener('update', this.onKey)\n this.pointerAdaptor.addEventListener('update', this.onPointer)\n this.enabled = true\n }\n\n disable(): void {\n this.wheelAdaptor.disconnect()\n this.keyboardAdaptor.disconnect()\n this.pointerAdaptor.disconnect()\n this.wheelAdaptor.removeEventListener('update', this.onWheel)\n this.keyboardAdaptor.removeEventListener('update', this.onKey)\n this.pointerAdaptor.removeEventListener('update', this.onPointer)\n this.enabled = false\n }\n\n private onWheel(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.wheelScaleFactor)\n }\n\n private onKey(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward)\n this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left)\n this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down)\n }\n\n private onPointer(event): void {\n switch (event.pointerCount) {\n case 1:\n this.cameraRig.do(CameraAction.Pan, event.deltas.x * this.panDegreeFactor)\n this.cameraRig.do(CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor)\n break\n case 2:\n this.cameraRig.do(CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor)\n this.cameraRig.do(CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor)\n break\n default:\n break\n }\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.keyboardAdaptor.update()\n this.wheelAdaptor.update()\n this.pointerAdaptor.update(time)\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig } from '../CameraRig'\nimport { ScrollAdaptor } from '../adaptors/ScrollAdaptor'\n\n/**\n * ScrollActions provide a way to add custom callback hooks for specific parts of the scroll area\n */\nexport interface ScrollAction {\n /** When to start the action, in %, px or vh. */\n start: string\n /** When to end the action, in %, px or vh. */\n end: string\n /** Callback with 0-1 progress when element is between start and end conditions. */\n callback: (progress: number) => void\n /** @internal */\n startPx: number\n /** @internal */\n endPx: number\n /** @internal */\n bufferedStartPx: number\n /** @internal */\n bufferedEndPx: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ScrollControls} constructor\n */\nexport interface ScrollControlsProps {\n /** Long DOM Element to observe */\n scrollElement: HTMLElement\n /** Offset to start registering scroll, in px or vh. Default starts when top of element is at bottom of viewport. */\n startOffset?: string\n /** Offset to end registering scroll, in px or vh. Default ends when bottom of element is at top of viewport. */\n endOffset?: string\n /** Value between 0 and 1. Defaults to 1 */\n dampingFactor?: number\n /** Buffer before and after element to start registering scroll. Number (percentage) between 0 and 1, defaults to 0.1 */\n buffer?: number\n /** When in the scroll to start the camera animation, can be specified in px, % or vh */\n cameraStart?: string\n /** When in the scroll to end the camera animation, can be specified in px, % or vh */\n cameraEnd?: string\n /** Array of ScrollActions for custom scroll hooks */\n scrollActions: ScrollAction[]\n}\n\nconst defaultProps: Partial = {\n startOffset: '0px',\n endOffset: '0px',\n dampingFactor: 1,\n buffer: 0.1,\n cameraStart: '0%',\n cameraEnd: '100%',\n scrollActions: [],\n}\n\nconst mapRange = (number, inMin, inMax, outMin, outMax): number => {\n return Math.max(outMin, Math.min(outMax, (number - inMin) * ((outMax - outMin) / (inMax - inMin)) + outMin))\n}\n\n/**\n * Control scheme to scrub through the CameraRig's `AnimationClip` based on the scroll of a DOM Element\n * @remarks\n * Control scheme to scrub through the CameraRig's `AnimationClip` based on the scroll of a DOM Element.\n * These controls expect to observe an element that is a few viewports long, and use the scroll distance to scrub through a camera animation.\n * By default, the 'start' of the animation is when the element starts to be in view (ie the top of the element aligns with the bottom of the viewport),\n * and the 'end' is when the element goes out of view (when the bottom of the elements aligns with the top of the viewport).\n * These trigger points can be customised with the `cameraStart` and `cameraEnd` properties. Additional scroll-dependant procedures can also be defined through `scrollActions`.\n *\n *\n * See {@link three-story-controls#ScrollControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/scroll-controls/ | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new ScrollControls(cameraRig, {\n * scrollElement: document.querySelector('.scroller'),\n * cameraStart: '12%',\n * cameraEnd: '90%',\n * scrollActions: [\n * { start: '0%' , end: '10%', callback: e => fadeInElement(e) },\n * { start: '85%' , end: '100%', callback: e => fadeOutElement(e) }\n * ]\n * })\n *\n * function fadeInElement(progress) { // entry fade transition }\n * function fadeOutElement(progress) { // exit fade transition }\n *\n * gltfLoader.load(cameraPath, (gltf) => {\n * cameraRig.setAnimationClip(gltf.animations[0])\n * cameraRig.setAnimationTime(0)\n * controls.enable()\n * })\n *\n * // render loop\n * function animate() {\n * controls.update()\n * }\n * ```\n */\nexport class ScrollControls implements BaseControls {\n readonly cameraRig: CameraRig\n private scrollAdaptor: ScrollAdaptor\n private enabled = false\n private cameraStart: string\n private cameraEnd: string\n private cameraStartPx: number\n private cameraEndPx: number\n private cameraBufferedStartPx: number\n private cameraBufferedEndPx: number\n private scrollActions: ScrollAction[]\n private buffer: number\n\n constructor(cameraRig: CameraRig, props: ScrollControlsProps) {\n this.cameraRig = cameraRig\n this.cameraRig.setAnimationTime(0)\n\n this.scrollAdaptor = new ScrollAdaptor({\n scrollElement: props.scrollElement,\n dampingFactor: props.dampingFactor || defaultProps.dampingFactor,\n startOffset: props.startOffset || defaultProps.startOffset,\n endOffset: props.endOffset || defaultProps.endOffset,\n buffer: props.buffer || defaultProps.buffer,\n })\n\n this.cameraStart = props.cameraStart || defaultProps.cameraStart\n this.cameraEnd = props.cameraEnd || defaultProps.cameraEnd\n this.scrollActions = props.scrollActions || defaultProps.scrollActions\n this.buffer = props.buffer || defaultProps.buffer\n this.calculateStops()\n this.onScroll = this.onScroll.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.scrollAdaptor.connect()\n this.scrollAdaptor.addEventListener('update', this.onScroll)\n this.enabled = true\n }\n\n disable(): void {\n this.scrollAdaptor.disconnect()\n this.scrollAdaptor.removeEventListener('update', this.onScroll)\n this.enabled = false\n }\n\n update(): void {\n if (this.enabled) {\n this.scrollAdaptor.update()\n }\n }\n\n private calculateStops(): void {\n this.cameraStartPx = this.scrollAdaptor.parseOffset(this.cameraStart)\n this.cameraEndPx = this.scrollAdaptor.parseOffset(this.cameraEnd)\n this.cameraBufferedStartPx = this.cameraStartPx * (1 - this.buffer)\n this.cameraBufferedEndPx = this.cameraEndPx * (1 + this.buffer)\n this.scrollActions.forEach((action) => {\n action.startPx = this.scrollAdaptor.parseOffset(action.start)\n action.endPx = this.scrollAdaptor.parseOffset(action.end)\n action.bufferedStartPx = action.startPx * (1 - this.buffer)\n action.bufferedEndPx = action.endPx * (1 + this.buffer)\n })\n }\n\n private onScroll(event): void {\n const progress = event.dampenedValues.scrollPx\n if (progress >= this.cameraBufferedStartPx && progress <= this.cameraBufferedEndPx) {\n this.cameraRig.setAnimationPercentage(mapRange(progress, this.cameraStartPx, this.cameraEndPx, 0, 1))\n }\n this.scrollActions.forEach((action) => {\n if (progress >= action.bufferedStartPx && progress <= action.bufferedEndPx) {\n action.callback(mapRange(progress, action.startPx, action.endPx, 0, 1))\n }\n })\n }\n}\n","import { EventDispatcher, Vector3, Quaternion } from 'three'\nimport { BaseControls, UpdatePOIsEvent, ExitPOIsEvent } from './BaseControls'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { CameraRig } from '../CameraRig'\n\nexport interface StoryPointMarker {\n /** Camera position */\n position: Vector3\n /** Camera quaternion */\n quaternion: Quaternion\n /** Transition duration, defaults to 1 */\n duration?: number\n /** Transition easing, defaults to power1 */\n ease?: string\n /** Use spherical interpolation for rotation, defaults to true */\n useSlerp?: boolean\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#StoryPointsControls} constructor\n */\nexport interface StoryPointsControlsProps {\n /** Whether to cycle to the first/last POI after reaching the end/start. When false, controls with emit 'ExitStoryPoints' events. Defaults to false. */\n cycle?: boolean\n /** Use keyboard arrow keys as navigation, defaults to true */\n useKeyboard?: boolean\n}\n\nconst defaultProps: StoryPointsControlsProps = {\n cycle: false,\n useKeyboard: true,\n}\n\n/**\n * Control scheme to transition the camera between given points in world space.\n * @remarks\n * See {@link three-story-controls#StoryPointsControlsProps} for all properties that can be passed to the constructor.\n *\n * See {@link three-story-controls#StoryPointMarker} for POI properties.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/story-points/ | DEMO }\n *\n * @example\n * ```js\n *\n * const pois = [\n * { position: new Vector3(...), quaternion: new Quaternion(...) },\n * { position: new Vector3(...), quaternion: new Quaternion(...) },\n * ]\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new StoryPointsControls(cameraRig, pois)\n *\n * controls.enable()\n * controls.goToPOI(0)\n *\n * // Assuming DOM elements with classes 'nextBtn' and 'prevBtn' have been created\n * document.querySelector('.nextBtn').on('click', () => controls.nextPOI() )\n * document.querySelector('.prevBtn').on('click', () => controls.prevPOI() )\n * ```\n */\nexport class StoryPointsControls extends EventDispatcher implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private pois: StoryPointMarker[]\n private currentIndex: number | null = null\n private upcomingIndex: number | null = null\n private enabled = false\n private cycle: boolean\n private useKeyboard: boolean\n\n constructor(cameraRig: CameraRig, pois: StoryPointMarker[] = [], props: StoryPointsControlsProps = {}) {\n super()\n this.cameraRig = cameraRig\n this.pois = pois\n Object.assign(this, defaultProps, props)\n if (this.useKeyboard) {\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'discrete',\n keyMapping: {\n next: ['ArrowDown', 'ArrowRight'],\n prev: ['ArrowUp', 'ArrowLeft'],\n },\n })\n this.onKey = this.onKey.bind(this)\n }\n this.onCameraStart = this.onCameraStart.bind(this)\n this.onCameraUpdate = this.onCameraUpdate.bind(this)\n this.onCameraEnd = this.onCameraEnd.bind(this)\n }\n\n getCurrentIndex(): number {\n return this.currentIndex\n }\n\n nextPOI(): void {\n const next = this.currentIndex + 1\n if (next >= this.pois.length && !this.cycle) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'end',\n } as ExitPOIsEvent)\n } else {\n this.goToPOI(next % this.pois.length)\n }\n }\n\n prevPOI(): void {\n const prev = this.currentIndex - 1\n if (prev < 0 && !this.cycle) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'start',\n } as ExitPOIsEvent)\n } else {\n this.goToPOI((prev + this.pois.length) % this.pois.length)\n }\n }\n\n goToPOI(index: number): void {\n this.upcomingIndex = index\n const poi = this.pois[this.upcomingIndex]\n this.cameraRig.flyTo(poi.position, poi.quaternion, poi.duration, poi.ease, poi.useSlerp)\n }\n\n enable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.connect()\n this.keyboardAdaptor.addEventListener('trigger', this.onKey)\n }\n this.cameraRig.addEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.addEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.addEventListener('CameraMoveEnd', this.onCameraEnd)\n this.enabled = true\n }\n\n disable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.disconnect()\n this.keyboardAdaptor.removeEventListener('trigger', this.onKey)\n }\n this.cameraRig.removeEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.removeEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.removeEventListener('CameraMoveEnd', this.onCameraEnd)\n this.enabled = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n private updatePois(progress: number): void {\n this.dispatchEvent({\n type: 'update',\n currentIndex: this.currentIndex,\n upcomingIndex: this.upcomingIndex,\n progress,\n } as UpdatePOIsEvent)\n }\n\n private onCameraStart(): void {\n this.updatePois(0)\n }\n\n private onCameraUpdate(event): void {\n this.updatePois(event.progress)\n }\n\n private onCameraEnd(): void {\n this.currentIndex = this.upcomingIndex\n this.upcomingIndex = null\n }\n\n private onKey(event): void {\n if (event.trigger === 'next') {\n this.nextPOI()\n } else if (event.trigger === 'prev') {\n this.prevPOI()\n }\n }\n}\n","import { EventDispatcher } from 'three'\nimport { BaseControls, UpdatePOIsEvent, ExitPOIsEvent } from './BaseControls'\nimport { CameraRig } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\nimport { SwipeAdaptor } from '../adaptors/SwipeAdaptor'\n\nexport interface PathPointMarker {\n frame: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#PathPointsControls} constructor\n */\nexport interface PathPointsControlsProps {\n /** Threshold of wheel delta that triggers a transition. Defaults to 15 */\n wheelThreshold?: number\n /** Threshold of swipe distance that triggers a transition. Defaults to 60 */\n swipeThreshold?: number\n /** Transition duration, defaults to 1 */\n duration?: number\n /** Transition easing, defaults to power1 */\n ease?: string\n /** Use keyboard arrow keys as navigation, defaults to true */\n useKeyboard?: boolean\n}\n\nconst defaultProps: PathPointsControlsProps = {\n wheelThreshold: 15,\n swipeThreshold: 60,\n duration: 1,\n ease: 'power1',\n useKeyboard: true,\n}\n\n/**\n * Control scheme to transition the camera between specific points (frames) along a path specified through an `AnimationClip`.\n * @remarks\n * Control scheme to transition the camera between specific points (frames) along a path specified through an `AnimationClip`.\n * A mouse wheel or swipe or keyboard arrow event triggers the camera to smoothly transition from one given frame number to the next.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#PathPointsControlsProps} for all properties that can be passed to the constructor.\n *\n * See {@link three-story-controls#PathPointMarker} for POI properties.\n *\n * See {@link three-story-controls#UpdatePOIsEvent} and {@link three-story-controls#ExitPOIsEvent} for emitted event signatures.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/path-points/ | DEMO }\n * @example\n * ```js\n *\n * const pois = [ { frame: 0 }, { frame: 54 } ....]\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * let camera, cameraRig, controls\n *\n * gltfLoader.load(cameraPath, (gltf) => {\n * camera = gltf.cameras[0]\n * cameraRig = new CameraRig(camera, scene)\n * cameraRig.setAnimationClip(gltf.animations[0])\n * cameraRig.setAnimationTime(0)\n * controls = new PathPointsControls(cameraRig, pois)\n * controls.enable()\n * controls.addEventListener('ExitPOIs', (e) => {\n * // e.exitFrom will be either 'start' or 'end'\n * })\n * controls.addEventListener('update', (e) => {\n * // e.currentIndex will be the index of the starting poi\n * // e.upcomingIndex will be the index of the upcoming poi\n * // e.progress will be a number 0-1 indicating progress of the transition\n * })\n * })\n * ```\n */\nexport class PathPointsControls extends EventDispatcher implements BaseControls {\n readonly cameraRig: CameraRig\n private wheelAdaptor: WheelAdaptor\n private swipeAdaptor: SwipeAdaptor\n private keyboardAdaptor: KeyboardAdaptor\n private pois: PathPointMarker[]\n private currentIndex = 0\n private upcomingIndex: number | null = null\n private enabled = false\n private duration: number\n private ease: string\n private wheelThreshold: number\n private swipeThreshold: number\n private useKeyboard: boolean\n\n constructor(cameraRig: CameraRig, pois: PathPointMarker[] = [], props: PathPointsControlsProps = {}) {\n super()\n this.cameraRig = cameraRig\n this.pois = pois\n Object.assign(this, defaultProps, props)\n this.wheelAdaptor = new WheelAdaptor({ type: 'discrete', thresholdY: this.wheelThreshold })\n this.swipeAdaptor = new SwipeAdaptor({ thresholdY: this.swipeThreshold })\n if (this.useKeyboard) {\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'discrete',\n keyMapping: {\n next: ['ArrowDown', 'ArrowRight'],\n prev: ['ArrowUp', 'ArrowLeft'],\n },\n })\n this.onKey = this.onKey.bind(this)\n }\n this.onCameraStart = this.onCameraStart.bind(this)\n this.onCameraUpdate = this.onCameraUpdate.bind(this)\n this.onCameraEnd = this.onCameraEnd.bind(this)\n this.onTrigger = this.onTrigger.bind(this)\n }\n\n getCurrentIndex(): number {\n return this.currentIndex\n }\n\n enable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.addEventListener('trigger', this.onKey)\n this.keyboardAdaptor.connect()\n }\n this.wheelAdaptor.addEventListener('trigger', this.onTrigger)\n this.swipeAdaptor.addEventListener('trigger', this.onTrigger)\n this.cameraRig.addEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.addEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.addEventListener('CameraMoveEnd', this.onCameraEnd)\n this.wheelAdaptor.connect()\n this.swipeAdaptor.connect()\n this.enabled = true\n }\n\n disable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.removeEventListener('trigger', this.onKey)\n this.keyboardAdaptor.disconnect()\n }\n this.wheelAdaptor.removeEventListener('trigger', this.onTrigger)\n this.swipeAdaptor.removeEventListener('trigger', this.onTrigger)\n this.cameraRig.removeEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.removeEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.removeEventListener('CameraMoveEnd', this.onCameraEnd)\n this.wheelAdaptor.disconnect()\n this.swipeAdaptor.disconnect()\n this.enabled = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n private onKey(event): void {\n switch (event.trigger) {\n case 'prev':\n this.onTrigger({ y: -1 })\n break\n case 'next':\n this.onTrigger({ y: 1 })\n break\n default:\n break\n }\n }\n\n private onTrigger(event): void {\n const index = this.currentIndex + event.y\n if (index >= this.pois.length) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'end',\n } as ExitPOIsEvent)\n } else if (index < 0) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'start',\n } as ExitPOIsEvent)\n } else {\n this.upcomingIndex = index\n this.cameraRig.flyToKeyframe(this.pois[this.upcomingIndex].frame, this.duration, this.ease)\n }\n }\n\n private updatePois(progress: number): void {\n this.dispatchEvent({\n type: 'update',\n currentIndex: this.currentIndex,\n upcomingIndex: this.upcomingIndex,\n progress,\n } as UpdatePOIsEvent)\n }\n\n private onCameraStart(): void {\n this.updatePois(0)\n }\n\n private onCameraUpdate(event): void {\n this.updatePois(event.progress)\n }\n\n private onCameraEnd(): void {\n this.currentIndex = this.upcomingIndex\n this.upcomingIndex = null\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction, RigComponent } from '../CameraRig'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ThreeDOFControls} constructor\n */\n//TODO: add option for relative or absolute control (in terms of screen space)\nexport interface ThreeDOFControlsProps {\n /** DOM element that should listen for pointer events. Defaults to `document.body` */\n domElement?: HTMLElement\n /** Mutiplier for panning. Defaults to Math.PI / 20 */\n panFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 20 */\n tiltFactor?: number\n /** Mutiplier for truck translation. Defaults to 1 */\n truckFactor?: number\n /** Mutiplier for pedestal translation. Defaults to 1 */\n pedestalFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.7 */\n dampingFactor?: number\n}\n\nconst defaultProps: ThreeDOFControlsProps = {\n domElement: document.body,\n panFactor: Math.PI / 20,\n tiltFactor: Math.PI / 20,\n truckFactor: 1,\n pedestalFactor: 1,\n dampingFactor: 0.7,\n}\n\n/**\n * Control scheme for slight rotation and translation movement in response to mouse movements (designed to be used in conjunction with other control schemes)\n * @remarks\n * Note: CSS property `touch-action: none` will probably be needed on listener element\n *\n * See {@link three-story-controls#ThreeDOFControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/story-points/ | DEMO w/ story points }\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/scroll-controls/ | DEMO w/ scroll controls}\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new ThreeDOFControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n */\nexport class ThreeDOFControls implements BaseControls {\n readonly cameraRig: CameraRig\n private pointerAdaptor: PointerAdaptor\n private enabled = false\n private panFactor: number\n private tiltFactor: number\n private truckFactor: number\n private pedestalFactor: number\n\n constructor(cameraRig: CameraRig, props: ThreeDOFControlsProps = {}) {\n this.cameraRig = cameraRig\n Object.assign(this, defaultProps, props)\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.dampingFactor || defaultProps.dampingFactor,\n })\n this.onPointerMove = this.onPointerMove.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.pointerAdaptor.connect()\n this.pointerAdaptor.addEventListener('update', this.onPointerMove)\n this.enabled = true\n }\n\n disable(): void {\n this.pointerAdaptor.disconnect()\n this.pointerAdaptor.removeEventListener('update', this.onPointerMove)\n this.enabled = false\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.pointerAdaptor.update(time)\n }\n }\n\n private onPointerMove(event): void {\n if (event.pointerCount === 0) {\n this.cameraRig.do(CameraAction.Pan, -event.deltas.x * this.panFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Tilt, -event.deltas.y * this.tiltFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.truckFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Pedestal, event.deltas.y * this.pedestalFactor, RigComponent.Eyes)\n }\n }\n}\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { Quaternion, Vector3, AnimationClip, VectorKeyframeTrack, QuaternionKeyframeTrack } from 'three'\nimport gsap from 'gsap'\nimport { CameraRig } from '../CameraRig'\nimport { FreeMovementControls } from '../controlschemes/FreeMovementControls'\nimport './index.css'\n\nconst easeFunctions = ['none', 'power1', 'power2', 'power3', 'power4', 'sine', 'expo', 'circ']\n\ninterface POI {\n position: Vector3\n quaternion: Quaternion\n duration: number\n ease: string\n image: string\n}\n\nconst DOMClass = {\n visit: 'visit',\n remove: 'remove',\n duration: 'duration',\n ease: 'ease',\n moveUp: 'move-up',\n moveDown: 'move-down',\n}\n\n/**\n * A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene\n *\n * @remarks\n * A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene.\n *\n * The `CameraHelper` can be set up with any scene along with {@link three-story-controls#FreeMovementControls | FreeMovementControls}.\n *\n * It renders as an overlay with functionality to add/remove/reorders points of interest, and create an animation path between them.\n * Each saved camera position is displayed with an image on the `CameraHelper` panel.\n *\n * The data can be exported as a JSON file that can then be used with different control schemes.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/camera-helper | DEMO }\n *\n * @example\n * Here's an example of initializing the CameraHelper\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementControls(cameraRig)\n *\n * controls.enable()\n *\n * const cameraHelper = new CameraHelper(rig, controls, renderer.domElement)\n *\n * // Render loop\n * // To allow for capturing an image of the canvas,\n * // it's important to update the CameraHelper after the scene is rendered,\n * // but before requesting the animation frame\n * function render(t) {\n * controls.update(t)\n * renderer.render(scene, camera)\n * cameraHelper.update(t)\n * window.requestAnimationFrame(render)\n * }\n *\n * render()\n * ```\n *\n *\n *\n * The following examples demonstrate using the exported data. Note: Depending on your setup, you may need to change the .json extension to .js and prepend the text with `export default` such that you can import it as javascript\n *\n * @example\n * Here's an example using the exported JSON data with ScrollControls.\n * ```javascript\n * import * as cameraData from 'camera-control.json'\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n *\n * // Parse the JSON animation clip\n * cameraRig.setAnimationClip(AnimationClip.parse(cameraData.animationClip))\n * cameraRig.setAnimationTime(0)\n *\n * const controls = new ScrollControls(cameraRig, {\n * scrollElement: document.querySelector('.scroller'),\n * })\n *\n * controls.enable()\n *\n * function render(t) {\n * window.requestAnimationFrame(render)\n * if (rig.hasAnimation) {\n * controls.update(t)\n * }\n * renderer.render(scene, camera)\n * }\n * ```\n *\n * @example\n * Here's an example using the exported data with Story Point controls\n * ```javascript\n * import * as cameraData from 'camera-control.json'\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n *\n * // Format the exported data to create three.js Vector and Quaternions\n * const pois = cameraData.pois.map((poi, i) => {\n * return {\n * position: new Vector3(...poi.position),\n * quaternion: new Quaternion(...poi.quaternion),\n * duration: poi.duration,\n * ease: poi.ease,\n * }\n * })\n *\n * const controls = new StoryPointsControls(rig, pois)\n * controls.enable()\n *\n * function render(t) {\n * window.requestAnimationFrame(render)\n * controls.update(t)\n * renderer.render(scene, camera)\n * }\n * ```\n */\nexport class CameraHelper {\n readonly rig: CameraRig\n readonly controls: FreeMovementControls\n readonly canvas: HTMLCanvasElement\n private pois: POI[]\n private currentIndex: number | null\n private drawer: HTMLElement\n private domList: HTMLElement\n private collapseBtn: HTMLElement\n private fileInput: HTMLInputElement\n private btnImport: HTMLElement\n private doCapture: boolean\n private animationClip: AnimationClip\n private isPlaying: boolean\n private playStartTime: number\n private useSlerp = true\n\n constructor(rig: CameraRig, controls: FreeMovementControls, canvas: HTMLCanvasElement, canvasParent?: HTMLElement) {\n this.rig = rig\n this.controls = controls\n this.canvas = canvas\n this.pois = []\n this.currentIndex = null\n this.doCapture = false\n this.isPlaying = false\n this.initUI(canvasParent)\n }\n\n private capture(): void {\n this.doCapture = true\n }\n\n update(time: number): void {\n if (this.doCapture) {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n canvas.width = 640\n canvas.height = 360\n ctx.drawImage(this.canvas, 0, 0, canvas.width, canvas.height)\n const image = canvas.toDataURL()\n\n this.addPoi(image)\n this.doCapture = false\n }\n if (this.isPlaying) {\n if (!this.playStartTime) {\n this.playStartTime = time\n this.controls.disable()\n this.rig.packTransform()\n }\n const t = (time - this.playStartTime) / 1000\n this.rig.setAnimationTime(t)\n if (t > this.animationClip.duration) {\n this.isPlaying = false\n this.playStartTime = null\n this.controls.enable()\n this.rig.unpackTransform()\n }\n }\n }\n\n private addPoi(image: string): void {\n this.pois.push({\n ...this.rig.getWorldCoordinates(),\n duration: 1,\n ease: 'power1',\n image,\n })\n this.currentIndex = this.pois.length - 1\n this.createClip()\n this.render()\n }\n\n private updatePoi(index: number, props: Partial): void {\n this.pois[index] = {\n ...this.pois[index],\n ...props,\n }\n }\n\n private movePoi(index: number, direction: number): void {\n if (index + direction >= 0 && index + direction < this.pois.length) {\n const temp = this.pois[index]\n this.pois[index] = this.pois[index + direction]\n this.pois[index + direction] = temp\n this.render()\n }\n }\n\n private removePoi(index: number): void {\n this.pois.splice(index, 1)\n this.render()\n }\n\n private goToPoi(index: number): void {\n const poi = this.pois[index]\n this.rig.flyTo(poi.position, poi.quaternion, poi.duration, poi.ease, this.useSlerp)\n }\n\n private createClip(): void {\n if (this.pois.length > 0) {\n const times = []\n const positionValues = []\n const quaternionValues = []\n const tmpPosition = new Vector3()\n const tmpQuaternion = new Quaternion()\n const framesPerPoi = 10\n\n let tweenStartTime = 0\n\n // transform imported arrays to quaternions and vector3 when loading a camera file\n if (!this.pois[0].quaternion.isQuaternion && !this.pois[0].position.isVector3) {\n for (let i = 0; i < this.pois.length; i++) {\n const p = this.pois[i]\n p.quaternion = new Quaternion(p.quaternion[0], p.quaternion[1], p.quaternion[2], p.quaternion[3])\n p.position = new Vector3(p.position[0], p.position[1], p.position[2])\n }\n }\n\n for (let i = 0; i < this.pois.length - 1; i++) {\n const p1 = this.pois[i]\n const p2 = this.pois[i + 1]\n\n const values = {\n px: p1.position.x,\n py: p1.position.y,\n pz: p1.position.z,\n qx: p1.quaternion.x,\n qy: p1.quaternion.y,\n qz: p1.quaternion.z,\n qw: p1.quaternion.w,\n slerpAmount: 0,\n }\n\n const target = {\n px: p2.position.x,\n py: p2.position.y,\n pz: p2.position.z,\n qx: p2.quaternion.x,\n qy: p2.quaternion.y,\n qz: p2.quaternion.z,\n qw: p2.quaternion.w,\n slerpAmount: 1,\n duration: p2.duration,\n ease: p2.ease,\n }\n\n const tween = gsap.to(values, target)\n\n for (let j = 0; j < framesPerPoi; j++) {\n const lerpAmount = p2.duration * (j / framesPerPoi)\n times.push(tweenStartTime + lerpAmount)\n tween.seek(lerpAmount)\n if (this.useSlerp) {\n tmpQuaternion.slerpQuaternions(p1.quaternion, p2.quaternion, values.slerpAmount)\n } else {\n tmpQuaternion.set(values.qx, values.qy, values.qz, values.qw)\n }\n tmpPosition.set(values.px, values.py, values.pz)\n tmpQuaternion.toArray(quaternionValues, quaternionValues.length)\n tmpPosition.toArray(positionValues, positionValues.length)\n }\n tweenStartTime += p2.duration\n }\n // add last point\n const last = this.pois[this.pois.length - 1]\n last.quaternion.toArray(quaternionValues, quaternionValues.length)\n last.position.toArray(positionValues, positionValues.length)\n times.push(tweenStartTime)\n this.animationClip = new AnimationClip(null, tweenStartTime, [\n new VectorKeyframeTrack('Translation.position', times, positionValues),\n new QuaternionKeyframeTrack('Rotation.quaternion', times, quaternionValues),\n ])\n this.rig.setAnimationClip(this.animationClip)\n }\n }\n\n private scrubClip(amount: number): void {\n if (this.pois.length > 0) {\n this.rig.setAnimationPercentage(amount)\n }\n }\n\n private playClip(): void {\n if (this.pois.length > 0) {\n this.isPlaying = true\n }\n }\n\n private import(): void {\n if (this.fileInput) {\n this.fileInput.click()\n const reader = new FileReader()\n\n this.fileInput.onchange = () => {\n reader.readAsText(this.fileInput.files[0])\n reader.onload = (e) => {\n const parsed = JSON.parse(e.target.result)\n this.pois = parsed.pois\n this.animationClip = parsed.animationClip\n this.createClip()\n this.render()\n }\n }\n }\n }\n\n private export({ draft }): void {\n if (this.pois.length > 0) {\n const jsondata = {} as any\n jsondata.pois = this.pois.map((poi) => {\n const position = [poi.position.x, poi.position.y, poi.position.z]\n const quaternion = [poi.quaternion.x, poi.quaternion.y, poi.quaternion.z, poi.quaternion.w]\n const obj = {\n position,\n quaternion,\n duration: poi.duration,\n ease: poi.ease,\n } as any\n\n if (draft) {\n obj.image = poi.image\n }\n\n return obj\n })\n if (this.animationClip) {\n jsondata.animationClip = AnimationClip.toJSON(this.animationClip)\n }\n const data = 'text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(jsondata))\n const a = document.createElement('a')\n a.href = 'data:' + data\n a.download = `camera-data${draft ? '-draft' : ''}.json`\n document.body.appendChild(a)\n a.click()\n a.remove()\n }\n }\n\n private exportImages(): void {\n const link = document.createElement('a')\n document.body.appendChild(link)\n this.pois.forEach((poi, index) => {\n link.href = poi.image\n link.download = `camera-poi-${index}.png`\n link.click()\n })\n link.remove()\n }\n\n // ui\n\n private initUI(canvasParent?: HTMLElement): void {\n this.drawer = document.createElement('div')\n this.drawer.classList.add('tb-ch')\n\n const btnAdd = document.createElement('button')\n btnAdd.classList.add('btn-round', 'add')\n btnAdd.innerText = '+'\n btnAdd.onclick = this.capture.bind(this)\n\n this.collapseBtn = document.createElement('button')\n this.collapseBtn.classList.add('btn-round', 'collapse')\n this.collapseBtn.innerText = '<'\n this.collapseBtn.onclick = this.collapse.bind(this)\n\n const controlWrapper = document.createElement('div')\n controlWrapper.classList.add('controls')\n\n this.fileInput = document.createElement('input')\n this.fileInput.type = 'file'\n this.fileInput.id = 'import'\n this.fileInput.accept = 'application/json'\n this.fileInput.style.display = 'none'\n\n this.btnImport = document.createElement('button')\n this.btnImport.classList.add('btn-text', 'import')\n this.btnImport.innerText = 'import draft JSON'\n this.btnImport.onclick = this.import.bind(this)\n\n const btnExportImages = document.createElement('button')\n btnExportImages.classList.add('btn-text', 'export')\n btnExportImages.innerText = 'export draft JSON'\n btnExportImages.onclick = this.export.bind(this, { draft: true })\n\n const btnExport = document.createElement('button')\n btnExport.classList.add('btn-text', 'export')\n btnExport.innerText = 'export production JSON'\n btnExport.onclick = this.export.bind(this, { draft: false })\n\n const bntExportImages = document.createElement('button')\n bntExportImages.classList.add('btn-text', 'export-images')\n bntExportImages.innerHTML = 'export images'\n bntExportImages.onclick = this.exportImages.bind(this)\n\n const btnPlay = document.createElement('button')\n btnPlay.classList.add('btn-text', 'play')\n btnPlay.innerText = 'play'\n btnPlay.onclick = this.playClip.bind(this)\n\n const sliderTime: HTMLInputElement = document.createElement('input')\n sliderTime.type = 'range'\n sliderTime.min = '0'\n sliderTime.max = '1000'\n sliderTime.step = '0.1'\n sliderTime.value = '0'\n const updateTime = this.scrubClip.bind(this)\n sliderTime.onmousedown = () => this.rig.packTransform()\n sliderTime.onmouseup = () => this.rig.unpackTransform()\n sliderTime.oninput = (e) => updateTime(parseInt((e.target).value) / 1000)\n\n this.domList = document.createElement('div')\n this.domList.classList.add('pois')\n this.domList.onclick = this.handleEvents.bind(this)\n this.domList.onchange = this.handleEvents.bind(this)\n\n controlWrapper.append(\n this.fileInput,\n this.btnImport,\n btnPlay,\n sliderTime,\n bntExportImages,\n btnExportImages,\n btnExport,\n )\n this.drawer.append(btnAdd, this.collapseBtn, this.domList, controlWrapper)\n\n const parent = canvasParent || document.body\n parent.append(this.drawer)\n }\n\n private handleEvents(event): void {\n const index = event.target.dataset.index\n if (index) {\n if (event.target.classList.contains(DOMClass.visit)) {\n this.goToPoi(parseInt(index))\n } else if (event.target.classList.contains(DOMClass.remove)) {\n this.removePoi(parseInt(index))\n } else if (event.target.classList.contains(DOMClass.duration)) {\n this.updatePoi(parseInt(index), { duration: parseFloat((event.target).value) })\n } else if (event.target.classList.contains(DOMClass.ease)) {\n this.updatePoi(parseInt(index), { ease: (event.target).value })\n } else if (event.target.classList.contains(DOMClass.moveUp)) {\n this.movePoi(parseInt(index), -1)\n } else if (event.target.classList.contains(DOMClass.moveDown)) {\n this.movePoi(parseInt(index), 1)\n }\n this.createClip()\n }\n }\n\n private collapse(): void {\n if (this.drawer.classList.contains('collapsed')) {\n this.drawer.classList.remove('collapsed')\n this.collapseBtn.innerText = '<'\n } else {\n this.drawer.classList.add('collapsed')\n this.collapseBtn.innerText = '>'\n }\n }\n\n private render(): void {\n this.domList.innerHTML = ''\n this.pois.forEach((poi, index) => {\n const div = document.createElement('div')\n div.classList.add('poi')\n\n const textHeading = document.createElement('h2')\n textHeading.innerText = `${index + 1}.`\n\n const wrapper = document.createElement('div')\n wrapper.classList.add('wrapper')\n const controls = document.createElement('div')\n controls.classList.add('poi-controls')\n const params = document.createElement('div')\n params.classList.add('poi-params')\n\n const image = new Image()\n image.src = poi.image\n\n const labelDuration = document.createElement('label')\n labelDuration.innerText = 'Duration'\n const inputDuration = document.createElement('input')\n inputDuration.classList.add(DOMClass.duration)\n inputDuration.dataset.index = `${index}`\n inputDuration.type = 'number'\n inputDuration.value = String(poi.duration)\n\n const labelEase = document.createElement('label')\n labelEase.innerText = 'Easing'\n const selectEase = document.createElement('select')\n selectEase.classList.add(DOMClass.ease)\n selectEase.dataset.index = `${index}`\n const options = easeFunctions.map((x) => {\n const op = document.createElement('option')\n op.innerText = x\n op.value = x\n op.selected = x === poi.ease\n return op\n })\n selectEase.append(...options)\n\n const btnRemove = document.createElement('button')\n btnRemove.classList.add(DOMClass.remove)\n btnRemove.title = 'Remove'\n btnRemove.dataset.index = `${index}`\n btnRemove.innerText = 'x'\n\n const btnVisit = document.createElement('button')\n btnVisit.classList.add(DOMClass.visit)\n btnVisit.title = 'Visit'\n btnVisit.dataset.index = `${index}`\n btnVisit.innerHTML = '→'\n\n const btnMoveUp = document.createElement('button')\n btnMoveUp.classList.add(DOMClass.moveUp)\n btnMoveUp.title = 'Move up'\n btnMoveUp.dataset.index = `${index}`\n btnMoveUp.innerHTML = '↑'\n\n const btnMoveDown = document.createElement('button')\n btnMoveDown.classList.add(DOMClass.moveDown)\n btnMoveDown.title = 'Move down'\n btnMoveDown.dataset.index = `${index}`\n btnMoveDown.innerHTML = '↓'\n\n controls.append(btnRemove, btnVisit, btnMoveUp, btnMoveDown)\n params.append(labelDuration, inputDuration, labelEase, selectEase)\n wrapper.append(image, controls)\n div.append(textHeading, wrapper, params)\n this.domList.appendChild(div)\n })\n }\n}\n"],"names":["defaultProps"],"mappings":";;;AAcA;;;;;;;;;;;;;;;MAgBa,M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AAC,KAAK,EAAE,QAAQ,CAAC,CAAA;YAC/B,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;YACxC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;SAC9B,CAAC,CAAA;KACH;;;;;"} \ No newline at end of file +{"version":3,"file":"three-story-controls.esm.js","sources":["../src/Damper.ts","../src/CameraRig.ts","../src/adaptors/BaseAdaptor.ts","../src/adaptors/KeyboardAdaptor.ts","../src/adaptors/PointerAdaptor.ts","../src/adaptors/ScrollAdaptor.ts","../src/adaptors/SwipeAdaptor.ts","../src/adaptors/WheelAdaptor.ts","../src/controlschemes/FreeMovementControls.ts","../src/controlschemes/FreeMovementPlusControls.ts","../src/controlschemes/ScrollControls.ts","../src/controlschemes/StoryPointsControls.ts","../src/controlschemes/PathPointsControls.ts","../src/controlschemes/ThreeDOFControls.ts","../node_modules/style-inject/dist/style-inject.es.js","../src/camerahelper/index.ts"],"sourcesContent":["export interface DamperValues {\n /** A value to dampen, set to its initial state */\n [key: string]: number | null\n}\n\nexport interface DamperProps {\n /** Values to be dampened */\n values: DamperValues\n /** Multiplier used on each update to approach the target value, should be between 0 and 1, where 1 is no damping */\n dampingFactor: number\n /** Amount of permitted error before a value is considered to have 'reached' its target. Defaults to 0.001 */\n epsilon?: number\n}\n\n/**\n * Damper uses simple linear damping for a given collection of values.\n * On every call to update, the damper will approach a given set of target values.\n * @example\n * ```js\n * const damper = new Damper({\n * values: {x: 0, y: 0},\n * dampingFactor: 0.4\n * })\n *\n * damper.setTarget({ x: 1, y: 100 })\n * damper.update() // would generally be called in an animation loop\n * const values = damper.getCurrentValues() // values.x = 0.4; values.y = 40\n * ```\n */\n\nexport class Damper {\n private dampingFactor: number\n private epsilon = 0.001\n private values: DamperValues = {}\n private targetValues: DamperValues = {}\n private deltaValues: DamperValues = {}\n private hasReached: boolean\n\n constructor(props: DamperProps) {\n Object.assign(this.values, props.values)\n Object.assign(this.targetValues, props.values)\n this.deltaValues = {}\n for (const key in this.values) {\n this.deltaValues[key] = 0\n }\n this.dampingFactor = props.dampingFactor\n if (props.epsilon) this.epsilon = props.epsilon\n this.hasReached = true\n }\n\n /**\n * Update the damper, should generally be called on every frame\n */\n update(): void {\n const deltas = {}\n let approached = true\n\n for (const key in this.values) {\n deltas[key] = this.targetValues[key] - this.values[key]\n approached = approached && Math.abs(deltas[key]) < this.epsilon\n }\n\n if (approached) {\n for (const key in this.values) {\n this.deltaValues[key] = deltas[key]\n this.values[key] = this.targetValues[key]\n }\n this.hasReached = true\n } else {\n for (const key in this.values) {\n this.deltaValues[key] = this.dampingFactor * deltas[key]\n this.values[key] += this.deltaValues[key]\n }\n }\n }\n\n /**\n * Set the target values the damper needs to approach\n * @param target DamperValues the damper needs to approach\n */\n setTarget(target: DamperValues): void {\n for (const key in target) {\n this.targetValues[key] = target[key]\n }\n this.hasReached = false\n }\n\n /**\n * Increment/Decrement a specifc damper target value\n * @param key The key of the value to modify\n * @param value The amount to modify the target by\n */\n addToTarget(key: string, value: number): void {\n this.targetValues[key] += value\n this.hasReached = false\n }\n\n /**\n * Reset all damper values to the fiven number\n * @param value Number to reset all damper values to\n */\n resetAll(value: number): void {\n for (const key in this.values) {\n this.targetValues[key] = value\n this.values[key] = value\n this.deltaValues[key] = 0\n }\n this.hasReached = true\n }\n\n /**\n * Reset damper values as described by the given DamperValues object\n * @param values DamperValues object to reset the damper to\n */\n resetData(values: DamperValues): void {\n for (const key in values) {\n this.targetValues[key] = values[key]\n this.values[key] = values[key]\n this.deltaValues[key] = 0\n }\n this.hasReached = true\n }\n\n /**\n * Get the current values\n * @returns DamperValues object with the current values of the damper\n */\n getCurrentValues(): DamperValues {\n return { ...this.values }\n }\n\n /**\n * Get the change in values since the last update call\n * @returns DamperValues object with the amount the values changed since the last `update()` call\n */\n getDeltaValues(): DamperValues {\n return { ...this.deltaValues }\n }\n\n /**\n * Whether the damper has reached its target\n * @returns Whether the damper has reached its target (within permissible error range)\n */\n reachedTarget(): boolean {\n return this.hasReached\n }\n}\n","import {\n Vector3,\n Quaternion,\n Object3D,\n Camera,\n PerspectiveCamera,\n Scene,\n AnimationMixer,\n AnimationClip,\n EventDispatcher,\n Euler,\n} from 'three'\n\nimport gsap from 'gsap'\n\n/**\n * Event: Fired when CameraRig starts a transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveStart', handlerFunction)\n * ```\n * */\nexport interface CameraMoveStartEvent {\n type: 'CameraMoveStart'\n}\n\n/**\n * Event: Fired on every tick of CameraRig's transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveUpdate', handlerFunction)\n * ```\n * */\nexport interface CameraMoveUpdateEvent {\n type: 'CameraMoveUpdate'\n /** Percentage of transition completed, between 0 and 1. */\n progress: number\n}\n\n/**\n * Event: Fired when CameraRig ends a transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveEnd', handlerFunction)\n * ```\n * */\nexport interface CameraMoveEndEvent {\n type: 'CameraMoveEnd'\n}\n\n/**\n * Enum of camera actions used to control a {@link three-story-controls#CameraRig}\n */\nexport enum CameraAction {\n Pan = 'Pan',\n Tilt = 'Tilt',\n Roll = 'Roll',\n Truck = 'Truck',\n Pedestal = 'Pedestal',\n Dolly = 'Dolly',\n Zoom = 'Zoom',\n}\n\n/**\n * Enum of {@link three-story-controls#CameraRig} parts\n */\nexport enum RigComponent {\n Body = 'body',\n Head = 'head',\n Eyes = 'eyes',\n}\n\n/**\n * Enum of axes\n */\nexport enum Axis {\n X = 'x',\n Y = 'y',\n Z = 'z',\n}\n\n/**\n * Describe whether rig should translate along current rotation in each action axis\n */\nexport interface TranslateGuide {\n [CameraAction.Pan]: boolean\n [CameraAction.Tilt]: boolean\n [CameraAction.Roll]: boolean\n}\n\n/**\n * Mapping of rotation action to axis\n */\nexport interface ActionAxes {\n [CameraAction.Pan]: Axis\n [CameraAction.Tilt]: Axis\n [CameraAction.Roll]: Axis\n}\n\nconst AxisVector = {\n [Axis.X]: new Vector3(1, 0, 0),\n [Axis.Y]: new Vector3(0, 1, 0),\n [Axis.Z]: new Vector3(0, 0, 1),\n}\n\nconst ActionMappingByUpAxis = {\n [Axis.X]: {\n [CameraAction.Pan]: Axis.X,\n [CameraAction.Tilt]: Axis.Z,\n [CameraAction.Roll]: Axis.Y,\n },\n [Axis.Y]: {\n [CameraAction.Pan]: Axis.Y,\n [CameraAction.Tilt]: Axis.X,\n [CameraAction.Roll]: Axis.Z,\n },\n [Axis.Z]: {\n [CameraAction.Pan]: Axis.Z,\n [CameraAction.Tilt]: Axis.Y,\n [CameraAction.Roll]: Axis.X,\n },\n}\n\n/**\n * The CameraRig holds the camera, and can respond to {@link three-story-controls#CameraAction}s such as Pan/Tilt/Dolly etc. It can also be controlled along a given path (in the form of an `AnimationClip`), or tweened to specified points.\n *\n * @remarks\n * The rig is constructed of three objects, analagous to a body, head and eyes. The camera is nested in the eyes and is never transformed directly.\n *\n * Instead of specifying the axis to rotate/translate the camera, {@link three-story-controls#CameraAction}s are used. The rotation order of actions is always `Pan` then `Tilt` then `Roll`.\n * The mapping of these actions to axes depends on the up axis, which defaults to `Y` (but can be changed with the {@link CameraRig.setUpAxis | setUpAxis() method}):\n *\n * * `CameraAction.Pan` rotates around the `Y` axis\n *\n * * `CameraAction.Tilt` rotates around the `X` axis\n *\n * * `CameraAction.Roll` rotates around the `Z` axis\n *\n * * `CameraAction.Dolly` translates on the `Z` axis\n *\n * * `CameraAction.Truck` translates on the `X` axis\n *\n * * `CameraAction.Pedestal` translates on the `Y` axis\n *\n * Translations will be applied to the 'body' of the rig, and rotations to the 'eyes'. If an animation clip is provided, or the camera is tweened to a specific location,\n * the rotations will be applied to the 'head', thus leaving the 'eyes' free to 'look around' from this base position.\n *\n * Additionally, the default setup assumes that the rig will move forward/backward (`Dolly`) in the direction the camera is panned to.\n * This can be configured through {@link CameraRig.translateAlong | translateAlong property}.\n * It can also be overwritten by providing the component name to the {@link CameraRig.do | do() method}, see {@link https://github.com/nytimes/three-story-controls/blob/main/src/controlschemes/ThreeDOFControls.ts#L96 | ThreeDOFControls implementation} for an example.\n *\n * To move the rig along a specified path, use the {@link CameraRig.setAnimationClip | setAnimationClip() method},\n * and set the names for the `Translation` and `Rotation` objects to match those of the clip. The clip should have a `VectorKeyframeTrack` for the outer position/translation object,\n * and a `QuaternionKeyframeTrack` for the inner orientation/rotation object.\n *\n * See {@link three-story-controls#CameraMoveStartEvent}, {@link three-story-controls#CameraMoveUpdateEvent} and {@link three-story-controls#CameraMoveEndEvent} for emitted event signatures.\n */\nexport class CameraRig extends EventDispatcher {\n readonly camera: Camera\n readonly scene: Scene\n private body: Object3D\n private head: Object3D\n private eyes: Object3D\n private cameraIsInRig: boolean\n private inTransit = false\n private upAxis: Axis = Axis.Y\n private actionAxes: ActionAxes = ActionMappingByUpAxis[this.upAxis]\n private hasAnimation = false\n private animationClip: AnimationClip\n private mixer: AnimationMixer\n private animationTranslationObjectName = 'Translation'\n private animationRotationObjectName = 'Rotation'\n\n public translateAlong: TranslateGuide = {\n [CameraAction.Tilt]: false,\n [CameraAction.Pan]: true,\n [CameraAction.Roll]: false,\n }\n\n // Constructor\n constructor(camera: Camera, scene: Scene) {\n super()\n this.camera = camera\n this.scene = scene\n this.body = new Object3D()\n this.head = new Object3D()\n this.eyes = new Object3D()\n this.head.name = this.animationRotationObjectName\n this.body.name = this.animationTranslationObjectName\n this.body.rotation.order = this.getRotationOrder()\n this.head.rotation.order = this.getRotationOrder()\n this.eyes.rotation.order = this.getRotationOrder()\n this.scene.add(this.body.add(this.head.add(this.eyes.add(this.camera))))\n this.cameraIsInRig = true\n this.unpackTransform()\n }\n\n /**\n * Get the axis for a given action\n * @param action\n * @returns x | y | z\n */\n getAxisFor(action: CameraAction): string {\n return this.actionAxes[action]\n }\n\n /**\n * Get the axis' vector for a given action\n * @param action\n * @returns Normalized vector for the axis\n */\n getAxisVectorFor(action: CameraAction): Vector3 {\n return AxisVector[this.actionAxes[action]]\n }\n\n /**\n * Main method for controlling the camera\n * @param action - Action to perform\n * @param amount - Amount to move/rotate/etc\n * @param rigComponent - Override the default component to perform the action on\n */\n do(action: CameraAction, amount: number, rigComponent?: RigComponent): void {\n const targetComponent = this[rigComponent]\n\n switch (action) {\n case CameraAction.Pan:\n case CameraAction.Tilt:\n case CameraAction.Roll: {\n const axis = this.getAxisVectorFor(action)\n if (targetComponent) {\n targetComponent.rotateOnAxis(axis, amount)\n } else if (this.translateAlong[action]) {\n this.body.rotateOnAxis(axis, amount)\n } else {\n this.eyes.rotateOnAxis(axis, amount)\n }\n break\n }\n\n case CameraAction.Truck: {\n const axis = this.getAxisVectorFor(CameraAction.Tilt)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Pedestal: {\n const axis = this.getAxisVectorFor(CameraAction.Pan)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Dolly: {\n const axis = this.getAxisVectorFor(CameraAction.Roll)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Zoom: {\n if (this.camera instanceof PerspectiveCamera) {\n this.camera.fov = amount\n this.camera.updateProjectionMatrix()\n }\n break\n }\n\n default:\n break\n }\n }\n\n /**\n * Get world position and orientation of the camera\n */\n getWorldCoordinates(): { position: Vector3; quaternion: Quaternion } {\n const position = new Vector3()\n this.camera.getWorldPosition(position)\n const quaternion = new Quaternion()\n this.camera.getWorldQuaternion(quaternion)\n return { position, quaternion }\n }\n\n /**\n * Sets world coordinates for the camera, and configures rig component transforms accordingly.\n * @param param0\n */\n setWorldCoordinates({ position, quaternion }: { position: Vector3; quaternion: Quaternion }): void {\n const currentRotation = new Euler().setFromQuaternion(quaternion, this.getRotationOrder())\n const actions = [CameraAction.Pan, CameraAction.Tilt, CameraAction.Roll]\n this.eyes.position.set(0, 0, 0)\n this.eyes.rotation.set(0, 0, 0)\n this.head.position.set(0, 0, 0)\n this.head.rotation.set(0, 0, 0)\n this.body.position.copy(position)\n actions.forEach((action) => {\n const axis = this.getAxisFor(action)\n if (this.translateAlong[action]) {\n this.body.rotation[axis] = currentRotation[axis]\n } else {\n this.eyes.rotation[axis] = currentRotation[axis]\n }\n })\n this.camera.rotation.set(0, 0, 0)\n this.camera.position.set(0, 0, 0)\n }\n\n /**\n * Packs transfrom into the body and head, and 0s out transforms of the eyes. Useful for preparing the\n * rig for control through an animation clip.\n */\n packTransform(): void {\n const { position, quaternion } = this.getWorldCoordinates()\n this.body.position.copy(position)\n this.body.rotation.set(0, 0, 0)\n this.head.quaternion.copy(quaternion)\n this.head.position.set(0, 0, 0)\n this.eyes.position.set(0, 0, 0)\n this.eyes.rotation.set(0, 0, 0)\n }\n\n /**\n * Unpacks the current camera world coordinates and distributes transforms\n * across the rig componenets.\n */\n unpackTransform(): void {\n const { position, quaternion } = this.getWorldCoordinates()\n this.setWorldCoordinates({ position, quaternion })\n }\n\n /**\n * Disassemble the camera from the rig and attach it to the scene.\n */\n disassemble(): void {\n if (this.cameraIsInRig) {\n this.scene.attach(this.camera)\n this.cameraIsInRig = false\n }\n }\n\n /**\n * Place the camera back in the rig\n */\n assemble(): void {\n if (!this.cameraIsInRig) {\n this.eyes.attach(this.camera)\n this.unpackTransform()\n this.cameraIsInRig = true\n }\n }\n\n /**\n * Get the rotation order as a string compatible with what three.js uses\n */\n getRotationOrder(): string {\n return Object.values(this.actionAxes).join('').toUpperCase()\n }\n\n /**\n * Whether the camera is currently attached to the rig\n */\n isInRig(): boolean {\n return this.cameraIsInRig\n }\n\n /**\n * If the camera is in the middle of a transition\n */\n isMoving(): boolean {\n return this.inTransit\n }\n\n /**\n * Set the up axis for the camera\n * @param axis - New Up axis\n */\n setUpAxis(axis: Axis): void {\n this.upAxis = axis\n this.actionAxes = ActionMappingByUpAxis[this.upAxis]\n this.body.rotation.order = this.getRotationOrder()\n }\n\n /**\n * Set an animation clip for the rig\n * @param {AnimationClip} clip - AnimationClip containing a VectorKeyFrameTrack for position and a QuaternionKeyFrameTrack for rotation\n * @param {string} translationObjectName - Name of translation object\n * @param {string} rotationObjectName - Name of rotation object\n */\n setAnimationClip(clip: AnimationClip, translationObjectName?: string, rotationObjectName?: string): void {\n this.animationClip = clip\n if (translationObjectName) this.animationTranslationObjectName = translationObjectName\n if (rotationObjectName) this.animationRotationObjectName = rotationObjectName\n this.hasAnimation = true\n // hack. threejs skips last frame when seek time = clip duration\n this.animationClip.duration += 0.01\n this.mixer = new AnimationMixer(this.body)\n const action = this.mixer.clipAction(this.animationClip)\n action.clampWhenFinished = true\n action.play()\n }\n\n /**\n * Transition to a specific position and orientation in world space.\n * Transform on eyes will be reset to 0 as a result of this.\n * @param position\n * @param quaternion\n * @param duration\n * @param ease\n * @param useSlerp\n */\n flyTo(position: Vector3, quaternion: Quaternion, duration = 1, ease = 'power1', useSlerp = true): void {\n if (!this.isMoving()) {\n const currentCoords = this.getWorldCoordinates()\n const currentValues = {\n px: currentCoords.position.x,\n py: currentCoords.position.y,\n pz: currentCoords.position.z,\n qx: currentCoords.quaternion.x,\n qy: currentCoords.quaternion.y,\n qz: currentCoords.quaternion.z,\n qw: currentCoords.quaternion.w,\n slerpAmt: 0,\n }\n const targetValues = {\n px: position.x,\n py: position.y,\n pz: position.z,\n qx: quaternion.x,\n qy: quaternion.y,\n qz: quaternion.z,\n qw: quaternion.w,\n slerpAmt: 1,\n }\n const tempQuaternion = new Quaternion()\n const startQuaternion = new Quaternion(currentValues.qx, currentValues.qy, currentValues.qz, currentValues.qw)\n const onStart = (): void => {\n this.inTransit = true\n this.packTransform()\n this.dispatchEvent({ type: 'CameraMoveStart' } as CameraMoveStartEvent)\n }\n const onUpdate = (tween): void => {\n this.body.position.set(currentValues.px, currentValues.py, currentValues.pz)\n if (useSlerp) {\n tempQuaternion.slerpQuaternions(startQuaternion, quaternion, currentValues.slerpAmt)\n this.head.setRotationFromQuaternion(tempQuaternion)\n } else {\n this.head.quaternion.set(currentValues.qx, currentValues.qy, currentValues.qz, currentValues.qw)\n }\n this.dispatchEvent({\n type: 'CameraMoveUpdate',\n progress: tween.progress(),\n } as CameraMoveUpdateEvent)\n }\n const onComplete = (): void => {\n this.inTransit = false\n this.unpackTransform()\n this.dispatchEvent({ type: 'CameraMoveEnd' } as CameraMoveEndEvent)\n }\n gsap.to(currentValues, {\n duration,\n ease,\n ...targetValues,\n onStart,\n onUpdate: function () {\n onUpdate(this)\n },\n onComplete,\n })\n }\n }\n\n /**\n * Transition to a specific keyframe on the animation clip\n * Transform on eyes will be reset to 0 as a result of this.\n * @param frame - frame\n * @param duration - duration\n * @param ease - ease\n */\n flyToKeyframe(frame: number, duration = 1, ease = 'power1'): void {\n if (this.hasAnimation && !this.isMoving()) {\n const currentValues = {\n time: this.mixer.time,\n }\n const targetValues = {\n time: this.animationClip.tracks[0].times[frame],\n }\n const onStart = (): void => {\n this.inTransit = true\n this.dispatchEvent({ type: 'CameraMoveStart' } as CameraMoveStartEvent)\n }\n const onUpdate = (tween): void => {\n this.mixer.setTime(currentValues.time)\n this.dispatchEvent({\n type: 'CameraMoveUpdate',\n progress: tween.progress(),\n } as CameraMoveUpdateEvent)\n }\n const onComplete = (): void => {\n this.inTransit = false\n this.dispatchEvent({ type: 'CameraMoveEnd' } as CameraMoveEndEvent)\n }\n gsap.to(currentValues, {\n duration,\n ease,\n ...targetValues,\n onStart,\n onUpdate: function () {\n onUpdate(this)\n },\n onComplete,\n })\n }\n }\n\n /**\n * @param percentage - percentage of animation clip to move to, between 0 and 1\n */\n setAnimationPercentage(percentage: number): void {\n if (this.hasAnimation) {\n const percent = Math.max(\n 0,\n Math.min(percentage * this.animationClip.duration, this.animationClip.duration - 0.0001),\n )\n this.mixer.setTime(percent)\n }\n }\n\n /**\n * @param time - timestamp of animation clip to move to\n */\n setAnimationTime(time: number): void {\n if (this.hasAnimation) this.mixer.setTime(time)\n }\n\n /**\n * @param frame - frame of animation clip to move to\n */\n setAnimationKeyframe(frame: number): void {\n if (this.hasAnimation) this.mixer.setTime(this.animationClip.tracks[0].times[frame])\n }\n}\n","import { EventDispatcher } from 'three'\n\nexport abstract class BaseAdaptor extends EventDispatcher {\n constructor() {\n super()\n }\n abstract connect(): void\n abstract disconnect(): void\n abstract update(time?: number): void\n abstract isEnabled(): boolean\n}\n\nexport interface DiscreteEvent {\n type: 'trigger'\n}\n\nexport interface ContinuousEvent {\n type: 'update'\n}\n\nexport interface IntertiaCompleteEvent {\n type: 'inertiacomplete'\n}\n","import { BaseAdaptor, DiscreteEvent, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when a key in a `discrete` KeyboardAdaptor's mapping is released (`onKeyUp`)\n * @example\n * ```javascript\n * adaptor.on('trigger', () => { // do something })\n * ```\n * */\nexport interface KeyboardAdaptorDiscreteEvent extends DiscreteEvent {\n /** KeyMapping key that triggered the event */\n trigger: string\n}\n\n/**\n * Event: Fired when a key in a `continuous` KeyboardAdaptor's mapping is pressed (`onKeyDown`)\n * @example\n * ```javascript\n * adaptor.on('update', () => { // do something })\n * ```\n * */\nexport interface KeyboardAdaptorContinuousEvent extends ContinuousEvent {\n values: DamperValues\n deltas: DamperValues\n}\n\n/**\n * A discrete adaptor works as a trigger - only firing events on keyup,\n * whereas a continuous adaptor continuously fires events on keydown\n * */\nexport type KeyboardAdaptorType = 'discrete' | 'continuous'\n\n/**\n * Key-value pairs of semantic labels associated with an array of keys (corresponding to `KeybordEvent.keys` values)\n */\nexport interface KeyMapping {\n /** The key is a semantic label, and the string[] is a corresponding collection of event.keys */\n [key: string]: string[]\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#KeyboardAdaptor} constructor\n */\nexport interface KeyboardAdaptorProps {\n /** 'discrete' or 'continuous' */\n type: KeyboardAdaptorType\n /**\n * Default key mapping uses forward/backward/up/down/left/right as semanic labels, with WASD and arrow keys mapped appropriately:\n * @example keyMapping\n * ```javascript\n * {\n * forward: ['ArrowUp', 'w', 'W'],\n * backward: ['ArrowDown', 's', 'S'],\n * left: ['ArrowLeft', 'a', 'A'],\n * right: ['ArrowRight', 'd', 'D'],\n * up: ['u', 'U'],\n * down: ['n', 'N'],\n * }\n * ```\n * */\n keyMapping?: KeyMapping\n /** Only used for continuous adaptor, value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Only used for continuous adaptor, the amount to increment the target value on each keydown event. Defaults to 1 */\n incrementor?: number\n /** Prevent event bubbling. Defaults to true */\n preventBubbling?: boolean\n}\n\nconst defaultProps: Partial = {\n keyMapping: {\n forward: ['ArrowUp', 'w', 'W'],\n backward: ['ArrowDown', 's', 'S'],\n left: ['ArrowLeft', 'a', 'A'],\n right: ['ArrowRight', 'd', 'D'],\n rollLeft: ['Q', 'q'],\n rollRight: ['E', 'e'],\n tiltDown: ['F', 'f'],\n tiltUp: ['R', 'r'],\n panRight: ['C', 'c'],\n panLeft: ['Z', 'z'],\n up: ['u', 'U'],\n down: ['n', 'N'],\n },\n dampingFactor: 0.5,\n incrementor: 0.1,\n preventBubbling: true,\n}\n\n/**\n * Parse keyboard events and emit either dampened values for continuous keypresses, or trigger events named according to a provided keymapping.\n * @remarks\n * See {@link three-story-controls#KeyboardAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#KeyboardAdaptorDiscreteEvent} and {@link three-story-controls#KeyboardAdaptorContinuousEvent} for emitted event signatures.\n * @example Continuous adaptor\n * ```javascript\n * const keyboardAdaptor = new KeyboardAdaptor({ type: 'continuous', dampingFactor: 0.2 })\n * keyboardAdaptor.connect()\n * keyboardAdaptor.addEventListener('update', (event) => {\n * cube.rotation.y += event.deltas.right - event.deltas.left\n * cube.rotation.x += event.deltas.up - event.deltas.down\n * )}\n * function animate() {\n * keyboardAdaptor.update()\n * window.requestAnimationFrame(animate)\n * }\n * animate()\n * ```\n */\nexport class KeyboardAdaptor extends BaseAdaptor {\n private type: KeyboardAdaptorType\n private damper: Damper\n private dampingFactor: number\n private incrementor: number\n private keyMapping: KeyMapping\n private connected: boolean\n private preventBubbling: boolean\n\n constructor(props: KeyboardAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n const values = {}\n for (const key in this.keyMapping) {\n values[key] = 0\n }\n this.damper = new Damper({\n values,\n dampingFactor: this.dampingFactor,\n })\n this.onKeyUp = this.onKeyUp.bind(this)\n this.onKeyDown = this.onKeyDown.bind(this)\n }\n\n connect(): void {\n document.addEventListener('keyup', this.onKeyUp, true)\n document.addEventListener('keydown', this.onKeyDown, true)\n this.connected = true\n }\n\n disconnect(): void {\n document.removeEventListener('keyup', this.onKeyUp, true)\n document.removeEventListener('keydown', this.onKeyDown, true)\n this.connected = false\n }\n\n update(): void {\n if (this.type === 'continuous' && !this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.damper.getCurrentValues(),\n deltas: this.damper.getDeltaValues(),\n } as KeyboardAdaptorContinuousEvent)\n if (this.damper.reachedTarget()) {\n this.damper.resetAll(0)\n this.dispatchEvent({\n type: 'inertiacomplete',\n } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onKeyUp(event: KeyboardEvent): void {\n if (this.type === 'discrete') {\n for (const name in this.keyMapping) {\n if (this.keyMapping[name].includes(event.key)) {\n if (this.preventBubbling) event.preventDefault()\n this.dispatchEvent({\n type: 'trigger',\n trigger: name,\n } as KeyboardAdaptorDiscreteEvent)\n break\n }\n }\n }\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n if (this.type === 'continuous') {\n for (const name in this.keyMapping) {\n if (this.keyMapping[name].includes(event.key)) {\n if (this.preventBubbling) event.preventDefault()\n this.damper.addToTarget(name, this.incrementor)\n break\n }\n }\n }\n }\n}\n","import { BaseAdaptor, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\ninterface Coordinates extends DamperValues {\n x: number\n y: number\n}\n\n/**\n * Event: Fired when when `PointerEvent`s are triggered\n * @example\n * ```javascript\n * adaptor.on('trigger', (e) => {\n * console.log('x/y coordinates', e.values.x, e.values.y)\n * })\n * ```\n * */\nexport interface PointerAdaptorEvent extends ContinuousEvent {\n /** Dampened x and y pointer coordinates */\n values: Coordinates\n /** Pointer coordinate change since previous update */\n deltas: Coordinates\n /** Number of pointers registered */\n pointerCount: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#PointerAdaptor} constructor\n */\nexport interface PointerAdaptorProps {\n /** DOM element that should listen for pointer events. Defaults to `document.body` */\n domElement?: HTMLElement\n /** Damping value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Whether to normalize the pointer position values. Defaults to true */\n shouldNormalize?: boolean\n /** If values are normalized, whether they should be in -1 to 1 range. Defaults to true. */\n normalizeAroundZero?: boolean\n /** Debounce for registering a change in the pointer count, in ms. Defaults to 100. */\n multipointerThreshold?: number\n}\n\nconst defaultProps: PointerAdaptorProps = {\n domElement: document.body,\n dampingFactor: 0.5,\n shouldNormalize: true,\n normalizeAroundZero: true,\n multipointerThreshold: 100,\n}\n\n/**\n * Parse pointer events to emit dampened, normalized coordinates along with the pointer count (for detecting multi-touch or drag events)\n * @remarks\n * See {@link three-story-controls#PointerAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#PointerAdaptorEvent} for emitted event signatures.\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n * @example Pointer adaptor\n * ```javascript\n * const pointerAdaptor = new PointerAdaptor()\n * pointerAdaptor.connect()\n * pointerAdaptor.addEventListener('update', (event) => {\n * switch(event.pointerCount) {\n * case 0:\n * cube.scale.x = event.values.x\n * cube.scale.y = event.values.y\n * break\n * case 1:\n * cube.position.x += event.deltas.x\n * cube.position.y -= event.deltas.y\n * break\n * default:\n * break\n * }\n * })\n *\n * // in RAF loop:\n * function animate(t) {\n * pointerAdaptor.update(t)\n * }\n * ```\n */\nexport class PointerAdaptor extends BaseAdaptor {\n private domElement = document.body\n private dampingFactor: number\n private shouldNormalize = true\n private normalizeAroundZero = true\n private multipointerThreshold: number\n private damper: Damper\n private connected: boolean\n private width: number\n private height: number\n private pointerCount = 0\n private recordedPosition = false\n private cache: Array = []\n private lastDownTime = 0\n private lastUpTime = 0\n\n constructor(props: PointerAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.damper = new Damper({\n values: { x: null, y: null },\n dampingFactor: this.dampingFactor,\n })\n this.setDimensions()\n this.onPointerMove = this.onPointerMove.bind(this)\n this.onPointerUp = this.onPointerUp.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n this.onResize = this.onResize.bind(this)\n }\n\n connect(): void {\n this.domElement.addEventListener('pointermove', this.onPointerMove, { passive: true })\n this.domElement.addEventListener('pointerdown', this.onPointerDown, { passive: true })\n this.domElement.addEventListener('pointerleave', this.onPointerUp, { passive: true })\n this.domElement.addEventListener('pointerup', this.onPointerUp, { passive: true })\n window.addEventListener('resize', this.onResize)\n this.connected = true\n }\n\n disconnect(): void {\n this.domElement.removeEventListener('pointermove', this.onPointerMove)\n this.domElement.removeEventListener('pointerdown', this.onPointerDown)\n this.domElement.removeEventListener('pointerleave', this.onPointerUp)\n this.domElement.removeEventListener('pointerup', this.onPointerUp)\n this.connected = false\n }\n\n update(time: number): void {\n if (\n this.pointerCount !== this.cache.length &&\n time - this.lastDownTime > this.multipointerThreshold &&\n time - this.lastUpTime > this.multipointerThreshold\n ) {\n this.pointerCount = this.cache.length\n if (this.pointerCount === 0) {\n this.damper.resetAll(null)\n this.recordedPosition = false\n } else {\n this.damper.resetData(this.getPointerPosition(this.cache[0]))\n this.recordedPosition = true\n }\n }\n\n if (!this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.shouldNormalize\n ? this.normalize(this.damper.getCurrentValues() as Coordinates, this.normalizeAroundZero)\n : this.damper.getCurrentValues(),\n deltas: this.shouldNormalize\n ? this.normalize(this.damper.getDeltaValues() as Coordinates, false)\n : this.damper.getDeltaValues(),\n pointerCount: this.pointerCount,\n } as PointerAdaptorEvent)\n if (this.damper.reachedTarget()) {\n this.dispatchEvent({ type: 'inertiacomplete' } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private setDimensions(): void {\n this.width = this.domElement.getBoundingClientRect().width\n this.height = this.domElement.getBoundingClientRect().height\n }\n\n private getPointerPosition(event: PointerEvent): Coordinates {\n // event.offsetLeft is still experimental\n return {\n x: Math.max(0, Math.min(this.width, event.x - this.domElement.offsetLeft)),\n y: Math.max(0, Math.min(this.height, event.y - this.domElement.offsetTop)),\n }\n }\n\n private normalize(values: Coordinates, aroundZero: boolean): Coordinates {\n let x = values.x / this.width\n let y = values.y / this.height\n if (aroundZero) {\n x = x * 2 - 1\n y = y * 2 - 1\n }\n return { x, y }\n }\n\n private onPointerMove(event: PointerEvent): void {\n if (this.pointerCount === this.cache.length) {\n if (this.cache.length === 0) {\n if (!this.recordedPosition) {\n this.damper.resetData(this.getPointerPosition(event))\n this.recordedPosition = true\n } else {\n this.damper.setTarget(this.getPointerPosition(event))\n }\n } else {\n if (event.pointerId === this.cache[0].pointerId) {\n this.damper.setTarget(this.getPointerPosition(event))\n }\n }\n }\n }\n\n private onPointerDown(event: PointerEvent): void {\n // only deals with left mouse button right now\n // TODO: add some logic for optional right button events\n if (event.button === 0) {\n this.cache.push(event)\n this.lastDownTime = window.performance.now()\n }\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (event.button === 0 || event.type === 'pointerleave') {\n for (let i = 0; i < this.cache.length; i++) {\n if (this.cache[i].pointerId == event.pointerId) {\n this.cache.splice(i, 1)\n break\n }\n }\n this.lastUpTime = window.performance.now()\n }\n }\n\n private onResize(): void {\n this.setDimensions()\n }\n}\n","import { BaseAdaptor, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when when the 'in view' amount of the given DOM element changes\n */\nexport interface ScrollAdaptorEvent extends ContinuousEvent {\n values: DamperValues\n dampenedValues: DamperValues\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ScrollAdaptor} constructor\n */\nexport interface ScrollAdaptorProps {\n /** Long DOM Element to observe */\n scrollElement: HTMLElement\n /** Offset to start registering scroll, in px or vh. Default starts when top of element is at bottom of viewport. */\n startOffset?: string\n /** Offset to end registering scroll, in px or vh. Default ends when bottom of element is at top of viewport. */\n endOffset?: string\n /** Buffer before and after element to start registering scroll. Number between 0 and 1, defaults to 0.1 */\n buffer?: number\n /** Value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n}\n\nconst defaultProps: Partial = {\n startOffset: '0px',\n endOffset: '0px',\n buffer: 0.1,\n dampingFactor: 0.5,\n}\n\n/**\n * Emits normalized values for the amount a given DOM element has been scrolled through.\n * @remarks\n * See {@link three-story-controls#ScrollAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#ScrollAdaptorEvent} for emitted event signatures.\n * @example Scroll adaptor\n * ```javascript\n * const scrollAdaptor = new ScrollAdaptor({ scrollElement: document.querySelector('.scroller'), dampingFactor: 0.1 })\n * scrollAdaptor.connect()\n * scrollAdaptor.addEventListener('update', (event) => {\n * cube.rotation.y = event.dampenedValues.scrollPercent*Math.PI*2\n * })\n * ```\n */\nexport class ScrollAdaptor extends BaseAdaptor {\n private scrollElement: HTMLElement\n private damper: Damper\n private dampingFactor: number\n private connected: boolean\n private values: DamperValues\n private lastSeenScrollValue: number\n private previousScrollValue: number\n private startPosition: number\n private endPosition: number\n private distance: number\n private bufferedStartPosition: number\n private bufferedEndPosition: number\n private startOffset: string\n private endOffset: string\n private buffer: number\n private resizeObserver: ResizeObserver\n\n constructor(props: ScrollAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.lastSeenScrollValue = window.scrollY || -1\n this.previousScrollValue = this.lastSeenScrollValue\n this.values = {\n scrollPx: null,\n scrollPercent: null,\n }\n this.damper = new Damper({\n values: this.values,\n dampingFactor: this.dampingFactor,\n })\n this.calculateDimensions = this.calculateDimensions.bind(this)\n this.onScroll = this.onScroll.bind(this)\n this.resizeObserver = new ResizeObserver(this.calculateDimensions)\n this.calculateDimensions()\n }\n\n connect(): void {\n window.addEventListener('scroll', this.onScroll, { passive: true })\n this.resizeObserver.observe(document.body)\n this.connected = true\n }\n\n disconnect(): void {\n window.removeEventListener('scroll', this.onScroll)\n this.resizeObserver.unobserve(document.body)\n this.connected = false\n }\n\n update(): void {\n if (\n this.lastSeenScrollValue !== this.previousScrollValue &&\n this.lastSeenScrollValue >= this.bufferedStartPosition &&\n this.lastSeenScrollValue <= this.bufferedEndPosition\n ) {\n const scrollPx = Math.max(0, Math.min(this.distance, this.lastSeenScrollValue - this.startPosition))\n const scrollPercent = Math.max(0, Math.min(1, scrollPx / this.distance))\n this.values = {\n scrollPx,\n scrollPercent,\n }\n this.damper.setTarget(this.values)\n this.previousScrollValue = this.lastSeenScrollValue\n }\n if (!this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.values,\n dampenedValues: this.damper.getCurrentValues(),\n } as ScrollAdaptorEvent)\n if (this.damper.reachedTarget()) {\n this.dispatchEvent({ type: 'inertiacomplete' } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n parseOffset(offset: string): number {\n let amount = 0\n if (offset) {\n amount = parseInt(offset)\n if (offset.indexOf('vh') !== -1) {\n amount = (amount * window.innerHeight) / 100\n } else if (this.distance && offset.indexOf('%') !== -1) {\n amount = (amount * this.distance) / 100\n }\n }\n return amount\n }\n\n private calculateOffset(element: HTMLElement): number {\n if (!element) return 0\n return this.calculateOffset(element.offsetParent as HTMLElement) + element.offsetTop\n }\n\n private calculateDimensions(): void {\n const elementHeight = this.scrollElement.clientHeight\n const offsetTop = this.calculateOffset(this.scrollElement)\n this.startPosition = offsetTop - window.innerHeight + this.parseOffset(this.startOffset)\n this.endPosition = offsetTop + elementHeight + this.parseOffset(this.endOffset)\n this.distance = this.endPosition - this.startPosition\n this.bufferedStartPosition = Math.max(0, this.startPosition * (1 - this.buffer))\n this.bufferedEndPosition = Math.min(\n this.endPosition * (1 + this.buffer),\n document.body.getBoundingClientRect().height,\n )\n }\n\n private onScroll(): void {\n this.lastSeenScrollValue = window.scrollY\n }\n}\n","import { BaseAdaptor, DiscreteEvent } from './BaseAdaptor'\n\n/**\n * Event: Fired when when swipe are registered\n * @remarks\n * The sign represents the direction of the swipe,\n * y = 1 when swiping down-to-up, and x = 1 when swiping left-to-right\n * */\nexport interface SwipeAdaptorEvent extends DiscreteEvent {\n x: -1 | 1 | 0\n y: -1 | 1 | 0\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#SwipeAdaptor} constructor\n */\nexport interface SwipeAdaptorProps {\n /** DOM element to listen to events on. Defaults to document.body */\n domElement?: HTMLElement\n /** Threshold of pointer's deltaX to trigger events. Defaults to 60 */\n thresholdX?: number\n /** Threshold of pointer's deltaY to trigger events. Defaults to 60 */\n thresholdY?: number\n}\n\nconst defaultProps: SwipeAdaptorProps = {\n domElement: document.body,\n thresholdX: 60,\n thresholdY: 60,\n}\n\n/**\n * Emits events in response to swipe gestures above a given threshold.\n * @remarks\n * See {@link three-story-controls#SwipeAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#SwipeAdaptorEvent} for emitted event signatures.\n * Note: CSS property `touch-action: none` will probably be needed on listener element\n * @example Swipe adaptor\n * ```javascript\n * const swipeAdaptor = new SwipeAdaptor()\n * swipeAdaptor.connect()\n * swipeAdaptor.addEventListener('trigger', (event) => {\n * cube.scale.y += event.y*0.1\n * })\n * ```\n */\nexport class SwipeAdaptor extends BaseAdaptor {\n private domElement: HTMLElement\n private thresholdX: number\n private thresholdY: number\n private startX: number\n private startY: number\n private connected: boolean\n\n constructor(props: SwipeAdaptorProps = {}) {\n super()\n Object.assign(this, defaultProps, props)\n this.onPointerUp = this.onPointerUp.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n }\n\n connect(): void {\n this.domElement.addEventListener('pointerdown', this.onPointerDown, { passive: true })\n this.domElement.addEventListener('pointerup', this.onPointerUp, { passive: true })\n this.connected = true\n }\n\n disconnect(): void {\n this.domElement.removeEventListener('pointerdown', this.onPointerDown)\n this.domElement.removeEventListener('pointerup', this.onPointerUp)\n this.connected = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onPointerDown(event: PointerEvent): void {\n if (event.pointerType !== 'mouse' && event.isPrimary) {\n this.startX = event.screenX\n this.startY = event.screenY\n }\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (event.pointerType !== 'mouse' && event.isPrimary) {\n const diffX = event.screenX - this.startX\n const diffY = event.screenY - this.startY\n if (Math.abs(diffX) >= this.thresholdX || Math.abs(diffY) >= this.thresholdY) {\n this.dispatchEvent({\n type: 'trigger',\n x: Math.abs(diffX) >= this.thresholdX ? Math.sign(diffX) : 0,\n y: Math.abs(diffY) >= this.thresholdY ? Math.sign(-1 * diffY) : 0,\n } as SwipeAdaptorEvent)\n }\n }\n }\n}\n","import { BaseAdaptor, DiscreteEvent, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when when discrete `wheel` events are registered\n * @remarks\n * The sign represents the the direction of the wheel event that caused the event to trigger\n * */\nexport interface WheelAdaptorDiscreteEvent extends DiscreteEvent {\n x: -1 | 1 | 0\n y: -1 | 1 | 0\n}\n\n/**\n * Event: Fired on a continuous `WheelAdaptor` in response to `wheel` events\n * @remarks\n * DamperValues have `x` and `y` keys.\n * */\nexport interface WheelAdaptorContinuousEvent extends ContinuousEvent {\n values: DamperValues\n deltas: DamperValues\n}\n\n/**\n * A discrete adaptor works as a trigger - only firing events when wheel events pass a given threshold,\n * whereas a continuous adaptor continuously fires events on wheel\n * */\nexport type WheelAdaptorType = 'discrete' | 'continuous'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#WheelAdaptor} constructor\n */\nexport interface WheelAdaptorProps {\n /** 'discrete' or 'continuous' */\n type: WheelAdaptorType\n /** DOM element to listen to events on. Defaults to window */\n domElement?: HTMLElement\n /** Only used for continuous adaptor, value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Only used for discrete adaptor, threshold of wheel.deltaX to trigger events. Defaults to 15 */\n thresholdX?: number\n /** Only used for discrete adaptor, threshold of wheel.deltaY to trigger events. Defaults to 15 */\n thresholdY?: number\n /** Only used for discrete adaptor, rest duration between firing trigger events. Defaults to 700 */\n debounceDuration?: number\n}\n\nconst defaultProps: Partial = {\n dampingFactor: 0.5,\n thresholdX: 15,\n thresholdY: 15,\n debounceDuration: 700,\n}\n\n/**\n * Parse mouse wheel events and emit either dampened values, or trigger events for swipes that cross a given threshold.\n * @remarks\n * See {@link three-story-controls#WheelAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#WheelAdaptorDiscreteEvent} and {@link three-story-controls#WheelAdaptorContinuousEvent} for emitted event signatures.\n * @example Discrete adaptor\n * ```javascript\n * const wheelAdaptor = new WheelAdaptor({ type: 'discrete' })\n * wheelAdaptor.connect()\n * wheelAdaptor.addEventListener('trigger', (event) => {\n * cube.scale.y += event.y*0.1\n * })\n * ```\n */\nexport class WheelAdaptor extends BaseAdaptor {\n private type: WheelAdaptorType\n private domElement: HTMLElement\n private dampingFactor: number\n private damper: Damper\n private thresholdX: number\n private thresholdY: number\n private debounceDuration: number\n private lastThresholdTrigger = 0\n private connected: boolean\n\n constructor(props: WheelAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.damper = new Damper({\n values: { x: 0, y: 0 },\n dampingFactor: this.dampingFactor,\n })\n this.onWheel = this.onWheel.bind(this)\n }\n\n connect(): void {\n const element = this.domElement || window\n element.addEventListener('wheel', this.onWheel, { passive: true })\n this.connected = true\n }\n\n disconnect(): void {\n const element = this.domElement || window\n element.removeEventListener('wheel', this.onWheel)\n this.connected = false\n }\n\n update(): void {\n if (this.type === 'continuous' && !this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.damper.getCurrentValues(),\n deltas: this.damper.getDeltaValues(),\n } as WheelAdaptorContinuousEvent)\n if (this.damper.reachedTarget()) {\n this.damper.resetAll(0)\n this.dispatchEvent({\n type: 'inertiacomplete',\n } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onWheel(event: WheelEvent): void {\n if (this.type === 'continuous') {\n this.damper.addToTarget('x', event.deltaX)\n this.damper.addToTarget('y', event.deltaY)\n } else if (this.type === 'discrete') {\n if (Math.abs(event.deltaX) >= this.thresholdX || Math.abs(event.deltaY) >= this.thresholdY) {\n const now = window.performance.now()\n if (now - this.lastThresholdTrigger > this.debounceDuration) {\n this.lastThresholdTrigger = now\n this.dispatchEvent({\n type: 'trigger',\n x: Math.abs(event.deltaX) >= this.thresholdX ? Math.sign(event.deltaX) : 0,\n y: Math.abs(event.deltaY) >= this.thresholdY ? Math.sign(event.deltaY) : 0,\n } as WheelAdaptorDiscreteEvent)\n }\n }\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#FreeMovementControls} constructor\n */\nexport interface FreeMovementControlsProps {\n domElement?: HTMLElement\n /** Damping factor between 0 and 1. Defaults to 0.3 */\n pointerDampFactor?: number\n /** Mutiplier for two-pointer translation. Defaults to 4 */\n pointerScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.5 */\n keyboardDampFactor?: number\n /** Mutiplier for keyboard translation. Defaults to 0.5 */\n keyboardScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.25 */\n wheelDampFactor?: number\n /** Mutiplier for wheel translation. Defaults to 0.05 */\n wheelScaleFactor?: number\n /** Mutiplier for panning. Defaults to Math.PI / 4 */\n panDegreeFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 10 */\n tiltDegreeFactor?: number\n}\n\nconst defaultProps: FreeMovementControlsProps = {\n domElement: document.body,\n pointerDampFactor: 0.3,\n pointerScaleFactor: 4,\n keyboardDampFactor: 0.5,\n keyboardScaleFactor: 0.5,\n wheelDampFactor: 0.25,\n wheelScaleFactor: 0.05,\n panDegreeFactor: Math.PI / 4,\n tiltDegreeFactor: Math.PI / 10,\n}\n\n/**\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * @remarks\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#FreeMovementControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n *\n */\nexport class FreeMovementControls implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private wheelAdaptor: WheelAdaptor\n private pointerAdaptor: PointerAdaptor\n private wheelScaleFactor: number\n private pointerScaleFactor: number\n private panDegreeFactor: number\n private tiltDegreeFactor: number\n private enabled = false\n\n /** {@inheritDoc three-story-controls#FreeMovementControlsProps#} */\n constructor(cameraRig: CameraRig, props: FreeMovementControlsProps = {}) {\n this.cameraRig = cameraRig\n\n this.wheelScaleFactor = props.wheelScaleFactor || defaultProps.wheelScaleFactor\n this.pointerScaleFactor = props.pointerScaleFactor || defaultProps.pointerScaleFactor\n this.panDegreeFactor = props.panDegreeFactor || defaultProps.panDegreeFactor\n this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps.tiltDegreeFactor\n\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'continuous',\n dampingFactor: props.keyboardDampFactor || defaultProps.keyboardDampFactor,\n incrementor: props.keyboardScaleFactor || defaultProps.keyboardScaleFactor,\n })\n\n this.wheelAdaptor = new WheelAdaptor({\n type: 'continuous',\n dampingFactor: props.wheelDampFactor || defaultProps.wheelDampFactor,\n domElement: props.domElement || defaultProps.domElement,\n })\n\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.pointerDampFactor || defaultProps.pointerDampFactor,\n })\n\n this.onWheel = this.onWheel.bind(this)\n this.onKey = this.onKey.bind(this)\n this.onPointer = this.onPointer.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.wheelAdaptor.connect()\n this.keyboardAdaptor.connect()\n this.pointerAdaptor.connect()\n this.wheelAdaptor.addEventListener('update', this.onWheel)\n this.keyboardAdaptor.addEventListener('update', this.onKey)\n this.pointerAdaptor.addEventListener('update', this.onPointer)\n this.enabled = true\n }\n\n disable(): void {\n this.wheelAdaptor.disconnect()\n this.keyboardAdaptor.disconnect()\n this.pointerAdaptor.disconnect()\n this.wheelAdaptor.removeEventListener('update', this.onWheel)\n this.keyboardAdaptor.removeEventListener('update', this.onKey)\n this.pointerAdaptor.removeEventListener('update', this.onPointer)\n this.enabled = false\n }\n\n private onWheel(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.wheelScaleFactor)\n }\n\n private onKey(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward)\n this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left)\n this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down)\n }\n\n private onPointer(event): void {\n switch (event.pointerCount) {\n case 1:\n this.cameraRig.do(CameraAction.Pan, event.deltas.x * this.panDegreeFactor)\n this.cameraRig.do(CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor)\n break\n case 2:\n this.cameraRig.do(CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor)\n this.cameraRig.do(CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor)\n break\n default:\n break\n }\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.keyboardAdaptor.update()\n this.wheelAdaptor.update()\n this.pointerAdaptor.update(time)\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#FreeMovementPlusControls} constructor\n */\nexport interface FreeMovementPlusControlsProps {\n domElement?: HTMLElement\n /** Damping factor between 0 and 1. Defaults to 0.3 */\n pointerDampFactor?: number\n /** Mutiplier for two-pointer translation. Defaults to 4 */\n pointerScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.5 */\n keyboardDampFactor?: number\n /** Mutiplier for keyboard translation. Defaults to 0.5 */\n keyboardScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.25 */\n wheelDampFactor?: number\n /** Mutiplier for wheel translation. Defaults to 0.05 */\n wheelScaleFactor?: number\n /** Mutiplier for panning. Defaults to Math.PI / 4 */\n panDegreeFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 10 */\n tiltDegreeFactor?: number\n}\n\nconst defaultProps: FreeMovementPlusControlsProps = {\n domElement: document.body,\n pointerDampFactor: 0.3,\n pointerScaleFactor: 4,\n keyboardDampFactor: 0.5,\n keyboardScaleFactor: 0.5,\n wheelDampFactor: 0.25,\n wheelScaleFactor: 0.05,\n panDegreeFactor: Math.PI / 4,\n tiltDegreeFactor: Math.PI / 10,\n}\n\n/**\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * @remarks\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#FreeMovementPlusControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementPlusControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n *\n */\nexport class FreeMovementPlusControls implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private wheelAdaptor: WheelAdaptor\n private pointerAdaptor: PointerAdaptor\n private wheelScaleFactor: number\n private pointerScaleFactor: number\n private panDegreeFactor: number\n private tiltDegreeFactor: number\n private enabled = false\n\n /** {@inheritDoc three-story-controls#FreeMovementPlusControlsProps#} */\n constructor(cameraRig: CameraRig, props: FreeMovementPlusControlsProps = {}) {\n this.cameraRig = cameraRig\n\n this.wheelScaleFactor = props.wheelScaleFactor || defaultProps.wheelScaleFactor\n this.pointerScaleFactor = props.pointerScaleFactor || defaultProps.pointerScaleFactor\n this.panDegreeFactor = props.panDegreeFactor || defaultProps.panDegreeFactor\n this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps.tiltDegreeFactor\n\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'continuous',\n dampingFactor: props.keyboardDampFactor || defaultProps.keyboardDampFactor,\n incrementor: props.keyboardScaleFactor || defaultProps.keyboardScaleFactor,\n })\n\n this.wheelAdaptor = new WheelAdaptor({\n type: 'continuous',\n dampingFactor: props.wheelDampFactor || defaultProps.wheelDampFactor,\n domElement: props.domElement || defaultProps.domElement,\n })\n\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.pointerDampFactor || defaultProps.pointerDampFactor,\n })\n\n this.onWheel = this.onWheel.bind(this)\n this.onKey = this.onKey.bind(this)\n this.onPointer = this.onPointer.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.wheelAdaptor.connect()\n this.keyboardAdaptor.connect()\n this.pointerAdaptor.connect()\n this.wheelAdaptor.addEventListener('update', this.onWheel)\n this.keyboardAdaptor.addEventListener('update', this.onKey)\n this.pointerAdaptor.addEventListener('update', this.onPointer)\n this.enabled = true\n }\n\n disable(): void {\n this.wheelAdaptor.disconnect()\n this.keyboardAdaptor.disconnect()\n this.pointerAdaptor.disconnect()\n this.wheelAdaptor.removeEventListener('update', this.onWheel)\n this.keyboardAdaptor.removeEventListener('update', this.onKey)\n this.pointerAdaptor.removeEventListener('update', this.onPointer)\n this.enabled = false\n }\n\n private onWheel(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.wheelScaleFactor)\n }\n\n private onKey(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward)\n this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left)\n this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down)\n\n this.cameraRig.do(CameraAction.Roll, event.values.rollRight/30 - event.values.rollLeft/30)\n this.cameraRig.do(CameraAction.Tilt, event.values.tiltDown/30 - event.values.tiltUp/30)\n this.cameraRig.do(CameraAction.Pan, event.values.panLeft/30 - event.values.panRight/30)\n }\n\n private onPointer(event): void {\n switch (event.pointerCount) {\n case 1:\n this.cameraRig.do(CameraAction.Pan, event.deltas.x * this.panDegreeFactor)\n this.cameraRig.do(CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor)\n break\n case 2:\n this.cameraRig.do(CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor)\n this.cameraRig.do(CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor)\n break\n default:\n break\n }\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.keyboardAdaptor.update()\n this.wheelAdaptor.update()\n this.pointerAdaptor.update(time)\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig } from '../CameraRig'\nimport { ScrollAdaptor } from '../adaptors/ScrollAdaptor'\n\n/**\n * ScrollActions provide a way to add custom callback hooks for specific parts of the scroll area\n */\nexport interface ScrollAction {\n /** When to start the action, in %, px or vh. */\n start: string\n /** When to end the action, in %, px or vh. */\n end: string\n /** Callback with 0-1 progress when element is between start and end conditions. */\n callback: (progress: number) => void\n /** @internal */\n startPx: number\n /** @internal */\n endPx: number\n /** @internal */\n bufferedStartPx: number\n /** @internal */\n bufferedEndPx: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ScrollControls} constructor\n */\nexport interface ScrollControlsProps {\n /** Long DOM Element to observe */\n scrollElement: HTMLElement\n /** Offset to start registering scroll, in px or vh. Default starts when top of element is at bottom of viewport. */\n startOffset?: string\n /** Offset to end registering scroll, in px or vh. Default ends when bottom of element is at top of viewport. */\n endOffset?: string\n /** Value between 0 and 1. Defaults to 1 */\n dampingFactor?: number\n /** Buffer before and after element to start registering scroll. Number (percentage) between 0 and 1, defaults to 0.1 */\n buffer?: number\n /** When in the scroll to start the camera animation, can be specified in px, % or vh */\n cameraStart?: string\n /** When in the scroll to end the camera animation, can be specified in px, % or vh */\n cameraEnd?: string\n /** Array of ScrollActions for custom scroll hooks */\n scrollActions: ScrollAction[]\n}\n\nconst defaultProps: Partial = {\n startOffset: '0px',\n endOffset: '0px',\n dampingFactor: 1,\n buffer: 0.1,\n cameraStart: '0%',\n cameraEnd: '100%',\n scrollActions: [],\n}\n\nconst mapRange = (number, inMin, inMax, outMin, outMax): number => {\n return Math.max(outMin, Math.min(outMax, (number - inMin) * ((outMax - outMin) / (inMax - inMin)) + outMin))\n}\n\n/**\n * Control scheme to scrub through the CameraRig's `AnimationClip` based on the scroll of a DOM Element\n * @remarks\n * Control scheme to scrub through the CameraRig's `AnimationClip` based on the scroll of a DOM Element.\n * These controls expect to observe an element that is a few viewports long, and use the scroll distance to scrub through a camera animation.\n * By default, the 'start' of the animation is when the element starts to be in view (ie the top of the element aligns with the bottom of the viewport),\n * and the 'end' is when the element goes out of view (when the bottom of the elements aligns with the top of the viewport).\n * These trigger points can be customised with the `cameraStart` and `cameraEnd` properties. Additional scroll-dependant procedures can also be defined through `scrollActions`.\n *\n *\n * See {@link three-story-controls#ScrollControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/scroll-controls/ | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new ScrollControls(cameraRig, {\n * scrollElement: document.querySelector('.scroller'),\n * cameraStart: '12%',\n * cameraEnd: '90%',\n * scrollActions: [\n * { start: '0%' , end: '10%', callback: e => fadeInElement(e) },\n * { start: '85%' , end: '100%', callback: e => fadeOutElement(e) }\n * ]\n * })\n *\n * function fadeInElement(progress) { // entry fade transition }\n * function fadeOutElement(progress) { // exit fade transition }\n *\n * gltfLoader.load(cameraPath, (gltf) => {\n * cameraRig.setAnimationClip(gltf.animations[0])\n * cameraRig.setAnimationTime(0)\n * controls.enable()\n * })\n *\n * // render loop\n * function animate() {\n * controls.update()\n * }\n * ```\n */\nexport class ScrollControls implements BaseControls {\n readonly cameraRig: CameraRig\n private scrollAdaptor: ScrollAdaptor\n private enabled = false\n private cameraStart: string\n private cameraEnd: string\n private cameraStartPx: number\n private cameraEndPx: number\n private cameraBufferedStartPx: number\n private cameraBufferedEndPx: number\n private scrollActions: ScrollAction[]\n private buffer: number\n\n constructor(cameraRig: CameraRig, props: ScrollControlsProps) {\n this.cameraRig = cameraRig\n this.cameraRig.setAnimationTime(0)\n\n this.scrollAdaptor = new ScrollAdaptor({\n scrollElement: props.scrollElement,\n dampingFactor: props.dampingFactor || defaultProps.dampingFactor,\n startOffset: props.startOffset || defaultProps.startOffset,\n endOffset: props.endOffset || defaultProps.endOffset,\n buffer: props.buffer || defaultProps.buffer,\n })\n\n this.cameraStart = props.cameraStart || defaultProps.cameraStart\n this.cameraEnd = props.cameraEnd || defaultProps.cameraEnd\n this.scrollActions = props.scrollActions || defaultProps.scrollActions\n this.buffer = props.buffer || defaultProps.buffer\n this.calculateStops()\n this.onScroll = this.onScroll.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.scrollAdaptor.connect()\n this.scrollAdaptor.addEventListener('update', this.onScroll)\n this.enabled = true\n }\n\n disable(): void {\n this.scrollAdaptor.disconnect()\n this.scrollAdaptor.removeEventListener('update', this.onScroll)\n this.enabled = false\n }\n\n update(): void {\n if (this.enabled) {\n this.scrollAdaptor.update()\n }\n }\n\n private calculateStops(): void {\n this.cameraStartPx = this.scrollAdaptor.parseOffset(this.cameraStart)\n this.cameraEndPx = this.scrollAdaptor.parseOffset(this.cameraEnd)\n this.cameraBufferedStartPx = this.cameraStartPx * (1 - this.buffer)\n this.cameraBufferedEndPx = this.cameraEndPx * (1 + this.buffer)\n this.scrollActions.forEach((action) => {\n action.startPx = this.scrollAdaptor.parseOffset(action.start)\n action.endPx = this.scrollAdaptor.parseOffset(action.end)\n action.bufferedStartPx = action.startPx * (1 - this.buffer)\n action.bufferedEndPx = action.endPx * (1 + this.buffer)\n })\n }\n\n private onScroll(event): void {\n const progress = event.dampenedValues.scrollPx\n if (progress >= this.cameraBufferedStartPx && progress <= this.cameraBufferedEndPx) {\n this.cameraRig.setAnimationPercentage(mapRange(progress, this.cameraStartPx, this.cameraEndPx, 0, 1))\n }\n this.scrollActions.forEach((action) => {\n if (progress >= action.bufferedStartPx && progress <= action.bufferedEndPx) {\n action.callback(mapRange(progress, action.startPx, action.endPx, 0, 1))\n }\n })\n }\n}\n","import { EventDispatcher, Vector3, Quaternion } from 'three'\nimport { BaseControls, UpdatePOIsEvent, ExitPOIsEvent } from './BaseControls'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { CameraRig } from '../CameraRig'\n\nexport interface StoryPointMarker {\n /** Camera position */\n position: Vector3\n /** Camera quaternion */\n quaternion: Quaternion\n /** Transition duration, defaults to 1 */\n duration?: number\n /** Transition easing, defaults to power1 */\n ease?: string\n /** Use spherical interpolation for rotation, defaults to true */\n useSlerp?: boolean\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#StoryPointsControls} constructor\n */\nexport interface StoryPointsControlsProps {\n /** Whether to cycle to the first/last POI after reaching the end/start. When false, controls with emit 'ExitStoryPoints' events. Defaults to false. */\n cycle?: boolean\n /** Use keyboard arrow keys as navigation, defaults to true */\n useKeyboard?: boolean\n}\n\nconst defaultProps: StoryPointsControlsProps = {\n cycle: false,\n useKeyboard: true,\n}\n\n/**\n * Control scheme to transition the camera between given points in world space.\n * @remarks\n * See {@link three-story-controls#StoryPointsControlsProps} for all properties that can be passed to the constructor.\n *\n * See {@link three-story-controls#StoryPointMarker} for POI properties.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/story-points/ | DEMO }\n *\n * @example\n * ```js\n *\n * const pois = [\n * { position: new Vector3(...), quaternion: new Quaternion(...) },\n * { position: new Vector3(...), quaternion: new Quaternion(...) },\n * ]\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new StoryPointsControls(cameraRig, pois)\n *\n * controls.enable()\n * controls.goToPOI(0)\n *\n * // Assuming DOM elements with classes 'nextBtn' and 'prevBtn' have been created\n * document.querySelector('.nextBtn').on('click', () => controls.nextPOI() )\n * document.querySelector('.prevBtn').on('click', () => controls.prevPOI() )\n * ```\n */\nexport class StoryPointsControls extends EventDispatcher implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private pois: StoryPointMarker[]\n private currentIndex: number | null = null\n private upcomingIndex: number | null = null\n private enabled = false\n private cycle: boolean\n private useKeyboard: boolean\n\n constructor(cameraRig: CameraRig, pois: StoryPointMarker[] = [], props: StoryPointsControlsProps = {}) {\n super()\n this.cameraRig = cameraRig\n this.pois = pois\n Object.assign(this, defaultProps, props)\n if (this.useKeyboard) {\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'discrete',\n keyMapping: {\n next: ['ArrowDown', 'ArrowRight'],\n prev: ['ArrowUp', 'ArrowLeft'],\n },\n })\n this.onKey = this.onKey.bind(this)\n }\n this.onCameraStart = this.onCameraStart.bind(this)\n this.onCameraUpdate = this.onCameraUpdate.bind(this)\n this.onCameraEnd = this.onCameraEnd.bind(this)\n }\n\n getCurrentIndex(): number {\n return this.currentIndex\n }\n\n nextPOI(): void {\n const next = this.currentIndex + 1\n if (next >= this.pois.length && !this.cycle) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'end',\n } as ExitPOIsEvent)\n } else {\n this.goToPOI(next % this.pois.length)\n }\n }\n\n prevPOI(): void {\n const prev = this.currentIndex - 1\n if (prev < 0 && !this.cycle) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'start',\n } as ExitPOIsEvent)\n } else {\n this.goToPOI((prev + this.pois.length) % this.pois.length)\n }\n }\n\n goToPOI(index: number): void {\n this.upcomingIndex = index\n const poi = this.pois[this.upcomingIndex]\n this.cameraRig.flyTo(poi.position, poi.quaternion, poi.duration, poi.ease, poi.useSlerp)\n }\n\n enable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.connect()\n this.keyboardAdaptor.addEventListener('trigger', this.onKey)\n }\n this.cameraRig.addEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.addEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.addEventListener('CameraMoveEnd', this.onCameraEnd)\n this.enabled = true\n }\n\n disable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.disconnect()\n this.keyboardAdaptor.removeEventListener('trigger', this.onKey)\n }\n this.cameraRig.removeEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.removeEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.removeEventListener('CameraMoveEnd', this.onCameraEnd)\n this.enabled = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n private updatePois(progress: number): void {\n this.dispatchEvent({\n type: 'update',\n currentIndex: this.currentIndex,\n upcomingIndex: this.upcomingIndex,\n progress,\n } as UpdatePOIsEvent)\n }\n\n private onCameraStart(): void {\n this.updatePois(0)\n }\n\n private onCameraUpdate(event): void {\n this.updatePois(event.progress)\n }\n\n private onCameraEnd(): void {\n this.currentIndex = this.upcomingIndex\n this.upcomingIndex = null\n }\n\n private onKey(event): void {\n if (event.trigger === 'next') {\n this.nextPOI()\n } else if (event.trigger === 'prev') {\n this.prevPOI()\n }\n }\n}\n","import { EventDispatcher } from 'three'\nimport { BaseControls, UpdatePOIsEvent, ExitPOIsEvent } from './BaseControls'\nimport { CameraRig } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\nimport { SwipeAdaptor } from '../adaptors/SwipeAdaptor'\n\nexport interface PathPointMarker {\n frame: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#PathPointsControls} constructor\n */\nexport interface PathPointsControlsProps {\n /** Threshold of wheel delta that triggers a transition. Defaults to 15 */\n wheelThreshold?: number\n /** Threshold of swipe distance that triggers a transition. Defaults to 60 */\n swipeThreshold?: number\n /** Transition duration, defaults to 1 */\n duration?: number\n /** Transition easing, defaults to power1 */\n ease?: string\n /** Use keyboard arrow keys as navigation, defaults to true */\n useKeyboard?: boolean\n}\n\nconst defaultProps: PathPointsControlsProps = {\n wheelThreshold: 15,\n swipeThreshold: 60,\n duration: 1,\n ease: 'power1',\n useKeyboard: true,\n}\n\n/**\n * Control scheme to transition the camera between specific points (frames) along a path specified through an `AnimationClip`.\n * @remarks\n * Control scheme to transition the camera between specific points (frames) along a path specified through an `AnimationClip`.\n * A mouse wheel or swipe or keyboard arrow event triggers the camera to smoothly transition from one given frame number to the next.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#PathPointsControlsProps} for all properties that can be passed to the constructor.\n *\n * See {@link three-story-controls#PathPointMarker} for POI properties.\n *\n * See {@link three-story-controls#UpdatePOIsEvent} and {@link three-story-controls#ExitPOIsEvent} for emitted event signatures.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/path-points/ | DEMO }\n * @example\n * ```js\n *\n * const pois = [ { frame: 0 }, { frame: 54 } ....]\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * let camera, cameraRig, controls\n *\n * gltfLoader.load(cameraPath, (gltf) => {\n * camera = gltf.cameras[0]\n * cameraRig = new CameraRig(camera, scene)\n * cameraRig.setAnimationClip(gltf.animations[0])\n * cameraRig.setAnimationTime(0)\n * controls = new PathPointsControls(cameraRig, pois)\n * controls.enable()\n * controls.addEventListener('ExitPOIs', (e) => {\n * // e.exitFrom will be either 'start' or 'end'\n * })\n * controls.addEventListener('update', (e) => {\n * // e.currentIndex will be the index of the starting poi\n * // e.upcomingIndex will be the index of the upcoming poi\n * // e.progress will be a number 0-1 indicating progress of the transition\n * })\n * })\n * ```\n */\nexport class PathPointsControls extends EventDispatcher implements BaseControls {\n readonly cameraRig: CameraRig\n private wheelAdaptor: WheelAdaptor\n private swipeAdaptor: SwipeAdaptor\n private keyboardAdaptor: KeyboardAdaptor\n private pois: PathPointMarker[]\n private currentIndex = 0\n private upcomingIndex: number | null = null\n private enabled = false\n private duration: number\n private ease: string\n private wheelThreshold: number\n private swipeThreshold: number\n private useKeyboard: boolean\n\n constructor(cameraRig: CameraRig, pois: PathPointMarker[] = [], props: PathPointsControlsProps = {}) {\n super()\n this.cameraRig = cameraRig\n this.pois = pois\n Object.assign(this, defaultProps, props)\n this.wheelAdaptor = new WheelAdaptor({ type: 'discrete', thresholdY: this.wheelThreshold })\n this.swipeAdaptor = new SwipeAdaptor({ thresholdY: this.swipeThreshold })\n if (this.useKeyboard) {\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'discrete',\n keyMapping: {\n next: ['ArrowDown', 'ArrowRight'],\n prev: ['ArrowUp', 'ArrowLeft'],\n },\n })\n this.onKey = this.onKey.bind(this)\n }\n this.onCameraStart = this.onCameraStart.bind(this)\n this.onCameraUpdate = this.onCameraUpdate.bind(this)\n this.onCameraEnd = this.onCameraEnd.bind(this)\n this.onTrigger = this.onTrigger.bind(this)\n }\n\n getCurrentIndex(): number {\n return this.currentIndex\n }\n\n enable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.addEventListener('trigger', this.onKey)\n this.keyboardAdaptor.connect()\n }\n this.wheelAdaptor.addEventListener('trigger', this.onTrigger)\n this.swipeAdaptor.addEventListener('trigger', this.onTrigger)\n this.cameraRig.addEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.addEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.addEventListener('CameraMoveEnd', this.onCameraEnd)\n this.wheelAdaptor.connect()\n this.swipeAdaptor.connect()\n this.enabled = true\n }\n\n disable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.removeEventListener('trigger', this.onKey)\n this.keyboardAdaptor.disconnect()\n }\n this.wheelAdaptor.removeEventListener('trigger', this.onTrigger)\n this.swipeAdaptor.removeEventListener('trigger', this.onTrigger)\n this.cameraRig.removeEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.removeEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.removeEventListener('CameraMoveEnd', this.onCameraEnd)\n this.wheelAdaptor.disconnect()\n this.swipeAdaptor.disconnect()\n this.enabled = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n private onKey(event): void {\n switch (event.trigger) {\n case 'prev':\n this.onTrigger({ y: -1 })\n break\n case 'next':\n this.onTrigger({ y: 1 })\n break\n default:\n break\n }\n }\n\n private onTrigger(event): void {\n const index = this.currentIndex + event.y\n if (index >= this.pois.length) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'end',\n } as ExitPOIsEvent)\n } else if (index < 0) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'start',\n } as ExitPOIsEvent)\n } else {\n this.upcomingIndex = index\n this.cameraRig.flyToKeyframe(this.pois[this.upcomingIndex].frame, this.duration, this.ease)\n }\n }\n\n private updatePois(progress: number): void {\n this.dispatchEvent({\n type: 'update',\n currentIndex: this.currentIndex,\n upcomingIndex: this.upcomingIndex,\n progress,\n } as UpdatePOIsEvent)\n }\n\n private onCameraStart(): void {\n this.updatePois(0)\n }\n\n private onCameraUpdate(event): void {\n this.updatePois(event.progress)\n }\n\n private onCameraEnd(): void {\n this.currentIndex = this.upcomingIndex\n this.upcomingIndex = null\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction, RigComponent } from '../CameraRig'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ThreeDOFControls} constructor\n */\n//TODO: add option for relative or absolute control (in terms of screen space)\nexport interface ThreeDOFControlsProps {\n /** DOM element that should listen for pointer events. Defaults to `document.body` */\n domElement?: HTMLElement\n /** Mutiplier for panning. Defaults to Math.PI / 20 */\n panFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 20 */\n tiltFactor?: number\n /** Mutiplier for truck translation. Defaults to 1 */\n truckFactor?: number\n /** Mutiplier for pedestal translation. Defaults to 1 */\n pedestalFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.7 */\n dampingFactor?: number\n}\n\nconst defaultProps: ThreeDOFControlsProps = {\n domElement: document.body,\n panFactor: Math.PI / 20,\n tiltFactor: Math.PI / 20,\n truckFactor: 1,\n pedestalFactor: 1,\n dampingFactor: 0.7,\n}\n\n/**\n * Control scheme for slight rotation and translation movement in response to mouse movements (designed to be used in conjunction with other control schemes)\n * @remarks\n * Note: CSS property `touch-action: none` will probably be needed on listener element\n *\n * See {@link three-story-controls#ThreeDOFControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/story-points/ | DEMO w/ story points }\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/scroll-controls/ | DEMO w/ scroll controls}\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new ThreeDOFControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n */\nexport class ThreeDOFControls implements BaseControls {\n readonly cameraRig: CameraRig\n private pointerAdaptor: PointerAdaptor\n private enabled = false\n private panFactor: number\n private tiltFactor: number\n private truckFactor: number\n private pedestalFactor: number\n\n constructor(cameraRig: CameraRig, props: ThreeDOFControlsProps = {}) {\n this.cameraRig = cameraRig\n Object.assign(this, defaultProps, props)\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.dampingFactor || defaultProps.dampingFactor,\n })\n this.onPointerMove = this.onPointerMove.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.pointerAdaptor.connect()\n this.pointerAdaptor.addEventListener('update', this.onPointerMove)\n this.enabled = true\n }\n\n disable(): void {\n this.pointerAdaptor.disconnect()\n this.pointerAdaptor.removeEventListener('update', this.onPointerMove)\n this.enabled = false\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.pointerAdaptor.update(time)\n }\n }\n\n private onPointerMove(event): void {\n if (event.pointerCount === 0) {\n this.cameraRig.do(CameraAction.Pan, -event.deltas.x * this.panFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Tilt, -event.deltas.y * this.tiltFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.truckFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Pedestal, event.deltas.y * this.pedestalFactor, RigComponent.Eyes)\n }\n }\n}\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { Quaternion, Vector3, AnimationClip, VectorKeyframeTrack, QuaternionKeyframeTrack } from 'three'\nimport gsap from 'gsap'\nimport { CameraRig } from '../CameraRig'\nimport { FreeMovementControls } from '../controlschemes/FreeMovementControls'\nimport './index.css'\n\nconst easeFunctions = ['none', 'power1', 'power2', 'power3', 'power4', 'sine', 'expo', 'circ']\n\ninterface POI {\n position: Vector3\n quaternion: Quaternion\n duration: number\n ease: string\n image: string\n}\n\nconst DOMClass = {\n visit: 'visit',\n remove: 'remove',\n duration: 'duration',\n ease: 'ease',\n moveUp: 'move-up',\n moveDown: 'move-down',\n}\n\n/**\n * A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene\n *\n * @remarks\n * A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene.\n *\n * The `CameraHelper` can be set up with any scene along with {@link three-story-controls#FreeMovementControls | FreeMovementControls}.\n *\n * It renders as an overlay with functionality to add/remove/reorders points of interest, and create an animation path between them.\n * Each saved camera position is displayed with an image on the `CameraHelper` panel.\n *\n * The data can be exported as a JSON file that can then be used with different control schemes.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/camera-helper | DEMO }\n *\n * @example\n * Here's an example of initializing the CameraHelper\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementControls(cameraRig)\n *\n * controls.enable()\n *\n * const cameraHelper = new CameraHelper(rig, controls, renderer.domElement)\n *\n * // Render loop\n * // To allow for capturing an image of the canvas,\n * // it's important to update the CameraHelper after the scene is rendered,\n * // but before requesting the animation frame\n * function render(t) {\n * controls.update(t)\n * renderer.render(scene, camera)\n * cameraHelper.update(t)\n * window.requestAnimationFrame(render)\n * }\n *\n * render()\n * ```\n *\n *\n *\n * The following examples demonstrate using the exported data. Note: Depending on your setup, you may need to change the .json extension to .js and prepend the text with `export default` such that you can import it as javascript\n *\n * @example\n * Here's an example using the exported JSON data with ScrollControls.\n * ```javascript\n * import * as cameraData from 'camera-control.json'\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n *\n * // Parse the JSON animation clip\n * cameraRig.setAnimationClip(AnimationClip.parse(cameraData.animationClip))\n * cameraRig.setAnimationTime(0)\n *\n * const controls = new ScrollControls(cameraRig, {\n * scrollElement: document.querySelector('.scroller'),\n * })\n *\n * controls.enable()\n *\n * function render(t) {\n * window.requestAnimationFrame(render)\n * if (rig.hasAnimation) {\n * controls.update(t)\n * }\n * renderer.render(scene, camera)\n * }\n * ```\n *\n * @example\n * Here's an example using the exported data with Story Point controls\n * ```javascript\n * import * as cameraData from 'camera-control.json'\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n *\n * // Format the exported data to create three.js Vector and Quaternions\n * const pois = cameraData.pois.map((poi, i) => {\n * return {\n * position: new Vector3(...poi.position),\n * quaternion: new Quaternion(...poi.quaternion),\n * duration: poi.duration,\n * ease: poi.ease,\n * }\n * })\n *\n * const controls = new StoryPointsControls(rig, pois)\n * controls.enable()\n *\n * function render(t) {\n * window.requestAnimationFrame(render)\n * controls.update(t)\n * renderer.render(scene, camera)\n * }\n * ```\n */\nexport class CameraHelper {\n readonly rig: CameraRig\n readonly controls: FreeMovementControls\n readonly canvas: HTMLCanvasElement\n private pois: POI[]\n private currentIndex: number | null\n private drawer: HTMLElement\n private domList: HTMLElement\n private collapseBtn: HTMLElement\n private fileInput: HTMLInputElement\n private btnImport: HTMLElement\n private doCapture: boolean\n private animationClip: AnimationClip\n private isPlaying: boolean\n private playStartTime: number\n private useSlerp = true\n\n constructor(rig: CameraRig, controls: FreeMovementControls, canvas: HTMLCanvasElement, canvasParent?: HTMLElement) {\n this.rig = rig\n this.controls = controls\n this.canvas = canvas\n this.pois = []\n this.currentIndex = null\n this.doCapture = false\n this.isPlaying = false\n this.initUI(canvasParent)\n }\n\n private capture(): void {\n this.doCapture = true\n }\n\n update(time: number): void {\n if (this.doCapture) {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n canvas.width = 640\n canvas.height = 360\n ctx.drawImage(this.canvas, 0, 0, canvas.width, canvas.height)\n const image = canvas.toDataURL()\n\n this.addPoi(image)\n this.doCapture = false\n }\n if (this.isPlaying) {\n if (!this.playStartTime) {\n this.playStartTime = time\n this.controls.disable()\n this.rig.packTransform()\n }\n const t = (time - this.playStartTime) / 1000\n this.rig.setAnimationTime(t)\n if (t > this.animationClip.duration) {\n this.isPlaying = false\n this.playStartTime = null\n this.controls.enable()\n this.rig.unpackTransform()\n }\n }\n }\n\n private addPoi(image: string): void {\n this.pois.push({\n ...this.rig.getWorldCoordinates(),\n duration: 1,\n ease: 'power1',\n image,\n })\n this.currentIndex = this.pois.length - 1\n this.createClip()\n this.render()\n }\n\n private updatePoi(index: number, props: Partial): void {\n this.pois[index] = {\n ...this.pois[index],\n ...props,\n }\n }\n\n private movePoi(index: number, direction: number): void {\n if (index + direction >= 0 && index + direction < this.pois.length) {\n const temp = this.pois[index]\n this.pois[index] = this.pois[index + direction]\n this.pois[index + direction] = temp\n this.render()\n }\n }\n\n private removePoi(index: number): void {\n this.pois.splice(index, 1)\n this.render()\n }\n\n private goToPoi(index: number): void {\n const poi = this.pois[index]\n this.rig.flyTo(poi.position, poi.quaternion, poi.duration, poi.ease, this.useSlerp)\n }\n\n private createClip(): void {\n if (this.pois.length > 0) {\n const times = []\n const positionValues = []\n const quaternionValues = []\n const tmpPosition = new Vector3()\n const tmpQuaternion = new Quaternion()\n const framesPerPoi = 10\n\n let tweenStartTime = 0\n\n // transform imported arrays to quaternions and vector3 when loading a camera file\n if (!this.pois[0].quaternion.isQuaternion && !this.pois[0].position.isVector3) {\n for (let i = 0; i < this.pois.length; i++) {\n const p = this.pois[i]\n p.quaternion = new Quaternion(p.quaternion[0], p.quaternion[1], p.quaternion[2], p.quaternion[3])\n p.position = new Vector3(p.position[0], p.position[1], p.position[2])\n }\n }\n\n for (let i = 0; i < this.pois.length - 1; i++) {\n const p1 = this.pois[i]\n const p2 = this.pois[i + 1]\n\n const values = {\n px: p1.position.x,\n py: p1.position.y,\n pz: p1.position.z,\n qx: p1.quaternion.x,\n qy: p1.quaternion.y,\n qz: p1.quaternion.z,\n qw: p1.quaternion.w,\n slerpAmount: 0,\n }\n\n const target = {\n px: p2.position.x,\n py: p2.position.y,\n pz: p2.position.z,\n qx: p2.quaternion.x,\n qy: p2.quaternion.y,\n qz: p2.quaternion.z,\n qw: p2.quaternion.w,\n slerpAmount: 1,\n duration: p2.duration,\n ease: p2.ease,\n }\n\n const tween = gsap.to(values, target)\n\n for (let j = 0; j < framesPerPoi; j++) {\n const lerpAmount = p2.duration * (j / framesPerPoi)\n times.push(tweenStartTime + lerpAmount)\n tween.seek(lerpAmount)\n if (this.useSlerp) {\n tmpQuaternion.slerpQuaternions(p1.quaternion, p2.quaternion, values.slerpAmount)\n } else {\n tmpQuaternion.set(values.qx, values.qy, values.qz, values.qw)\n }\n tmpPosition.set(values.px, values.py, values.pz)\n tmpQuaternion.toArray(quaternionValues, quaternionValues.length)\n tmpPosition.toArray(positionValues, positionValues.length)\n }\n tweenStartTime += p2.duration\n }\n // add last point\n const last = this.pois[this.pois.length - 1]\n last.quaternion.toArray(quaternionValues, quaternionValues.length)\n last.position.toArray(positionValues, positionValues.length)\n times.push(tweenStartTime)\n this.animationClip = new AnimationClip(null, tweenStartTime, [\n new VectorKeyframeTrack('Translation.position', times, positionValues),\n new QuaternionKeyframeTrack('Rotation.quaternion', times, quaternionValues),\n ])\n this.rig.setAnimationClip(this.animationClip)\n }\n }\n\n private scrubClip(amount: number): void {\n if (this.pois.length > 0) {\n this.rig.setAnimationPercentage(amount)\n }\n }\n\n private playClip(): void {\n if (this.pois.length > 0) {\n this.isPlaying = true\n }\n }\n\n private import(): void {\n if (this.fileInput) {\n this.fileInput.click()\n const reader = new FileReader()\n\n this.fileInput.onchange = () => {\n reader.readAsText(this.fileInput.files[0])\n reader.onload = (e) => {\n const parsed = JSON.parse(e.target.result)\n this.pois = parsed.pois\n this.animationClip = parsed.animationClip\n this.createClip()\n this.render()\n }\n }\n }\n }\n\n private export({ draft }): void {\n if (this.pois.length > 0) {\n const jsondata = {} as any\n jsondata.pois = this.pois.map((poi) => {\n const position = [poi.position.x, poi.position.y, poi.position.z]\n const quaternion = [poi.quaternion.x, poi.quaternion.y, poi.quaternion.z, poi.quaternion.w]\n const obj = {\n position,\n quaternion,\n duration: poi.duration,\n ease: poi.ease,\n } as any\n\n if (draft) {\n obj.image = poi.image\n }\n\n return obj\n })\n if (this.animationClip) {\n jsondata.animationClip = AnimationClip.toJSON(this.animationClip)\n }\n const data = 'text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(jsondata))\n const a = document.createElement('a')\n a.href = 'data:' + data\n a.download = `camera-data${draft ? '-draft' : ''}.json`\n document.body.appendChild(a)\n a.click()\n a.remove()\n }\n }\n\n private exportImages(): void {\n const link = document.createElement('a')\n document.body.appendChild(link)\n this.pois.forEach((poi, index) => {\n link.href = poi.image\n link.download = `camera-poi-${index}.png`\n link.click()\n })\n link.remove()\n }\n\n // ui\n\n private initUI(canvasParent?: HTMLElement): void {\n this.drawer = document.createElement('div')\n this.drawer.classList.add('tb-ch')\n\n const btnAdd = document.createElement('button')\n btnAdd.classList.add('btn-round', 'add')\n btnAdd.innerText = '+'\n btnAdd.onclick = this.capture.bind(this)\n\n this.collapseBtn = document.createElement('button')\n this.collapseBtn.classList.add('btn-round', 'collapse')\n this.collapseBtn.innerText = '<'\n this.collapseBtn.onclick = this.collapse.bind(this)\n\n const controlWrapper = document.createElement('div')\n controlWrapper.classList.add('controls')\n\n this.fileInput = document.createElement('input')\n this.fileInput.type = 'file'\n this.fileInput.id = 'import'\n this.fileInput.accept = 'application/json'\n this.fileInput.style.display = 'none'\n\n this.btnImport = document.createElement('button')\n this.btnImport.classList.add('btn-text', 'import')\n this.btnImport.innerText = 'import draft JSON'\n this.btnImport.onclick = this.import.bind(this)\n\n const btnExportImages = document.createElement('button')\n btnExportImages.classList.add('btn-text', 'export')\n btnExportImages.innerText = 'export draft JSON'\n btnExportImages.onclick = this.export.bind(this, { draft: true })\n\n const btnExport = document.createElement('button')\n btnExport.classList.add('btn-text', 'export')\n btnExport.innerText = 'export production JSON'\n btnExport.onclick = this.export.bind(this, { draft: false })\n\n const bntExportImages = document.createElement('button')\n bntExportImages.classList.add('btn-text', 'export-images')\n bntExportImages.innerHTML = 'export images'\n bntExportImages.onclick = this.exportImages.bind(this)\n\n const btnPlay = document.createElement('button')\n btnPlay.classList.add('btn-text', 'play')\n btnPlay.innerText = 'play'\n btnPlay.onclick = this.playClip.bind(this)\n\n const sliderTime: HTMLInputElement = document.createElement('input')\n sliderTime.type = 'range'\n sliderTime.min = '0'\n sliderTime.max = '1000'\n sliderTime.step = '0.1'\n sliderTime.value = '0'\n const updateTime = this.scrubClip.bind(this)\n sliderTime.onmousedown = () => this.rig.packTransform()\n sliderTime.onmouseup = () => this.rig.unpackTransform()\n sliderTime.oninput = (e) => updateTime(parseInt((e.target).value) / 1000)\n\n this.domList = document.createElement('div')\n this.domList.classList.add('pois')\n this.domList.onclick = this.handleEvents.bind(this)\n this.domList.onchange = this.handleEvents.bind(this)\n\n controlWrapper.append(\n this.fileInput,\n this.btnImport,\n btnPlay,\n sliderTime,\n bntExportImages,\n btnExportImages,\n btnExport,\n )\n this.drawer.append(btnAdd, this.collapseBtn, this.domList, controlWrapper)\n\n const parent = canvasParent || document.body\n parent.append(this.drawer)\n }\n\n private handleEvents(event): void {\n const index = event.target.dataset.index\n if (index) {\n if (event.target.classList.contains(DOMClass.visit)) {\n this.goToPoi(parseInt(index))\n } else if (event.target.classList.contains(DOMClass.remove)) {\n this.removePoi(parseInt(index))\n } else if (event.target.classList.contains(DOMClass.duration)) {\n this.updatePoi(parseInt(index), { duration: parseFloat((event.target).value) })\n } else if (event.target.classList.contains(DOMClass.ease)) {\n this.updatePoi(parseInt(index), { ease: (event.target).value })\n } else if (event.target.classList.contains(DOMClass.moveUp)) {\n this.movePoi(parseInt(index), -1)\n } else if (event.target.classList.contains(DOMClass.moveDown)) {\n this.movePoi(parseInt(index), 1)\n }\n this.createClip()\n }\n }\n\n private collapse(): void {\n if (this.drawer.classList.contains('collapsed')) {\n this.drawer.classList.remove('collapsed')\n this.collapseBtn.innerText = '<'\n } else {\n this.drawer.classList.add('collapsed')\n this.collapseBtn.innerText = '>'\n }\n }\n\n private render(): void {\n this.domList.innerHTML = ''\n this.pois.forEach((poi, index) => {\n const div = document.createElement('div')\n div.classList.add('poi')\n\n const textHeading = document.createElement('h2')\n textHeading.innerText = `${index + 1}.`\n\n const wrapper = document.createElement('div')\n wrapper.classList.add('wrapper')\n const controls = document.createElement('div')\n controls.classList.add('poi-controls')\n const params = document.createElement('div')\n params.classList.add('poi-params')\n\n const image = new Image()\n image.src = poi.image\n\n const labelDuration = document.createElement('label')\n labelDuration.innerText = 'Duration'\n const inputDuration = document.createElement('input')\n inputDuration.classList.add(DOMClass.duration)\n inputDuration.dataset.index = `${index}`\n inputDuration.type = 'number'\n inputDuration.value = String(poi.duration)\n\n const labelEase = document.createElement('label')\n labelEase.innerText = 'Easing'\n const selectEase = document.createElement('select')\n selectEase.classList.add(DOMClass.ease)\n selectEase.dataset.index = `${index}`\n const options = easeFunctions.map((x) => {\n const op = document.createElement('option')\n op.innerText = x\n op.value = x\n op.selected = x === poi.ease\n return op\n })\n selectEase.append(...options)\n\n const btnRemove = document.createElement('button')\n btnRemove.classList.add(DOMClass.remove)\n btnRemove.title = 'Remove'\n btnRemove.dataset.index = `${index}`\n btnRemove.innerText = 'x'\n\n const btnVisit = document.createElement('button')\n btnVisit.classList.add(DOMClass.visit)\n btnVisit.title = 'Visit'\n btnVisit.dataset.index = `${index}`\n btnVisit.innerHTML = '→'\n\n const btnMoveUp = document.createElement('button')\n btnMoveUp.classList.add(DOMClass.moveUp)\n btnMoveUp.title = 'Move up'\n btnMoveUp.dataset.index = `${index}`\n btnMoveUp.innerHTML = '↑'\n\n const btnMoveDown = document.createElement('button')\n btnMoveDown.classList.add(DOMClass.moveDown)\n btnMoveDown.title = 'Move down'\n btnMoveDown.dataset.index = `${index}`\n btnMoveDown.innerHTML = '↓'\n\n controls.append(btnRemove, btnVisit, btnMoveUp, btnMoveDown)\n params.append(labelDuration, inputDuration, labelEase, selectEase)\n wrapper.append(image, controls)\n div.append(textHeading, wrapper, params)\n this.domList.appendChild(div)\n })\n }\n}\n"],"names":["defaultProps"],"mappings":";;;AAcA;;;;;;;;;;;;;;;MAgBa,MAAM;IAQjB,YAAY,KAAkB;QANtB,YAAO,GAAG,KAAK,CAAA;QACf,WAAM,GAAiB,EAAE,CAAA;QACzB,iBAAY,GAAiB,EAAE,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,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;YAC5D,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;YAClE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;YAC/B,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;YACxC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;SAC9B,CAAC,CAAA;KACH;;;;;"} \ No newline at end of file diff --git a/dist/three-story-controls.js b/dist/three-story-controls.js index 7ceb051..2dd4cc1 100644 --- a/dist/three-story-controls.js +++ b/dist/three-story-controls.js @@ -565,17 +565,23 @@ } } - const defaultProps$9 = { + const defaultProps$a = { keyMapping: { forward: ['ArrowUp', 'w', 'W'], backward: ['ArrowDown', 's', 'S'], left: ['ArrowLeft', 'a', 'A'], right: ['ArrowRight', 'd', 'D'], + rollLeft: ['Q', 'q'], + rollRight: ['E', 'e'], + tiltDown: ['F', 'f'], + tiltUp: ['R', 'r'], + panRight: ['C', 'c'], + panLeft: ['Z', 'z'], up: ['u', 'U'], down: ['n', 'N'], }, dampingFactor: 0.5, - incrementor: 1, + incrementor: 0.1, preventBubbling: true, }; /** @@ -601,7 +607,7 @@ class KeyboardAdaptor extends BaseAdaptor { constructor(props) { super(); - Object.assign(this, defaultProps$9, props); + Object.assign(this, defaultProps$a, props); const values = {}; for (const key in this.keyMapping) { values[key] = 0; @@ -671,7 +677,7 @@ } } - const defaultProps$8 = { + const defaultProps$9 = { domElement: document.body, dampingFactor: 0.5, shouldNormalize: true, @@ -720,7 +726,7 @@ this.cache = []; this.lastDownTime = 0; this.lastUpTime = 0; - Object.assign(this, defaultProps$8, props); + Object.assign(this, defaultProps$9, props); this.damper = new Damper({ values: { x: null, y: null }, dampingFactor: this.dampingFactor, @@ -842,7 +848,7 @@ } } - const defaultProps$7 = { + const defaultProps$8 = { startOffset: '0px', endOffset: '0px', buffer: 0.1, @@ -865,7 +871,7 @@ class ScrollAdaptor extends BaseAdaptor { constructor(props) { super(); - Object.assign(this, defaultProps$7, props); + Object.assign(this, defaultProps$8, props); this.lastSeenScrollValue = window.scrollY || -1; this.previousScrollValue = this.lastSeenScrollValue; this.values = { @@ -951,7 +957,7 @@ } } - const defaultProps$6 = { + const defaultProps$7 = { domElement: document.body, thresholdX: 60, thresholdY: 60, @@ -974,7 +980,7 @@ class SwipeAdaptor extends BaseAdaptor { constructor(props = {}) { super(); - Object.assign(this, defaultProps$6, props); + Object.assign(this, defaultProps$7, props); this.onPointerUp = this.onPointerUp.bind(this); this.onPointerDown = this.onPointerDown.bind(this); } @@ -1015,7 +1021,7 @@ } } - const defaultProps$5 = { + const defaultProps$6 = { dampingFactor: 0.5, thresholdX: 15, thresholdY: 15, @@ -1039,7 +1045,7 @@ constructor(props) { super(); this.lastThresholdTrigger = 0; - Object.assign(this, defaultProps$5, props); + Object.assign(this, defaultProps$6, props); this.damper = new Damper({ values: { x: 0, y: 0 }, dampingFactor: this.dampingFactor, @@ -1096,7 +1102,7 @@ } } - const defaultProps$4 = { + const defaultProps$5 = { domElement: document.body, pointerDampFactor: 0.3, pointerScaleFactor: 4, @@ -1138,6 +1144,124 @@ */ class FreeMovementControls { /** {@inheritDoc three-story-controls#FreeMovementControlsProps#} */ + constructor(cameraRig, props = {}) { + this.enabled = false; + this.cameraRig = cameraRig; + this.wheelScaleFactor = props.wheelScaleFactor || defaultProps$5.wheelScaleFactor; + this.pointerScaleFactor = props.pointerScaleFactor || defaultProps$5.pointerScaleFactor; + this.panDegreeFactor = props.panDegreeFactor || defaultProps$5.panDegreeFactor; + this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps$5.tiltDegreeFactor; + this.keyboardAdaptor = new KeyboardAdaptor({ + type: 'continuous', + dampingFactor: props.keyboardDampFactor || defaultProps$5.keyboardDampFactor, + incrementor: props.keyboardScaleFactor || defaultProps$5.keyboardScaleFactor, + }); + this.wheelAdaptor = new WheelAdaptor({ + type: 'continuous', + dampingFactor: props.wheelDampFactor || defaultProps$5.wheelDampFactor, + domElement: props.domElement || defaultProps$5.domElement, + }); + this.pointerAdaptor = new PointerAdaptor({ + domElement: props.domElement || defaultProps$5.domElement, + dampingFactor: props.pointerDampFactor || defaultProps$5.pointerDampFactor, + }); + this.onWheel = this.onWheel.bind(this); + this.onKey = this.onKey.bind(this); + this.onPointer = this.onPointer.bind(this); + } + isEnabled() { + return this.enabled; + } + enable() { + this.wheelAdaptor.connect(); + this.keyboardAdaptor.connect(); + this.pointerAdaptor.connect(); + this.wheelAdaptor.addEventListener('update', this.onWheel); + this.keyboardAdaptor.addEventListener('update', this.onKey); + this.pointerAdaptor.addEventListener('update', this.onPointer); + this.enabled = true; + } + disable() { + this.wheelAdaptor.disconnect(); + this.keyboardAdaptor.disconnect(); + this.pointerAdaptor.disconnect(); + this.wheelAdaptor.removeEventListener('update', this.onWheel); + this.keyboardAdaptor.removeEventListener('update', this.onKey); + this.pointerAdaptor.removeEventListener('update', this.onPointer); + this.enabled = false; + } + onWheel(event) { + this.cameraRig.do(exports.CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor); + this.cameraRig.do(exports.CameraAction.Truck, event.deltas.x * this.wheelScaleFactor); + } + onKey(event) { + this.cameraRig.do(exports.CameraAction.Dolly, event.values.backward - event.values.forward); + this.cameraRig.do(exports.CameraAction.Truck, event.values.right - event.values.left); + this.cameraRig.do(exports.CameraAction.Pedestal, event.values.up - event.values.down); + } + onPointer(event) { + switch (event.pointerCount) { + case 1: + this.cameraRig.do(exports.CameraAction.Pan, event.deltas.x * this.panDegreeFactor); + this.cameraRig.do(exports.CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor); + break; + case 2: + this.cameraRig.do(exports.CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor); + this.cameraRig.do(exports.CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor); + break; + } + } + update(time) { + if (this.enabled) { + this.keyboardAdaptor.update(); + this.wheelAdaptor.update(); + this.pointerAdaptor.update(time); + } + } + } + + const defaultProps$4 = { + domElement: document.body, + pointerDampFactor: 0.3, + pointerScaleFactor: 4, + keyboardDampFactor: 0.5, + keyboardScaleFactor: 0.5, + wheelDampFactor: 0.25, + wheelScaleFactor: 0.05, + panDegreeFactor: Math.PI / 4, + tiltDegreeFactor: Math.PI / 10, + }; + /** + * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events. + * @remarks + * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events. + * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera. + * + * + * Note: CSS property `touch-action: none` will probably be needed on listener element. + * + * See {@link three-story-controls#FreeMovementPlusControlsProps} for all properties that can be passed to the constructor. + * + * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO } + * + * @example + * ```js + * const scene = new Scene() + * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000) + * const cameraRig = new CameraRig(camera, scene) + * const controls = new FreeMovementPlusControls(cameraRig) + * + * controls.enable() + * + * // render loop + * function animate(t) { + * controls.update(t) + * } + * ``` + * + */ + class FreeMovementPlusControls { + /** {@inheritDoc three-story-controls#FreeMovementPlusControlsProps#} */ constructor(cameraRig, props = {}) { this.enabled = false; this.cameraRig = cameraRig; @@ -1192,6 +1316,9 @@ this.cameraRig.do(exports.CameraAction.Dolly, event.values.backward - event.values.forward); this.cameraRig.do(exports.CameraAction.Truck, event.values.right - event.values.left); this.cameraRig.do(exports.CameraAction.Pedestal, event.values.up - event.values.down); + this.cameraRig.do(exports.CameraAction.Roll, event.values.rollRight / 30 - event.values.rollLeft / 30); + this.cameraRig.do(exports.CameraAction.Tilt, event.values.tiltDown / 30 - event.values.tiltUp / 30); + this.cameraRig.do(exports.CameraAction.Pan, event.values.panLeft / 30 - event.values.panRight / 30); } onPointer(event) { switch (event.pointerCount) { @@ -2214,6 +2341,7 @@ exports.CameraRig = CameraRig; exports.Damper = Damper; exports.FreeMovementControls = FreeMovementControls; + exports.FreeMovementPlusControls = FreeMovementPlusControls; exports.KeyboardAdaptor = KeyboardAdaptor; exports.PathPointsControls = PathPointsControls; exports.PointerAdaptor = PointerAdaptor; diff --git a/dist/three-story-controls.js.map b/dist/three-story-controls.js.map index 1fdbb61..cdb29d6 100644 --- a/dist/three-story-controls.js.map +++ b/dist/three-story-controls.js.map @@ -1 +1 @@ -{"version":3,"file":"three-story-controls.js","sources":["../src/Damper.ts","../src/CameraRig.ts","../src/adaptors/BaseAdaptor.ts","../src/adaptors/KeyboardAdaptor.ts","../src/adaptors/PointerAdaptor.ts","../src/adaptors/ScrollAdaptor.ts","../src/adaptors/SwipeAdaptor.ts","../src/adaptors/WheelAdaptor.ts","../src/controlschemes/FreeMovementControls.ts","../src/controlschemes/ScrollControls.ts","../src/controlschemes/StoryPointsControls.ts","../src/controlschemes/PathPointsControls.ts","../src/controlschemes/ThreeDOFControls.ts","../node_modules/style-inject/dist/style-inject.es.js","../src/camerahelper/index.ts"],"sourcesContent":["export interface DamperValues {\n /** A value to dampen, set to its initial state */\n [key: string]: number | null\n}\n\nexport interface DamperProps {\n /** Values to be dampened */\n values: DamperValues\n /** Multiplier used on each update to approach the target value, should be between 0 and 1, where 1 is no damping */\n dampingFactor: number\n /** Amount of permitted error before a value is considered to have 'reached' its target. Defaults to 0.001 */\n epsilon?: number\n}\n\n/**\n * Damper uses simple linear damping for a given collection of values.\n * On every call to update, the damper will approach a given set of target values.\n * @example\n * ```js\n * const damper = new Damper({\n * values: {x: 0, y: 0},\n * dampingFactor: 0.4\n * })\n *\n * damper.setTarget({ x: 1, y: 100 })\n * damper.update() // would generally be called in an animation loop\n * const values = damper.getCurrentValues() // values.x = 0.4; values.y = 40\n * ```\n */\n\nexport class Damper {\n private dampingFactor: number\n private epsilon = 0.001\n private values: DamperValues = {}\n private targetValues: DamperValues = {}\n private deltaValues: DamperValues = {}\n private hasReached: boolean\n\n constructor(props: DamperProps) {\n Object.assign(this.values, props.values)\n Object.assign(this.targetValues, props.values)\n this.deltaValues = {}\n for (const key in this.values) {\n this.deltaValues[key] = 0\n }\n this.dampingFactor = props.dampingFactor\n if (props.epsilon) this.epsilon = props.epsilon\n this.hasReached = true\n }\n\n /**\n * Update the damper, should generally be called on every frame\n */\n update(): void {\n const deltas = {}\n let approached = true\n\n for (const key in this.values) {\n deltas[key] = this.targetValues[key] - this.values[key]\n approached = approached && Math.abs(deltas[key]) < this.epsilon\n }\n\n if (approached) {\n for (const key in this.values) {\n this.deltaValues[key] = deltas[key]\n this.values[key] = this.targetValues[key]\n }\n this.hasReached = true\n } else {\n for (const key in this.values) {\n this.deltaValues[key] = this.dampingFactor * deltas[key]\n this.values[key] += this.deltaValues[key]\n }\n }\n }\n\n /**\n * Set the target values the damper needs to approach\n * @param target DamperValues the damper needs to approach\n */\n setTarget(target: DamperValues): void {\n for (const key in target) {\n this.targetValues[key] = target[key]\n }\n this.hasReached = false\n }\n\n /**\n * Increment/Decrement a specifc damper target value\n * @param key The key of the value to modify\n * @param value The amount to modify the target by\n */\n addToTarget(key: string, value: number): void {\n this.targetValues[key] += value\n this.hasReached = false\n }\n\n /**\n * Reset all damper values to the fiven number\n * @param value Number to reset all damper values to\n */\n resetAll(value: number): void {\n for (const key in this.values) {\n this.targetValues[key] = value\n this.values[key] = value\n this.deltaValues[key] = 0\n }\n this.hasReached = true\n }\n\n /**\n * Reset damper values as described by the given DamperValues object\n * @param values DamperValues object to reset the damper to\n */\n resetData(values: DamperValues): void {\n for (const key in values) {\n this.targetValues[key] = values[key]\n this.values[key] = values[key]\n this.deltaValues[key] = 0\n }\n this.hasReached = true\n }\n\n /**\n * Get the current values\n * @returns DamperValues object with the current values of the damper\n */\n getCurrentValues(): DamperValues {\n return { ...this.values }\n }\n\n /**\n * Get the change in values since the last update call\n * @returns DamperValues object with the amount the values changed since the last `update()` call\n */\n getDeltaValues(): DamperValues {\n return { ...this.deltaValues }\n }\n\n /**\n * Whether the damper has reached its target\n * @returns Whether the damper has reached its target (within permissible error range)\n */\n reachedTarget(): boolean {\n return this.hasReached\n }\n}\n","import {\n Vector3,\n Quaternion,\n Object3D,\n Camera,\n PerspectiveCamera,\n Scene,\n AnimationMixer,\n AnimationClip,\n EventDispatcher,\n Euler,\n} from 'three'\n\nimport gsap from 'gsap'\n\n/**\n * Event: Fired when CameraRig starts a transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveStart', handlerFunction)\n * ```\n * */\nexport interface CameraMoveStartEvent {\n type: 'CameraMoveStart'\n}\n\n/**\n * Event: Fired on every tick of CameraRig's transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveUpdate', handlerFunction)\n * ```\n * */\nexport interface CameraMoveUpdateEvent {\n type: 'CameraMoveUpdate'\n /** Percentage of transition completed, between 0 and 1. */\n progress: number\n}\n\n/**\n * Event: Fired when CameraRig ends a transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveEnd', handlerFunction)\n * ```\n * */\nexport interface CameraMoveEndEvent {\n type: 'CameraMoveEnd'\n}\n\n/**\n * Enum of camera actions used to control a {@link three-story-controls#CameraRig}\n */\nexport enum CameraAction {\n Pan = 'Pan',\n Tilt = 'Tilt',\n Roll = 'Roll',\n Truck = 'Truck',\n Pedestal = 'Pedestal',\n Dolly = 'Dolly',\n Zoom = 'Zoom',\n}\n\n/**\n * Enum of {@link three-story-controls#CameraRig} parts\n */\nexport enum RigComponent {\n Body = 'body',\n Head = 'head',\n Eyes = 'eyes',\n}\n\n/**\n * Enum of axes\n */\nexport enum Axis {\n X = 'x',\n Y = 'y',\n Z = 'z',\n}\n\n/**\n * Describe whether rig should translate along current rotation in each action axis\n */\nexport interface TranslateGuide {\n [CameraAction.Pan]: boolean\n [CameraAction.Tilt]: boolean\n [CameraAction.Roll]: boolean\n}\n\n/**\n * Mapping of rotation action to axis\n */\nexport interface ActionAxes {\n [CameraAction.Pan]: Axis\n [CameraAction.Tilt]: Axis\n [CameraAction.Roll]: Axis\n}\n\nconst AxisVector = {\n [Axis.X]: new Vector3(1, 0, 0),\n [Axis.Y]: new Vector3(0, 1, 0),\n [Axis.Z]: new Vector3(0, 0, 1),\n}\n\nconst ActionMappingByUpAxis = {\n [Axis.X]: {\n [CameraAction.Pan]: Axis.X,\n [CameraAction.Tilt]: Axis.Z,\n [CameraAction.Roll]: Axis.Y,\n },\n [Axis.Y]: {\n [CameraAction.Pan]: Axis.Y,\n [CameraAction.Tilt]: Axis.X,\n [CameraAction.Roll]: Axis.Z,\n },\n [Axis.Z]: {\n [CameraAction.Pan]: Axis.Z,\n [CameraAction.Tilt]: Axis.Y,\n [CameraAction.Roll]: Axis.X,\n },\n}\n\n/**\n * The CameraRig holds the camera, and can respond to {@link three-story-controls#CameraAction}s such as Pan/Tilt/Dolly etc. It can also be controlled along a given path (in the form of an `AnimationClip`), or tweened to specified points.\n *\n * @remarks\n * The rig is constructed of three objects, analagous to a body, head and eyes. The camera is nested in the eyes and is never transformed directly.\n *\n * Instead of specifying the axis to rotate/translate the camera, {@link three-story-controls#CameraAction}s are used. The rotation order of actions is always `Pan` then `Tilt` then `Roll`.\n * The mapping of these actions to axes depends on the up axis, which defaults to `Y` (but can be changed with the {@link CameraRig.setUpAxis | setUpAxis() method}):\n *\n * * `CameraAction.Pan` rotates around the `Y` axis\n *\n * * `CameraAction.Tilt` rotates around the `X` axis\n *\n * * `CameraAction.Roll` rotates around the `Z` axis\n *\n * * `CameraAction.Dolly` translates on the `Z` axis\n *\n * * `CameraAction.Truck` translates on the `X` axis\n *\n * * `CameraAction.Pedestal` translates on the `Y` axis\n *\n * Translations will be applied to the 'body' of the rig, and rotations to the 'eyes'. If an animation clip is provided, or the camera is tweened to a specific location,\n * the rotations will be applied to the 'head', thus leaving the 'eyes' free to 'look around' from this base position.\n *\n * Additionally, the default setup assumes that the rig will move forward/backward (`Dolly`) in the direction the camera is panned to.\n * This can be configured through {@link CameraRig.translateAlong | translateAlong property}.\n * It can also be overwritten by providing the component name to the {@link CameraRig.do | do() method}, see {@link https://github.com/nytimes/three-story-controls/blob/main/src/controlschemes/ThreeDOFControls.ts#L96 | ThreeDOFControls implementation} for an example.\n *\n * To move the rig along a specified path, use the {@link CameraRig.setAnimationClip | setAnimationClip() method},\n * and set the names for the `Translation` and `Rotation` objects to match those of the clip. The clip should have a `VectorKeyframeTrack` for the outer position/translation object,\n * and a `QuaternionKeyframeTrack` for the inner orientation/rotation object.\n *\n * See {@link three-story-controls#CameraMoveStartEvent}, {@link three-story-controls#CameraMoveUpdateEvent} and {@link three-story-controls#CameraMoveEndEvent} for emitted event signatures.\n */\nexport class CameraRig extends EventDispatcher {\n readonly camera: Camera\n readonly scene: Scene\n private body: Object3D\n private head: Object3D\n private eyes: Object3D\n private cameraIsInRig: boolean\n private inTransit = false\n private upAxis: Axis = Axis.Y\n private actionAxes: ActionAxes = ActionMappingByUpAxis[this.upAxis]\n private hasAnimation = false\n private animationClip: AnimationClip\n private mixer: AnimationMixer\n private animationTranslationObjectName = 'Translation'\n private animationRotationObjectName = 'Rotation'\n\n public translateAlong: TranslateGuide = {\n [CameraAction.Tilt]: false,\n [CameraAction.Pan]: true,\n [CameraAction.Roll]: false,\n }\n\n // Constructor\n constructor(camera: Camera, scene: Scene) {\n super()\n this.camera = camera\n this.scene = scene\n this.body = new Object3D()\n this.head = new Object3D()\n this.eyes = new Object3D()\n this.head.name = this.animationRotationObjectName\n this.body.name = this.animationTranslationObjectName\n this.body.rotation.order = this.getRotationOrder()\n this.head.rotation.order = this.getRotationOrder()\n this.eyes.rotation.order = this.getRotationOrder()\n this.scene.add(this.body.add(this.head.add(this.eyes.add(this.camera))))\n this.cameraIsInRig = true\n this.unpackTransform()\n }\n\n /**\n * Get the axis for a given action\n * @param action\n * @returns x | y | z\n */\n getAxisFor(action: CameraAction): string {\n return this.actionAxes[action]\n }\n\n /**\n * Get the axis' vector for a given action\n * @param action\n * @returns Normalized vector for the axis\n */\n getAxisVectorFor(action: CameraAction): Vector3 {\n return AxisVector[this.actionAxes[action]]\n }\n\n /**\n * Main method for controlling the camera\n * @param action - Action to perform\n * @param amount - Amount to move/rotate/etc\n * @param rigComponent - Override the default component to perform the action on\n */\n do(action: CameraAction, amount: number, rigComponent?: RigComponent): void {\n const targetComponent = this[rigComponent]\n\n switch (action) {\n case CameraAction.Pan:\n case CameraAction.Tilt:\n case CameraAction.Roll: {\n const axis = this.getAxisVectorFor(action)\n if (targetComponent) {\n targetComponent.rotateOnAxis(axis, amount)\n } else if (this.translateAlong[action]) {\n this.body.rotateOnAxis(axis, amount)\n } else {\n this.eyes.rotateOnAxis(axis, amount)\n }\n break\n }\n\n case CameraAction.Truck: {\n const axis = this.getAxisVectorFor(CameraAction.Tilt)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Pedestal: {\n const axis = this.getAxisVectorFor(CameraAction.Pan)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Dolly: {\n const axis = this.getAxisVectorFor(CameraAction.Roll)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Zoom: {\n if (this.camera instanceof PerspectiveCamera) {\n this.camera.fov = amount\n this.camera.updateProjectionMatrix()\n }\n break\n }\n\n default:\n break\n }\n }\n\n /**\n * Get world position and orientation of the camera\n */\n getWorldCoordinates(): { position: Vector3; quaternion: Quaternion } {\n const position = new Vector3()\n this.camera.getWorldPosition(position)\n const quaternion = new Quaternion()\n this.camera.getWorldQuaternion(quaternion)\n return { position, quaternion }\n }\n\n /**\n * Sets world coordinates for the camera, and configures rig component transforms accordingly.\n * @param param0\n */\n setWorldCoordinates({ position, quaternion }: { position: Vector3; quaternion: Quaternion }): void {\n const currentRotation = new Euler().setFromQuaternion(quaternion, this.getRotationOrder())\n const actions = [CameraAction.Pan, CameraAction.Tilt, CameraAction.Roll]\n this.eyes.position.set(0, 0, 0)\n this.eyes.rotation.set(0, 0, 0)\n this.head.position.set(0, 0, 0)\n this.head.rotation.set(0, 0, 0)\n this.body.position.copy(position)\n actions.forEach((action) => {\n const axis = this.getAxisFor(action)\n if (this.translateAlong[action]) {\n this.body.rotation[axis] = currentRotation[axis]\n } else {\n this.eyes.rotation[axis] = currentRotation[axis]\n }\n })\n this.camera.rotation.set(0, 0, 0)\n this.camera.position.set(0, 0, 0)\n }\n\n /**\n * Packs transfrom into the body and head, and 0s out transforms of the eyes. Useful for preparing the\n * rig for control through an animation clip.\n */\n packTransform(): void {\n const { position, quaternion } = this.getWorldCoordinates()\n this.body.position.copy(position)\n this.body.rotation.set(0, 0, 0)\n this.head.quaternion.copy(quaternion)\n this.head.position.set(0, 0, 0)\n this.eyes.position.set(0, 0, 0)\n this.eyes.rotation.set(0, 0, 0)\n }\n\n /**\n * Unpacks the current camera world coordinates and distributes transforms\n * across the rig componenets.\n */\n unpackTransform(): void {\n const { position, quaternion } = this.getWorldCoordinates()\n this.setWorldCoordinates({ position, quaternion })\n }\n\n /**\n * Disassemble the camera from the rig and attach it to the scene.\n */\n disassemble(): void {\n if (this.cameraIsInRig) {\n this.scene.attach(this.camera)\n this.cameraIsInRig = false\n }\n }\n\n /**\n * Place the camera back in the rig\n */\n assemble(): void {\n if (!this.cameraIsInRig) {\n this.eyes.attach(this.camera)\n this.unpackTransform()\n this.cameraIsInRig = true\n }\n }\n\n /**\n * Get the rotation order as a string compatible with what three.js uses\n */\n getRotationOrder(): string {\n return Object.values(this.actionAxes).join('').toUpperCase()\n }\n\n /**\n * Whether the camera is currently attached to the rig\n */\n isInRig(): boolean {\n return this.cameraIsInRig\n }\n\n /**\n * If the camera is in the middle of a transition\n */\n isMoving(): boolean {\n return this.inTransit\n }\n\n /**\n * Set the up axis for the camera\n * @param axis - New Up axis\n */\n setUpAxis(axis: Axis): void {\n this.upAxis = axis\n this.actionAxes = ActionMappingByUpAxis[this.upAxis]\n this.body.rotation.order = this.getRotationOrder()\n }\n\n /**\n * Set an animation clip for the rig\n * @param {AnimationClip} clip - AnimationClip containing a VectorKeyFrameTrack for position and a QuaternionKeyFrameTrack for rotation\n * @param {string} translationObjectName - Name of translation object\n * @param {string} rotationObjectName - Name of rotation object\n */\n setAnimationClip(clip: AnimationClip, translationObjectName?: string, rotationObjectName?: string): void {\n this.animationClip = clip\n if (translationObjectName) this.animationTranslationObjectName = translationObjectName\n if (rotationObjectName) this.animationRotationObjectName = rotationObjectName\n this.hasAnimation = true\n // hack. threejs skips last frame when seek time = clip duration\n this.animationClip.duration += 0.01\n this.mixer = new AnimationMixer(this.body)\n const action = this.mixer.clipAction(this.animationClip)\n action.clampWhenFinished = true\n action.play()\n }\n\n /**\n * Transition to a specific position and orientation in world space.\n * Transform on eyes will be reset to 0 as a result of this.\n * @param position\n * @param quaternion\n * @param duration\n * @param ease\n * @param useSlerp\n */\n flyTo(position: Vector3, quaternion: Quaternion, duration = 1, ease = 'power1', useSlerp = true): void {\n if (!this.isMoving()) {\n const currentCoords = this.getWorldCoordinates()\n const currentValues = {\n px: currentCoords.position.x,\n py: currentCoords.position.y,\n pz: currentCoords.position.z,\n qx: currentCoords.quaternion.x,\n qy: currentCoords.quaternion.y,\n qz: currentCoords.quaternion.z,\n qw: currentCoords.quaternion.w,\n slerpAmt: 0,\n }\n const targetValues = {\n px: position.x,\n py: position.y,\n pz: position.z,\n qx: quaternion.x,\n qy: quaternion.y,\n qz: quaternion.z,\n qw: quaternion.w,\n slerpAmt: 1,\n }\n const tempQuaternion = new Quaternion()\n const startQuaternion = new Quaternion(currentValues.qx, currentValues.qy, currentValues.qz, currentValues.qw)\n const onStart = (): void => {\n this.inTransit = true\n this.packTransform()\n this.dispatchEvent({ type: 'CameraMoveStart' } as CameraMoveStartEvent)\n }\n const onUpdate = (tween): void => {\n this.body.position.set(currentValues.px, currentValues.py, currentValues.pz)\n if (useSlerp) {\n tempQuaternion.slerpQuaternions(startQuaternion, quaternion, currentValues.slerpAmt)\n this.head.setRotationFromQuaternion(tempQuaternion)\n } else {\n this.head.quaternion.set(currentValues.qx, currentValues.qy, currentValues.qz, currentValues.qw)\n }\n this.dispatchEvent({\n type: 'CameraMoveUpdate',\n progress: tween.progress(),\n } as CameraMoveUpdateEvent)\n }\n const onComplete = (): void => {\n this.inTransit = false\n this.unpackTransform()\n this.dispatchEvent({ type: 'CameraMoveEnd' } as CameraMoveEndEvent)\n }\n gsap.to(currentValues, {\n duration,\n ease,\n ...targetValues,\n onStart,\n onUpdate: function () {\n onUpdate(this)\n },\n onComplete,\n })\n }\n }\n\n /**\n * Transition to a specific keyframe on the animation clip\n * Transform on eyes will be reset to 0 as a result of this.\n * @param frame - frame\n * @param duration - duration\n * @param ease - ease\n */\n flyToKeyframe(frame: number, duration = 1, ease = 'power1'): void {\n if (this.hasAnimation && !this.isMoving()) {\n const currentValues = {\n time: this.mixer.time,\n }\n const targetValues = {\n time: this.animationClip.tracks[0].times[frame],\n }\n const onStart = (): void => {\n this.inTransit = true\n this.dispatchEvent({ type: 'CameraMoveStart' } as CameraMoveStartEvent)\n }\n const onUpdate = (tween): void => {\n this.mixer.setTime(currentValues.time)\n this.dispatchEvent({\n type: 'CameraMoveUpdate',\n progress: tween.progress(),\n } as CameraMoveUpdateEvent)\n }\n const onComplete = (): void => {\n this.inTransit = false\n this.dispatchEvent({ type: 'CameraMoveEnd' } as CameraMoveEndEvent)\n }\n gsap.to(currentValues, {\n duration,\n ease,\n ...targetValues,\n onStart,\n onUpdate: function () {\n onUpdate(this)\n },\n onComplete,\n })\n }\n }\n\n /**\n * @param percentage - percentage of animation clip to move to, between 0 and 1\n */\n setAnimationPercentage(percentage: number): void {\n if (this.hasAnimation) {\n const percent = Math.max(\n 0,\n Math.min(percentage * this.animationClip.duration, this.animationClip.duration - 0.0001),\n )\n this.mixer.setTime(percent)\n }\n }\n\n /**\n * @param time - timestamp of animation clip to move to\n */\n setAnimationTime(time: number): void {\n if (this.hasAnimation) this.mixer.setTime(time)\n }\n\n /**\n * @param frame - frame of animation clip to move to\n */\n setAnimationKeyframe(frame: number): void {\n if (this.hasAnimation) this.mixer.setTime(this.animationClip.tracks[0].times[frame])\n }\n}\n","import { EventDispatcher } from 'three'\n\nexport abstract class BaseAdaptor extends EventDispatcher {\n constructor() {\n super()\n }\n abstract connect(): void\n abstract disconnect(): void\n abstract update(time?: number): void\n abstract isEnabled(): boolean\n}\n\nexport interface DiscreteEvent {\n type: 'trigger'\n}\n\nexport interface ContinuousEvent {\n type: 'update'\n}\n\nexport interface IntertiaCompleteEvent {\n type: 'inertiacomplete'\n}\n","import { BaseAdaptor, DiscreteEvent, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when a key in a `discrete` KeyboardAdaptor's mapping is released (`onKeyUp`)\n * @example\n * ```javascript\n * adaptor.on('trigger', () => { // do something })\n * ```\n * */\nexport interface KeyboardAdaptorDiscreteEvent extends DiscreteEvent {\n /** KeyMapping key that triggered the event */\n trigger: string\n}\n\n/**\n * Event: Fired when a key in a `continuous` KeyboardAdaptor's mapping is pressed (`onKeyDown`)\n * @example\n * ```javascript\n * adaptor.on('update', () => { // do something })\n * ```\n * */\nexport interface KeyboardAdaptorContinuousEvent extends ContinuousEvent {\n values: DamperValues\n deltas: DamperValues\n}\n\n/**\n * A discrete adaptor works as a trigger - only firing events on keyup,\n * whereas a continuous adaptor continuously fires events on keydown\n * */\nexport type KeyboardAdaptorType = 'discrete' | 'continuous'\n\n/**\n * Key-value pairs of semantic labels associated with an array of keys (corresponding to `KeybordEvent.keys` values)\n */\nexport interface KeyMapping {\n /** The key is a semantic label, and the string[] is a corresponding collection of event.keys */\n [key: string]: string[]\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#KeyboardAdaptor} constructor\n */\nexport interface KeyboardAdaptorProps {\n /** 'discrete' or 'continuous' */\n type: KeyboardAdaptorType\n /**\n * Default key mapping uses forward/backward/up/down/left/right as semanic labels, with WASD and arrow keys mapped appropriately:\n * @example keyMapping\n * ```javascript\n * {\n * forward: ['ArrowUp', 'w', 'W'],\n * backward: ['ArrowDown', 's', 'S'],\n * left: ['ArrowLeft', 'a', 'A'],\n * right: ['ArrowRight', 'd', 'D'],\n * up: ['u', 'U'],\n * down: ['n', 'N'],\n * }\n * ```\n * */\n keyMapping?: KeyMapping\n /** Only used for continuous adaptor, value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Only used for continuous adaptor, the amount to increment the target value on each keydown event. Defaults to 1 */\n incrementor?: number\n /** Prevent event bubbling. Defaults to true */\n preventBubbling?: boolean\n}\n\nconst defaultProps: Partial = {\n keyMapping: {\n forward: ['ArrowUp', 'w', 'W'],\n backward: ['ArrowDown', 's', 'S'],\n left: ['ArrowLeft', 'a', 'A'],\n right: ['ArrowRight', 'd', 'D'],\n up: ['u', 'U'],\n down: ['n', 'N'],\n },\n dampingFactor: 0.5,\n incrementor: 1,\n preventBubbling: true,\n}\n\n/**\n * Parse keyboard events and emit either dampened values for continuous keypresses, or trigger events named according to a provided keymapping.\n * @remarks\n * See {@link three-story-controls#KeyboardAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#KeyboardAdaptorDiscreteEvent} and {@link three-story-controls#KeyboardAdaptorContinuousEvent} for emitted event signatures.\n * @example Continuous adaptor\n * ```javascript\n * const keyboardAdaptor = new KeyboardAdaptor({ type: 'continuous', dampingFactor: 0.2 })\n * keyboardAdaptor.connect()\n * keyboardAdaptor.addEventListener('update', (event) => {\n * cube.rotation.y += event.deltas.right - event.deltas.left\n * cube.rotation.x += event.deltas.up - event.deltas.down\n * )}\n * function animate() {\n * keyboardAdaptor.update()\n * window.requestAnimationFrame(animate)\n * }\n * animate()\n * ```\n */\nexport class KeyboardAdaptor extends BaseAdaptor {\n private type: KeyboardAdaptorType\n private damper: Damper\n private dampingFactor: number\n private incrementor: number\n private keyMapping: KeyMapping\n private connected: boolean\n private preventBubbling: boolean\n\n constructor(props: KeyboardAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n const values = {}\n for (const key in this.keyMapping) {\n values[key] = 0\n }\n this.damper = new Damper({\n values,\n dampingFactor: this.dampingFactor,\n })\n this.onKeyUp = this.onKeyUp.bind(this)\n this.onKeyDown = this.onKeyDown.bind(this)\n }\n\n connect(): void {\n document.addEventListener('keyup', this.onKeyUp, true)\n document.addEventListener('keydown', this.onKeyDown, true)\n this.connected = true\n }\n\n disconnect(): void {\n document.removeEventListener('keyup', this.onKeyUp, true)\n document.removeEventListener('keydown', this.onKeyDown, true)\n this.connected = false\n }\n\n update(): void {\n if (this.type === 'continuous' && !this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.damper.getCurrentValues(),\n deltas: this.damper.getDeltaValues(),\n } as KeyboardAdaptorContinuousEvent)\n if (this.damper.reachedTarget()) {\n this.damper.resetAll(0)\n this.dispatchEvent({\n type: 'inertiacomplete',\n } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onKeyUp(event: KeyboardEvent): void {\n if (this.type === 'discrete') {\n for (const name in this.keyMapping) {\n if (this.keyMapping[name].includes(event.key)) {\n if (this.preventBubbling) event.preventDefault()\n this.dispatchEvent({\n type: 'trigger',\n trigger: name,\n } as KeyboardAdaptorDiscreteEvent)\n break\n }\n }\n }\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n if (this.type === 'continuous') {\n for (const name in this.keyMapping) {\n if (this.keyMapping[name].includes(event.key)) {\n if (this.preventBubbling) event.preventDefault()\n this.damper.addToTarget(name, this.incrementor)\n break\n }\n }\n }\n }\n}\n","import { BaseAdaptor, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\ninterface Coordinates extends DamperValues {\n x: number\n y: number\n}\n\n/**\n * Event: Fired when when `PointerEvent`s are triggered\n * @example\n * ```javascript\n * adaptor.on('trigger', (e) => {\n * console.log('x/y coordinates', e.values.x, e.values.y)\n * })\n * ```\n * */\nexport interface PointerAdaptorEvent extends ContinuousEvent {\n /** Dampened x and y pointer coordinates */\n values: Coordinates\n /** Pointer coordinate change since previous update */\n deltas: Coordinates\n /** Number of pointers registered */\n pointerCount: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#PointerAdaptor} constructor\n */\nexport interface PointerAdaptorProps {\n /** DOM element that should listen for pointer events. Defaults to `document.body` */\n domElement?: HTMLElement\n /** Damping value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Whether to normalize the pointer position values. Defaults to true */\n shouldNormalize?: boolean\n /** If values are normalized, whether they should be in -1 to 1 range. Defaults to true. */\n normalizeAroundZero?: boolean\n /** Debounce for registering a change in the pointer count, in ms. Defaults to 100. */\n multipointerThreshold?: number\n}\n\nconst defaultProps: PointerAdaptorProps = {\n domElement: document.body,\n dampingFactor: 0.5,\n shouldNormalize: true,\n normalizeAroundZero: true,\n multipointerThreshold: 100,\n}\n\n/**\n * Parse pointer events to emit dampened, normalized coordinates along with the pointer count (for detecting multi-touch or drag events)\n * @remarks\n * See {@link three-story-controls#PointerAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#PointerAdaptorEvent} for emitted event signatures.\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n * @example Pointer adaptor\n * ```javascript\n * const pointerAdaptor = new PointerAdaptor()\n * pointerAdaptor.connect()\n * pointerAdaptor.addEventListener('update', (event) => {\n * switch(event.pointerCount) {\n * case 0:\n * cube.scale.x = event.values.x\n * cube.scale.y = event.values.y\n * break\n * case 1:\n * cube.position.x += event.deltas.x\n * cube.position.y -= event.deltas.y\n * break\n * default:\n * break\n * }\n * })\n *\n * // in RAF loop:\n * function animate(t) {\n * pointerAdaptor.update(t)\n * }\n * ```\n */\nexport class PointerAdaptor extends BaseAdaptor {\n private domElement = document.body\n private dampingFactor: number\n private shouldNormalize = true\n private normalizeAroundZero = true\n private multipointerThreshold: number\n private damper: Damper\n private connected: boolean\n private width: number\n private height: number\n private pointerCount = 0\n private recordedPosition = false\n private cache: Array = []\n private lastDownTime = 0\n private lastUpTime = 0\n\n constructor(props: PointerAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.damper = new Damper({\n values: { x: null, y: null },\n dampingFactor: this.dampingFactor,\n })\n this.setDimensions()\n this.onPointerMove = this.onPointerMove.bind(this)\n this.onPointerUp = this.onPointerUp.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n this.onResize = this.onResize.bind(this)\n }\n\n connect(): void {\n this.domElement.addEventListener('pointermove', this.onPointerMove, { passive: true })\n this.domElement.addEventListener('pointerdown', this.onPointerDown, { passive: true })\n this.domElement.addEventListener('pointerleave', this.onPointerUp, { passive: true })\n this.domElement.addEventListener('pointerup', this.onPointerUp, { passive: true })\n window.addEventListener('resize', this.onResize)\n this.connected = true\n }\n\n disconnect(): void {\n this.domElement.removeEventListener('pointermove', this.onPointerMove)\n this.domElement.removeEventListener('pointerdown', this.onPointerDown)\n this.domElement.removeEventListener('pointerleave', this.onPointerUp)\n this.domElement.removeEventListener('pointerup', this.onPointerUp)\n this.connected = false\n }\n\n update(time: number): void {\n if (\n this.pointerCount !== this.cache.length &&\n time - this.lastDownTime > this.multipointerThreshold &&\n time - this.lastUpTime > this.multipointerThreshold\n ) {\n this.pointerCount = this.cache.length\n if (this.pointerCount === 0) {\n this.damper.resetAll(null)\n this.recordedPosition = false\n } else {\n this.damper.resetData(this.getPointerPosition(this.cache[0]))\n this.recordedPosition = true\n }\n }\n\n if (!this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.shouldNormalize\n ? this.normalize(this.damper.getCurrentValues() as Coordinates, this.normalizeAroundZero)\n : this.damper.getCurrentValues(),\n deltas: this.shouldNormalize\n ? this.normalize(this.damper.getDeltaValues() as Coordinates, false)\n : this.damper.getDeltaValues(),\n pointerCount: this.pointerCount,\n } as PointerAdaptorEvent)\n if (this.damper.reachedTarget()) {\n this.dispatchEvent({ type: 'inertiacomplete' } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private setDimensions(): void {\n this.width = this.domElement.getBoundingClientRect().width\n this.height = this.domElement.getBoundingClientRect().height\n }\n\n private getPointerPosition(event: PointerEvent): Coordinates {\n // event.offsetLeft is still experimental\n return {\n x: Math.max(0, Math.min(this.width, event.x - this.domElement.offsetLeft)),\n y: Math.max(0, Math.min(this.height, event.y - this.domElement.offsetTop)),\n }\n }\n\n private normalize(values: Coordinates, aroundZero: boolean): Coordinates {\n let x = values.x / this.width\n let y = values.y / this.height\n if (aroundZero) {\n x = x * 2 - 1\n y = y * 2 - 1\n }\n return { x, y }\n }\n\n private onPointerMove(event: PointerEvent): void {\n if (this.pointerCount === this.cache.length) {\n if (this.cache.length === 0) {\n if (!this.recordedPosition) {\n this.damper.resetData(this.getPointerPosition(event))\n this.recordedPosition = true\n } else {\n this.damper.setTarget(this.getPointerPosition(event))\n }\n } else {\n if (event.pointerId === this.cache[0].pointerId) {\n this.damper.setTarget(this.getPointerPosition(event))\n }\n }\n }\n }\n\n private onPointerDown(event: PointerEvent): void {\n // only deals with left mouse button right now\n // TODO: add some logic for optional right button events\n if (event.button === 0) {\n this.cache.push(event)\n this.lastDownTime = window.performance.now()\n }\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (event.button === 0 || event.type === 'pointerleave') {\n for (let i = 0; i < this.cache.length; i++) {\n if (this.cache[i].pointerId == event.pointerId) {\n this.cache.splice(i, 1)\n break\n }\n }\n this.lastUpTime = window.performance.now()\n }\n }\n\n private onResize(): void {\n this.setDimensions()\n }\n}\n","import { BaseAdaptor, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when when the 'in view' amount of the given DOM element changes\n */\nexport interface ScrollAdaptorEvent extends ContinuousEvent {\n values: DamperValues\n dampenedValues: DamperValues\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ScrollAdaptor} constructor\n */\nexport interface ScrollAdaptorProps {\n /** Long DOM Element to observe */\n scrollElement: HTMLElement\n /** Offset to start registering scroll, in px or vh. Default starts when top of element is at bottom of viewport. */\n startOffset?: string\n /** Offset to end registering scroll, in px or vh. Default ends when bottom of element is at top of viewport. */\n endOffset?: string\n /** Buffer before and after element to start registering scroll. Number between 0 and 1, defaults to 0.1 */\n buffer?: number\n /** Value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n}\n\nconst defaultProps: Partial = {\n startOffset: '0px',\n endOffset: '0px',\n buffer: 0.1,\n dampingFactor: 0.5,\n}\n\n/**\n * Emits normalized values for the amount a given DOM element has been scrolled through.\n * @remarks\n * See {@link three-story-controls#ScrollAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#ScrollAdaptorEvent} for emitted event signatures.\n * @example Scroll adaptor\n * ```javascript\n * const scrollAdaptor = new ScrollAdaptor({ scrollElement: document.querySelector('.scroller'), dampingFactor: 0.1 })\n * scrollAdaptor.connect()\n * scrollAdaptor.addEventListener('update', (event) => {\n * cube.rotation.y = event.dampenedValues.scrollPercent*Math.PI*2\n * })\n * ```\n */\nexport class ScrollAdaptor extends BaseAdaptor {\n private scrollElement: HTMLElement\n private damper: Damper\n private dampingFactor: number\n private connected: boolean\n private values: DamperValues\n private lastSeenScrollValue: number\n private previousScrollValue: number\n private startPosition: number\n private endPosition: number\n private distance: number\n private bufferedStartPosition: number\n private bufferedEndPosition: number\n private startOffset: string\n private endOffset: string\n private buffer: number\n private resizeObserver: ResizeObserver\n\n constructor(props: ScrollAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.lastSeenScrollValue = window.scrollY || -1\n this.previousScrollValue = this.lastSeenScrollValue\n this.values = {\n scrollPx: null,\n scrollPercent: null,\n }\n this.damper = new Damper({\n values: this.values,\n dampingFactor: this.dampingFactor,\n })\n this.calculateDimensions = this.calculateDimensions.bind(this)\n this.onScroll = this.onScroll.bind(this)\n this.resizeObserver = new ResizeObserver(this.calculateDimensions)\n this.calculateDimensions()\n }\n\n connect(): void {\n window.addEventListener('scroll', this.onScroll, { passive: true })\n this.resizeObserver.observe(document.body)\n this.connected = true\n }\n\n disconnect(): void {\n window.removeEventListener('scroll', this.onScroll)\n this.resizeObserver.unobserve(document.body)\n this.connected = false\n }\n\n update(): void {\n if (\n this.lastSeenScrollValue !== this.previousScrollValue &&\n this.lastSeenScrollValue >= this.bufferedStartPosition &&\n this.lastSeenScrollValue <= this.bufferedEndPosition\n ) {\n const scrollPx = Math.max(0, Math.min(this.distance, this.lastSeenScrollValue - this.startPosition))\n const scrollPercent = Math.max(0, Math.min(1, scrollPx / this.distance))\n this.values = {\n scrollPx,\n scrollPercent,\n }\n this.damper.setTarget(this.values)\n this.previousScrollValue = this.lastSeenScrollValue\n }\n if (!this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.values,\n dampenedValues: this.damper.getCurrentValues(),\n } as ScrollAdaptorEvent)\n if (this.damper.reachedTarget()) {\n this.dispatchEvent({ type: 'inertiacomplete' } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n parseOffset(offset: string): number {\n let amount = 0\n if (offset) {\n amount = parseInt(offset)\n if (offset.indexOf('vh') !== -1) {\n amount = (amount * window.innerHeight) / 100\n } else if (this.distance && offset.indexOf('%') !== -1) {\n amount = (amount * this.distance) / 100\n }\n }\n return amount\n }\n\n private calculateOffset(element: HTMLElement): number {\n if (!element) return 0\n return this.calculateOffset(element.offsetParent as HTMLElement) + element.offsetTop\n }\n\n private calculateDimensions(): void {\n const elementHeight = this.scrollElement.clientHeight\n const offsetTop = this.calculateOffset(this.scrollElement)\n this.startPosition = offsetTop - window.innerHeight + this.parseOffset(this.startOffset)\n this.endPosition = offsetTop + elementHeight + this.parseOffset(this.endOffset)\n this.distance = this.endPosition - this.startPosition\n this.bufferedStartPosition = Math.max(0, this.startPosition * (1 - this.buffer))\n this.bufferedEndPosition = Math.min(\n this.endPosition * (1 + this.buffer),\n document.body.getBoundingClientRect().height,\n )\n }\n\n private onScroll(): void {\n this.lastSeenScrollValue = window.scrollY\n }\n}\n","import { BaseAdaptor, DiscreteEvent } from './BaseAdaptor'\n\n/**\n * Event: Fired when when swipe are registered\n * @remarks\n * The sign represents the direction of the swipe,\n * y = 1 when swiping down-to-up, and x = 1 when swiping left-to-right\n * */\nexport interface SwipeAdaptorEvent extends DiscreteEvent {\n x: -1 | 1 | 0\n y: -1 | 1 | 0\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#SwipeAdaptor} constructor\n */\nexport interface SwipeAdaptorProps {\n /** DOM element to listen to events on. Defaults to document.body */\n domElement?: HTMLElement\n /** Threshold of pointer's deltaX to trigger events. Defaults to 60 */\n thresholdX?: number\n /** Threshold of pointer's deltaY to trigger events. Defaults to 60 */\n thresholdY?: number\n}\n\nconst defaultProps: SwipeAdaptorProps = {\n domElement: document.body,\n thresholdX: 60,\n thresholdY: 60,\n}\n\n/**\n * Emits events in response to swipe gestures above a given threshold.\n * @remarks\n * See {@link three-story-controls#SwipeAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#SwipeAdaptorEvent} for emitted event signatures.\n * Note: CSS property `touch-action: none` will probably be needed on listener element\n * @example Swipe adaptor\n * ```javascript\n * const swipeAdaptor = new SwipeAdaptor()\n * swipeAdaptor.connect()\n * swipeAdaptor.addEventListener('trigger', (event) => {\n * cube.scale.y += event.y*0.1\n * })\n * ```\n */\nexport class SwipeAdaptor extends BaseAdaptor {\n private domElement: HTMLElement\n private thresholdX: number\n private thresholdY: number\n private startX: number\n private startY: number\n private connected: boolean\n\n constructor(props: SwipeAdaptorProps = {}) {\n super()\n Object.assign(this, defaultProps, props)\n this.onPointerUp = this.onPointerUp.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n }\n\n connect(): void {\n this.domElement.addEventListener('pointerdown', this.onPointerDown, { passive: true })\n this.domElement.addEventListener('pointerup', this.onPointerUp, { passive: true })\n this.connected = true\n }\n\n disconnect(): void {\n this.domElement.removeEventListener('pointerdown', this.onPointerDown)\n this.domElement.removeEventListener('pointerup', this.onPointerUp)\n this.connected = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onPointerDown(event: PointerEvent): void {\n if (event.pointerType !== 'mouse' && event.isPrimary) {\n this.startX = event.screenX\n this.startY = event.screenY\n }\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (event.pointerType !== 'mouse' && event.isPrimary) {\n const diffX = event.screenX - this.startX\n const diffY = event.screenY - this.startY\n if (Math.abs(diffX) >= this.thresholdX || Math.abs(diffY) >= this.thresholdY) {\n this.dispatchEvent({\n type: 'trigger',\n x: Math.abs(diffX) >= this.thresholdX ? Math.sign(diffX) : 0,\n y: Math.abs(diffY) >= this.thresholdY ? Math.sign(-1 * diffY) : 0,\n } as SwipeAdaptorEvent)\n }\n }\n }\n}\n","import { BaseAdaptor, DiscreteEvent, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when when discrete `wheel` events are registered\n * @remarks\n * The sign represents the the direction of the wheel event that caused the event to trigger\n * */\nexport interface WheelAdaptorDiscreteEvent extends DiscreteEvent {\n x: -1 | 1 | 0\n y: -1 | 1 | 0\n}\n\n/**\n * Event: Fired on a continuous `WheelAdaptor` in response to `wheel` events\n * @remarks\n * DamperValues have `x` and `y` keys.\n * */\nexport interface WheelAdaptorContinuousEvent extends ContinuousEvent {\n values: DamperValues\n deltas: DamperValues\n}\n\n/**\n * A discrete adaptor works as a trigger - only firing events when wheel events pass a given threshold,\n * whereas a continuous adaptor continuously fires events on wheel\n * */\nexport type WheelAdaptorType = 'discrete' | 'continuous'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#WheelAdaptor} constructor\n */\nexport interface WheelAdaptorProps {\n /** 'discrete' or 'continuous' */\n type: WheelAdaptorType\n /** DOM element to listen to events on. Defaults to window */\n domElement?: HTMLElement\n /** Only used for continuous adaptor, value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Only used for discrete adaptor, threshold of wheel.deltaX to trigger events. Defaults to 15 */\n thresholdX?: number\n /** Only used for discrete adaptor, threshold of wheel.deltaY to trigger events. Defaults to 15 */\n thresholdY?: number\n /** Only used for discrete adaptor, rest duration between firing trigger events. Defaults to 700 */\n debounceDuration?: number\n}\n\nconst defaultProps: Partial = {\n dampingFactor: 0.5,\n thresholdX: 15,\n thresholdY: 15,\n debounceDuration: 700,\n}\n\n/**\n * Parse mouse wheel events and emit either dampened values, or trigger events for swipes that cross a given threshold.\n * @remarks\n * See {@link three-story-controls#WheelAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#WheelAdaptorDiscreteEvent} and {@link three-story-controls#WheelAdaptorContinuousEvent} for emitted event signatures.\n * @example Discrete adaptor\n * ```javascript\n * const wheelAdaptor = new WheelAdaptor({ type: 'discrete' })\n * wheelAdaptor.connect()\n * wheelAdaptor.addEventListener('trigger', (event) => {\n * cube.scale.y += event.y*0.1\n * })\n * ```\n */\nexport class WheelAdaptor extends BaseAdaptor {\n private type: WheelAdaptorType\n private domElement: HTMLElement\n private dampingFactor: number\n private damper: Damper\n private thresholdX: number\n private thresholdY: number\n private debounceDuration: number\n private lastThresholdTrigger = 0\n private connected: boolean\n\n constructor(props: WheelAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.damper = new Damper({\n values: { x: 0, y: 0 },\n dampingFactor: this.dampingFactor,\n })\n this.onWheel = this.onWheel.bind(this)\n }\n\n connect(): void {\n const element = this.domElement || window\n element.addEventListener('wheel', this.onWheel, { passive: true })\n this.connected = true\n }\n\n disconnect(): void {\n const element = this.domElement || window\n element.removeEventListener('wheel', this.onWheel)\n this.connected = false\n }\n\n update(): void {\n if (this.type === 'continuous' && !this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.damper.getCurrentValues(),\n deltas: this.damper.getDeltaValues(),\n } as WheelAdaptorContinuousEvent)\n if (this.damper.reachedTarget()) {\n this.damper.resetAll(0)\n this.dispatchEvent({\n type: 'inertiacomplete',\n } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onWheel(event: WheelEvent): void {\n if (this.type === 'continuous') {\n this.damper.addToTarget('x', event.deltaX)\n this.damper.addToTarget('y', event.deltaY)\n } else if (this.type === 'discrete') {\n if (Math.abs(event.deltaX) >= this.thresholdX || Math.abs(event.deltaY) >= this.thresholdY) {\n const now = window.performance.now()\n if (now - this.lastThresholdTrigger > this.debounceDuration) {\n this.lastThresholdTrigger = now\n this.dispatchEvent({\n type: 'trigger',\n x: Math.abs(event.deltaX) >= this.thresholdX ? Math.sign(event.deltaX) : 0,\n y: Math.abs(event.deltaY) >= this.thresholdY ? Math.sign(event.deltaY) : 0,\n } as WheelAdaptorDiscreteEvent)\n }\n }\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#FreeMovementControls} constructor\n */\nexport interface FreeMovementControlsProps {\n domElement?: HTMLElement\n /** Damping factor between 0 and 1. Defaults to 0.3 */\n pointerDampFactor?: number\n /** Mutiplier for two-pointer translation. Defaults to 4 */\n pointerScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.5 */\n keyboardDampFactor?: number\n /** Mutiplier for keyboard translation. Defaults to 0.5 */\n keyboardScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.25 */\n wheelDampFactor?: number\n /** Mutiplier for wheel translation. Defaults to 0.05 */\n wheelScaleFactor?: number\n /** Mutiplier for panning. Defaults to Math.PI / 4 */\n panDegreeFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 10 */\n tiltDegreeFactor?: number\n}\n\nconst defaultProps: FreeMovementControlsProps = {\n domElement: document.body,\n pointerDampFactor: 0.3,\n pointerScaleFactor: 4,\n keyboardDampFactor: 0.5,\n keyboardScaleFactor: 0.5,\n wheelDampFactor: 0.25,\n wheelScaleFactor: 0.05,\n panDegreeFactor: Math.PI / 4,\n tiltDegreeFactor: Math.PI / 10,\n}\n\n/**\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * @remarks\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#FreeMovementControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n *\n */\nexport class FreeMovementControls implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private wheelAdaptor: WheelAdaptor\n private pointerAdaptor: PointerAdaptor\n private wheelScaleFactor: number\n private pointerScaleFactor: number\n private panDegreeFactor: number\n private tiltDegreeFactor: number\n private enabled = false\n\n /** {@inheritDoc three-story-controls#FreeMovementControlsProps#} */\n constructor(cameraRig: CameraRig, props: FreeMovementControlsProps = {}) {\n this.cameraRig = cameraRig\n\n this.wheelScaleFactor = props.wheelScaleFactor || defaultProps.wheelScaleFactor\n this.pointerScaleFactor = props.pointerScaleFactor || defaultProps.pointerScaleFactor\n this.panDegreeFactor = props.panDegreeFactor || defaultProps.panDegreeFactor\n this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps.tiltDegreeFactor\n\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'continuous',\n dampingFactor: props.keyboardDampFactor || defaultProps.keyboardDampFactor,\n incrementor: props.keyboardScaleFactor || defaultProps.keyboardScaleFactor,\n })\n\n this.wheelAdaptor = new WheelAdaptor({\n type: 'continuous',\n dampingFactor: props.wheelDampFactor || defaultProps.wheelDampFactor,\n domElement: props.domElement || defaultProps.domElement,\n })\n\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.pointerDampFactor || defaultProps.pointerDampFactor,\n })\n\n this.onWheel = this.onWheel.bind(this)\n this.onKey = this.onKey.bind(this)\n this.onPointer = this.onPointer.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.wheelAdaptor.connect()\n this.keyboardAdaptor.connect()\n this.pointerAdaptor.connect()\n this.wheelAdaptor.addEventListener('update', this.onWheel)\n this.keyboardAdaptor.addEventListener('update', this.onKey)\n this.pointerAdaptor.addEventListener('update', this.onPointer)\n this.enabled = true\n }\n\n disable(): void {\n this.wheelAdaptor.disconnect()\n this.keyboardAdaptor.disconnect()\n this.pointerAdaptor.disconnect()\n this.wheelAdaptor.removeEventListener('update', this.onWheel)\n this.keyboardAdaptor.removeEventListener('update', this.onKey)\n this.pointerAdaptor.removeEventListener('update', this.onPointer)\n this.enabled = false\n }\n\n private onWheel(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.wheelScaleFactor)\n }\n\n private onKey(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward)\n this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left)\n this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down)\n }\n\n private onPointer(event): void {\n switch (event.pointerCount) {\n case 1:\n this.cameraRig.do(CameraAction.Pan, event.deltas.x * this.panDegreeFactor)\n this.cameraRig.do(CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor)\n break\n case 2:\n this.cameraRig.do(CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor)\n this.cameraRig.do(CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor)\n break\n default:\n break\n }\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.keyboardAdaptor.update()\n this.wheelAdaptor.update()\n this.pointerAdaptor.update(time)\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig } from '../CameraRig'\nimport { ScrollAdaptor } from '../adaptors/ScrollAdaptor'\n\n/**\n * ScrollActions provide a way to add custom callback hooks for specific parts of the scroll area\n */\nexport interface ScrollAction {\n /** When to start the action, in %, px or vh. */\n start: string\n /** When to end the action, in %, px or vh. */\n end: string\n /** Callback with 0-1 progress when element is between start and end conditions. */\n callback: (progress: number) => void\n /** @internal */\n startPx: number\n /** @internal */\n endPx: number\n /** @internal */\n bufferedStartPx: number\n /** @internal */\n bufferedEndPx: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ScrollControls} constructor\n */\nexport interface ScrollControlsProps {\n /** Long DOM Element to observe */\n scrollElement: HTMLElement\n /** Offset to start registering scroll, in px or vh. Default starts when top of element is at bottom of viewport. */\n startOffset?: string\n /** Offset to end registering scroll, in px or vh. Default ends when bottom of element is at top of viewport. */\n endOffset?: string\n /** Value between 0 and 1. Defaults to 1 */\n dampingFactor?: number\n /** Buffer before and after element to start registering scroll. Number (percentage) between 0 and 1, defaults to 0.1 */\n buffer?: number\n /** When in the scroll to start the camera animation, can be specified in px, % or vh */\n cameraStart?: string\n /** When in the scroll to end the camera animation, can be specified in px, % or vh */\n cameraEnd?: string\n /** Array of ScrollActions for custom scroll hooks */\n scrollActions: ScrollAction[]\n}\n\nconst defaultProps: Partial = {\n startOffset: '0px',\n endOffset: '0px',\n dampingFactor: 1,\n buffer: 0.1,\n cameraStart: '0%',\n cameraEnd: '100%',\n scrollActions: [],\n}\n\nconst mapRange = (number, inMin, inMax, outMin, outMax): number => {\n return Math.max(outMin, Math.min(outMax, (number - inMin) * ((outMax - outMin) / (inMax - inMin)) + outMin))\n}\n\n/**\n * Control scheme to scrub through the CameraRig's `AnimationClip` based on the scroll of a DOM Element\n * @remarks\n * Control scheme to scrub through the CameraRig's `AnimationClip` based on the scroll of a DOM Element.\n * These controls expect to observe an element that is a few viewports long, and use the scroll distance to scrub through a camera animation.\n * By default, the 'start' of the animation is when the element starts to be in view (ie the top of the element aligns with the bottom of the viewport),\n * and the 'end' is when the element goes out of view (when the bottom of the elements aligns with the top of the viewport).\n * These trigger points can be customised with the `cameraStart` and `cameraEnd` properties. Additional scroll-dependant procedures can also be defined through `scrollActions`.\n *\n *\n * See {@link three-story-controls#ScrollControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/scroll-controls/ | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new ScrollControls(cameraRig, {\n * scrollElement: document.querySelector('.scroller'),\n * cameraStart: '12%',\n * cameraEnd: '90%',\n * scrollActions: [\n * { start: '0%' , end: '10%', callback: e => fadeInElement(e) },\n * { start: '85%' , end: '100%', callback: e => fadeOutElement(e) }\n * ]\n * })\n *\n * function fadeInElement(progress) { // entry fade transition }\n * function fadeOutElement(progress) { // exit fade transition }\n *\n * gltfLoader.load(cameraPath, (gltf) => {\n * cameraRig.setAnimationClip(gltf.animations[0])\n * cameraRig.setAnimationTime(0)\n * controls.enable()\n * })\n *\n * // render loop\n * function animate() {\n * controls.update()\n * }\n * ```\n */\nexport class ScrollControls implements BaseControls {\n readonly cameraRig: CameraRig\n private scrollAdaptor: ScrollAdaptor\n private enabled = false\n private cameraStart: string\n private cameraEnd: string\n private cameraStartPx: number\n private cameraEndPx: number\n private cameraBufferedStartPx: number\n private cameraBufferedEndPx: number\n private scrollActions: ScrollAction[]\n private buffer: number\n\n constructor(cameraRig: CameraRig, props: ScrollControlsProps) {\n this.cameraRig = cameraRig\n this.cameraRig.setAnimationTime(0)\n\n this.scrollAdaptor = new ScrollAdaptor({\n scrollElement: props.scrollElement,\n dampingFactor: props.dampingFactor || defaultProps.dampingFactor,\n startOffset: props.startOffset || defaultProps.startOffset,\n endOffset: props.endOffset || defaultProps.endOffset,\n buffer: props.buffer || defaultProps.buffer,\n })\n\n this.cameraStart = props.cameraStart || defaultProps.cameraStart\n this.cameraEnd = props.cameraEnd || defaultProps.cameraEnd\n this.scrollActions = props.scrollActions || defaultProps.scrollActions\n this.buffer = props.buffer || defaultProps.buffer\n this.calculateStops()\n this.onScroll = this.onScroll.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.scrollAdaptor.connect()\n this.scrollAdaptor.addEventListener('update', this.onScroll)\n this.enabled = true\n }\n\n disable(): void {\n this.scrollAdaptor.disconnect()\n this.scrollAdaptor.removeEventListener('update', this.onScroll)\n this.enabled = false\n }\n\n update(): void {\n if (this.enabled) {\n this.scrollAdaptor.update()\n }\n }\n\n private calculateStops(): void {\n this.cameraStartPx = this.scrollAdaptor.parseOffset(this.cameraStart)\n this.cameraEndPx = this.scrollAdaptor.parseOffset(this.cameraEnd)\n this.cameraBufferedStartPx = this.cameraStartPx * (1 - this.buffer)\n this.cameraBufferedEndPx = this.cameraEndPx * (1 + this.buffer)\n this.scrollActions.forEach((action) => {\n action.startPx = this.scrollAdaptor.parseOffset(action.start)\n action.endPx = this.scrollAdaptor.parseOffset(action.end)\n action.bufferedStartPx = action.startPx * (1 - this.buffer)\n action.bufferedEndPx = action.endPx * (1 + this.buffer)\n })\n }\n\n private onScroll(event): void {\n const progress = event.dampenedValues.scrollPx\n if (progress >= this.cameraBufferedStartPx && progress <= this.cameraBufferedEndPx) {\n this.cameraRig.setAnimationPercentage(mapRange(progress, this.cameraStartPx, this.cameraEndPx, 0, 1))\n }\n this.scrollActions.forEach((action) => {\n if (progress >= action.bufferedStartPx && progress <= action.bufferedEndPx) {\n action.callback(mapRange(progress, action.startPx, action.endPx, 0, 1))\n }\n })\n }\n}\n","import { EventDispatcher, Vector3, Quaternion } from 'three'\nimport { BaseControls, UpdatePOIsEvent, ExitPOIsEvent } from './BaseControls'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { CameraRig } from '../CameraRig'\n\nexport interface StoryPointMarker {\n /** Camera position */\n position: Vector3\n /** Camera quaternion */\n quaternion: Quaternion\n /** Transition duration, defaults to 1 */\n duration?: number\n /** Transition easing, defaults to power1 */\n ease?: string\n /** Use spherical interpolation for rotation, defaults to true */\n useSlerp?: boolean\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#StoryPointsControls} constructor\n */\nexport interface StoryPointsControlsProps {\n /** Whether to cycle to the first/last POI after reaching the end/start. When false, controls with emit 'ExitStoryPoints' events. Defaults to false. */\n cycle?: boolean\n /** Use keyboard arrow keys as navigation, defaults to true */\n useKeyboard?: boolean\n}\n\nconst defaultProps: StoryPointsControlsProps = {\n cycle: false,\n useKeyboard: true,\n}\n\n/**\n * Control scheme to transition the camera between given points in world space.\n * @remarks\n * See {@link three-story-controls#StoryPointsControlsProps} for all properties that can be passed to the constructor.\n *\n * See {@link three-story-controls#StoryPointMarker} for POI properties.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/story-points/ | DEMO }\n *\n * @example\n * ```js\n *\n * const pois = [\n * { position: new Vector3(...), quaternion: new Quaternion(...) },\n * { position: new Vector3(...), quaternion: new Quaternion(...) },\n * ]\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new StoryPointsControls(cameraRig, pois)\n *\n * controls.enable()\n * controls.goToPOI(0)\n *\n * // Assuming DOM elements with classes 'nextBtn' and 'prevBtn' have been created\n * document.querySelector('.nextBtn').on('click', () => controls.nextPOI() )\n * document.querySelector('.prevBtn').on('click', () => controls.prevPOI() )\n * ```\n */\nexport class StoryPointsControls extends EventDispatcher implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private pois: StoryPointMarker[]\n private currentIndex: number | null = null\n private upcomingIndex: number | null = null\n private enabled = false\n private cycle: boolean\n private useKeyboard: boolean\n\n constructor(cameraRig: CameraRig, pois: StoryPointMarker[] = [], props: StoryPointsControlsProps = {}) {\n super()\n this.cameraRig = cameraRig\n this.pois = pois\n Object.assign(this, defaultProps, props)\n if (this.useKeyboard) {\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'discrete',\n keyMapping: {\n next: ['ArrowDown', 'ArrowRight'],\n prev: ['ArrowUp', 'ArrowLeft'],\n },\n })\n this.onKey = this.onKey.bind(this)\n }\n this.onCameraStart = this.onCameraStart.bind(this)\n this.onCameraUpdate = this.onCameraUpdate.bind(this)\n this.onCameraEnd = this.onCameraEnd.bind(this)\n }\n\n getCurrentIndex(): number {\n return this.currentIndex\n }\n\n nextPOI(): void {\n const next = this.currentIndex + 1\n if (next >= this.pois.length && !this.cycle) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'end',\n } as ExitPOIsEvent)\n } else {\n this.goToPOI(next % this.pois.length)\n }\n }\n\n prevPOI(): void {\n const prev = this.currentIndex - 1\n if (prev < 0 && !this.cycle) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'start',\n } as ExitPOIsEvent)\n } else {\n this.goToPOI((prev + this.pois.length) % this.pois.length)\n }\n }\n\n goToPOI(index: number): void {\n this.upcomingIndex = index\n const poi = this.pois[this.upcomingIndex]\n this.cameraRig.flyTo(poi.position, poi.quaternion, poi.duration, poi.ease, poi.useSlerp)\n }\n\n enable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.connect()\n this.keyboardAdaptor.addEventListener('trigger', this.onKey)\n }\n this.cameraRig.addEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.addEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.addEventListener('CameraMoveEnd', this.onCameraEnd)\n this.enabled = true\n }\n\n disable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.disconnect()\n this.keyboardAdaptor.removeEventListener('trigger', this.onKey)\n }\n this.cameraRig.removeEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.removeEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.removeEventListener('CameraMoveEnd', this.onCameraEnd)\n this.enabled = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n private updatePois(progress: number): void {\n this.dispatchEvent({\n type: 'update',\n currentIndex: this.currentIndex,\n upcomingIndex: this.upcomingIndex,\n progress,\n } as UpdatePOIsEvent)\n }\n\n private onCameraStart(): void {\n this.updatePois(0)\n }\n\n private onCameraUpdate(event): void {\n this.updatePois(event.progress)\n }\n\n private onCameraEnd(): void {\n this.currentIndex = this.upcomingIndex\n this.upcomingIndex = null\n }\n\n private onKey(event): void {\n if (event.trigger === 'next') {\n this.nextPOI()\n } else if (event.trigger === 'prev') {\n this.prevPOI()\n }\n }\n}\n","import { EventDispatcher } from 'three'\nimport { BaseControls, UpdatePOIsEvent, ExitPOIsEvent } from './BaseControls'\nimport { CameraRig } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\nimport { SwipeAdaptor } from '../adaptors/SwipeAdaptor'\n\nexport interface PathPointMarker {\n frame: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#PathPointsControls} constructor\n */\nexport interface PathPointsControlsProps {\n /** Threshold of wheel delta that triggers a transition. Defaults to 15 */\n wheelThreshold?: number\n /** Threshold of swipe distance that triggers a transition. Defaults to 60 */\n swipeThreshold?: number\n /** Transition duration, defaults to 1 */\n duration?: number\n /** Transition easing, defaults to power1 */\n ease?: string\n /** Use keyboard arrow keys as navigation, defaults to true */\n useKeyboard?: boolean\n}\n\nconst defaultProps: PathPointsControlsProps = {\n wheelThreshold: 15,\n swipeThreshold: 60,\n duration: 1,\n ease: 'power1',\n useKeyboard: true,\n}\n\n/**\n * Control scheme to transition the camera between specific points (frames) along a path specified through an `AnimationClip`.\n * @remarks\n * Control scheme to transition the camera between specific points (frames) along a path specified through an `AnimationClip`.\n * A mouse wheel or swipe or keyboard arrow event triggers the camera to smoothly transition from one given frame number to the next.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#PathPointsControlsProps} for all properties that can be passed to the constructor.\n *\n * See {@link three-story-controls#PathPointMarker} for POI properties.\n *\n * See {@link three-story-controls#UpdatePOIsEvent} and {@link three-story-controls#ExitPOIsEvent} for emitted event signatures.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/path-points/ | DEMO }\n * @example\n * ```js\n *\n * const pois = [ { frame: 0 }, { frame: 54 } ....]\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * let camera, cameraRig, controls\n *\n * gltfLoader.load(cameraPath, (gltf) => {\n * camera = gltf.cameras[0]\n * cameraRig = new CameraRig(camera, scene)\n * cameraRig.setAnimationClip(gltf.animations[0])\n * cameraRig.setAnimationTime(0)\n * controls = new PathPointsControls(cameraRig, pois)\n * controls.enable()\n * controls.addEventListener('ExitPOIs', (e) => {\n * // e.exitFrom will be either 'start' or 'end'\n * })\n * controls.addEventListener('update', (e) => {\n * // e.currentIndex will be the index of the starting poi\n * // e.upcomingIndex will be the index of the upcoming poi\n * // e.progress will be a number 0-1 indicating progress of the transition\n * })\n * })\n * ```\n */\nexport class PathPointsControls extends EventDispatcher implements BaseControls {\n readonly cameraRig: CameraRig\n private wheelAdaptor: WheelAdaptor\n private swipeAdaptor: SwipeAdaptor\n private keyboardAdaptor: KeyboardAdaptor\n private pois: PathPointMarker[]\n private currentIndex = 0\n private upcomingIndex: number | null = null\n private enabled = false\n private duration: number\n private ease: string\n private wheelThreshold: number\n private swipeThreshold: number\n private useKeyboard: boolean\n\n constructor(cameraRig: CameraRig, pois: PathPointMarker[] = [], props: PathPointsControlsProps = {}) {\n super()\n this.cameraRig = cameraRig\n this.pois = pois\n Object.assign(this, defaultProps, props)\n this.wheelAdaptor = new WheelAdaptor({ type: 'discrete', thresholdY: this.wheelThreshold })\n this.swipeAdaptor = new SwipeAdaptor({ thresholdY: this.swipeThreshold })\n if (this.useKeyboard) {\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'discrete',\n keyMapping: {\n next: ['ArrowDown', 'ArrowRight'],\n prev: ['ArrowUp', 'ArrowLeft'],\n },\n })\n this.onKey = this.onKey.bind(this)\n }\n this.onCameraStart = this.onCameraStart.bind(this)\n this.onCameraUpdate = this.onCameraUpdate.bind(this)\n this.onCameraEnd = this.onCameraEnd.bind(this)\n this.onTrigger = this.onTrigger.bind(this)\n }\n\n getCurrentIndex(): number {\n return this.currentIndex\n }\n\n enable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.addEventListener('trigger', this.onKey)\n this.keyboardAdaptor.connect()\n }\n this.wheelAdaptor.addEventListener('trigger', this.onTrigger)\n this.swipeAdaptor.addEventListener('trigger', this.onTrigger)\n this.cameraRig.addEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.addEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.addEventListener('CameraMoveEnd', this.onCameraEnd)\n this.wheelAdaptor.connect()\n this.swipeAdaptor.connect()\n this.enabled = true\n }\n\n disable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.removeEventListener('trigger', this.onKey)\n this.keyboardAdaptor.disconnect()\n }\n this.wheelAdaptor.removeEventListener('trigger', this.onTrigger)\n this.swipeAdaptor.removeEventListener('trigger', this.onTrigger)\n this.cameraRig.removeEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.removeEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.removeEventListener('CameraMoveEnd', this.onCameraEnd)\n this.wheelAdaptor.disconnect()\n this.swipeAdaptor.disconnect()\n this.enabled = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n private onKey(event): void {\n switch (event.trigger) {\n case 'prev':\n this.onTrigger({ y: -1 })\n break\n case 'next':\n this.onTrigger({ y: 1 })\n break\n default:\n break\n }\n }\n\n private onTrigger(event): void {\n const index = this.currentIndex + event.y\n if (index >= this.pois.length) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'end',\n } as ExitPOIsEvent)\n } else if (index < 0) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'start',\n } as ExitPOIsEvent)\n } else {\n this.upcomingIndex = index\n this.cameraRig.flyToKeyframe(this.pois[this.upcomingIndex].frame, this.duration, this.ease)\n }\n }\n\n private updatePois(progress: number): void {\n this.dispatchEvent({\n type: 'update',\n currentIndex: this.currentIndex,\n upcomingIndex: this.upcomingIndex,\n progress,\n } as UpdatePOIsEvent)\n }\n\n private onCameraStart(): void {\n this.updatePois(0)\n }\n\n private onCameraUpdate(event): void {\n this.updatePois(event.progress)\n }\n\n private onCameraEnd(): void {\n this.currentIndex = this.upcomingIndex\n this.upcomingIndex = null\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction, RigComponent } from '../CameraRig'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ThreeDOFControls} constructor\n */\n//TODO: add option for relative or absolute control (in terms of screen space)\nexport interface ThreeDOFControlsProps {\n /** DOM element that should listen for pointer events. Defaults to `document.body` */\n domElement?: HTMLElement\n /** Mutiplier for panning. Defaults to Math.PI / 20 */\n panFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 20 */\n tiltFactor?: number\n /** Mutiplier for truck translation. Defaults to 1 */\n truckFactor?: number\n /** Mutiplier for pedestal translation. Defaults to 1 */\n pedestalFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.7 */\n dampingFactor?: number\n}\n\nconst defaultProps: ThreeDOFControlsProps = {\n domElement: document.body,\n panFactor: Math.PI / 20,\n tiltFactor: Math.PI / 20,\n truckFactor: 1,\n pedestalFactor: 1,\n dampingFactor: 0.7,\n}\n\n/**\n * Control scheme for slight rotation and translation movement in response to mouse movements (designed to be used in conjunction with other control schemes)\n * @remarks\n * Note: CSS property `touch-action: none` will probably be needed on listener element\n *\n * See {@link three-story-controls#ThreeDOFControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/story-points/ | DEMO w/ story points }\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/scroll-controls/ | DEMO w/ scroll controls}\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new ThreeDOFControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n */\nexport class ThreeDOFControls implements BaseControls {\n readonly cameraRig: CameraRig\n private pointerAdaptor: PointerAdaptor\n private enabled = false\n private panFactor: number\n private tiltFactor: number\n private truckFactor: number\n private pedestalFactor: number\n\n constructor(cameraRig: CameraRig, props: ThreeDOFControlsProps = {}) {\n this.cameraRig = cameraRig\n Object.assign(this, defaultProps, props)\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.dampingFactor || defaultProps.dampingFactor,\n })\n this.onPointerMove = this.onPointerMove.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.pointerAdaptor.connect()\n this.pointerAdaptor.addEventListener('update', this.onPointerMove)\n this.enabled = true\n }\n\n disable(): void {\n this.pointerAdaptor.disconnect()\n this.pointerAdaptor.removeEventListener('update', this.onPointerMove)\n this.enabled = false\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.pointerAdaptor.update(time)\n }\n }\n\n private onPointerMove(event): void {\n if (event.pointerCount === 0) {\n this.cameraRig.do(CameraAction.Pan, -event.deltas.x * this.panFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Tilt, -event.deltas.y * this.tiltFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.truckFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Pedestal, event.deltas.y * this.pedestalFactor, RigComponent.Eyes)\n }\n }\n}\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { Quaternion, Vector3, AnimationClip, VectorKeyframeTrack, QuaternionKeyframeTrack } from 'three'\nimport gsap from 'gsap'\nimport { CameraRig } from '../CameraRig'\nimport { FreeMovementControls } from '../controlschemes/FreeMovementControls'\nimport './index.css'\n\nconst easeFunctions = ['none', 'power1', 'power2', 'power3', 'power4', 'sine', 'expo', 'circ']\n\ninterface POI {\n position: Vector3\n quaternion: Quaternion\n duration: number\n ease: string\n image: string\n}\n\nconst DOMClass = {\n visit: 'visit',\n remove: 'remove',\n duration: 'duration',\n ease: 'ease',\n moveUp: 'move-up',\n moveDown: 'move-down',\n}\n\n/**\n * A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene\n *\n * @remarks\n * A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene.\n *\n * The `CameraHelper` can be set up with any scene along with {@link three-story-controls#FreeMovementControls | FreeMovementControls}.\n *\n * It renders as an overlay with functionality to add/remove/reorders points of interest, and create an animation path between them.\n * Each saved camera position is displayed with an image on the `CameraHelper` panel.\n *\n * The data can be exported as a JSON file that can then be used with different control schemes.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/camera-helper | DEMO }\n *\n * @example\n * Here's an example of initializing the CameraHelper\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementControls(cameraRig)\n *\n * controls.enable()\n *\n * const cameraHelper = new CameraHelper(rig, controls, renderer.domElement)\n *\n * // Render loop\n * // To allow for capturing an image of the canvas,\n * // it's important to update the CameraHelper after the scene is rendered,\n * // but before requesting the animation frame\n * function render(t) {\n * controls.update(t)\n * renderer.render(scene, camera)\n * cameraHelper.update(t)\n * window.requestAnimationFrame(render)\n * }\n *\n * render()\n * ```\n *\n *\n *\n * The following examples demonstrate using the exported data. Note: Depending on your setup, you may need to change the .json extension to .js and prepend the text with `export default` such that you can import it as javascript\n *\n * @example\n * Here's an example using the exported JSON data with ScrollControls.\n * ```javascript\n * import * as cameraData from 'camera-control.json'\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n *\n * // Parse the JSON animation clip\n * cameraRig.setAnimationClip(AnimationClip.parse(cameraData.animationClip))\n * cameraRig.setAnimationTime(0)\n *\n * const controls = new ScrollControls(cameraRig, {\n * scrollElement: document.querySelector('.scroller'),\n * })\n *\n * controls.enable()\n *\n * function render(t) {\n * window.requestAnimationFrame(render)\n * if (rig.hasAnimation) {\n * controls.update(t)\n * }\n * renderer.render(scene, camera)\n * }\n * ```\n *\n * @example\n * Here's an example using the exported data with Story Point controls\n * ```javascript\n * import * as cameraData from 'camera-control.json'\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n *\n * // Format the exported data to create three.js Vector and Quaternions\n * const pois = cameraData.pois.map((poi, i) => {\n * return {\n * position: new Vector3(...poi.position),\n * quaternion: new Quaternion(...poi.quaternion),\n * duration: poi.duration,\n * ease: poi.ease,\n * }\n * })\n *\n * const controls = new StoryPointsControls(rig, pois)\n * controls.enable()\n *\n * function render(t) {\n * window.requestAnimationFrame(render)\n * controls.update(t)\n * renderer.render(scene, camera)\n * }\n * ```\n */\nexport class CameraHelper {\n readonly rig: CameraRig\n readonly controls: FreeMovementControls\n readonly canvas: HTMLCanvasElement\n private pois: POI[]\n private currentIndex: number | null\n private drawer: HTMLElement\n private domList: HTMLElement\n private collapseBtn: HTMLElement\n private fileInput: HTMLInputElement\n private btnImport: HTMLElement\n private doCapture: boolean\n private animationClip: AnimationClip\n private isPlaying: boolean\n private playStartTime: number\n private useSlerp = true\n\n constructor(rig: CameraRig, controls: FreeMovementControls, canvas: HTMLCanvasElement, canvasParent?: HTMLElement) {\n this.rig = rig\n this.controls = controls\n this.canvas = canvas\n this.pois = []\n this.currentIndex = null\n this.doCapture = false\n this.isPlaying = false\n this.initUI(canvasParent)\n }\n\n private capture(): void {\n this.doCapture = true\n }\n\n update(time: number): void {\n if (this.doCapture) {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n canvas.width = 640\n canvas.height = 360\n ctx.drawImage(this.canvas, 0, 0, canvas.width, canvas.height)\n const image = canvas.toDataURL()\n\n this.addPoi(image)\n this.doCapture = false\n }\n if (this.isPlaying) {\n if (!this.playStartTime) {\n this.playStartTime = time\n this.controls.disable()\n this.rig.packTransform()\n }\n const t = (time - this.playStartTime) / 1000\n this.rig.setAnimationTime(t)\n if (t > this.animationClip.duration) {\n this.isPlaying = false\n this.playStartTime = null\n this.controls.enable()\n this.rig.unpackTransform()\n }\n }\n }\n\n private addPoi(image: string): void {\n this.pois.push({\n ...this.rig.getWorldCoordinates(),\n duration: 1,\n ease: 'power1',\n image,\n })\n this.currentIndex = this.pois.length - 1\n this.createClip()\n this.render()\n }\n\n private updatePoi(index: number, props: Partial): void {\n this.pois[index] = {\n ...this.pois[index],\n ...props,\n }\n }\n\n private movePoi(index: number, direction: number): void {\n if (index + direction >= 0 && index + direction < this.pois.length) {\n const temp = this.pois[index]\n this.pois[index] = this.pois[index + direction]\n this.pois[index + direction] = temp\n this.render()\n }\n }\n\n private removePoi(index: number): void {\n this.pois.splice(index, 1)\n this.render()\n }\n\n private goToPoi(index: number): void {\n const poi = this.pois[index]\n this.rig.flyTo(poi.position, poi.quaternion, poi.duration, poi.ease, this.useSlerp)\n }\n\n private createClip(): void {\n if (this.pois.length > 0) {\n const times = []\n const positionValues = []\n const quaternionValues = []\n const tmpPosition = new Vector3()\n const tmpQuaternion = new Quaternion()\n const framesPerPoi = 10\n\n let tweenStartTime = 0\n\n // transform imported arrays to quaternions and vector3 when loading a camera file\n if (!this.pois[0].quaternion.isQuaternion && !this.pois[0].position.isVector3) {\n for (let i = 0; i < this.pois.length; i++) {\n const p = this.pois[i]\n p.quaternion = new Quaternion(p.quaternion[0], p.quaternion[1], p.quaternion[2], p.quaternion[3])\n p.position = new Vector3(p.position[0], p.position[1], p.position[2])\n }\n }\n\n for (let i = 0; i < this.pois.length - 1; i++) {\n const p1 = this.pois[i]\n const p2 = this.pois[i + 1]\n\n const values = {\n px: p1.position.x,\n py: p1.position.y,\n pz: p1.position.z,\n qx: p1.quaternion.x,\n qy: p1.quaternion.y,\n qz: p1.quaternion.z,\n qw: p1.quaternion.w,\n slerpAmount: 0,\n }\n\n const target = {\n px: p2.position.x,\n py: p2.position.y,\n pz: p2.position.z,\n qx: p2.quaternion.x,\n qy: p2.quaternion.y,\n qz: p2.quaternion.z,\n qw: p2.quaternion.w,\n slerpAmount: 1,\n duration: p2.duration,\n ease: p2.ease,\n }\n\n const tween = gsap.to(values, target)\n\n for (let j = 0; j < framesPerPoi; j++) {\n const lerpAmount = p2.duration * (j / framesPerPoi)\n times.push(tweenStartTime + lerpAmount)\n tween.seek(lerpAmount)\n if (this.useSlerp) {\n tmpQuaternion.slerpQuaternions(p1.quaternion, p2.quaternion, values.slerpAmount)\n } else {\n tmpQuaternion.set(values.qx, values.qy, values.qz, values.qw)\n }\n tmpPosition.set(values.px, values.py, values.pz)\n tmpQuaternion.toArray(quaternionValues, quaternionValues.length)\n tmpPosition.toArray(positionValues, positionValues.length)\n }\n tweenStartTime += p2.duration\n }\n // add last point\n const last = this.pois[this.pois.length - 1]\n last.quaternion.toArray(quaternionValues, quaternionValues.length)\n last.position.toArray(positionValues, positionValues.length)\n times.push(tweenStartTime)\n this.animationClip = new AnimationClip(null, tweenStartTime, [\n new VectorKeyframeTrack('Translation.position', times, positionValues),\n new QuaternionKeyframeTrack('Rotation.quaternion', times, quaternionValues),\n ])\n this.rig.setAnimationClip(this.animationClip)\n }\n }\n\n private scrubClip(amount: number): void {\n if (this.pois.length > 0) {\n this.rig.setAnimationPercentage(amount)\n }\n }\n\n private playClip(): void {\n if (this.pois.length > 0) {\n this.isPlaying = true\n }\n }\n\n private import(): void {\n if (this.fileInput) {\n this.fileInput.click()\n const reader = new FileReader()\n\n this.fileInput.onchange = () => {\n reader.readAsText(this.fileInput.files[0])\n reader.onload = (e) => {\n const parsed = JSON.parse(e.target.result)\n this.pois = parsed.pois\n this.animationClip = parsed.animationClip\n this.createClip()\n this.render()\n }\n }\n }\n }\n\n private export({ draft }): void {\n if (this.pois.length > 0) {\n const jsondata = {} as any\n jsondata.pois = this.pois.map((poi) => {\n const position = [poi.position.x, poi.position.y, poi.position.z]\n const quaternion = [poi.quaternion.x, poi.quaternion.y, poi.quaternion.z, poi.quaternion.w]\n const obj = {\n position,\n quaternion,\n duration: poi.duration,\n ease: poi.ease,\n } as any\n\n if (draft) {\n obj.image = poi.image\n }\n\n return obj\n })\n if (this.animationClip) {\n jsondata.animationClip = AnimationClip.toJSON(this.animationClip)\n }\n const data = 'text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(jsondata))\n const a = document.createElement('a')\n a.href = 'data:' + data\n a.download = `camera-data${draft ? '-draft' : ''}.json`\n document.body.appendChild(a)\n a.click()\n a.remove()\n }\n }\n\n private exportImages(): void {\n const link = document.createElement('a')\n document.body.appendChild(link)\n this.pois.forEach((poi, index) => {\n link.href = poi.image\n link.download = `camera-poi-${index}.png`\n link.click()\n })\n link.remove()\n }\n\n // ui\n\n private initUI(canvasParent?: HTMLElement): void {\n this.drawer = document.createElement('div')\n this.drawer.classList.add('tb-ch')\n\n const btnAdd = document.createElement('button')\n btnAdd.classList.add('btn-round', 'add')\n btnAdd.innerText = '+'\n btnAdd.onclick = this.capture.bind(this)\n\n this.collapseBtn = document.createElement('button')\n this.collapseBtn.classList.add('btn-round', 'collapse')\n this.collapseBtn.innerText = '<'\n this.collapseBtn.onclick = this.collapse.bind(this)\n\n const controlWrapper = document.createElement('div')\n controlWrapper.classList.add('controls')\n\n this.fileInput = document.createElement('input')\n this.fileInput.type = 'file'\n this.fileInput.id = 'import'\n this.fileInput.accept = 'application/json'\n this.fileInput.style.display = 'none'\n\n this.btnImport = document.createElement('button')\n this.btnImport.classList.add('btn-text', 'import')\n this.btnImport.innerText = 'import draft JSON'\n this.btnImport.onclick = this.import.bind(this)\n\n const btnExportImages = document.createElement('button')\n btnExportImages.classList.add('btn-text', 'export')\n btnExportImages.innerText = 'export draft JSON'\n btnExportImages.onclick = this.export.bind(this, { draft: true })\n\n const btnExport = document.createElement('button')\n btnExport.classList.add('btn-text', 'export')\n btnExport.innerText = 'export production JSON'\n btnExport.onclick = this.export.bind(this, { draft: false })\n\n const bntExportImages = document.createElement('button')\n bntExportImages.classList.add('btn-text', 'export-images')\n bntExportImages.innerHTML = 'export images'\n bntExportImages.onclick = this.exportImages.bind(this)\n\n const btnPlay = document.createElement('button')\n btnPlay.classList.add('btn-text', 'play')\n btnPlay.innerText = 'play'\n btnPlay.onclick = this.playClip.bind(this)\n\n const sliderTime: HTMLInputElement = document.createElement('input')\n sliderTime.type = 'range'\n sliderTime.min = '0'\n sliderTime.max = '1000'\n sliderTime.step = '0.1'\n sliderTime.value = '0'\n const updateTime = this.scrubClip.bind(this)\n sliderTime.onmousedown = () => this.rig.packTransform()\n sliderTime.onmouseup = () => this.rig.unpackTransform()\n sliderTime.oninput = (e) => updateTime(parseInt((e.target).value) / 1000)\n\n this.domList = document.createElement('div')\n this.domList.classList.add('pois')\n this.domList.onclick = this.handleEvents.bind(this)\n this.domList.onchange = this.handleEvents.bind(this)\n\n controlWrapper.append(\n this.fileInput,\n this.btnImport,\n btnPlay,\n sliderTime,\n bntExportImages,\n btnExportImages,\n btnExport,\n )\n this.drawer.append(btnAdd, this.collapseBtn, this.domList, controlWrapper)\n\n const parent = canvasParent || document.body\n parent.append(this.drawer)\n }\n\n private handleEvents(event): void {\n const index = event.target.dataset.index\n if (index) {\n if (event.target.classList.contains(DOMClass.visit)) {\n this.goToPoi(parseInt(index))\n } else if (event.target.classList.contains(DOMClass.remove)) {\n this.removePoi(parseInt(index))\n } else if (event.target.classList.contains(DOMClass.duration)) {\n this.updatePoi(parseInt(index), { duration: parseFloat((event.target).value) })\n } else if (event.target.classList.contains(DOMClass.ease)) {\n this.updatePoi(parseInt(index), { ease: (event.target).value })\n } else if (event.target.classList.contains(DOMClass.moveUp)) {\n this.movePoi(parseInt(index), -1)\n } else if (event.target.classList.contains(DOMClass.moveDown)) {\n this.movePoi(parseInt(index), 1)\n }\n this.createClip()\n }\n }\n\n private collapse(): void {\n if (this.drawer.classList.contains('collapsed')) {\n this.drawer.classList.remove('collapsed')\n this.collapseBtn.innerText = '<'\n } else {\n this.drawer.classList.add('collapsed')\n this.collapseBtn.innerText = '>'\n }\n }\n\n private render(): void {\n this.domList.innerHTML = ''\n this.pois.forEach((poi, index) => {\n const div = document.createElement('div')\n div.classList.add('poi')\n\n const textHeading = document.createElement('h2')\n textHeading.innerText = `${index + 1}.`\n\n const wrapper = document.createElement('div')\n wrapper.classList.add('wrapper')\n const controls = document.createElement('div')\n controls.classList.add('poi-controls')\n const params = document.createElement('div')\n params.classList.add('poi-params')\n\n const image = new Image()\n image.src = poi.image\n\n const labelDuration = document.createElement('label')\n labelDuration.innerText = 'Duration'\n const inputDuration = document.createElement('input')\n inputDuration.classList.add(DOMClass.duration)\n inputDuration.dataset.index = `${index}`\n inputDuration.type = 'number'\n inputDuration.value = String(poi.duration)\n\n const labelEase = document.createElement('label')\n labelEase.innerText = 'Easing'\n const selectEase = document.createElement('select')\n selectEase.classList.add(DOMClass.ease)\n selectEase.dataset.index = `${index}`\n const options = easeFunctions.map((x) => {\n const op = document.createElement('option')\n op.innerText = x\n op.value = x\n op.selected = x === poi.ease\n return op\n })\n selectEase.append(...options)\n\n const btnRemove = document.createElement('button')\n btnRemove.classList.add(DOMClass.remove)\n btnRemove.title = 'Remove'\n btnRemove.dataset.index = `${index}`\n btnRemove.innerText = 'x'\n\n const btnVisit = document.createElement('button')\n btnVisit.classList.add(DOMClass.visit)\n btnVisit.title = 'Visit'\n btnVisit.dataset.index = `${index}`\n btnVisit.innerHTML = '→'\n\n const btnMoveUp = document.createElement('button')\n btnMoveUp.classList.add(DOMClass.moveUp)\n btnMoveUp.title = 'Move up'\n btnMoveUp.dataset.index = `${index}`\n btnMoveUp.innerHTML = '↑'\n\n const btnMoveDown = document.createElement('button')\n btnMoveDown.classList.add(DOMClass.moveDown)\n btnMoveDown.title = 'Move down'\n btnMoveDown.dataset.index = `${index}`\n btnMoveDown.innerHTML = '↓'\n\n controls.append(btnRemove, btnVisit, btnMoveUp, btnMoveDown)\n params.append(labelDuration, inputDuration, labelEase, selectEase)\n wrapper.append(image, controls)\n div.append(textHeading, wrapper, params)\n this.domList.appendChild(div)\n })\n }\n}\n"],"names":["CameraAction","RigComponent","Axis","Vector3","EventDispatcher","Object3D","PerspectiveCamera","Quaternion","Euler","AnimationMixer","gsap","defaultProps","AnimationClip","VectorKe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CAAA;gBAC3B,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,KAAK,EAAE,CAAA;gBACpC,SAAS,CAAC,SAAS,GAAG,QAAQ,CAAA;gBAE9B,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;gBACpD,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;gBAC5C,WAAW,CAAC,KAAK,GAAG,WAAW,CAAA;gBAC/B,WAAW,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,KAAK,EAAE,CAAA;gBACtC,WAAW,CAAC,SAAS,GAAG,QAAQ,CAAA;gBAEhC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;gBAC5D,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;gBAClE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;gBAC/B,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;gBACxC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;aAC9B,CAAC,CAAA;SACH;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"three-story-controls.js","sources":["../src/Damper.ts","../src/CameraRig.ts","../src/adaptors/BaseAdaptor.ts","../src/adaptors/KeyboardAdaptor.ts","../src/adaptors/PointerAdaptor.ts","../src/adaptors/ScrollAdaptor.ts","../src/adaptors/SwipeAdaptor.ts","../src/adaptors/WheelAdaptor.ts","../src/controlschemes/FreeMovementControls.ts","../src/controlschemes/FreeMovementPlusControls.ts","../src/controlschemes/ScrollControls.ts","../src/controlschemes/StoryPointsControls.ts","../src/controlschemes/PathPointsControls.ts","../src/controlschemes/ThreeDOFControls.ts","../node_modules/style-inject/dist/style-inject.es.js","../src/camerahelper/index.ts"],"sourcesContent":["export interface DamperValues {\n /** A value to dampen, set to its initial state */\n [key: string]: number | null\n}\n\nexport interface DamperProps {\n /** Values to be dampened */\n values: DamperValues\n /** Multiplier used on each update to approach the target value, should be between 0 and 1, where 1 is no damping */\n dampingFactor: number\n /** Amount of permitted error before a value is considered to have 'reached' its target. Defaults to 0.001 */\n epsilon?: number\n}\n\n/**\n * Damper uses simple linear damping for a given collection of values.\n * On every call to update, the damper will approach a given set of target values.\n * @example\n * ```js\n * const damper = new Damper({\n * values: {x: 0, y: 0},\n * dampingFactor: 0.4\n * })\n *\n * damper.setTarget({ x: 1, y: 100 })\n * damper.update() // would generally be called in an animation loop\n * const values = damper.getCurrentValues() // values.x = 0.4; values.y = 40\n * ```\n */\n\nexport class Damper {\n private dampingFactor: number\n private epsilon = 0.001\n private values: DamperValues = {}\n private targetValues: DamperValues = {}\n private deltaValues: DamperValues = {}\n private hasReached: boolean\n\n constructor(props: DamperProps) {\n Object.assign(this.values, props.values)\n Object.assign(this.targetValues, props.values)\n this.deltaValues = {}\n for (const key in this.values) {\n this.deltaValues[key] = 0\n }\n this.dampingFactor = props.dampingFactor\n if (props.epsilon) this.epsilon = props.epsilon\n this.hasReached = true\n }\n\n /**\n * Update the damper, should generally be called on every frame\n */\n update(): void {\n const deltas = {}\n let approached = true\n\n for (const key in this.values) {\n deltas[key] = this.targetValues[key] - this.values[key]\n approached = approached && Math.abs(deltas[key]) < this.epsilon\n }\n\n if (approached) {\n for (const key in this.values) {\n this.deltaValues[key] = deltas[key]\n this.values[key] = this.targetValues[key]\n }\n this.hasReached = true\n } else {\n for (const key in this.values) {\n this.deltaValues[key] = this.dampingFactor * deltas[key]\n this.values[key] += this.deltaValues[key]\n }\n }\n }\n\n /**\n * Set the target values the damper needs to approach\n * @param target DamperValues the damper needs to approach\n */\n setTarget(target: DamperValues): void {\n for (const key in target) {\n this.targetValues[key] = target[key]\n }\n this.hasReached = false\n }\n\n /**\n * Increment/Decrement a specifc damper target value\n * @param key The key of the value to modify\n * @param value The amount to modify the target by\n */\n addToTarget(key: string, value: number): void {\n this.targetValues[key] += value\n this.hasReached = false\n }\n\n /**\n * Reset all damper values to the fiven number\n * @param value Number to reset all damper values to\n */\n resetAll(value: number): void {\n for (const key in this.values) {\n this.targetValues[key] = value\n this.values[key] = value\n this.deltaValues[key] = 0\n }\n this.hasReached = true\n }\n\n /**\n * Reset damper values as described by the given DamperValues object\n * @param values DamperValues object to reset the damper to\n */\n resetData(values: DamperValues): void {\n for (const key in values) {\n this.targetValues[key] = values[key]\n this.values[key] = values[key]\n this.deltaValues[key] = 0\n }\n this.hasReached = true\n }\n\n /**\n * Get the current values\n * @returns DamperValues object with the current values of the damper\n */\n getCurrentValues(): DamperValues {\n return { ...this.values }\n }\n\n /**\n * Get the change in values since the last update call\n * @returns DamperValues object with the amount the values changed since the last `update()` call\n */\n getDeltaValues(): DamperValues {\n return { ...this.deltaValues }\n }\n\n /**\n * Whether the damper has reached its target\n * @returns Whether the damper has reached its target (within permissible error range)\n */\n reachedTarget(): boolean {\n return this.hasReached\n }\n}\n","import {\n Vector3,\n Quaternion,\n Object3D,\n Camera,\n PerspectiveCamera,\n Scene,\n AnimationMixer,\n AnimationClip,\n EventDispatcher,\n Euler,\n} from 'three'\n\nimport gsap from 'gsap'\n\n/**\n * Event: Fired when CameraRig starts a transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveStart', handlerFunction)\n * ```\n * */\nexport interface CameraMoveStartEvent {\n type: 'CameraMoveStart'\n}\n\n/**\n * Event: Fired on every tick of CameraRig's transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveUpdate', handlerFunction)\n * ```\n * */\nexport interface CameraMoveUpdateEvent {\n type: 'CameraMoveUpdate'\n /** Percentage of transition completed, between 0 and 1. */\n progress: number\n}\n\n/**\n * Event: Fired when CameraRig ends a transition\n * @example\n * ```javascript\n * rig.addEventListener('CameraMoveEnd', handlerFunction)\n * ```\n * */\nexport interface CameraMoveEndEvent {\n type: 'CameraMoveEnd'\n}\n\n/**\n * Enum of camera actions used to control a {@link three-story-controls#CameraRig}\n */\nexport enum CameraAction {\n Pan = 'Pan',\n Tilt = 'Tilt',\n Roll = 'Roll',\n Truck = 'Truck',\n Pedestal = 'Pedestal',\n Dolly = 'Dolly',\n Zoom = 'Zoom',\n}\n\n/**\n * Enum of {@link three-story-controls#CameraRig} parts\n */\nexport enum RigComponent {\n Body = 'body',\n Head = 'head',\n Eyes = 'eyes',\n}\n\n/**\n * Enum of axes\n */\nexport enum Axis {\n X = 'x',\n Y = 'y',\n Z = 'z',\n}\n\n/**\n * Describe whether rig should translate along current rotation in each action axis\n */\nexport interface TranslateGuide {\n [CameraAction.Pan]: boolean\n [CameraAction.Tilt]: boolean\n [CameraAction.Roll]: boolean\n}\n\n/**\n * Mapping of rotation action to axis\n */\nexport interface ActionAxes {\n [CameraAction.Pan]: Axis\n [CameraAction.Tilt]: Axis\n [CameraAction.Roll]: Axis\n}\n\nconst AxisVector = {\n [Axis.X]: new Vector3(1, 0, 0),\n [Axis.Y]: new Vector3(0, 1, 0),\n [Axis.Z]: new Vector3(0, 0, 1),\n}\n\nconst ActionMappingByUpAxis = {\n [Axis.X]: {\n [CameraAction.Pan]: Axis.X,\n [CameraAction.Tilt]: Axis.Z,\n [CameraAction.Roll]: Axis.Y,\n },\n [Axis.Y]: {\n [CameraAction.Pan]: Axis.Y,\n [CameraAction.Tilt]: Axis.X,\n [CameraAction.Roll]: Axis.Z,\n },\n [Axis.Z]: {\n [CameraAction.Pan]: Axis.Z,\n [CameraAction.Tilt]: Axis.Y,\n [CameraAction.Roll]: Axis.X,\n },\n}\n\n/**\n * The CameraRig holds the camera, and can respond to {@link three-story-controls#CameraAction}s such as Pan/Tilt/Dolly etc. It can also be controlled along a given path (in the form of an `AnimationClip`), or tweened to specified points.\n *\n * @remarks\n * The rig is constructed of three objects, analagous to a body, head and eyes. The camera is nested in the eyes and is never transformed directly.\n *\n * Instead of specifying the axis to rotate/translate the camera, {@link three-story-controls#CameraAction}s are used. The rotation order of actions is always `Pan` then `Tilt` then `Roll`.\n * The mapping of these actions to axes depends on the up axis, which defaults to `Y` (but can be changed with the {@link CameraRig.setUpAxis | setUpAxis() method}):\n *\n * * `CameraAction.Pan` rotates around the `Y` axis\n *\n * * `CameraAction.Tilt` rotates around the `X` axis\n *\n * * `CameraAction.Roll` rotates around the `Z` axis\n *\n * * `CameraAction.Dolly` translates on the `Z` axis\n *\n * * `CameraAction.Truck` translates on the `X` axis\n *\n * * `CameraAction.Pedestal` translates on the `Y` axis\n *\n * Translations will be applied to the 'body' of the rig, and rotations to the 'eyes'. If an animation clip is provided, or the camera is tweened to a specific location,\n * the rotations will be applied to the 'head', thus leaving the 'eyes' free to 'look around' from this base position.\n *\n * Additionally, the default setup assumes that the rig will move forward/backward (`Dolly`) in the direction the camera is panned to.\n * This can be configured through {@link CameraRig.translateAlong | translateAlong property}.\n * It can also be overwritten by providing the component name to the {@link CameraRig.do | do() method}, see {@link https://github.com/nytimes/three-story-controls/blob/main/src/controlschemes/ThreeDOFControls.ts#L96 | ThreeDOFControls implementation} for an example.\n *\n * To move the rig along a specified path, use the {@link CameraRig.setAnimationClip | setAnimationClip() method},\n * and set the names for the `Translation` and `Rotation` objects to match those of the clip. The clip should have a `VectorKeyframeTrack` for the outer position/translation object,\n * and a `QuaternionKeyframeTrack` for the inner orientation/rotation object.\n *\n * See {@link three-story-controls#CameraMoveStartEvent}, {@link three-story-controls#CameraMoveUpdateEvent} and {@link three-story-controls#CameraMoveEndEvent} for emitted event signatures.\n */\nexport class CameraRig extends EventDispatcher {\n readonly camera: Camera\n readonly scene: Scene\n private body: Object3D\n private head: Object3D\n private eyes: Object3D\n private cameraIsInRig: boolean\n private inTransit = false\n private upAxis: Axis = Axis.Y\n private actionAxes: ActionAxes = ActionMappingByUpAxis[this.upAxis]\n private hasAnimation = false\n private animationClip: AnimationClip\n private mixer: AnimationMixer\n private animationTranslationObjectName = 'Translation'\n private animationRotationObjectName = 'Rotation'\n\n public translateAlong: TranslateGuide = {\n [CameraAction.Tilt]: false,\n [CameraAction.Pan]: true,\n [CameraAction.Roll]: false,\n }\n\n // Constructor\n constructor(camera: Camera, scene: Scene) {\n super()\n this.camera = camera\n this.scene = scene\n this.body = new Object3D()\n this.head = new Object3D()\n this.eyes = new Object3D()\n this.head.name = this.animationRotationObjectName\n this.body.name = this.animationTranslationObjectName\n this.body.rotation.order = this.getRotationOrder()\n this.head.rotation.order = this.getRotationOrder()\n this.eyes.rotation.order = this.getRotationOrder()\n this.scene.add(this.body.add(this.head.add(this.eyes.add(this.camera))))\n this.cameraIsInRig = true\n this.unpackTransform()\n }\n\n /**\n * Get the axis for a given action\n * @param action\n * @returns x | y | z\n */\n getAxisFor(action: CameraAction): string {\n return this.actionAxes[action]\n }\n\n /**\n * Get the axis' vector for a given action\n * @param action\n * @returns Normalized vector for the axis\n */\n getAxisVectorFor(action: CameraAction): Vector3 {\n return AxisVector[this.actionAxes[action]]\n }\n\n /**\n * Main method for controlling the camera\n * @param action - Action to perform\n * @param amount - Amount to move/rotate/etc\n * @param rigComponent - Override the default component to perform the action on\n */\n do(action: CameraAction, amount: number, rigComponent?: RigComponent): void {\n const targetComponent = this[rigComponent]\n\n switch (action) {\n case CameraAction.Pan:\n case CameraAction.Tilt:\n case CameraAction.Roll: {\n const axis = this.getAxisVectorFor(action)\n if (targetComponent) {\n targetComponent.rotateOnAxis(axis, amount)\n } else if (this.translateAlong[action]) {\n this.body.rotateOnAxis(axis, amount)\n } else {\n this.eyes.rotateOnAxis(axis, amount)\n }\n break\n }\n\n case CameraAction.Truck: {\n const axis = this.getAxisVectorFor(CameraAction.Tilt)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Pedestal: {\n const axis = this.getAxisVectorFor(CameraAction.Pan)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Dolly: {\n const axis = this.getAxisVectorFor(CameraAction.Roll)\n const component = targetComponent || this.body\n component.translateOnAxis(axis, amount)\n break\n }\n\n case CameraAction.Zoom: {\n if (this.camera instanceof PerspectiveCamera) {\n this.camera.fov = amount\n this.camera.updateProjectionMatrix()\n }\n break\n }\n\n default:\n break\n }\n }\n\n /**\n * Get world position and orientation of the camera\n */\n getWorldCoordinates(): { position: Vector3; quaternion: Quaternion } {\n const position = new Vector3()\n this.camera.getWorldPosition(position)\n const quaternion = new Quaternion()\n this.camera.getWorldQuaternion(quaternion)\n return { position, quaternion }\n }\n\n /**\n * Sets world coordinates for the camera, and configures rig component transforms accordingly.\n * @param param0\n */\n setWorldCoordinates({ position, quaternion }: { position: Vector3; quaternion: Quaternion }): void {\n const currentRotation = new Euler().setFromQuaternion(quaternion, this.getRotationOrder())\n const actions = [CameraAction.Pan, CameraAction.Tilt, CameraAction.Roll]\n this.eyes.position.set(0, 0, 0)\n this.eyes.rotation.set(0, 0, 0)\n this.head.position.set(0, 0, 0)\n this.head.rotation.set(0, 0, 0)\n this.body.position.copy(position)\n actions.forEach((action) => {\n const axis = this.getAxisFor(action)\n if (this.translateAlong[action]) {\n this.body.rotation[axis] = currentRotation[axis]\n } else {\n this.eyes.rotation[axis] = currentRotation[axis]\n }\n })\n this.camera.rotation.set(0, 0, 0)\n this.camera.position.set(0, 0, 0)\n }\n\n /**\n * Packs transfrom into the body and head, and 0s out transforms of the eyes. Useful for preparing the\n * rig for control through an animation clip.\n */\n packTransform(): void {\n const { position, quaternion } = this.getWorldCoordinates()\n this.body.position.copy(position)\n this.body.rotation.set(0, 0, 0)\n this.head.quaternion.copy(quaternion)\n this.head.position.set(0, 0, 0)\n this.eyes.position.set(0, 0, 0)\n this.eyes.rotation.set(0, 0, 0)\n }\n\n /**\n * Unpacks the current camera world coordinates and distributes transforms\n * across the rig componenets.\n */\n unpackTransform(): void {\n const { position, quaternion } = this.getWorldCoordinates()\n this.setWorldCoordinates({ position, quaternion })\n }\n\n /**\n * Disassemble the camera from the rig and attach it to the scene.\n */\n disassemble(): void {\n if (this.cameraIsInRig) {\n this.scene.attach(this.camera)\n this.cameraIsInRig = false\n }\n }\n\n /**\n * Place the camera back in the rig\n */\n assemble(): void {\n if (!this.cameraIsInRig) {\n this.eyes.attach(this.camera)\n this.unpackTransform()\n this.cameraIsInRig = true\n }\n }\n\n /**\n * Get the rotation order as a string compatible with what three.js uses\n */\n getRotationOrder(): string {\n return Object.values(this.actionAxes).join('').toUpperCase()\n }\n\n /**\n * Whether the camera is currently attached to the rig\n */\n isInRig(): boolean {\n return this.cameraIsInRig\n }\n\n /**\n * If the camera is in the middle of a transition\n */\n isMoving(): boolean {\n return this.inTransit\n }\n\n /**\n * Set the up axis for the camera\n * @param axis - New Up axis\n */\n setUpAxis(axis: Axis): void {\n this.upAxis = axis\n this.actionAxes = ActionMappingByUpAxis[this.upAxis]\n this.body.rotation.order = this.getRotationOrder()\n }\n\n /**\n * Set an animation clip for the rig\n * @param {AnimationClip} clip - AnimationClip containing a VectorKeyFrameTrack for position and a QuaternionKeyFrameTrack for rotation\n * @param {string} translationObjectName - Name of translation object\n * @param {string} rotationObjectName - Name of rotation object\n */\n setAnimationClip(clip: AnimationClip, translationObjectName?: string, rotationObjectName?: string): void {\n this.animationClip = clip\n if (translationObjectName) this.animationTranslationObjectName = translationObjectName\n if (rotationObjectName) this.animationRotationObjectName = rotationObjectName\n this.hasAnimation = true\n // hack. threejs skips last frame when seek time = clip duration\n this.animationClip.duration += 0.01\n this.mixer = new AnimationMixer(this.body)\n const action = this.mixer.clipAction(this.animationClip)\n action.clampWhenFinished = true\n action.play()\n }\n\n /**\n * Transition to a specific position and orientation in world space.\n * Transform on eyes will be reset to 0 as a result of this.\n * @param position\n * @param quaternion\n * @param duration\n * @param ease\n * @param useSlerp\n */\n flyTo(position: Vector3, quaternion: Quaternion, duration = 1, ease = 'power1', useSlerp = true): void {\n if (!this.isMoving()) {\n const currentCoords = this.getWorldCoordinates()\n const currentValues = {\n px: currentCoords.position.x,\n py: currentCoords.position.y,\n pz: currentCoords.position.z,\n qx: currentCoords.quaternion.x,\n qy: currentCoords.quaternion.y,\n qz: currentCoords.quaternion.z,\n qw: currentCoords.quaternion.w,\n slerpAmt: 0,\n }\n const targetValues = {\n px: position.x,\n py: position.y,\n pz: position.z,\n qx: quaternion.x,\n qy: quaternion.y,\n qz: quaternion.z,\n qw: quaternion.w,\n slerpAmt: 1,\n }\n const tempQuaternion = new Quaternion()\n const startQuaternion = new Quaternion(currentValues.qx, currentValues.qy, currentValues.qz, currentValues.qw)\n const onStart = (): void => {\n this.inTransit = true\n this.packTransform()\n this.dispatchEvent({ type: 'CameraMoveStart' } as CameraMoveStartEvent)\n }\n const onUpdate = (tween): void => {\n this.body.position.set(currentValues.px, currentValues.py, currentValues.pz)\n if (useSlerp) {\n tempQuaternion.slerpQuaternions(startQuaternion, quaternion, currentValues.slerpAmt)\n this.head.setRotationFromQuaternion(tempQuaternion)\n } else {\n this.head.quaternion.set(currentValues.qx, currentValues.qy, currentValues.qz, currentValues.qw)\n }\n this.dispatchEvent({\n type: 'CameraMoveUpdate',\n progress: tween.progress(),\n } as CameraMoveUpdateEvent)\n }\n const onComplete = (): void => {\n this.inTransit = false\n this.unpackTransform()\n this.dispatchEvent({ type: 'CameraMoveEnd' } as CameraMoveEndEvent)\n }\n gsap.to(currentValues, {\n duration,\n ease,\n ...targetValues,\n onStart,\n onUpdate: function () {\n onUpdate(this)\n },\n onComplete,\n })\n }\n }\n\n /**\n * Transition to a specific keyframe on the animation clip\n * Transform on eyes will be reset to 0 as a result of this.\n * @param frame - frame\n * @param duration - duration\n * @param ease - ease\n */\n flyToKeyframe(frame: number, duration = 1, ease = 'power1'): void {\n if (this.hasAnimation && !this.isMoving()) {\n const currentValues = {\n time: this.mixer.time,\n }\n const targetValues = {\n time: this.animationClip.tracks[0].times[frame],\n }\n const onStart = (): void => {\n this.inTransit = true\n this.dispatchEvent({ type: 'CameraMoveStart' } as CameraMoveStartEvent)\n }\n const onUpdate = (tween): void => {\n this.mixer.setTime(currentValues.time)\n this.dispatchEvent({\n type: 'CameraMoveUpdate',\n progress: tween.progress(),\n } as CameraMoveUpdateEvent)\n }\n const onComplete = (): void => {\n this.inTransit = false\n this.dispatchEvent({ type: 'CameraMoveEnd' } as CameraMoveEndEvent)\n }\n gsap.to(currentValues, {\n duration,\n ease,\n ...targetValues,\n onStart,\n onUpdate: function () {\n onUpdate(this)\n },\n onComplete,\n })\n }\n }\n\n /**\n * @param percentage - percentage of animation clip to move to, between 0 and 1\n */\n setAnimationPercentage(percentage: number): void {\n if (this.hasAnimation) {\n const percent = Math.max(\n 0,\n Math.min(percentage * this.animationClip.duration, this.animationClip.duration - 0.0001),\n )\n this.mixer.setTime(percent)\n }\n }\n\n /**\n * @param time - timestamp of animation clip to move to\n */\n setAnimationTime(time: number): void {\n if (this.hasAnimation) this.mixer.setTime(time)\n }\n\n /**\n * @param frame - frame of animation clip to move to\n */\n setAnimationKeyframe(frame: number): void {\n if (this.hasAnimation) this.mixer.setTime(this.animationClip.tracks[0].times[frame])\n }\n}\n","import { EventDispatcher } from 'three'\n\nexport abstract class BaseAdaptor extends EventDispatcher {\n constructor() {\n super()\n }\n abstract connect(): void\n abstract disconnect(): void\n abstract update(time?: number): void\n abstract isEnabled(): boolean\n}\n\nexport interface DiscreteEvent {\n type: 'trigger'\n}\n\nexport interface ContinuousEvent {\n type: 'update'\n}\n\nexport interface IntertiaCompleteEvent {\n type: 'inertiacomplete'\n}\n","import { BaseAdaptor, DiscreteEvent, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when a key in a `discrete` KeyboardAdaptor's mapping is released (`onKeyUp`)\n * @example\n * ```javascript\n * adaptor.on('trigger', () => { // do something })\n * ```\n * */\nexport interface KeyboardAdaptorDiscreteEvent extends DiscreteEvent {\n /** KeyMapping key that triggered the event */\n trigger: string\n}\n\n/**\n * Event: Fired when a key in a `continuous` KeyboardAdaptor's mapping is pressed (`onKeyDown`)\n * @example\n * ```javascript\n * adaptor.on('update', () => { // do something })\n * ```\n * */\nexport interface KeyboardAdaptorContinuousEvent extends ContinuousEvent {\n values: DamperValues\n deltas: DamperValues\n}\n\n/**\n * A discrete adaptor works as a trigger - only firing events on keyup,\n * whereas a continuous adaptor continuously fires events on keydown\n * */\nexport type KeyboardAdaptorType = 'discrete' | 'continuous'\n\n/**\n * Key-value pairs of semantic labels associated with an array of keys (corresponding to `KeybordEvent.keys` values)\n */\nexport interface KeyMapping {\n /** The key is a semantic label, and the string[] is a corresponding collection of event.keys */\n [key: string]: string[]\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#KeyboardAdaptor} constructor\n */\nexport interface KeyboardAdaptorProps {\n /** 'discrete' or 'continuous' */\n type: KeyboardAdaptorType\n /**\n * Default key mapping uses forward/backward/up/down/left/right as semanic labels, with WASD and arrow keys mapped appropriately:\n * @example keyMapping\n * ```javascript\n * {\n * forward: ['ArrowUp', 'w', 'W'],\n * backward: ['ArrowDown', 's', 'S'],\n * left: ['ArrowLeft', 'a', 'A'],\n * right: ['ArrowRight', 'd', 'D'],\n * up: ['u', 'U'],\n * down: ['n', 'N'],\n * }\n * ```\n * */\n keyMapping?: KeyMapping\n /** Only used for continuous adaptor, value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Only used for continuous adaptor, the amount to increment the target value on each keydown event. Defaults to 1 */\n incrementor?: number\n /** Prevent event bubbling. Defaults to true */\n preventBubbling?: boolean\n}\n\nconst defaultProps: Partial = {\n keyMapping: {\n forward: ['ArrowUp', 'w', 'W'],\n backward: ['ArrowDown', 's', 'S'],\n left: ['ArrowLeft', 'a', 'A'],\n right: ['ArrowRight', 'd', 'D'],\n rollLeft: ['Q', 'q'],\n rollRight: ['E', 'e'],\n tiltDown: ['F', 'f'],\n tiltUp: ['R', 'r'],\n panRight: ['C', 'c'],\n panLeft: ['Z', 'z'],\n up: ['u', 'U'],\n down: ['n', 'N'],\n },\n dampingFactor: 0.5,\n incrementor: 0.1,\n preventBubbling: true,\n}\n\n/**\n * Parse keyboard events and emit either dampened values for continuous keypresses, or trigger events named according to a provided keymapping.\n * @remarks\n * See {@link three-story-controls#KeyboardAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#KeyboardAdaptorDiscreteEvent} and {@link three-story-controls#KeyboardAdaptorContinuousEvent} for emitted event signatures.\n * @example Continuous adaptor\n * ```javascript\n * const keyboardAdaptor = new KeyboardAdaptor({ type: 'continuous', dampingFactor: 0.2 })\n * keyboardAdaptor.connect()\n * keyboardAdaptor.addEventListener('update', (event) => {\n * cube.rotation.y += event.deltas.right - event.deltas.left\n * cube.rotation.x += event.deltas.up - event.deltas.down\n * )}\n * function animate() {\n * keyboardAdaptor.update()\n * window.requestAnimationFrame(animate)\n * }\n * animate()\n * ```\n */\nexport class KeyboardAdaptor extends BaseAdaptor {\n private type: KeyboardAdaptorType\n private damper: Damper\n private dampingFactor: number\n private incrementor: number\n private keyMapping: KeyMapping\n private connected: boolean\n private preventBubbling: boolean\n\n constructor(props: KeyboardAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n const values = {}\n for (const key in this.keyMapping) {\n values[key] = 0\n }\n this.damper = new Damper({\n values,\n dampingFactor: this.dampingFactor,\n })\n this.onKeyUp = this.onKeyUp.bind(this)\n this.onKeyDown = this.onKeyDown.bind(this)\n }\n\n connect(): void {\n document.addEventListener('keyup', this.onKeyUp, true)\n document.addEventListener('keydown', this.onKeyDown, true)\n this.connected = true\n }\n\n disconnect(): void {\n document.removeEventListener('keyup', this.onKeyUp, true)\n document.removeEventListener('keydown', this.onKeyDown, true)\n this.connected = false\n }\n\n update(): void {\n if (this.type === 'continuous' && !this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.damper.getCurrentValues(),\n deltas: this.damper.getDeltaValues(),\n } as KeyboardAdaptorContinuousEvent)\n if (this.damper.reachedTarget()) {\n this.damper.resetAll(0)\n this.dispatchEvent({\n type: 'inertiacomplete',\n } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onKeyUp(event: KeyboardEvent): void {\n if (this.type === 'discrete') {\n for (const name in this.keyMapping) {\n if (this.keyMapping[name].includes(event.key)) {\n if (this.preventBubbling) event.preventDefault()\n this.dispatchEvent({\n type: 'trigger',\n trigger: name,\n } as KeyboardAdaptorDiscreteEvent)\n break\n }\n }\n }\n }\n\n private onKeyDown(event: KeyboardEvent): void {\n if (this.type === 'continuous') {\n for (const name in this.keyMapping) {\n if (this.keyMapping[name].includes(event.key)) {\n if (this.preventBubbling) event.preventDefault()\n this.damper.addToTarget(name, this.incrementor)\n break\n }\n }\n }\n }\n}\n","import { BaseAdaptor, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\ninterface Coordinates extends DamperValues {\n x: number\n y: number\n}\n\n/**\n * Event: Fired when when `PointerEvent`s are triggered\n * @example\n * ```javascript\n * adaptor.on('trigger', (e) => {\n * console.log('x/y coordinates', e.values.x, e.values.y)\n * })\n * ```\n * */\nexport interface PointerAdaptorEvent extends ContinuousEvent {\n /** Dampened x and y pointer coordinates */\n values: Coordinates\n /** Pointer coordinate change since previous update */\n deltas: Coordinates\n /** Number of pointers registered */\n pointerCount: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#PointerAdaptor} constructor\n */\nexport interface PointerAdaptorProps {\n /** DOM element that should listen for pointer events. Defaults to `document.body` */\n domElement?: HTMLElement\n /** Damping value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Whether to normalize the pointer position values. Defaults to true */\n shouldNormalize?: boolean\n /** If values are normalized, whether they should be in -1 to 1 range. Defaults to true. */\n normalizeAroundZero?: boolean\n /** Debounce for registering a change in the pointer count, in ms. Defaults to 100. */\n multipointerThreshold?: number\n}\n\nconst defaultProps: PointerAdaptorProps = {\n domElement: document.body,\n dampingFactor: 0.5,\n shouldNormalize: true,\n normalizeAroundZero: true,\n multipointerThreshold: 100,\n}\n\n/**\n * Parse pointer events to emit dampened, normalized coordinates along with the pointer count (for detecting multi-touch or drag events)\n * @remarks\n * See {@link three-story-controls#PointerAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#PointerAdaptorEvent} for emitted event signatures.\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n * @example Pointer adaptor\n * ```javascript\n * const pointerAdaptor = new PointerAdaptor()\n * pointerAdaptor.connect()\n * pointerAdaptor.addEventListener('update', (event) => {\n * switch(event.pointerCount) {\n * case 0:\n * cube.scale.x = event.values.x\n * cube.scale.y = event.values.y\n * break\n * case 1:\n * cube.position.x += event.deltas.x\n * cube.position.y -= event.deltas.y\n * break\n * default:\n * break\n * }\n * })\n *\n * // in RAF loop:\n * function animate(t) {\n * pointerAdaptor.update(t)\n * }\n * ```\n */\nexport class PointerAdaptor extends BaseAdaptor {\n private domElement = document.body\n private dampingFactor: number\n private shouldNormalize = true\n private normalizeAroundZero = true\n private multipointerThreshold: number\n private damper: Damper\n private connected: boolean\n private width: number\n private height: number\n private pointerCount = 0\n private recordedPosition = false\n private cache: Array = []\n private lastDownTime = 0\n private lastUpTime = 0\n\n constructor(props: PointerAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.damper = new Damper({\n values: { x: null, y: null },\n dampingFactor: this.dampingFactor,\n })\n this.setDimensions()\n this.onPointerMove = this.onPointerMove.bind(this)\n this.onPointerUp = this.onPointerUp.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n this.onResize = this.onResize.bind(this)\n }\n\n connect(): void {\n this.domElement.addEventListener('pointermove', this.onPointerMove, { passive: true })\n this.domElement.addEventListener('pointerdown', this.onPointerDown, { passive: true })\n this.domElement.addEventListener('pointerleave', this.onPointerUp, { passive: true })\n this.domElement.addEventListener('pointerup', this.onPointerUp, { passive: true })\n window.addEventListener('resize', this.onResize)\n this.connected = true\n }\n\n disconnect(): void {\n this.domElement.removeEventListener('pointermove', this.onPointerMove)\n this.domElement.removeEventListener('pointerdown', this.onPointerDown)\n this.domElement.removeEventListener('pointerleave', this.onPointerUp)\n this.domElement.removeEventListener('pointerup', this.onPointerUp)\n this.connected = false\n }\n\n update(time: number): void {\n if (\n this.pointerCount !== this.cache.length &&\n time - this.lastDownTime > this.multipointerThreshold &&\n time - this.lastUpTime > this.multipointerThreshold\n ) {\n this.pointerCount = this.cache.length\n if (this.pointerCount === 0) {\n this.damper.resetAll(null)\n this.recordedPosition = false\n } else {\n this.damper.resetData(this.getPointerPosition(this.cache[0]))\n this.recordedPosition = true\n }\n }\n\n if (!this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.shouldNormalize\n ? this.normalize(this.damper.getCurrentValues() as Coordinates, this.normalizeAroundZero)\n : this.damper.getCurrentValues(),\n deltas: this.shouldNormalize\n ? this.normalize(this.damper.getDeltaValues() as Coordinates, false)\n : this.damper.getDeltaValues(),\n pointerCount: this.pointerCount,\n } as PointerAdaptorEvent)\n if (this.damper.reachedTarget()) {\n this.dispatchEvent({ type: 'inertiacomplete' } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private setDimensions(): void {\n this.width = this.domElement.getBoundingClientRect().width\n this.height = this.domElement.getBoundingClientRect().height\n }\n\n private getPointerPosition(event: PointerEvent): Coordinates {\n // event.offsetLeft is still experimental\n return {\n x: Math.max(0, Math.min(this.width, event.x - this.domElement.offsetLeft)),\n y: Math.max(0, Math.min(this.height, event.y - this.domElement.offsetTop)),\n }\n }\n\n private normalize(values: Coordinates, aroundZero: boolean): Coordinates {\n let x = values.x / this.width\n let y = values.y / this.height\n if (aroundZero) {\n x = x * 2 - 1\n y = y * 2 - 1\n }\n return { x, y }\n }\n\n private onPointerMove(event: PointerEvent): void {\n if (this.pointerCount === this.cache.length) {\n if (this.cache.length === 0) {\n if (!this.recordedPosition) {\n this.damper.resetData(this.getPointerPosition(event))\n this.recordedPosition = true\n } else {\n this.damper.setTarget(this.getPointerPosition(event))\n }\n } else {\n if (event.pointerId === this.cache[0].pointerId) {\n this.damper.setTarget(this.getPointerPosition(event))\n }\n }\n }\n }\n\n private onPointerDown(event: PointerEvent): void {\n // only deals with left mouse button right now\n // TODO: add some logic for optional right button events\n if (event.button === 0) {\n this.cache.push(event)\n this.lastDownTime = window.performance.now()\n }\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (event.button === 0 || event.type === 'pointerleave') {\n for (let i = 0; i < this.cache.length; i++) {\n if (this.cache[i].pointerId == event.pointerId) {\n this.cache.splice(i, 1)\n break\n }\n }\n this.lastUpTime = window.performance.now()\n }\n }\n\n private onResize(): void {\n this.setDimensions()\n }\n}\n","import { BaseAdaptor, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when when the 'in view' amount of the given DOM element changes\n */\nexport interface ScrollAdaptorEvent extends ContinuousEvent {\n values: DamperValues\n dampenedValues: DamperValues\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ScrollAdaptor} constructor\n */\nexport interface ScrollAdaptorProps {\n /** Long DOM Element to observe */\n scrollElement: HTMLElement\n /** Offset to start registering scroll, in px or vh. Default starts when top of element is at bottom of viewport. */\n startOffset?: string\n /** Offset to end registering scroll, in px or vh. Default ends when bottom of element is at top of viewport. */\n endOffset?: string\n /** Buffer before and after element to start registering scroll. Number between 0 and 1, defaults to 0.1 */\n buffer?: number\n /** Value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n}\n\nconst defaultProps: Partial = {\n startOffset: '0px',\n endOffset: '0px',\n buffer: 0.1,\n dampingFactor: 0.5,\n}\n\n/**\n * Emits normalized values for the amount a given DOM element has been scrolled through.\n * @remarks\n * See {@link three-story-controls#ScrollAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#ScrollAdaptorEvent} for emitted event signatures.\n * @example Scroll adaptor\n * ```javascript\n * const scrollAdaptor = new ScrollAdaptor({ scrollElement: document.querySelector('.scroller'), dampingFactor: 0.1 })\n * scrollAdaptor.connect()\n * scrollAdaptor.addEventListener('update', (event) => {\n * cube.rotation.y = event.dampenedValues.scrollPercent*Math.PI*2\n * })\n * ```\n */\nexport class ScrollAdaptor extends BaseAdaptor {\n private scrollElement: HTMLElement\n private damper: Damper\n private dampingFactor: number\n private connected: boolean\n private values: DamperValues\n private lastSeenScrollValue: number\n private previousScrollValue: number\n private startPosition: number\n private endPosition: number\n private distance: number\n private bufferedStartPosition: number\n private bufferedEndPosition: number\n private startOffset: string\n private endOffset: string\n private buffer: number\n private resizeObserver: ResizeObserver\n\n constructor(props: ScrollAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.lastSeenScrollValue = window.scrollY || -1\n this.previousScrollValue = this.lastSeenScrollValue\n this.values = {\n scrollPx: null,\n scrollPercent: null,\n }\n this.damper = new Damper({\n values: this.values,\n dampingFactor: this.dampingFactor,\n })\n this.calculateDimensions = this.calculateDimensions.bind(this)\n this.onScroll = this.onScroll.bind(this)\n this.resizeObserver = new ResizeObserver(this.calculateDimensions)\n this.calculateDimensions()\n }\n\n connect(): void {\n window.addEventListener('scroll', this.onScroll, { passive: true })\n this.resizeObserver.observe(document.body)\n this.connected = true\n }\n\n disconnect(): void {\n window.removeEventListener('scroll', this.onScroll)\n this.resizeObserver.unobserve(document.body)\n this.connected = false\n }\n\n update(): void {\n if (\n this.lastSeenScrollValue !== this.previousScrollValue &&\n this.lastSeenScrollValue >= this.bufferedStartPosition &&\n this.lastSeenScrollValue <= this.bufferedEndPosition\n ) {\n const scrollPx = Math.max(0, Math.min(this.distance, this.lastSeenScrollValue - this.startPosition))\n const scrollPercent = Math.max(0, Math.min(1, scrollPx / this.distance))\n this.values = {\n scrollPx,\n scrollPercent,\n }\n this.damper.setTarget(this.values)\n this.previousScrollValue = this.lastSeenScrollValue\n }\n if (!this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.values,\n dampenedValues: this.damper.getCurrentValues(),\n } as ScrollAdaptorEvent)\n if (this.damper.reachedTarget()) {\n this.dispatchEvent({ type: 'inertiacomplete' } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n parseOffset(offset: string): number {\n let amount = 0\n if (offset) {\n amount = parseInt(offset)\n if (offset.indexOf('vh') !== -1) {\n amount = (amount * window.innerHeight) / 100\n } else if (this.distance && offset.indexOf('%') !== -1) {\n amount = (amount * this.distance) / 100\n }\n }\n return amount\n }\n\n private calculateOffset(element: HTMLElement): number {\n if (!element) return 0\n return this.calculateOffset(element.offsetParent as HTMLElement) + element.offsetTop\n }\n\n private calculateDimensions(): void {\n const elementHeight = this.scrollElement.clientHeight\n const offsetTop = this.calculateOffset(this.scrollElement)\n this.startPosition = offsetTop - window.innerHeight + this.parseOffset(this.startOffset)\n this.endPosition = offsetTop + elementHeight + this.parseOffset(this.endOffset)\n this.distance = this.endPosition - this.startPosition\n this.bufferedStartPosition = Math.max(0, this.startPosition * (1 - this.buffer))\n this.bufferedEndPosition = Math.min(\n this.endPosition * (1 + this.buffer),\n document.body.getBoundingClientRect().height,\n )\n }\n\n private onScroll(): void {\n this.lastSeenScrollValue = window.scrollY\n }\n}\n","import { BaseAdaptor, DiscreteEvent } from './BaseAdaptor'\n\n/**\n * Event: Fired when when swipe are registered\n * @remarks\n * The sign represents the direction of the swipe,\n * y = 1 when swiping down-to-up, and x = 1 when swiping left-to-right\n * */\nexport interface SwipeAdaptorEvent extends DiscreteEvent {\n x: -1 | 1 | 0\n y: -1 | 1 | 0\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#SwipeAdaptor} constructor\n */\nexport interface SwipeAdaptorProps {\n /** DOM element to listen to events on. Defaults to document.body */\n domElement?: HTMLElement\n /** Threshold of pointer's deltaX to trigger events. Defaults to 60 */\n thresholdX?: number\n /** Threshold of pointer's deltaY to trigger events. Defaults to 60 */\n thresholdY?: number\n}\n\nconst defaultProps: SwipeAdaptorProps = {\n domElement: document.body,\n thresholdX: 60,\n thresholdY: 60,\n}\n\n/**\n * Emits events in response to swipe gestures above a given threshold.\n * @remarks\n * See {@link three-story-controls#SwipeAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#SwipeAdaptorEvent} for emitted event signatures.\n * Note: CSS property `touch-action: none` will probably be needed on listener element\n * @example Swipe adaptor\n * ```javascript\n * const swipeAdaptor = new SwipeAdaptor()\n * swipeAdaptor.connect()\n * swipeAdaptor.addEventListener('trigger', (event) => {\n * cube.scale.y += event.y*0.1\n * })\n * ```\n */\nexport class SwipeAdaptor extends BaseAdaptor {\n private domElement: HTMLElement\n private thresholdX: number\n private thresholdY: number\n private startX: number\n private startY: number\n private connected: boolean\n\n constructor(props: SwipeAdaptorProps = {}) {\n super()\n Object.assign(this, defaultProps, props)\n this.onPointerUp = this.onPointerUp.bind(this)\n this.onPointerDown = this.onPointerDown.bind(this)\n }\n\n connect(): void {\n this.domElement.addEventListener('pointerdown', this.onPointerDown, { passive: true })\n this.domElement.addEventListener('pointerup', this.onPointerUp, { passive: true })\n this.connected = true\n }\n\n disconnect(): void {\n this.domElement.removeEventListener('pointerdown', this.onPointerDown)\n this.domElement.removeEventListener('pointerup', this.onPointerUp)\n this.connected = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onPointerDown(event: PointerEvent): void {\n if (event.pointerType !== 'mouse' && event.isPrimary) {\n this.startX = event.screenX\n this.startY = event.screenY\n }\n }\n\n private onPointerUp(event: PointerEvent): void {\n if (event.pointerType !== 'mouse' && event.isPrimary) {\n const diffX = event.screenX - this.startX\n const diffY = event.screenY - this.startY\n if (Math.abs(diffX) >= this.thresholdX || Math.abs(diffY) >= this.thresholdY) {\n this.dispatchEvent({\n type: 'trigger',\n x: Math.abs(diffX) >= this.thresholdX ? Math.sign(diffX) : 0,\n y: Math.abs(diffY) >= this.thresholdY ? Math.sign(-1 * diffY) : 0,\n } as SwipeAdaptorEvent)\n }\n }\n }\n}\n","import { BaseAdaptor, DiscreteEvent, ContinuousEvent, IntertiaCompleteEvent } from './BaseAdaptor'\nimport { Damper, DamperValues } from '../Damper'\n\n/**\n * Event: Fired when when discrete `wheel` events are registered\n * @remarks\n * The sign represents the the direction of the wheel event that caused the event to trigger\n * */\nexport interface WheelAdaptorDiscreteEvent extends DiscreteEvent {\n x: -1 | 1 | 0\n y: -1 | 1 | 0\n}\n\n/**\n * Event: Fired on a continuous `WheelAdaptor` in response to `wheel` events\n * @remarks\n * DamperValues have `x` and `y` keys.\n * */\nexport interface WheelAdaptorContinuousEvent extends ContinuousEvent {\n values: DamperValues\n deltas: DamperValues\n}\n\n/**\n * A discrete adaptor works as a trigger - only firing events when wheel events pass a given threshold,\n * whereas a continuous adaptor continuously fires events on wheel\n * */\nexport type WheelAdaptorType = 'discrete' | 'continuous'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#WheelAdaptor} constructor\n */\nexport interface WheelAdaptorProps {\n /** 'discrete' or 'continuous' */\n type: WheelAdaptorType\n /** DOM element to listen to events on. Defaults to window */\n domElement?: HTMLElement\n /** Only used for continuous adaptor, value between 0 and 1. Defaults to 0.5 */\n dampingFactor?: number\n /** Only used for discrete adaptor, threshold of wheel.deltaX to trigger events. Defaults to 15 */\n thresholdX?: number\n /** Only used for discrete adaptor, threshold of wheel.deltaY to trigger events. Defaults to 15 */\n thresholdY?: number\n /** Only used for discrete adaptor, rest duration between firing trigger events. Defaults to 700 */\n debounceDuration?: number\n}\n\nconst defaultProps: Partial = {\n dampingFactor: 0.5,\n thresholdX: 15,\n thresholdY: 15,\n debounceDuration: 700,\n}\n\n/**\n * Parse mouse wheel events and emit either dampened values, or trigger events for swipes that cross a given threshold.\n * @remarks\n * See {@link three-story-controls#WheelAdaptorProps} for all properties that can be passed to the constructor.\n * See {@link three-story-controls#WheelAdaptorDiscreteEvent} and {@link three-story-controls#WheelAdaptorContinuousEvent} for emitted event signatures.\n * @example Discrete adaptor\n * ```javascript\n * const wheelAdaptor = new WheelAdaptor({ type: 'discrete' })\n * wheelAdaptor.connect()\n * wheelAdaptor.addEventListener('trigger', (event) => {\n * cube.scale.y += event.y*0.1\n * })\n * ```\n */\nexport class WheelAdaptor extends BaseAdaptor {\n private type: WheelAdaptorType\n private domElement: HTMLElement\n private dampingFactor: number\n private damper: Damper\n private thresholdX: number\n private thresholdY: number\n private debounceDuration: number\n private lastThresholdTrigger = 0\n private connected: boolean\n\n constructor(props: WheelAdaptorProps) {\n super()\n Object.assign(this, defaultProps, props)\n this.damper = new Damper({\n values: { x: 0, y: 0 },\n dampingFactor: this.dampingFactor,\n })\n this.onWheel = this.onWheel.bind(this)\n }\n\n connect(): void {\n const element = this.domElement || window\n element.addEventListener('wheel', this.onWheel, { passive: true })\n this.connected = true\n }\n\n disconnect(): void {\n const element = this.domElement || window\n element.removeEventListener('wheel', this.onWheel)\n this.connected = false\n }\n\n update(): void {\n if (this.type === 'continuous' && !this.damper.reachedTarget()) {\n this.damper.update()\n this.dispatchEvent({\n type: 'update',\n values: this.damper.getCurrentValues(),\n deltas: this.damper.getDeltaValues(),\n } as WheelAdaptorContinuousEvent)\n if (this.damper.reachedTarget()) {\n this.damper.resetAll(0)\n this.dispatchEvent({\n type: 'inertiacomplete',\n } as IntertiaCompleteEvent)\n }\n }\n }\n\n isEnabled(): boolean {\n return this.connected\n }\n\n private onWheel(event: WheelEvent): void {\n if (this.type === 'continuous') {\n this.damper.addToTarget('x', event.deltaX)\n this.damper.addToTarget('y', event.deltaY)\n } else if (this.type === 'discrete') {\n if (Math.abs(event.deltaX) >= this.thresholdX || Math.abs(event.deltaY) >= this.thresholdY) {\n const now = window.performance.now()\n if (now - this.lastThresholdTrigger > this.debounceDuration) {\n this.lastThresholdTrigger = now\n this.dispatchEvent({\n type: 'trigger',\n x: Math.abs(event.deltaX) >= this.thresholdX ? Math.sign(event.deltaX) : 0,\n y: Math.abs(event.deltaY) >= this.thresholdY ? Math.sign(event.deltaY) : 0,\n } as WheelAdaptorDiscreteEvent)\n }\n }\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#FreeMovementControls} constructor\n */\nexport interface FreeMovementControlsProps {\n domElement?: HTMLElement\n /** Damping factor between 0 and 1. Defaults to 0.3 */\n pointerDampFactor?: number\n /** Mutiplier for two-pointer translation. Defaults to 4 */\n pointerScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.5 */\n keyboardDampFactor?: number\n /** Mutiplier for keyboard translation. Defaults to 0.5 */\n keyboardScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.25 */\n wheelDampFactor?: number\n /** Mutiplier for wheel translation. Defaults to 0.05 */\n wheelScaleFactor?: number\n /** Mutiplier for panning. Defaults to Math.PI / 4 */\n panDegreeFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 10 */\n tiltDegreeFactor?: number\n}\n\nconst defaultProps: FreeMovementControlsProps = {\n domElement: document.body,\n pointerDampFactor: 0.3,\n pointerScaleFactor: 4,\n keyboardDampFactor: 0.5,\n keyboardScaleFactor: 0.5,\n wheelDampFactor: 0.25,\n wheelScaleFactor: 0.05,\n panDegreeFactor: Math.PI / 4,\n tiltDegreeFactor: Math.PI / 10,\n}\n\n/**\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * @remarks\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#FreeMovementControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n *\n */\nexport class FreeMovementControls implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private wheelAdaptor: WheelAdaptor\n private pointerAdaptor: PointerAdaptor\n private wheelScaleFactor: number\n private pointerScaleFactor: number\n private panDegreeFactor: number\n private tiltDegreeFactor: number\n private enabled = false\n\n /** {@inheritDoc three-story-controls#FreeMovementControlsProps#} */\n constructor(cameraRig: CameraRig, props: FreeMovementControlsProps = {}) {\n this.cameraRig = cameraRig\n\n this.wheelScaleFactor = props.wheelScaleFactor || defaultProps.wheelScaleFactor\n this.pointerScaleFactor = props.pointerScaleFactor || defaultProps.pointerScaleFactor\n this.panDegreeFactor = props.panDegreeFactor || defaultProps.panDegreeFactor\n this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps.tiltDegreeFactor\n\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'continuous',\n dampingFactor: props.keyboardDampFactor || defaultProps.keyboardDampFactor,\n incrementor: props.keyboardScaleFactor || defaultProps.keyboardScaleFactor,\n })\n\n this.wheelAdaptor = new WheelAdaptor({\n type: 'continuous',\n dampingFactor: props.wheelDampFactor || defaultProps.wheelDampFactor,\n domElement: props.domElement || defaultProps.domElement,\n })\n\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.pointerDampFactor || defaultProps.pointerDampFactor,\n })\n\n this.onWheel = this.onWheel.bind(this)\n this.onKey = this.onKey.bind(this)\n this.onPointer = this.onPointer.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.wheelAdaptor.connect()\n this.keyboardAdaptor.connect()\n this.pointerAdaptor.connect()\n this.wheelAdaptor.addEventListener('update', this.onWheel)\n this.keyboardAdaptor.addEventListener('update', this.onKey)\n this.pointerAdaptor.addEventListener('update', this.onPointer)\n this.enabled = true\n }\n\n disable(): void {\n this.wheelAdaptor.disconnect()\n this.keyboardAdaptor.disconnect()\n this.pointerAdaptor.disconnect()\n this.wheelAdaptor.removeEventListener('update', this.onWheel)\n this.keyboardAdaptor.removeEventListener('update', this.onKey)\n this.pointerAdaptor.removeEventListener('update', this.onPointer)\n this.enabled = false\n }\n\n private onWheel(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.wheelScaleFactor)\n }\n\n private onKey(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward)\n this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left)\n this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down)\n }\n\n private onPointer(event): void {\n switch (event.pointerCount) {\n case 1:\n this.cameraRig.do(CameraAction.Pan, event.deltas.x * this.panDegreeFactor)\n this.cameraRig.do(CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor)\n break\n case 2:\n this.cameraRig.do(CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor)\n this.cameraRig.do(CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor)\n break\n default:\n break\n }\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.keyboardAdaptor.update()\n this.wheelAdaptor.update()\n this.pointerAdaptor.update(time)\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#FreeMovementPlusControls} constructor\n */\nexport interface FreeMovementPlusControlsProps {\n domElement?: HTMLElement\n /** Damping factor between 0 and 1. Defaults to 0.3 */\n pointerDampFactor?: number\n /** Mutiplier for two-pointer translation. Defaults to 4 */\n pointerScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.5 */\n keyboardDampFactor?: number\n /** Mutiplier for keyboard translation. Defaults to 0.5 */\n keyboardScaleFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.25 */\n wheelDampFactor?: number\n /** Mutiplier for wheel translation. Defaults to 0.05 */\n wheelScaleFactor?: number\n /** Mutiplier for panning. Defaults to Math.PI / 4 */\n panDegreeFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 10 */\n tiltDegreeFactor?: number\n}\n\nconst defaultProps: FreeMovementPlusControlsProps = {\n domElement: document.body,\n pointerDampFactor: 0.3,\n pointerScaleFactor: 4,\n keyboardDampFactor: 0.5,\n keyboardScaleFactor: 0.5,\n wheelDampFactor: 0.25,\n wheelScaleFactor: 0.05,\n panDegreeFactor: Math.PI / 4,\n tiltDegreeFactor: Math.PI / 10,\n}\n\n/**\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * @remarks\n * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events.\n * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#FreeMovementPlusControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementPlusControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n *\n */\nexport class FreeMovementPlusControls implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private wheelAdaptor: WheelAdaptor\n private pointerAdaptor: PointerAdaptor\n private wheelScaleFactor: number\n private pointerScaleFactor: number\n private panDegreeFactor: number\n private tiltDegreeFactor: number\n private enabled = false\n\n /** {@inheritDoc three-story-controls#FreeMovementPlusControlsProps#} */\n constructor(cameraRig: CameraRig, props: FreeMovementPlusControlsProps = {}) {\n this.cameraRig = cameraRig\n\n this.wheelScaleFactor = props.wheelScaleFactor || defaultProps.wheelScaleFactor\n this.pointerScaleFactor = props.pointerScaleFactor || defaultProps.pointerScaleFactor\n this.panDegreeFactor = props.panDegreeFactor || defaultProps.panDegreeFactor\n this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps.tiltDegreeFactor\n\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'continuous',\n dampingFactor: props.keyboardDampFactor || defaultProps.keyboardDampFactor,\n incrementor: props.keyboardScaleFactor || defaultProps.keyboardScaleFactor,\n })\n\n this.wheelAdaptor = new WheelAdaptor({\n type: 'continuous',\n dampingFactor: props.wheelDampFactor || defaultProps.wheelDampFactor,\n domElement: props.domElement || defaultProps.domElement,\n })\n\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.pointerDampFactor || defaultProps.pointerDampFactor,\n })\n\n this.onWheel = this.onWheel.bind(this)\n this.onKey = this.onKey.bind(this)\n this.onPointer = this.onPointer.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.wheelAdaptor.connect()\n this.keyboardAdaptor.connect()\n this.pointerAdaptor.connect()\n this.wheelAdaptor.addEventListener('update', this.onWheel)\n this.keyboardAdaptor.addEventListener('update', this.onKey)\n this.pointerAdaptor.addEventListener('update', this.onPointer)\n this.enabled = true\n }\n\n disable(): void {\n this.wheelAdaptor.disconnect()\n this.keyboardAdaptor.disconnect()\n this.pointerAdaptor.disconnect()\n this.wheelAdaptor.removeEventListener('update', this.onWheel)\n this.keyboardAdaptor.removeEventListener('update', this.onKey)\n this.pointerAdaptor.removeEventListener('update', this.onPointer)\n this.enabled = false\n }\n\n private onWheel(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.wheelScaleFactor)\n }\n\n private onKey(event): void {\n this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward)\n this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left)\n this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down)\n\n this.cameraRig.do(CameraAction.Roll, event.values.rollRight/30 - event.values.rollLeft/30)\n this.cameraRig.do(CameraAction.Tilt, event.values.tiltDown/30 - event.values.tiltUp/30)\n this.cameraRig.do(CameraAction.Pan, event.values.panLeft/30 - event.values.panRight/30)\n }\n\n private onPointer(event): void {\n switch (event.pointerCount) {\n case 1:\n this.cameraRig.do(CameraAction.Pan, event.deltas.x * this.panDegreeFactor)\n this.cameraRig.do(CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor)\n break\n case 2:\n this.cameraRig.do(CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor)\n this.cameraRig.do(CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor)\n break\n default:\n break\n }\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.keyboardAdaptor.update()\n this.wheelAdaptor.update()\n this.pointerAdaptor.update(time)\n }\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig } from '../CameraRig'\nimport { ScrollAdaptor } from '../adaptors/ScrollAdaptor'\n\n/**\n * ScrollActions provide a way to add custom callback hooks for specific parts of the scroll area\n */\nexport interface ScrollAction {\n /** When to start the action, in %, px or vh. */\n start: string\n /** When to end the action, in %, px or vh. */\n end: string\n /** Callback with 0-1 progress when element is between start and end conditions. */\n callback: (progress: number) => void\n /** @internal */\n startPx: number\n /** @internal */\n endPx: number\n /** @internal */\n bufferedStartPx: number\n /** @internal */\n bufferedEndPx: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ScrollControls} constructor\n */\nexport interface ScrollControlsProps {\n /** Long DOM Element to observe */\n scrollElement: HTMLElement\n /** Offset to start registering scroll, in px or vh. Default starts when top of element is at bottom of viewport. */\n startOffset?: string\n /** Offset to end registering scroll, in px or vh. Default ends when bottom of element is at top of viewport. */\n endOffset?: string\n /** Value between 0 and 1. Defaults to 1 */\n dampingFactor?: number\n /** Buffer before and after element to start registering scroll. Number (percentage) between 0 and 1, defaults to 0.1 */\n buffer?: number\n /** When in the scroll to start the camera animation, can be specified in px, % or vh */\n cameraStart?: string\n /** When in the scroll to end the camera animation, can be specified in px, % or vh */\n cameraEnd?: string\n /** Array of ScrollActions for custom scroll hooks */\n scrollActions: ScrollAction[]\n}\n\nconst defaultProps: Partial = {\n startOffset: '0px',\n endOffset: '0px',\n dampingFactor: 1,\n buffer: 0.1,\n cameraStart: '0%',\n cameraEnd: '100%',\n scrollActions: [],\n}\n\nconst mapRange = (number, inMin, inMax, outMin, outMax): number => {\n return Math.max(outMin, Math.min(outMax, (number - inMin) * ((outMax - outMin) / (inMax - inMin)) + outMin))\n}\n\n/**\n * Control scheme to scrub through the CameraRig's `AnimationClip` based on the scroll of a DOM Element\n * @remarks\n * Control scheme to scrub through the CameraRig's `AnimationClip` based on the scroll of a DOM Element.\n * These controls expect to observe an element that is a few viewports long, and use the scroll distance to scrub through a camera animation.\n * By default, the 'start' of the animation is when the element starts to be in view (ie the top of the element aligns with the bottom of the viewport),\n * and the 'end' is when the element goes out of view (when the bottom of the elements aligns with the top of the viewport).\n * These trigger points can be customised with the `cameraStart` and `cameraEnd` properties. Additional scroll-dependant procedures can also be defined through `scrollActions`.\n *\n *\n * See {@link three-story-controls#ScrollControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/scroll-controls/ | DEMO }\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new ScrollControls(cameraRig, {\n * scrollElement: document.querySelector('.scroller'),\n * cameraStart: '12%',\n * cameraEnd: '90%',\n * scrollActions: [\n * { start: '0%' , end: '10%', callback: e => fadeInElement(e) },\n * { start: '85%' , end: '100%', callback: e => fadeOutElement(e) }\n * ]\n * })\n *\n * function fadeInElement(progress) { // entry fade transition }\n * function fadeOutElement(progress) { // exit fade transition }\n *\n * gltfLoader.load(cameraPath, (gltf) => {\n * cameraRig.setAnimationClip(gltf.animations[0])\n * cameraRig.setAnimationTime(0)\n * controls.enable()\n * })\n *\n * // render loop\n * function animate() {\n * controls.update()\n * }\n * ```\n */\nexport class ScrollControls implements BaseControls {\n readonly cameraRig: CameraRig\n private scrollAdaptor: ScrollAdaptor\n private enabled = false\n private cameraStart: string\n private cameraEnd: string\n private cameraStartPx: number\n private cameraEndPx: number\n private cameraBufferedStartPx: number\n private cameraBufferedEndPx: number\n private scrollActions: ScrollAction[]\n private buffer: number\n\n constructor(cameraRig: CameraRig, props: ScrollControlsProps) {\n this.cameraRig = cameraRig\n this.cameraRig.setAnimationTime(0)\n\n this.scrollAdaptor = new ScrollAdaptor({\n scrollElement: props.scrollElement,\n dampingFactor: props.dampingFactor || defaultProps.dampingFactor,\n startOffset: props.startOffset || defaultProps.startOffset,\n endOffset: props.endOffset || defaultProps.endOffset,\n buffer: props.buffer || defaultProps.buffer,\n })\n\n this.cameraStart = props.cameraStart || defaultProps.cameraStart\n this.cameraEnd = props.cameraEnd || defaultProps.cameraEnd\n this.scrollActions = props.scrollActions || defaultProps.scrollActions\n this.buffer = props.buffer || defaultProps.buffer\n this.calculateStops()\n this.onScroll = this.onScroll.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.scrollAdaptor.connect()\n this.scrollAdaptor.addEventListener('update', this.onScroll)\n this.enabled = true\n }\n\n disable(): void {\n this.scrollAdaptor.disconnect()\n this.scrollAdaptor.removeEventListener('update', this.onScroll)\n this.enabled = false\n }\n\n update(): void {\n if (this.enabled) {\n this.scrollAdaptor.update()\n }\n }\n\n private calculateStops(): void {\n this.cameraStartPx = this.scrollAdaptor.parseOffset(this.cameraStart)\n this.cameraEndPx = this.scrollAdaptor.parseOffset(this.cameraEnd)\n this.cameraBufferedStartPx = this.cameraStartPx * (1 - this.buffer)\n this.cameraBufferedEndPx = this.cameraEndPx * (1 + this.buffer)\n this.scrollActions.forEach((action) => {\n action.startPx = this.scrollAdaptor.parseOffset(action.start)\n action.endPx = this.scrollAdaptor.parseOffset(action.end)\n action.bufferedStartPx = action.startPx * (1 - this.buffer)\n action.bufferedEndPx = action.endPx * (1 + this.buffer)\n })\n }\n\n private onScroll(event): void {\n const progress = event.dampenedValues.scrollPx\n if (progress >= this.cameraBufferedStartPx && progress <= this.cameraBufferedEndPx) {\n this.cameraRig.setAnimationPercentage(mapRange(progress, this.cameraStartPx, this.cameraEndPx, 0, 1))\n }\n this.scrollActions.forEach((action) => {\n if (progress >= action.bufferedStartPx && progress <= action.bufferedEndPx) {\n action.callback(mapRange(progress, action.startPx, action.endPx, 0, 1))\n }\n })\n }\n}\n","import { EventDispatcher, Vector3, Quaternion } from 'three'\nimport { BaseControls, UpdatePOIsEvent, ExitPOIsEvent } from './BaseControls'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { CameraRig } from '../CameraRig'\n\nexport interface StoryPointMarker {\n /** Camera position */\n position: Vector3\n /** Camera quaternion */\n quaternion: Quaternion\n /** Transition duration, defaults to 1 */\n duration?: number\n /** Transition easing, defaults to power1 */\n ease?: string\n /** Use spherical interpolation for rotation, defaults to true */\n useSlerp?: boolean\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#StoryPointsControls} constructor\n */\nexport interface StoryPointsControlsProps {\n /** Whether to cycle to the first/last POI after reaching the end/start. When false, controls with emit 'ExitStoryPoints' events. Defaults to false. */\n cycle?: boolean\n /** Use keyboard arrow keys as navigation, defaults to true */\n useKeyboard?: boolean\n}\n\nconst defaultProps: StoryPointsControlsProps = {\n cycle: false,\n useKeyboard: true,\n}\n\n/**\n * Control scheme to transition the camera between given points in world space.\n * @remarks\n * See {@link three-story-controls#StoryPointsControlsProps} for all properties that can be passed to the constructor.\n *\n * See {@link three-story-controls#StoryPointMarker} for POI properties.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/story-points/ | DEMO }\n *\n * @example\n * ```js\n *\n * const pois = [\n * { position: new Vector3(...), quaternion: new Quaternion(...) },\n * { position: new Vector3(...), quaternion: new Quaternion(...) },\n * ]\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new StoryPointsControls(cameraRig, pois)\n *\n * controls.enable()\n * controls.goToPOI(0)\n *\n * // Assuming DOM elements with classes 'nextBtn' and 'prevBtn' have been created\n * document.querySelector('.nextBtn').on('click', () => controls.nextPOI() )\n * document.querySelector('.prevBtn').on('click', () => controls.prevPOI() )\n * ```\n */\nexport class StoryPointsControls extends EventDispatcher implements BaseControls {\n readonly cameraRig: CameraRig\n private keyboardAdaptor: KeyboardAdaptor\n private pois: StoryPointMarker[]\n private currentIndex: number | null = null\n private upcomingIndex: number | null = null\n private enabled = false\n private cycle: boolean\n private useKeyboard: boolean\n\n constructor(cameraRig: CameraRig, pois: StoryPointMarker[] = [], props: StoryPointsControlsProps = {}) {\n super()\n this.cameraRig = cameraRig\n this.pois = pois\n Object.assign(this, defaultProps, props)\n if (this.useKeyboard) {\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'discrete',\n keyMapping: {\n next: ['ArrowDown', 'ArrowRight'],\n prev: ['ArrowUp', 'ArrowLeft'],\n },\n })\n this.onKey = this.onKey.bind(this)\n }\n this.onCameraStart = this.onCameraStart.bind(this)\n this.onCameraUpdate = this.onCameraUpdate.bind(this)\n this.onCameraEnd = this.onCameraEnd.bind(this)\n }\n\n getCurrentIndex(): number {\n return this.currentIndex\n }\n\n nextPOI(): void {\n const next = this.currentIndex + 1\n if (next >= this.pois.length && !this.cycle) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'end',\n } as ExitPOIsEvent)\n } else {\n this.goToPOI(next % this.pois.length)\n }\n }\n\n prevPOI(): void {\n const prev = this.currentIndex - 1\n if (prev < 0 && !this.cycle) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'start',\n } as ExitPOIsEvent)\n } else {\n this.goToPOI((prev + this.pois.length) % this.pois.length)\n }\n }\n\n goToPOI(index: number): void {\n this.upcomingIndex = index\n const poi = this.pois[this.upcomingIndex]\n this.cameraRig.flyTo(poi.position, poi.quaternion, poi.duration, poi.ease, poi.useSlerp)\n }\n\n enable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.connect()\n this.keyboardAdaptor.addEventListener('trigger', this.onKey)\n }\n this.cameraRig.addEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.addEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.addEventListener('CameraMoveEnd', this.onCameraEnd)\n this.enabled = true\n }\n\n disable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.disconnect()\n this.keyboardAdaptor.removeEventListener('trigger', this.onKey)\n }\n this.cameraRig.removeEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.removeEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.removeEventListener('CameraMoveEnd', this.onCameraEnd)\n this.enabled = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n private updatePois(progress: number): void {\n this.dispatchEvent({\n type: 'update',\n currentIndex: this.currentIndex,\n upcomingIndex: this.upcomingIndex,\n progress,\n } as UpdatePOIsEvent)\n }\n\n private onCameraStart(): void {\n this.updatePois(0)\n }\n\n private onCameraUpdate(event): void {\n this.updatePois(event.progress)\n }\n\n private onCameraEnd(): void {\n this.currentIndex = this.upcomingIndex\n this.upcomingIndex = null\n }\n\n private onKey(event): void {\n if (event.trigger === 'next') {\n this.nextPOI()\n } else if (event.trigger === 'prev') {\n this.prevPOI()\n }\n }\n}\n","import { EventDispatcher } from 'three'\nimport { BaseControls, UpdatePOIsEvent, ExitPOIsEvent } from './BaseControls'\nimport { CameraRig } from '../CameraRig'\nimport { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor'\nimport { WheelAdaptor } from '../adaptors/WheelAdaptor'\nimport { SwipeAdaptor } from '../adaptors/SwipeAdaptor'\n\nexport interface PathPointMarker {\n frame: number\n}\n\n/**\n * Properties that can be passed to the {@link three-story-controls#PathPointsControls} constructor\n */\nexport interface PathPointsControlsProps {\n /** Threshold of wheel delta that triggers a transition. Defaults to 15 */\n wheelThreshold?: number\n /** Threshold of swipe distance that triggers a transition. Defaults to 60 */\n swipeThreshold?: number\n /** Transition duration, defaults to 1 */\n duration?: number\n /** Transition easing, defaults to power1 */\n ease?: string\n /** Use keyboard arrow keys as navigation, defaults to true */\n useKeyboard?: boolean\n}\n\nconst defaultProps: PathPointsControlsProps = {\n wheelThreshold: 15,\n swipeThreshold: 60,\n duration: 1,\n ease: 'power1',\n useKeyboard: true,\n}\n\n/**\n * Control scheme to transition the camera between specific points (frames) along a path specified through an `AnimationClip`.\n * @remarks\n * Control scheme to transition the camera between specific points (frames) along a path specified through an `AnimationClip`.\n * A mouse wheel or swipe or keyboard arrow event triggers the camera to smoothly transition from one given frame number to the next.\n *\n *\n * Note: CSS property `touch-action: none` will probably be needed on listener element.\n *\n * See {@link three-story-controls#PathPointsControlsProps} for all properties that can be passed to the constructor.\n *\n * See {@link three-story-controls#PathPointMarker} for POI properties.\n *\n * See {@link three-story-controls#UpdatePOIsEvent} and {@link three-story-controls#ExitPOIsEvent} for emitted event signatures.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/path-points/ | DEMO }\n * @example\n * ```js\n *\n * const pois = [ { frame: 0 }, { frame: 54 } ....]\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * let camera, cameraRig, controls\n *\n * gltfLoader.load(cameraPath, (gltf) => {\n * camera = gltf.cameras[0]\n * cameraRig = new CameraRig(camera, scene)\n * cameraRig.setAnimationClip(gltf.animations[0])\n * cameraRig.setAnimationTime(0)\n * controls = new PathPointsControls(cameraRig, pois)\n * controls.enable()\n * controls.addEventListener('ExitPOIs', (e) => {\n * // e.exitFrom will be either 'start' or 'end'\n * })\n * controls.addEventListener('update', (e) => {\n * // e.currentIndex will be the index of the starting poi\n * // e.upcomingIndex will be the index of the upcoming poi\n * // e.progress will be a number 0-1 indicating progress of the transition\n * })\n * })\n * ```\n */\nexport class PathPointsControls extends EventDispatcher implements BaseControls {\n readonly cameraRig: CameraRig\n private wheelAdaptor: WheelAdaptor\n private swipeAdaptor: SwipeAdaptor\n private keyboardAdaptor: KeyboardAdaptor\n private pois: PathPointMarker[]\n private currentIndex = 0\n private upcomingIndex: number | null = null\n private enabled = false\n private duration: number\n private ease: string\n private wheelThreshold: number\n private swipeThreshold: number\n private useKeyboard: boolean\n\n constructor(cameraRig: CameraRig, pois: PathPointMarker[] = [], props: PathPointsControlsProps = {}) {\n super()\n this.cameraRig = cameraRig\n this.pois = pois\n Object.assign(this, defaultProps, props)\n this.wheelAdaptor = new WheelAdaptor({ type: 'discrete', thresholdY: this.wheelThreshold })\n this.swipeAdaptor = new SwipeAdaptor({ thresholdY: this.swipeThreshold })\n if (this.useKeyboard) {\n this.keyboardAdaptor = new KeyboardAdaptor({\n type: 'discrete',\n keyMapping: {\n next: ['ArrowDown', 'ArrowRight'],\n prev: ['ArrowUp', 'ArrowLeft'],\n },\n })\n this.onKey = this.onKey.bind(this)\n }\n this.onCameraStart = this.onCameraStart.bind(this)\n this.onCameraUpdate = this.onCameraUpdate.bind(this)\n this.onCameraEnd = this.onCameraEnd.bind(this)\n this.onTrigger = this.onTrigger.bind(this)\n }\n\n getCurrentIndex(): number {\n return this.currentIndex\n }\n\n enable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.addEventListener('trigger', this.onKey)\n this.keyboardAdaptor.connect()\n }\n this.wheelAdaptor.addEventListener('trigger', this.onTrigger)\n this.swipeAdaptor.addEventListener('trigger', this.onTrigger)\n this.cameraRig.addEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.addEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.addEventListener('CameraMoveEnd', this.onCameraEnd)\n this.wheelAdaptor.connect()\n this.swipeAdaptor.connect()\n this.enabled = true\n }\n\n disable(): void {\n if (this.useKeyboard) {\n this.keyboardAdaptor.removeEventListener('trigger', this.onKey)\n this.keyboardAdaptor.disconnect()\n }\n this.wheelAdaptor.removeEventListener('trigger', this.onTrigger)\n this.swipeAdaptor.removeEventListener('trigger', this.onTrigger)\n this.cameraRig.removeEventListener('CameraMoveStart', this.onCameraStart)\n this.cameraRig.removeEventListener('CameraMoveUpdate', this.onCameraUpdate)\n this.cameraRig.removeEventListener('CameraMoveEnd', this.onCameraEnd)\n this.wheelAdaptor.disconnect()\n this.swipeAdaptor.disconnect()\n this.enabled = false\n }\n\n update(): void {\n // nothing to do here\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n private onKey(event): void {\n switch (event.trigger) {\n case 'prev':\n this.onTrigger({ y: -1 })\n break\n case 'next':\n this.onTrigger({ y: 1 })\n break\n default:\n break\n }\n }\n\n private onTrigger(event): void {\n const index = this.currentIndex + event.y\n if (index >= this.pois.length) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'end',\n } as ExitPOIsEvent)\n } else if (index < 0) {\n this.dispatchEvent({\n type: 'ExitPOIs',\n exitFrom: 'start',\n } as ExitPOIsEvent)\n } else {\n this.upcomingIndex = index\n this.cameraRig.flyToKeyframe(this.pois[this.upcomingIndex].frame, this.duration, this.ease)\n }\n }\n\n private updatePois(progress: number): void {\n this.dispatchEvent({\n type: 'update',\n currentIndex: this.currentIndex,\n upcomingIndex: this.upcomingIndex,\n progress,\n } as UpdatePOIsEvent)\n }\n\n private onCameraStart(): void {\n this.updatePois(0)\n }\n\n private onCameraUpdate(event): void {\n this.updatePois(event.progress)\n }\n\n private onCameraEnd(): void {\n this.currentIndex = this.upcomingIndex\n this.upcomingIndex = null\n }\n}\n","import { BaseControls } from './BaseControls'\nimport { CameraRig, CameraAction, RigComponent } from '../CameraRig'\nimport { PointerAdaptor } from '../adaptors/PointerAdaptor'\n\n/**\n * Properties that can be passed to the {@link three-story-controls#ThreeDOFControls} constructor\n */\n//TODO: add option for relative or absolute control (in terms of screen space)\nexport interface ThreeDOFControlsProps {\n /** DOM element that should listen for pointer events. Defaults to `document.body` */\n domElement?: HTMLElement\n /** Mutiplier for panning. Defaults to Math.PI / 20 */\n panFactor?: number\n /** Mutiplier for tilting. Defaults to Math.PI / 20 */\n tiltFactor?: number\n /** Mutiplier for truck translation. Defaults to 1 */\n truckFactor?: number\n /** Mutiplier for pedestal translation. Defaults to 1 */\n pedestalFactor?: number\n /** Damping factor between 0 and 1. Defaults to 0.7 */\n dampingFactor?: number\n}\n\nconst defaultProps: ThreeDOFControlsProps = {\n domElement: document.body,\n panFactor: Math.PI / 20,\n tiltFactor: Math.PI / 20,\n truckFactor: 1,\n pedestalFactor: 1,\n dampingFactor: 0.7,\n}\n\n/**\n * Control scheme for slight rotation and translation movement in response to mouse movements (designed to be used in conjunction with other control schemes)\n * @remarks\n * Note: CSS property `touch-action: none` will probably be needed on listener element\n *\n * See {@link three-story-controls#ThreeDOFControlsProps} for all properties that can be passed to the constructor.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/story-points/ | DEMO w/ story points }\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/scroll-controls/ | DEMO w/ scroll controls}\n *\n * @example\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new ThreeDOFControls(cameraRig)\n *\n * controls.enable()\n *\n * // render loop\n * function animate(t) {\n * controls.update(t)\n * }\n * ```\n */\nexport class ThreeDOFControls implements BaseControls {\n readonly cameraRig: CameraRig\n private pointerAdaptor: PointerAdaptor\n private enabled = false\n private panFactor: number\n private tiltFactor: number\n private truckFactor: number\n private pedestalFactor: number\n\n constructor(cameraRig: CameraRig, props: ThreeDOFControlsProps = {}) {\n this.cameraRig = cameraRig\n Object.assign(this, defaultProps, props)\n this.pointerAdaptor = new PointerAdaptor({\n domElement: props.domElement || defaultProps.domElement,\n dampingFactor: props.dampingFactor || defaultProps.dampingFactor,\n })\n this.onPointerMove = this.onPointerMove.bind(this)\n }\n\n isEnabled(): boolean {\n return this.enabled\n }\n\n enable(): void {\n this.pointerAdaptor.connect()\n this.pointerAdaptor.addEventListener('update', this.onPointerMove)\n this.enabled = true\n }\n\n disable(): void {\n this.pointerAdaptor.disconnect()\n this.pointerAdaptor.removeEventListener('update', this.onPointerMove)\n this.enabled = false\n }\n\n update(time: number): void {\n if (this.enabled) {\n this.pointerAdaptor.update(time)\n }\n }\n\n private onPointerMove(event): void {\n if (event.pointerCount === 0) {\n this.cameraRig.do(CameraAction.Pan, -event.deltas.x * this.panFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Tilt, -event.deltas.y * this.tiltFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.truckFactor, RigComponent.Eyes)\n this.cameraRig.do(CameraAction.Pedestal, event.deltas.y * this.pedestalFactor, RigComponent.Eyes)\n }\n }\n}\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { Quaternion, Vector3, AnimationClip, VectorKeyframeTrack, QuaternionKeyframeTrack } from 'three'\nimport gsap from 'gsap'\nimport { CameraRig } from '../CameraRig'\nimport { FreeMovementControls } from '../controlschemes/FreeMovementControls'\nimport './index.css'\n\nconst easeFunctions = ['none', 'power1', 'power2', 'power3', 'power4', 'sine', 'expo', 'circ']\n\ninterface POI {\n position: Vector3\n quaternion: Quaternion\n duration: number\n ease: string\n image: string\n}\n\nconst DOMClass = {\n visit: 'visit',\n remove: 'remove',\n duration: 'duration',\n ease: 'ease',\n moveUp: 'move-up',\n moveDown: 'move-down',\n}\n\n/**\n * A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene\n *\n * @remarks\n * A helper tool for creating camera animation paths and/or choosing camera look-at positions for points of interest in a scene.\n *\n * The `CameraHelper` can be set up with any scene along with {@link three-story-controls#FreeMovementControls | FreeMovementControls}.\n *\n * It renders as an overlay with functionality to add/remove/reorders points of interest, and create an animation path between them.\n * Each saved camera position is displayed with an image on the `CameraHelper` panel.\n *\n * The data can be exported as a JSON file that can then be used with different control schemes.\n *\n * {@link https://nytimes.github.io/three-story-controls/examples/demos/camera-helper | DEMO }\n *\n * @example\n * Here's an example of initializing the CameraHelper\n * ```js\n * const scene = new Scene()\n * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000)\n * const cameraRig = new CameraRig(camera, scene)\n * const controls = new FreeMovementControls(cameraRig)\n *\n * controls.enable()\n *\n * const cameraHelper = new CameraHelper(rig, controls, renderer.domElement)\n *\n * // Render loop\n * // To allow for capturing an image of the canvas,\n * // it's important to update the CameraHelper after the scene is rendered,\n * // but before requesting the animation frame\n * function render(t) {\n * controls.update(t)\n * renderer.render(scene, camera)\n * cameraHelper.update(t)\n * window.requestAnimationFrame(render)\n * }\n *\n * render()\n * ```\n *\n *\n *\n * The following examples demonstrate using the exported data. Note: Depending on your setup, you may need to change the .json extension to .js and prepend the text with `export default` such that you can import it as javascript\n *\n * @example\n * Here's an example using the exported JSON data with ScrollControls.\n * ```javascript\n * import * as cameraData from 'camera-control.json'\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n *\n * // Parse the JSON animation clip\n * cameraRig.setAnimationClip(AnimationClip.parse(cameraData.animationClip))\n * cameraRig.setAnimationTime(0)\n *\n * const controls = new ScrollControls(cameraRig, {\n * scrollElement: document.querySelector('.scroller'),\n * })\n *\n * controls.enable()\n *\n * function render(t) {\n * window.requestAnimationFrame(render)\n * if (rig.hasAnimation) {\n * controls.update(t)\n * }\n * renderer.render(scene, camera)\n * }\n * ```\n *\n * @example\n * Here's an example using the exported data with Story Point controls\n * ```javascript\n * import * as cameraData from 'camera-control.json'\n * const scene = new Scene()\n * const gltfLoader = new GLTFLoader()\n * const camera = new PerspectiveCamera()\n * const cameraRig = new CameraRig(camera, scene)\n *\n * // Format the exported data to create three.js Vector and Quaternions\n * const pois = cameraData.pois.map((poi, i) => {\n * return {\n * position: new Vector3(...poi.position),\n * quaternion: new Quaternion(...poi.quaternion),\n * duration: poi.duration,\n * ease: poi.ease,\n * }\n * })\n *\n * const controls = new StoryPointsControls(rig, pois)\n * controls.enable()\n *\n * function render(t) {\n * window.requestAnimationFrame(render)\n * controls.update(t)\n * renderer.render(scene, camera)\n * }\n * ```\n */\nexport class CameraHelper {\n readonly rig: CameraRig\n readonly controls: FreeMovementControls\n readonly canvas: HTMLCanvasElement\n private pois: POI[]\n private currentIndex: number | null\n private drawer: HTMLElement\n private domList: HTMLElement\n private collapseBtn: HTMLElement\n private fileInput: HTMLInputElement\n private btnImport: HTMLElement\n private doCapture: boolean\n private animationClip: AnimationClip\n private isPlaying: boolean\n private playStartTime: number\n private useSlerp = true\n\n constructor(rig: CameraRig, controls: FreeMovementControls, canvas: HTMLCanvasElement, canvasParent?: HTMLElement) {\n this.rig = rig\n this.controls = controls\n this.canvas = canvas\n this.pois = []\n this.currentIndex = null\n this.doCapture = false\n this.isPlaying = false\n this.initUI(canvasParent)\n }\n\n private capture(): void {\n this.doCapture = true\n }\n\n update(time: number): void {\n if (this.doCapture) {\n const canvas = document.createElement('canvas')\n const ctx = canvas.getContext('2d')\n canvas.width = 640\n canvas.height = 360\n ctx.drawImage(this.canvas, 0, 0, canvas.width, canvas.height)\n const image = canvas.toDataURL()\n\n this.addPoi(image)\n this.doCapture = false\n }\n if (this.isPlaying) {\n if (!this.playStartTime) {\n this.playStartTime = time\n this.controls.disable()\n this.rig.packTransform()\n }\n const t = (time - this.playStartTime) / 1000\n this.rig.setAnimationTime(t)\n if (t > this.animationClip.duration) {\n this.isPlaying = false\n this.playStartTime = null\n this.controls.enable()\n this.rig.unpackTransform()\n }\n }\n }\n\n private addPoi(image: string): void {\n this.pois.push({\n ...this.rig.getWorldCoordinates(),\n duration: 1,\n ease: 'power1',\n image,\n })\n this.currentIndex = this.pois.length - 1\n this.createClip()\n this.render()\n }\n\n private updatePoi(index: number, props: Partial): void {\n this.pois[index] = {\n ...this.pois[index],\n ...props,\n }\n }\n\n private movePoi(index: number, direction: number): void {\n if (index + direction >= 0 && index + direction < this.pois.length) {\n const temp = this.pois[index]\n this.pois[index] = this.pois[index + direction]\n this.pois[index + direction] = temp\n this.render()\n }\n }\n\n private removePoi(index: number): void {\n this.pois.splice(index, 1)\n this.render()\n }\n\n private goToPoi(index: number): void {\n const poi = this.pois[index]\n this.rig.flyTo(poi.position, poi.quaternion, poi.duration, poi.ease, this.useSlerp)\n }\n\n private createClip(): void {\n if (this.pois.length > 0) {\n const times = []\n const positionValues = []\n const quaternionValues = []\n const tmpPosition = new Vector3()\n const tmpQuaternion = new Quaternion()\n const framesPerPoi = 10\n\n let tweenStartTime = 0\n\n // transform imported arrays to quaternions and vector3 when loading a camera file\n if (!this.pois[0].quaternion.isQuaternion && !this.pois[0].position.isVector3) {\n for (let i = 0; i < this.pois.length; i++) {\n const p = this.pois[i]\n p.quaternion = new Quaternion(p.quaternion[0], p.quaternion[1], p.quaternion[2], p.quaternion[3])\n p.position = new Vector3(p.position[0], p.position[1], p.position[2])\n }\n }\n\n for (let i = 0; i < this.pois.length - 1; i++) {\n const p1 = this.pois[i]\n const p2 = this.pois[i + 1]\n\n const values = {\n px: p1.position.x,\n py: p1.position.y,\n pz: p1.position.z,\n qx: p1.quaternion.x,\n qy: p1.quaternion.y,\n qz: p1.quaternion.z,\n qw: p1.quaternion.w,\n slerpAmount: 0,\n }\n\n const target = {\n px: p2.position.x,\n py: p2.position.y,\n pz: p2.position.z,\n qx: p2.quaternion.x,\n qy: p2.quaternion.y,\n qz: p2.quaternion.z,\n qw: p2.quaternion.w,\n slerpAmount: 1,\n duration: p2.duration,\n ease: p2.ease,\n }\n\n const tween = gsap.to(values, target)\n\n for (let j = 0; j < framesPerPoi; j++) {\n const lerpAmount = p2.duration * (j / framesPerPoi)\n times.push(tweenStartTime + lerpAmount)\n tween.seek(lerpAmount)\n if (this.useSlerp) {\n tmpQuaternion.slerpQuaternions(p1.quaternion, p2.quaternion, values.slerpAmount)\n } else {\n tmpQuaternion.set(values.qx, values.qy, values.qz, values.qw)\n }\n tmpPosition.set(values.px, values.py, values.pz)\n tmpQuaternion.toArray(quaternionValues, quaternionValues.length)\n tmpPosition.toArray(positionValues, positionValues.length)\n }\n tweenStartTime += p2.duration\n }\n // add last point\n const last = this.pois[this.pois.length - 1]\n last.quaternion.toArray(quaternionValues, quaternionValues.length)\n last.position.toArray(positionValues, positionValues.length)\n times.push(tweenStartTime)\n this.animationClip = new AnimationClip(null, tweenStartTime, [\n new VectorKeyframeTrack('Translation.position', times, positionValues),\n new QuaternionKeyframeTrack('Rotation.quaternion', times, quaternionValues),\n ])\n this.rig.setAnimationClip(this.animationClip)\n }\n }\n\n private scrubClip(amount: number): void {\n if (this.pois.length > 0) {\n this.rig.setAnimationPercentage(amount)\n }\n }\n\n private playClip(): void {\n if (this.pois.length > 0) {\n this.isPlaying = true\n }\n }\n\n private import(): void {\n if (this.fileInput) {\n this.fileInput.click()\n const reader = new FileReader()\n\n this.fileInput.onchange = () => {\n reader.readAsText(this.fileInput.files[0])\n reader.onload = (e) => {\n const parsed = JSON.parse(e.target.result)\n this.pois = parsed.pois\n this.animationClip = parsed.animationClip\n this.createClip()\n this.render()\n }\n }\n }\n }\n\n private export({ draft }): void {\n if (this.pois.length > 0) {\n const jsondata = {} as any\n jsondata.pois = this.pois.map((poi) => {\n const position = [poi.position.x, poi.position.y, poi.position.z]\n const quaternion = [poi.quaternion.x, poi.quaternion.y, poi.quaternion.z, poi.quaternion.w]\n const obj = {\n position,\n quaternion,\n duration: poi.duration,\n ease: poi.ease,\n } as any\n\n if (draft) {\n obj.image = poi.image\n }\n\n return obj\n })\n if (this.animationClip) {\n jsondata.animationClip = AnimationClip.toJSON(this.animationClip)\n }\n const data = 'text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(jsondata))\n const a = document.createElement('a')\n a.href = 'data:' + data\n a.download = `camera-data${draft ? '-draft' : ''}.json`\n document.body.appendChild(a)\n a.click()\n a.remove()\n }\n }\n\n private exportImages(): void {\n const link = document.createElement('a')\n document.body.appendChild(link)\n this.pois.forEach((poi, index) => {\n link.href = poi.image\n link.download = `camera-poi-${index}.png`\n link.click()\n })\n link.remove()\n }\n\n // ui\n\n private initUI(canvasParent?: HTMLElement): void {\n this.drawer = document.createElement('div')\n this.drawer.classList.add('tb-ch')\n\n const btnAdd = document.createElement('button')\n btnAdd.classList.add('btn-round', 'add')\n btnAdd.innerText = '+'\n btnAdd.onclick = this.capture.bind(this)\n\n this.collapseBtn = document.createElement('button')\n this.collapseBtn.classList.add('btn-round', 'collapse')\n this.collapseBtn.innerText = '<'\n this.collapseBtn.onclick = this.collapse.bind(this)\n\n const controlWrapper = document.createElement('div')\n controlWrapper.classList.add('controls')\n\n this.fileInput = document.createElement('input')\n this.fileInput.type = 'file'\n this.fileInput.id = 'import'\n this.fileInput.accept = 'application/json'\n this.fileInput.style.display = 'none'\n\n this.btnImport = document.createElement('button')\n this.btnImport.classList.add('btn-text', 'import')\n this.btnImport.innerText = 'import draft JSON'\n this.btnImport.onclick = this.import.bind(this)\n\n const btnExportImages = document.createElement('button')\n btnExportImages.classList.add('btn-text', 'export')\n btnExportImages.innerText = 'export draft JSON'\n btnExportImages.onclick = this.export.bind(this, { draft: true })\n\n const btnExport = document.createElement('button')\n btnExport.classList.add('btn-text', 'export')\n btnExport.innerText = 'export production JSON'\n btnExport.onclick = this.export.bind(this, { draft: false })\n\n const bntExportImages = document.createElement('button')\n bntExportImages.classList.add('btn-text', 'export-images')\n bntExportImages.innerHTML = 'export images'\n bntExportImages.onclick = this.exportImages.bind(this)\n\n const btnPlay = document.createElement('button')\n btnPlay.classList.add('btn-text', 'play')\n btnPlay.innerText = 'play'\n btnPlay.onclick = this.playClip.bind(this)\n\n const sliderTime: HTMLInputElement = document.createElement('input')\n sliderTime.type = 'range'\n sliderTime.min = '0'\n sliderTime.max = '1000'\n sliderTime.step = '0.1'\n sliderTime.value = '0'\n const updateTime = this.scrubClip.bind(this)\n sliderTime.onmousedown = () => this.rig.packTransform()\n sliderTime.onmouseup = () => this.rig.unpackTransform()\n sliderTime.oninput = (e) => updateTime(parseInt((e.target).value) / 1000)\n\n this.domList = document.createElement('div')\n this.domList.classList.add('pois')\n this.domList.onclick = this.handleEvents.bind(this)\n this.domList.onchange = this.handleEvents.bind(this)\n\n controlWrapper.append(\n this.fileInput,\n this.btnImport,\n btnPlay,\n sliderTime,\n bntExportImages,\n btnExportImages,\n btnExport,\n )\n this.drawer.append(btnAdd, this.collapseBtn, this.domList, controlWrapper)\n\n const parent = canvasParent || document.body\n parent.append(this.drawer)\n }\n\n private handleEvents(event): void {\n const index = event.target.dataset.index\n if (index) {\n if (event.target.classList.contains(DOMClass.visit)) {\n this.goToPoi(parseInt(index))\n } else if (event.target.classList.contains(DOMClass.remove)) {\n this.removePoi(parseInt(index))\n } else if (event.target.classList.contains(DOMClass.duration)) {\n this.updatePoi(parseInt(index), { duration: parseFloat((event.target).value) })\n } else if (event.target.classList.contains(DOMClass.ease)) {\n this.updatePoi(parseInt(index), { ease: (event.target).value })\n } else if (event.target.classList.contains(DOMClass.moveUp)) {\n this.movePoi(parseInt(index), -1)\n } else if (event.target.classList.contains(DOMClass.moveDown)) {\n this.movePoi(parseInt(index), 1)\n }\n this.createClip()\n }\n }\n\n private collapse(): void {\n if (this.drawer.classList.contains('collapsed')) {\n this.drawer.classList.remove('collapsed')\n this.collapseBtn.innerText = '<'\n } else {\n this.drawer.classList.add('collapsed')\n this.collapseBtn.innerText = '>'\n }\n }\n\n private render(): void {\n this.domList.innerHTML = ''\n this.pois.forEach((poi, index) => {\n const div = document.createElement('div')\n div.classList.add('poi')\n\n const textHeading = document.createElement('h2')\n textHeading.innerText = `${index + 1}.`\n\n const wrapper = document.createElement('div')\n wrapper.classList.add('wrapper')\n const controls = document.createElement('div')\n controls.classList.add('poi-controls')\n const params = document.createElement('div')\n params.classList.add('poi-params')\n\n const image = new Image()\n image.src = poi.image\n\n const labelDuration = document.createElement('label')\n labelDuration.innerText = 'Duration'\n const inputDuration = document.createElement('input')\n inputDuration.classList.add(DOMClass.duration)\n inputDuration.dataset.index = `${index}`\n inputDuration.type = 'number'\n inputDuration.value = String(poi.duration)\n\n const labelEase = document.createElement('label')\n labelEase.innerText = 'Easing'\n const selectEase = document.createElement('select')\n selectEase.classList.add(DOMClass.ease)\n selectEase.dataset.index = `${index}`\n const options = easeFunctions.map((x) => {\n const op = document.createElement('option')\n op.innerText = x\n op.value = x\n op.selected = x === poi.ease\n return op\n })\n selectEase.append(...options)\n\n const btnRemove = document.createElement('button')\n btnRemove.classList.add(DOMClass.remove)\n btnRemove.title = 'Remove'\n btnRemove.dataset.index = `${index}`\n btnRemove.innerText = 'x'\n\n const btnVisit = document.createElement('button')\n btnVisit.classList.add(DOMClass.visit)\n btnVisit.title = 'Visit'\n btnVisit.dataset.index = `${index}`\n btnVisit.innerHTML = '→'\n\n const btnMoveUp = document.createElement('button')\n btnMoveUp.classList.add(DOMClass.moveUp)\n btnMoveUp.title = 'Move up'\n btnMoveUp.dataset.index = `${index}`\n btnMoveUp.innerHTML = '↑'\n\n const btnMoveDown = document.createElement('button')\n btnMoveDown.classList.add(DOMClass.moveDown)\n btnMoveDown.title = 'Move down'\n btnMoveDown.dataset.index = `${index}`\n btnMoveDown.innerHTML = '↓'\n\n controls.append(btnRemove, btnVisit, btnMoveUp, btnMoveDown)\n params.append(labelDuration, inputDuration, labelEase, selectEase)\n wrapper.append(image, controls)\n div.append(textHeading, wrapper, params)\n this.domList.appendChild(div)\n })\n }\n}\n"],"names":["CameraAction","RigComponent","Axis","Vector3","EventDispatcher","Object3D","PerspectiveCamera","Quaternion","Euler","AnimationMixer","gsap","defaultProps","AnimationClip","VectorKeyframeTrack","QuaternionKeyframeTrack"],"mappings":";;;;;;;;;;IAcA;;;;;;;;;;;;;;;UAgBa,MAAM;QAQjB,YAAY,KAAkB;YANtB,YAAO,GAAG,KAAK,CAAA;YACf,WAAM,GAAiB,EAAE,CAAA;YACzB,iBAAY,GAAiB,EAAE,CAAA;YAC/B,gBAAW,GAAiB,EAAE,CAAA;YAIpC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;YACxC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;YAC9C,IAAI,CAAC,WAAW,GAAG,EAAE,CAAA;YACrB,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE;gBAC7B,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;aAC1B;YACD,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,aAAa,CAAA;YACxC,IAAI,KAAK,CAAC,OAA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,WAAW,CAAC,OAAO,CAAC,KAAK,GAAG,GAAG,KAAK,EAAE,CAAA;gBACtC,WAAW,CAAC,SAAS,GAAG,QAAQ,CAAA;gBAEhC,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,CAAA;gBAC5D,MAAM,CAAC,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAC,CAAA;gBAClE,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;gBAC/B,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,EAAE,MAAM,CAAC,CAAA;gBACxC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAA;aAC9B,CAAC,CAAA;SACH;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/examples/demos/freemoveplus/index.html b/examples/demos/freemoveplus/index.html new file mode 100644 index 0000000..735c0e5 --- /dev/null +++ b/examples/demos/freemoveplus/index.html @@ -0,0 +1,80 @@ + + + + + + Free Movement Controls + + + + + + +
+
+ +

+ Use arrow/WASD keys or mouse wheel/trackpad (or swipe with 2 fingers) to move around, and click and drag (/ 1 finger swipe) to turn/rotate the camera. U/N keys raise/lowers the camera. +

+ + + + + + + + \ No newline at end of file diff --git a/examples/demos/freemoveplus/script.js b/examples/demos/freemoveplus/script.js new file mode 100644 index 0000000..312ebca --- /dev/null +++ b/examples/demos/freemoveplus/script.js @@ -0,0 +1,35 @@ +import { Scene, PerspectiveCamera, WebGLRenderer, GridHelper } from 'three' +import { CameraRig, FreeMovementPlusControls } from 'three-story-controls' + +const canvasParent = document.querySelector('.canvas-parent') + +const scene = new Scene() +const camera = new PerspectiveCamera() +const renderer = new WebGLRenderer() +renderer.setSize(canvasParent.clientWidth, canvasParent.clientHeight) +canvasParent.appendChild(renderer.domElement) + +const rig = new CameraRig(camera, scene) +const controls = new FreeMovementPlusControls(rig, { + domElement: canvasParent, + pointerScaleFactor: 15, +}) +controls.enable() + +const grid = new GridHelper(150, 50) +grid.position.set(0, -5, 0) +scene.add(grid) + +function render(t) { + window.requestAnimationFrame(render) + controls.update(t) + renderer.render(scene, camera) +} + +window.addEventListener('resize', () => { + camera.aspect = window.innerWidth / window.innerHeight + camera.updateProjectionMatrix() + renderer.setSize(window.innerWidth, window.innerHeight) +}) + +render() diff --git a/package-lock.json b/package-lock.json index 4d99248..99fa13a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,8 +1,4123 @@ { "name": "three-story-controls", "version": "1.0.6", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, + "packages": { + "": { + "name": "three-story-controls", + "version": "1.0.6", + "license": "Apache-2.0", + "devDependencies": { + "@microsoft/api-documenter": "^7.13.16", + "@microsoft/api-extractor": "^7.18.5", + "@rbnlffl/rollup-plugin-eslint": "^2.0.0", + "@rollup/plugin-typescript": "^8.2.1", + "@types/three": "^0.129.1", + "@typescript-eslint/eslint-plugin": "^4.26.0", + "@typescript-eslint/parser": "^4.26.0", + "concurrently": "^6.2.0", + "eslint": "^7.27.0", + "eslint-config-prettier": "8.3.0", + "eslint-plugin-prettier": "^3.4.0", + "gsap": "^3.6.1", + "postcss": "^8.3.5", + "postcss-nested": "^5.0.5", + "prettier": "2.3.0", + "rollup": "^2.50.5", + "rollup-plugin-postcss": "^4.0.0", + "rollup-plugin-terser": "^7.0.2", + "three": "^0.137.0", + "tslib": "^2.2.0", + "typescript": "^4.3.2" + }, + "peerDependencies": { + "gsap": ">= 3.6", + "three": ">= 0.129" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, + "node_modules/@microsoft/api-documenter": { + "version": "7.13.39", + "resolved": "https://registry.npmjs.org/@microsoft/api-documenter/-/api-documenter-7.13.39.tgz", + "integrity": "sha512-it9JJ2bz/ByQuqRw0pfrKBhYssjAqZCrQWK+IB2O4Owdid7zd3guHPK2LZoDaiExltHam4Iu9RgwyLGBAbX0tA==", + "dev": true, + "dependencies": { + "@microsoft/api-extractor-model": "7.13.5", + "@microsoft/tsdoc": "0.13.2", + "@rushstack/node-core-library": "3.40.0", + "@rushstack/ts-command-line": "4.8.1", + "colors": "~1.2.1", + "js-yaml": "~3.13.1", + "resolve": "~1.17.0" + }, + "bin": { + "api-documenter": "bin/api-documenter" + } + }, + "node_modules/@microsoft/api-extractor": { + "version": "7.18.5", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor/-/api-extractor-7.18.5.tgz", + "integrity": "sha512-NUGS6WxexziEnroHUOI3KKVmMX02god7SLA8Y4a5GKCL5k7AHuHFqP2bpd5Otx2odfbdj15ObO7FU/XA3Oxh8w==", + "dev": true, + "dependencies": { + "@microsoft/api-extractor-model": "7.13.5", + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.40.0", + "@rushstack/rig-package": "0.2.13", + "@rushstack/ts-command-line": "4.8.1", + "colors": "~1.2.1", + "lodash": "~4.17.15", + "resolve": "~1.17.0", + "semver": "~7.3.0", + "source-map": "~0.6.1", + "typescript": "~4.3.5" + }, + "bin": { + "api-extractor": "bin/api-extractor" + } + }, + "node_modules/@microsoft/api-extractor-model": { + "version": "7.13.5", + "resolved": "https://registry.npmjs.org/@microsoft/api-extractor-model/-/api-extractor-model-7.13.5.tgz", + "integrity": "sha512-il6AebNltYo5hEtqXZw4DMvrwBPn6+F58TxwqmsLY+U+sSJNxaYn2jYksArrjErXVPR3gUgRMqD6zsdIkg+WEQ==", + "dev": true, + "dependencies": { + "@microsoft/tsdoc": "0.13.2", + "@microsoft/tsdoc-config": "~0.15.2", + "@rushstack/node-core-library": "3.40.0" + } + }, + "node_modules/@microsoft/tsdoc": { + "version": "0.13.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc/-/tsdoc-0.13.2.tgz", + "integrity": "sha512-WrHvO8PDL8wd8T2+zBGKrMwVL5IyzR3ryWUsl0PXgEV0QHup4mTLi0QcATefGI6Gx9Anu7vthPyyyLpY0EpiQg==", + "dev": true + }, + "node_modules/@microsoft/tsdoc-config": { + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/@microsoft/tsdoc-config/-/tsdoc-config-0.15.2.tgz", + "integrity": "sha512-mK19b2wJHSdNf8znXSMYVShAHktVr/ib0Ck2FA3lsVBSEhSI/TfXT7DJQkAYgcztTuwazGcg58ZjYdk0hTCVrA==", + "dev": true, + "dependencies": { + "@microsoft/tsdoc": "0.13.2", + "ajv": "~6.12.6", + "jju": "~1.4.0", + "resolve": "~1.19.0" + } + }, + "node_modules/@microsoft/tsdoc-config/node_modules/resolve": { + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "dev": true, + "dependencies": { + "is-core-module": "^2.1.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rbnlffl/rollup-plugin-eslint": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@rbnlffl/rollup-plugin-eslint/-/rollup-plugin-eslint-2.0.0.tgz", + "integrity": "sha512-ql5KeNKkJRdJAPpKiwoBjbYAESU1UtgYs1+YA3V9KU9uH7Eul/FNpF8rs4PkA81f61XHIXv1cMP2XOPwcdUryA==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "4.x", + "eslint": "7.x" + }, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "rollup": "2.x" + } + }, + "node_modules/@rollup/plugin-typescript": { + "version": "8.2.5", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-8.2.5.tgz", + "integrity": "sha512-QL/LvDol/PAGB2O0S7/+q2HpSUNodpw7z6nGn9BfoVCPOZ0r4EALrojFU29Bkoi2Hr2jgTocTejJ5GGWZfOxbQ==", + "dev": true, + "dependencies": { + "@rollup/pluginutils": "^3.1.0", + "resolve": "^1.17.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "rollup": "^2.14.0", + "tslib": "*", + "typescript": ">=3.7.0" + } + }, + "node_modules/@rollup/plugin-typescript/node_modules/@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "dependencies": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + }, + "peerDependencies": { + "rollup": "^1.20.0||^2.0.0" + } + }, + "node_modules/@rollup/plugin-typescript/node_modules/estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + }, + "node_modules/@rollup/pluginutils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.1.1.tgz", + "integrity": "sha512-clDjivHqWGXi7u+0d2r2sBi4Ie6VLEAzWMIkvJLnDmxoOhBYOTfzGbOQBA32THHm11/LiJbd01tJUpJsbshSWQ==", + "dev": true, + "dependencies": { + "estree-walker": "^2.0.1", + "picomatch": "^2.2.2" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/@rushstack/node-core-library": { + "version": "3.40.0", + "resolved": "https://registry.npmjs.org/@rushstack/node-core-library/-/node-core-library-3.40.0.tgz", + "integrity": "sha512-P6uMPI7cqTdawLSPAG5BQrBu1MHlGRPqecp7ruIRgyukIEzkmh0QAnje4jAL/l1r3hw0qe4e+Dz5ZSnukT/Egg==", + "dev": true, + "dependencies": { + "@types/node": "10.17.13", + "colors": "~1.2.1", + "fs-extra": "~7.0.1", + "import-lazy": "~4.0.0", + "jju": "~1.4.0", + "resolve": "~1.17.0", + "semver": "~7.3.0", + "timsort": "~0.3.0", + "z-schema": "~3.18.3" + } + }, + "node_modules/@rushstack/rig-package": { + "version": "0.2.13", + "resolved": "https://registry.npmjs.org/@rushstack/rig-package/-/rig-package-0.2.13.tgz", + "integrity": "sha512-qQMAFKvfb2ooaWU9DrGIK9d8QfyHy/HiuITJbWenlKgzcDXQvQgEduk57YF4Y7LLasDJ5ZzLaaXwlfX8qCRe5Q==", + "dev": true, + "dependencies": { + "resolve": "~1.17.0", + "strip-json-comments": "~3.1.1" + } + }, + "node_modules/@rushstack/ts-command-line": { + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/@rushstack/ts-command-line/-/ts-command-line-4.8.1.tgz", + "integrity": "sha512-rmxvYdCNRbyRs+DYAPye3g6lkCkWHleqO40K8UPvUAzFqEuj6+YCVssBiOmrUDCoM5gaegSNT0wFDYhz24DWtw==", + "dev": true, + "dependencies": { + "@types/argparse": "1.0.38", + "argparse": "~1.0.9", + "colors": "~1.2.1", + "string-argv": "~0.3.1" + } + }, + "node_modules/@trysound/sax": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.1.1.tgz", + "integrity": "sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/argparse": { + "version": "1.0.38", + "resolved": "https://registry.npmjs.org/@types/argparse/-/argparse-1.0.38.tgz", + "integrity": "sha512-ebDJ9b0e702Yr7pWgB0jzm+CX4Srzz8RcXtLJDJB+BSccqMa36uyH/zUsSYao5+BD1ytv3k3rPYCq4mAE1hsXA==", + "dev": true + }, + "node_modules/@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "10.17.13", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.13.tgz", + "integrity": "sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg==", + "dev": true + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true + }, + "node_modules/@types/three": { + "version": "0.129.2", + "resolved": "https://registry.npmjs.org/@types/three/-/three-0.129.2.tgz", + "integrity": "sha512-fZDNRtUFnq3baNjDiAzi4QoHYcczWtEdsduH/tpiwk91fbVk8COJiT/iLoN3tIOjLKMySoYsjUfP0VTmUfZKLw==", + "dev": true + }, + "node_modules/@typescript-eslint/eslint-plugin": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.2.tgz", + "integrity": "sha512-x4EMgn4BTfVd9+Z+r+6rmWxoAzBaapt4QFqE+d8L8sUtYZYLDTK6VG/y/SMMWA5t1/BVU5Kf+20rX4PtWzUYZg==", + "dev": true, + "dependencies": { + "@typescript-eslint/experimental-utils": "4.29.2", + "@typescript-eslint/scope-manager": "4.29.2", + "debug": "^4.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.1.0", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "@typescript-eslint/parser": "^4.0.0", + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/experimental-utils": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.2.tgz", + "integrity": "sha512-P6mn4pqObhftBBPAv4GQtEK7Yos1fz/MlpT7+YjH9fTxZcALbiiPKuSIfYP/j13CeOjfq8/fr9Thr2glM9ub7A==", + "dev": true, + "dependencies": { + "@types/json-schema": "^7.0.7", + "@typescript-eslint/scope-manager": "4.29.2", + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/typescript-estree": "4.29.2", + "eslint-scope": "^5.1.1", + "eslint-utils": "^3.0.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "*" + } + }, + "node_modules/@typescript-eslint/experimental-utils/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/@typescript-eslint/parser": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.29.2.tgz", + "integrity": "sha512-WQ6BPf+lNuwteUuyk1jD/aHKqMQ9jrdCn7Gxt9vvBnzbpj7aWEf+aZsJ1zvTjx5zFxGCt000lsbD9tQPEL8u6g==", + "dev": true, + "dependencies": { + "@typescript-eslint/scope-manager": "4.29.2", + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/typescript-estree": "4.29.2", + "debug": "^4.3.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^5.0.0 || ^6.0.0 || ^7.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.29.2.tgz", + "integrity": "sha512-mfHmvlQxmfkU8D55CkZO2sQOueTxLqGvzV+mG6S/6fIunDiD2ouwsAoiYCZYDDK73QCibYjIZmGhpvKwAB5BOA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.29.2.tgz", + "integrity": "sha512-K6ApnEXId+WTGxqnda8z4LhNMa/pZmbTFkDxEBLQAbhLZL50DjeY0VIDCml/0Y3FlcbqXZrABqrcKxq+n0LwzQ==", + "dev": true, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.2.tgz", + "integrity": "sha512-TJ0/hEnYxapYn9SGn3dCnETO0r+MjaxtlWZ2xU+EvytF0g4CqTpZL48SqSNn2hXsPolnewF30pdzR9a5Lj3DNg==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.29.2", + "@typescript-eslint/visitor-keys": "4.29.2", + "debug": "^4.3.1", + "globby": "^11.0.3", + "is-glob": "^4.0.1", + "semver": "^7.3.5", + "tsutils": "^3.21.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "4.29.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.2.tgz", + "integrity": "sha512-bDgJLQ86oWHJoZ1ai4TZdgXzJxsea3Ee9u9wsTAvjChdj2WLcVsgWYAPeY7RQMn16tKrlQaBnpKv7KBfs4EQag==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "4.29.2", + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^8.10.0 || ^10.13.0 || >=11.10.1" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/alphanum-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", + "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=", + "dev": true + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.16.8", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.8.tgz", + "integrity": "sha512-sc2m9ohR/49sWEbPj14ZSSZqp+kbi16aLao42Hmn3Z8FpjuMaq2xCA2l4zl9ITfyzvnvyE0hcg62YkIGKxgaNQ==", + "dev": true, + "dependencies": { + "caniuse-lite": "^1.0.30001251", + "colorette": "^1.3.0", + "electron-to-chromium": "^1.3.811", + "escalade": "^3.1.1", + "node-releases": "^1.1.75" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-api": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", + "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", + "dev": true, + "dependencies": { + "browserslist": "^4.0.0", + "caniuse-lite": "^1.0.0", + "lodash.memoize": "^4.1.2", + "lodash.uniq": "^4.5.0" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001251", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", + "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/chalk/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/chalk/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/chalk/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/colord": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/colord/-/colord-2.7.0.tgz", + "integrity": "sha512-pZJBqsHz+pYyw3zpX6ZRXWoCHM1/cvFikY9TV8G3zcejCaKE0lhankoj8iScyrrePA8C7yJ5FStfA9zbcOnw7Q==", + "dev": true + }, + "node_modules/colorette": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", + "dev": true + }, + "node_modules/colors": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.2.5.tgz", + "integrity": "sha512-erNRLao/Y3Fv54qUa0LBB+//Uf3YwMUmdJinN20yMXm9zdKKqH9wt7R9IIVZ+K7ShzfpLV/Zg8+VyrBJYB4lpg==", + "dev": true, + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dev": true, + "dependencies": { + "source-map": "^0.6.1" + } + }, + "node_modules/concurrently": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-6.2.1.tgz", + "integrity": "sha512-emgwhH+ezkuYKSHZQ+AkgEpoUZZlbpPVYCVv7YZx0r+T7fny1H03r2nYRebpi2DudHR4n1Rgbo2YTxKOxVJ4+g==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "date-fns": "^2.16.1", + "lodash": "^4.17.21", + "read-pkg": "^5.2.0", + "rxjs": "^6.6.3", + "spawn-command": "^0.0.2-1", + "supports-color": "^8.1.0", + "tree-kill": "^1.2.2", + "yargs": "^16.2.0" + }, + "bin": { + "concurrently": "bin/concurrently.js" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/concurrently/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-color-names": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-1.0.1.tgz", + "integrity": "sha512-/loXYOch1qU1biStIFsHH8SxTmOseh1IJqFvy8IujXOm1h+QjUdDhkzOrR5HG8K8mlxREj0yfi8ewCHx0eMxzA==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/css-declaration-sorter": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.1.1.tgz", + "integrity": "sha512-BZ1aOuif2Sb7tQYY1GeCjG7F++8ggnwUkH5Ictw0mrdpqpEd+zWmcPdstnH2TItlb74FqR0DrVEieon221T/1Q==", + "dev": true, + "dependencies": { + "timsort": "^0.3.0" + }, + "engines": { + "node": ">= 10" + }, + "peerDependencies": { + "postcss": "^8.0.9" + } + }, + "node_modules/css-select": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", + "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^5.0.0", + "domhandler": "^4.2.0", + "domutils": "^2.6.0", + "nth-check": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-what": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true, + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/cssnano": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-5.0.8.tgz", + "integrity": "sha512-Lda7geZU0Yu+RZi2SGpjYuQz4HI4/1Y+BhdD0jL7NXAQ5larCzVn+PUGuZbDMYz904AXXCOgO5L1teSvgu7aFg==", + "dev": true, + "dependencies": { + "cssnano-preset-default": "^5.1.4", + "is-resolvable": "^1.1.0", + "lilconfig": "^2.0.3", + "yaml": "^1.10.2" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/cssnano" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/cssnano-preset-default": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.1.4.tgz", + "integrity": "sha512-sPpQNDQBI3R/QsYxQvfB4mXeEcWuw0wGtKtmS5eg8wudyStYMgKOQT39G07EbW1LB56AOYrinRS9f0ig4Y3MhQ==", + "dev": true, + "dependencies": { + "css-declaration-sorter": "^6.0.3", + "cssnano-utils": "^2.0.1", + "postcss-calc": "^8.0.0", + "postcss-colormin": "^5.2.0", + "postcss-convert-values": "^5.0.1", + "postcss-discard-comments": "^5.0.1", + "postcss-discard-duplicates": "^5.0.1", + "postcss-discard-empty": "^5.0.1", + "postcss-discard-overridden": "^5.0.1", + "postcss-merge-longhand": "^5.0.2", + "postcss-merge-rules": "^5.0.2", + "postcss-minify-font-values": "^5.0.1", + "postcss-minify-gradients": "^5.0.2", + "postcss-minify-params": "^5.0.1", + "postcss-minify-selectors": "^5.1.0", + "postcss-normalize-charset": "^5.0.1", + "postcss-normalize-display-values": "^5.0.1", + "postcss-normalize-positions": "^5.0.1", + "postcss-normalize-repeat-style": "^5.0.1", + "postcss-normalize-string": "^5.0.1", + "postcss-normalize-timing-functions": "^5.0.1", + "postcss-normalize-unicode": "^5.0.1", + "postcss-normalize-url": "^5.0.2", + "postcss-normalize-whitespace": "^5.0.1", + "postcss-ordered-values": "^5.0.2", + "postcss-reduce-initial": "^5.0.1", + "postcss-reduce-transforms": "^5.0.1", + "postcss-svgo": "^5.0.2", + "postcss-unique-selectors": "^5.0.1" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/cssnano-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz", + "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/date-fns": { + "version": "2.23.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.23.0.tgz", + "integrity": "sha512-5ycpauovVyAk0kXNZz6ZoB9AYMZB4DObse7P3BPWmyEjXNORTI8EJ6X0uaSAq4sCHzM1uajzrkr6HnsLQpxGXA==", + "dev": true, + "engines": { + "node": ">=0.11" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/date-fns" + } + }, + "node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domhandler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "dev": true, + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/domutils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz", + "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==", + "dev": true, + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.3.812", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.812.tgz", + "integrity": "sha512-7KiUHsKAWtSrjVoTSzxQ0nPLr/a+qoxNZwkwd9LkylTOgOXSVXkQbpIVT0WAUQcI5gXq3SwOTCrK+WfINHOXQg==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", + "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz", + "integrity": "sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "peerDependencies": { + "eslint": ">=5.0.0", + "prettier": ">=1.13.0" + }, + "peerDependenciesMeta": { + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter3": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", + "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", + "dev": true + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastq": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.12.0.tgz", + "integrity": "sha512-VNX0QkHK3RsXVKr9KrlUv/FoTa0NdbYoHHl7uXHv2rzyHSlxjdNAKug2twd9luJxpcyNeAgf5iPPMutJO67Dfg==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "dev": true + }, + "node_modules/fs-extra": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", + "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/generic-names": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/generic-names/-/generic-names-2.0.1.tgz", + "integrity": "sha512-kPCHWa1m9wGG/OwQpeweTwM/PYiQLrUIxXbt/P4Nic3LbGjCP0YwrALHW1uNLKZ0LIMg+RF+XRlj2ekT9ZlZAQ==", + "dev": true, + "dependencies": { + "loader-utils": "^1.1.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "dev": true + }, + "node_modules/gsap": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.7.1.tgz", + "integrity": "sha512-4qxuaC2yFWRjMRof5tI/7c9/+L4xMsCoqHrZAmuh+IbOokTnZyoeF0VgvcVHq3uo+/VJZCs7PTvjrFasfGl+ww==", + "dev": true + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/icss-replace-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz", + "integrity": "sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=", + "dev": true + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-3.0.0.tgz", + "integrity": "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==", + "dev": true, + "dependencies": { + "import-from": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", + "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", + "dev": true, + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-from/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-absolute-url": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-3.0.3.tgz", + "integrity": "sha512-opmNIX7uFnS96NtPmhWQgQx6/NYFgsUXYMllcfzwWKUMwfo8kku1TvE6hkNcH+Q1ts5cMVrsY7j0bxXQDciu9Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", + "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-resolvable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", + "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/jest-worker": { + "version": "26.6.2", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", + "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "dev": true, + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jju": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/jju/-/jju-1.4.0.tgz", + "integrity": "sha1-o6vicYryQaKykE+EpiWXDzia4yo=", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "dev": true, + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lilconfig": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.3.tgz", + "integrity": "sha512-EHKqr/+ZvdKCifpNrJCKxBTgk5XupZA3y/aCPY9mxfgBzmgh93Mt/WqjjQ38oMxXuvDokaKiM3lAgvSH2sjtHg==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", + "dev": true + }, + "node_modules/loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=", + "dev": true + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "node_modules/lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "node_modules/lodash.isequal": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz", + "integrity": "sha1-QVxEePK8wwEgwizhDtMib30+GOA=", + "dev": true + }, + "node_modules/lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "node_modules/lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dev": true, + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/nanoid": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.2.0.tgz", + "integrity": "sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA==", + "dev": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/node-releases": { + "version": "1.1.75", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.75.tgz", + "integrity": "sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-url": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz", + "integrity": "sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nth-check": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz", + "integrity": "sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-queue": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-6.6.2.tgz", + "integrity": "sha512-RwFpb72c/BhQLEXIZ5K2e+AhgNVmIejGlTgiB9MzZ0e93GRvqZ7uSi0dvRF7/XIXDeNkra2fNHBxTyPDGySpjQ==", + "dev": true, + "dependencies": { + "eventemitter3": "^4.0.4", + "p-timeout": "^3.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-timeout": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", + "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", + "dev": true, + "dependencies": { + "p-finally": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/postcss": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", + "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "dev": true, + "dependencies": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-calc": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.0.0.tgz", + "integrity": "sha512-5NglwDrcbiy8XXfPM11F3HeC6hoT9W7GUH/Zi5U/p7u3Irv4rHhdDcIZwG0llHXV4ftsBjpfWMXAnXNl4lnt8g==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.2" + }, + "peerDependencies": { + "postcss": "^8.2.2" + } + }, + "node_modules/postcss-colormin": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.2.0.tgz", + "integrity": "sha512-+HC6GfWU3upe5/mqmxuqYZ9B2Wl4lcoUUNkoaX59nEWV4EtADCMiBqui111Bu8R8IvaZTmqmxrqOAqjbHIwXPw==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0", + "colord": "^2.0.1", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-convert-values": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.0.1.tgz", + "integrity": "sha512-C3zR1Do2BkKkCgC0g3sF8TS0koF2G+mN8xxayZx3f10cIRmTaAnpgpRQZjNekTZxM2ciSPoh2IWJm0VZx8NoQg==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-comments": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz", + "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-duplicates": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz", + "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-empty": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz", + "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-discard-overridden": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz", + "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-load-config": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-load-config/-/postcss-load-config-3.1.0.tgz", + "integrity": "sha512-ipM8Ds01ZUophjDTQYSVP70slFSYg3T0/zyfII5vzhN6V57YSxMgG5syXuwi5VtS8wSf3iL30v0uBdoIVx4Q0g==", + "dev": true, + "dependencies": { + "import-cwd": "^3.0.0", + "lilconfig": "^2.0.3", + "yaml": "^1.10.2" + }, + "engines": { + "node": ">= 10" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + } + } + }, + "node_modules/postcss-merge-longhand": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.0.2.tgz", + "integrity": "sha512-BMlg9AXSI5G9TBT0Lo/H3PfUy63P84rVz3BjCFE9e9Y9RXQZD3+h3YO1kgTNsNJy7bBc1YQp8DmSnwLIW5VPcw==", + "dev": true, + "dependencies": { + "css-color-names": "^1.0.1", + "postcss-value-parser": "^4.1.0", + "stylehacks": "^5.0.1" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-merge-rules": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.0.2.tgz", + "integrity": "sha512-5K+Md7S3GwBewfB4rjDeol6V/RZ8S+v4B66Zk2gChRqLTCC8yjnHQ601omj9TKftS19OPGqZ/XzoqpzNQQLwbg==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.6", + "caniuse-api": "^3.0.0", + "cssnano-utils": "^2.0.1", + "postcss-selector-parser": "^6.0.5", + "vendors": "^1.0.3" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-font-values": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.0.1.tgz", + "integrity": "sha512-7JS4qIsnqaxk+FXY1E8dHBDmraYFWmuL6cgt0T1SWGRO5bzJf8sUoelwa4P88LEWJZweHevAiDKxHlofuvtIoA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-gradients": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.0.2.tgz", + "integrity": "sha512-7Do9JP+wqSD6Prittitt2zDLrfzP9pqKs2EcLX7HJYxsxCOwrrcLt4x/ctQTsiOw+/8HYotAoqNkrzItL19SdQ==", + "dev": true, + "dependencies": { + "colord": "^2.6", + "cssnano-utils": "^2.0.1", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-params": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.0.1.tgz", + "integrity": "sha512-4RUC4k2A/Q9mGco1Z8ODc7h+A0z7L7X2ypO1B6V8057eVK6mZ6xwz6QN64nHuHLbqbclkX1wyzRnIrdZehTEHw==", + "dev": true, + "dependencies": { + "alphanum-sort": "^1.0.2", + "browserslist": "^4.16.0", + "cssnano-utils": "^2.0.1", + "postcss-value-parser": "^4.1.0", + "uniqs": "^2.0.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-minify-selectors": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.1.0.tgz", + "integrity": "sha512-NzGBXDa7aPsAcijXZeagnJBKBPMYLaJJzB8CQh6ncvyl2sIndLVWfbcDi0SBjRWk5VqEjXvf8tYwzoKf4Z07og==", + "dev": true, + "dependencies": { + "alphanum-sort": "^1.0.2", + "postcss-selector-parser": "^6.0.5" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-modules": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/postcss-modules/-/postcss-modules-4.2.2.tgz", + "integrity": "sha512-/H08MGEmaalv/OU8j6bUKi/kZr2kqGF6huAW8m9UAgOLWtpFdhA14+gPBoymtqyv+D4MLsmqaF2zvIegdCxJXg==", + "dev": true, + "dependencies": { + "generic-names": "^2.0.1", + "icss-replace-symbols": "^1.1.0", + "lodash.camelcase": "^4.3.0", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "string-hash": "^1.1.1" + }, + "peerDependencies": { + "postcss": "^8.0.0" + } + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-nested": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/postcss-nested/-/postcss-nested-5.0.6.tgz", + "integrity": "sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==", + "dev": true, + "dependencies": { + "postcss-selector-parser": "^6.0.6" + }, + "engines": { + "node": ">=12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + "peerDependencies": { + "postcss": "^8.2.14" + } + }, + "node_modules/postcss-normalize-charset": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz", + "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==", + "dev": true, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-display-values": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.0.1.tgz", + "integrity": "sha512-uupdvWk88kLDXi5HEyI9IaAJTE3/Djbcrqq8YgjvAVuzgVuqIk3SuJWUisT2gaJbZm1H9g5k2w1xXilM3x8DjQ==", + "dev": true, + "dependencies": { + "cssnano-utils": "^2.0.1", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-positions": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.0.1.tgz", + "integrity": "sha512-rvzWAJai5xej9yWqlCb1OWLd9JjW2Ex2BCPzUJrbaXmtKtgfL8dBMOOMTX6TnvQMtjk3ei1Lswcs78qKO1Skrg==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-repeat-style": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz", + "integrity": "sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w==", + "dev": true, + "dependencies": { + "cssnano-utils": "^2.0.1", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-string": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz", + "integrity": "sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-timing-functions": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.0.1.tgz", + "integrity": "sha512-cPcBdVN5OsWCNEo5hiXfLUnXfTGtSFiBU9SK8k7ii8UD7OLuznzgNRYkLZow11BkQiiqMcgPyh4ZqXEEUrtQ1Q==", + "dev": true, + "dependencies": { + "cssnano-utils": "^2.0.1", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-unicode": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.0.1.tgz", + "integrity": "sha512-kAtYD6V3pK0beqrU90gpCQB7g6AOfP/2KIPCVBKJM2EheVsBQmx/Iof+9zR9NFKLAx4Pr9mDhogB27pmn354nA==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.0", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-url": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.0.2.tgz", + "integrity": "sha512-k4jLTPUxREQ5bpajFQZpx8bCF2UrlqOTzP9kEqcEnOfwsRshWs2+oAFIHfDQB8GO2PaUaSE0NlTAYtbluZTlHQ==", + "dev": true, + "dependencies": { + "is-absolute-url": "^3.0.3", + "normalize-url": "^6.0.1", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-normalize-whitespace": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.0.1.tgz", + "integrity": "sha512-iPklmI5SBnRvwceb/XH568yyzK0qRVuAG+a1HFUsFRf11lEJTiQQa03a4RSCQvLKdcpX7XsI1Gen9LuLoqwiqA==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-ordered-values": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.0.2.tgz", + "integrity": "sha512-8AFYDSOYWebJYLyJi3fyjl6CqMEG/UVworjiyK1r573I56kb3e879sCJLGvR3merj+fAdPpVplXKQZv+ey6CgQ==", + "dev": true, + "dependencies": { + "cssnano-utils": "^2.0.1", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-initial": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.0.1.tgz", + "integrity": "sha512-zlCZPKLLTMAqA3ZWH57HlbCjkD55LX9dsRyxlls+wfuRfqCi5mSlZVan0heX5cHr154Dq9AfbH70LyhrSAezJw==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.0", + "caniuse-api": "^3.0.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-reduce-transforms": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.0.1.tgz", + "integrity": "sha512-a//FjoPeFkRuAguPscTVmRQUODP+f3ke2HqFNgGPwdYnpeC29RZdCBvGRGTsKpMURb/I3p6jdKoBQ2zI+9Q7kA==", + "dev": true, + "dependencies": { + "cssnano-utils": "^2.0.1", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", + "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "dev": true, + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-svgo": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.0.2.tgz", + "integrity": "sha512-YzQuFLZu3U3aheizD+B1joQ94vzPfE6BNUcSYuceNxlVnKKsOtdo6hL9/zyC168Q8EwfLSgaDSalsUGa9f2C0A==", + "dev": true, + "dependencies": { + "postcss-value-parser": "^4.1.0", + "svgo": "^2.3.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-unique-selectors": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.0.1.tgz", + "integrity": "sha512-gwi1NhHV4FMmPn+qwBNuot1sG1t2OmacLQ/AX29lzyggnjd+MnVD5uqQmpXO3J17KGL2WAxQruj1qTd3H0gG/w==", + "dev": true, + "dependencies": { + "alphanum-sort": "^1.0.2", + "postcss-selector-parser": "^6.0.5", + "uniqs": "^2.0.0" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz", + "integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/promise.series": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/promise.series/-/promise.series-0.2.0.tgz", + "integrity": "sha1-LMfr6Vn8OmYZwEq029yeRS2GS70=", + "dev": true, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "dependencies": { + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rollup": { + "version": "2.56.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.56.2.tgz", + "integrity": "sha512-s8H00ZsRi29M2/lGdm1u8DJpJ9ML8SUOpVVBd33XNeEeL3NVaTiUcSBHzBdF3eAyR0l7VSpsuoVUGrRHq7aPwQ==", + "dev": true, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=10.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/rollup-plugin-postcss": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-postcss/-/rollup-plugin-postcss-4.0.1.tgz", + "integrity": "sha512-kUJHlpDGl9+kDfdUUbnerW0Mx1R0PL/6dgciUE/w19swYDBjug7RQfxIRvRGtO/cvCkynYyU8e/YFMI544vskA==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "concat-with-sourcemaps": "^1.1.0", + "cssnano": "^5.0.1", + "import-cwd": "^3.0.0", + "p-queue": "^6.6.2", + "pify": "^5.0.0", + "postcss-load-config": "^3.0.0", + "postcss-modules": "^4.0.0", + "promise.series": "^0.2.0", + "resolve": "^1.19.0", + "rollup-pluginutils": "^2.8.2", + "safe-identifier": "^0.4.2", + "style-inject": "^0.3.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "postcss": "8.x" + } + }, + "node_modules/rollup-plugin-postcss/node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/rollup-plugin-terser": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/rollup-plugin-terser/-/rollup-plugin-terser-7.0.2.tgz", + "integrity": "sha512-w3iIaU4OxcF52UUXiZNsNeuXIMDvFrr+ZXK6bFZ0Q60qyVfq4uLptoS4bbq3paG3x216eQllFZX7zt6TIImguQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.10.4", + "jest-worker": "^26.2.1", + "serialize-javascript": "^4.0.0", + "terser": "^5.0.0" + }, + "peerDependencies": { + "rollup": "^2.0.0" + } + }, + "node_modules/rollup-pluginutils": { + "version": "2.8.2", + "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", + "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", + "dev": true, + "dependencies": { + "estree-walker": "^0.6.1" + } + }, + "node_modules/rollup-pluginutils/node_modules/estree-walker": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", + "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", + "dev": true + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dev": true, + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/safe-identifier": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/safe-identifier/-/safe-identifier-0.4.2.tgz", + "integrity": "sha512-6pNbSMW6OhAi9j+N8V+U715yBQsaWJ7eyEUaOrawX+isg5ZxhUlV1NipNtgaKHmFGiABwt+ZF04Ii+3Xjkg+8w==", + "dev": true + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", + "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spawn-command": { + "version": "0.0.2-1", + "resolved": "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz", + "integrity": "sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A=", + "dev": true + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", + "dev": true + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", + "dev": true + }, + "node_modules/string-argv": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.1.tgz", + "integrity": "sha512-a1uQGz7IyVy9YwhqjZIZu1c8JO8dNIe20xBmSS6qu9kv++k3JGzCVmprbNN5Kn+BgzD5E7YYwg1CcjuJMRNsvg==", + "dev": true, + "engines": { + "node": ">=0.6.19" + } + }, + "node_modules/string-hash": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", + "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/style-inject": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/style-inject/-/style-inject-0.3.0.tgz", + "integrity": "sha512-IezA2qp+vcdlhJaVm5SOdPPTUu0FCEqfNSli2vRuSIBbu5Nq5UvygTk/VzeCqfLz2Atj3dVII5QBKGZRZ0edzw==", + "dev": true + }, + "node_modules/stylehacks": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-5.0.1.tgz", + "integrity": "sha512-Es0rVnHIqbWzveU1b24kbw92HsebBepxfcqe5iix7t9j0PQqhs0IxXVXv0pY2Bxa08CgMkzD6OWql7kbGOuEdA==", + "dev": true, + "dependencies": { + "browserslist": "^4.16.0", + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >=14.0" + }, + "peerDependencies": { + "postcss": "^8.2.15" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/svgo": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.4.0.tgz", + "integrity": "sha512-W25S1UUm9Lm9VnE0TvCzL7aso/NCzDEaXLaElCUO/KaVitw0+IBicSVfM1L1c0YHK5TOFh73yQ2naCpVHEQ/OQ==", + "dev": true, + "dependencies": { + "@trysound/sax": "0.1.1", + "colorette": "^1.2.2", + "commander": "^7.1.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.2", + "csso": "^4.2.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/svgo/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/table": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", + "dev": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/terser": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", + "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "dev": true, + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/three": { + "version": "0.137.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.137.0.tgz", + "integrity": "sha512-rzSDhia6cU35UCy6y+zEEws6vSgytfHqFMSaBvUcySgzwvDO6vETyswtSNi/+aVqJw8WLMwyT1mlQQ1T/dxxOA==", + "dev": true + }, + "node_modules/timsort": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", + "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", + "dev": true + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", + "dev": true + }, + "node_modules/tsutils": { + "version": "3.21.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", + "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "engines": { + "node": ">= 6" + }, + "peerDependencies": { + "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" + } + }, + "node_modules/tsutils/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz", + "integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uniqs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", + "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=", + "dev": true + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "dev": true, + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/validator": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/validator/-/validator-8.2.0.tgz", + "integrity": "sha512-Yw5wW34fSv5spzTXNkokD6S6/Oq92d8q/t14TqsS3fAiA1RYnxSFSIZ+CY3n6PGGRCq5HhJTSepQvFUS2QUDxA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/vendors": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", + "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/z-schema": { + "version": "3.18.4", + "resolved": "https://registry.npmjs.org/z-schema/-/z-schema-3.18.4.tgz", + "integrity": "sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw==", + "dev": true, + "dependencies": { + "lodash.get": "^4.0.0", + "lodash.isequal": "^4.0.0", + "validator": "^8.0.0" + }, + "bin": { + "z-schema": "bin/z-schema" + }, + "optionalDependencies": { + "commander": "^2.7.1" + } + } + }, "dependencies": { "@babel/code-frame": { "version": "7.12.11", @@ -418,7 +4533,8 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true + "dev": true, + "requires": {} }, "ajv": { "version": "6.12.6", @@ -824,7 +4940,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz", "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==", - "dev": true + "dev": true, + "requires": {} }, "csso": { "version": "4.2.0", @@ -1017,7 +5134,8 @@ "version": "8.3.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz", "integrity": "sha512-BgZuLUSeKzvlL/VUjx/Yb787VQ26RU3gGjA3iiFvdsp/2bMfVIWUVP7tjxtjS0e+HP409cPlPvNkQloz8C91ew==", - "dev": true + "dev": true, + "requires": {} }, "eslint-plugin-prettier": { "version": "3.4.0", @@ -1372,7 +5490,8 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true + "dev": true, + "requires": {} }, "ignore": { "version": "4.0.6", @@ -1939,25 +6058,29 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz", "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-duplicates": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz", "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-empty": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz", "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-overridden": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz", "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==", - "dev": true + "dev": true, + "requires": {} }, "postcss-load-config": { "version": "3.1.0", @@ -2057,7 +6180,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -2101,7 +6225,8 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz", "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==", - "dev": true + "dev": true, + "requires": {} }, "postcss-normalize-display-values": { "version": "5.0.1", diff --git a/src/adaptors/KeyboardAdaptor.ts b/src/adaptors/KeyboardAdaptor.ts index b989de8..f607f7b 100644 --- a/src/adaptors/KeyboardAdaptor.ts +++ b/src/adaptors/KeyboardAdaptor.ts @@ -74,11 +74,17 @@ const defaultProps: Partial = { backward: ['ArrowDown', 's', 'S'], left: ['ArrowLeft', 'a', 'A'], right: ['ArrowRight', 'd', 'D'], + rollLeft: ['Q', 'q'], + rollRight: ['E', 'e'], + tiltDown: ['F', 'f'], + tiltUp: ['R', 'r'], + panRight: ['C', 'c'], + panLeft: ['Z', 'z'], up: ['u', 'U'], down: ['n', 'N'], }, dampingFactor: 0.5, - incrementor: 1, + incrementor: 0.1, preventBubbling: true, } diff --git a/src/controlschemes/FreeMovementPlusControls.ts b/src/controlschemes/FreeMovementPlusControls.ts new file mode 100644 index 0000000..7b2eee6 --- /dev/null +++ b/src/controlschemes/FreeMovementPlusControls.ts @@ -0,0 +1,174 @@ +import { BaseControls } from './BaseControls' +import { CameraRig, CameraAction } from '../CameraRig' +import { KeyboardAdaptor } from '../adaptors/KeyboardAdaptor' +import { PointerAdaptor } from '../adaptors/PointerAdaptor' +import { WheelAdaptor } from '../adaptors/WheelAdaptor' + +/** + * Properties that can be passed to the {@link three-story-controls#FreeMovementPlusControls} constructor + */ +export interface FreeMovementPlusControlsProps { + domElement?: HTMLElement + /** Damping factor between 0 and 1. Defaults to 0.3 */ + pointerDampFactor?: number + /** Mutiplier for two-pointer translation. Defaults to 4 */ + pointerScaleFactor?: number + /** Damping factor between 0 and 1. Defaults to 0.5 */ + keyboardDampFactor?: number + /** Mutiplier for keyboard translation. Defaults to 0.5 */ + keyboardScaleFactor?: number + /** Damping factor between 0 and 1. Defaults to 0.25 */ + wheelDampFactor?: number + /** Mutiplier for wheel translation. Defaults to 0.05 */ + wheelScaleFactor?: number + /** Mutiplier for panning. Defaults to Math.PI / 4 */ + panDegreeFactor?: number + /** Mutiplier for tilting. Defaults to Math.PI / 10 */ + tiltDegreeFactor?: number +} + +const defaultProps: FreeMovementPlusControlsProps = { + domElement: document.body, + pointerDampFactor: 0.3, + pointerScaleFactor: 4, + keyboardDampFactor: 0.5, + keyboardScaleFactor: 0.5, + wheelDampFactor: 0.25, + wheelScaleFactor: 0.05, + panDegreeFactor: Math.PI / 4, + tiltDegreeFactor: Math.PI / 10, +} + +/** + * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events. + * @remarks + * Control scheme to move the camera with arrow/WASD keys and mouse wheel; and rotate the camera with click-and-drag events. + * On a touch device, 1 finger swipe rotates the camera, and 2 fingers tranlsate/move the camera. + * + * + * Note: CSS property `touch-action: none` will probably be needed on listener element. + * + * See {@link three-story-controls#FreeMovementPlusControlsProps} for all properties that can be passed to the constructor. + * + * {@link https://nytimes.github.io/three-story-controls/examples/demos/freemove | DEMO } + * + * @example + * ```js + * const scene = new Scene() + * const camera = new PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000) + * const cameraRig = new CameraRig(camera, scene) + * const controls = new FreeMovementPlusControls(cameraRig) + * + * controls.enable() + * + * // render loop + * function animate(t) { + * controls.update(t) + * } + * ``` + * + */ +export class FreeMovementPlusControls implements BaseControls { + readonly cameraRig: CameraRig + private keyboardAdaptor: KeyboardAdaptor + private wheelAdaptor: WheelAdaptor + private pointerAdaptor: PointerAdaptor + private wheelScaleFactor: number + private pointerScaleFactor: number + private panDegreeFactor: number + private tiltDegreeFactor: number + private enabled = false + + /** {@inheritDoc three-story-controls#FreeMovementPlusControlsProps#} */ + constructor(cameraRig: CameraRig, props: FreeMovementPlusControlsProps = {}) { + this.cameraRig = cameraRig + + this.wheelScaleFactor = props.wheelScaleFactor || defaultProps.wheelScaleFactor + this.pointerScaleFactor = props.pointerScaleFactor || defaultProps.pointerScaleFactor + this.panDegreeFactor = props.panDegreeFactor || defaultProps.panDegreeFactor + this.tiltDegreeFactor = props.tiltDegreeFactor || defaultProps.tiltDegreeFactor + + this.keyboardAdaptor = new KeyboardAdaptor({ + type: 'continuous', + dampingFactor: props.keyboardDampFactor || defaultProps.keyboardDampFactor, + incrementor: props.keyboardScaleFactor || defaultProps.keyboardScaleFactor, + }) + + this.wheelAdaptor = new WheelAdaptor({ + type: 'continuous', + dampingFactor: props.wheelDampFactor || defaultProps.wheelDampFactor, + domElement: props.domElement || defaultProps.domElement, + }) + + this.pointerAdaptor = new PointerAdaptor({ + domElement: props.domElement || defaultProps.domElement, + dampingFactor: props.pointerDampFactor || defaultProps.pointerDampFactor, + }) + + this.onWheel = this.onWheel.bind(this) + this.onKey = this.onKey.bind(this) + this.onPointer = this.onPointer.bind(this) + } + + isEnabled(): boolean { + return this.enabled + } + + enable(): void { + this.wheelAdaptor.connect() + this.keyboardAdaptor.connect() + this.pointerAdaptor.connect() + this.wheelAdaptor.addEventListener('update', this.onWheel) + this.keyboardAdaptor.addEventListener('update', this.onKey) + this.pointerAdaptor.addEventListener('update', this.onPointer) + this.enabled = true + } + + disable(): void { + this.wheelAdaptor.disconnect() + this.keyboardAdaptor.disconnect() + this.pointerAdaptor.disconnect() + this.wheelAdaptor.removeEventListener('update', this.onWheel) + this.keyboardAdaptor.removeEventListener('update', this.onKey) + this.pointerAdaptor.removeEventListener('update', this.onPointer) + this.enabled = false + } + + private onWheel(event): void { + this.cameraRig.do(CameraAction.Dolly, event.deltas.y * this.wheelScaleFactor) + this.cameraRig.do(CameraAction.Truck, event.deltas.x * this.wheelScaleFactor) + } + + private onKey(event): void { + this.cameraRig.do(CameraAction.Dolly, event.values.backward - event.values.forward) + this.cameraRig.do(CameraAction.Truck, event.values.right - event.values.left) + this.cameraRig.do(CameraAction.Pedestal, event.values.up - event.values.down) + + this.cameraRig.do(CameraAction.Roll, event.values.rollRight/30 - event.values.rollLeft/30) + this.cameraRig.do(CameraAction.Tilt, event.values.tiltDown/30 - event.values.tiltUp/30) + this.cameraRig.do(CameraAction.Pan, event.values.panLeft/30 - event.values.panRight/30) + } + + private onPointer(event): void { + switch (event.pointerCount) { + case 1: + this.cameraRig.do(CameraAction.Pan, event.deltas.x * this.panDegreeFactor) + this.cameraRig.do(CameraAction.Tilt, event.deltas.y * this.tiltDegreeFactor) + break + case 2: + this.cameraRig.do(CameraAction.Dolly, -event.deltas.y * this.pointerScaleFactor) + this.cameraRig.do(CameraAction.Truck, -event.deltas.x * this.pointerScaleFactor) + break + default: + break + } + } + + update(time: number): void { + if (this.enabled) { + this.keyboardAdaptor.update() + this.wheelAdaptor.update() + this.pointerAdaptor.update(time) + } + } +} diff --git a/src/index.ts b/src/index.ts index 47c83eb..b350bb4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -36,6 +36,7 @@ import { import { BaseControls, ExitPOIsEvent, UpdatePOIsEvent } from './controlschemes/BaseControls' import { FreeMovementControls, FreeMovementControlsProps } from './controlschemes/FreeMovementControls' +import { FreeMovementPlusControls, FreeMovementPlusControlsProps } from './controlschemes/FreeMovementPlusControls' import { ScrollControls, ScrollControlsProps, ScrollAction } from './controlschemes/ScrollControls' import { StoryPointsControls, StoryPointsControlsProps, StoryPointMarker } from './controlschemes/StoryPointsControls' import { PathPointsControls, PathPointsControlsProps, PathPointMarker } from './controlschemes/PathPointsControls' @@ -85,6 +86,8 @@ export { UpdatePOIsEvent, FreeMovementControls, FreeMovementControlsProps, + FreeMovementPlusControls, + FreeMovementPlusControlsProps, ScrollControls, ScrollControlsProps, ScrollAction,