Skip to content
Docs
Open Promoeyes
physics

physics

PHYSICS — natural physical behaviour for UIs, ui3d panels, devices and 3D props, AUTHORED with keyframes. The engine has NO physics simulation (@dimforge/rapier3d-compat sits in package.json unused), so every scene here is a recipe: which easing / channel / preset reads as which physical law. Everything is deterministic and seekable — captures render frames out of order, so nothing wall-clock-random is used.

Read the rig's notes
FEASIBILITY — the standard physics list, graded for a .promo

EASY (an easing IS the law)
  gravity / free fall       position.y · easeInQuad (constant acceleration)
  restitution / bounce      easeOutBounce (one-liner) or hand-rowed decaying
                            bounces: height x e², half-period x e  (s09)
  mass                      same drop, different settle: heavy = one dead
                            thud + compression, light = long bounce (s02)
  spring joints             easeOutElastic (underdamped) · easeInOutSine
                            (critical) · easeOutBack (stiff) (s03). NOTE: the
                            engine's analytic `spring` easing exists but the
                            pug easing regex does not accept the token —
                            `t spring v` parses as a VALUE and hides the node.
  forces / impulses         parabola = position.x linear + position.y
                            easeOutQuad up / easeInQuad down (s04, s08)
  torque                    rotation · easeInQuad spin-up, easeOutCubic
                            spin-down, easeOutBack overshoot (s12)
  linear / angular damping  easeOutQuint on position.x AND rotation.z,
                            angle = distance / radius (s10)
  hinge joints              rotation.x / rotation.y on the panel — the
                            panel IS the door (s05)
  slider joints             position.x with easeOutBack, slam with a
                            one-frame rebound (s05)
  fixed joints              nesting — children ride the parent transform (s05)
  collision response        choreography: B's track starts the frame A
                            arrives; nothing interpenetrates (s06)
  friction                  same push, two surfaces: easeOutQuint stops
                            short, easeOutSine slides long (s06)
  destruction               a card swaps for N tile cards, each on a
                            ballistic position track + spin (s13)
  debris / rain             chips on staggered easeOutBounce drops (s13)

MEDIUM (a visual metaphor, not detection)
  triggers / sensors        the sensor tints the moment the mover's own kf
                            crosses its edge — the time is authored (s07)
  raycasting                a dash card flies origin → target; the target pops on arrival (s07)
  continuous collision      the fast dot never tunnels because kf are continuous (s07)
  character controller      chained parabolas up a staircase, squash on landing (s08)
  collision layers          two movers, one passes through (opacity dip) (s06)
  rope / chain              link cards on a sampled damped pendulum, each
                            lagging the link above (s11)
  soft body / jelly         scale compression on impact (s02, s08)
  cloth / flag              strip cards sharing one sway track, phase-shifted (s11)

NOT POSSIBLE (no engine support — would need the rapier integration)
  real collision detection, ragdolls, fluids / buoyancy, simulated cloth
  and rope, fracturing of 3D meshes or devices, particle physics that
  responds to anything.

EVERY SCENE OBJECT IS A DEVICE OR A UI CARD — no primitives, no glyphs,
no hazes, no casts. Devices (iphone / ipad / macbook) are the physical
bodies in every scene and make up over half of all objects; cards are
floors, frames, targets, chips and cloth strips.

DEVICES IN A PIXEL STAGE: the device is a world node placed in the same
1920x1080 px world as the <ui3d> stage, at scale 1.6–4 (an iphone at
scale 4 is ~300x610 px). World y is UP (world y = 1080 - stage y), so a
device's position rows are y-up deltas: a drop is +900 → 0, a bounce is
a positive height. Card rows inside <ui3d> stay y-down.

ALL SCENES — full-stage <ui3d> + devices, camera at 960 540 1320. Card
tracks are DELTAS from the layout pose (y-down); device tracks are y-up.
  s01 gravity      three iphones and a toast fall (easeInQuad) and bounce
  s02 mass         a macbook and an iphone dropped together — they LAND
                   together (Galileo); only the settle differs
  s03 spring       three iphones pop on elastic / sine / back, a card on
                   bounce, an ipad hangs on an elastic
  s04 impulse      an iphone is thrown (parabola + spin), an ipad jumps
  s05 joints       hinge = macbook door · slider = iphone drawers · fixed =
                   an ipad carrying its screen card
  s06 collision    landscape iphones as pucks: response + friction lanes,
                   a ghost card on a layer that does not collide
  s07 triggers     ipad sensor, iphone flying through (CCD), dash-card ray,
                   iphone target
  s08 character    an iphone hops up four ipads of rising height
  s09 restitution  three iphones, e = 0.2 / 0.5 / 0.8, hand-rowed
  s10 damping      two iphone pucks slide + spin out under different damping
  s11 rope-cloth   a chain of eight iphones on a damped pendulum, a banner
                   of phase-shifted strip cards
  s12 torque       an iphone and a macbook spun by one impulse
  s13 destruction  an ipad breaks into 9 ballistic tile cards, iphones rain

Preview: /packages/runtime/index.html?project=promos/primitives/physics/physics.promo
Topic
physics
Scenes
13
Kind
reference rig
//
    PHYSICS — natural physical behaviour for UIs, ui3d panels, devices and 3D
    props, AUTHORED with keyframes. The engine has NO physics simulation
    (@dimforge/rapier3d-compat sits in package.json unused), so every scene here
    is a recipe: which easing / channel / preset reads as which physical law.
    Everything is deterministic and seekable — captures render frames out of
    order, so nothing wall-clock-random is used.

    FEASIBILITY — the standard physics list, graded for a .promo

    EASY (an easing IS the law)
      gravity / free fall       position.y · easeInQuad (constant acceleration)
      restitution / bounce      easeOutBounce (one-liner) or hand-rowed decaying
                                bounces: height x e², half-period x e  (s09)
      mass                      same drop, different settle: heavy = one dead
                                thud + compression, light = long bounce (s02)
      spring joints             easeOutElastic (underdamped) · easeInOutSine
                                (critical) · easeOutBack (stiff) (s03). NOTE: the
                                engine's analytic `spring` easing exists but the
                                pug easing regex does not accept the token —
                                `t spring v` parses as a VALUE and hides the node.
      forces / impulses         parabola = position.x linear + position.y
                                easeOutQuad up / easeInQuad down (s04, s08)
      torque                    rotation · easeInQuad spin-up, easeOutCubic
                                spin-down, easeOutBack overshoot (s12)
      linear / angular damping  easeOutQuint on position.x AND rotation.z,
                                angle = distance / radius (s10)
      hinge joints              rotation.x / rotation.y on the panel — the
                                panel IS the door (s05)
      slider joints             position.x with easeOutBack, slam with a
                                one-frame rebound (s05)
      fixed joints              nesting — children ride the parent transform (s05)
      collision response        choreography: B's track starts the frame A
                                arrives; nothing interpenetrates (s06)
      friction                  same push, two surfaces: easeOutQuint stops
                                short, easeOutSine slides long (s06)
      destruction               a card swaps for N tile cards, each on a
                                ballistic position track + spin (s13)
      debris / rain             chips on staggered easeOutBounce drops (s13)

    MEDIUM (a visual metaphor, not detection)
      triggers / sensors        the sensor tints the moment the mover's own kf
                                crosses its edge — the time is authored (s07)
      raycasting                a dash card flies origin → target; the target pops on arrival (s07)
      continuous collision      the fast dot never tunnels because kf are continuous (s07)
      character controller      chained parabolas up a staircase, squash on landing (s08)
      collision layers          two movers, one passes through (opacity dip) (s06)
      rope / chain              link cards on a sampled damped pendulum, each
                                lagging the link above (s11)
      soft body / jelly         scale compression on impact (s02, s08)
      cloth / flag              strip cards sharing one sway track, phase-shifted (s11)

    NOT POSSIBLE (no engine support — would need the rapier integration)
      real collision detection, ragdolls, fluids / buoyancy, simulated cloth
      and rope, fracturing of 3D meshes or devices, particle physics that
      responds to anything.

    EVERY SCENE OBJECT IS A DEVICE OR A UI CARD — no primitives, no glyphs,
    no hazes, no casts. Devices (iphone / ipad / macbook) are the physical
    bodies in every scene and make up over half of all objects; cards are
    floors, frames, targets, chip