Skip to content

Commit

Permalink
[spine-ts][player] Add webplayer with audio in player example html
Browse files Browse the repository at this point in the history
  • Loading branch information
daaaaa committed Dec 11, 2022
1 parent 0c10af5 commit 6c9545b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions spine-ts/spine-player/example/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<button id="screenshot">Screenshot</button>
</div>
<img id="screenshot-image" src="" style="width: 400px;">
<div id="container-raptor-audio" style="width:640px; height:380px"></div>
</body>
<script>
// Creates a new spine player. The debugRender option enables
Expand Down Expand Up @@ -74,6 +75,17 @@
});
}
});

// Creates a new spine player with audio enabled.
new spine.SpinePlayer("container-raptor-audio", {
jsonUrl: "assets/raptor-pro.json",
atlasUrl: "assets/raptor-pma.atlas",
audioFolderPath: "assets/audio",
animation: "roar",
premultipliedAlpha: true,
backgroundColor: "#cccccc",
showControls: true
});
</script>
</body>

Expand Down

0 comments on commit 6c9545b

Please sign in to comment.