[ts] Removed logging from CameraController, update to version 4.0.14.

This commit is contained in:
Mario Zechner 2021-09-20 21:16:52 +02:00
parent 168bea6fdb
commit deeb845011
8 changed files with 13 additions and 18 deletions

View File

@ -1,12 +1,12 @@
{ {
"name": "@esotericsoftware/spine-ts", "name": "@esotericsoftware/spine-ts",
"version": "4.0.13", "version": "4.0.14",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@esotericsoftware/spine-ts", "name": "@esotericsoftware/spine-ts",
"version": "4.0.13", "version": "4.0.14",
"license": "LicenseRef-LICENSE", "license": "LicenseRef-LICENSE",
"workspaces": [ "workspaces": [
"spine-core", "spine-core",

View File

@ -1,6 +1,6 @@
{ {
"name": "@esotericsoftware/spine-ts", "name": "@esotericsoftware/spine-ts",
"version": "4.0.13", "version": "4.0.14",
"description": "The official Spine Runtimes for the web.", "description": "The official Spine Runtimes for the web.",
"files": [ "files": [
"README.md" "README.md"
@ -60,4 +60,4 @@
"typescript": "^4.3.5", "typescript": "^4.3.5",
"@types/offscreencanvas": "^2019.6.4" "@types/offscreencanvas": "^2019.6.4"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@esotericsoftware/spine-canvas", "name": "@esotericsoftware/spine-canvas",
"version": "4.0.13", "version": "4.0.14",
"description": "The official Spine Runtimes for the web.", "description": "The official Spine Runtimes for the web.",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@ -32,4 +32,4 @@
"dependencies": { "dependencies": {
"@esotericsoftware/spine-core": "^4.0.13" "@esotericsoftware/spine-core": "^4.0.13"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@esotericsoftware/spine-core", "name": "@esotericsoftware/spine-core",
"version": "4.0.13", "version": "4.0.14",
"description": "The official Spine Runtimes for the web.", "description": "The official Spine Runtimes for the web.",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",

View File

@ -1,6 +1,6 @@
{ {
"name": "@esotericsoftware/spine-player", "name": "@esotericsoftware/spine-player",
"version": "4.0.13", "version": "4.0.14",
"description": "The official Spine Runtimes for the web.", "description": "The official Spine Runtimes for the web.",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@ -32,4 +32,4 @@
"dependencies": { "dependencies": {
"@esotericsoftware/spine-webgl": "^4.0.13" "@esotericsoftware/spine-webgl": "^4.0.13"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@esotericsoftware/spine-threejs", "name": "@esotericsoftware/spine-threejs",
"version": "4.0.13", "version": "4.0.14",
"description": "The official Spine Runtimes for the web.", "description": "The official Spine Runtimes for the web.",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@ -34,4 +34,4 @@
"three": "^0.132.0", "three": "^0.132.0",
"@esotericsoftware/spine-core": "^4.0.13" "@esotericsoftware/spine-core": "^4.0.13"
} }
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "@esotericsoftware/spine-webgl", "name": "@esotericsoftware/spine-webgl",
"version": "4.0.13", "version": "4.0.14",
"description": "The official Spine Runtimes for the web.", "description": "The official Spine Runtimes for the web.",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
@ -32,4 +32,4 @@
"dependencies": { "dependencies": {
"@esotericsoftware/spine-core": "^4.0.13" "@esotericsoftware/spine-core": "^4.0.13"
} }
} }

View File

@ -40,7 +40,6 @@ export class CameraController {
new Input(canvas).addListener({ new Input(canvas).addListener({
down: (x: number, y: number) => { down: (x: number, y: number) => {
console.log(`Down ${x.toFixed(0)} ${y.toFixed(0)}`);
cameraX = camera.position.x; cameraX = camera.position.x;
cameraY = camera.position.y; cameraY = camera.position.y;
mouseX = lastX = x; mouseX = lastX = x;
@ -48,7 +47,6 @@ export class CameraController {
initialZoom = camera.zoom; initialZoom = camera.zoom;
}, },
dragged: (x: number, y: number) => { dragged: (x: number, y: number) => {
console.log(`Dragged ${x.toFixed(0)} ${y.toFixed(0)}`);
let deltaX = x - mouseX; let deltaX = x - mouseX;
let deltaY = y - mouseY; let deltaY = y - mouseY;
let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight); let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight);
@ -82,12 +80,9 @@ export class CameraController {
}, },
zoom: (initialDistance, distance) => { zoom: (initialDistance, distance) => {
let newZoom = initialDistance / distance; let newZoom = initialDistance / distance;
console.log(`${newZoom}, ${initialDistance}, ${distance}`);
camera.zoom = initialZoom * newZoom; camera.zoom = initialZoom * newZoom;
console.log(`zoom ${newZoom}`);
}, },
up: (x: number, y: number) => { up: (x: number, y: number) => {
console.log(`Up ${x.toFixed(0)} ${y.toFixed(0)}`);
lastX = x; lastX = x;
lastY = y; lastY = y;
}, },