Fix format

This commit is contained in:
Sean Boult 2021-09-27 12:36:22 +00:00 committed by GitHub
parent 0a71099deb
commit 9cfb6910ff
1 changed files with 63 additions and 65 deletions

View File

@ -46,7 +46,6 @@ export class DebugCanvas {
if (parent) {
parent.appendChild(wrapper);
}
}
destroyCanvas(): 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));
}
}