A p5js mode problem?

Hello,

I tried a very P5JS simple sketch and it doesn’t work in the with P5JS mode. It works fine in P5JS webeditor.

I’ve got : Syntax Error : “Expected an operand but found class”

The code is

 "use strict";

let bubble;


function setup() {
  createCanvas(400,400);
  bubble = new Bubble(100);
}


function draw() {
  background(255);
  bubble.display();
}

class Bubble {
  constructor(width_) {
    this.width_ = width_;
  }
  
  display() {
    ellipse(mouseX,mouseY,this.width_,this.width_);
  }
}

I don’t understand !!!
:frowning:

1 Like

p5js Mode doesn’t seem to be compatible w/ JS ECMA 6 / 2015. :mask:

But if you prefer to code locally, here are some tips: :innocent:

thank you

I wonder if (and when) p5js mode is going to be compatible with ECMA6 !!!

as an other alternative, what of the old p5js local javascript editor (made with node.js) ???

(My OS is Linux Mint - Mate edition)

I believe all offline p5js IDEs have stopped being developed. :stop_sign:

But you can take a look at this forum post below: :wink:

thanks

you can’t make anything serious with the web editor

it’s just good for educational purpose .

That is one of the main reasons I post what @GoToLoop is linking.
As said before, all versions of offline IDEs are abandoned. I contacted some of the developers of the last version of the desktop IDE and no one is working on it, and all dependences are outdated. But for most cases i think the old desktop editor keep working, like your example code. Just tested and it work.

I don’t understand. No it doesn’t work !!!

see here

Processing 3 5 3 and nothing to update

:frowning:

P.S. How come it works for you !!!???

Linux version

Hi @EricRogerGarcia,

I was talking about the old p5.js dektop editor. You still can download it from here:

I just tested on Windos and it works. I cant tell you about the Linux version.

ok

thank you very very much :smiley:

1 Like