comparison infinite_canvas/docs/entities-and-components.md @ 280:49e9e591c9bb

Add persistent dictation, prewarmed WebRTC speech input, Copilot SDK routing, animated conversation lifecycle controls, parking, and architecture coverage.
author MrJuneJune <me@mrjunejune.com>
date Tue, 18 Aug 2026 19:14:53 -0700
parents 8d560f50ed4c
children c57149ad216e
comparison
equal deleted inserted replaced
279:b3b547563ec7 280:49e9e591c9bb
5 `Canvas_Scene` stores an arena-backed array of `Canvas_Entity`. Each entity has: 5 `Canvas_Scene` stores an arena-backed array of `Canvas_Entity`. Each entity has:
6 6
7 - a stable `id` for external resources such as browser views; 7 - a stable `id` for external resources such as browser views;
8 - `type`, world `position`, and world `size`; 8 - `type`, world `position`, and world `size`;
9 - generic semantic fields: `text`, `value`, and `active`; 9 - generic semantic fields: `text`, `value`, and `active`;
10 - optional rich-context fields such as a conversation title and agent working
11 state;
10 - interaction/animation state; 12 - interaction/animation state;
11 - pinning state in both world and screen coordinates. 13 - pinning state in both world and screen coordinates.
12 14
13 The scene is retained, but the draw list is rebuilt every frame. This keeps 15 The scene is retained, but the draw list is rebuilt every frame. This keeps
14 interaction and context state stable while allowing normal Raylib immediate-mode 16 interaction and context state stable while allowing normal Raylib immediate-mode
16 18
17 Each entity also owns lifecycle state. `visibility_amount` eases from zero to 19 Each entity also owns lifecycle state. `visibility_amount` eases from zero to
18 one after creation. Delete and developer Clear mark entities as `removing`, ease 20 one after creation. Delete and developer Clear mark entities as `removing`, ease
19 them back to zero, then compact the retained array. Raylib colors, native CEF 21 them back to zero, then compact the retained array. Raylib colors, native CEF
20 texture tints, and WebAssembly overlay opacity all consume the same eased value. 22 texture tints, and WebAssembly overlay opacity all consume the same eased value.
23
24 Treat animation as part of every entity state transition, not optional polish.
25 State changes set retained targets; frame updates ease visual geometry and
26 opacity toward those targets. Do not snap expandable, collapsible, selected,
27 hovered, created, removed, or otherwise stateful entities between layouts.
28 Conversation collapse/expand uses the same smoothstep height interpolation as
29 accordions, while preserving its final semantic `active` state for context.
21 30
22 ## Adding a component 31 ## Adding a component
23 32
24 Wire every relevant surface, not only drawing: 33 Wire every relevant surface, not only drawing:
25 34
45 54
46 Input is resolved from most specialized to most general: 55 Input is resolved from most specialized to most general:
47 56
48 - developer UI; 57 - developer UI;
49 - focused native CEF content; 58 - focused native CEF content;
59 - the canvas URL editor or local dictation bridge;
50 - hovered/pressed scene entity; 60 - hovered/pressed scene entity;
51 - camera. 61 - camera.
52 62
53 Open developer dropdowns are modal because Raygui draws their item list beyond 63 Open developer dropdowns are modal because Raygui draws their item list beyond
54 the panel rectangle and consumes outside clicks to close. While one is open, 64 the panel rectangle and consumes outside clicks to close. While one is open,