56.3 Adding, revealing, and removing objects
These requests introduce or remove objects, or reveal existing content.
procedure
(fade-in visual) → fade-in-request?
visual : (and/c visual? opacity-visual?)
The Visual’s identity must be absent from the scene before the play clip. scene-play adds a placeholder with the same identity, position, geometry, affine transform, style, and drawing position, but with opacity zero. Several fade-in requests add their placeholders in request order, in front of Visuals already present. When the supplied Visual is a group, the complete child tree is introduced as one top-level Visual.
All requests in the play clip compile against the prepared shared start state. Movement, rotation, scaling, and path morphing can therefore target a Visual introduced by fade-in, even when those requests appear before the fade-in request. These operations change different components.
At interior samples, opacity is interpolated from zero to the opacity stored in visual. At the structural endpoint, the supplied opacity is installed regardless of the easing result. This guarantees that the complete Visual is present after the clip. An unusual easing procedure can therefore cause a jump at the exact clip boundary. A Visual whose supplied opacity is zero is introduced structurally but remains invisible.
A fade-in changes both opacity and scene presence. It conflicts with another same-target opacity request and with another same-target introduction or removal request. In particular, fade-in cannot be combined with same-target create, uncreate, or fade-out.
procedure
(fade-in-request? value) → boolean?
value : any/c
procedure
(fade-out target) → fade-out-request?
target : (or/c symbol? (and/c visual? opacity-visual?))
When target is a symbol, scene-play checks that the current Visual implements the opacity protocol and returns a valid opacity. A missing target or a Visual without semantic opacity raises an exception.
Movement, rotation, scaling, and path morphing may run at the same time for the same identity. The Visual remains present at interior samples, so those components continue to update while it fades. At the structural endpoint, the Visual is removed regardless of the easing result. A group and its complete child tree are removed as one top-level Visual. An unusual easing procedure can therefore leave it visibly opaque just before the boundary and absent at the boundary.
A fade-out changes both opacity and scene presence. It conflicts with another same-target opacity request and with another same-target introduction or removal request. In particular, it cannot be combined with same-target fade-in, create, uncreate, or fade-to.
procedure
(fade-out-request? value) → boolean?
value : any/c
procedure
(enter visual [ #:translation-offset translation-offset #:scale-factor scale-factor #:rotation-offset rotation-offset #:opacity-factor opacity-factor #:about about]) → enter-request? visual : (and/c visual? affine-visual? opacity-visual?) translation-offset : vec2? = origin scale-factor : any/c = 1 rotation-offset : finite-real? = 0 opacity-factor : (real-in 0 1) = 0 about : (or/c 'center 'reference vec2?) = 'center
#:about is 'center, 'reference, or an explicit local vec2. The named choices both mean the Visual’s stable local reference origin; the explicit point supplies a distinct pivot without renderer-measured layout. A zero scale factor denotes a semantic collapse. Since ordinary affine Visuals require positive authored scales, only interior samples use a small private positive scale; the invisible start and exact final Visual remain unambiguous.
At its local start, the target identity is present with the relative appearance. At its exact local endpoint, the supplied visual is restored regardless of easing. enter writes scene presence and only the affine/opacity components whose factor or offset differs from identity. Thus an opacity-only entrance can run alongside a same-target rotation, while two requests that both change translation conflict normally. The target must be absent at the local start.
procedure
(enter-request? value) → boolean?
value : any/c
procedure
(leave target [ #:translation-offset translation-offset #:scale-factor scale-factor #:rotation-offset rotation-offset #:opacity-factor opacity-factor #:about about #:remove? remove?]) → leave-request? target : (or/c visual? symbol? visual-path?) translation-offset : vec2? = origin scale-factor : any/c = 1 rotation-offset : finite-real? = 0 opacity-factor : (real-in 0 1) = 0 about : (or/c 'center 'reference vec2?) = 'center remove? : boolean? = #t
Only changed affine/opacity components are written; scene presence is reserved only when removal is requested. This keeps, for example, an opacity-only leave compatible with a same-target movement while preserving ordinary conflict checks for components it changes. No endpoint relies on a prior sampled frame.
procedure
(leave-request? value) → boolean?
value : any/c
procedure
(reveal-front? value) → boolean?
value : any/c
procedure
(reveal-front-path front box progress) → path-geometry?
front : reveal-front? box : layout-box? progress : (real-in 0 1)
procedure
(reveal-in visual front) → reveal-in-request?
visual : (and/c visual? affine-visual? opacity-visual?) front : reveal-front?
The effect clips local geometry and then applies the target’s ordinary affine placement and opacity. It can therefore run with same-target movement, rotation, scaling, and opacity animation. It reserves scene presence and the clip-replaced style, path, formula, and pointwise-map components, which are rejected when overlapping rather than being made request-order dependent. Hard clipping currently requires the ordinary Pict rendering path.
procedure
(reveal-in-request? value) → boolean?
value : any/c
procedure
(reveal-out target front) → reveal-out-request?
target : (or/c visual? symbol? visual-path?) front : reveal-front?
procedure
(reveal-out-request? value) → boolean?
value : any/c
procedure
(shrink-out target [#:about about]) → leave-request?
target : (or/c visual? symbol? visual-path?) about : (or/c 'center 'reference vec2?) = 'center
procedure
(reveal-subsets targets make-entry [ #:order order #:lag-ratio lag-ratio]) → lagged-start-animation-request? targets : (or/c list? vector?) make-entry : procedure? order : (or/c 'forward 'reverse animation-order?) = 'forward lag-ratio : (and/c finite-real? (>=/c 0)) = 1
Every produced entry remains after completion. One-at-a-time presentation has its own explicit crossfade-subsets timing model rather than an ambiguous boolean option on a lagged composition.