[ts] Fixed test-drawcalls asset paths.

This commit is contained in:
badlogic 2021-10-13 15:24:28 +02:00
parent 947da83533
commit 308da950df

View File

@ -21,7 +21,7 @@
info; info;
loadAssets(canvas) { loadAssets(canvas) {
this.numSkeletons = 100; this.numSkeletons = 400;
this.skeletons = []; this.skeletons = [];
this.states = []; this.states = [];
this.info = document.querySelector("#info")[0]; this.info = document.querySelector("#info")[0];
@ -92,13 +92,13 @@
renderer.drawSkeleton(skeleton, true); renderer.drawSkeleton(skeleton, true);
} }
renderer.end(); 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 // Create the Spine canvas which runs the app
new spine.SpineCanvas(document.getElementById("canvas"), { new spine.SpineCanvas(document.getElementById("canvas"), {
pathPrefix: "assets/", pathPrefix: "../example/assets/",
app: new App() app: new App()
}); });
</script> </script>