1.5 KiB
1.5 KiB
Rendering And Viewport
What It Does
This subsystem draws the active world or map, manages Pixi chunk surfaces, keeps chunk visibility in sync with the viewport, and overlays debug and selection information on top of the scene.
Key Files
src/worldshaperStudio/renderController.tssrc/worldshaperStudio/pixiTileStageController.tssrc/worldshaperStudio/pixiSceneRebuildHelpers.tssrc/worldshaperStudio/pixiChunkSurfaceHelpers.tssrc/worldshaperStudio/overlayRenderer.ts
Endpoints It Uses
- none directly; it consumes already-loaded document and chunk data
Important Data And Rules
- chunk surfaces are built per layer and per chunk
- viewport movement drives visible chunk culling
- Pixi visibility is separate from data caching
- debug snapshots expose visible chunk counts and renderer state
Invariants And Constraints
- rendering changes must respect layer visibility
- the viewport can hide chunk sprites without unloading their cached data
- background tile behavior is special for base-layer rendering
- performance work needs profiling because rendering cost and fetch cost are different problems
Common Request Themes
- rendering performance
- chunk culling
- animation playback in-world
- background drawing behavior
- viewport glitches on very large worlds
Triage Questions
- Is the request about data load, or only about drawing what is already loaded?
- Is the issue specific to Pixi chunk surfaces?
- Does it reproduce only at certain zoom levels or viewport sizes?