ASmartCoder dawg didn't even read my reply‼️‼️😂🥶🥶💯

addEventListener('mouseup', (event) => {mouse.holding = false})
addEventListener('mouseup', (event) => {mouse.holding = true})

->>

addEventListener('mouseup', () => mouse.holding = false);
addEventListener('mouseup', () => mouse.holding = true);

if you want to make it even shorter:

.onmouseup = ()=> mouse.holding = false;

also 2 onmouseup events? or are they for different elements

    Though I am wondering.. are you still using a p5 library? If you are then there isn't much different from code.org's es5, other than a bit more freedom with some functions... it all still does the same thing

      Letti42 Not really
      sprites have a limited amount of things that you can actually implement on.
      For example, the main properites of sprites that we all know is x, y, width, height, rotation. But you're limited in a way. Cdo pre-built the constructor, the canvas, and some other things, and making your own class is forbidden (class for sprites)

        Letti42
        calling someone a dog is dehumanizing.
        morons like you keep pulling our society down.

          ASmartCoder
          a sprite is just a constructor, so you can(actually I did once) add a bunch of properties and then define your own usages for those properties
          for example,:
          // made a new sprite function cuz i don't wanna go through CDO code and find what the actual sprite constructor is called in order to make a prototype function thingy
          function makeySprite(x,y){
          this.sprite = createSprite(x,y);
          this.sprite.dog = 0;
          }
          makeySprite.prototype.dehumanize = function(){
          this.sprite.dog += 1;
          };
          var sprite = new makeySprite(200,200);
          sprite.dehumanize();

            technically thats just calling them a furry

            ackvonhuelio yo please tell me your joking 😂😂 aint no way mans think I called him an actual dog

            ASmartCoder well thing is you can extend the constructor of createSprite but you kinda have to fuck wit it to get what you want ackvonhuelio has spared your eyes you should be grateful lmao also createSprite should just be an extension of the Sprite() class since it's based off p5.play

              Varrience
              why do they teach people to use createSprite() instead of new Sprite()???
              seems like its kinda unnecessary, gets rid of a possible introduction to constructors, and creates a pain for people like me who want to extend the Sprite() constructor

                ackvonhuelio true... i assume it's to get people started with functions maybe? constructors may be a bit much to show someone when there just starting out as well but that's definitely something they probably should incorporate especially since there starting java lab which basically relies off of object to get anything running

                ackvonhuelio The point of Gamelab is too be able to be taught to students (little gross kids) who are probably 8 year olds. It may introduce them to constructors early on, but think about it - is it easier to teach a kid, "oh, just use this function!", or to instead have a whole lesson on how constructors work? Gamelab is a tool for teaching, and presenting the kids with a completely new concept is way too hard for both code.org and the teachers..

                  well i see his point because new sprite makes more sense than create sprite

                  Letti42 Well I learned constructors pretty easy, and constructors aren't that hard to learn. also gamelab uses a p5.js library, so it's not really that useful . . .

                  Chat