You've already forked Nitro_Render_V3
mirror of
https://github.com/duckietm/Nitro_Render_V3.git
synced 2026-06-20 15:36:18 +00:00
🆙 Some minor mem tweaks
This commit is contained in:
+5
-2
@@ -283,6 +283,8 @@ export class FurnitureBadgeDisplayVisualization extends FurnitureAnimatedVisuali
|
||||
tempCtx.putImageData(patchData, 0, 0);
|
||||
|
||||
accCtx.drawImage(tempCanvas, frame.dims.left, frame.dims.top);
|
||||
tempCanvas.width = 0;
|
||||
tempCanvas.height = 0;
|
||||
|
||||
// Create a new canvas for this frame and create a texture from it
|
||||
const frameCanvas = document.createElement('canvas');
|
||||
@@ -299,6 +301,9 @@ export class FurnitureBadgeDisplayVisualization extends FurnitureAnimatedVisuali
|
||||
frameDelays.push(frame.delay || 10);
|
||||
}
|
||||
|
||||
accCanvas.width = 0;
|
||||
accCanvas.height = 0;
|
||||
|
||||
// Create AnimatedSprite with frame textures
|
||||
if(this._frameTextures.length > 1)
|
||||
{
|
||||
@@ -342,13 +347,11 @@ export class FurnitureBadgeDisplayVisualization extends FurnitureAnimatedVisuali
|
||||
tex.source.update();
|
||||
img.onload = null;
|
||||
img.onerror = null;
|
||||
img.src = '';
|
||||
};
|
||||
img.onerror = () =>
|
||||
{
|
||||
img.onload = null;
|
||||
img.onerror = null;
|
||||
img.src = '';
|
||||
};
|
||||
img.src = badgeUrl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user