►V Reference
On this page:
pulse
pulse-request?
confetti
confetti-request?
9.3

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
Temporarily changes selected affine/opacity components of a present target through a deterministic squared-sine there-and-back envelope. The envelope is exactly zero at both clip endpoints, and the exact clip-start component values are restored at completion. #:cycles is an exact positive integer.

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

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
Creates a deterministic temporary overlay of simple path pieces. The complete piece plan is generated at construction from seed, without reading or mutating global random state. A vec2 is a fixed launch point; a Visual, symbol, or path target is resolved to its world reference point once at the play clip’s start. Consequently, the target is not rewritten and later target motion does not change an already compiled particle trajectory.

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
Recognizes a request created by confetti.