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
+4 -2
View File
@@ -1,4 +1,5 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
@@ -25,14 +26,15 @@
import * as THREE from "three";
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
import { Sky } from 'three/addons/objects/Sky.js';
import { SplatMesh, SparkRenderer } from "@sparkjsdev/spark";
import { SplatMesh } from "@sparkjsdev/spark";
import { getAssetFileURL } from "/examples/js/get-asset-url.js";
const scene = new THREE.Scene();
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
const camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.01, 1000);
camera.position.set(0, 1.5, -1.2);
const renderer = new THREE.WebGLRenderer();
renderer.setPixelRatio(window.devicePixelRatio);
renderer.setSize(window.innerWidth, window.innerHeight);
document.body.appendChild(renderer.domElement);