Skip to content

Commit 1ce2ff4

Browse files
committed
[spine-ts][player] Add webplayer with audio in player example html
1 parent d158b9e commit 1ce2ff4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

spine-ts/spine-player/example/example.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<button id="screenshot">Screenshot</button>
2626
</div>
2727
<img id="screenshot-image" src="" style="width: 400px;">
28+
<div id="container-raptor-audio" style="width:640px; height:380px"></div>
2829
</body>
2930
<script>
3031
// Creates a new spine player. The debugRender option enables
@@ -74,6 +75,17 @@
7475
});
7576
}
7677
});
78+
79+
// Creates a new spine player with audio enabled.
80+
new spine.SpinePlayer("container-raptor-audio", {
81+
jsonUrl: "assets/raptor-pro.json",
82+
atlasUrl: "assets/raptor-pma.atlas",
83+
audioFolderPath: "assets/audio",
84+
animation: "roar",
85+
premultipliedAlpha: true,
86+
backgroundColor: "#cccccc",
87+
showControls: true
88+
});
7789
</script>
7890
</body>
7991

0 commit comments

Comments
 (0)