#Chapter 0 Page 28 Nature of Code Book issue
21 messages · Page 1 of 1 (latest)
figurd it out
wow, i was thinking what could possibly be the issue, but that makes sense
Did you retype the code from the book or run the example? I should probably include this with a comment!
Are you familiar with React?
i ended up finding this in a seperate video of yours, after a good bit of time
not at all!
It's popular framework. If you want to be web developer, React is a must.
How old are you?
16 - why are you being so instent about this? i never said i wanted to be a web developer, im using this book to improve my knowledge of various game development topics
ok
i understand now
Thanks for the reply, I'm just wondering if there is an example somewhere that i need to update!
Oh, yes! This was in nature of code in the randomness (chapter 0) perlin noise section
ah yes i found it! https://editor.p5js.org/natureofcode/sketches/O5a4MkgKC weirdly i don't see the issue of my mac retina display?
A web editor for p5.js, a JavaScript library with the goal of making coding accessible to artists, designers, educators, and beginners.
(Is this the one you were running that had the pixel resolution glitch?)
Oh, it's probably b/c i am using set()
if i use the pixels array directly i think maybe that's where the issue emerges
im on a windows pc, so that could be it? 🤷♂️
yeahh that would probably be it. i just loaded up the sent example and it woked without issue
Yes, when using the pixels array directly you need to either set all the HD pixels inside each pixel, or use pixelDensity(1) to have p5.js do it. You use set() in the code linked from the book, but the book itself uses the pixels array, so it would be good to add the need for pixelDensity(1) to the website and errata.
I don't know if the discrepancy between the book and the linked code needs to be addressed or not.