-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Open
Labels
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build process
- Unit testing
- Internationalization
- Friendly errors
- Other (specify if possible)
p5.js version
2.0.4
Web browser and version
Chrome
Operating system
Windows
Steps to reproduce this
Steps:
- use noise().
- p5.Editor case: An odd TypeError occurs
- OpenProcessing case: An odd FriendlyError occurs
Snippet:
function setup() {
createCanvas(400, 400);
console.log(noise(3));
console.log(noise(3,4));
console.log(noise(3,4,5));
}
version 2.0.3
p5.Editor

OpenProcessing

version 2.0.4
p5.Editor

OpenProcessing

broken code with p5.js 2.0.4
function setup() {
createCanvas(600, 600);
pixelDensity(1);
}
function draw() {
background(0);
translate(300, 300);
let r=4000;
noStroke();
fill(255);
const t = millis()/1000;
while(r--){
const x = (t*120 + fract(noise(r)*2)*500)%500;
translate(x,0);
rect(-1,-1,2,2);
translate(-x,0);
rotate(TAU/4000);
}
}

The noise function is dead.
cscnk52