From b3e97a9d349ccf43c887f7bfd9fb2f398788bbb1 Mon Sep 17 00:00:00 2001 From: Naruto TAKAHASHI Date: Wed, 10 Jul 2024 14:59:26 +0900 Subject: [PATCH] add example of SetPartCell --- packages/ss6player-pixi/Player/sample.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/packages/ss6player-pixi/Player/sample.js b/packages/ss6player-pixi/Player/sample.js index aa7b390..86b0558 100644 --- a/packages/ss6player-pixi/Player/sample.js +++ b/packages/ss6player-pixi/Player/sample.js @@ -14,6 +14,7 @@ //const testVersion = "sampleAnimation1"; //const testVersion = "sampleAnimation2"; const testVersion = "sampleAnimation3"; +//const testVersion = "sampleReplaceTexture"; (async () => { PIXI.sayHello(); @@ -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 } }; @@ -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(); + } })();