mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-20 17:26:01 +08:00
Show bounds in runtime when skeleton is in debug mode.
This commit is contained in:
parent
0620a9c841
commit
5773af096d
@ -249,6 +249,13 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase {
|
||||
renderer.setColor([0, 1, 0, 1]);
|
||||
renderer.convexPoly(this.circle(x1, y1, 2));
|
||||
}
|
||||
|
||||
// debug bounds
|
||||
renderer.setAlphaBlendMode();
|
||||
renderer.setColorFillMode();
|
||||
renderer.setColorRgba(0.25, 0, 0, 0.25);
|
||||
renderer.lineQuad(this.getBoundingQuad(false));
|
||||
renderer.line(this.x, this.y, this.x + this.propOffsetX, this.y + this.propOffsetY);
|
||||
}
|
||||
|
||||
private circle (x: number, y: number, radius: number) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user