mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
[ts] Fixed test-drawcalls asset paths.
This commit is contained in:
parent
947da83533
commit
308da950df
@ -21,7 +21,7 @@
|
||||
info;
|
||||
|
||||
loadAssets(canvas) {
|
||||
this.numSkeletons = 100;
|
||||
this.numSkeletons = 400;
|
||||
this.skeletons = [];
|
||||
this.states = [];
|
||||
this.info = document.querySelector("#info")[0];
|
||||
@ -45,7 +45,7 @@
|
||||
for (var i = 0; i < this.numSkeletons; i++) {
|
||||
let skeleton = new spine.Skeleton(skeletonData);
|
||||
|
||||
// Create the animation state
|
||||
// Create the animation state
|
||||
let state = new spine.AnimationState(stateData);
|
||||
state.setAnimation(0, "dance", true);
|
||||
|
||||
@ -92,13 +92,13 @@
|
||||
renderer.drawSkeleton(skeleton, true);
|
||||
}
|
||||
renderer.end();
|
||||
info.innerText = "Draw calls: " + renderer.batcher.drawCalls;
|
||||
info.innerText = "Draw calls: " + renderer.batcher.drawCalls + ", FPS: " + canvas.time.framesPerSecond.toFixed(0);
|
||||
}
|
||||
}
|
||||
|
||||
// Create the Spine canvas which runs the app
|
||||
new spine.SpineCanvas(document.getElementById("canvas"), {
|
||||
pathPrefix: "assets/",
|
||||
pathPrefix: "../example/assets/",
|
||||
app: new App()
|
||||
});
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user