Skip to content
Docs
Open Promoeyes
iphone-fold

iphone-fold

IPHONE-FOLD — the foldable iPhone as a device tag: a GLB built in parts (scripts/device-models/iphone-fold.mts → iphone_fold_parts.glb) with a hinge the `state` channel swings, an `explode` teardown, and TWO live screens. 1 unit = 1 mm. Preview: http://localhost:4444/runtime?project=promos/primitives/devices/iphone-fold/iphone-fold.promo

Read the rig's notes
THE BODY — measured OPEN and flat, the GLB's rest pose: 164.6 × 117.8 × 5.2 mm, the
inner display 158 × 111 (glass r 7). Closed it is 84.1 × 117.8 × ~10.9 mm with the cover
display up, 78 × 113 (glass r 8). The rig origin is the OPEN body's centre: the camera
half (the one with the lenses) stays put at x 0 → 82; the cover half swings over it, so a
CLOSED fold sits at x ≈ 0 → 83 — frame it with look_at x ≈ 40, not 0.

TWO SCREENS — a child names the display it paints:
  ui3d(overlay=screen …)   the inner display, as on every device  (158 × 111)
  ui3d(overlay=cover …)    the cover display on the back of the swinging half  (78 × 113)
  ui(screen=cover …)       the same cover display as a texture instead of a stage
Unnamed children paint the inner screen. A cover nobody paints stays black — off. Both
stages are clipped to their glass (the cover's punch-hole included) like any screen
overlay; a full-screen card still carries the glass radius (7 inner, 8 cover) so its
corners never show past the bezel when the device turns.

THE HINGE — `state`, same grammar as the laptop's lid (animations-transitions/animated-states):
  open · closed        held poses          opening (1.6 s) · closing (1.4 s)   one-shots, add `hold`
`state="closed"` is a one-row shorthand; with no state the fold rests open. The inner
display is OFF the instant the hinge leaves flat and ON the instant it is flat again — a
hard cut, no fade (a flat plane cannot bend; a real fold's inner OLED is off while
folded) — so time a reveal to the end of `opening`, and let the cover carry the beat
while it is shut.

THE TEARDOWN — `explode`, as on every GLB device: the inner glass and panels lift off
the front, the cover display and back glass drop off the back, boards, cells and the
camera modules in between; the cover half's layers travel with the hinge, so a closed
fold comes apart too. `explode-spread` / `explode-stagger` as usual.

SCENE MAP
  s1 closed-to-open   the shut fold on its cover app, spine toward the camera; it opens
                      at 3 s and the inner app lights up as the halves go flat
  s2 teardown         open, yawed −40°: the layers fan out front-to-back while the camera
                      orbits off the screen (both apps ride their displays)
  s3 closing          the open fold shuts again; the cover app is back at the end

UI SOURCE — iphone-fold.screens.html (Tailwind only), converted by
`npx tsx scripts/html-screens.mts iphone-fold.screens.html iphone-fold.sections.json
iphone-fold.screens.json` and dropped in below as the two templates.
Topic
devices
Scenes
3
Kind
reference rig
//
    IPHONE-FOLD — the foldable iPhone as a device tag: a GLB built in parts
    (scripts/device-models/iphone-fold.mts → iphone_fold_parts.glb) with a hinge the `state`
    channel swings, an `explode` teardown, and TWO live screens. 1 unit = 1 mm. Preview:
    http://localhost:4444/runtime?project=promos/primitives/devices/iphone-fold/iphone-fold.promo

    THE BODY — measured OPEN and flat, the GLB's rest pose: 164.6 × 117.8 × 5.2 mm, the
    inner display 158 × 111 (glass r 7). Closed it is 84.1 × 117.8 × ~10.9 mm with the cover
    display up, 78 × 113 (glass r 8). The rig origin is the OPEN body's centre: the camera
    half (the one with the lenses) stays put at x 0 → 82; the cover half swings over it, so a
    CLOSED fold sits at x ≈ 0 → 83 — frame it with look_at x ≈ 40, not 0.

    TWO SCREENS — a child names the display it paints:
      ui3d(overlay=screen …)   the inner display, as on every device  (158 × 111)
      ui3d(overlay=cover …)    the cover display on the back of the swinging half  (78 × 113)
      ui(screen=cover …)       the same cover display as a texture instead of a stage
    Unnamed children paint the inner screen. A cover nobody paints stays black — off. Both
    stages are clipped to their glass (the cover's punch-hole included) like any screen
    overlay; a full-screen card still carries the glass radius (7 inner, 8 cover) so its
    corners never show past the bezel when the device turns.

    THE HINGE — `state`, same grammar as the laptop's lid (animations-transitions/animated-states):
      open · closed        held poses          opening (1.6 s) · closing (1.4 s)   one-shots, add `hold`
    `state="closed"` is a one-row shorthand; with no state the fold rests open. The inner
    display is OFF the instant the hinge leaves flat and ON the instant it is flat again — a
    hard cut, no fade (a flat plane cannot bend; a real fold's inner OLED is off while
    folded) — so time a reveal to the end of `opening`, and let the cover carry the beat
    while it is shut.

    THE TEARDOWN — `explode`, as on every GLB device: the inner glass and panels lift off
    the front, the cover display and back glass drop off the back, boards, cells and the
    camera modules in between; the cover half's layers travel with the hinge, so a closed
    fold comes apart too. `explode-spread` / `explode-stagger` as usual.

    SCENE MAP
      s1 closed-to-open   the shut fold on its cover app, spine toward the camera; it opens
                          at 3 s and the inner app lights up as the halves go flat
      s2 teardown         open, yawed −40°: the layers fan out front-to-back while the camera
                          orbits off the screen (both apps ride their displays)
      s3 closing          the open fold shuts again; the cover app is back at the end

    UI SOURCE — iphone-fold.screens.html (Tailwind only), converted by
    `npx tsx scripts/html-screens.mts iphone-fold.screens.html iphone-fold.sections.json
    iphone-fold.screens.json` and dropped in below as the two templates.
promo#iphone-fold(width=1920 height=1080 fps=30)
  materials
    // the floor takes no environment and little specular: at the grazing angle of a low
    // camera the studio HDR and the key's Fresnel lift black to a grey slab
    physical#m-floor(color=#030407 metalness=0 roughness=0.9 specular-intensity=0.2 envmap-intensity=0)

  // =========================================================================
  // TEMPLATES — the two faces of one hiking app (converted; each is its glass in mm)
  // =========================================================================
  template#t-fold-cover
    card#fold-cover(x=0 y=0 w=78 h=113 r=8 fill=#0b0f0e shadow=false)
      card(x=0 y=0 w=78 h=113.17 r=8 fill=#0b0f0e clip=true)
        text(x=6.2 y=6.47 size=3.46 weight=600 color=#f1f5f2 origin=left font_family="JetBrains Mono" w=8.31 wrap=false) "9:41"
        icon(x=58.5 y=4.01 size=3.83 set=tabler name=antenna-bars-5 color=#f1f5f