Monorepo for Aesthetic.Computer aesthetic.computer

scroll - Pixel Translation Function#

Basic pixel movement with edge wrapping

Syntax#

(scroll dx dy)     ; Move pixels by dx, dy
(scroll dx)        ; Move horizontally by dx only
(scroll)           ; Random direction (sticky per session)

Parameters#

  • dx: Horizontal displacement in pixels
  • dy: Vertical displacement in pixels (optional, defaults to 0)

Behavior#

  • Moves all screen pixels by the specified offset
  • Pixels that move off one edge wrap to the opposite edge
  • Creates seamless scrolling effect with no data loss
  • Random direction mode chooses once and sticks to it per session

Examples#

Basic Movement#

(scroll 5 0)       ; Move right by 5 pixels
(scroll 0 -3)      ; Move up by 3 pixels
(scroll -2 1)      ; Move left 2, down 1

Animation Patterns#

(s0.1 (scroll 1 0))  ; Continuous rightward scroll
["2s..." 1 0 -1]     ; Timing-based directional changes

Combined Effects#

(blur 1)           ; Soften edges
(scroll 2 0)       ; Then scroll
(contrast 1.1)     ; Enhance result

Implementation Notes#

  • Uses pixel-perfect translation with no interpolation
  • Deferred execution compatible with embedded layers
  • Works with mask regions for selective scrolling
  • Optimized for real-time performance
  • pan - Camera movement (different from pixel scrolling)
  • zoom - Scale transformation
  • spin - Rotation transformation