2.3: JavaScript Objects - p5.js Tutorial

preview_player
Показать описание


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

Just to let you know that there's now a new built in circle() function in p5.js so that this var declaration DOESN'T WORK anymore. Use any other name than circle when declaring your variable. Example :


var c = {x:0, y:200, diameter:100};
...
ellipse(c.x, c.y, c.diameter, c.diameter);
c.x+=1;

pafou
Автор

You start watching just ONE video and then you get hooked to it, like some awesome TV show ;)

saif_ali_khan
Автор

He is a great teaher becaause he varies between writing on the board to improve your conceptual understanding in addition to implementing the concept in code. This is very rare!

logomoniclearning
Автор

Daniel, you are the best programming teacher I have ever seen. Thank you

nenenoch
Автор

@TheCodingTrain why do you always say "if anyone is actually watching this video" ? I love watching your videos. You're a very good teacher whose made coding so much fun and exciting for me ! I love your positivity. You're also one of the few YouTubers for whom I have pressed the bell icon because I love watching all your videos ! So keep coding, keep making awesome content and always stay positive !

AK-pykl
Автор

Your way of teaching way is unparalleled. Explained in such a lucid manner.

parigyantamuly
Автор

This is how a teacher is supposed to be :)

delahogue
Автор

I just have to say your one of the first teachers for programming that I actually find super interesting to listen to.
Keep up the great work!

JuztoKik
Автор

oh man, i'm rewatching this after a year, and i still love you!

urgisjot
Автор

got a udemy course and you explained it a lot better

Hiatuz
Автор

I have just about completed the js lesson in codecademy,  watched countless tutorials from instructors and youtube personalities and I have never understood things this clear. You do a great job breaking things down without using "fantasticalness" that only gets in the way. Thank you so much

mad
Автор

My friend, Genuinely You are one of the best coding teachers I have ever had.

studyrelated
Автор

Thank you Daniel!! For You're awesome

kamalbhatnagar
Автор

UPDATE!!! instead of circle you need to write circl

jerriktorp
Автор

Everything should be made as simple as possible, but not simpler. This man is doing it to the utmost!

RameenFallschirmjager
Автор

I know these videos are from a while ago but very informative and the best ones I have found. Thanks Daniel!

noahpayne
Автор

It is insane how amazingly talented you are at explaining and your amazing and positive energy... we need more professors and overall people like you in this world... wow

paxthewax
Автор

I am some what new to programming, and have been bouncing around websites such as khan academy and code academy to learn the basics. But I have found that your videos are by far the most helpful and useful :) keep making more!

johnvu
Автор

Thank you so much Coding train i have been watching these videos for the past few days and i have learned so much. From knowing nothing to now writing my own program. Keep it up ! i know this video was made ages ago it is still perfect to use and learn so thank you so much for inspiring me to keep on coding.

droneexpress
Автор

Just started getting into JS and p5, it has been fun so far, thanks for your awesome series!
Some random plotting fun:

var windowW = window.innerWidth;
var windowH = window.innerHeight;
var moveX;
var moveY;
var firstLX;
var firstLY;
var secondLX;
var secondLY;

function setup() {
createCanvas(window.innerWidth, window.innerHeight);
background(60);
frameRate(30);
moveX = windowW * 0.10;
moveY = windowH / 2;
}

function draw() {
fill(rColour(), rColour(), rColour());

if (moveX <= windowW-(windowW * 0.10) && moveY > 0 && moveY <= windowH) {
stroke(0);
ellipse(moveX, moveY, 10, 10);
firstLX = moveX; firstLY = moveY;
moveX += 15;
moveY += round(random(-40, 40));
secondLX = moveX; secondLY = moveY;
stroke(255);
line(firstLX, firstLY, secondLX, secondLY);
} else {
setup();
}
}

function rColour() {
return round(random(0, 255));
}

function keyPressed() {
if (keyCode === 32) { //Press Space Bar to reset page.
setup();
}
}

hellbenthorse