Skip to content

Commit 1cbefff

Browse files
committed
📝 README
1 parent 0d36a14 commit 1cbefff

File tree

2 files changed

+54
-1
lines changed

2 files changed

+54
-1
lines changed

README.md

+54-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,54 @@
1-
# luma-splatting-for-babylonjs
1+
# Luma Splatting for Babylon.js
2+
3+
![screen shot](./docs/ss.png)
4+
5+
## About
6+
7+
A library to load LumaAI Gaussian Splatting into Babylon.js, like the [Luma Web Library](https://lumalabs.ai/luma-web-library).
8+
9+
## Environment
10+
11+
- Babylon.js 6.35.0
12+
- Node.js 18,20
13+
14+
## Install & Usage
15+
16+
For npm
17+
18+
```bash
19+
# install deps for npm
20+
npm install -D @babylonjs/core luma-splatting-for-babylonjs
21+
22+
# or for yarn
23+
yarn add -D @babylonjs/core luma-splatting-for-babylonjs
24+
25+
# or for pnpm
26+
pnpm add -D @babylonjs/core luma-splatting-for-babylonjs
27+
```
28+
29+
You can load and put the gaussian splatting data with code like below.
30+
31+
```ts
32+
import { Engine, Scene } from "@babylonjs/core";
33+
import { LumaGaussianSplatting } from "luma-splatting-for-babylonjs";
34+
35+
// ...
36+
37+
const engine = new Engine(renderCanvas);
38+
const scene = new Scene(engine);
39+
scene.createDefaultCameraOrLight(true, true, true);
40+
41+
// 1. Create LumaGaussianSplatting Object.
42+
// 2. Load splat data with UUID
43+
// and put the gaussian splatting into your scene.
44+
const uuid = "ca9ea966-ca24-4ec1-ab0f-af665cb546ff";
45+
const lumaSplat = new LumaGaussianSplatting("luma splat", scene);
46+
await lumaSplat.loadDataWithUuidAsync(uuid);
47+
48+
window.addEventListener("resize", () => engine.resize());
49+
engine.runRenderLoop(() => scene.render());
50+
```
51+
52+
## Author
53+
54+
[@drumath2237](https://twitter.com/ninisan_drumath)

docs/ss.png

2.49 MB
Loading

0 commit comments

Comments
 (0)