Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Generate 'Water-Paper-Scissors' animation.
- water_paper_scissors :
- # Generate game iterations as a single volumetric image.
- 150,150,150,1,v(2)
- repeat 100 {
- fill "const boundary = 2;
- const threshold = 9;
- winner = (i + 1)%3;
- H = histogram(crop(x - 1,y - 1,z - 1,3,3,3),1,winner,winner);
- H[0]>=threshold?winner:i"
- window.
- }
- # Stylize each label of each frame with a water-drop effect.
- resize 480,480,100%,1,6 blur xy,1%,2 cut 0,2 round 1
- +==[0] 1 +==[0] 2 ==[0] 0 normalize 0,255
- foreach { i=$> split z
- col0=0,0,0
- col1=128,0,0
- col2=200,128,32
- foreach {
- channels. -3,0 100%,100%,1,3 fill_color. ${col$i}
- +fx_drop_water 1,20,2,80,0,3,35,10,1,0.5,0.25,0.5,0.75,0.05,0.15,0
- remove.. channels.. 3 split. c remove. move[0] $! append c
- window.
- }
- append z
- }
- blend alpha split z
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement