►V Reference
On this page:
fade-in
fade-in-request?
fade-out
fade-out-request?
enter
enter-request?
leave
leave-request?
reveal-front?
reveal-front-path
reveal-in
reveal-in-request?
reveal-out
reveal-out-request?
shrink-out
reveal-subsets
9.3

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?)
Creates a request that introduces the complete supplied visual by increasing global opacity from zero to the Visual’s own semantic opacity.

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
Returns #t when value is a request created by fade-in.

procedure

(fade-out target) → fade-out-request?

  target : (or/c symbol? (and/c visual? opacity-visual?))
Creates a request that lowers a present Visual’s global opacity from its current value to zero and then removes the Visual from the scene.

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
Returns #t when value is a request created by fade-out.

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
Introduces an absent affine, opacity-aware visual from a relative appearance. The translation offset is in the Visual’s local reference frame; the scale factor is a nonnegative finite real or a vec2 with nonnegative components; rotation is additive; and opacity is the authored opacity multiplied by opacity-factor. Consequently, the default appearance is invisible but the endpoint retains the Visual’s authored opacity rather than assuming opacity one.

#: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
Recognizes an enter request.

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
Transforms a present affine, opacity-aware target toward the same relative appearance used by enter. A direct Visual target is validated at construction; a symbol or nested Visual path is resolved and validated against the exact local start state. With the default #:remove? #t, the target remains present at interior samples and is absent exactly at the local endpoint. With #:remove? #f, it retains its identity and the concrete relative final appearance.

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
Recognizes a leave request.

procedure

(reveal-front? value) → boolean?

  value : any/c
Recognizes an immutable local hard-clip front constructed by linear-reveal-front or radial-reveal-front. A front contains no scene or renderer state.

procedure

(reveal-front-path front box progress) → path-geometry?

  front : reveal-front?
  box : layout-box?
  progress : (real-in 0 1)
Returns the pure local clip path for a frozen box at progress. It is useful for deterministic testing and custom semantic clip composition. A zero-area front returns empty-path-geometry, not a degenerate polygon.

procedure

(reveal-in visual front) → reveal-in-request?

  visual : (and/c visual? affine-visual? opacity-visual?)
  front : reveal-front?
Introduces an absent Visual behind a local hard clip. At the local start, the target identity is present but its clip is empty. When the play clip compiles, the Pict layout adapter measures the Visual’s untransformed local layout once; all later samples use that immutable box and the immutable front. At the exact endpoint, the supplied visual is restored and the temporary clip wrapper is gone.

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
Recognizes a reveal-in request.

procedure

(reveal-out target front) → reveal-out-request?

  target : (or/c visual? symbol? visual-path?)
  front : reveal-front?
Clips a present target with front in reverse. The exact source is visible at local time zero; interior samples use progressively smaller local clips; and the target is removed exactly at the structural endpoint. Direct Visual targets are validated immediately, while symbols and nested visual paths are resolved at the clip’s local start. Layout freezing, component composition, and the Pict-renderer requirement are the same as for reveal-in.

procedure

(reveal-out-request? value) → boolean?

  value : any/c
Recognizes a reveal-out request.

procedure

(shrink-out target [#:about about]) → leave-request?

  target : (or/c visual? symbol? visual-path?)
  about : (or/c 'center 'reference vec2?) = 'center
Returns a leave request with zero scale factor and unchanged opacity. It collapses toward about at interior samples and removes the target exactly at completion.

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
Eagerly maps a one- or two-argument entry factory over a nonempty list or vector, with the same source-order evaluation and original zero-based indexes as eager-stagger-map. The result is an ordinary lagged-start composition, not a specialized renderer effect.

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.