Monorepo for Aesthetic.Computer aesthetic.computer
at main 53 lines 1.4 kB view raw view rendered
1# scroll - Pixel Translation Function 2 3*Basic pixel movement with edge wrapping* 4 5## Syntax 6```lisp 7(scroll dx dy) ; Move pixels by dx, dy 8(scroll dx) ; Move horizontally by dx only 9(scroll) ; Random direction (sticky per session) 10``` 11 12## Parameters 13- **dx**: Horizontal displacement in pixels 14- **dy**: Vertical displacement in pixels (optional, defaults to 0) 15 16## Behavior 17- Moves all screen pixels by the specified offset 18- Pixels that move off one edge wrap to the opposite edge 19- Creates seamless scrolling effect with no data loss 20- Random direction mode chooses once and sticks to it per session 21 22## Examples 23 24### Basic Movement 25```lisp 26(scroll 5 0) ; Move right by 5 pixels 27(scroll 0 -3) ; Move up by 3 pixels 28(scroll -2 1) ; Move left 2, down 1 29``` 30 31### Animation Patterns 32```lisp 33(s0.1 (scroll 1 0)) ; Continuous rightward scroll 34["2s..." 1 0 -1] ; Timing-based directional changes 35``` 36 37### Combined Effects 38```lisp 39(blur 1) ; Soften edges 40(scroll 2 0) ; Then scroll 41(contrast 1.1) ; Enhance result 42``` 43 44## Implementation Notes 45- Uses pixel-perfect translation with no interpolation 46- Deferred execution compatible with embedded layers 47- Works with mask regions for selective scrolling 48- Optimized for real-time performance 49 50## Related Functions 51- `pan` - Camera movement (different from pixel scrolling) 52- `zoom` - Scale transformation 53- `spin` - Rotation transformation