[ts] Fixed sack (physics4) examples.

This commit is contained in:
Davide Tantillo 2025-06-20 15:18:56 +02:00
parent 517d9341b6
commit 5cb6577df3
6 changed files with 8 additions and 8 deletions

View File

@ -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() {

View File

@ -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() {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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);