mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
[ts] Removed logging from CameraController, update to version 4.0.14.
This commit is contained in:
parent
168bea6fdb
commit
deeb845011
4
spine-ts/package-lock.json
generated
4
spine-ts/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@esotericsoftware/spine-ts",
|
||||
"version": "4.0.13",
|
||||
"version": "4.0.14",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@esotericsoftware/spine-ts",
|
||||
"version": "4.0.13",
|
||||
"version": "4.0.14",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"workspaces": [
|
||||
"spine-core",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@esotericsoftware/spine-ts",
|
||||
"version": "4.0.13",
|
||||
"version": "4.0.14",
|
||||
"description": "The official Spine Runtimes for the web.",
|
||||
"files": [
|
||||
"README.md"
|
||||
@ -60,4 +60,4 @@
|
||||
"typescript": "^4.3.5",
|
||||
"@types/offscreencanvas": "^2019.6.4"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@esotericsoftware/spine-canvas",
|
||||
"version": "4.0.13",
|
||||
"version": "4.0.14",
|
||||
"description": "The official Spine Runtimes for the web.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@ -32,4 +32,4 @@
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-core": "^4.0.13"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@esotericsoftware/spine-core",
|
||||
"version": "4.0.13",
|
||||
"version": "4.0.14",
|
||||
"description": "The official Spine Runtimes for the web.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@esotericsoftware/spine-player",
|
||||
"version": "4.0.13",
|
||||
"version": "4.0.14",
|
||||
"description": "The official Spine Runtimes for the web.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@ -32,4 +32,4 @@
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-webgl": "^4.0.13"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@esotericsoftware/spine-threejs",
|
||||
"version": "4.0.13",
|
||||
"version": "4.0.14",
|
||||
"description": "The official Spine Runtimes for the web.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@ -34,4 +34,4 @@
|
||||
"three": "^0.132.0",
|
||||
"@esotericsoftware/spine-core": "^4.0.13"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@esotericsoftware/spine-webgl",
|
||||
"version": "4.0.13",
|
||||
"version": "4.0.14",
|
||||
"description": "The official Spine Runtimes for the web.",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
@ -32,4 +32,4 @@
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-core": "^4.0.13"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,6 @@ export class CameraController {
|
||||
|
||||
new Input(canvas).addListener({
|
||||
down: (x: number, y: number) => {
|
||||
console.log(`Down ${x.toFixed(0)} ${y.toFixed(0)}`);
|
||||
cameraX = camera.position.x;
|
||||
cameraY = camera.position.y;
|
||||
mouseX = lastX = x;
|
||||
@ -48,7 +47,6 @@ export class CameraController {
|
||||
initialZoom = camera.zoom;
|
||||
},
|
||||
dragged: (x: number, y: number) => {
|
||||
console.log(`Dragged ${x.toFixed(0)} ${y.toFixed(0)}`);
|
||||
let deltaX = x - mouseX;
|
||||
let deltaY = y - mouseY;
|
||||
let originWorld = camera.screenToWorld(new Vector3(0, 0), canvas.clientWidth, canvas.clientHeight);
|
||||
@ -82,12 +80,9 @@ export class CameraController {
|
||||
},
|
||||
zoom: (initialDistance, distance) => {
|
||||
let newZoom = initialDistance / distance;
|
||||
console.log(`${newZoom}, ${initialDistance}, ${distance}`);
|
||||
camera.zoom = initialZoom * newZoom;
|
||||
console.log(`zoom ${newZoom}`);
|
||||
},
|
||||
up: (x: number, y: number) => {
|
||||
console.log(`Up ${x.toFixed(0)} ${y.toFixed(0)}`);
|
||||
lastX = x;
|
||||
lastY = y;
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user