From 107ec32568d205b888d95bce4143f6589d056ea9 Mon Sep 17 00:00:00 2001 From: "Blue (Lukas Rieger)" Date: Sat, 20 Feb 2021 15:33:32 +0100 Subject: [PATCH] Fix Hammer lib usage and some package.json values --- package.json | 4 ++-- src/controls/freeflight/FreeFlightControls.js | 5 +++-- src/controls/freeflight/touch/TouchPanControls.js | 2 +- src/controls/map/MapControls.js | 3 ++- src/controls/map/touch/TouchAngleControls.js | 2 +- src/controls/map/touch/TouchMoveControls.js | 2 +- src/controls/map/touch/TouchRotateControls.js | 2 +- src/controls/map/touch/TouchZoomControls.js | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 846a7d9..f7cc625 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "bluemap", - "version": "0.0.0", + "version": "0.1.0", "description": "A library to load and display Minecraft maps generated by BlueMap.", "repository": { "type": "git", - "url": "https://github.com/BlueMap-Minecraft/BlueMap.git" + "url": "https://github.com/BlueMap-Minecraft/BlueMapWeb.git" }, "keywords": [ "minecraft", diff --git a/src/controls/freeflight/FreeFlightControls.js b/src/controls/freeflight/FreeFlightControls.js index 9c34a84..519a2fa 100644 --- a/src/controls/freeflight/FreeFlightControls.js +++ b/src/controls/freeflight/FreeFlightControls.js @@ -24,7 +24,8 @@ */ import {MathUtils, Vector2} from "three"; -import {animate, EasingFunctions, softMin} from "../../util/Utils"; +import {Manager} from "hammerjs"; +import {animate, EasingFunctions} from "../../util/Utils"; import {KeyMoveControls} from "./keyboard/KeyMoveControls"; import {MouseRotateControls} from "./mouse/MouseRotateControls"; import {MouseAngleControls} from "./mouse/MouseAngleControls"; @@ -40,7 +41,7 @@ export class FreeFlightControls { this.target = target; this.manager = null; - this.hammer = new Hammer.Manager(this.target); + this.hammer = new Manager(this.target); this.initializeHammer(); this.keyMove = new KeyMoveControls(this.target, 0.5, 0.1); diff --git a/src/controls/freeflight/touch/TouchPanControls.js b/src/controls/freeflight/touch/TouchPanControls.js index f039a63..2ba513e 100644 --- a/src/controls/freeflight/touch/TouchPanControls.js +++ b/src/controls/freeflight/touch/TouchPanControls.js @@ -30,7 +30,7 @@ export class TouchPanControls { static tempVec2_1 = new Vector2(); /** - * @param hammer {Hammer.Manager} + * @param hammer {Manager} * @param speed {number} * @param stiffness {number} */ diff --git a/src/controls/map/MapControls.js b/src/controls/map/MapControls.js index 12af113..c3d79c5 100644 --- a/src/controls/map/MapControls.js +++ b/src/controls/map/MapControls.js @@ -28,6 +28,7 @@ import {MouseZoomControls} from "./mouse/MouseZoomControls"; import {MouseRotateControls} from "./mouse/MouseRotateControls"; import {MouseAngleControls} from "./mouse/MouseAngleControls"; import {MathUtils, Vector2} from "three"; +import {Manager} from "hammerjs"; import {animate, EasingFunctions, softClamp} from "../../util/Utils"; import {MapHeightControls} from "./MapHeightControls"; import {KeyMoveControls} from "./keyboard/KeyMoveControls"; @@ -54,7 +55,7 @@ export class MapControls { this.started = false; - this.hammer = new Hammer.Manager(this.rootElement); + this.hammer = new Manager(this.rootElement); this.initializeHammer(); //controls diff --git a/src/controls/map/touch/TouchAngleControls.js b/src/controls/map/touch/TouchAngleControls.js index c6c1bfd..c07cab4 100644 --- a/src/controls/map/touch/TouchAngleControls.js +++ b/src/controls/map/touch/TouchAngleControls.js @@ -28,7 +28,7 @@ import {MathUtils} from "three"; export class TouchAngleControls { /** - * @param hammer {Hammer.Manager} + * @param hammer {Manager} * @param speed {number} * @param stiffness {number} */ diff --git a/src/controls/map/touch/TouchMoveControls.js b/src/controls/map/touch/TouchMoveControls.js index c7c9b79..e4d730c 100644 --- a/src/controls/map/touch/TouchMoveControls.js +++ b/src/controls/map/touch/TouchMoveControls.js @@ -31,7 +31,7 @@ export class TouchMoveControls { static tempVec2_1 = new Vector2(); /** - * @param hammer {Hammer.Manager} + * @param hammer {Manager} * @param speed {number} * @param stiffness {number} */ diff --git a/src/controls/map/touch/TouchRotateControls.js b/src/controls/map/touch/TouchRotateControls.js index fd413df..5177d7a 100644 --- a/src/controls/map/touch/TouchRotateControls.js +++ b/src/controls/map/touch/TouchRotateControls.js @@ -28,7 +28,7 @@ import {MathUtils} from "three"; export class TouchRotateControls { /** - * @param hammer {Hammer.Manager} + * @param hammer {Manager} * @param speed {number} * @param stiffness {number} */ diff --git a/src/controls/map/touch/TouchZoomControls.js b/src/controls/map/touch/TouchZoomControls.js index d8287ed..e959637 100644 --- a/src/controls/map/touch/TouchZoomControls.js +++ b/src/controls/map/touch/TouchZoomControls.js @@ -26,7 +26,7 @@ export class TouchZoomControls { /** - * @param hammer {Hammer.Manager} + * @param hammer {Manager} */ constructor(hammer) { this.hammer = hammer;