mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[phaser] Display number of skeletons in batching test
This commit is contained in:
parent
bf0a33876a
commit
24995d28b4
@ -1,5 +1,6 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
@ -49,6 +50,7 @@
|
||||
const plugin = this.spine;
|
||||
let x = 25;
|
||||
let y = 60;
|
||||
let n = 0;
|
||||
for (let j = 0; j < 10; j++, y += 600 / 10) {
|
||||
for (let i = 0; i < 20; i++, x += 800 / 20) {
|
||||
const obj =
|
||||
@ -57,10 +59,12 @@
|
||||
: this.add.spine(x, y, "raptor-data", "raptor-atlas");
|
||||
obj.animationState.setAnimation(0, "walk", true);
|
||||
obj.scale = 0.1;
|
||||
n++;
|
||||
}
|
||||
x = 25;
|
||||
}
|
||||
debug = this.add.text(0, 600 - 40, "FPS: ");
|
||||
this.add.text(0, 600 - 60, "Skeletons: " + n);
|
||||
}
|
||||
|
||||
function update() {
|
||||
@ -72,4 +76,5 @@
|
||||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
||||
Loading…
x
Reference in New Issue
Block a user