56.4 Drawing attention
Use a temporary effect to draw attention to an object.
procedure
(pulse target [ #:scale-factor scale-factor #:opacity-factor opacity-factor #:cycles cycles #:about about]) → pulse-request? target : (or/c visual? symbol? visual-path?) scale-factor : any/c = 6/5 opacity-factor : (real-in 0 1) = 1 cycles : exact-positive-integer? = 1 about : (or/c 'center 'reference vec2?) = 'center
Only nonidentity components are written: a scale factor of one writes no scale, and an opacity factor of one writes no opacity. A pulse can therefore run with same-target movement when it does not write translation, but it conflicts with any overlapping request that writes one of its selected components. Direct Visual targets are checked immediately; symbol and nested-path targets are checked at the leaf’s exact local start.
procedure
(pulse-request? value) → boolean?
value : any/c
procedure
(confetti origin-or-target [ #:count count #:seed seed #:spread spread #:height height #:gravity gravity #:palette palette #:id id]) → confetti-request? origin-or-target : (or/c vec2? visual? symbol? visual-path?) count : exact-positive-integer? = 24 seed : exact-integer? = 0 spread : (and/c finite-real? (>=/c 0)) = 2 height : (and/c finite-real? (>=/c 0)) = 2 gravity : (and/c finite-real? (>=/c 0)) = 3
palette : (or/c (listof color-spec?) (vectorof color-spec?)) = default-confetti-palette id : (or/c #f symbol?) = #f
Each piece follows a direct ballistic formula using spread, height, and gravity, so arbitrary-time sampling and forward playback produce the same frame. With an explicit id, helpers use deterministic child identities under that name; otherwise their identities are derived from the composition expansion origin. They appear only at interior samples and are all removed exactly at completion. Reusing an explicit id in a simultaneous play is rejected as a normal component conflict. Inspection records the resolved origin, seed, generated count, and helper IDs.
procedure
(confetti-request? value) → boolean?
value : any/c