Skip to content

Peel Split Screen

App: apps/peel_demo/

SplitScreen.peel(true) makes the dynamic merge slide each viewport’s rect from its split cell toward fullscreen — the Kronnect “views expand together” merge (Camera v2, ADR 0061) — instead of the default fixed-rect camera-converge blend. It runs over the RTT composite path (the rects overlap mid-slide), which the axis-aligned sub-rect path can’t do.

import "engine" for Scene, SplitScreen, SplitLayout
var split = SplitScreen.new(scene, [p1, p2])
split.layout(SplitLayout.horizontal)
split.dynamic(true)
split.transitionDuration(0.9) // a slow blend so the peel is clearly visible
split.peel(true) // slide the rects to fullscreen on merge (RTT peel)

draw() is just scene.draw() + the mesh draws — no per-viewport camera code.

Terminal window
% ./plume3d peel_demo

Two players hold apart (a horizontal 2-way split), then sweep together — the two panels slide into one fullscreen view (each camera also converging to the group framing, so the seam stays invisible), then collapse to the merged view.

While peel is on and a merge is in flight (0 < mergeFraction < 1), the manager forces the composite path and lerps each viewport’s rect from its split cell toward the fullscreen rect by the eased mergeFraction, z-stacked (the top one wins the overlap), with the camera blended from the player pose toward the group pose. Because every viewport converges to the same group pose, the overlapping slides read as one coherent merge. peel(false) (the default) keeps the no-RTT camera-converge blend (dividers fade, cells hold) — see Split Screen.