World Labs
CLI client and local Playwright/Spark renderer for World Labs Marble 3D Gaussian-splat worlds.
Generates 3D Gaussian-splat worlds, collider meshes, and panoramas from an image or text prompt via the World Labs Marble API, logs credit spend, and renders local camera views or flythrough videos using Spark and Playwright.
git clone https://github.com/BestRoiMedia/bestroi-game-tools.gitWhy we built it
Inspecting .spz Gaussian splat worlds usually requires an interactive browser viewer. Pairing the API client with a headless Playwright + Spark renderer lets agents capture deterministic still angles and camera moves locally.
Architecture & how it works
worldlabs.py uploads media or submits text prompts to the Marble v1 API, logs every paid generation to a local JSONL call ledger, and downloads .spz/collider assets. render.mjs serves a local Three.js + Spark page in headless Chromium to capture views or MP4 flythroughs.
Key capabilities
- Image-to-world and text-to-world generation across Marble draft and production models
- Free asset re-fetching (fetch), PLY splat export (export --ply), and credit balance queries
- Mandatory per-call credit logging to a local JSONL call ledger
- Local headless .spz renderer (render.mjs) supporting multi-camera still shots and interpolated MP4 moves
Usage example
python3 worldlabs/worldlabs.py generate --image ./concept.png --out ./out/world --model marble-1.0-draft
node worldlabs/render.mjs --spz ./out/world/splats_500k.spz --out ./out/world/views --views "front:0,0,0:0,0,-3;left:-2,0,-1:0,0,-3"