10 · Live Preview Canvas Nodes, CAD Explode View & 3D Isometric Orbit#
LeanUI Studio extends standard 2D node-and-wire editing into live visual composition and spatial 3D inspection through three tightly integrated capabilities:
- Live Preview Canvas Nodes (
app_preview&template_preview) — embed live interactive App Views and Control Template previews directly inside the normal node graph. - CAD Exploded Assembly View (
❖ Explode) — inspect your entire module or multi-module Solution as a 4-plane 3D architectural explosion with live UI parts, glowing signal beams, and an interactive Bill of Materials (BOM). - 3D Isometric Orbit Timeline (
🧊 3D Orbit) — stack every recorded runtime state frame in 3D space with animated Action, State Mutation, and Computed Cascade flow arcs synced to the time-travel debugger.
All 3D spatial stages share a Front-based (+Z = FRONT, -Y = TOP, +X = RIGHT) unlimited 360° quaternion camera, an AutoCAD-style 3DFORBIT interactive ring, and a live AutoCAD 3D ViewCube with 26 clickable face/edge/corner snap zones.
1. Live Preview Canvas Nodes (app_preview & template_preview)#
You no longer need to switch away from the graph canvas to see how your ViewModel, View hierarchy, or Control Templates look and behave.
Adding Preview Nodes to the Canvas#
- Open
+ Nodein the topbar or drag from the Node Palette under Scale, Routing & Live Canvas Previews:app_preview(Live App View Preview): Renders an interactive mini application directly inside a resizable graph node. Clicking buttons, editing inputs, or toggling controls inside the node dispatches real actions, mutates live runtime state, updates the Timeline, and propagates cross-modulestate_sync/eventlinks.template_preview(Control Template Preview): Renders anycontrol_template(built-in or custom) inline on the canvas with live Light/Dark surface styling, resource token resolution, and state/slot simulation.
Cross-Module Previews, Responsive Resizing & Viewport Presets#
- Set
targetModuleIdin the Property Inspector to preview any other module in your Solution (including cross-modulemodule_refresolution). - Wire
source,state,style, ortemplateports directly into a preview node to visually anchor live previews beside the ViewModel or Design tokens that drive them. - 8-Handle Direct Resizing (up to
1400 × 1000forapp_preview,960 × 760fortemplate_preview): Drag any edge or corner handle right on the canvas to expand or shrink a live preview node with 60fps responsive reflow, magnetic smart guides,Shiftaspect-ratio lock,Altcenter-anchored scaling, and liveW × Hreadout. - One-Click Device Viewport Presets: Click
Mob(375×520),Tab(560×440),Desk(760×500), orWide(960×580) directly inside the preview node header (orCmp–Widein the Inspector) to test responsive layouts inline on the graph canvas. - Resize Behavior (
ReflowvsScale): ToggleReflow(reflows responsive CSS grids/columns inside the new width) vsScale(scales the rendered UI proportionally like a live zoomed frame) directly in the preview node bar or Inspector. - Content-Aware Auto-Fit (
⊡ Fit): Click⊡ Fitin the preview header or double-click any resize handle to measure the actual rendered UI DOM and snap the preview card tightly around its live content. - Toggle Compact / Normal / Touch density from the topbar to keep inline preview cards crisp at any zoom level.
2. CAD Exploded Assembly View (❖ Explode)#
Switch to ❖ Explode in the center stage mode bar to explode the active module (or entire Solution) into 4 architectural depth planes.
Scopes#
| Scope | What It Explodes |
|---|---|
◈ Module CAD | Explodes all nodes of the active module across 4 architectural layers: L0 · State, Data & Proofs (blue), L1 · Logic, Actions & Flow (amber), L2 · Design & Templates (magenta), and L3 · Exploded Live UI Parts (cyan). |
⬡ App Flow CAD | Explodes every module across the entire multi-project Solution, linking shared ViewModels, Design tokens, Data modules, and Live Screen previews with cross-module workflow beams. |
Interactive Controls & CAD BOM#
- Orientation (
▥ Front/▤ Floor) &Tilt(0°–90°):▥ Front(0°, default): Layers stand upright facingFRONT(+Z) so every UI control, badge, and label is upright and legible at a crisp18° / -28°isometric angle.▤ Floor(90°): Tilts the entire assembly into a horizontal floor-to-roof stack (L0on the floor →L3at the top, framed at48° / -22°).- Drag
Tiltto any custom angle between0°and90°— connector beams and auto-fit recompute with exact 3D math.
ExplodeSlider (0%–100%): Dynamically expands or collapses Z-plane spacing and radial card spread.- Layer Filter Chips (
L0–L3): Toggle individual architectural layers on/off; the camera automatically refits to visible planes. - Display Toggles:
Beams(3D projected SVG signal connectors),#Parts(CAD part callout numbers#01..#NN),X-Ray(translucent glass elevation planes), and⚙ BOM(right-side CAD Assembly Bill of Materials). - Live Interaction Inside Exploded Parts: Click live action buttons directly on
L3UI cards to trigger state changes and watchL0state values,L1computeds, andL3progress bars/stats update in real time. - CAD BOM Inspector: Select any part on the canvas or in the BOM to isolate its upstream (
Driven By) and downstream (Drives) causal signal cone, then click◎ Frame(smoothly zoom/center on the part),◈ Graph(jump to 2D Graph node),λ Lean(jump to generated Lean 4 line), or↗ Open(open module tab in App Flow CAD).
3. 3D Isometric Orbit Timeline (🧊 3D Orbit)#
Switch to 🧊 3D Orbit (or click 🧊 3D Orbit → from Explode View) to inspect your application's state evolution over time as stacked 3D UI frames.
Recording & Scrubbing Frames#
- Click any
⚡ Actionbutton in the toolbar to dispatch a single state transition and append a new 3D frame slab. - Click
✦ Record Sequenceto automatically capture a 4-step sequence of transitions into the 3D stack. - Use the bottom Synchronized Timeline Bar (
⏮,◀,▶ / ⏸,▶|,⏭, scrubber slider, color-coded step pips, and↺ Reset) or click any 3D frame slab directly to jump to that point in time.
Layout, Frame Orientation & Angle Controls#
| Control | Options & Behavior |
|---|---|
| Stack Layout | ⬒ Ribbon (clean horizontal screen gallery along +X) or ☰ Depth Stack (Time-Machine front-to-back stack along +Z). |
| Frame Orientation | ▥ Front (0° upright screens, default) or ▤ Floor (90° tabletop deck). |
| Frame Render Mode | Live UI (full live snapshot), Exploded (lifted UI layer with 3D offset), or Compact (dense state-chip cards). |
Spread Slider | Adjusts spacing between adjacent timeline frames (64px–200px). |
Tilt (0°–90°) | Tilts all frames smoothly between upright front-facing screens and flat tabletop slides. |
Angle (-45°..+45°) | Fans/yaws every frame around the vertical Y axis (Cover-Flow style) while keeping SVG flow arcs locked to frame edges. |
Flow Arcs & 3D Frame Diff Inspector#
- Color-Coded 3D Flow Arcs (
Flowstoggle):- Amber (
⚡ Action): Action trigger connecting frame#N-1→#N(turns red if an invariant is violated). - Cyan (
field: before→after): Exact state field mutations between frames. - Purple: Derived computed property cascades.
- Amber (
FocusToggle &◎Frame Active: Dims non-adjacent frames and smoothly frames the active transition slab pair.- 3D Frame & Flow Inspector (
⚙ Diff): Shows per-frame invariant badges,State Flow Changes,Computed Cascade, clickableExecution Pathnodes, and quick actions (◎ Frame,❖ Explode,◈ Source).
4. Front-Based 3D Camera, AutoCAD 3DFORBIT Ring & ViewCube#
Both ❖ Explode and 🧊 3D Orbit are powered by a unified Front-based (+Z = FRONT, -Y = TOP, +X = RIGHT) quaternion camera rig (spatial-camera.ts + view-cube.ts) with zero gimbal lock, unlimited 360° rotation in every direction, and pixel-exact bounding-box auto-fit.
Navigation Modes (Bottom-Right Camera HUD)#
| Control | How It Works |
|---|---|
Orbit (Default) | Level 360° Turntable: Horizontal drag spins smoothly around World Y (keeping the horizon 100% level with zero unwanted roll); vertical drag flips freely all 360° over Top, Front, Bottom, and Back with zero clamping. |
◎ Ring (AutoCAD 3DFORBIT) | Activates the green circular AutoCAD Free Orbit Ring with 4 quadrant handles: drag inside for free 3D trackball rotation, drag Left/Right handles for pure horizontal-axis 360° spin, drag Top/Bottom handles for pure vertical-axis 360° flip, and drag outside the ring for continuous 360° Screen-Z Roll. |
Pan | Left-drag pans the viewport. You can also pan anytime in any mode via Space + Drag, Shift + Drag, Middle-Drag, or Right-Drag. |
− / <zoom>% / + | Smooth zoom controls (click <zoom>% to reset to 100%). Mouse wheel and two-finger touch pinch zoom smoothly anchored to the cursor. |
Level (L) | Smoothly removes any sideways camera roll (0° roll) while preserving your current viewing direction. |
Fit (F / Double-Click) | Projects all 8 corners of every rotated 3D plane/frame and smoothly tweens zoom, panX, and panY to fit the entire scene with HUD-aware padding (zero clipping). |
AutoCAD-Style Interactive 3D ViewCube (Top-Right)#
- 26 Clickable Snap Zones: Click any of the 6 Faces (
FRONT,BACK,RIGHT,LEFT,TOP,BOTTOM), 12 Edges, or 8 Isometric Corners. Hovering an edge or corner highlights all touching faces simultaneously; clicking smoothly SLERPs and auto-fits to that exact view. - Direct ViewCube Drag-to-Orbit: Click and drag directly on the ViewCube to orbit the 3D scene continuously.
- Home (
⌂) & 90° Roll (↶/↷): Return to the optimal Home Isometric view or roll the camera by exact±90°increments around the viewing axis. - Synced
N / E / S / WCompass Ring: Rotates in lockstep with camera azimuth (S = FRONT,N = BACK,E = RIGHT,W = LEFT) and supports 1-click cardinal snaps.
3D Viewport Keyboard Shortcuts#
| Shortcut | Action |
|---|---|
F or Double-Click background | Auto-Fit entire 3D model / timeline stack |
R | Reset to Home Isometric view |
L | Level Horizon (clear sideways roll) |
Q / E or Alt + Drag | Roll camera CCW / CW around viewing axis |
+ / - or Scroll / Pinch | Zoom In / Out (cursor-anchored) |
Arrow Keys | Nudge camera azimuth / elevation in 15° steps |
Space + Drag / Shift + Drag | Temporary Pan while in Orbit or Ring mode |