56.13 Other animation requests
Additional request constructors and their predicates.
procedure
(apply-pointwise target map-point [ #:samples samples #:adaptive? adaptive? #:tolerance tolerance #:max-depth max-depth #:discontinuities discontinuities]) → apply-pointwise-request? target : (or/c visual? symbol? visual-path?) map-point : (procedure-arity-includes/c 1) samples : exact-positive-integer? = 24 adaptive? : boolean? = #t tolerance : (and/c finite-real? positive?) = 1/32 max-depth : exact-nonnegative-integer? = 8 discontinuities : (or/c 'split 'error) = 'split
Path Visuals, circles, rectangles, axes, and arrows are converted to sampled path geometry. Groups retain their ordinary hierarchy and names. A nested target is resolved into world coordinates and rebased through its invertible enclosing affine map, preserving its siblings and their paths. Text, images, and other affine leaves without an exposed path remain at their original resolved world placement so they stay legible; they are not secretly raster-warped. The request rejects derived Visuals and frame-space overlays. It conflicts with simultaneous same-target spatial, style, opacity, formula, or path changes, because it replaces the complete sampled Visual tree.
#:samples gives the initial positive number of pieces per original line or cubic segment. With the default #:adaptive? #t, intervals whose mapped midpoint differs from their mapped chord by more than #:tolerance are bisected, up to #:max-depth. At 'split discontinuity policy, a raised error or an invalid map result omits that interval and leaves adjacent valid fragments disconnected; 'error propagates it. Point maps should be pure because refinement may call them more than once at a source point.
procedure
(apply-pointwise-request? value) → boolean?
value : any/c
procedure
(apply-homotopy target homotopy [ #:samples samples #:adaptive? adaptive? #:tolerance tolerance #:max-depth max-depth #:discontinuities discontinuities]) → apply-homotopy-request? target : (or/c visual? symbol? visual-path?) homotopy : (procedure-arity-includes/c 2) samples : exact-positive-integer? = 24 adaptive? : boolean? = #t tolerance : (and/c finite-real? positive?) = 1/32 max-depth : exact-nonnegative-integer? = 8 discontinuities : (or/c 'split 'error) = 'split
The exact source Visual is retained at clip time zero; authors normally supply (homotopy p 0) equal to p. The map must be pure, may be called repeatedly at a source point by adaptive refinement, and must return a finite vec2? for every retained sample. Nested targets, supported geometric leaves, adaptive sampling, and 'split versus 'error discontinuity semantics are the same as for apply-pointwise. As a sampled approximation, phase-dependent adaptive refinement can choose different path subdivisions at different phases; this API does not infer continuous topology changes over the full time interval.
procedure
(apply-homotopy-request? value) → boolean?
value : any/c
procedure
(apply-wave target [ #:direction direction #:amplitude amplitude #:wavelength wavelength #:cycles cycles #:phase phase]) → apply-wave-request? target : (or/c visual? symbol? visual-path?) direction : vec2? = (vec2 0 1) amplitude : (and/c finite-real? (>=/c 0)) = 1/5 wavelength : (and/c finite-real? positive?) = 1 cycles : (and/c finite-real? (>=/c 0)) = 1 phase : finite-real? = 0
The request uses the adaptive pointwise path mapper. It supports ordinary affine, world-space Visuals with exposed geometry and rejects derived and frame-space Visuals. Because it temporarily replaces the sampled target tree, it conflicts with simultaneous target movement, style, opacity, formula, and path writers.
procedure
(apply-wave-request? value) → boolean?
value : any/c
procedure
(pointwise-jacobian map-point point [ #:step step]) → linear2? map-point : (procedure-arity-includes/c 1) point : vec2? step : (and/c finite-real? positive?) = 1/1000
procedure
(pointwise-jacobian-determinant map-point point [ #:step step]) → finite-real? map-point : (procedure-arity-includes/c 1) point : vec2? step : (and/c finite-real? positive?) = 1/1000
procedure
(pointwise-orientation map-point point [ #:step step #:tolerance tolerance]) → (or/c 'preserving 'reversing 'singular) map-point : (procedure-arity-includes/c 1) point : vec2? step : (and/c finite-real? positive?) = 1/1000 tolerance : (and/c finite-real? positive?) = 1e-8
procedure
(inverse-map-mesh inverse-map #:id id [ #:x-min x-min #:x-max x-max #:y-min y-min #:y-max y-max #:x-count x-count #:y-count y-count #:samples samples #:tolerance tolerance #:max-depth max-depth #:stroke stroke #:stroke-width stroke-width]) → group-visual? inverse-map : (procedure-arity-includes/c 1) id : symbol? x-min : finite-real? = -3 x-max : finite-real? = 3 y-min : finite-real? = -2 y-max : finite-real? = 2 x-count : exact-integer? = 7 y-count : exact-integer? = 5 samples : exact-positive-integer? = 12 tolerance : (and/c finite-real? positive?) = 1/32 max-depth : exact-nonnegative-integer? = 8 stroke : any/c = "mediumpurple" stroke-width : (and/c finite-real? (>=/c 0)) = 2
procedure
(radial-reveal-front [ #:center center #:start-radius start-radius #:padding padding]) → radial-reveal-front? center : (or/c 'automatic vec2?) = 'automatic start-radius : (and/c finite-real? (>=/c 0)) = 0 padding : (and/c finite-real? (>=/c 0)) = 1/20
procedure
(radial-reveal-front? value) → boolean?
value : any/c
procedure
(wipe-in visual direction [ #:origin origin #:padding padding]) → reveal-in-request? visual : (and/c visual? affine-visual? opacity-visual?) direction : (or/c vec2? 'left 'right 'up 'down) origin : (or/c 'automatic vec2?) = 'automatic padding : (and/c finite-real? (>=/c 0)) = 1/20
procedure
(wipe-out target direction [ #:origin origin #:padding padding]) → reveal-out-request? target : (or/c visual? symbol? visual-path?) direction : (or/c vec2? 'left 'right 'up 'down) origin : (or/c 'automatic vec2?) = 'automatic padding : (and/c finite-real? (>=/c 0)) = 1/20
procedure
(iris-in visual [ #:center center #:start-radius start-radius #:padding padding]) → reveal-in-request? visual : (and/c visual? affine-visual? opacity-visual?) center : (or/c 'automatic vec2?) = 'automatic start-radius : (and/c finite-real? (>=/c 0)) = 0 padding : (and/c finite-real? (>=/c 0)) = 1/20
procedure
(iris-out target [ #:center center #:start-radius start-radius #:padding padding]) → reveal-out-request? target : (or/c visual? symbol? visual-path?) center : (or/c 'automatic vec2?) = 'automatic start-radius : (and/c finite-real? (>=/c 0)) = 0 padding : (and/c finite-real? (>=/c 0)) = 1/20
procedure
(ripple target [ #:rings rings #:spacing spacing #:padding padding #:color color #:stroke-width stroke-width #:lag-ratio lag-ratio #:id id]) → lagged-start-animation-request? target : (or/c visual? symbol? visual-path? visual-selection?) rings : exact-positive-integer? = 3 spacing : (and/c finite-real? (>=/c 0)) = 1/5 padding : (and/c finite-real? (>=/c 0)) = 1/5 color : any/c = "gold" stroke-width : (and/c finite-real? (>=/c 0)) = 2 lag-ratio : (and/c finite-real? (>=/c 0)) = 1/4 id : (or/c #f symbol?) = #f
The expansion uses the same source-order and timing semantics as stagger-map. Its generated helpers have deterministic origin-derived IDs, so simultaneous default ripples on one target are distinct. An explicit #:id remains authoritative; reusing it is rejected as a normal component conflict.
value
procedure
(underline-sweep target [ #:color color #:stroke-width stroke-width #:id id #:retain? retain?]) → underline-sweep-request? target : (or/c text-visual? symbol?) color : (or/c #f color-spec?) = #f stroke-width : (and/c finite-real? (>=/c 0)) = 2 id : (or/c #f symbol?) = #f retain? : boolean? = #t
The request accepts unrotated, unscaled text and snapshots the text box at local clip start. Consequently it is intentionally a frozen-layout decoration: simultaneous motion of the target does not move the line. Its default colour is the text Visual’s outer colour.
procedure
(underline-sweep-request? value) → boolean?
value : any/c
procedure
(strike-through target [ #:color color #:stroke-width stroke-width #:id id #:retain? retain?]) → strike-through-request? target : (or/c text-visual? symbol?) color : (or/c #f color-spec?) = #f stroke-width : (and/c finite-real? (>=/c 0)) = 2 id : (or/c #f symbol?) = #f retain? : boolean? = #t
procedure
(strike-through-request? value) → boolean?
value : any/c
procedure
(highlight-sweep target [ #:color color #:padding padding #:id id #:retain? retain?]) → highlight-sweep-request? target : (or/c text-visual? symbol?) color : color-spec? = "#fff2a8" padding : (and/c finite-real? (>=/c 0)) = 1/20 id : (or/c #f symbol?) = #f retain? : boolean? = #f
procedure
(highlight-sweep-request? value) → boolean?
value : any/c
procedure
(slide-in visual direction [ #:distance distance]) → enter-request? visual : (and/c visual? affine-visual? opacity-visual?) direction : (or/c vec2? 'left 'right 'up 'down) distance : nonnegative-real? = 2
procedure
(slide-out target direction [ #:distance distance]) → leave-request? target : (or/c visual? symbol? visual-path?) direction : (or/c vec2? 'left 'right 'up 'down) distance : nonnegative-real? = 2
procedure
(spin-in visual [#:turns turns]) → enter-request?
visual : (and/c visual? affine-visual? opacity-visual?) turns : finite-real? = 1
struct
(struct visual-match (source-path destination-path) #:transparent) source-path : (listof symbol?) destination-path : (listof symbol?)
procedure
(cubic-bezier [ #:x1 x1 #:y1 y1 #:x2 x2 #:y2 y2]) → rate-function? x1 : (and/c finite-real? (>=/c 0) (<=/c 1)) = 1/4 y1 : finite-real? = 1/10 x2 : (and/c finite-real? (>=/c 0) (<=/c 1)) = 1/4 y2 : finite-real? = 1
procedure
(spring [ #:frequency frequency #:damping damping]) → rate-function? frequency : positive-real? = 3 damping : nonnegative-real? = 6
procedure
(change-speed keyframes) → rate-function?
keyframes : (listof (list/c finite-real? positive-real?))
procedure
(delay-plan? value) → boolean?
value : any/c
procedure
(index-delay ratio) → delay-plan?
ratio : (and/c finite-real? (>=/c 0))
procedure
(constant-delay value) → delay-plan?
value : (and/c finite-real? (>=/c 0))
procedure
(distance-delay point scale) → delay-plan?
point : vec2? scale : (and/c finite-real? (>=/c 0))
procedure
(radial-delay center scale) → delay-plan?
center : vec2? scale : (and/c finite-real? (>=/c 0))
procedure
(wave-delay direction wavelength phase) → delay-plan?
direction : vec2? wavelength : positive-real? phase : finite-real?
procedure
(eager-stagger-map targets make-request [ #:lag-ratio lag-ratio #:order order]) → lagged-start-animation-request? targets : (or/c list? vector?) make-request : procedure? lag-ratio : (and/c finite-real? (>=/c 0)) = 1/4 order : (or/c 'forward 'reverse animation-order?) = 'forward
The factory runs exactly once per target, always in original source order. #:order 'reverse reverses only the completed child request list, so it changes stagger scheduling but never factory evaluation order or source indexes. #:order 'forward is the default. The factory must produce a valid ordinary composition child; its child-specific capability and conflict rules are preserved unchanged.
eager-stagger-map adds no scheduler node or timing vocabulary: its #:lag-ratio is passed directly to lagged-start. Therefore it has the same intrinsic-span scaling, exact finalization, conflict checking, and arbitrary-time sampling behavior as an explicitly written lagged-start tree. For example:
(eager-stagger-map targets (lambda (target source-index) (move-to target (vec2 (+ 2 source-index) 0))) #:lag-ratio 1/5 #:order 'reverse)
procedure
(target-sequence? value) → boolean?
value : any/c
procedure
(concrete-targets values) → target-sequence?
values : (or/c list? vector?)
procedure
(children-of parent) → target-sequence?
parent : (or/c visual? symbol? visual-path?)
procedure
(descendants-of root [#:where selector]) → target-sequence?
root : (or/c visual? symbol? visual-path?) selector : (or/c #f procedure?) = #f
procedure
(selection-targets selection) → target-sequence?
selection : visual-selection?
procedure
(target-ref? value) → boolean?
value : any/c
procedure
(target-ref-path reference) → (or/c #f visual-path?)
reference : target-ref?
procedure
(target-ref-source-index reference)
→ exact-nonnegative-integer? reference : target-ref?
procedure
(target-ref-scheduled-index reference)
→ exact-nonnegative-integer? reference : target-ref?
procedure
(procedure-request-template procedure [ #:name name]) → request-template? procedure : procedure? name : symbol? = 'procedure-template
procedure
(named-request-template name) → request-template?
name : symbol?
procedure
(request-template? value) → boolean?
value : any/c
procedure
(request-template-serializable? value) → boolean?
value : request-template?
procedure
(parallel-map targets template [ #:order order]) → any/c targets : target-sequence? template : (or/c request-template? procedure?) order : (or/c 'forward 'reverse animation-order?) = 'forward
procedure
(successive-map targets template [ #:order order]) → any/c targets : target-sequence? template : (or/c request-template? procedure?) order : (or/c 'forward 'reverse animation-order?) = 'forward
procedure
(crossfade-subsets targets make-entry [ #:exit-template make-exit #:entry-duration entry-duration #:hold-duration hold-duration #:overlap overlap #:order order #:remove-final? remove-final?]) → animation-group-animation-request? targets : (or/c list? vector?) make-entry : procedure? make-exit : procedure? = fade-out entry-duration : positive-real? = 1 hold-duration : (and/c finite-real? (>=/c 0)) = 0 overlap : (and/c finite-real? (>=/c 0)) = 0 order : (or/c 'forward 'reverse animation-order?) = 'forward remove-final? : boolean? = #f
procedure
(animation-order? value) → boolean?
value : any/c
procedure
procedure
(forward-order? value) → boolean?
value : any/c
procedure
procedure
(reverse-order? value) → boolean?
value : any/c
procedure
(permutation-order indices) → permutation-order?
indices : (or/c list? vector?)
procedure
(permutation-order? value) → boolean?
value : any/c
procedure
(shuffled-order [#:seed seed]) → shuffled-order?
seed : exact-integer? = 0
procedure
(shuffled-order? value) → boolean?
value : any/c
procedure
(resolve-animation-order order count) → vector?
order : animation-order? count : exact-nonnegative-integer?