diff --git a/package-lock.json b/package-lock.json index cb0a4f82a..fc3b8f7f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,15 +1,15 @@ { "name": "@egjs/view360", - "version": "3.6.2", + "version": "3.6.2-snapshot", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@egjs/view360", - "version": "3.6.2", + "version": "3.6.2-snapshot", "license": "MIT", "dependencies": { - "@egjs/axes": "^2.7.1", + "@egjs/axes": "^3.3.0", "@egjs/component": "^3.0.1", "@egjs/imready": "^1.1.2", "gl-matrix": "^3.3.0", @@ -1364,20 +1364,14 @@ "integrity": "sha512-SxrZbkYY/tdOmTLvuN/Jm5y/BgVw9l7H/jcdkI7DxO3Dv/6YFU20y+GYBGv+4rZTtmUs4luDucfHrU44IwWDOw==" }, "node_modules/@egjs/axes": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@egjs/axes/-/axes-2.7.2.tgz", - "integrity": "sha512-Ji2H2QlMimb+nLEBHSt+OuYvl04VwrmeMyvM3ImlzeOpXy96wY5Cl/re7TP40Ljpx/ttXBzHF6UnkOamW/+8Ng==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@egjs/axes/-/axes-3.3.0.tgz", + "integrity": "sha512-Km8qZUDnDGF56wbks4aFa4AYluZab8KBaWHBQNvs6T8BIQlC3RZEigDWlNuspcTjPv5UNkix1RqWtqhHLd6I3g==", "dependencies": { "@egjs/agent": "^2.2.1", - "@egjs/component": "^2.2.2", - "@egjs/hammerjs": "^2.0.15" + "@egjs/component": "^3.0.1" } }, - "node_modules/@egjs/axes/node_modules/@egjs/component": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@egjs/component/-/component-2.2.2.tgz", - "integrity": "sha512-2m6nu6/Mbs6VnoT4IHFGUBX6V82Zp01zDmlWpIJ3fMatHpe7BB1qUYFgMmSWGY0uOvOl4plvflwbCRUAGMfwWQ==" - }, "node_modules/@egjs/build-helper": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/@egjs/build-helper/-/build-helper-0.1.2.tgz", @@ -1420,17 +1414,6 @@ "resolved": "https://registry.npmjs.org/@egjs/component/-/component-3.0.1.tgz", "integrity": "sha512-Hus9GMXOVfHBzyumyeRL1TkN60LhGen+e9FpqXqbS9jA9hDYEE1AH3ulahbBGhRdMs4uXYl3hRnB5kGZRb9n7Q==" }, - "node_modules/@egjs/hammerjs": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", - "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==", - "dependencies": { - "@types/hammerjs": "^2.0.36" - }, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/@egjs/imready": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@egjs/imready/-/imready-1.1.2.tgz", @@ -1638,11 +1621,6 @@ "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==", "dev": true }, - "node_modules/@types/hammerjs": { - "version": "2.0.36", - "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.36.tgz", - "integrity": "sha512-7TUK/k2/QGpEAv/BCwSHlYu3NXZhQ9ZwBYpzr9tjlPIL2C5BeGhH3DmVavRx3ZNyELX5TLC91JTz/cen6AAtIQ==" - }, "node_modules/@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", @@ -17203,20 +17181,12 @@ "integrity": "sha512-SxrZbkYY/tdOmTLvuN/Jm5y/BgVw9l7H/jcdkI7DxO3Dv/6YFU20y+GYBGv+4rZTtmUs4luDucfHrU44IwWDOw==" }, "@egjs/axes": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/@egjs/axes/-/axes-2.7.2.tgz", - "integrity": "sha512-Ji2H2QlMimb+nLEBHSt+OuYvl04VwrmeMyvM3ImlzeOpXy96wY5Cl/re7TP40Ljpx/ttXBzHF6UnkOamW/+8Ng==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@egjs/axes/-/axes-3.3.0.tgz", + "integrity": "sha512-Km8qZUDnDGF56wbks4aFa4AYluZab8KBaWHBQNvs6T8BIQlC3RZEigDWlNuspcTjPv5UNkix1RqWtqhHLd6I3g==", "requires": { "@egjs/agent": "^2.2.1", - "@egjs/component": "^2.2.2", - "@egjs/hammerjs": "^2.0.15" - }, - "dependencies": { - "@egjs/component": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@egjs/component/-/component-2.2.2.tgz", - "integrity": "sha512-2m6nu6/Mbs6VnoT4IHFGUBX6V82Zp01zDmlWpIJ3fMatHpe7BB1qUYFgMmSWGY0uOvOl4plvflwbCRUAGMfwWQ==" - } + "@egjs/component": "^3.0.1" } }, "@egjs/build-helper": { @@ -17259,14 +17229,6 @@ "resolved": "https://registry.npmjs.org/@egjs/component/-/component-3.0.1.tgz", "integrity": "sha512-Hus9GMXOVfHBzyumyeRL1TkN60LhGen+e9FpqXqbS9jA9hDYEE1AH3ulahbBGhRdMs4uXYl3hRnB5kGZRb9n7Q==" }, - "@egjs/hammerjs": { - "version": "2.0.17", - "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", - "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==", - "requires": { - "@types/hammerjs": "^2.0.36" - } - }, "@egjs/imready": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@egjs/imready/-/imready-1.1.2.tgz", @@ -17449,11 +17411,6 @@ "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==", "dev": true }, - "@types/hammerjs": { - "version": "2.0.36", - "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.36.tgz", - "integrity": "sha512-7TUK/k2/QGpEAv/BCwSHlYu3NXZhQ9ZwBYpzr9tjlPIL2C5BeGhH3DmVavRx3ZNyELX5TLC91JTz/cen6AAtIQ==" - }, "@types/json-schema": { "version": "7.0.9", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", diff --git a/package.json b/package.json index 1189d6317..a8d401546 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "url": "https://github.com/naver/egjs-view360/issues" }, "dependencies": { - "@egjs/axes": "^2.7.1", + "@egjs/axes": "^3.3.0", "@egjs/component": "^3.0.1", "@egjs/imready": "^1.1.2", "gl-matrix": "^3.3.0", diff --git a/src/YawPitchControl/input/RotationPanInput.ts b/src/YawPitchControl/input/RotationPanInput.ts index 21bea15da..968734329 100644 --- a/src/YawPitchControl/input/RotationPanInput.ts +++ b/src/YawPitchControl/input/RotationPanInput.ts @@ -1,6 +1,5 @@ -/* eslint-disable @typescript-eslint/ban-ts-comment */ import Axes, { PanInput } from "@egjs/axes"; -import { IInputTypeObserver } from "@egjs/axes/declaration/inputType/InputType"; +import { InputTypeObserver } from "@egjs/axes/declaration/inputType/InputType"; import { PanInputOption } from "@egjs/axes/declaration/inputType/PanInput"; import ScreenRotationAngle from "../ScreenRotationAngle"; @@ -14,7 +13,6 @@ import ScreenRotationAngle from "../ScreenRotationAngle"; * Therefore, the angle that the user touches and moves does not match the angle at which the actual object should move. * @extends PanInput */ -// @ts-ignore export default class RotationPanInput extends PanInput { private _useRotation: boolean; private _screenRotationAngle: ScreenRotationAngle | null; @@ -51,7 +49,7 @@ export default class RotationPanInput extends PanInput { } } - public connect(observer: IInputTypeObserver) { + public connect(observer: InputTypeObserver) { // User intetened direction this._userDirection = this._direction; @@ -73,15 +71,12 @@ export default class RotationPanInput extends PanInput { super.destroy(); } - // eslint-disable-next-line @typescript-eslint/naming-convention - private getOffset(properties: number[], useDirection: boolean[]) { + protected _getOffset(properties: number[], useDirection: boolean[]) { if (this._useRotation === false) { - // @ts-ignore - return super.getOffset(properties, useDirection); + return super._getOffset(properties, useDirection); } - // @ts-ignore - const offset = super.getOffset(properties, [true, true]); + const offset = super._getOffset(properties, [true, true]); const newOffset = [0, 0]; const theta = this._screenRotationAngle!.getRadian(); diff --git a/src/YawPitchControl/input/TiltMotionInput.ts b/src/YawPitchControl/input/TiltMotionInput.ts index dab6c25a5..54af902d3 100644 --- a/src/YawPitchControl/input/TiltMotionInput.ts +++ b/src/YawPitchControl/input/TiltMotionInput.ts @@ -1,6 +1,6 @@ import Component from "@egjs/component"; import { quat } from "gl-matrix"; -import { IInputTypeObserver } from "@egjs/axes/declaration/inputType/InputType"; +import { InputTypeObserver } from "@egjs/axes/declaration/inputType/InputType"; import { toAxis } from "../utils"; import { util, ROTATE_CONSTANT } from "../../utils/math-util"; @@ -27,7 +27,7 @@ export default class TiltMotionInput extends Component<{}> { public options: { scale: number; threshold: number }; public fusionPoseSensor: FusionPoseSensor | null; public axes: string[]; - public observer: IInputTypeObserver | null; + public observer: InputTypeObserver | null; private _prevQuaternion: quat | null; private _quaternion: quat | null; @@ -55,7 +55,7 @@ export default class TiltMotionInput extends Component<{}> { this.axes = axes; } - public connect(observer: IInputTypeObserver) { + public connect(observer: InputTypeObserver) { if (this.observer) { return this; } diff --git a/test/unit/YawPitchControl/RotationPanInput.spec.js b/test/unit/YawPitchControl/RotationPanInput.spec.js index c6f954e84..fe641190a 100644 --- a/test/unit/YawPitchControl/RotationPanInput.spec.js +++ b/test/unit/YawPitchControl/RotationPanInput.spec.js @@ -53,7 +53,7 @@ describe("RotationPanInput", () => { // When const scale = this.inst.options.scale; const inputProperties = [10, 10]; - const result = this.inst.getOffset(inputProperties, [true, true]); + const result = this.inst._getOffset(inputProperties, [true, true]); // Then const expected = inputProperties.map((input, index) => input * scale[index]); @@ -83,7 +83,7 @@ describe("RotationPanInput", () => { // When const scale = this.inst.options.scale; const input = [10, 10]; - const result = this.inst.getOffset(input, [true, true]); + const result = this.inst._getOffset(input, [true, true]); // Then const expected = [