Skip to content

Add deterministic scene layout - #5

Merged
konojunya merged 1 commit into
mainfrom
jj/add-scene-layout
Sep 3, 2026
Merged

Add deterministic scene layout#5
konojunya merged 1 commit into
mainfrom
jj/add-scene-layout

Conversation

@konojunya

Copy link
Copy Markdown
Member

背景

Task 12 requires a renderer-independent scene model whose node and nested-group geometry is deterministic across native and WebAssembly targets. The engine previously stopped at the facade boundary and did not validate layout feasibility.

実装方法

  • Add fixed-width integer scene geometry, catalog-only font measurement, recursive node/group sizing, and explicit padded content rectangles.
  • Implement right, down, same-rank, cross-axis order, and a documented per-scope automatic direction policy.
  • Validate containment, positive bounds, identifier uniqueness, and sibling non-overlap from check and valid render attempts.
  • Add an ADR, canonical complete-semantics scene snapshot, browser-target build, and a shared numeric fixture executed in both native and WASI test binaries.

テスト方法

  • cargo +stable test --workspace --locked
  • canonical formatter and scene conformance tests against the pinned specification revision
  • native and wasm32-wasip1 numeric parity test with Wasmtime 48.0.1
  • wasm32-unknown-unknown engine build
  • stable and Rust 1.85 Clippy with warnings denied
  • rustdoc with warnings denied
  • llvm-cov: 97.00% lines, 97.66% functions, 95.86% regions

Review 視点 / 懸念点

  • Automatic direction intentionally resolves to right for up to three direct children and down for four or more, independently in every nested scope.
  • Geometry uses milli-pixel i64 values and no platform font APIs. Adapter-level full-output parity remains scoped to the later WASM adapter task.
  • The scene remains internal so edge routing and SVG serialization can extend it without exposing a premature public API.

@konojunya
konojunya merged commit 9918d5f into main Sep 3, 2026
2 checks passed
@konojunya
konojunya deleted the jj/add-scene-layout branch September 3, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant