Комментарии:
what is the difference between a class and a creating your own normal function (like in video 5.2)?
Ответитьi tried taking that bouncing ball example and making it as a class but everytime i add if statements the ball doesnt move
Ответитьhi! could anyone help me out adding perlin noise to these moving bubbles?
thnx!
all these years later i still dont know if i like the class keyword or not 😂
ОтветитьThank you
ОтветитьLove your teaching style, enthusiastic and organic very good sir
ОтветитьHi, I am still not understand what is "this." for and why we need use "this."? Please explain. :)
ОтветитьI loved it, it cleared most of my doubts , thank you very much 😊
Ответитьthank you
ОтветитьONCE THE CLASS CONSTRUCTOR IS CALLED AND CREATES THE NEW OBJECT, HOW DO I GET THE NEW OBJECT INTO AN OBJECT ARRAY???
HOW DO I GET A NEW PERSON OBJECT FROM THE NEW PERSON CONSTRUCTUR INTO THE PERSONS ARRAY???
I'm here because I'm trying to use Class/constructors to form a new object every second in setInterval... hoping I figure it out soon.
ОтветитьHere is the video where the fun begins . Wohoo
ОтветитьCan you have more than 1 constructor? Does JavaScript recognize constructor “signature”?
Ответитьplease put out a full-on course for javascript or whatever you would. My life would be much easier.
Ответитьthank you so much.... now i fully understand constructor
ОтветитьYou ruined me! After watching your videos I can't get anything out of those other monotone lessons. Guess I'll have to go back to books now. Thanks a million!
ОтветитьThis guy never fails to impress with his amazing teaching skills.
Ответитьthanks for creating such amazing tutorials. :)
Ответитьcan I pass a function name as an argument through a constructor?
ОтветитьTo bubble or not to bubble, that is the bubble.
Ответитьgreat bubble
ОтветитьThank you! Your video is really helpful ! Is that possible to shorten code “bubble1.make()~bubble2.show()”??
ОтветитьThe need of the hour in this cruel-cruel world is to know the answer to one question. One question that is the bane of our existence and will decide our future: What does it mean to be a bubble???
ОтветитьFinally this makes sense. Thanks
ОтветитьThank you so much!
ОтветитьOne issue here, I wanted to see your code for this video but didn't find it in the Git link you mentioned in the description. Maybe I don't know how to use Git yet (because I'm new to programming and only watched this playlist so far).
Ответитьdawg, you totally demystified oop here.
Ответитьohh man!!! how you do it....this is an awesome video....actually the whole playlist is awesome....
ОтветитьI love this guys' sense of humor
ОтветитьI already knew most of this stuff from your coding challenges but it's still fun watching everything and getting a explanation on how everything works
ОтветитьThank you for explaining in fun way Daniel.
ОтветитьLMAO, great obscure reference. Pink Fluffy Unicorns Dancing on Rainbows (by Songs to Wear Pants To)
ОтветитьI know these constructors, In python we use __init__ function
ОтветитьJavascript just likes to work :)
ОтветитьDon't get me wrong now, but...
To me, as a old assembly coder this Object Oriented stuff grinds my gears sometimes. I know this OOP is the future and so on.
But sometimes I feel like I'm building a complete circus event including the town it's visiting, paving roads that leads to the town, setup signs, etc.
All this for some circus clowns doing tricks and blowing soap bubbles and having fun.
But the circus is empty. There are no people watching. No people live in the town. No one has, no one will.
But hey these 3-4 circus clowns needs all this to function. Right?
Actually not at all.
For me the old bitter assembly coder all this seems like madness.
In OOP we setup for a space launch when in fact we're just going down to the corner shop to get a pack of milk.
Insanity I say! =)
The dusty bitter old assembler coder just makes a few short arrays and a loop to execute the damn thing. Done! Profit.
I enjoy OOP as much as the next coder. But we all really know why we need GigaJohns of memory in our PC's. But we don't talk about it. ;)
LoL Loading library after library just to use 1 or 2 things in it. Madness I say!
Keep up the great work Daniel! Love your videos. =)
PS. My comment was sarcasm. I hope everyone understood that.
quick question. can you put loops and if statements inside classes?
ОтветитьThese videos are so well done! One thing I don’t think you mentioned though was the idea of hoisting within class declaration vs function declaration. The difference is that class declarations are NOT hoisted. So, if you didn’t declare your bubble variables at the top, since your class is written below the new Bubble instance, technically you’d see errors. I think this is a very important concept to understand with classes! Thanks for making all these videos, I watch them daily!
Ответитьisn't there any video about getters and setters.?
Ответитьlet c = new car(100,200,100);
function setup()
{
createCanvas(500,300);
background(100,190,255);
}
function draw()
{
c.rectangle(200,100,100);
}
class car
{
constructor(x,y,w)
{
this.x=x;
this.y=y;
this.w=w;
}
rectangle(x,y,w)
{
rect(this.x,this.y,this.w+50,this.w);
ellipse(this.x+20,this.y+50,20);
ellipse(this.x+70,this.y+50,20);
}
}
//this is not working....please help
I keep getting the error Uncaught ReferenceError: Bubble1 is not defined (sketch: line 6) but cant find what the problem is, im pretty sure I have copied the code exactly, after trying my own variation and also getting this error. This is all new to me, but does anyone in the comments have any suggestions?
ОтветитьI finally understand classes. Thanks
Ответить