From 1fb6e88c00af5809ab57feae60fa53b15d52201a Mon Sep 17 00:00:00 2001 From: Piotr Jurczynski <619650+pjurczynski@users.noreply.github.com> Date: Tue, 20 Jan 2026 16:20:20 +0100 Subject: [PATCH] refactor: run lint fix --- src/loading2/utils.ts | 2 +- src/point-cloud-octree-picker.ts | 2 +- src/point-cloud-octree.ts | 3 +-- src/splats-mesh.ts | 11 +++++------ 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/loading2/utils.ts b/src/loading2/utils.ts index d5609fd9..1b9638e4 100644 --- a/src/loading2/utils.ts +++ b/src/loading2/utils.ts @@ -7,7 +7,7 @@ export function buildUrl(basePath: string, fileName: string): string { } export function appendBuffer(buffer1: any, buffer2: any) { - let tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); + const tmp = new Uint8Array(buffer1.byteLength + buffer2.byteLength); tmp.set(new Uint8Array(buffer1), 0); tmp.set(new Uint8Array(buffer2), buffer1.byteLength); return tmp.buffer; diff --git a/src/point-cloud-octree-picker.ts b/src/point-cloud-octree-picker.ts index 553076af..0ed332ed 100644 --- a/src/point-cloud-octree-picker.ts +++ b/src/point-cloud-octree-picker.ts @@ -225,7 +225,7 @@ export class PointCloudOctreePicker { pixels, ); renderer.setScissorTest(false); - renderer.setRenderTarget(null!); + renderer.setRenderTarget(null); return pixels; } diff --git a/src/point-cloud-octree.ts b/src/point-cloud-octree.ts index b25118e0..62981cca 100644 --- a/src/point-cloud-octree.ts +++ b/src/point-cloud-octree.ts @@ -1,6 +1,5 @@ import { Box3, - BufferGeometry, Camera, Mesh, Object3D, @@ -170,7 +169,7 @@ export class PointCloudOctree extends PointCloudTree { this.renderAsSplats = false; mesh.traverse((el) => { const m = el as Mesh; - const g = m.geometry as BufferGeometry; + const g = m.geometry; if (g.hasAttribute('COVARIANCE0')) { this.renderAsSplats = true; } diff --git a/src/splats-mesh.ts b/src/splats-mesh.ts index e47bf8d4..71c874ae 100644 --- a/src/splats-mesh.ts +++ b/src/splats-mesh.ts @@ -1,6 +1,5 @@ import { BufferAttribute, - BufferGeometry, Camera, DataTexture, DoubleSide, @@ -351,7 +350,7 @@ export class SplatsMesh extends Object3D { mesh.traverse((el) => { const m = el as Mesh; - const g = m.geometry as BufferGeometry; + const g = m.geometry; instanceCount += g.drawRange.count; }); @@ -375,7 +374,7 @@ export class SplatsMesh extends Object3D { mesh.traverseVisible((el) => { const m = el as Mesh; - const g = m.geometry as BufferGeometry; + const g = m.geometry; if (this.material) { if (m.name === 'r') { @@ -428,9 +427,9 @@ export class SplatsMesh extends Object3D { totalMemoryInDisplay = instanceCount * (this.harmonicsEnabled ? 236 : 56); if (this.debugMode) { - console.log('total memory in usage: ' + Math.ceil(totalMemoryUsed / 1000000) + ' MB'); - console.log('total memory displayed: ' + Math.ceil(totalMemoryInDisplay / 1000000) + ' MB'); - console.log('levels displayed: ' + nodesAsString); + console.log(`total memory in usage: ${Math.ceil(totalMemoryUsed / 1000000)} MB`); + console.log(`total memory displayed: ${Math.ceil(totalMemoryInDisplay / 1000000)} MB`); + console.log(`levels displayed: ${nodesAsString}`); } this.instanceCount = instanceCount;