LeanUI Docs
← Open LeanUI Studio GitHub

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:

  1. Live Preview Canvas Nodes (app_preview & template_preview) — embed live interactive App Views and Control Template previews directly inside the normal node graph.
  2. 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).
  3. 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 + Node in 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-module state_sync / event links.
    • template_preview (Control Template Preview): Renders any control_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 targetModuleId in the Property Inspector to preview any other module in your Solution (including cross-module module_ref resolution).
  • Wire source, state, style, or template ports 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 × 1000 for app_preview, 960 × 760 for template_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, Shift aspect-ratio lock, Alt center-anchored scaling, and live W × H readout.
  • One-Click Device Viewport Presets: Click Mob (375×520), Tab (560×440), Desk (760×500), or Wide (960×580) directly inside the preview node header (or Cmp–Wide in the Inspector) to test responsive layouts inline on the graph canvas.
  • Resize Behavior (Reflow vs Scale): Toggle Reflow (reflows responsive CSS grids/columns inside the new width) vs Scale (scales the rendered UI proportionally like a live zoomed frame) directly in the preview node bar or Inspector.
  • Content-Aware Auto-Fit (⊡ Fit): Click ⊡ Fit in 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.

LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
CAD Explode Interactions — Front-Based 4-Plane Orbit Drag, Layer Selection & ViewCube Snapping CAD Explode Interactions — Front-Based 4-Plane Orbit Drag, Layer Selection & ViewCube Snapping
CAD Explode Interactions — Front-Based 4-Plane Orbit Drag, Layer Selection & ViewCube Snapping
LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Full Studio Workspace in 3D Orbit Timeline Mode with Formal Proof Visualizer & Timeline Dock Full Studio Workspace in 3D Orbit Timeline Mode with Formal Proof Visualizer & Timeline Dock
Full Studio Workspace in 3D Orbit Timeline Mode with Formal Proof Visualizer & Timeline Dock
LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Live CAD 4-Plane Isometric Exploded Assembly — L0 State/Proofs, L1 Logic, L2 Design & L3 Live UI Parts with Signal Beams Live CAD 4-Plane Isometric Exploded Assembly — L0 State/Proofs, L1 Logic, L2 Design & L3 Live UI Parts with Signal Beams
Live CAD 4-Plane Isometric Exploded Assembly — L0 State/Proofs, L1 Logic, L2 Design & L3 Live UI Parts with Signal Beams

Scopes#

ScopeWhat It Explodes
◈ Module CADExplodes 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 CADExplodes 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 facing FRONT (+Z) so every UI control, badge, and label is upright and legible at a crisp 18° / -28° isometric angle.
    • ▤ Floor (90°): Tilts the entire assembly into a horizontal floor-to-roof stack (L0 on the floor → L3 at the top, framed at 48° / -22°).
    • Drag Tilt to any custom angle between 0° and 90° — connector beams and auto-fit recompute with exact 3D math.
  • Explode Slider (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 L3 UI cards to trigger state changes and watch L0 state values, L1 computeds, and L3 progress 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.

LIVE GENERATED SVG · AUTO-UPDATED ON BUILD
Open SVG ↗
Live 3D Isometric Orbit Timeline Stack — Stacked State Frames with Action & State-Diff Flow Arcs Live 3D Isometric Orbit Timeline Stack — Stacked State Frames with Action & State-Diff Flow Arcs
Live 3D Isometric Orbit Timeline Stack — Stacked State Frames with Action & State-Diff Flow Arcs

Recording & Scrubbing Frames#

  • Click any ⚡ Action button in the toolbar to dispatch a single state transition and append a new 3D frame slab.
  • Click ✦ Record Sequence to 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#

ControlOptions & 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 ModeLive UI (full live snapshot), Exploded (lifted UI layer with 3D offset), or Compact (dense state-chip cards).
Spread SliderAdjusts 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 (Flows toggle):
    • 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.
  • Focus Toggle & ◎ 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, clickable Execution Path nodes, 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.

ControlHow 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.
PanLeft-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 / W Compass 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#

ShortcutAction
F or Double-Click backgroundAuto-Fit entire 3D model / timeline stack
RReset to Home Isometric view
LLevel Horizon (clear sideways roll)
Q / E or Alt + DragRoll camera CCW / CW around viewing axis
+ / - or Scroll / PinchZoom In / Out (cursor-anchored)
Arrow KeysNudge camera azimuth / elevation in 15° steps
Space + Drag / Shift + DragTemporary Pan while in Orbit or Ring mode
Diagram Preview
Enlarged diagram