Fix format
This commit is contained in:
parent
0a71099deb
commit
9cfb6910ff
10
src/debug.ts
10
src/debug.ts
|
|
@ -46,7 +46,6 @@ export class DebugCanvas {
|
|||
if (parent) {
|
||||
parent.appendChild(wrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
destroyCanvas(): void {
|
||||
|
|
@ -65,7 +64,7 @@ export class DebugCanvas {
|
|||
this.enabled ? this.createCanvas() : this.destroyCanvas();
|
||||
|
||||
// debug log
|
||||
console.info("[Debug canvas]", this.enabled ? "enabled": "disabled");
|
||||
console.info("[Debug canvas]", this.enabled ? "enabled" : "disabled");
|
||||
}
|
||||
|
||||
render(): void {
|
||||
|
|
@ -79,8 +78,8 @@ export class DebugCanvas {
|
|||
const { x: rotX, y: rotY, z: rotZ } = _skinViewer.camera.rotation;
|
||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||
|
||||
ctx.font = '14px serif';
|
||||
ctx.fillStyle = 'white';
|
||||
ctx.font = "14px serif";
|
||||
ctx.fillStyle = "white";
|
||||
|
||||
const items = [
|
||||
`x: ${x.toFixed(2)}`,
|
||||
|
|
@ -89,12 +88,11 @@ export class DebugCanvas {
|
|||
`rotX: ${rotX.toFixed(2)}`,
|
||||
`rotY: ${rotY.toFixed(2)}`,
|
||||
`rotZ: ${rotZ.toFixed(2)}`,
|
||||
]
|
||||
];
|
||||
|
||||
const spacing = 15;
|
||||
const offsetX = 15;
|
||||
const offsetY = 6;
|
||||
items.forEach((s, index) => ctx.fillText(s, offsetY, offsetX + spacing * index));
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue