Skip to content

Commit

Permalink
add example of SetPartCell
Browse files Browse the repository at this point in the history
  • Loading branch information
Naruto committed Jul 10, 2024
1 parent d354782 commit b3e97a9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/ss6player-pixi/Player/sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
//const testVersion = "sampleAnimation1";
//const testVersion = "sampleAnimation2";
const testVersion = "sampleAnimation3";
//const testVersion = "sampleReplaceTexture";

(async () => {
PIXI.sayHello();
Expand Down Expand Up @@ -44,6 +45,11 @@ const testVersion = "sampleAnimation3";
"sampleAnimation3": {
"ssfbFile": "../../../TestData/MeshBone/Knight.ssfb",
"func": Play_sampleAnimation3
},

"sampleReplaceTexture": {
"ssfbFile": "../../../TestData/MeshBone/Knight.ssfb",
"func": Play_sampleReplaceTexture
}
};

Expand Down Expand Up @@ -115,4 +121,16 @@ const testVersion = "sampleAnimation3";
mySS6Player.Play();
}
}

function Play_sampleReplaceTexture() {
let mySS6Player = new ss6PlayerPixi.SS6Player(mySS6Project);
mySS6Player.Setup("Knight_bomb", "Balloon");
mySS6Player.position = new PIXI.Point(320, 480);
mySS6Player.scale = new PIXI.Point(0.5, 0.5);
mySS6Player.SetPartCell('Head', 'Effect', 'Flame');
app.stage.addChild(mySS6Player);

// 再生開始
mySS6Player.Play();
}
})();

0 comments on commit b3e97a9

Please sign in to comment.