### Install Vite and Initialize gsplat Project Source: https://github.com/huggingface/gsplat.js/blob/main/README.md This snippet demonstrates how to set up a new project using Vite with a vanilla TypeScript template and install gsplat.js. It requires Node.js and NPM to be installed. ```Bash npm create vite@latest gsplat -- --template vanilla-ts cd gsplat npm install npm run dev npm install --save gsplat ``` -------------------------------- ### Create a Basic gsplat.js Scene Source: https://github.com/huggingface/gsplat.js/blob/main/README.md This JavaScript code demonstrates how to create a basic 3D scene using gsplat.js. It initializes a scene, camera, renderer, and controls, then loads Gaussian Splatting data from a URL and sets up a rendering loop. This requires the gsplat.js library to be installed. ```JavaScript import * as SPLAT from "gsplat"; const scene = new SPLAT.Scene(); const camera = new SPLAT.Camera(); const renderer = new SPLAT.WebGLRenderer(); const controls = new SPLAT.OrbitControls(camera, renderer.canvas); async function main() { const url = "https://huggingface.co/datasets/dylanebert/3dgs/resolve/main/bonsai/bonsai-7k.splat"; await SPLAT.Loader.LoadAsync(url, scene, () => {}); const frame = () => { controls.update(); renderer.render(scene, camera); requestAnimationFrame(frame); }; requestAnimationFrame(frame); } main(); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.