API Reference Standard

Hand-authored notes (the notes/ overlay)

The hybrid API reference standard — generated signatures from source plus hand-authored notes injected from a separate _notes/ overlay tree. API Reference Standard The reference is hybrid : generates per file signature stubs from source; contributors add prose and examples in a separate overlay tree that the extractor injects below the marker. This page defines the standard both halves follow. How generation works The extractor walks each subsystem's JS source and writes plus a consumed by the viewers. The whole page is regenerated every run (signatures and the Notes & Examples section), so the 1700 reference files stay purely generated and can be rebuilt from scratch. Hand authored notes live outside the pages in and are injected on every run — so regenerating never clobbers your prose. Hand authored notes (the overlay) There are two ways to add notes — see in the repo for the full guide. Per page notes — (the reference path with the segment dropped). The file becomes the page's Notes & Examples body verbatim. Example: notes for live in . Use normal relative links here. Shared blocks — . Write a block once and apply it to many pages via globs (matched against the reference path, e.g. ). This is how common context is authored once instead of copied onto every page. Because a shared block lands on pages at varying depths, use docroot absolute links like (leading ). A page's composed notes are its per page overlay first, then every matching shared block. If nothing applies, a placeholder is shown. What a generated page contains File path and a Source link to the real file. The file level description (from a leading JSDoc, or leading comments). Classes with their methods (signature + JSDoc summary). Functions with parameters ( ), return ( ), and summary. Constants and re


API Reference Standard

JSDoc, or leading comments). Classes with their methods (signature + JSDoc summary). Functions with parameters ( ), return ( ), and summary. Constants and re exports . What contributors add (in the overlay) Each non trivial symbol should gain: Purpose — what it's for and when to use it (beyond the one line summary). Parameters — full sentences. Booleans: "If , do X; otherwise Y." Objects: describe each field. Returns — start with "The …" for objects ("The resolved trust profile."); booleans use " if …; otherwise." Raises/errors — what throws and when. Example — a short, runnable snippet with error handling where relevant. See also — related symbols/pages. Improve the source, improve the docs Because file descriptions and / come from JSDoc, the best way to improve a generated page is to add JSDoc to the source (upstream), then re run the extractor. Per the project's composition rule, fix documentation at the source rather than only in the generated Markdown. Formatting All symbols in , matching source casing. One page per source file; one H3 per symbol. Keep examples self contained and language tagged. See also Docs Style Guide Contribution Workflow


Diagram Guide

Diagram Guide
When to use a diagram
How to author
Conventions
Accessibility
Theming
Example
See also

How and when to use Mermaid diagrams so they live in Markdown, version with text, and render across all three viewers. Diagram Guide Diagrams help readers grasp complex flows faster. This project uses Mermaid so diagrams live in Markdown, are versioned with text, and render in all three viewers. When to use a diagram Architecture/component relationships. Sequences (boot, request flows, IPC). State machines and pipelines. Use a diagram to complement prose, not replace it. Always introduce a diagram with a sentence saying what it shows. How to author Use a fenced markdown mermaid sequenceDiagram participant App participant Kernel App Kernel: fs.write(path, data) Kernel App: ok / throws if capability denied ` See also Docs Style Guide Examples in use: Boot Sequence, Architecture Overview.


Contribution Workflow

Contribution Workflow
The loop
1. Edit Markdown
2. Regenerate derived artifacts
from C:\Coding\game\MD
3. Verify locally
4. Keep docs in sync with code
5. Review & publish
Suggested CI (optional)
See also

How to add or change documentation and keep it from drifting — docs as code: edit Markdown, run the tooling, verify locally, review. Contribution Workflow How to add or change documentation and keep it from drifting. Docs are treated as code: edited in Markdown, validated by tooling, and reviewed. The loop 1. Edit Markdown All docs live under . This is the single source of truth. Existing docs elsewhere ( , , , per component ) are read only references — don't edit them as part of docs work; fold needed content into . Add new curated pages to . Follow the Docs Style Guide and use . 2. Regenerate derived artifacts If the viewer's libs aren't vendored yet: 3. Verify locally Zero build viewer: → . Click through changed pages; confirm no "Page not found", search works, diagrams render. MkDocs (optional): — fails on broken links. Run the Writing Checklist. 4. Keep docs in sync with code When you change an API or user visible behavior, update the docs in the same change. Improve source JSDoc so the generated reference improves too (see API Reference Standard). Record notable doc changes in CHANGELOG.md (Keep a Changelog format). 5. Review & publish Have a second contributor proofread. The three viewers all read the same files, so a merged change is immediately reflected once artifacts are rebuilt and the site/app is served. Suggested CI (optional) A CI job can run, on every change touching : 1. (source hashes and detected exports are current). 2. (must exit 0 — all nav paths resolve). 3. (root discovery files are regenerated). 4. (the compact deployed viewer payload is current). 5. (API, crawler, URL, and wrapper contracts pass). 6. (no broken links). 7. A Markdown link checker and a style linter (e.g. Vale). See also Docs Style Guide Writing Checklist Diagram Guide


Docs Style Guide

Docs Style Guide
Voice and clarity
Inclusive language
Accessibility
Structure
Formatting conventions
Citing source
AI-readability
See also

How to write docs for this project so they are clear, consistent, accessible, and easy for both AI tools and humans to read. Docs Style Guide How to write docs for this project so they are clear, consistent, accessible, and easy for both AI tools and humans to read. Voice and clarity Active voice, present tense. "The kernel guards syscalls," not "syscalls are guarded by the kernel." One idea per sentence. Prefer short sentences and short paragraphs (3–5 sentences). Define terms on first use and add them to the Glossary. Be specific. Reference real file paths, functions, and symbols in . No filler. Every sentence should inform; cut marketing language. Inclusive language Use gender neutral terms ("they/them", "the user"). Avoid loaded metaphors. Prefer / and / . Avoid idioms that don't translate well. Accessibility Descriptive link text — link the thing, not "click here". Good: "see the Boot Sequence". Alt text on every image and diagram. No layout relative references ("above"/"below"/"on the right") — refer to sections by name. Meaningful headings in order (don't skip levels). Structure Every page should have: 1. An H1 title matching its purpose. 2. A one or two sentence intro stating what the page is and who it's for. 3. Body sections with descriptive H2/H3 headings. 4. At least one example where relevant. 5. A "See also" / next steps section with cross links. Use the skeletons in (overview, guide, tutorial, api entry). Formatting conventions Code font for files, functions, classes, symbols, and literal values: , , . Fenced code blocks with a language tag ( , ). Tables for option/parameter/field lists. Mermaid for diagrams (see Diagram Guide). Use relative links to other files so all three viewers resolve them. Citing source When you state how something works, point at


Docs Style Guide

diagrams (see Diagram Guide). Use relative links to other files so all three viewers resolve them. Citing source When you state how something works, point at the source: (Source: §4) or a file path. This keeps docs verifiable and makes drift obvious. AI readability Keep Markdown plain and standard (the zero build viewer has only a minimal fallback parser). Prefer explicit tables and lists over prose for structured data. Put the most important information first. See also Writing Checklist Page Templates API Reference Standard


Page Templates

Page Templates
When to use which
Overview skeleton
<Subsystem> Overview
What it provides
Module map
Next steps
Guide skeleton
<Task>
Prerequisites
Steps
Verify
See also
API entry skeleton
functionName(param1, param2)
See also

Copy-paste skeletons for new pages (overview, guide, reference, explanation) and guidance on when to use each. Page Templates Copy paste skeletons for new pages. The full files live in ; this page explains when to use each and shows the shape. When to use which Template Use for A subsystem or major area landing page (what/who, module map). A task based how to (prerequisites → steps → verify). A longer, end to end learning path with a concrete goal. A hand written reference entry (most reference is auto generated). Overview skeleton Guide skeleton API entry skeleton js // runnable example See also Docs Style Guide API Reference Standard


Writing Checklist

Writing Checklist
Audience & scope
Structure & navigation
Content quality
Required sections (by page type)
Examples
Diagrams
Accessibility & style
Build verification
Review

A pre-merge checklist that operationalizes the Docs Style Guide — audience and scope, structure, navigation, links, and accuracy. Writing Checklist Run through this before merging any documentation change. It operationalizes the Docs Style Guide. Audience & scope [ ] The intro states what the page is and who it's for. [ ] The page is in the correct section and appears in (or an auto generated reference index). Structure & navigation [ ] Single H1; headings are ordered and meaningful. [ ] Cross links to related pages; a "See also" / next steps section exists. [ ] Internal links use relative paths and resolve in the viewer. Content quality [ ] Active voice, short sentences, short paragraphs. [ ] New terms are defined and added to the Glossary. [ ] Claims about behavior cite a source file/section. Required sections (by page type) [ ] Overview: what/who, module map, next steps. [ ] Guide/how to: prerequisites, numbered steps, at least one example. [ ] Reference entry: description, parameters, returns, errors, example. See API Reference Standard. Examples [ ] At least one code/command example where relevant. [ ] Examples are runnable/accurate and tagged with a language. Diagrams [ ] Mermaid diagrams render; each has surrounding explanatory text and alt text equivalent context. Accessibility & style [ ] Descriptive link text (no "click here"). [ ] No layout relative references ("above"/"below"). [ ] Inclusive, neutral language. Build verification [ ] passes (search index builds; nav paths resolve). [ ] regenerated root discovery files. [ ] passes API, crawler, and wrapper contracts. [ ] If you touched the API reference, ran and external overlays under were reinjected below . [ ] (If using MkDocs) has no broken link errors. Review [ ] A second contributor proofread the change.


Editor Architecture

Editor Architecture
Structure
Key pieces
Integration points
See also

How the editor is organized — the EditorApp single-page app orchestrating viewport, panels, and project state on the engine. Editor Architecture How the editor is organized. The editor is a single page application whose orchestrates the viewport, panels, and project state on top of the engine. Structure Key pieces — the central application object. It wires panels, the viewport, project lifecycle, and editor modules together. (It is the largest file in the editor; treat the generated API reference as the index of its surface.) — boots the editor and constructs . + — the project/filesystem abstraction the OS later generalizes into its storage layer. — renders the editable scene using the engine's renderer and VGPU. — dockable UI panels (hierarchy, inspector, asset tools). These are the panels Plauna can enhance. — transform and manipulation handles in the viewport. — entity templates that can be placed into a scene. — discrete feature modules. — offloaded work via Web Workers. — editor visual themes. Integration points Bootstrap: brings up the engine and exposes Plauna as . Plauna enhancement: existing panels are passed to for hybrid DOM/GPU upgrades, sharing the editor's VGPU. As an OS app: the editor is one of the userland apps the OS re wraps as a Plauna panel (Source: ). See also Plauna Architecture — the panel/surface system the editor feeds into. Editor API Reference — per file symbols from .


Editor Getting Started

Editor Getting Started
Launch
then browse to:
http://127.0.0.1:9001/editor/
Orientation
Extending the editor
See also

Launch the editor in a browser and learn where the viewport, panels, and project files live. Editor Getting Started Open the editor and learn where things live. Assumes Install & Run is done. Launch The page ( ) loads , which constructs and mounts the viewport and panels. Orientation You want to… Look at Understand the app shell Add/modify a panel Work on the 3D viewport Add a placeable entity Manipulate transforms Handle projects/files , Author materials Extending the editor New features are typically added as modules ( ) or panels ( ). For hybrid DOM/GPU panel upgrades, enhance panels via Plauna ( ). See Plauna Getting Started. See also Editor Architecture. Editor API Reference (run ).


Editor

Editor
In this section
Module map
Related

Section index for the editor — scene and asset authoring IDE built on the engine (overview, architecture, getting started, API reference). Editor Scene and asset authoring IDE built on the engine. Source: . In this section Overview — what the editor is and its layout. Architecture — orchestration and integration points. Getting Started — launch and orientation. API Reference — per file symbols from (browse ). Module map Related Plauna — the UI framework that enhances editor panels. Engine — the runtime the editor renders with.


Editor Overview

Editor Overview
What it provides
Audience
Layout
Relationship to the engine and Plauna
Next steps

The scene and asset authoring IDE built on the engine — viewport, dockable panels, project filesystem, gizmos, and material authoring. Editor Overview The editor ( ) is the scene and asset authoring IDE built on the engine. It was the first major application on top of the runtime and established the panel/workbench and project filesystem patterns that Plauna and the OS later generalized. What it provides A viewport for editing scenes against the engine's renderer. Dockable panels (inspector, hierarchy, asset/material tools). A project/filesystem abstraction ( ). Gizmos, spawnables, and material authoring. Audience Content creators authoring scenes/assets, and tools developers extending the editor. Layout Path Purpose The editor shell page. Entry point. The main application class (large; orchestrates panels, viewport, project). Project / filesystem abstraction. UI components. Dockable editor panels. The 3D viewport. Transform/manipulation gizmos. Spawnable entity definitions. Feature modules. Project data/handling. Editor theming. Utilities. Web workers. Materials. Relationship to the engine and Plauna The editor bootstraps through . Plauna can enhance existing editor panels without replacing them ( ), sharing the same VGPU instance and ECS patterns. See Plauna Overview. Next steps Editor Architecture. Editor Getting Started. Editor API Reference — generated from by .


EditorApp.js

EditorApp.js
Classes
class EditorApp
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorApp Main application controller (Modular) Uses lazy loading for heavy modules to improve initial load time Classes Method Signature Summary Initialize editor Record transform change (called by viewport gizmo) Save current scene to file Load scene from file List all scenes in project Create new empty scene Delete scene file Export project for runtime Initialize auto save system Mark scene as dirty (has unsaved changes) Show/update/hide the play mode compile overlay. Yield to event loop so overlay paints Enter play mode Toggle pause Exit play mode Update timeline UI with current simulation time Add delta time to simulation time (called from viewport loop) Calculate adaptive history interval based on max object velocity Fast objects = more frequent snapshots for smoother scrubbing Record current state to history with delta compression Compress snapshot quantize floats with delta+entropy residuals for lossless reconstruction Compute delta residuals between original and quantized values Returns entropy encoded residuals for lossless reconstruction Entropy encode residuals using run length encoding for zeros Uses 0x7FFFFFFF marker to avoid collision with actual values Decode entropy encoded residuals Quantize array of floats to integers Dequantize integers back to floats with optional residual correction Compute delta between two snapshots (only store changes) with residual encoding Reconstruct full snapshot at given index by applying deltas from nearest keyframe Uses caching during scrubbing to avoid redundant reconstruction Estimate timeline memory usage (compressed) Get particle snapshot memory stats Get comprehensive memory stats including off heap storage Seek to a specific


EditorApp.js

Estimate timeline memory usage (compressed) Get particle snapshot memory stats Get comprehensive memory stats including off heap storage Seek to a specific time in history with smooth interpolation Restore a decompressed snapshot to ECS Interpolate between two snapshots for smooth timeline scrubbing Uses scratch arrays to avoid GC pressure during fast scrubbing Spherical linear interpolation for quaternions (allocating version) Slerp quaternions into existing array (zero allocation version) Sync PhysX bodies with current ECS state after scrubbing Setup timeline interactivity (click/drag to scrub) Initialize physics world directly (like stick2) Update spatial index for an entity (call when entity moves) Refresh entities sharing an animated mesh at most once per renderer bounds revision. Rebuild entire spatial index (call after scene load or many changes) Find entities near a point Raycast to find entity (for click selection) Get visible entities (frustum culled) Smoothly move camera to target position Update camera tween (call in render loop) Create Plauna root container if it doesn't exist Focus camera on one entity using its collider or rendered mesh bounds. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


ProjectManager.js

ProjectManager.js
Classes
class ProjectManager
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ProjectManager Handles project folder selection and initialization Classes Method Signature Summary Show directory picker and select project folder Initialize project check if valid, create structure if new Create folder structure for new project <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioEditorPanel.js

createAudioEditorPanel(parentContainer, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioEditorPanel.js Main Audio Editor Panel Composes NodeGraph + Palette + Inspector + Materials + PreviewControls into a single editor tab panel for the engine editor. Functions Create the audio editor panel. Parameters: (HTMLElement) — DOM element to mount into (Object) — No description in source JSDoc. (AudioContext) — Existing AudioContext (optional) Returns: Panel instance Destroy the audio editor panel. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioMotionTimeline.js

createAudioMotionTimeline(container, callbacks = {})

setMotionPatch(timeline, motionData, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioMotionTimeline.js Sound motion/automation timeline for Audio Editor V1 feature set: Per parameter tracks (nodeId + param) Keyframe authoring (time, value, easing) Loop + duration + playhead scrubbing Runtime evaluation using AnimationTrack Functions <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioNodeGraph.js

createAudioNodeGraph(container, callbacks = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioNodeGraph.js Canvas Based Node Graph Editor Draggable nodes, wire connections (audio=thick, control=thin/dashed), zoom/pan, selection, and serialization to/from patch JSON. Functions Create an audio node graph editor. Parameters: (HTMLElement) — DOM element to mount into (Object) — { onNodeSelected, onPatchChanged, onWireChanged } Returns: Graph editor instance Add a node to the graph. Parameters: (Object) — No description in source JSDoc. (string) — Node type name (number) — X position (number) — Y position (Object) — Initial parameter overrides Returns: Node ID Remove a node and its wires. Parameters: (Object) — No description in source JSDoc. (string) — No description in source JSDoc. Add a wire between two ports. Parameters: (Object) — No description in source JSDoc. (string) — "nodeId:portName" (string) — "nodeId:portName" Remove a wire. Parameters: (Object) — No description in source JSDoc. (string) — No description in source JSDoc. (string) — No description in source JSDoc. Duplicate a node (offset position by 20,20). Parameters: (Object) — No description in source JSDoc. (string) — No description in source JSDoc. Returns: New node ID Disconnect all wires from a node. Parameters: (Object) — No description in source JSDoc. (string) — No description in source JSDoc. Fit view to show all nodes. Parameters: (Object) — No description in source JSDoc. Register available node types. Parameters: (Object) — No description in source JSDoc. (Map) — Map of type → { inputs, outputs, params } Select a node. Parameters: (Object) — No description in source JSDoc. (string null) — No description in source JSDoc. Import patch JSON into graph. Parameters: (Object) — No description in


components/AudioNodeGraph.js

— No description in source JSDoc. (string null) — No description in source JSDoc. Import patch JSON into graph. Parameters: (Object) — No description in source JSDoc. (Object) — No description in source JSDoc. Render the entire graph. Parameters: (Object) — No description in source JSDoc. Start the animation loop for live waveform + wire animation. Parameters: (Object) — No description in source JSDoc. Stop animation loop. Parameters: (Object) — No description in source JSDoc. Set per node analyser taps for live waveform display. Parameters: (Object) — No description in source JSDoc. (Map) — nodeId → AnalyserNode Set an external container for the minimap (rendered separately from the main canvas). Parameters: (Object) — No description in source JSDoc. (HTMLElement) — No description in source JSDoc. Destroy the graph editor. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioNodeInspector.js

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioNodeInspector.js Right Panel for Selected Node Parameters Shows parameter knobs/sliders for the selected node. Uses SoundSchema when available for rich typed controls. Falls back to PARAM HINTS for legacy/unschemaed node types. Functions Create the node inspector panel. Parameters: (HTMLElement) — No description in source JSDoc. (Function) — Callback(nodeId, paramName, value) Update the inspector to show a node's parameters. Parameters: (Object) — No description in source JSDoc. (Object null) — Graph node or null Destroy the inspector. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioNodePalette.js

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioNodePalette.js Side Panel with Node Types Lists all available node types grouped by category. Supports drag to create from palette onto the graph canvas. Functions Create the node palette panel. Parameters: (HTMLElement) — DOM element to mount into (Function) — Callback(nodeType) when drag starts Returns: Palette instance Destroy the palette. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioPatchEditor.js

createAudioPatchEditor(container, callbacks = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioPatchEditor.js Live Material Patch Editor for Sound Studio Reads real substance audio definitions from the SubstanceRegistry and lets you tweak them on the spot. Changes feed into the ProceduralPatches runtime override system. Edits persist with scene. Layout: Material list (compact cards) + Dedicated param panel below. Functions <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioPresetBrowser.js

createAudioPresetBrowser(container, callbacks = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioPresetBrowser.js Load/Save/Browse Patch Presets Browse built in presets per substance, load/save patches as JSON. Functions Get a preset patch by name. Parameters: (string) — No description in source JSDoc. Returns: Patch JSON or null Create the preset browser panel. Parameters: (HTMLElement) — No description in source JSDoc. (Object) — { onPresetLoad, onPresetSave } Destroy the preset browser. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioPreviewControls.js

createAudioPreviewControls(container, callbacks = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioPreviewControls.js Professional Transport Bar Play/Pause/Stop with icons, elapsed time display, wave shape selector, volume control with arc knob, and waveform quick switch. Functions Create the transport controls bar. Parameters: (HTMLElement) — No description in source JSDoc. (Object) — { onPlay, onStop, onPause, onVolumeChange, onWaveSelect } Set playing state externally. Parameters: (Object) — No description in source JSDoc. (boolean) — No description in source JSDoc. Destroy preview controls. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/AudioSignalAnalyzer.js

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AudioSignalAnalyzer.js Professional Signal Analysis Panel Full width bottom panel with switchable visualization modes: Oscilloscope (time domain waveform) Spectrum Analyzer (FFT frequency bars, log scale) Spectrogram (scrolling waterfall) Plus stereo VU/peak meter and freeze capability. Functions Create the signal analyzer panel. Parameters: (HTMLElement) — No description in source JSDoc. Returns: Analyzer instance Connect an AnalyserNode for visualization. Parameters: (Object) — No description in source JSDoc. (AnalyserNode) — No description in source JSDoc. Disconnect and stop rendering. Parameters: (Object) — No description in source JSDoc. Destroy the analyzer. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/CollabPanel.js

components/CollabPanel.js
Classes
class CollabPanel
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: CollabPanel.js Collaboration sidebar panel for the editor. Classes Method Signature Summary <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/GraphPersistenceContracts.js

class UnsupportedGraphVersionError extends Error

prepareMaterialGraphDocument(input, { allowedNodeTypes = null } = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Classes Method Signature Summary Functions Normalize legacy audio patches and validate the full candidate before use. Normalize legacy material graphs and reject dangling connections/future schemas. Constants <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/MaterialNodeGraph.js

createNodeGraph(container, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: MaterialNodeGraph.js Canvas based node graph editor for materials Features: pan/zoom, node drag, port connections, context menu to add nodes, node deletion, bezier connection rendering, port type coloring. Functions Standalone evaluator for raw graph data (no canvas UI needed). Used by headless preview animation. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/MaterialNodePresets.js

components/MaterialNodePresets.js
Functions
getPresetGraph(materialId)
hasPresetGraph(materialId)
listPresetIds()
listSubstancePresetIds()
listAnimatedPresetIds()
Constants
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: MaterialNodePresets.js Pre built node graph recipes for all built in materials Each preset is a valid node graph using only standard MaterialNodeTypes nodes. These serve as demos showing users how to wire nodes to create materials. Graph structure: { nodes: [...], connections: [...], view: { panX, panY, zoom } } Node: { id, type, x, y, params } Connection: { fromNode, fromPort, toNode, toPort } Functions Get the preset node graph for a built in material. Parameters: (string) — No description in source JSDoc. Returns: Graph data { nodes, connections, view } or null Check if a material has a preset graph. Parameters: (string) — No description in source JSDoc. List all material IDs that have preset graphs. Get all substance linked preset IDs. Get all animated effect preset IDs (lava, water, hologram, etc.). Constants <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/MaterialNodeTypes.js

components/MaterialNodeTypes.js
Functions
defaultForType(type)
Constants
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: MaterialNodeTypes.js Node type definitions for the material graph editor Modeled after Substance Designer / Material Maker / Unreal Material Editor. Each node type defines inputs, outputs, defaults, and an evaluate function. Port types: 'float', 'vec2', 'vec3', 'vec4', 'color', 'texture' Functions Constants <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/MaterialPanel.js

createMaterialPanel(container, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: MaterialPanel.js Material Studio Panel Composes Library + PBR Inspector + 3D Preview into an overlay panel. Follows the Sound Studio (AudioEditorPanel.js) architecture. Functions Create the material panel contents inside the overlay body. Parameters: (HTMLElement) — material studio body element (Object) — No description in source JSDoc. (Object) — MaterialLibrary instance (Object) — TextureManager instance (Object) — Editor reference for entity assignment Returns: Panel instance Destroy the material panel. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/MaterialPatchGraphs.js

components/MaterialPatchGraphs.js
Functions
getMaterialGraph(substanceId)
Constants
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: MaterialPatchGraphs.js High level node graph representations for ProceduralPatches.js These graphs provide design facing topology for each material family. They intentionally summarize synthesis layers so editor UX stays readable even when runtime patches contain deeper stochastic/detail layers. Functions Get the node graph for a substance. Returns a deep copy so edits don't mutate the template. Parameters: (string) — No description in source JSDoc. Returns: Patch graph or null Constants — Maps substance IDs to editor facing graph representations. Graphs are intentionally compact abstractions of runtime synthesis. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/MaterialStrip.js

createMaterialStrip(container, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: MaterialStrip.js Compact material browser for bottom panel Horizontal scrollable strip of material thumbnails with preview sidebar. Designed to sit in the bottom panel alongside Console. Functions <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/ParticleEffectControls.js

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ParticleEffectControls.js Editor UI Controls for Custom Particle Effects Adds controls to the particle emitter inspector panel: Checkbox to enable custom effects Effect selector dropdown Edit button to open shader editor Parameter sliders for effect params Classes Method Signature Summary Initialize the controls Render controls into a container Render the controls UI Render effect options for dropdown Render parameter controls for an effect Convert vec3 to hex color Convert hex to vec3 Add styles Setup event listeners Update effect selector dropdown Open shader editor Create new effect Clone current effect Export current effect Import effect from file Notify parent of changes Get current emitter data Update emitter data Destroy controls Functions Create particle effect controls <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


components/ShaderCodeEditor.js

openShaderCodeEditor(effect, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ShaderCodeEditor.js In Editor WGSL Code Editor Popup A notepad style popup for editing custom particle effect shaders. Features: Syntax highlighting for WGSL Real time validation Live preview Template snippets Error display with line numbers Classes Method Signature Summary Open the editor with an effect Close the editor Check if editor is open Create the editor UI Add CSS styles Setup event listeners Switch between tabs Handle text input Handle special keys Toggle comment on current line Duplicate current line Sync scroll between textarea and highlight layer Update line numbers Update syntax highlighting Load a preset Insert a code snippet Validate the effect Save the effect Destroy the editor Functions Create and open a shader code editor <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


loader-guard.js

loader-guard.js
Exports
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Keep the loading veil's context menu suppression CSP safe and scoped to the short interval in which the veil can actually receive pointer input. Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


main.js

main.js
Exports
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Main entry point for Game Editor Exports No ES module exports detected in this file. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/ColliderGenerators.js

generateCollidersFromSDF(sdfFunc, bounds, resolution = 10, options = {})

generateConvexMeshFromSDF(sdfFunc, bounds, resolution = 16)

generateHollowTorusColliders(majorRadius, minorRadius, wallThickness, resolution = 12)

generateHollowConeColliders(angle, height, wallThickness, resolution = 12)

generateLineColliders(start, end, radius, resolution = 10)

generateCurveColliders(points, radius, resolution = 10, segments = 20)

generateCollidersFromNetwork(network, resolution = 8)

generatePipeNetworkColliders(nodes, connections, resolution = 8)

generateBezierColliders(p0, p1, p2, p3, radius, resolution = 10)

generateSplineColliders(controlPoints, radius, resolution = 10)

testSphereAABB(center, radius, aabbMin, aabbMax)

generateNoisyColliders(baseSdf, bounds, options = {})

generateRockySphereColliders(center, radius, roughness = 0.15, resolution = 12)

generateTerrainColliders(sizeX, sizeZ, height, resolution = 8, seed = 0)

generateCaveColliders(bounds, tunnelRadius = 1.5, resolution = 6, seed = 0)

addToSpatialHash(id, colliders, worldPosition = [0, 0, 0])

computeBounce(velocity, normal, restitution = 0.5)

applyFriction(velocity, normal, friction, dt)

predictLanding(start, velocity, gravity = 9.81)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ColliderGenerators.js Procedural collider generation utilities Extracted from EditorPhysics.js for modularity Includes: SDF based collider generation with anti aliasing Line/curve to voxel colliders Network based colliders (trees, tunnels, pipes) Noise based procedural colliders Spatial hash for collider queries Functions Generate colliders from ANY SDF function with anti aliasing Generate a CONVEX MESH collider from SDF Generate hollow torus colliders Generate hollow cone/funnel colliders Generate voxel colliders along a line segment Generate voxel colliders along a curve Generate colliders from a LineNetwork Generate tree shaped colliders Generate root system colliders Generate tunnel/cave colliders Generate custom pipe/beam network colliders Generate colliders along a cubic Bezier curve Generate colliders along a Bezier spline Generate rocky/organic colliders using noise displaced SDF Generate rocky sphere collider Generate terrain chunk collider Generate cave/hollow rock colliders Re exports <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/CollisionDebugOverlay.js

modules/CollisionDebugOverlay.js
Functions
createCollisionDebugPanel(editor)
toggleCollisionDebugOverlay(editor)
dumpCollisionInfo(editor)
checkCollisionConflicts(editor)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: CollisionDebugOverlay.js Visual debug overlay for collision layers and modes Displays collision layer, mask, and mode information for selected entities and optionally renders debug visualizations for collision relationships. Functions Create collision debug overlay panel Toggle collision debug overlay Get collision debug info for all entities (for console debugging) Check for collision layer conflicts (entities that should collide but don't) <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorAI.js

updateNavGridFromColliders(colliders, walkable = false)

getPathSteering(currentPos, waypoints, lookahead = 1.0)

createChaseFleeBehavior(chaseRadius = 10, fleeHealth = 20)

canSee(perception, position, forward, targetPos)

canHear(perception, position, soundPos, soundVolume = 1)

updateAIPerception(perception, position, forward, entities, dt)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorAI.js AI, Navigation, Steering, and Behavior Trees for Editor Extracted from EditorPhysics.js for modularity Functions Initialize or get the editor's navigation grid Parameters: (Object) — Grid options Returns: Navigation grid Find a path between two world positions Mark cells as blocked/walkable based on colliders Smooth a path using string pulling Get steering direction to follow a path Debug: visualize nav grid walkability Create an AI agent with steering behaviors Update AI agent with combined steering behaviors Create a flock of AI agents Update entire flock with flocking behavior Create a simple patrol behavior tree Create a chase/flee behavior tree Run a behavior tree tick Create an AI perception component Check if an entity can see a target Check if an entity can hear a sound Update perception detect nearby entities Get last known position of an entity Re exports , , , , , , , , , , , , , , , , , , <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorAudio.js

modules/EditorAudio.js
Functions
async startSimAudio(editor)
stopSimAudio()
pauseSimAudio()
async resumeSimAudio()
tickSimAudio(dt)
destroySimAudio()
getSimAudioEngine()
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorAudio.js Simulation Audio Bridge for the Editor Manages the runtime AudioEngine lifecycle during play mode: Initializes AudioEngine on first play Ticks audio each frame while playing Stops all sim audio on stop/pause Bridges substance emitters → procedural audio Functions Called when user enters play mode. Initializes engine if needed and starts audio. Parameters: (Object) — EditorApp instance Called when user exits play mode (Stop). Stops all active sources with a short fade. Called when user pauses. Suspends the AudioContext (freezes all audio in place). Called when user resumes from pause. Tick the audio engine. Call once per frame while playing. Parameters: (number) — Frame delta in seconds Full cleanup. Call on editor close. Get the current engine instance (for external integration). <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorAudioFX.js

modules/EditorAudioFX.js
Constants
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorAudioFX.js Procedural Editor Sound Effects All sounds are synthesized with Web Audio API oscillators & noise — no sample files. Provides: loading ambient pad, play/stop/pause chimes, UI clicks, error beeps. Usage: import { editorAudioFX } from './EditorAudioFX.js'; editorAudioFX.init(); // call once after first user gesture editorAudioFX.playChime(); // play mode enter editorAudioFX.stopChime(); // play mode exit editorAudioFX.pauseClick(); // pause toggle editorAudioFX.uiClick(); // generic button click editorAudioFX.uiHover(); // hover over interactive element editorAudioFX.errorBeep(); // error / invalid action editorAudioFX.startLoadingAmbient(); // loading screen ambient pad editorAudioFX.stopLoadingAmbient(); // fade out loading pad Constants <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorCollab.js

hostRoom(editor, roomId, wordKey, numberKey)

setCollabRoom(editor, roomId, wordKey, numberKey, hostId, hostFingerprint)

encodeInviteCode(roomId, wordKey, numberKey, hostId, hostFingerprint)

buildEditorCollabCompositeId(roomId, wordKey, numberKey, hostId)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorCollab.js Editor side integration for the collab system. Mounts onto EditorApp and wires all hooks. Hooks wired: EditorHistory.pushAction → broadcast op to peers ProjectStorage.saveProject → broadcast snapshot PrefabLibrary.save/delete → broadcast prefab ops Viewport render loop → presence tick at 10 Hz EditorApp.enterPlayMode → broadcast play sync EditorApp.togglePause → broadcast pause sync EditorApp.exitPlayMode → broadcast stop sync Functions Initialize the collab system and attach it to the editor. Called from EditorApp.initialize() at the end. Destroy the collab system and remove all hooks. Get the current collab state from the editor. Get Hermite interpolated camera for a remote peer (smooth, per frame). Returns { pos: [x,y,z], target: [x,y,z] } or null. Get collab camera interpolation + connection stats for UI display. Get message router stats for bandwidth monitoring. Returns { sent, dropped, coalesced, bytesSent, backpressureFrames, rateMultiplier } Get the current adaptive interpolation delay (ms). On LAN: 20ms. On jittery connections: up to 150ms. Auto adjusts each frame. Called from Viewport render loop to send presence at 10 Hz. Export local timeline as JSON download. Notify collab that local user started grabbing an entity (play mode). Claims per entity ownership at GRABBED priority so our transforms are authoritative. Notify collab that local user released a grabbed entity. Releases per entity ownership so default authority resumes. Claim ownership of an entity at SELECTED priority (inspector editing). Release ownership of an entity (selected or grabbed). Get the current owner of an entity. Returns { ownerId, priority } or null. Check if the local peer owns


modules/EditorCollab.js

Release ownership of an entity (selected or grabbed). Get the current owner of an entity. Returns { ownerId, priority } or null. Check if the local peer owns an entity. Get map of entityId → color hex for entities being grabbed by remote peers. Used by Viewport to render grab glow. Returns true if this peer is the physics authority during play mode. Non authority peers should skip local physics stepping and instead receive transforms from the authority. Interpolate buffered remote transforms. Call every render frame on non authority peers. Smoothly tweens entity positions between received keyframes with a 100ms render delay. Host a room. Auto generates word key and number key if not provided. Starts signaling so peers can discover this host. Join a room with dual key authentication (all 3 must match the host). Legacy alias: setCollabRoomId calls this. Toggle anonymous mode. Must be called BEFORE hostRoom/joinRoom. When enabled: Peers get random anonymous IDs (different each session) Real peer IDs are stripped from all ops TURN only relay hides IP addresses Garlic encryption prevents relay from reading message content Parameters: (Object) — No description in source JSDoc. (boolean) — No description in source JSDoc. Leave the current room. Stops signaling and clears peer state. Does NOT destroy the collab system — user can Host/Join again. Generate a random word key (two words joined by a dash). 120 words × 120 words = 14,400 combinations per word pair. Generate a random 6 digit number key. 900,000 combinations (100000 999999). Total key space with words: 120×120×900000 ≈ 12.96 billion combinations. Encode room credentials into a single invite code string. Format: PE <base64url(roomId § wordKey § numberKey § hostId § hostFingerprint) The hostFingerprint (16 hex chars)


modules/EditorCollab.js

credentials into a single invite code string. Format: PE <base64url(roomId § wordKey § numberKey § hostId § hostFingerprint) The hostFingerprint (16 hex chars) allows joiners to verify host identity. Returns: invite code Decode an invite code back to { roomId, wordKey, numberKey, hostId, hostFingerprint }. Returns null if the code is invalid. Toggle auto moderation (auto kick, mute, throttle from integrity violations). Only the host can enable/disable. Off by default. Returns: new state Kick a peer from the room. Only the host (first connected) should call this. Broadcasts a kick op, then the kicked peer clears its stored credentials. Get saved room credentials from localStorage. Returns: null} Clear saved room


modules/EditorGuide.js

modules/EditorGuide.js
Functions
show(sectionId)
hide()
toggle()
isVisible()
checkFirstLaunch()
checkHashLink()
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorGuide.js — Fullscreen interactive guide overlay Future proof feature list: ARIA accessibility (role=dialog, aria modal, focus trap) Keyboard nav (Arrow keys sidebar, Tab sections, ? global shortcut) Search / filter across all section text localStorage progress tracking with completion badges First launch auto show Guide versioning — "what's new" badge on updates Deep linking via URL hash ( guide camera) Scroll progress bar Reading time estimates per section Interactive demo placeholder canvases (ready for engine runtime) Print friendly CSS (@media print) Functions <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorHistory.js

recordTransform(entityId, beforePos, beforeRot, beforeScale, afterPos, afterRot, afterScale)

recordProperty(entityId, componentName, propertyName, beforeValue, afterValue)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorHistory Undo/Redo System with Clipboard Support Action types: transform: Entity position/rotation/scale change create: Entity creation delete: Entity deletion delete multi: Multiple entity deletion property: Component property change model animation: Imported model clip/playback state change model morph weights: Imported model morph ownership/weight change rename: Entity rename reparent: Entity moved to different folder paste: Paste operation (multiple entities) folder create: Folder creation folder delete: Folder deletion folder rename: Folder rename component add: Component added to entity component remove: Component removed from entity selection: Selection change (for group operations) Memory optimizations: Transform actions use quantized floats (0.001 precision for position) Batches rapid transform changes into single action Component capture: All ECS components listed in TRACKED COMPONENTS are captured Add new component types to TRACKED COMPONENTS as they're added to engine Functions Initialize history system with editor reference Select all entities Push an action to the undo stack Parameters: (Object) — Action to record Record a transform change (with batching and compression) Force commit any pending transform (call before other operations) Record entity creation Record entity deletion Record property change Record rename Record entity reparent (move to different folder) Record folder creation Record folder deletion Record folder rename Record component added to entity Record component removed from entity Record selection change (for group operations) Undo last action Redo last undone action Copy selected entities to clipboard Cut selected entities (copy + delete)


modules/EditorHistory.js

selection change (for group operations) Undo last action Redo last undone action Copy selected entities to clipboard Cut selected entities (copy + delete) Paste from clipboard Duplicate selected entities Delete selected entities Clear all history Get history state for debugging <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorMeshConversions.js

async meshToVoxel(editor, entityId, opts = {})

async meshToPoints(editor, entityId, opts = {})

async meshToSoftBody(editor, entityId, opts = {})

async pointsToMesh(editor, entityId, opts = {})

async exportMesh(editor, entityId, format = 'obj')

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ EditorMeshConversions.js — Mesh conversion operations for editor entities Bridges Kaolin conversion modules to the editor: Mesh → Voxel grid (MeshToVoxel) Mesh → Point cloud (MeshToPoints) Mesh → Soft Body (AutoTetMesh → PBD sim) Points → Mesh (PointsToMesh) SDF → Mesh (SDFToMesh) Export mesh as OBJ/PLY/STL (MeshIO) ============================================================================ Functions Voxelize an entity's mesh and spawn a new entity with the voxel data. Parameters: (Object) — No description in source JSDoc. (number) — Source mesh entity (Object) — No description in source JSDoc. (number) — Grid resolution (default 32) Returns: null } Sample points from an entity's mesh and spawn a point cloud entity. Parameters: (Object) — No description in source JSDoc. (number) — Source mesh entity (Object) — No description in source JSDoc. (number) — Number of points to sample (default 5000) (string) — 'uniform' 'poisson' 'farthest' (default 'uniform') Returns: New point cloud entity ID Convert an entity's mesh to a soft body using AutoTetMesh. Parameters: (Object) — No description in source JSDoc. (number) — Source mesh entity (Object) — No description in source JSDoc. (string) — 'preview' 'balanced' 'quality' (default 'balanced') Reconstruct a mesh from a point cloud entity. Parameters: (Object) — No description in source JSDoc. (number) — Point cloud entity (Object) — No description in source JSDoc. (string) — 'bpa' 'alpha' 'convex' (default 'bpa') Returns: New mesh entity ID Generate a mesh from an SDF function. Parameters: (Function) — (x,y,z) = distance (Object) — No description in source JSDoc.


modules/EditorMeshConversions.js

'bpa') Returns: New mesh entity ID Generate a mesh from an SDF function. Parameters: (Function) — (x,y,z) = distance (Object) — No description in source JSDoc. (number[]) — [x,y,z] bounding box min (default [ 1, 1, 1]) (number[]) — [x,y,z] bounding box max (default [1,1,1]) (number) — Grid resolution (default 32) Returns: } Export an entity's mesh as a downloadable file. Parameters: (Object) — No description in source JSDoc. (number) — No description in source JSDoc. (string) — 'obj' 'ply' 'stl' <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorMeshOps.js

async applyMeshOp(editor, entityId, opName, params = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ EditorMeshOps.js — Mesh operations for editor entities Exposes Kaolin mesh ops (subdivide, smooth, normals, validate, flip) on selected entities. Each op clones the mesh, runs the Kaolin function, re registers with CustomMeshRegistry + EntityMeshRenderer, and pushes an undo snapshot (hybrid: auto for <50k tris, confirm dialog for larger). ============================================================================ Functions Get mesh geometry data for an entity. Checks CustomMeshRegistry first, then EntityMeshRenderer cache. Parameters: (Object) — EditorApp instance (number) — No description in source JSDoc. Returns: null} Apply a mesh operation to an entity. Pipeline: get mesh → optional undo snapshot → run op → re register → update entity. Parameters: (Object) — EditorApp instance (number) — Target entity (string) — Operation identifier (Object) — Operation specific parameters Returns: true if operation succeeded <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorMetrics.js

modules/EditorMetrics.js
Functions
setupMetricsCommands(editor)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ EditorMetrics.js — 3D mesh comparison metrics for the editor console Exposes Kaolin metrics (Chamfer Distance, Hausdorff, Volumetric IoU) as editor commands for comparing mesh entities. Usage (from editor console or script): editor.compareMeshes(entityA, entityB) editor.meshMetrics(entityA, entityB, 'chamfer') ============================================================================ Functions Setup mesh metrics commands on the editor instance. Call once during editor initialization. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorParticleSkinning.js

modules/EditorParticleSkinning.js
Functions
setupSkinningCommands(editor)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ EditorParticleSkinning.js — Editor bridge for learned deformation skinning Connects Kaolin's ParticleSkinning pipeline to the editor: 1. Capture deformation snapshots from a running soft body sim 2. Extract PCA deformation modes 3. Compute skinning weights 4. Bake to animation keyframes for replay without physics 5. Runtime preview via skinning evaluator Usage (from editor console or context menu): editor.skinning.startCapture(entityId) editor.skinning.stopCapture(entityId) editor.skinning.train(entityId, { numModes: 8 }) editor.skinning.bake(entityId, { fps: 60 }) editor.skinning.playBaked(entityId) ============================================================================ Functions Set up particle skinning commands on the editor instance. Parameters: (Object) — No description in source JSDoc. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorParticles.js

async initParticleSystem(editor, device, format)

createComposedSpellEffect(editor, sourceEntityId, elements, baseConfig)

updateParticleQuality(editor, frameDt, cameraPosition = null)

renderParticles(pass, camera, depthTextureView, depthScale)

renderTrailHistoryPass(pass, viewProj, cameraPos, time)

renderBeamPass(pass, viewProj, viewRight, viewUp, time, segmentCount)

renderMeshPass(pass, viewProj, cameraPos, time, instanceCount)

renderBondPass(pass, viewProj, cameraPos, viewRight, viewUp)

renderFieldPass(pass, viewProj, cameraPos, viewRight, viewUp)

renderOrbitalPass(pass, viewProj, cameraPos, viewRight, viewUp, instanceCount)

spawnBurst(position, preset = 'explosion', count = 50)

spawnDustPuff(position, color, intensity = 0.5, normal)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Initialize the particle system for the editor Parameters: (Object) — Editor instance (GPUDevice) — WebGPU device (string) — Swap chain format Immediately stop all particle audio (impacts + ambients). Called when exiting play mode (Stop button). Destroy the particle system Scan all active emitters' physics profiles and ensure required world systems are initialized. Call this after registering emitters or when emitter substances change. Register an emitter entity Parameters: (number) — Entity ID (Object) — Emitter configuration (type, enabled, position, and all saved settings) Unregister an emitter entity Parameters: (number) — Entity ID === AUTO BLENDING SPELL EFFECT COMPOSER === Applies composed spell effect properties directly to the source emitter. Does NOT create child entities — modifies the source emitter's visual properties based on the element mix to produce a richer, more layered look. The composer analyzes the element combination and applies: Optimized color derived from element combo Adjusted emit rate, size, lifetime for a "spell like" feel Temperature and material properties from element chemistry Called by "Create Spell From This" button in EmitterInspectorCard.js. Parameters: (Object) — Editor instance (number) — Entity ID of the source emitter (Array) — Active element layers [{id, power, enabled}] (Object) — Base emitter config (rate, size, lifetime, etc.) Returns: True if spell properties were applied Update emitter configuration Parameters: (number) — Entity ID (Object) — New configuration Enable an emitter Parameters: (number) — Entity ID Disable an


modules/EditorParticles.js

Update emitter configuration Parameters: (number) — Entity ID (Object) — New configuration Enable an emitter Parameters: (number) — Entity ID Disable an emitter Parameters: (number) — Entity ID Toggle emitter on/off Parameters: (number) — Entity ID Returns: New enabled state Check if emitter is enabled Parameters: (number) — Entity ID Returns: Enabled state Get emitter by entity ID (for inspector UI binding) Parameters: (number) — Entity ID Returns: Emitter object or null Check if an entity has an emitter Parameters: (number) — Entity ID Returns: True if entity has an emitter Save emitter config to entity metadata for serialization Parameters: (Object) — Editor instance with scene.entities (number) — Entity ID Returns: True if saved successfully Seed the particle RNG with a shared collab seed. Call at play start so all peers produce identical particle sequences. Parameters: (number) — Shared 32 bit seed from collab play sync (number) — Starting tick (0 at play start) Feed the quality stack once per displayed frame using measured wall clock time. Fixed simulation ticks must not drive this API because a constant 16.67 ms input hides real render pressure and prevents adaptive quality from reacting. Return a serializable, truthful snapshot of every active particle quality layer. Prepare a debug renderer for use (call before switching to debug mode) Parameters: (string) — Debug mode name Returns: True if ready Check if a debug renderer is ready Parameters: (string) — Debug mode name Render particles to depth texture Parameters: (GPURenderPassEncoder) — Render pass (Object) — Camera data with viewProj matrix Render particles normals to texture Render particles albedo to texture Render particles lighting to texture Render particles velocity to texture Render particles age to


modules/EditorParticles.js

normals to texture Render particles albedo to texture Render particles lighting to texture Render particles velocity to texture Render particles age to texture Render particles emissive to texture Render particles size to texture Render particles thermal/blackbody to texture Enable/disable blackbody thermal coloring in the main SDF render. When disabled (default), particles render with base colors only. Use the Thermal debug pass to visualize temperature separately. Parameters: (boolean) — No description in source JSDoc. Returns: Whether blackbody thermal coloring is enabled in the main render. Render particles to the current render pass Parameters: (GPURenderPassEncoder) — Render pass (Object) — Cam


modules/EditorPhysicalMaterial.js

handleCollision(editor, entityIdA, entityIdB, impactForce, contactPoint, contactNormal, massA, massB)

async deformAtImpact(editor, entityId, contactPoint, contactNormal, normalizedForce)

async fractureEntity(editor, entityId, contactPoint, contactNormal, impactForce, normalizedForce)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ EditorPhysicalMaterial.js — Runtime bridge for physical material simulation Connects PhysicalMaterial ECS component to existing physics systems: Collision → damage accumulation Damage exceeds threshold → deform (voxel crater) or fracture (Voronoi) Fracture spawns real ECS entities with Renderable + PhysicsBody + Collider Material specific debris FX (dust, sparks, splinters) Fragment count scales with impact energy Brittleness determines shatter vs bend behavior Lazy loads heavy modules (VoronoiFracture, AutoTetMesh) only when triggered. ============================================================================ Functions Clear all play session state. Must be called when exiting play mode so that damage/fracture/deformation caches don't persist into the next session. Handle a collision between two entities. Called from EditorPhysics.js contact callback. Parameters: (Object) — No description in source JSDoc. (number) — No description in source JSDoc. (number) — No description in source JSDoc. (number) — — magnitude of collision impulse (number[]) — — [x, y, z] world space contact (number[]) — — [nx, ny, nz] collision normal Apply direct damage to an entity (e.g., from explosions, scripts). Reset damage on an entity. Convert a rigid entity to a soft body on the fly. Uses AutoTetMesh to generate tet volume, then PBD solver. Deform mesh at impact point by carving a crater via voxel subtraction. If the carve disconnects pieces, broken off pieces become fragment entities. Fracture an entity into visible fragment ECS entities using VoronoiFracture. Each fragment gets its own Renderable, PhysicsBody, and


modules/EditorPhysicalMaterial.js

become fragment entities. Fracture an entity into visible fragment ECS entities using VoronoiFracture. Each fragment gets its own Renderable, PhysicsBody, and Collider. Fragment count scales with impact energy (Phase D). Update debris lifecycle — call from physics step. Removes expired debris entities. Sync collider friction/restitution from material properties. Call after material changes. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorPhysics.js

createHingeJoint(world, bodyA, bodyB, options = {})

createBallJoint(world, bodyA, bodyB, options = {})

createSpringJoint(world, bodyA, bodyB, options = {})

generateSoftBodyParticles(sdfFunc, bounds, density = 100)

generateFragmentColliders(fragments, resolution = 6)

raycast(world, origin, direction, maxDistance = 1000)

raycastCone(world, origin, direction, coneAngle, rayCount = 8, maxDistance = 100)

createTriggerZone(shape, size, position = [0, 0, 0])

createMeshColliderDecomposed(vertices, indices, options = {})

createSDFCollider(sdfFunc, bounds, options = {})

createVoxelCollider(voxels, sizeX, sizeY, sizeZ, voxelSize = 0.1)

createSDFGridFromFunction(sdfFunc, bounds, resolution = 32)

checkSDFCollision(grid, point, radius = 0)

async createPhysicsChain(editor, startPos, endPos, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Public API to manually verify collision state (useful for debugging) Create a hinge joint between two bodies Parameters: (Object) — PhysX world (Object) — First body (anchor) (Object) — Second body (swings) (Object) — Joint options Create a ball socket joint (spherical) Create a spring/distance joint Create a particle chain using PBD (Position Based Dynamics) Parameters: (Object) — Chain configuration Returns: Chain simulation object Create a chain of rigid body links Create a soft body simulation Parameters: (Object) — Soft body config Generate particles for a soft body in a shape Parameters: (Function) — SDF defining the shape (Object) — Bounding box (number) — Particles per unit volume Initialize fracture system Pre fracture a mesh into fragments Parameters: (Object) — Mesh to fracture { positions, indices } (Object) — Fracture options Generate colliders for each fragment Create breakable compound collider that fractures on impact Cast a ray into the physics world Parameters: (Object) — PhysX world (number[]) — Ray start [x,y,z] (number[]) — Ray direction (will be normalized) (number) — Maximum ray length Returns: Hit info { hit, distance, position, normal, entityId } or null Cast multiple rays in a cone pattern (for shotgun spread, vision cone, etc.) Parameters: (Object) — PhysX world (number[]) — Ray start (number[]) — Center direction (number) — Spread angle in radians (number) — Number of rays (number) — Max ray length Returns: Array of hit results Create a trigger zone collider config Parameters: (string) — 'box' or 'sphere' (Object) — { halfExtents } for box, {


modules/EditorPhysics.js

ray length Returns: Array of hit results Create a trigger zone collider config Parameters: (string) — 'box' or 'sphere' (Object) — { halfExtents } for box, { radius } for sphere (number[]) — Local offset [x,y,z] Returns: Collider config with isTrigger=true Check if a point is inside a trigger zone Parameters: (number[]) — Point to test [x,y,z] (Object) — Trigger config with shape, position, size Find all entities within a sphere (using spatial hash if available) Parameters: (number[]) — Sphere center [x,y,z] (number) — Search radius (Array) — Array of entities with position Returns: Entities within radius Find all entities within a box Create a mesh collider with automatic convex decomposition for complex shapes. Use this when you have a mesh that's too complex for a single convex hull. Parameters: (Float32Array) — Mesh vertex positions (Uint32Array) — Triangle indices (optional) (Object) — Decomposition options Returns: Compound collider config Create a collider from an SDF function with automatic voxelization. Use this for procedural or mathematical shapes. Parameters: (Function) — SDF function (x, y, z) = distance (negative = inside) (Object) — { min: [x,y,z], max: [x,y,z] } (Object) — { resolution, samples, threshold } Returns: Compound collider config Create a collider grid from a 3D voxel array. Use this when you already have voxel data. Parameters: (Uint8Array) — 3D voxel data (1 = solid, 0 = empty) (number) — Grid size X (number) — Grid size Y (number) — Grid size Z (number) — Size of each voxel in world units Returns: Compound collider config Create an SDF grid for collision detection with complex shapes. Useful for soft body or particle interactions. Parameters: (Function) — SDF function (Object) — Bounding box (number) — Grid resolution Returns: SDF grid for


modules/EditorPhysics.js

Useful for soft body or particle interactions. Parameters: (Function) — SDF function (Object) — Bounding box (number) — Grid resolution Returns: SDF grid for collision queries Check if a point or sphere collides with an SDF grid. Parameters: (SDFGrid) — SDF grid (Array) — Point position [x, y, z] (number) — Collision radius (0 for point) Returns: Collision info or null Create articulated chain between two points. Use for physics based chains, ropes, cables. Parameters: (Object) — Editor instance (Array) — Start position [x, y, z] (Array) — End position [x, y, z] (Object) — Chain options Returns: Articulation handle Enable speculative CCD on all dynamic bodies in the physics world. Helps prevent fast moving


modules/EditorPhysicsSim.js

initRopeSimulation(editor, entityId, position, opts)

initRopeSimulationBetweenPoints(editor, entityId, startPos, endPos, opts)

initPhysXRopeSimulation(editor, entityId, startPos, endPos, opts)

initGPURopeSimulation(editor, entityId, startPos, endPos, opts)

initWireSimulation(editor, entityId, position, opts)

initHairSimulation(editor, entityId, position, opts)

initChainSimulation(editor, entityId, position, opts)

async initClothSimulation(editor, entityId, position, opts)

initSoftBodySimulation(editor, entityId, position, opts)

async initSoftBodyFromMesh(editor, entityId, meshPositions, meshIndices, opts = {})

initBalloonSimulation(editor, entityId, position, opts)

initFluidSimulation(editor, entityId, position, opts)

initTwistedRopeSimulation(editor, entityId, startPos, endPos, opts = {})

destroyPhysicsSimulation(editor, entityId, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorPhysicsSim.js Physics Simulation Management for Editor Manages rope, wire, hair, cloth, and soft body simulations in the editor. Uses PBD solver with OGC contact model for penetration free simulation. Functions Initialize rope simulation for an entity Initialize rope simulation between two points (for tool created ropes) Initialize PhysX articulation based rope simulation Uses NVIDIA PhysX for more stable, unified physics simulation Initialize GPU based rope simulation using unified particle system Uses GPU constraint solver for native rope physics (Phase 2) Initialize a soft body from an arbitrary surface mesh using AutoTetMesh. Converts the surface mesh to a tetrahedral volume mesh, then creates PBD particles and constraints from the tet nodes. Parameters: (Object) — No description in source JSDoc. (number) — No description in source JSDoc. (Float32Array) — Surface mesh positions (stride 3) (Uint32Array) — Surface mesh indices (stride 3) (Object) — No description in source JSDoc. (string) — 'preview' 'balanced' 'quality' (number) — Override grid resolution (number) — Distance constraint stiffness (0 1) (number) — Velocity damping (0 1) (number) — Gravity (negative = down) (number) — Total mass (string) — 'none' 'bottom' 'top' (auto pin nodes) Returns: PBD solver or null on failure Initialize balloon simulation (pressure based soft body) Initialize fluid simulation (SPH density based) Step all physics simulations Sync all active simulation particle data to ECS components. Call this before saving the scene to ensure particles are persisted. Initialize a twisted rope simulation with multiple threads Creates helical thread arrangement that twists together like real rope


modules/EditorPhysicsSim.js

particles are persisted. Initialize a twisted rope simulation with multiple threads Creates helical thread arrangement that twists together like real rope fibers Parameters: (Object) — Editor instance (number) — Entity ID (Array) — Start position [x, y, z] (Array) — End position [x, y, z] (Object) — Options from TwistedRope component Returns: The solver instance Destroy a physics simulation. Parameters: (Object) — Editor instance (number) — Entity ID (Object) — Options (boolean) — If true, don't sync particles to component (used when exiting play mode) Check all ropes that are attached to a given entity and update them. Call this when an entity's transform changes in edit mode. <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorPointCloud.js

spawnPointCloudEntity(editor, pcData, opts = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ EditorPointCloud.js — Point cloud entity management Handles spawning point cloud entities from asset files (PLY/PCD/XYZ), managing the PointCloud component, and bridging to the EntityMeshRenderer point sprite render pass. ============================================================================ Functions Load a point cloud asset, parse it, and create an entity in the scene. Parameters: (Object) — EditorApp instance (Object) — Asset entry from AssetRegistry Create a point cloud entity from raw point data. Parameters: (Object) — EditorApp instance (Object) — No description in source JSDoc. (string) — Entity name (string) — Source asset UUID (optional) (number) — Point radius in world units (number[]) — Fallback RGBA color [r,g,b,a] 0 1 Returns: entityId Unregister a point cloud entity from the renderer. Get point cloud data for an entity (reads PointCloud component). Returns: null} <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorScene.js

createEntity(editor, name = 'Entity', options = {})

createFolder(editor, name = 'New Folder', parentId = null)

cleanupInvalidEntities(editor, intervalMs = 1000)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Get all entities in a welded group (parent + all children) If the entity is a child, finds its parent and returns the whole group If the entity is a parent, returns itself + all children If not welded, returns just the entity <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorSettings.js

modules/EditorSettings.js
Functions
showSettingsDialog()
Constants
Re-exports
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorSettings.js Global Editor Settings with Persistence Features: Centralized settings management localStorage persistence Settings UI with categories/tabs Live preview of changes Functions Constants Re exports , <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorSpawnMenu.js

createEmitter(editor, markerEntityId, type = 'gas')

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorTools.js

modules/EditorTools.js
Classes
class ToolManager
Functions
setupTools(editor)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorTools.js GMod style Tool System Manages interactive tools like chain tool, weld tool, constraint tool. Tools are activated from spawn menu and handle click events in viewport. Classes Method Signature Summary Activate a tool Deactivate current tool Handle right click to cancel/deselect tool Handle viewport click while tool is active Functions <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorTransitions.js

modules/EditorTransitions.js
Constants
Re-exports
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorTransitions.js Transition Effects System Features: Multiple transition effects (fade, dissolve, pixelate, wipe, zoom, etc.) Canvas based effects for complex transitions Random effect selection Configurable duration and easing Can be used for dialogs, scenes, or any UI element Constants Re exports , <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorUI.js

showPrompt(title, message, defaultValue = '')

showConfirm(title, message, options = {})

updateTimelineUI(editor, skipMarkers = false)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ EditorUI.js UI Setup and Menu Handling ============================================================================ Functions Show a custom prompt dialog Parameters: (string) — Dialog title (string) — Dialog message (string) — Default input value Returns: User input or null if cancelled Show a custom confirm dialog Parameters: (string) — Dialog title (string) — Dialog message (Object) — Button options Returns: True if confirmed, false if cancelled Show a custom alert dialog Parameters: (string) — Dialog title (string) — Dialog message Setup scene selector dropdown in viewport header Refresh scene selector with available scenes Re exports , <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorUIComponents.js

modules/EditorUIComponents.js
Functions
showToast(message, options = {})
setTheme(themeName)
getCurrentTheme()
getThemes()
initTheme()
showThemePicker()
showContextMenu(event, items)
hideContextMenu()
initTooltips()
showShortcutsHelp()
initUIComponents()
Constants
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Show a toast notification Parameters: (string) — Message to display (Object) — Toast options (string) — 'info' 'success' 'warning' 'error' (number) — Auto dismiss time in ms (0 = persistent) (string) — Optional action button text (Function) — Action button callback Apply a theme by name delegates to themeManager Get current theme name Get all available themes Initialize theme from localStorage Show theme picker dialog with categories Show a custom context menu Parameters: (MouseEvent) — The right click event (Array) — Menu items [{label, icon?, action?, separator?, disabled?, submenu?}] Initialize tooltip system Show keyboard shortcuts overlay Constants <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EditorWelding.js

createFixedJoint(editor, bodyA, bodyB, entityB)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: EditorWelding.js Auto weld system for physics bodies Extracted from EditorPhysics.js for modularity Features: Auto weld colliding bodies into rigid compounds D6 joint based welding with PhysX optimizations ECS component persistence for scene save/load Emitter weld pre scanning Functions Create a fixed joint between two bodies Uses D6 joint locked in all axes with PhysX optimizations Restore welds from WeldConstraint components (for scene load) Perform initial welding of nearby bodies before simulation starts. Graph based approach: 1. Filter eligible entities (skip ragdolls, skinned meshes, spheres/capsules) 2. Find all directly touching pairs via AABB overlap 3. Create joints for each touching pair 4. detectWeldGroups (called after) finds connected components from joints Spheres and capsules are excluded because they are projectiles/characters, not structural elements. Only box/convexMesh entities form weldable structures. Enable/disable auto welding of colliding bodies Process potential welds by checking body proximity (runtime) Break all welds and reset Pre scan to detect which emitters should be welded based on AABB surface proximity. Uses entity scale and physics body extents to compute surface to surface distance, so emitters touching any face of a large/tall object get welded correctly. Detect connected components of welded entities (weld groups). Runs AFTER performInitialWelding — uses editor.weldParentChildren + weldJoints. Outputs stored on editor: weldGroups: Map<rootEntityId, Set<memberEntityIds (root included in set) weldChildToRoot: Map<childEntityId, rootEntityId (O(1) render skip) weldGroupLocalTransforms: Map<entityId, {localPos, localRot, localScale} Build merged


modules/EditorWelding.js

set) weldChildToRoot: Map<childEntityId, rootEntityId (O(1) render skip) weldGroupLocalTransforms: Map<entityId, {localPos, localRot, localScale} Build merged meshes for each weld group and register them with EntityMeshRenderer. Follows Unity CombineMeshes pattern: transform child vertices into root's local space. Also stores per member mesh segment info for per frame vertex updates. Parameters: (Object) — No description in source JSDoc. (Object) — EntityMeshRenderer instance (needs getMeshData, registerCustomMesh) (Function) — (entityMeta) = { meshType } Sync welded child entity transforms to their parent bodies Called from stepPhysics loop Re exports <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/EntitySchema.js

exportSceneToJSON(editor, pretty = true)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: No file level description found in source. Add one as a leading JSDoc comment, or document it below. Functions Generate a full JSON schema for an entity Parameters: (Object) — Editor instance (number) — Entity ID Returns: Complete entity schema Generate schemas for all entities in the scene Parameters: (Object) — Editor instance Returns: Scene schema with all entities Export scene schema to JSON string Print entity schema to console (for debugging) Print full scene schema to console (for debugging) Get a summary of entity relationships <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview


modules/GeometryBuilders.js

modules/GeometryBuilders.js
Functions
createWedgeGeometry()
createPrismGeometry()
createStairsGeometry()
createArchGeometry()
createHelixGeometry()
createGearGeometry()
createStarGeometry()
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: GeometryBuilders.js Procedural geometry generation for physics colliders Extracted from EditorPhysics.js for modularity Functions Create wedge/ramp geometry flat bottom, sloped top Create hexagonal prism geometry Create stairs geometry (4 steps) Create arch geometry with legs and curved top Create helix/spring geometry Create gear geometry with teeth Create 5 point star geometry <! HUMAN NOTES Notes & Examples Editor Extension System The editor supports extensions via the same Plauna component system as apps. Extensions can add panels, tools, menu items, and hooks into the engine. They run with elevated 'editor' capability granting access to the scene graph, asset database, and build pipeline. Example: Editor extension adding a custom panel See also: Editor Overview