Faking Shaders III: Tixyland
garten.salat.dev
garten.salat.dev
change the line
`${lib};const {sin,cos,tan,random,PI,sqrt,hypot,atan,atan2} = Math; ${code}; return main;`
to `${lib};const {${Object.getOwnPropertyNames(Math)}} = Math; ${code}; return main;
To bring in all of Math into context without having to list them all individually.You can still define them in inline with not too many characters though so maybe it's ok.
https://garten.salat.dev/fake-shaders3.html#Zy5kaW09NjQ7bGV0...