Skip to content

Commit e048be0

Browse files
Initial public commit
0 parents  commit e048be0

273 files changed

Lines changed: 43453 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?

.vscode/extensions.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]
3+
}

ARCHITECTURE.md

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Architecture
2+
3+
## Architectural Intent
4+
5+
libration is a precision-rendered world time instrument built on a **render-plan-driven architecture**.
6+
7+
All visual output is expressed as explicit render intent (RenderPlan) before backend execution.
8+
9+
Core goals:
10+
- Renderer-agnostic rendering semantics
11+
- Deterministic visual output
12+
- Strict separation of concerns
13+
- High perceptual fidelity
14+
- Future multi-backend support (Canvas, GPU)
15+
16+
---
17+
18+
## Top-Level Subsystems
19+
20+
### 1. App Shell
21+
Owns:
22+
- UI state
23+
- preset selection
24+
- config lifecycle
25+
- render loop orchestration
26+
27+
Produces:
28+
- SceneRenderInput
29+
30+
---
31+
32+
### 2. Core Model
33+
Pure domain logic:
34+
- time context
35+
- solar/lunar math
36+
- projection
37+
38+
Renderer-agnostic and deterministic.
39+
40+
---
41+
42+
### 3. RenderPlan System (CORE)
43+
44+
All rendering flows through:
45+
46+
**Plan Builders → RenderPlan → Executor**
47+
48+
#### Responsibilities
49+
50+
| Layer | Responsibility |
51+
|------|--------------|
52+
| Plan Builders | Resolve geometry, styling, ordering |
53+
| RenderPlan | Declarative render intent |
54+
| Executor | Mechanical drawing only |
55+
56+
---
57+
58+
### RenderPlan Primitives
59+
60+
- rect
61+
- line
62+
- text (fill + optional stroke/shadow)
63+
- path2d (+ optional clip: Path2D or descriptor payload)
64+
- linearGradientRect
65+
- radialGradientFill
66+
- rasterPatch (generated RGBA)
67+
- imageBlit (URL-backed image)
68+
69+
Key distinction:
70+
- rasterPatch = computed pixels
71+
- imageBlit = external asset reference
72+
73+
---
74+
75+
### 4. Renderer Backend
76+
77+
CanvasRenderBackend owns:
78+
- DPR setup
79+
- clearing
80+
- layer dispatch
81+
- image lifecycle (load/cache/repaint)
82+
83+
It MUST NOT:
84+
- contain product semantics
85+
- decide geometry or layout
86+
87+
---
88+
89+
### 5. Display Chrome (NON-LAYER)
90+
91+
- top instrument band
92+
- lower overlay
93+
94+
Rendered via RenderPlan but orchestrated outside the layer system.
95+
96+
---
97+
98+
### 6. Layer System
99+
100+
Each layer:
101+
- pure function of time + config
102+
- produces renderable state
103+
- feeds plan builders
104+
105+
---
106+
107+
## Rendering Flow
108+
109+
1. App builds SceneRenderInput
110+
2. Layers resolve state
111+
3. Plan builders emit RenderPlans
112+
4. Executor renders primitives
113+
5. Chrome rendered in second pass
114+
115+
---
116+
117+
## Boundary Rules
118+
119+
Strict separation:
120+
- UI
121+
- Layers
122+
- RenderPlan builders
123+
- Backend execution
124+
- Resource lifecycle
125+
126+
---
127+
128+
## Architectural Status
129+
130+
Renderer-agnostic preparation is **COMPLETE**.
131+
132+
All major rendering categories:
133+
- chrome
134+
- vector overlays
135+
- text overlays
136+
- markers
137+
- raster overlays
138+
- base map
139+
140+
are now RenderPlan-driven.
141+
142+
Future work builds on this foundation.

0 commit comments

Comments
 (0)