modules/HotkeyManager.js

modules/HotkeyManager.js
Functions
showHotkeyEditor()
Re-exports
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: HotkeyManager.js Centralized Hotkey System with YAML style Configuration Features: Centralized hotkey definitions Easy configuration via config object (YAML style) Runtime hotkey rebinding Hotkey editor UI localStorage persistence for custom bindings Conflict detection Functions 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/LoadingManager.js

modules/LoadingManager.js
Classes
class LoadingManager
Functions
getLoadingManager()
loadingStage(stageId, subtitle = '')
loadingProgress(progress)
loadingComplete(stageId)
loadingFinish()
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: LoadingManager.js Advanced loading system with progress tracking Manages dynamic loading of editor components with real progress, stage tracking, and a polished loading screen UI. Classes LoadingManager Tracks and displays loading progress Method Signature Summary Define loading stages with weights Start the loading process and show overlay Take over the instant HTML loader and enhance it with progress tracking Begin a loading stage Update progress within current stage (0 1) Complete current stage Finish loading and hide overlay Start the smooth animation loop Stop the animation loop Update just the progress bar (called from animation loop) Update text elements (status, subtitle) called on stage change Get overall progress (0 1) Register callback Emit event Create loading overlay UI Inject CSS styles Update stage indicator dots Hide overlay with cinematic animation sequence Static helper to get singleton 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/ModelImporter.js

collectGLTFNodeInstances(gltf, suppliedGraph = null)

createModelPartDescriptors(result, assetId, instanceId, existingParts = null)

async registerModelRuntimeMaterials(editor, result, parts)

async registerModelRuntimeMeshes(editor, result, parts, modelInstanceId = null, modelAnimation = null, modelMorphWeights = null,)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ ModelImporter.js OBJ / glTF / GLB parsers + entity spawning ============================================================================ Functions Parse a model File into geometry data. Parameters: (File) — No description in source JSDoc. Returns: , name:string } } Parse a point cloud file into point data. Parameters: (File) — No description in source JSDoc. Returns: } Parse Wavefront OBJ text into indexed geometry. Handles v, vn, vt, f directives. Triangulates quads. Parse a GLB (binary glTF 2.0) ArrayBuffer. Extracts all mesh primitives as flat position/normal/uv/index arrays. Parse glTF JSON + optional binary buffer into mesh geometries. Load a model asset, register its mesh, and create an entity in the scene. Parameters: (Object) — EditorApp instance (Object) — Asset entry from AssetRegistry <! 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/PrefabLibrary.js

instantiatePrefab(editor, prefab, targetFolderId = null, offset = [0, 0, 0])

async importPrefab(editor, fileName, targetFolderId = null, offset = [0, 0, 0])

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: PrefabManager.js Folder based Prefab System (File based) Based on J:\game2 implementation proper file persistence Every entity folder is a prefab that can be: Exported to Assets/Prefabs/ .prefab.json Imported/instantiated into any scene Updated (re export overwrites) Listed and browsed Functions Export a folder as a prefab data structure Save prefab to Assets/Prefabs/ directory Export folder and save to file (combined operation) List all available prefabs in Assets/Prefabs/ Load prefab from file Load prefab by UUID Instantiate a prefab in the scene Import prefab from file and instantiate Delete prefab 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/ProjectStorage.js

async exportProject(project, options = {})

enableAutoSave(project, intervalMs = 60000)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ProjectManager Save/load/export projects (pure browser, no Node.js) Uses IndexedDB + File System Access API Functions Save project to IndexedDB Load project from IndexedDB List all projects Delete project Get last opened project UUID Create new project Export project to ZIP for distribution Strips editor only data and packs for runtime Download project as JSON file (backup) Import project from JSON 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/SubScene.js

modules/SubScene.js
Classes
class SubScene
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ SubScene.js — Parallel scene layer for debris, fragments & world environment Lives alongside the editor scene but is NOT part of it. Objects here: Are NOT in editor.scene.entities Are NOT selectable, saveable, or undoable Have their own PhysX bodies for physics simulation Are rendered via EntityMeshRenderer in a dedicated pass Have automatic lifecycle (fade, expire, cleanup) Categories: 'debris' — tiny short lived particles (dust, sparks, splinters) 'fragment' — larger breakoff chunks from fractured meshes 'env' — persistent world environment objects (no auto expire) Usage: const sub = editor.subScene; sub.spawn({ category: 'debris', meshType: 'cube', position, velocity, ... }); sub.spawnFragment(parentEntityId, { meshType, position, ... }); sub.tick(dt); // called from stepPhysics sub.render(rp, vp, emr); // called from Viewport sub.clear(); // on play→edit transition ============================================================================ Classes Method Signature Summary Refresh references after physics world recreate (play mode re enter). Extract snapshot of all fragment & env items BEFORE clear(). Returns array of plain objects with current physics positions and all material/mesh data needed to promote them to real scene entities. Remove all items and their physics bodies. Spawn a SubScene object (debris, fragment, or env). Convenience: spawn a fragment from a parent entity. Same as spawn() with category='fragment' and parentEntityId set. Convenience: spawn N debris pieces in a burst around a point. Render all SubScene objects via EntityMeshRenderer. Uses the main solid render pipeline (not X


modules/SubScene.js

Convenience: spawn N debris pieces in a burst around a point. Render all SubScene objects via EntityMeshRenderer. Uses the main solid render pipeline (not X ray). Find the nearest SubScene item intersected by a ray (AABB test). Used by the grab system to pick up fragments/debris. Apply a force to a SubScene item's physics body. Used by the grab system to move fragments. Get an item by its SubScene id. Settle a fragment: convert dynamic → kinematic, cancel lifetime, apply parent material, promote to 'env' category. The piece becomes a permanent static mesh in the world. Reverse a settle: convert kinematic → dynamic so forces/grab work again. Called when a settled fragment is grabbed or needs to respond to impacts. P6: Build compound box sub colliders for elongated fragments. Splits vertex positions along the longest axis into 2 halves, computes a tight AABB for each half, and returns compound collider configs. P7: Reduce vertex count via spatial hashing for PhysX 256 vertex convex hull limit. Merges nearby vertices into grid cells, keeping the vertex closest to each cell center. Returns a new Float32Array with reduced vertex count. <! 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


panels/AssetPanel.js

sampleAssetAnimationTransforms(gltf, animIdx, time, binStart, buf)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ AssetPanel.js Bottom panel asset browser (Unity/Unreal inspired) ============================================================================ 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


panels/Hierarchy.js

panels/Hierarchy.js
Classes
class HierarchyPanel
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. Classes HierarchyPanel Entity tree view 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


panels/Inspector.js

panels/Inspector.js
Classes
class InspectorPanel
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: InspectorPanel Component property editor Classes Method Signature Summary Update chain simulation with new parameters Reinitialize chain simulation when backend changes Create EntityFlags component widget HTML Setup event handlers for EntityFlags widget Create a "Physical Material" widget with preset dropdown and property sliders. Sync PhysicsBody mass from PhysicalMaterial density × collider volume. Create a "Geometry" widget for mesh entities with operation buttons. Update PhysX filter data when EntityFlags change <! 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


panels/SpellGeneratorPanel.js

panels/SpellGeneratorPanel.js
Classes
class SpellGeneratorPanel
Functions
createSpellGeneratorPanel(options = {})
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: SpellGeneratorPanel.js Spell Generator Editor UI A panel for procedurally generating spells in the editor. Features: Element selection (with combination preview) Spell type selection Modifier toggles Power level slider Live preview Save to spell library Classes Method Signature Summary Render the panel Build HTML structure Add styles Setup event listeners Toggle element selection Select spell type Toggle modifier Update modifier availability based on spell type Update combination preview Update preview Render animated preview on canvas Draw projectile style preview Draw AOE style preview Draw shield style preview Draw buff style preview Update spell info display Generate random spell Generate spell (same as preview but with notification) Save generated spell Get current generated spell Destroy panel 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


panels/Viewport.js

panels/Viewport.js
Classes
class ViewportPanel
Re-exports
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. Classes Method Signature Summary Update 3D labels for emitter entities Detect monitor refresh rate by measuring frame intervals Update all stats display elements Update the collab stats overlay (connection status, interp stats, router stats). Called at 1Hz from the render loop when collab is active. Get world position at a given distance from camera along pick ray Get a pick ray from screen coordinates Pick an entity at screen coordinates Ray ground plane intersection (horizontal plane at given Y) Calculate distance from ray to line segment (for rope picking) Returns { minDist, t } where minDist is closest distance and t is ray parameter Ray sphere intersection test Pre build raycast BVH for all entity mesh types in the scene. Call during play compile so first grab doesn't pay the SAH build cost. Get the physics authoritative position for an entity. In play mode, ragdoll entities keep their Transform at spawn origin while the actual body is elsewhere — this returns the real position. Get center position of all selected entities Get rope start/end positions for gizmo rendering Returns { startPos, endPos } or null if not a rope or positions unavailable Move all selected entities with arrow keys (with grid snap) Update grabbed entity position to follow mouse (with grid snap and axis constraint) Also moves all other selected entities by the same delta Update rope attachments when an entity they're attached to is moved Re interpolates ALL particles along the rope to maintain proper segment distribution Rotate a vector by a quaternion Find closest point on an axis line to a ray Physics


panels/Viewport.js

ALL particles along the rope to maintain proper segment distribution Rotate a vector by a quaternion Find closest point on an axis line to a ray Physics driven grab: update spring target and fatigue each frame. IMPORTANT: We do NOT set entity position directly. The spring damper in EditorPhysics (via PhysicsGrab.computeGrabForce) is the SOLE authority on where the object goes. This prevents the stretching / rubber banding that occurs when visual snap fights physics writeback. Best practice references: Garry's Mod: pure spring force, body stays dynamic Boneworks: PD controller, never teleport body UE4 PhysHandle: linear drive to target, no position override Orange Duck "Spring It On": frequency/damping ratio parameterization Create the enhanced grab indicator overlay. Inspired by: Garry's Mod physgun: glowing tether beam from gun → object Half Life Alyx: object glow halo, staged highlight feedback Control (Remedy): pulsing aura, floating debris particles Elements: 1. SVG tether line from screen center → entity (physgun beam) 2. Glow halo ring around the entity 3. Two shimmer gradient bars (strength + grip) with labels 4. Scale in bounce on grab start 5. Shake wobble when near grip break 6. Small mass label Project the grabbed entity position to screen space and update the grab indicator suite: bars, mass label. (Halo was removed — see comment in createGrabIndicator.) Hide all grab indicator elements (called on grip break / release). Create and show the fairy cursor at the given screen position. Update fairy position each frame with idle sway + fatigue fade. Also updates the 3D point light at the grab target world position. Hide and clean up the fairy cursor + its 3D point light. Apply throw momentum to physics body when elastic drag is released. Body stays dynamic


panels/Viewport.js

world position. Hide and clean up the fairy cursor + its 3D point light. Apply throw momentum to physics body when elastic drag is released. Body stays dynamic throughout — no kinematic restore needed. Update rotation for selected entities when dragging rotation ring Rotate a point by a quaternion Multiply two quaternions: result = a b Set spawn preview at position Clear spawn preview Set hovered entity for cross panel highlighting Tick all skeletal animations and push skinned vertices to GPU. Uses GPU compute skinning when available, with CPU fallback. Called once per frame before entity rendering. Update spawn preview position from screen coordinates Check memory budget and trigger cleanup if needed Now incl


project/AssetRegistry.js

class UnsupportedAssetIndexVersionError extends Error

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AssetRegistry.js UUID based asset management Adapted from J:\game2 handles: Asset registration and UUID assignment Path ↔ UUID lookup Lazy loading of asset data Asset index persistence (Assets/index.json) Import and update operations Classes Method Signature Summary Method Signature Summary Initialize load or create asset index Save index to disk Import a file into the project Register existing file Scan Assets folder and register all files Functions Get asset type from file extension 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


project/AutoSave.js

<! 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 Method Signature Summary Functions Wrap editor methods to track dirty state Setup Ctrl+S shortcut Setup Ctrl+N for new scene <! 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


project/ProjectCompatibility.js

prepareProjectRecord(input, { deserializeMaps = 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 Normalize a persisted/imported project without mutating the source object. 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


project/ProjectExporter.js

async exportProject(editor, sceneDataList, options = {})

downloadZip(zipBuffer, filename = 'game-export.zip')

async exportAndDownload(editor, sceneDataList, 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 Pack data into binary format Format: [magic:4][version:4][indexOffset:4][...blobs...][index] Unpack binary data (for runtime) Export a single scene to packed binary Export full project with multiple scenes Export and download project 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


project/ProjectLauncher.js

project/ProjectLauncher.js
Functions
getRecentProjects()
addRecentProject(project)
removeRecentProject(projectName)
clearRecentProjects()
createLauncherUI()
renderRecentProjects(container)
injectLauncherStyles()
async showLauncher(onProjectSelected)
hideLauncher()
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ProjectLauncher.js Startup screen with recent projects Adapted from J:\game2 Unity Hub / Godot style launcher: Recent projects list with thumbnails New project / Open project buttons Project templates (future) Functions Hide launcher (for when editor is already initialized) <! 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


project/SceneManager.js

serializeScene(editor, sceneName = null)

async saveSceneToFile(editor, sceneName = null)

findEntitiesByRenderFlags(editor, flags, matchAll = true)

findPrefabInstances(editor, prefabUuid = null)

addConnection(editor, fromEntity, signal, toEntity, method, flags = 0, binds = [])

removeConnection(editor, fromEntity, signal, toEntity, method)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: SceneManager.js Scene loading, saving, and management Handles: Scene file I/O (Scenes/ .scene.json) Scene serialization/deserialization Multi scene support Scene switching Functions Validate and fully normalize a serialized scene before touching live editor state. Missing schemaVersion is the legacy v1 format; future versions fail closed. Create empty scene data with full Unity/Godot style structure Serialize current editor scene to JSON compatible object Validate and stage a complete scene before replacing live editor state. If an unexpected runtime failure occurs while applying it, restore the previously serialized scene so callers never inherit a half loaded scene. Clear all entities and folders from scene Save scene to file system Load scene from file system List all scenes in project Delete scene file Create new scene (clears current and sets name) Find all entities on a specific layer Find all entities matching a layer mask Find all entities with a specific tag Find first entity with a specific tag Find all enabled entities (active in scene) Find all entities with specific render flags Find all prefab instances Get all connections for an entity (both incoming and outgoing) Add a signal connection between entities Remove a signal connection Set entity layer Set entity tag Add tag to entity's tags array Remove tag from entity's tags array Set entity render flags Set entity enabled state 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,


project/SceneManager.js

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


project/index.js

project/index.js
Re-exports
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. 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


spawnables/SpawnableItem.js

spawnables/SpawnableItem.js
Classes
class SpawnableItem
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. Classes SpawnableItem Base class for all spawnable objects in the editor. Physics collider options: Override getCollider() to define custom colliders Use helper imports from EditorPhysics for advanced physics: generateCollidersFromSDF(sdfFunc, bounds, resolution) createMeshColliderDecomposed(vertices, indices, options) createSDFCollider(sdfFunc, bounds, options) createVoxelCollider(voxels, sizeX, sizeY, sizeZ, voxelSize) Method Signature Summary Get geometry for rendering. Get physics collider configuration. Override this to provide custom colliders for complex shapes. Supported shapes: box: { shape: 'box', halfExtents: [x, y, z] } sphere: { shape: 'sphere', radius: r } capsule: { shape: 'capsule', radius: r, halfHeight: h } convexMesh: { shape: 'convexMesh', meshId: id, vertices: [...] } compound: { shape: 'box', halfExtents: [...], compoundColliders: [...] } Get default ECS components for this spawnable. Get default color for this spawnable. Override to provide a custom color. Spawn this item in the editor at the given position. Optional: Get SDF function for this shape. Used for particle collision, soft body interaction, etc. Optional: Get articulation configuration for jointed objects. Used for ropes, chains, ragdolls. Optional: Get default physical material preset key for this shape. Used to auto populate the PhysicalMaterial ECS component on spawn. Override in subclasses for shape appropriate defaults. <! 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


spawnables/SpawnableItem.js

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


spawnables/cameras/Camera.js
Classes
class Camera extends SpawnableItem
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. 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


spawnables/complex/Arch.js
Classes
class Arch extends SpawnableItem
Notes & Examples
Editor Extension System


async performCSG(editor, entityIdA, entityIdB, operation = 'union', opts = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================ CSGShape.js — CSG Boolean operations on mesh entities Select 2 mesh entities → right click → CSG Union / Subtract / Intersect V1: Voxelize both → VoxelOps boolean → SDFToMesh marching cubes reconstruct V2: Voxelize both → VoxelOps boolean → DualContouring for sharp features ============================================================================ Functions Perform a CSG boolean operation on two mesh entities. Parameters: (Object) — No description in source JSDoc. (number) — First mesh entity (number) — Second mesh entity (string) — 'union' 'subtract' 'intersect' (Object) — No description in source JSDoc. (number) — Voxel grid resolution (default 48) (boolean) — Remove source entities (default false) (string) — 'mc' for Marching Cubes V1, 'dc' for Dual Contouring V2 (default 'dc') (number) — Dual Contouring sharpness 0 1 (default 0.5) Returns: New entity ID or null on failure <! 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


spawnables/complex/Gear.js
Classes
class Gear extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/complex/Helix.js
Classes
class Helix extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/complex/Prism.js
Classes
class Prism extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/complex/Pyramid.js
Classes
class Pyramid extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/complex/SDFShape.js
Classes
class SDFShape extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/complex/Stairs.js
Classes
class Stairs extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/complex/Star.js
Classes
class Star extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/complex/Wedge.js
Classes
class Wedge extends SpawnableItem
Notes & Examples
Editor Extension System


class ParticleEmitter extends SpawnableItem


spawnables/emitters/PhaseEmitters.js
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. 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


spawnables/index.js

spawnables/index.js
Functions
getSpawnable(id)
getSpawnablesByCategory(category)
getAllCategories()
getAllSpawnables()
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 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


class DirectionalLight extends SpawnableItem


spawnables/lights/PointLight.js
Classes
class PointLight extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/lights/SpotLight.js
Classes
class SpotLight extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/physics/Balloon.js
Classes
class Balloon extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/physics/Chain.js
Classes
class Chain extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/physics/Cloth.js
Classes
class Cloth extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/physics/Fluid.js
Classes
class Fluid extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/physics/Hair.js
Classes
class Hair extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/physics/Ragdoll.js
Classes
class Ragdoll extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/physics/Rope.js
Classes
class Rope extends SpawnableItem
Re-exports
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. Classes Method Signature Summary 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


spawnables/physics/RopeSchema.js
Functions
getFiberMaterial(name)
applyFiberMaterial(data, materialName)
Constants
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ============================================================================= ROPE SCHEMA Shared schema for RopeTool and PhysicsRopeComponentEditor ============================================================================= Functions Get fiber material properties by name Apply fiber material preset to rope data Constants — Fiber material properties affects both physics and rendering — Default values for rope properties — Material presets for quick setup — Fiber material options for dropdown — Unified inspector schema for rope properties Used by both RopeTool and PhysicsRopeComponentEditor Organized into logical groups with the most commonly used options first <! 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


spawnables/physics/SoftBody.js
Classes
class SoftBody extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/physics/Wire.js
Classes
class Wire extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/primitives/Capsule.js
Classes
class Capsule extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/primitives/Cone.js
Classes
class Cone extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/primitives/Cube.js
Classes
class Cube extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/primitives/Cylinder.js
Classes
class Cylinder extends SpawnableItem
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. Classes Method Signature Summary Get SDF function for particle/soft body collision. Returns hollow cylinder (tube) SDF for accurate collision detection. <! 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


spawnables/primitives/Plane.js
Classes
class Plane extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/primitives/Sphere.js
Classes
class Sphere extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/primitives/Torus.js
Classes
class Torus extends SpawnableItem
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. Classes Method Signature Summary Get SDF function for particle/soft body collision. Returns hollow torus SDF for accurate collision detection. <! 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


class ConstraintTool extends SpawnableItem


spawnables/tools/RemoverTool.js
Classes
class RemoverTool extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/tools/RopeTool.js
Classes
class RopeTool extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/tools/SpringTool.js
Classes
class SpringTool extends SpawnableItem
Notes & Examples
Editor Extension System


spawnables/tools/WeldTool.js
Classes
class WeldTool extends SpawnableItem
Notes & Examples
Editor Extension System


storage/EditorPreferenceContracts.js

class EditorPreferenceContractError extends Error

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Canonical localStorage contracts for structured editor preferences. The original keys remain v1 rollback mirrors. Current clients publish the legacy payload first and the v2 envelope last. The envelope remembers the exact legacy JSON it accompanied, allowing a later write from an older tab to be detected and read instead of being shadowed by stale v2 data. Classes Method Signature Summary Functions Constants — Canonical localStorage contracts for structured editor preferences. The original keys remain v1 rollback mirrors. Current clients publish the legacy payload first and the v2 envelope last. The envelope remembers the exact legacy JSON it accompanied, allowing a later write from an older tab to be detected and read instead of being shadowed by stale v2 data. <! 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


storage/GameEditorDatabase.js

storage/GameEditorDatabase.js
Functions
closeGameEditorDatabase()
openGameEditorDatabase()
Constants
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: The single schema owner for editor IndexedDB persistence. Version 1 was opened independently by main.js and ProjectStorage.js, which meant only the first caller's object store was created. Version 2 expands the database to contain both stores without removing any version 1 data. Functions Constants — The single schema owner for editor IndexedDB persistence. Version 1 was opened independently by main.js and ProjectStorage.js, which meant only the first caller's object store was created. Version 2 expands the database to contain both stores without removing any version 1 data. <! 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


themes/cyberpunk.js

themes/cyberpunk.js
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. Constants — Cyberpunk Theme Neon pink and cyan <! 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


themes/dark.js

themes/dark.js
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. Constants — Dark Theme Default editor theme <! 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


themes/index.js

themes/index.js
Constants
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: Theme System Index Central theme management with modular theme files 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


themes/light.js

themes/light.js
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. Constants — Light Theme Clean bright interface <! 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


themes/matrix.js

themes/matrix.js
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. Constants — Matrix Theme Hacker green aesthetic <! 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


themes/midnight.js

themes/midnight.js
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. Constants — Midnight Blue Theme Deep blue professional theme <! 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


themes/monokai.js

themes/monokai.js
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. Constants — Monokai Theme Classic code editor colors <! 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


themes/nord.js

themes/nord.js
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. Constants — Nord Theme Arctic, north bluish color palette <! 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


themes/ocean.js

themes/ocean.js
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. Constants — Ocean Theme Deep sea blues and teals <! 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


themes/purple.js

themes/purple.js
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. Constants — Purple Haze Theme Vibrant purple aesthetic <! 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


themes/solarized.js

themes/solarized.js
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. Constants — Solarized Dark Theme Ethan Schoonover's iconic palette <! 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


utils/CompressionManager.js

utils/CompressionManager.js
Functions
initCompressionWorker()
async compressSnapshot(snapshot)
async computeDelta(prev, current)
async decompressSnapshot(compressed)
estimateCompressedSize(data)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: CompressionManager Manages background compression via WebWorker Provides async compression/decompression for timeline and undo history Functions Initialize the compression worker Get memory estimate for compressed data <! 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


utils/DialogAnimations.js

smoothCloseDialog(dialog, duration = 300)

closeOnBackdropClick(dialog, contentSelector = '.editor-dialog-box, .modal-content, .settings-dialog')

setupDialogCloseHandlers(dialog, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: DialogAnimations.js Smooth open/close animations for all dialogs Provides consistent animation utilities for modals and dialogs Functions Smoothly close a dialog with fade out animation Parameters: (HTMLElement) — The dialog element to close (number) — Animation duration in ms (default: 300) Returns: Resolves when animation is complete Smoothly close a modal with fade out animation Parameters: (HTMLElement) — The modal element to close (number) — Animation duration in ms (default: 300) Returns: Resolves when animation is complete Close dialog on backdrop click (outside content area) Parameters: (HTMLElement) — The dialog wrapper element (string) — Selector for the content area (default: '.editor dialog box, .modal content, .settings dialog') Close dialog on Escape key Parameters: (HTMLElement) — The dialog element Setup all standard dialog close handlers Parameters: (HTMLElement) — The dialog element (Object) — Configuration options <! 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


utils/FrameSpikeDetector.js

utils/FrameSpikeDetector.js
Classes
class FrameSpikeDetector
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: FrameSpikeDetector.js Detect and log frame time spikes Monitors frame times and logs detailed information when spikes occur, helping identify performance bottlenecks and optimization opportunities. Classes FrameSpikeDetector.js Detect and log frame time spikes Monitors frame times and logs detailed information when spikes occur, helping identify performance bottlenecks and optimization opportunities. Method Signature Summary Mark the start of a frame Mark the end of a frame and check for spikes Record a frame spike with context Categorize spike based on context Compress old spikes instead of deleting them Uses tiered compression based on age Capture stack trace for debugging Log spike to console with formatting Mark the start of an operation Measure time since mark and return duration Get spike statistics Get spike report for diagnostics Clear spike history Enable/disable spike detection <! 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


utils/FrustumCulling.js

isAABBInFrustum(minX, minY, minZ, maxX, maxY, maxZ, planes)

isAABBCenterExtentsInFrustum(cx, cy, cz, ex, ey, ez, planes)

isEntityAABBVisible(entityPos, entityScale, localCenter, localExtents, planes)

<! 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 Extract and normalize frustum planes from a 4×4 view projection matrix. Uses Gribb Hartmann method (column major matrix). Must be called once per frame before any culling tests. Parameters: (Float32Array number[]) — — column major 4×4 ViewProj matrix Returns: The 24 float plane array (reference — do NOT mutate) Test if a bounding sphere is inside or intersects the frustum. Parameters: (number[]) — [x, y, z] world space sphere center (number) — sphere radius (Float32Array) — optional explicit planes (defaults to cached) Returns: true if potentially visible Test if a world space AABB intersects the frustum. Uses the P vertex method: for each plane pick the AABB corner most in the direction of the plane normal (the "positive" vertex). If that corner is behind the plane, the entire box is outside. Parameters: (number) — @param {number} minY @param {number} minZ (number) — @param {number} maxY @param {number} maxZ (Float32Array) — optional explicit planes Returns: true if potentially visible Convenience: test AABB from center + half extents (world space). Converts to min/max and delegates. High level entity visibility test using AABB. Takes the mesh's local space AABB center+extents, the entity's world position and scale, and produces the world space AABB for frustum testing. Parameters: (number[]) — [x,y,z] entity world position (number[]) — [sx,sy,sz] (number[]) — mesh AABB center in local space (number[]) — mesh AABB half extents in local space (Float32Array) — No description in source JSDoc. Legacy: entity visibility using bounding sphere (kept for broad phase /


utils/FrustumCulling.js

mesh AABB half extents in local space (Float32Array) — No description in source JSDoc. Legacy: entity visibility using bounding sphere (kept for broad phase / fallback). Get current frustum planes (for debugging / external use) Calculate frustum corners in world space (for debug visualization) Parameters: (Float32Array) — Inverse view projection matrix Returns: 8 corner points 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


utils/GPUBufferPool.js

getBuffer(device, size, usage, label = '')

<! 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 a buffer from pool or create new one Parameters: (GPUDevice) — WebGPU device (number) — Minimum buffer size in bytes (number) — GPUBufferUsage flags (string) — Optional label for debugging Return a buffer to the pool Parameters: (GPUBuffer) — Buffer to return (number) — Original usage flags Get pool statistics Clear all pools and destroy buffers Trim pools to reduce memory <! 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


utils/InterpolationCurves.js

springInterpolation(t, stiffness = 100, damping = 10)

lerpVec3(from, to, t, easing = 'linear')

<! 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 Animation track keyframe based animation Method Signature Summary Add a keyframe Remove keyframe at time Evaluate track at time Tween simple value animation Method Signature Summary Update tween Reset tween Functions Smoothstep interpolation (Hermite) Smootherstep (Ken Perlin's improved version) Spring interpolation with damping Bounce interpolation Interpolate between two values with easing Parameters: (number) — Start value (number) — End value (number) — Progress [0, 1] (string Function) — Easing function or name Interpolate between two vec3s with easing Spherical linear interpolation for quaternions (SLERP) Parameters: (number[]) — Start quaternion [x, y, z, w] (number[]) — End quaternion [x, y, z, w] (number) — Progress [0, 1] (string Function) — Optional easing Catmull Rom spline interpolation (passes through all control points) Parameters: (Array) — Array of control points (number) — Progress [0, 1] across entire spline (boolean) — Whether spline is closed loop B Spline interpolation (smooth curve, doesn't pass through control points) Hermite spline interpolation Parameters: (number[]) — Start point (number[]) — Start tangent (number[]) — End point (number[]) — End tangent (number) — Progress [0, 1] 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


utils/InterpolationCurves.js

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


utils/MemoryIntegration.js

async initMemoryIntegration(gpuDevice = null)

async retrieveCachedAsset(uuid, asText = false)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: MemoryIntegration.js Wires up off heap memory to editor/engine systems Integrates OffHeapMemoryManager with: Particle snapshot system (large frame buffers → WASM/Worker) Editor history (old undo entries → IDB) Asset cache (loaded assets → Worker memory) Profiler timeline (frame history → off heap) Functions Initialize memory integration Get current memory pressure (0 1) Check if we should offload to off heap storage Store particle frame in off heap memory Large frames ( 100KB) go to worker memory Retrieve particle frame from off heap storage Store old history entry to IDB when memory pressure is high Retrieve archived history entry from IDB Store large asset in worker memory Retrieve cached asset from worker memory Store profiler frame batch in WASM memory Get comprehensive memory stats Format memory stats for profiler display <! 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


utils/ObjectPool.js

<! 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 a Float32Array of specified size from pool Return a Float32Array to the pool Get a generic array from pool Return a generic array to the pool Get a vec3 [x, y, z] from pool Return a vec3 to pool Get a vec4 [x, y, z, w] from pool Return a vec4 to pool Get a mat4 (16 floats) from pool Return a mat4 to pool Get pool statistics Clear all pools (for memory pressure situations) Trim pools to reduce memory (keep some for reuse) 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


utils/OffHeapMemory.js

class MaxGPUBufferStorage extends GPUBufferStorage

async invalidateLegacyOffHeapCaches(indexedDBApi = globalThis.indexedDB)

async initOffHeapManager(device = null, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: OffHeapMemory.js MAXIMUM Memory Expansion System Pushes browser memory limits to the absolute maximum using every available strategy: 1. Multi WASM Pool Multiple 4GB WASM modules (up to 16GB+ total) 2. Worker Memory Pool Each worker has its own 4GB heap 3. SharedArrayBuffer Zero copy cross worker/thread communication 4. GPU Buffer Storage VRAM is separate from system RAM limits 5. IndexedDB Sharding Multiple databases for unlimited persistent storage 6. ArrayBuffer Pooling Aggressive reuse to minimize GC pressure 7. Memory Pressure Management Auto offloading and tiered storage THEORETICAL MAXIMUM: 4 WASM modules × 4GB = 16GB 8 Workers × 4GB heap = 32GB (but shared address space limits this) GPU buffers = Limited by VRAM (8 24GB on modern GPUs) IndexedDB = Unlimited (disk backed) PRACTICAL MAXIMUM: 8 16GB usable off heap memory Classes Multi WASM Memory Pool Creates multiple WASM memory instances, each up to 4GB Total capacity: up to 16GB off heap Method Signature Summary Allocate memory across multiple WASM modules (sync version) Free allocated memory ArrayBuffer pool for reducing GC pressure Reuses buffers instead of creating new ones Method Signature Summary Get size class (next power of 2) Acquire a buffer of at least the specified size Return a buffer to the pool Acquire a typed array backed by a pooled buffer Clear all pools (call during aggressive cleanup) GPU buffer storage for large data Keeps data in VRAM instead of JS heap Method Signature Summary Create a GPU buffer for storing data Write data to GPU buffer Read data back from GPU (async) IndexedDB storage for large persistent data Method Signature Summary Worker based memory expansion Each Web Worker has its own JS


utils/OffHeapMemory.js

data back from GPU (async) IndexedDB storage for large persistent data Method Signature Summary Worker based memory expansion Each Web Worker has its own JS heap ( 4GB potential) Spawn multiple workers to multiply available memory Method Signature Summary SharedArrayBuffer Ring Buffer Zero copy data sharing between main thread and workers Requires Cross Origin Isolation headers Method Signature Summary Maximum GPU Buffer Storage Aggressively uses VRAM for data storage Method Signature Summary MAXIMUM Memory Expansion Manager Combines ALL strategies for absolute maximum memory capacity Method Signature Summary 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


utils/PhysicsBodyPool.js

releaseBody(physicsWorld, bodyHandle, simMode, colliderShape)

resetPooledBody(physicsWorld, bodyHandle, position, rotation, scale)

<! 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 a body handle from pool or signal that new one is needed Parameters: (string) — 'dynamic', 'static', or 'kinematic' (string) — 'box', 'sphere', 'capsule', etc. Returns: Body handle if available, null if need to create new Return a body to the pool for reuse Parameters: (Object) — PhysX world reference (number) — Body handle to pool (string) — Body simulation mode (string) — Collider shape type Reset a pooled body for reuse with new transform Parameters: (Object) — PhysX world reference (number) — Body handle (number[]) — [x, y, z] (number[]) — [x, y, z, w] quaternion (number[]) — [sx, sy, sz] Get pool statistics Clear all pools (destroys pooled bodies) Parameters: (Object) — PhysX world reference for cleanup Trim pools to reduce memory 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


utils/RenderBundleCache.js

getOrCreateBundle(device, key, version, descriptor, recordFn)

createStandardDescriptor(colorFormat = 'bgra8unorm', depthFormat = 'depth24plus')

<! 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 Create or get cached render bundle Parameters: (GPUDevice) — No description in source JSDoc. (string) — Unique identifier for this bundle (number) — Version number (increment when content changes) (Object) — Render bundle encoder descriptor (Function) — Function that records draw calls: (encoder) = void Invalidate a specific bundle (force re record next frame) Invalidate all bundles matching a prefix Clear all cached bundles Remove bundles not used recently Parameters: (number) — Maximum age in milliseconds Get cache statistics Helper to create standard descriptor for color + depth rendering Execute render bundles in a render pass Parameters: (GPURenderPassEncoder) — No description in source JSDoc. (GPURenderBundle[]) — No description in source JSDoc. 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


utils/SIMDMath.js

batchAdd(a, b, out = createVec3Batch(a.count)

batchSub(a, b, out = createVec3Batch(a.count)

batchScale(a, scalar, out = createVec3Batch(a.count)

batchMul(a, b, out = createVec3Batch(a.count)

batchDot(a, b, out = new Float32Array(a.count)

batchCross(a, b, out = createVec3Batch(a.count)

batchLengthSq(a, out = new Float32Array(a.count)

batchLength(a, out = new Float32Array(a.count)

batchNormalize(a, out = createVec3Batch(a.count)

batchLerp(a, b, t, out = createVec3Batch(a.count)

batchTransform(batch, m, out = createVec3Batch(batch.count)

batchDistanceToPoint(batch, point, out = new Float32Array(batch.count)

batchDistanceSqToPoint(batch, point, out = new Float32Array(batch.count)

<! 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 Create a batch of vec3s in SoA format Parameters: (number) — Number of vectors Returns: { x, y, z, count } Create batch from array of [x,y,z] vectors Parameters: (Array) — Array of [x,y,z] arrays Returns: SoA batch Convert batch back to array of [x,y,z] Parameters: (Object) — SoA batch Returns: Array of [x,y,z] Batch add: out = a + b Batch subtract: out = a b Batch scale: out = a scalar Batch multiply component wise: out = a b Batch dot product: out[i] = dot(a[i], b[i]) Batch cross product: out = a × b Batch length squared: out[i] = a[i] ² Batch length: out[i] = a[i] Batch normalize: out[i] = normalize(a[i]) Batch lerp: out = lerp(a, b, t) Batch transform by 4x4 matrix Parameters: (Object) — Vec3 batch (Float32Array) — 4x4 matrix (column major) Batch distance to point Parameters: (Object) — Vec3 batch (number[]) — [x, y, z] Returns: Distances Batch distance squared to point (faster, for comparisons) Find indices within radius of point Parameters: (Object) — Vec3 batch (number[]) — [x, y, z] (number) — Search radius Returns: Indices within radius Find K nearest neighbors Parameters: (Object) — Vec3 batch (number[]) — [x, y, z] (number) — Number of neighbors Returns: Indices of K nearest Batch AABB computation Parameters: (Object) — Vec3 batch Returns: { min: [x,y,z], max: [x,y,z] } <! 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


utils/SIMDMath.js


utils/SpatialIndex.js

utils/SpatialIndex.js
Classes
class Octree
class EntitySpatialIndex
Re-exports
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. Classes Simple Octree for dynamic entity queries Better for frequently changing scenes than BVH Method Signature Summary Insert an object into the octree Remove an object by ID Update an object's position Query objects within radius of point Query objects within AABB Query objects within frustum Find nearest object to point Raycast against objects Get statistics about the octree Clear all objects EntitySpatialIndex Manages spatial indexing for editor entities Method Signature Summary Add or update an entity Remove an entity Query entities within radius Query entities within box Query visible entities Find nearest entity Raycast to find entity Clear all entities Get stats 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


utils/TextureCompression.js

getOptimalFormat(adapter, needsAlpha = true)

getQualitySizeScore(width, height, format, options = {})

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: TextureCompression WebGPU compressed texture format support. Supports: BC formats (Desktop: DXT/S3TC) ASTC formats (Mobile/Apple) ETC2 formats (Android/WebGL fallback) Functions Detect supported compressed texture formats. Parameters: (GPUAdapter) — WebGPU adapter Returns: Supported format info Get optimal texture format for device. Parameters: (GPUAdapter) — No description in source JSDoc. (boolean) — Whether alpha channel is needed Returns: GPUTextureFormat Calculate compressed texture size. Parameters: (number) — No description in source JSDoc. (number) — No description in source JSDoc. (string) — No description in source JSDoc. Returns: Size in bytes Calculate memory savings percentage. Calculate a quality size report for picker and audit UI. Create compressed texture with fallback. Parameters: (GPUDevice) — No description in source JSDoc. (GPUAdapter) — No description in source JSDoc. (Object) — Texture descriptor Get format info for display. <! 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


utils/WeakCache.js

utils/WeakCache.js
Classes
class WeakValueMap
class LRUCache
class TTLCache
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. Classes WeakValueMap Map with weak references to values Values are auto removed when garbage collected Method Signature Summary LRUCache Least Recently Used cache with max size Method Signature Summary TTLCache Cache with time to live expiration 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


viewport/AuraRenderer.js

viewport/AuraRenderer.js
Classes
class AuraRenderer
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: AuraRenderer — System 1: Outer Energy Shell / Aura Layer ========================================================= Renders the actual model mesh at slightly expanded scale with electric blue cyan color — same approach as SkinRenderer but bigger and more transparent. No hull approximation needed; the real mesh IS the aura shell. LAYER ROLE: Outermost visible layer — glowing energy field that exactly traces the body shape at AURA SCALE (8% larger than entity scale). VISUAL: Full res model mesh, electric blue cyan [0.2, 0.7, 1.0, 0.15] Scale multiplied by AURA SCALE so it sits slightly outside the skin High roughness for a soft diffuse glow look DATA SOURCE: EntityMeshRenderer already has 'custom <uuid ' registered. No extra work. INDEPENDENCE: No imports needed beyond EntityMeshRenderer (draw) No reference to SkinRenderer, SkeletonRenderer, SDFColliderRenderer 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


viewport/CameraController.js

viewport/CameraController.js
Classes
class CameraController
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. Classes Method Signature Summary Get camera right vector (for billboarding) Get camera up vector (for billboarding) Get camera forward vector (for spatial audio listener orientation) Get view matrix (zero alloc: inlined lookAt math, writes to cached viewMat) Get projection matrix (WebGPU NDC: z in [0,1]) Zero alloc: writes to cached projMat Get view projection matrix (zero alloc) Get inverse view projection matrix (for grid unprojection) Reuses cached viewProj if same aspect ratio (avoids redundant matrix computation) Zero alloc: writes to cached cachedInvViewProj <! 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


viewport/CollabOverlayRenderer.js

viewport/CollabOverlayRenderer.js
Classes
class CollabOverlayRenderer
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: CollabOverlayRenderer.js Renders peer cameras as small 3D camcorder style pyramids in the viewport, with colored tint matching the peer's chosen color and a floating name label. Uses the existing EntityMeshRenderer to draw pyramids (no new GPU pipelines needed). Name labels are HTML overlays positioned via 3D→2D projection. Classes Method Signature Summary Ensure the HTML overlay container exists. Render all peer cameras into the current render pass. Call this AFTER entityMeshRenderer.beginFrame() and BEFORE flush(). Update HTML name labels positioned above each peer's camera. Call once per frame AFTER rendering. <! 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


viewport/GhostPreviewRenderer.js

viewport/GhostPreviewRenderer.js
Classes
class GhostPreviewRenderer
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. Classes Method Signature Summary Render ghost preview at position <! 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


viewport/SDFColliderRenderer.js

viewport/SDFColliderRenderer.js
Classes
class SDFColliderRenderer
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. Classes Method Signature Summary Add an SDF shape to render Add SDF from mesh data automatically chooses best representation Uses caching for frequently used meshes Upload baked SDF data to 3D texture Resize 3D SDF texture Add baked SDF shape instance Clear the SDF cache (call when meshes change) Remove specific mesh from cache (call when entity deleted) Get cache statistics for memory monitoring Trim cache to max size (LRU eviction) Add capsule chain for ragdoll/character bodies <! 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


viewport/ShapeWireframes.js

generateShapeWireframe(meshType, es, ep, er, doRot)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ShapeWireframes.js — Shared shape specific wireframe generators ================================================================ Used by SkeletonRenderer, SkinRenderer, and AuraRenderer to render shape accurate wireframe overlays that match the SDF collider shapes. Each generator returns { joints: [[x,y,z],...], edges: [[i,j],...] } in LOCAL space. The caller transforms to world space. Functions Generate a shape specific wireframe for an entity. Parameters: (string) — e.g. 'sphere', 'cube', 'cylinder', etc. (number[]) — entity scale [sx, sy, sz] (number[]) — entity world position [x, y, z] (number[]) — entity rotation quaternion [x, y, z, w] (boolean) — whether rotation is non identity Returns: } Compute quaternion that aligns Y axis [0,1,0] with direction [dx,dy,dz]. Exported for use in renderers that draw capsule sticks between joints. <! 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


viewport/SkeletonRenderer.js

viewport/SkeletonRenderer.js
Classes
class SkeletonRenderer
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: SkeletonRenderer — System 3: X Ray Skeleton / Bone Layer ========================================================= Renders the internal skeleton as solid physical geometry — gold ball joints at each bone pivot, ivory metallic bone sticks connecting them. Think medical X ray imaging or the internal rig view in a 3D animation tool. LAYER ROLE: Innermost visible layer — inside the skin capsules. Fully opaque metallic geometry. Shows the exact bone hierarchy as a physical rig. VISUAL: Ball joints: gold [1.0, 0.85, 0.3, 1.0], metallic=0.9, roughness=0.15 Bone sticks: ivory [0.95, 0.9, 0.8, 1.0], metallic=0.85, roughness=0.2 Sizes scaled by body height — proportionally correct DATA SOURCE: getAnimatedBoneShapes() → .joints[] (all joint world positions + child links) INDEPENDENCE: Imports ONLY from SkeletalAnimation.js (data) and EntityMeshRenderer (draw) No reference to AuraRenderer, SkinRenderer, SDFColliderRenderer Can be deleted without affecting any other system EDIT MODE vs PLAY MODE: Edit: animated bone joints from getAnimatedBoneShapes() Play (ragdoll): bone positions from live physics bodies Classes Method Signature Summary Render skeleton X ray (joints + bone sticks) for all skinned entities this frame. <! 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


viewport/SkinRenderer.js

viewport/SkinRenderer.js
Classes
class SkinRenderer
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: SkinRenderer — System 2: High Detail Body Skin ================================================ Renders the ACTUAL mesh geometry of the entity, semi transparent, with a warm skin tone. Full triangle count of the imported model — this is NOT a hull approximation. The mesh IS the skin layer. LAYER ROLE: Inner visible layer — shows the real body geometry as a translucent skin shell. Since it uses the same mesh as the actual entity render, it is perfectly shape accurate at full detail. VISUAL: Full res model mesh, warm skin tone [0.9, 0.6, 0.4, 0.28] Rendered via the existing 'custom <uuid ' mesh key already in EntityMeshRenderer No separate mesh registration needed — the mesh is already uploaded DATA SOURCE: EntityMeshRenderer already has the 'custom <uuid ' mesh registered when the entity loads. No separate computation needed — just pass entity transform directly. INDEPENDENCE: No external imports needed beyond EntityMeshRenderer (draw) No reference to AuraRenderer, SkeletonRenderer, SDFColliderRenderer Classes Method Signature Summary Render the actual mesh geometry per entity as a semi transparent skin layer. <! 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


viewport/SurfaceGridRenderer.js

viewport/SurfaceGridRenderer.js
Classes
class SurfaceGridRenderer
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: SurfaceGridRenderer.js GMod style surface grid overlay for precise tool placement Shows a transparent green grid aligned to the surface normal Classes Method Signature Summary Update grid position and orientation Hide the grid Update cursor snap position for visual feedback Snap a world position to the grid Get the snapped position without surface offset (for attachment detection) Transform world position to grid local space Transform grid local position to world space Get tangent vector perpendicular to normal Cross product Generate grid vertices that conform to surface geometry Rotate a vector around an axis by an angle Uses Rodrigues' rotation formula Project a world position onto the surface using raycasting Raycast against world geometry Raycast against a single entity (sphere intersection) Create grid transform matrix Render the grid Render cursor snap position indicator Cleanup GPU resources <! 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


viewport/ViewportMeshUtils.js

getEntityMeshTypes(entityMeta, fallbackMeshType = null)

getEntityMeshParts(entityMeta, fallbackMeshType = null)

getModelPartLocalMatrix(part, animatedMatrix = null)

composeEntityPartMatrix(position, rotation, scale, part, animatedMatrix = null)

getAggregateMeshBounds(entityMeta, meshRenderer, fallbackMeshType = null, resolveAnimatedMatrix = null)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ViewportMeshUtils Mesh type inference and color mapping utilities Extracted from Viewport.js for modularity Functions Get lowercase spawnId for an entityMeta (no caching — small string allocs are cheaper than WeakMap GC overhead) Check if entityMeta represents an emitter Get PBR material properties for a mesh type Parameters: (string) — No description in source JSDoc. Returns: [roughness, metallic] Infer mesh type and color from entity metadata Results are cached for performance Parameters: (Object) — Entity metadata with meshType, spawnId, name Returns: } Clear mesh type cache (call when entities are added/removed/renamed) Snap a value to grid Parameters: (number) — Value to snap (number) — Grid size (boolean) — Whether snapping is enabled Returns: Snapped value 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


viewport/ViewportProfiler.js

viewport/ViewportProfiler.js
Classes
class ViewportProfiler
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ViewportProfiler Performance profiler UI for the viewport Extracted from Viewport.js for modularity Classes Method Signature Summary Collect all stage timings from pipeline.getTimings() merged with old beginStage/endStage render phase timings still in renderFrame(). Returns { phases: Map<phaseName, totalMs , stages: Map<stageName, {phase, ms} } <! 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


viewport/ViewportRaycasting.js

rayGroundPlaneIntersect(rayOrigin, rayDir, planeY = 0)

raySegmentDistance(rayOrigin, rayDir, segA, segB)

raySphereIntersect(rayOrigin, rayDir, sphereCenter, radius)

rayOBBIntersect(rayOrigin, rayDir, boxCenter, boxRotation, halfExtents)

closestPointOnAxis(rayOrigin, rayDir, axisOrigin, axisDir)

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: ViewportRaycasting.js Pure raycasting math utilities Extracted from Viewport.js for modularity Functions Ray ground plane intersection Parameters: (number[]) — Ray origin [x, y, z] (number[]) — Ray direction (normalized) [x, y, z] (number) — Y coordinate of ground plane Returns: null} Calculate distance from ray to line segment (for rope picking) Parameters: (number[]) — Ray origin (number[]) — Ray direction (number[]) — Segment start point (number[]) — Segment end point Returns: null} Ray sphere intersection test Parameters: (number[]) — Ray origin (number[]) — Ray direction (number[]) — Sphere center (number) — Sphere radius Returns: Distance to hit or null Rotate a point by quaternion Parameters: (number[]) — Point [x, y, z] (number[]) — Quaternion [x, y, z, w] Multiply two quaternions: result = a b Parameters: (number[]) — First quaternion [x, y, z, w] (number[]) — Second quaternion [x, y, z, w] Ray OBB (Oriented Bounding Box) intersection Parameters: (number[]) — Ray origin (number[]) — Ray direction (number[]) — Box center (number[]) — Box rotation quaternion [x, y, z, w] (number[]) — Box half extents [x, y, z] Returns: null} Closest point on axis from ray Parameters: (number[]) — Ray origin (number[]) — Ray direction (number[]) — Axis origin (number[]) — Axis direction 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


viewport/stages/FixedStepStages.js
Functions
registerFixedStepStages(pipeline, vp)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: FixedStepStages — Physics, elastic drag, sim audio, particle step. These run 0..N times per frame on a fixed timestep accumulator. Only active in play mode (condition gated). Functions Register all fixedStep phase stages into the pipeline. Parameters: (import('../../../../engine/core/framepipeline/FramePipeline.js').FramePipeline) — No description in source JSDoc. (import('../panels/Viewport.js').ViewportPanel) — 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


viewport/stages/PostRenderStages.js
Functions
registerPostRenderStages(pipeline, vp)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: PostRenderStages — Composite passes, post FX, GPU submit, profiler, spike detection, collab presence. During the transitional period, post render work still lives inside Viewport.renderFrame(). These stages will be populated one by one as code is extracted. Functions Register all postRender phase stages into the pipeline. Parameters: (import('../../../../engine/core/framepipeline/FramePipeline.js').FramePipeline) — No description in source JSDoc. (import('../../panels/Viewport.js').ViewportPanel) — 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


viewport/stages/RenderStages.js
Functions
registerRenderStages(pipeline, vp)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: RenderStages — GPU render pass stages: debug targets, volume compute, clear pass, grid, entities, physics lines, cloth, surface grid, particles, diagnostics, SDF colliders, bone directions, gizmos. During the transitional period, the main renderFrame() body still runs inline. These stages will be populated one by one as code is extracted from Viewport.renderFrame(). Stage order values reserve gaps (10, 20, 30…) so new stages can be inserted between existing ones without renumbering. Functions Register all render phase stages into the pipeline. Parameters: (import('../../../../engine/core/framepipeline/FramePipeline.js').FramePipeline) — No description in source JSDoc. (import('../../panels/Viewport.js').ViewportPanel) — 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


viewport/stages/UpdateStages.js
Functions
registerUpdateStages(pipeline, vp)
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: UpdateStages — Per frame update logic: timing, vGPU, camera, matrices, lights, animation, frustum, collab, stats UI, cleanup. Runs once per frame before GPU render passes. Functions Register all update phase stages into the pipeline. Parameters: (import('../../../../engine/core/framepipeline/FramePipeline.js').FramePipeline) — No description in source JSDoc. (import('../../panels/Viewport.js').ViewportPanel) — 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


workers/CollabSignalWorker.js

workers/CollabSignalWorker.js
Exports
Notes & Examples
Editor Extension System

<! AUTOGENERATED by tools/extract api.py — content above HUMAN NOTES is overwritten Source: CollabSignalWorker.js — SharedWorker In memory SDP relay for all editor tabs on the same machine. Runs once per origin, shared across all tabs. Message types (client → worker): HELLO { peerId, username } OFFER { from, to, offerId, payload } ANSWER { from, to, offerId, payload } CANDIDATE { from, to, offerId, payload } LEAVE { peerId } LIST (request peer list) Message types (worker → client): HELLO ACK { peerId, peers: [{peerId, username}] } PEER JOINED { peerId, username } PEER LEFT { peerId } OFFER { from, to, offerId, payload } ANSWER { from, to, offerId, payload } CANDIDATE { from, to, offerId, payload } LIST { peers: [{peerId, username}] } 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