lecodes-3d-editor
v0.1.0
Published
LeCodes Scene Editor — the visual .scene.ts editor (Vue components + a standalone host). Embedded by the platform frontend as raw source; hosted on local files by the lecodes CLI (`lecodes scene`), like lecodes-design.
Downloads
111
Readme
lecodes-3d-editor
The visual .scene.ts 3D scene editor (node tree | GL viewport | schema-driven inspector) as an
embeddable Vue component — the editor half of docs/scene-editor-plan.md. Package directory:
packages/scene-editor.
Standalone playground (no platform, no auth)
bun run dev # edits dev/demo (a sample scene + user aspect)
SCENE_DIR=/path/to/project bun run dev # edit any folder containing .scene.ts filesCompiles run in-process through the SDK pipeline (@letary/chisel, or LECODES_CHISEL_BIN for a
local chisel build), with the exact virtual-entry composition the platform backend uses
(sdk/compile → sceneEditorEntries), so behavior here matches production. File text is polled,
so editing the scene in your IDE re-runs the viewport.
Embedding
import { SceneEditor, type SceneSource } from "lecodes-3d-editor"The host supplies a SceneSource per scene file (reactive text(), write, edit-mode
compile(), project aspects()) — see src/types.ts. The platform frontend backs it with the
editor store + GET /api/projects/:uuid/scene/compile; this playground backs it with a local
folder. A future lecodes scene CLI command can reuse the same pieces (like lecodes-design).
Theme comes from the host's CSS variables (--bg, --surface, --border, --text, --dim,
--accent, …) with dark fallbacks baked in.
