What are you using to do the coding? Processing in p5js mode, p5js web editor, or a local sketch.js and index.html?
What browser are you using to view the sktech? And what version number of that browser?
It’s not ideal to have to use old prototypes in place of classes.