Update SplatLoader to handle progress updates, both for main file and any extra files, aggregating totals. Misc. improvements to examples. (#112)

This commit is contained in:
Andreas Sundquist
2025-07-11 17:09:38 -07:00
committed by GitHub
parent 0cfa39df76
commit bf10efcab0
13 changed files with 163 additions and 92 deletions
+3 -1
View File
@@ -1,4 +1,5 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
@@ -47,8 +48,9 @@
const NUM_ROBOTS = 5;
const robots = [];
const splatURL = await getAssetFileURL("robot-head.spz");
const packedSplats = new PackedSplats({ url: splatURL });
for (let i = 0; i < NUM_ROBOTS; i++) {
const robot = new SplatMesh({ url: splatURL });
const robot = new SplatMesh({ packedSplats });
robot.rotation.x = Math.PI;
robot.scale.setScalar(0.2);
robot.position.set(0, 0, i);