@holtjs/stage 0.0.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,82 @@
1
+ # `@holtjs/stage` Subpath API Quick Reference
2
+
3
+ All symbols verified against `src/*.ts` (`@holtjs/stage@0.4.0`, 15 subpaths).
4
+
5
+ ## `@holtjs/stage` (Core Engine Barrel)
6
+ - **Bootstrap & Lifecycle**: `Stage` / `Stage2D` (namespaces), `AUTO`, `WEBGPU`, `WEBGL`, `CANVAS`, `Scale`, `Scenes`, `Game`, `Scene`, `SceneManager`, `ScaleManager`, `GameLoop`, `EngineClock`, `LoaderPlugin`, `JsonCache`, `GameObjectFactory` (`scene.add.instancedBatch`, `customPass`, `panel`, etc.)
7
+ - **Display Graph**: `DisplayList`, `DisplayObject`, `Container`, `ImageObject`, `NineSliceObject`, `TileSpriteObject`, `RectangleObject`, `PanelObject`, `MsdfIconObject`, `TextObject`, `Graphics`, `BlitterObject`, `InstancedBatchObject`, `CustomPassObject`
8
+ - **Renderers & GPU Batchers**: `RendererWebGpu`, `requestWebGpuDevice`, `RendererGl`, `Renderer2D`, `SdfPanelBatcher`, `MsdfIconBatcher`, `PixelAaBatcher`, `Camera` (`.configureHiDpi()`, `.startFollow()`, `.stopFollow()`, `.screenToWorld()`, `.worldToScreen()`), `Texture`, `CanvasTexture`, `TextureSource`, `Frame`, `TextureManager`
9
+ - **Kernel & Input**: `StageKernel`, `ActionMap`, `createInputTimeline`, `createInputRecorder`, `createInputReplay`, `EventEmitter`, `Pointer`, `KeyboardPlugin` (`.isDown()`, `.justPressed()`, `.justReleased()`, `.injectKey()`), `InputPlugin`
10
+ - **Math & Color**: `BlendModes` (`NORMAL`, `ADD`, `MULTIPLY`, `SCREEN`), `TintModes`, `FilterMode`, `WHITE_RGB`, `BLACK_RGB`, `HEX_MASK`, `createMatrix2D`, `parseColor`, `rgbToCss`, `packColorAbgr`
11
+ - **Bundled UI/Observability Re-exports**: `computeFlexLayout`, `computeWrapLayout`, `resolvePadding`, `Easings`, `TweenManager`, `VirtualJoystick`, `clampJoystickOrigin`, `computeJoystickVector`, `isInJoystickZone`, `pullJoystickOrigin`, `quantizeJoystickDpad`, `SURFACE_BAND`, `createSurfaceTree`, `resolveSurfacePriority`, `surfacePriorityToDomZ`, `computeSurfaceDomZ`, `buildSceneDigest`, `sanitizeTrackToken`
12
+
13
+ ## `@holtjs/stage/flex` (~2.3 kB gz · zero DOM)
14
+ - `resolvePadding(p)`
15
+ - `computeFlexLayout(container, items)` -> `FlexResult` (`{ w, h, rects }`)
16
+ - `computeWrapLayout(container, items)` -> `WrapResult` (`{ w, h, rects }`)
17
+ - Types: `FlexDir`, `FlexAlign`, `FlexJustify`, `FlexPadding`, `FlexContainerSpec`, `FlexItemSpec`, `FlexItemRect`, `FlexResult`, `WrapJustify`, `WrapContainerSpec`, `WrapItemSpec`, `WrapItemRect`, `WrapResult`
18
+
19
+ ## `@holtjs/stage/tween` (~1.4 kB gz · zero DOM)
20
+ - `TweenManager`: `.to(opts)` (and `.add(opts)` alias), `.spring(opts)`, `.step(deltaMs)`, `.clear()`, `.stats()`
21
+ - `Easings`: standard easing functions (`linear`, `inQuad`, `outQuad`, `inOutQuad`, `inCubic`, `outCubic`, `inOutCubic`, `outQuart`, `inOutSine`, `outBack`)
22
+ - Types: `EasingFn`, `EasingName`, `DisposableOwner`, `TweenOptions`, `SpringOptions`, `TweenHandle`, `SpringHandle`, `TweenStats`
23
+
24
+ ## `@holtjs/stage/joystick` (~4.4 kB gz)
25
+ - `VirtualJoystick` (multi-touch `pointer.id`-isolated floating/fixed joystick)
26
+ - Pure math helpers (zero DOM): `computeJoystickVector`, `isInJoystickZone`, `clampJoystickOrigin`, `pullJoystickOrigin`, `quantizeJoystickDpad`
27
+ - Types: `VirtualJoystickMode`, `JoystickVector`, `JoystickState`, `JoystickZoneRect`, `JoystickZonePredicate`, `JoystickZone`, `JoystickViewport`, `VirtualJoystickStyle`, `JoystickDpad`, `JoystickDpadOptions`, `VirtualJoystickOptions`
28
+
29
+ ## `@holtjs/stage/surfaces` (~2.2 kB gz · zero DOM)
30
+ - `SURFACE_BAND`: ordered layer bands (`world`, `hud`, `panel`, `sheet`, `modal`, `popover`, `toast`, `fullscreen`, `system`)
31
+ - `createSurfaceTree()` -> `SurfaceTree` (`.register()`, `.active()`, `.topBarrier()`, `.isWorldBlocked()`, `.dispatchCancel()`, `.dispatchKey()`, `.dispatchFocus()`)
32
+ - DOM z-index projection: `resolveSurfacePriority`, `surfacePriorityToDomZ`, `computeSurfaceDomZ`
33
+ - Types: `SurfaceBandName`, `SurfaceBand`, `SurfaceScope`, `SurfaceBarrier`, `SurfaceNodeInput`, `SurfaceNodeInfo`, `SurfaceDomEntry`, dispatch context & result types
34
+
35
+ ## `@holtjs/stage/trace` (~1.9 kB gz · zero DOM)
36
+ - `buildSceneDigest(scene, opts?)` -> `SceneDigest` (PII-free snapshot: `clock`, `viewport`, `renderer`, `lifecycle`, `tweens`, `overlays`, `surfaces`, `sandbox`, `nodes`)
37
+ - `sanitizeTrackToken(token)`
38
+
39
+ ## `@holtjs/stage/spatial` (~1.2 kB gz · zero DOM)
40
+ - `SpatialHashGrid`: `.rebuild(count, xs, ys)`, `.queryRect(minX, minY, maxX, maxY, visitor)`, `.queryRadius(cx, cy, r, xs, ys, visitor)`, `.accumulateSeparation(selfIdx, x, y, minDist, xs, ys, out)`
41
+ - Functional helpers: `createSpatialHashBuffers`, `rebuildSpatialHash`, `querySpatialNeighborhood`, `querySpatialRadius`, `querySpatialRect`, `accumulateSpatialSeparation`
42
+ - Types: `Vec2`, `SpatialHashBuffers`, `SpatialHashOptions`
43
+
44
+ ## `@holtjs/stage/hit` (~1.1 kB gz · zero DOM)
45
+ - Continuous & geometric hit tests: `sweptCircleHit(ax, ay, sx, sy, cx, cy, radius)` (displacement `(sx, sy)`, returns `t in [0, 1]` or `-1`), `arcSweepFirstContact`, `arcSweepTouches`, `circleOverlapsCircle`, `aabbOverlapsAabb`, `circleOverlapsAabb`, `pointToSegmentDistSq`, `segmentHitsCircle`, `capsuleHitsCircle`
46
+ - Collision push-out & knockback: `resolveCircleObstacles`, `resolveCircleAabb`, `knockbackDecay`, `knockbackInitialSpeed`, `stepKnockback`
47
+ - Types: `Point2`, `CircleObstacle`, `RectBounds`
48
+
49
+ ## `@holtjs/stage/nav` (~2.3 kB gz · zero DOM)
50
+ - Multi-target FlowField: `buildCircleObstacleGrid`, `buildTileWalkGrid`, `computeFlowField`, `isFlowLineClear`, `sampleFlowStep`, `FlowFieldGrid` (`.compute(slot, tx, ty)`, `.sample(slot, x, y, tx, ty, dist?, opts?)` -> `[wx, wy] | null`)
51
+ - Point-to-point grid pathfinding: `hasGridLineOfSight`, `findGridPath`, `steerToward`
52
+ - Types: `TileWalkable`, `CircleGridOptions`, `FlowSampleOptions`, `GridLosOptions`, `GridPathOptions`
53
+
54
+ ## `@holtjs/stage/particles` (~3.0 kB gz · zero DOM)
55
+ - Shapes & fade curves: `PARTICLE_RECT`, `PARTICLE_SPARKLE`, `PARTICLE_BUBBLE`, `PARTICLE_WAKE`, `FADE_PUNCH`, `FADE_SINE`, `FADE_FLICKER`, `FADE_EASE`, `FADE_LINEAR`, `FLAG_SIZE_POP`
56
+ - `ParticlePool`: `.spawn(opts)`, `.burst(x, y, opts)`, `.sparks(x, y, opts)`, `.puff(x, y, opts)`, `.step(dt, nowMs)`, `.activeCount`
57
+ - `drawParticlePool(gfx, pool)`
58
+ - `AmbientEmitterPool`: `.setEmitters(specs)`, `.step(dt, nowMs, view, opts?)`
59
+ - `JuiceController`: `.hitstop(ms, nowMs, cooldownMs?)`, `.shake(trauma)`, `.tick(deltaMs, nowMs)` -> effective `dt` (updates `.ox`, `.oy`, `.trauma`)
60
+
61
+ ## `@holtjs/stage/audio` (~4.0 kB gz · zero DOM)
62
+ - Procedural Foley DSP: `renderFoley`, `renderFoleyVariants`, `createVariantPicker`, `buildSwimStrokeFoley`, `buildDiveInFoley`, `buildClimbOutFoley`, `buildStepWoodFoley`, `buildStepGrassFoley`, `buildStepSandFoley`, `buildStepStoneFoley`, `buildStepSoftFoley`
63
+ - Synth & Spatial Audio: `midi`, `noteNum`, `hz`, `synthVoice`, `tune`, `renderVoices`, `spatialMix`, `encodeWavPcm16`, `mulberry32`, `onePoleAlpha`, `softClipSample`
64
+
65
+ ## `@holtjs/stage/ecs` (~3.5 kB gz · zero DOM)
66
+ - Entity & Schema: `defineComponent(name, schema)`, `entityIndex(id)`, `entityGeneration(id)`
67
+ - `SoaWorld`: `.spawn()`, `.despawn(e)`, `.alive(e)`, `.slotOf(e)`, `.entityAt(slot)`, `.register(def)`, `.store(def)`, `.maskOf(...defs)`, `.add(e, def, init?)`, `.remove(e, def)`, `.has(e, def)`, `.query(includeMask, outSlots, excludeMask?)`, `.syncSpatial(xCol, yCol, opts)`, `.queryRadius(...)`, `.queryRect(...)`, `.clear()`, `.stats()`
68
+ - 2.5D Sorting & Instanced Bands: `sortSlotsByDepth(slots, count, depthCol, tieCol?)`, `cullAndSortSlots(...)`, `partitionDepthBands(sortedSlots, sortedCount, depthCol, blockerDepths, blockerCount, outBands)`
69
+ - Types: `ComponentFieldType`, `ComponentSchema`, `ComponentColumns`, `ComponentDef`, `EntityId`, `DepthBand`, `EcsSpatialOptions`, `SoaWorldStats`
70
+
71
+ ## `@holtjs/stage/headless`
72
+
73
+ - Functions: `createHeadlessStage` (with `.step()`, `.fastForward()`, `.pointerDown/Move/Up()`, `.keyDown/Up()`, `.recordFrames()`), `renderStoryboard`, `createAudioTimeline`
74
+ - Types: `HeadlessCanvasLike`, `CreateHeadlessCanvas`, `HeadlessStageOptions`, `HeadlessRecordedFrame`, `RecordFramesOptions`, `HeadlessStage`, `StoryboardOptions`, `StoryboardResult`, `AudioCueOptions`, `AudioTimelineOptions`, `AudioTimeline`
75
+
76
+ ## `@holtjs/stage/kernel` (~2.8 kB gz · zero DOM)
77
+ - Classes & Factories: `StageKernel`, `ActionMap`, `createInputTimeline` (click by `trackId` or `{ x, y }`, drag, `pressKey`, `typeText`, optional visual cursor), `createInputRecorder`, `createInputReplay`
78
+ - Types: `StagePlugin`, `InputProvider`, `StageInputEvent`, `InputTargetSpec`, `InputTimelineOptions`, `InputTimelinePlugin`, `InputRecorderPlugin`, `RecordedInputEntry`
79
+
80
+ ## `@holtjs/stage/webgpu` (~3.8 kB gz)
81
+ - `RendererWebGpu`, `requestWebGpuDevice(canvas, opts)`
82
+ - Types: `WebGpuDeviceLike`, `WebGpuCanvasContextLike`, `RendererWebGpuOptions`, `RequestWebGpuOptions`, `WebGpuBootstrapResult`