mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-09 08:38:43 +08:00
[ts][phaser] Update ts examples with -v3 and -v4 versions.
This commit is contained in:
parent
da0be9de63
commit
18d275cfe4
@ -1,5 +1,5 @@
|
||||
import * as Phaser from "phaser"
|
||||
import * as spine from "@esotericsoftware/spine-phaser"
|
||||
import * as spine from "@esotericsoftware/spine-phaser-v3"
|
||||
|
||||
class SpineDemo extends Phaser.Scene {
|
||||
preload() {
|
||||
@ -8,13 +8,13 @@ class SpineDemo extends Phaser.Scene {
|
||||
}
|
||||
|
||||
create() {
|
||||
const spineboy = this.add.spine(400, 500, 'spineboy-data', "spineboy-atlas");
|
||||
const spineboy = this.add.spine(400, 500, 'spineboy-data', "spineboy-atlas");
|
||||
spineboy.scale = 0.5;
|
||||
spineboy.animationState.setAnimation(0, "walk", true);
|
||||
}
|
||||
}
|
||||
|
||||
const config = {
|
||||
const config = {
|
||||
width: 800,
|
||||
height: 600,
|
||||
type: Phaser.WEBGL,
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"name": "name",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-phaser": "~4.2.62",
|
||||
"@esotericsoftware/spine-phaser-v3": "~4.2.77",
|
||||
"phaser": "3.60.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@ -369,42 +369,42 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-canvas": {
|
||||
"version": "4.2.71",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-canvas/-/spine-canvas-4.2.71.tgz",
|
||||
"integrity": "sha512-tCByT1cICKKs8cxlae/vDUqR8tTn4l7zj132yiibsIjGgifFcP2oWqki61U/bcei0AxmRhH/4UqaHR4DBSjlsQ==",
|
||||
"node_modules/@esotericsoftware/spine-phaser-v3": {
|
||||
"version": "4.2.77",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-phaser-v3/-/spine-phaser-v3-4.2.77.tgz",
|
||||
"integrity": "sha512-Iq/hQqhyori4maNPGsmgYIA4PFb+3gVDXqLd+wQU+BdIc0htFLCaiFE35uMh4hXeoOo39tgRB0tYjN42TZLTag==",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-core": "4.2.71"
|
||||
}
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-core": {
|
||||
"version": "4.2.71",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-core/-/spine-core-4.2.71.tgz",
|
||||
"integrity": "sha512-LPXO594nUqZFE6YljWAKbaYGIzAHWwBgGFbMxsdrkkiaJJlJMwsciaD6dKFik8OPitEzM/1Hl/bch96oza2dWw==",
|
||||
"license": "LicenseRef-LICENSE"
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-phaser": {
|
||||
"version": "4.2.71",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-phaser/-/spine-phaser-4.2.71.tgz",
|
||||
"integrity": "sha512-6ysEXAYaIakSNxn+6Z5Lx7n8GtLW7Gak3nYDfcBARH0dX2Slca51bsw1RGrlBukxLOOI/uFuvt1Ta/8GRHgXHw==",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-canvas": "4.2.71",
|
||||
"@esotericsoftware/spine-core": "4.2.71",
|
||||
"@esotericsoftware/spine-webgl": "4.2.71"
|
||||
"@esotericsoftware/spine-canvas": "4.2.77",
|
||||
"@esotericsoftware/spine-core": "4.2.77",
|
||||
"@esotericsoftware/spine-webgl": "4.2.77"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"phaser": "^3.60.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-webgl": {
|
||||
"version": "4.2.71",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-webgl/-/spine-webgl-4.2.71.tgz",
|
||||
"integrity": "sha512-izpIsp8/5kEU+TmK7v7Q6lBKJN01FHZBmGVNxXEHtVR8HTUTyuyJWgcpEyuH71UzSRZ9bnHHIBhSwZPZWycxPQ==",
|
||||
"node_modules/@esotericsoftware/spine-phaser-v3/node_modules/@esotericsoftware/spine-canvas": {
|
||||
"version": "4.2.77",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-canvas/-/spine-canvas-4.2.77.tgz",
|
||||
"integrity": "sha512-Oz8HXzknI4n1s+iYR0V/r+k8vV09r0j9z1+OPCYgPwYjKrt+VDmcLo33jZb4PJIyQZ3pPo7x8r21QvR+0YIyKQ==",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-core": "4.2.71"
|
||||
"@esotericsoftware/spine-core": "4.2.77"
|
||||
}
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-phaser-v3/node_modules/@esotericsoftware/spine-core": {
|
||||
"version": "4.2.77",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-core/-/spine-core-4.2.77.tgz",
|
||||
"integrity": "sha512-puVD9M8ocJCRHnuElrBhTTeBTq/iUc4O4d7N+hGAqQKWgtLMsro8T/ainni9dvx+wwdT6HNtyjoMZ9A5VxzFmg==",
|
||||
"license": "LicenseRef-LICENSE"
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-phaser-v3/node_modules/@esotericsoftware/spine-webgl": {
|
||||
"version": "4.2.77",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-webgl/-/spine-webgl-4.2.77.tgz",
|
||||
"integrity": "sha512-2uNlCW3/30rHMAdGAlXHfgbbpalhzoWHMKQbVdYQF7ejH42ayvYEw1eDaeWC+RpIl2e+cLbuYtgrl271ZMhMoQ==",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-core": "4.2.77"
|
||||
}
|
||||
},
|
||||
"node_modules/accepts": {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"dev": "npx concurrently \"npx live-server --no-browser\" \"npm run build -- --watch\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-phaser": "~4.2.62",
|
||||
"@esotericsoftware/spine-phaser-v3": "~4.2.77",
|
||||
"phaser": "3.60.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import * as Phaser from "phaser"
|
||||
import * as spine from "@esotericsoftware/spine-phaser"
|
||||
import * as spine from "@esotericsoftware/spine-phaser-v4"
|
||||
|
||||
class SpineDemo extends Phaser.Scene {
|
||||
preload() {
|
||||
@ -8,13 +8,13 @@ class SpineDemo extends Phaser.Scene {
|
||||
}
|
||||
|
||||
create() {
|
||||
const spineboy = this.add.spine(400, 500, 'spineboy-data', "spineboy-atlas");
|
||||
const spineboy = this.add.spine(400, 500, 'spineboy-data', "spineboy-atlas");
|
||||
spineboy.scale = 0.5;
|
||||
spineboy.animationState.setAnimation(0, "walk", true);
|
||||
}
|
||||
}
|
||||
|
||||
const config = {
|
||||
const config = {
|
||||
width: 800,
|
||||
height: 600,
|
||||
type: Phaser.WEBGL,
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
"name": "name",
|
||||
"version": "1.0.0",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-phaser": "~4.2.62",
|
||||
"phaser": "3.60.0"
|
||||
"@esotericsoftware/spine-phaser-v4": "~4.2.77",
|
||||
"phaser": "4.0.0-rc.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^7.6.0",
|
||||
@ -369,42 +369,42 @@
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-canvas": {
|
||||
"version": "4.2.71",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-canvas/-/spine-canvas-4.2.71.tgz",
|
||||
"integrity": "sha512-tCByT1cICKKs8cxlae/vDUqR8tTn4l7zj132yiibsIjGgifFcP2oWqki61U/bcei0AxmRhH/4UqaHR4DBSjlsQ==",
|
||||
"node_modules/@esotericsoftware/spine-phaser-v4": {
|
||||
"version": "4.2.77",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-phaser-v4/-/spine-phaser-v4-4.2.77.tgz",
|
||||
"integrity": "sha512-RKDhCTTYY/bsHu6ZvCGS16I6K4v59XfiT9iTitTevKntCfeURI+hYWE83xVJLNIqwq3zklowArENK8UQyW2MmA==",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-core": "4.2.71"
|
||||
}
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-core": {
|
||||
"version": "4.2.71",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-core/-/spine-core-4.2.71.tgz",
|
||||
"integrity": "sha512-LPXO594nUqZFE6YljWAKbaYGIzAHWwBgGFbMxsdrkkiaJJlJMwsciaD6dKFik8OPitEzM/1Hl/bch96oza2dWw==",
|
||||
"license": "LicenseRef-LICENSE"
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-phaser": {
|
||||
"version": "4.2.71",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-phaser/-/spine-phaser-4.2.71.tgz",
|
||||
"integrity": "sha512-6ysEXAYaIakSNxn+6Z5Lx7n8GtLW7Gak3nYDfcBARH0dX2Slca51bsw1RGrlBukxLOOI/uFuvt1Ta/8GRHgXHw==",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-canvas": "4.2.71",
|
||||
"@esotericsoftware/spine-core": "4.2.71",
|
||||
"@esotericsoftware/spine-webgl": "4.2.71"
|
||||
"@esotericsoftware/spine-canvas": "4.2.77",
|
||||
"@esotericsoftware/spine-core": "4.2.77",
|
||||
"@esotericsoftware/spine-webgl": "4.2.77"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"phaser": "^3.60.0"
|
||||
"phaser": "^4.0.0-rc.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-webgl": {
|
||||
"version": "4.2.71",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-webgl/-/spine-webgl-4.2.71.tgz",
|
||||
"integrity": "sha512-izpIsp8/5kEU+TmK7v7Q6lBKJN01FHZBmGVNxXEHtVR8HTUTyuyJWgcpEyuH71UzSRZ9bnHHIBhSwZPZWycxPQ==",
|
||||
"node_modules/@esotericsoftware/spine-phaser-v4/node_modules/@esotericsoftware/spine-canvas": {
|
||||
"version": "4.2.77",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-canvas/-/spine-canvas-4.2.77.tgz",
|
||||
"integrity": "sha512-Oz8HXzknI4n1s+iYR0V/r+k8vV09r0j9z1+OPCYgPwYjKrt+VDmcLo33jZb4PJIyQZ3pPo7x8r21QvR+0YIyKQ==",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-core": "4.2.71"
|
||||
"@esotericsoftware/spine-core": "4.2.77"
|
||||
}
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-phaser-v4/node_modules/@esotericsoftware/spine-core": {
|
||||
"version": "4.2.77",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-core/-/spine-core-4.2.77.tgz",
|
||||
"integrity": "sha512-puVD9M8ocJCRHnuElrBhTTeBTq/iUc4O4d7N+hGAqQKWgtLMsro8T/ainni9dvx+wwdT6HNtyjoMZ9A5VxzFmg==",
|
||||
"license": "LicenseRef-LICENSE"
|
||||
},
|
||||
"node_modules/@esotericsoftware/spine-phaser-v4/node_modules/@esotericsoftware/spine-webgl": {
|
||||
"version": "4.2.77",
|
||||
"resolved": "https://registry.npmjs.org/@esotericsoftware/spine-webgl/-/spine-webgl-4.2.77.tgz",
|
||||
"integrity": "sha512-2uNlCW3/30rHMAdGAlXHfgbbpalhzoWHMKQbVdYQF7ejH42ayvYEw1eDaeWC+RpIl2e+cLbuYtgrl271ZMhMoQ==",
|
||||
"license": "LicenseRef-LICENSE",
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-core": "4.2.77"
|
||||
}
|
||||
},
|
||||
"node_modules/accepts": {
|
||||
@ -1092,9 +1092,10 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eventemitter3": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.0.tgz",
|
||||
"integrity": "sha512-riuVbElZZNXLeLEoprfNYoDSwTBRR44X3mnhdI1YcnENpWTCsTTVZ2zFuqQcpoyqPQIUXdiPEU0ECAq0KQRaHg=="
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz",
|
||||
"integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/expand-brackets": {
|
||||
"version": "2.1.4",
|
||||
@ -2122,11 +2123,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/phaser": {
|
||||
"version": "3.60.0",
|
||||
"resolved": "https://registry.npmjs.org/phaser/-/phaser-3.60.0.tgz",
|
||||
"integrity": "sha512-IKUy35EnoEVcl2EmJ8WOyK4X8OoxHYdlhZLgRGpNrvD1fEagYffhVmwHcapE/tGiLgyrnezmXIo5RrH2NcrTHw==",
|
||||
"version": "4.0.0-rc.1",
|
||||
"resolved": "https://registry.npmjs.org/phaser/-/phaser-4.0.0-rc.1.tgz",
|
||||
"integrity": "sha512-OsUvqtTKSDZMjsy4qFlO7uCPklQRcoqi/ihefMnihrSYmAYTk5vqUjnM1yvTMISbNwe/J5VsADWg2stWAm7I5A==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"eventemitter3": "^5.0.0"
|
||||
"eventemitter3": "^5.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/posix-character-classes": {
|
||||
|
||||
@ -8,8 +8,8 @@
|
||||
"dev": "npx concurrently \"npx live-server --no-browser\" \"npm run build -- --watch\""
|
||||
},
|
||||
"dependencies": {
|
||||
"@esotericsoftware/spine-phaser": "~4.2.62",
|
||||
"phaser": "3.60.0"
|
||||
"@esotericsoftware/spine-phaser-v4": "~4.2.77",
|
||||
"phaser": "4.0.0-rc.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "0.17.17",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user