mirror of
https://github.com/storytold/spark.git
synced 2026-10-14 23:52:59 +00:00
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:
committed by
GitHub
parent
0cfa39df76
commit
bf10efcab0
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user