File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change 6
6
< title > plzkillme</ title >
7
7
< style > body {padding : 0 ; margin : 0 ;} </ style >
8
8
< script src ="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.min.js "> </ script >
9
- < script src ="generarstistic .js "> </ script >
9
+ < script src ="selgnairt .js "> </ script >
10
10
</ head >
11
11
< body >
12
12
</ body >
Original file line number Diff line number Diff line change
1
+ function setup ( ) {
2
+ createCanvas ( windowWidth , windowHeight ) ;
3
+
4
+ fill ( 0 ) ;
5
+ frameRate ( 30 ) ;
6
+ j = 0 ;
7
+
8
+ s = Math . floor ( Math . random ( ) * 100 + 20 ) ; // spacing
9
+ }
10
+
11
+
12
+ function draw ( ) {
13
+ if ( j <= height ) {
14
+
15
+ for ( var i = 0 ; i <= width ; i += s ) {
16
+ triangle (
17
+ i , j ,
18
+ i + ( Math . random ( ) <= 0.5 ? 1 : - 1 ) * s ,
19
+ j + ( Math . random ( ) <= 0.5 ? 1 : - 1 ) * s ,
20
+ i + ( Math . random ( ) <= 0.5 ? 1 : - 1 ) * s ,
21
+ j + ( Math . random ( ) <= 0.5 ? 1 : - 1 ) * s
22
+ )
23
+ }
24
+
25
+ if ( i >= width ) {
26
+ j += s ;
27
+ }
28
+ }
29
+ }
You can’t perform that action at this time.
0 commit comments