7.4: Adding and Removing Objects - p5.js Tutorial

preview_player
Показать описание
This video looks at how to add and delete elements from an array using the JavaScript array functions push() and splice().

Help us caption & translate this video!

Рекомендации по теме
Комментарии
Автор

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!

smplchmp
Автор

Dear Daniel, I am getting my life right now watching your videos. A+

chaseh
Автор

Using lovely bubbles to teach JavaScript array is much much better than using plain integers as most of coding teachers did.

goldthumb
Автор

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

diegoferreira
Автор

Daniel your teaching is really clear and it's also fun to see how the code can add or remove objects with the bubbles.

dwighthayles
Автор

I don't even notice how long these videos are, so helpful.

XXXI
Автор

You're just making my every day with these tuts! Seriously, my thing finally :D someday I'll donate you a fucking million, just wait for it :3

YnteryPictures
Автор

Brilliant tutorial.. All of them.. Your energy is very fascinating to watch..

AKfire
Автор

8:02 "I'm sure you have a question but you can't ask it" LMAO

kansel
Автор

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();
}
}

gluetubeserver
Автор

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

s.akhtarjoomun
Автор

after hours of trying how to figure this out i finally did it

Ancient
Автор

Just found your channel, this is an amazing resource - I'm learning a lot!

typicallucas
Автор

thanks dude ..

u explain way better tha thos hindi vedeos i watched ...

Rapsoodys
Автор

It's like a snake 🐍 😁 Nice Video!

coderrishav
Автор

thank you for your work, it's fantastic!

zoomboost
Автор

It's nice when the Javascript teacher has a _promise_ for us....🤣

hcgreier
Автор

Thanks a lot, all your videos are very good. i learn a lot. :D

rosapinkk
Автор

thank you for making video, i hope you started a playlist about real analysis....

tasneemalam
Автор

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

OlivioSarikas