mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-25 22:23:42 +08:00
[ts] Fixed sack (physics4) examples.
This commit is contained in:
parent
517d9341b6
commit
5cb6577df3
@ -17,7 +17,7 @@
|
||||
class BasicExample extends Phaser.Scene {
|
||||
preload() {
|
||||
this.load.spineBinary("sack-data", "/assets/sack-pro.skel");
|
||||
this.load.spineAtlas("sack-atlas", "/assets/7-anticipation.atlas");
|
||||
this.load.spineAtlas("sack-atlas", "/assets/sack.atlas");
|
||||
}
|
||||
|
||||
create() {
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
class BasicExample extends Phaser.Scene {
|
||||
preload() {
|
||||
this.load.spineBinary("sack-data", "/assets/sack-pro.skel");
|
||||
this.load.spineAtlas("sack-atlas", "/assets/7-anticipation.atlas");
|
||||
this.load.spineAtlas("sack-atlas", "/assets/sack.atlas");
|
||||
}
|
||||
|
||||
create() {
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
// Pre-load the skeleton data and atlas. You can also load .json skeleton data.
|
||||
PIXI.Assets.add("sackData", "/assets/sack-pro.skel");
|
||||
PIXI.Assets.add("sackAtlas", "/assets/7-anticipation-pma.atlas");
|
||||
PIXI.Assets.add("sackAtlas", "/assets/sack-pma.atlas");
|
||||
await PIXI.Assets.load(["sackData", "sackAtlas"]);
|
||||
|
||||
// Create the spine display object
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
// Pre-load the skeleton data and atlas. You can also load .json skeleton data.
|
||||
PIXI.Assets.add({alias: "sackData", src: "/assets/sack-pro.skel"});
|
||||
PIXI.Assets.add({alias: "sackAtlas", src: "/assets/7-anticipation-pma.atlas"});
|
||||
PIXI.Assets.add({alias: "sackAtlas", src: "/assets/sack-pma.atlas"});
|
||||
await PIXI.Assets.load(["sackData", "sackAtlas"]);
|
||||
|
||||
// Create the spine display object
|
||||
|
||||
@ -998,7 +998,7 @@ async function updateCelesteAnimations() {
|
||||
<div class="split-right">
|
||||
<spine-skeleton
|
||||
identifier="sack-debug"
|
||||
atlas="/assets/7-anticipation-pma.atlas"
|
||||
atlas="/assets/sack-pma.atlas"
|
||||
skeleton="/assets/sack-pro.skel"
|
||||
animation="cape-follow-example"
|
||||
debug
|
||||
@ -1018,7 +1018,7 @@ async function updateCelesteAnimations() {
|
||||
<script>escapeHTMLandInject(`
|
||||
<spine-skeleton
|
||||
identifier="sack-debug"
|
||||
atlas="/assets/7-anticipation-pma.atlas"
|
||||
atlas="/assets/sack-pma.atlas"
|
||||
skeleton="/assets/sack-pro.skel"
|
||||
animation="cape-follow-example"
|
||||
debug
|
||||
|
||||
@ -25,14 +25,14 @@
|
||||
// Load the skeleton file.
|
||||
canvas.assetManager.loadBinary("/assets/sack-pro.skel");
|
||||
// Load the atlas and its pages.
|
||||
canvas.assetManager.loadTextureAtlas("/assets/7-anticipation-pma.atlas");
|
||||
canvas.assetManager.loadTextureAtlas("/assets/sack-pma.atlas");
|
||||
}
|
||||
|
||||
initialize(canvas) {
|
||||
let assetManager = canvas.assetManager;
|
||||
|
||||
// Create the texture atlas.
|
||||
var atlas = assetManager.require("/assets/7-anticipation-pma.atlas");
|
||||
var atlas = assetManager.require("/assets/sack-pma.atlas");
|
||||
|
||||
// Create a AtlasAttachmentLoader that resolves region, mesh, boundingbox and path attachments
|
||||
var atlasLoader = new spine.AtlasAttachmentLoader(atlas);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user