#Why the very same snippet of Processing code runs on a p5.js Web Editor, but not on Processing 4

4 messages · Page 1 of 1 (latest)

waxen warren
#

I am simply trying to run the code in this X post to play with it. When I try doing so in my Windows laptop using Processor 4, I get a number of errors, but not on p5.js. Why is that?

Code:

t=0
draw=_=>{t||createCanvas(W=1920,H=1080)
t+=.015
for(y=0;y<H;y+=90)for(x=0;x<W;x+=90){push()+fill(255,24)+square(x,y,90)+drawingContext.clip()
for(i=4;i--;)circle(cos(R=noise(i/75+t,x/9,y/9)*9+noise(x,y)*9)*80+x+48,sin(R)*80+y+48,90-i*9)
pop()}}

The error messages are:

Syntax Error - Incomplete statement or extra code near æextraneous input '=' expecting {<EOF>, 'color', 'abstract', 'boolean', 'byte', 'char', 'class', 'double', 'enum', 'final', 'float', 'import', 'int', 'interface', 'long', 'native', 'private', 'protected', 'public', 'short', 'static', 'strictfp', 'synchronized', 'transient', 'var', 'void', 'volatile', '{', ';', '<', '@', IDENTIFIER}Æ?

t=0
draw=_=>{t||createCanvas(W=1920,H=1080)
t+=.015
for(y=0;y<H;y+=90)for(x=0;x<W;x+=90){push()+fill(255,24)+square(x,y,90)+drawingContext.clip()
for(i=4;i--;)circle(cos(R=noise(i/75+t,x/9,y/9)*9+noise(x,y)*9)*80+x+48,sin(R)80+y+48,90-i9)
pop()}}
#つぶやきProcessing
#AltEdu2022

cloud fulcrum
waxen warren