You are an excellent teacher! I often find myself reviewing fundamentals to stay sharp and nothing's worse than wasting time in an incoherent video or verbose documentation. Your flow is just right - informative, concise, and even entertaining so thank you!
@chaseh56398 жыл бұрын
Dear Daniel, I am getting my life right now watching your videos. A+
@TheCodingTrain8 жыл бұрын
glad to hear!
@goldthumb2 жыл бұрын
Using lovely bubbles to teach JavaScript array is much much better than using plain integers as most of coding teachers did.
@dwighthayles12263 жыл бұрын
Daniel your teaching is really clear and it's also fun to see how the code can add or remove objects with the bubbles.
@diegoferreira34447 жыл бұрын
i reaaly like when you use analogy to explain things because programming is so abstract, and is nice to come with a picture of what's going on in the program
@X21XXI7 жыл бұрын
I don't even notice how long these videos are, so helpful.
@YnteryPictures9 жыл бұрын
You're just making my every day with these tuts! Seriously, my thing finally works!!YEEEEEEEEEEEEEEY :D someday I'll donate you a fucking million, just wait for it :3
@TheCodingTrain9 жыл бұрын
+YnteryPictures So glad to hear!
@AK56fire3 жыл бұрын
Brilliant tutorial.. All of them.. Your energy is very fascinating to watch..
@kansel58135 жыл бұрын
8:02 "I'm sure you have a question but you can't ask it" LMAO
@OlivioSarikas7 жыл бұрын
For some reason mouseDragged does not work for me, although mousePressed works perfectly. Did anything change in P5 that prevents this from working? - It does work wiht mouseMove however, but that's not the same
@TheCodingTrain7 жыл бұрын
Not that I know of!
@OlivioSarikas7 жыл бұрын
strange. also thx for the answer. here is my code, maybe you can have a quick look at it: piratepad.net/91XoUUiAMa
@flipp_7 жыл бұрын
I've got the same problem! Have you found a solution yet?
@kiragibson31127 жыл бұрын
that's a cool program
@gluetubeserver8 жыл бұрын
here is what did for the last challenge bit you mentioned of removing the objects when they are offscreen. function draw() { background(0); for (var i = 0; i < bubbles.length; i++) { if (bubbles[i].x > width || bubbles[i].y > height || bubbles[i].x < 0 || bubbles[i].y < 0) { console.log("out of bounds, deleting"); bubbles.splice(i, 1); break; } bubbles[i].move(); bubbles[i].display(); } }
@coderrishav4 жыл бұрын
It's like a snake 🐍 😁 Nice Video!
@s.akhtarjoomun2633 жыл бұрын
The rest of the world: It's cardio time. I need to get to the gym. Daniel: It's cardio time. I need to make a video
@typicallucas8 жыл бұрын
Just found your channel, this is an amazing resource - I'm learning a lot!
@Ancient13417 жыл бұрын
after hours of trying how to figure this out i finally did it
@Rapsoodys7 жыл бұрын
thanks dude .. u explain way better tha thos hindi vedeos i watched ...
@tasneemalam13592 жыл бұрын
thank you for making video , i hope you started a playlist about real analysis....
@rosapinkk117 жыл бұрын
Thanks a lot, all your videos are very good. i learn a lot. :D
@zoomboost7 жыл бұрын
thank you for your work, it's fantastic!
@TheCodingTrain7 жыл бұрын
Thank you so much!
@hcgreier60372 жыл бұрын
It's nice when the Javascript teacher has a _promise_ for us....🤣
@zem.w57834 жыл бұрын
better than my online cores from uni
@MyPlaylist-xq8en5 жыл бұрын
Awesome explanation! I give you my "Like" and "Subscribe". Good Job!
@HyperActive946 жыл бұрын
great explanation! love it! thanks
@cap.blue-97sama996 жыл бұрын
Great content!
@RABWA3337 жыл бұрын
very informative. thanks
@akshaypratap93764 жыл бұрын
what is the key difference between the java object and if the same thing achieves with the java classes?
@ralfspinoza6 жыл бұрын
good work. Thank you for that.
@Demobnector4 жыл бұрын
is this html5? cuz I am on a standard html. Is the html different to html5?
@dimashishkov29098 жыл бұрын
Daniel, first of all let me thank you for great job. These tutorials are both informative and very entertaining. A real please to watch and learn. I have a little question regarding this tutorial. Let's say we have a Bubble object which has 2 parameters X ad Y: "Bubble (x, y)" and I have global variable stated at the top of the sketch with the same names "var x", "var y". How could I access those global variables inside the object? Is it possible or am I missing some important concept here? Thank you very much in advance.
@TheCodingTrain8 жыл бұрын
+Dima Shishkov the global variables are accessible by just referencing their name alone - "x" and "y"!
@dimashishkov29098 жыл бұрын
+Daniel Shiffman but in the video you refer to the Bubble's parameter (those in brackets) as "this.x = x", where "x" refers to the "x" in the Bubbles brackets. I did a quick test and even If I declare global parameters "x" and "y" and write "this.x = x" and "this.y = y", those "x" and "y" are still taken from the Constructor's brackets. So I can't declare global variables with the same names as in Constructor's brackets? Sorry, maybe I am missing something obvious, but I am quite new to programming.
@tz20147 жыл бұрын
yeah u are missing something obvious,because when u have "x" and "Y" in brackets they overwrites "x" and "y" declared as global variables at the top. This is how it works, if u have a two variable with the name one global and other in a function(like those in brackets), the global variable get overwritten,the javascript engine refer to the immediate one.
@scharfer569 жыл бұрын
Alternatively, you can simply use the shift() method on an array to remove the first item from it.
@TheCodingTrain9 жыл бұрын
+Ryan Scharfer Good tip, thanks!
@timetravellers89099 жыл бұрын
Mr. Shiffman, how can I do a push() in Processing? Is it possible? If not, what's the workaround to achieve the same effect (adding bubbles when clicking) thanks!
@TheCodingTrain9 жыл бұрын
+timetravellers You can use an ArrayList and the function add(). Here is a tutorial that shows some of this: kzbin.info/www/bejne/fp-2e41qprmWrbs
@timetravellers89099 жыл бұрын
+Daniel Shiffman That's exactly what I was looking for, thanks a lot! Best videos on P5/Processing ever!
@TheCodingTrain9 жыл бұрын
+timetravellers glad to hear!
@sadielectricalelectronicss85956 жыл бұрын
Love you bro.....
@kic30007 жыл бұрын
Hi, Daniel, thanks for your videos. Im very enjoying with them. Here im trying to make some effect like, once you mouseDragged the circle, and with 1click , they will spread to random direction(out of screen). so, is there anyway to override the move() function of the constructor function of Bubble? thanks!
@marqimoth69873 жыл бұрын
how do i delete something depending if the if function gets triggered
@bencruz79067 жыл бұрын
THANK YOU AWESOME!!!
@ashishchauhan72396 жыл бұрын
hlo sir i am trying to store multiple data in local storage but errors can you help me to resolve this ?
@jaiir32036 жыл бұрын
How should I make an object in p5.js, by using the var bubble = function (){} method or should I use function bubble(){} What's the difference
Do you know how to configure the window that opens up when you preview your project to be exactly the size of the canvas? I like to create a 500*500 canvas, but when I preview the project, the window that opens up is 400*400 or so and I have to drag and stretch the window to see the whole canvas. I know running in the browser is an option, but I like the little pop up window...
@TheCodingTrain9 жыл бұрын
+Ryan Scharfer Go and get the most recent editor. It should do this for you automatically. If you change the window size manually it will keep your manual adjustment, but you can reset that by quitting and relaunching the editor. See: github.com/processing/p5.js-editor/releases You can also file bug reports here if it's not working as you expect: github.com/processing/p5.js-editor/issues
@S0KE8 жыл бұрын
Hey Daniel! I'm having kind of a problem here. I'm making a sidescrolling game using the translate function you showed in another video (I set the translate function to move on the Y axis based on the character position). I was testing something with the push and splice function and I made it add a new object to an array and delete the oldest one everytime I click, just like you did in this video. It seemed to work fine, however, I noticed that when I move my character up and click on the screen mouseY does not seems to be translated, because the objects start to apear down, in other words, it keeps appearing where the mouseY would be in the starting position as if I never moved the character at all. Is this behavior expected? If for example I click on 100,100 and then use translate to move my view -200 on the Y axis and click again, shouldn't I be clicking on 100,-100 now?
@KuyruksuzSatyr6 жыл бұрын
10:17 its fun for us too, we are all weird don't worry :D
@herrjose4 жыл бұрын
daniel rules!
@zoecarlibur8 жыл бұрын
that was fun!
@tarekmustafa25258 жыл бұрын
Awesome!
@havearelax314013 жыл бұрын
everything ok but I am not seeing that bubbles|||| vscode shows that its running but cannt see the exact output u showed
@videosaver1934 Жыл бұрын
This is p5js
@SaintPepsiSanCoca9 жыл бұрын
Once again i got a question: I'm using the constructor function to create something(moving image for example) when mouseIsPressed. and when that "image" gets to a certain point, it resets back to its first position. but when i let go of the mouse before it hits the end value, and i click again. it just starts where I last let go of the mouse. How do I make it so that when my mouse is released it also resets its value. because I can't call it's reset function from out of the for loop.
@TheCodingTrain9 жыл бұрын
+skrubritos you can! I would simply write a new function (or re-use an existing one) and call that function in the mouseReleased() event handler,i.e. function mouseReleased() { yourobject.reset(); }
@SaintPepsiSanCoca9 жыл бұрын
+Daniel Shiffman thank you! but it's a little hard to target what i want to reset. because i used an array constructor to create something while the mouse is pressed within a if mouseispressed in the draw function. when i try to target the function in my object that's been created with the constructor function and thats in a for loop. if i try to target it outside of the for loop it says that its not a function. (so complicated) pff. thanks again for the help. final question. if the function is a mouseIsPressed. do i even need to use the constructor function? because I had it without constructor function before and then it did reset when i let go but the image wouldn't dissapear(reset) when it got to the and
@SaintPepsiSanCoca9 жыл бұрын
+Daniel Shiffman sorry that was a really long message. I can't try what you said right now so all the coding thats going on is in my head so as soon as i can test the reset() function i'll let you know. also I had send you an email on your contact adress :)
@SaintPepsiSanCoca9 жыл бұрын
+Daniel Shiffman one more addition to the mouseRelease it seems to trigger even when I havn't told it to do something. is that correct or does it do something that i'm not aware of :)
@SaintPepsiSanCoca9 жыл бұрын
Daniel Shiffman Nevermind. thanks for the help! my Javascript/Jquery teacher helped me understand what i did wrong. Keep making videos shiffgod :3
@alvaromorales68288 жыл бұрын
Hey men , I am getting a little bit lost lately, but I don't wanna to rewatch your videos again , Can you provide some pdf or text document where I can go over ..?
@zyzo996 жыл бұрын
Hello, what about AdobeJS ?Do you plan some videos about it? cheers! ))
@kikesitosk8xoxtla7 жыл бұрын
What library are you using?
@fariat6 жыл бұрын
thanks
@GhostStyle0072 жыл бұрын
i don't rly understand what's the challenge you talked about at the end, i just added that at the end of your "for" loop: if(bubbles[i].x>width){ bubbles.splice(i,1) } and it works like expected
@tazulislam26984 жыл бұрын
How to separate unique object from JSON array? please make a video.
@Markos_o7 жыл бұрын
hallo Dan , i can not download p5 !! why that ?
@kiragibson31127 жыл бұрын
I'm having a really hard time understanding why you need the for loops in the example he uses. Why can I not just have the constructor function and the mousePressed function and that work? Why is the for loops a necessity? Why is the bubbles.length loop needed to have the mousePressed event work? Please help me understand this, someone. It's hard to look this stuff up on the internet and get a direct answer to my very specific question without someone here that can guide me through it.
@hyfahyf15525 жыл бұрын
How can we delete json genie array permanent
@deepakvishwakarma20433 жыл бұрын
What is he using to code ???
@kbryanolan5 жыл бұрын
oh..I'm not alone 🙊
@AlexOchs7 жыл бұрын
am i the only one who has a problem with for loops? everytime i try to use one in p5.js i get the error "Move 'var' declarations to the top of the function."
@animore86267 жыл бұрын
Are you getting any hints as to what line of code is causing the error?
@johncerpa37827 жыл бұрын
mouseDragged is not working for me
@saipanidarapu66567 жыл бұрын
try to add the p5 library to your editor, i think its an inbuilt function.
@itzspellon13303 жыл бұрын
i wanted to make if something touch the rect the rect disapears
@zandgall18377 жыл бұрын
You should make it so that every time you click, a new blue blob appears!
@marineoutsource4 жыл бұрын
Wow ... !!!
@alnayab6 жыл бұрын
ur awsme
@alonsomartins7122 жыл бұрын
7:37 Sempre que ele faz isso nos vídeos eu acho muito engraçado kskk
@SMC4free4 жыл бұрын
I was looking for an answer of that problem in the end of the video 🤦♂️
@Hydr3128 жыл бұрын
what about the "add" and "remove" comment ?
@andresfelipesierrasi8 жыл бұрын
interesante p5 js
@lizabeti34576 жыл бұрын
Awe You can also use array.split(indexOf(whatever), 1); which checks what’s the index of whatever 😂
@arieluzal8 жыл бұрын
These tutorials are all excellent! Could you possibly make one explaining inheritance in p5.js (eg: p5js.org/examples/examples/Simulate_Multiple_Particle_Systems.php)? Thanks!
@TheCodingTrain8 жыл бұрын
Oh good idea! Suggest here: github.com/CodingRainbow/Rainbow-Topics/issues
@Mohammad_Awais7 жыл бұрын
* Need help!! Facing the issue while doing the same task in processing.. Bubble[] bubbles = new Bubble[50]; void setup() { size(600, 400); for(int i = 0; i < bubbles.length; i++) { bubbles[i] = new Bubble(); } } void draw() { background(0); for(int i = 0; i < bubbles.length; i++) { bubbles[i].move(); bubbles[i].display(); } } void keyPressed() { bubbles.splice(0,5); //here is the issue!! } ====== class Bubble { float x = random(0, width); float y = random(0, height); void display() { stroke(255); fill(255, 0, 150, 50); ellipse(x, y, 24, 24); } void move() { x = x + random(-1, 1); y = y + random(-1, 1); } }