03 Time, interaction and repetition
fract and mod: endless repeats
Keep only the fractional part of the coordinate and the pattern repeats.
112
0.050.48
ExerciseTune values
Make big 3×3 dots
Runs once per pixelDrag numbers, or edit the code
JS side
fract(x) = x − floor(x); scale the coordinate up, then take the fraction, and one canvas becomes many small ones.
Try it
- Set the repeat count to 12
- Swap the checker colours