fix all linter errors

This commit is contained in:
Maze Winther
2026-01-23 22:49:00 +01:00
parent cd0a8d020e
commit b5f305e4e7
20 changed files with 1942 additions and 1898 deletions
@@ -16,13 +16,14 @@ export class ImageNode extends BaseNode<ImageNodeParams> {
}
private async load() {
this.image = new Image();
const image = new Image();
this.image = image;
const url = URL.createObjectURL(this.params.file);
await new Promise<void>((resolve, reject) => {
this.image!.onload = () => resolve();
this.image!.onerror = () => reject(new Error("Image load failed"));
this.image!.src = url;
image.onload = () => resolve();
image.onerror = () => reject(new Error("Image load failed"));
image.src = url;
});
URL.revokeObjectURL(url);
@@ -25,17 +25,18 @@ export class StickerNode extends BaseNode<StickerNodeParams> {
}
private async load() {
this.image = new Image();
const image = new Image();
this.image = image;
const color = this.params.color
? `&color=${encodeURIComponent(this.params.color)}`
: "";
const url = `https://api.iconify.design/${this.params.iconName}.svg?width=200&height=200${color}`;
await new Promise<void>((resolve, reject) => {
this.image!.onload = () => resolve();
this.image!.onerror = () =>
image.onload = () => resolve();
image.onerror = () =>
reject(new Error(`Failed to load sticker: ${this.params.iconName}`));
this.image!.src = url;
image.src = url;
});
}
@@ -81,7 +81,7 @@ export class SceneExporter extends EventEmitter<SceneExporterEvents> {
target: new BufferTarget(),
});
const videoSource = new CanvasSource(this.renderer.canvas as any, {
const videoSource = new CanvasSource(this.renderer.canvas, {
codec: this.format === "webm" ? "vp9" : "avc",
bitrate: qualityMap[this.quality],
});