view infinite_canvas/docs/README.md @ 281:c57149ad216e default tip

Copilot-Session: f68442b1-fa8f-46a0-9689-81710613bbd4
author MrJuneJune <me@mrjunejune.com>
date Tue, 18 Aug 2026 22:18:15 -0700
parents 49e9e591c9bb
children
line wrap: on
line source

# Infinite Canvas Agent Wiki

Use this tree before changing rendering, entities, pinning, or context:

```text
Infinite Canvas
├── Rendering surfaces
│   ├── Raylib world primitives and UI components
│   ├── Raylib-generated Lucide vectors
│   ├── Native CEF image/web textures
│   └── WebAssembly DOM image/iframe overlays
├── Entity model and extension path
│   ├── defaults and retained state
│   ├── picking, interaction, and drawing
│   └── semantic context serialization
├── Screen-space behavior
│   ├── camera transforms
│   ├── pinned entities
│   └── notification stacking
├── Spatial agent sessions
│   ├── WebRTC dictation bridge
│   ├── asynchronous Copilot SDK orchestration
│   └── retained conversation entities
└── Session lineage
    ├── original renderer
    └── scalability, images, pinning, context, and icons
```

- [Rendering surfaces](rendering.md)
- [Entities and components](entities-and-components.md)
- [Pinning and visible context](pinning-and-context.md)
- [Dictation and spatial agent sessions](agent-sessions.md)
- [Session lineage](session-lineage.md)

## Runtime frame order

`main.c` owns the integration order:

1. Update viewport dimensions.
2. Handle dictation and selected browser chrome.
3. Let native web surfaces translate focused input.
4. Update scene interaction and keyboard focus.
5. Submit or poll asynchronous agent work.
6. Apply camera pan/zoom and reproject pinned entities.
7. Reconcile web/image resources with visible entities.
8. Draw each Raylib entity and its owning native/DOM surface in scene order.
9. Draw world overlays and the developer UI.

Preserve this order. In particular, pinned positions must be synchronized before
surface bounds are calculated, and native surface textures must draw after the
Raylib entity frames.