Skip to content

Commit

Permalink
store colors
Browse files Browse the repository at this point in the history
encapsulate render data

editing test

remove redundant line

.

faster updates

remove double buffering

faster add/remove splats

refactor into objects

renaming

rename

render all objects

world transformations

checkpoint

refactor checkpoint

update examples checkpoint

data block driven

listen for add/remove

private renderer variables

object render updates

editor example refactor checkpoint

editor refactoring

specialized editor controls

.
  • Loading branch information
dylanebert committed Dec 10, 2023
1 parent 815e0a0 commit f226fab
Show file tree
Hide file tree
Showing 38 changed files with 2,569 additions and 489 deletions.
6 changes: 3 additions & 3 deletions examples/camera-updates/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ const progressIndicator = document.getElementById("progress-indicator") as HTMLP

const renderer = new SPLAT.WebGLRenderer(canvas);
const scene = new SPLAT.Scene();
const camera = new SPLAT.Camera();
const controls = new SPLAT.OrbitControls(camera, canvas);
const camera = scene.findObjectOfType(SPLAT.Camera) as SPLAT.Camera;
const controls = new SPLAT.OrbitControls(scene, canvas);

async function main() {
const url = "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k.splat";
Expand All @@ -20,7 +20,7 @@ async function main() {

const frame = () => {
controls.update();
renderer.render(scene, camera);
renderer.render(scene);

requestAnimationFrame(frame);
};
Expand Down
24 changes: 24 additions & 0 deletions examples/editor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
22 changes: 22 additions & 0 deletions examples/editor/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="style.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>gsplat.js - Editor Demo</title>
</head>
<body>
<div id="progress-container">
<dialog open id="progress-dialog">
<p>
<label for="progress-indicator">Loading scene...</label>
</p>
<progress max="100" id="progress-indicator"></progress>
</dialog>
</div>

<canvas id="canvas"></canvas>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit f226fab

Please sign in to comment.