File tree Expand file tree Collapse file tree 1 file changed +74
-0
lines changed
Expand file tree Collapse file tree 1 file changed +74
-0
lines changed Original file line number Diff line number Diff line change 1+ col = {
2+ c1 : 20 ,
3+ c2 : 57 ,
4+ c3 : 84
5+ }
6+ var p1 = 0 ;
7+ var p2 = 0 ;
8+ var x = 62 ;
9+ var y = 62 ;
10+ var addf = 62 ;
11+ var zero = 0 ;
12+ function setup ( ) {
13+ colorMode ( HSB ) ;
14+ createCanvas ( 500 , 500 ) ;
15+ background ( 57 , 9 , 85 ) ;
16+ }
17+
18+ function draw ( ) {
19+ noStroke ( ) ;
20+ fill ( col . c1 , col . c2 , col . c3 ) ;
21+ rect ( p1 , p2 , x , y ) ;
22+ x ++ ;
23+ if ( x > 500 ) {
24+ p2 = p2 + 62 ;
25+ x = zero ;
26+ }
27+ //---------------------------------------------------
28+
29+ if ( p2 == 0 ) {
30+ col . c1 = 20 ;
31+ col . c2 = 57 ;
32+ col . c3 = 84 ;
33+ }
34+ if ( p2 == 62 ) {
35+ col . c1 = 10 ;
36+ col . c2 = 52 ;
37+ col . c3 = 83 ;
38+ }
39+
40+ if ( p2 == 124 ) {
41+ col . c1 = 7 ;
42+ col . c2 = 48 ;
43+ col . c3 = 72 ;
44+ }
45+ if ( p2 == 186 ) {
46+ col . c1 = 349 ;
47+ col . c2 = 45 ;
48+ col . c3 = 82 ;
49+ }
50+ if ( p2 == 248 ) {
51+ col . c1 = 338 ;
52+ col . c2 = 40 ;
53+ col . c3 = 66 ;
54+ }
55+ if ( p2 == 310 ) {
56+ col . c1 = 322 ;
57+ col . c2 = 33 ;
58+ col . c3 = 64 ;
59+ }
60+
61+ if ( p2 == 372 ) {
62+ col . c1 = 220 ;
63+ col . c2 = 40 ;
64+ col . c3 = 33 ;
65+ }
66+
67+ if ( p2 > 372 ) {
68+ background ( 57 , 9 , 85 ) ;
69+
70+ p2 = 0 ;
71+ }
72+
73+
74+ }
175
You can’t perform that action at this time.
0 commit comments