Link Pixel Art
Hello everyone, can someone please explain to me what is the problem with the code. My mind is going bonkers now! Please help! Thx!
Hello everyone, can someone please explain to me what is the problem with the code. My mind is going bonkers now! Please help! Thx!
ok, so first of all you are using node.js, wich is a runtime envirenment for js so.. it does not have the window object or the canvas, to do the thing you want to do in your code you need first to create an html5 project (wich is what you need to create a canvas and draw on it)
then i see in your code that you are trying to use p5.js wich is a js lib so you need to link it to your project to bee able to use it.
here is the link!
put those before your script in the index.html file :)
and finally, your code still have some issues like in p5 the first thing you wanna do is create a canvas using the
createCanvas
function in setup, something likesorry i can't explain everything in one comment but if you want to learn it check the reference!
and if you didn't understand anything.. it's fine you just need to read the reference ;)
ok i'm gonna send you the new version with some comments explaining the stuff :)
but if you wanna learn js i may recommend the coding train p5 series wich is a great series to get started with js and p5!
lol ok
@Bitkoshy
wow ok i'm gonna try
@Bitkoshy
yeeey https://repl.it/@potatojs/p5-gg#script.js
for some reason it's not excatly how you want it lol
@Bitkoshy
lol
@Bitkoshy
yey i got it
https://repl.it/@potatojs/p5-gg#script.js
}@Bitkoshy
lol
@Bitkoshy
wow thx i got an achivement :D
@Bitkoshy
thank you! :D
@Bitkoshy