Facebook
From Thijs E, 6 Years ago, written in JavaScript.
This paste is a reply to Class prototype JS from Thijs E - go back
Embed
Viewing differences between Class prototype JS and Re: Class prototype JS
class myClass{

        constructor(var1, var2, var3){
                this.var1
                this.var2
                this.var3
        }


        myMethod() {
        fill(255, 255, 255);
        ellipse(this.x, var1, this.y, var2, this.radius);
var3);
    } 


    anotherMethod() {
               if (mouseX < this.var1 = this.var2 + this.radius || mouseX > this.x - this.radius && mouseY < this.y + this.radius || mouseY > this.y - this.radius) {
                 print("mouse is in");
        }
var3;
    }
}