luma-splatting-for-babylonjs
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-beta.1 • Public • Published

Luma Splatting for Babylon.js

NPM Version Static Badge

https://github.com/drumath2237/luma-splatting-for-babylonjs/assets/11372210/271bfb8f-4a4f-4ce3-9660-676c1f7579e6

About

A library to load LumaAI Gaussian Splatting into Babylon.js, like the Luma Web Library.

screen shot

Environment

  • Babylon.js 7.23.0
  • Node.js 18,20

Install & Usage

For npm

# 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.

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

Versions

Current Tags

Version History

Package Sidebar

Install

npm i luma-splatting-for-babylonjs

Weekly Downloads

4

Version

1.0.0-beta.1

License

Apache-2.0

Unpacked Size

24.6 kB

Total Files

11

Last publish

Collaborators

  • drumath