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 visiblesplit.peel(true) // slide the rects to fullscreen on merge (RTT peel)draw() is just scene.draw() + the mesh draws — no per-viewport camera code.
% ./plume3d peel_demoTwo 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.
How it works (PLM-190, ADR 0061)
Section titled “How it works (PLM-190, ADR 0061)”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.
See also
Section titled “See also”- Split Screen — the default camera-converge merge
- Angled Split Screen — the diagonal 2-player split (same composite path)
- Camera API — SplitScreen