Skip to content

Commit

Permalink
📝 README
Browse files Browse the repository at this point in the history
  • Loading branch information
drumath2237 committed Dec 25, 2023
1 parent 0d36a14 commit 1cbefff
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
55 changes: 54 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,54 @@
# luma-splatting-for-babylonjs
# Luma Splatting for Babylon.js

![screen shot](./docs/ss.png)

## About

A library to load LumaAI Gaussian Splatting into Babylon.js, like the [Luma Web Library](https://lumalabs.ai/luma-web-library).

## Environment

- Babylon.js 6.35.0
- Node.js 18,20

## Install & Usage

For npm

```bash
# install deps for npm
npm install -D @babylonjs/core luma-splatting-for-babylonjs

# or for yarn
yarn add -D @babylonjs/core luma-splatting-for-babylonjs

# or for pnpm
pnpm add -D @babylonjs/core luma-splatting-for-babylonjs
```

You can load and put the gaussian splatting data with code like below.

```ts
import { Engine, Scene } from "@babylonjs/core";
import { LumaGaussianSplatting } from "luma-splatting-for-babylonjs";

// ...

const engine = new Engine(renderCanvas);
const scene = new Scene(engine);
scene.createDefaultCameraOrLight(true, true, true);

// 1. Create LumaGaussianSplatting Object.
// 2. Load splat data with UUID
// and put the gaussian splatting into your scene.
const uuid = "ca9ea966-ca24-4ec1-ab0f-af665cb546ff";
const lumaSplat = new LumaGaussianSplatting("luma splat", scene);
await lumaSplat.loadDataWithUuidAsync(uuid);

window.addEventListener("resize", () => engine.resize());
engine.runRenderLoop(() => scene.render());
```

## Author

[@drumath2237](https://twitter.com/ninisan_drumath)
Binary file added docs/ss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1cbefff

Please sign in to comment.