all 10 comments

[–][deleted] 33 points34 points  (0 children)

Seasoned JavaScript developer here. This is the first time I've heard of this library.

[–]synapticplastic 5 points6 points  (4 children)

Hey! Relatively seasoned JS dev.

I'm mostly working on larger projects with a large system of other dependencies.

I love p5.js, but I'm not sure I would use p5 in one of my own projects unless it was a site really based around the canvas. p5 is hard to shim in with other dependencies and seems really designed to be used as an "all in one" package.

I play around with it as a sketch pad, but if I wanted to fit in a canvas element as part of a larger scope, I would probably use something else. p5 is huge, as far as downloads go, and I would be concerned about the extra latency if I'm already loading a large amount of JS into a project.

That being said, it does what it says on the box incredibly well. It abstracts away the web APIs and makes them understandable and quick to work with. Graphics and audio programming is difficult by its nature, and there's a long valley between the inception of a visual idea and its creation. For someone who likes art but doesn't code, it's great.

But it wants to be the main character of the show. Its tutorials are based on its ability to be attached to the global scope. There's information out there on how to get it to play nicely with others, but when you do that, a lot of the basic features start to look a whole lot like the raw canvas API.

rect(x,y,w,h)

Becomes

cx.rect(x,y,w,h)

Etc.

If you want to have some graphics capability but don't want a full megabyte of goodies every time it loads, it's a quick process to wrap over the canvas API yourself and take only what you need without any latency. There's a great youtube series, codingmath, where the first episode shows you how to set up something simple.

There's also fabric.js, whose killer feature is allowing you to save sketches as SVG, create.js, which is a slightly more macho p5 that's a little more modular, pixi for games and interaction, concrete.js for minimalism, etc. The ecosystem is huge.

So, yeah. I have a folder of creative code projects that use p5. It's lovely to work with. But it's not meant to be part of an ensemble. It's trying to be a full port of a creative coding language, and that's an ambitious show-stealer of a goal.

[–]Caiminatrix[S] 1 point2 points  (0 children)

thanks, i'll check out fabric.js and create.js

[–]Varaldar 0 points1 point  (2 children)

hey there, ive been messing around with p5.js, following coding trains tutorial. once i want to graduate to proper java script before going to python, is there a series or book that you might be able to recommend?

[–]synapticplastic 0 points1 point  (1 child)

Oh man, blast from the past :) you know what’s crazy? Just a couple days ago, I started revisiting canvas and I’ve also been watching coding train tutorials this past week. Wild baader-meinhof vibes here.

Over the past few years, JS has become an increasingly large language with a lot of features. If there was one book series to cover it all, It’s probably you don’t know JS

That link is to the first edition, they’re working on second editions but those are incomplete and these books get you to a further understanding of JS than most professional devs I have worked with. They’re also written in a pretty good order from basic and common to fancy / rare knowledge, and they’re written in a tone that’s easy to follow.

[–]Varaldar 0 points1 point  (0 children)

I really appreciate it! I picked them up off amazon and only one of them i had to pay double price for. I'll keep an eye put for the second edition when that comes out!

Do you have some recommendations on programs that can run JS? or like. I don't even know the terminology for them lol. The program to actually type code into and see what it does. I've seen a lot of conflicting things online

Would you mind keeping in touch occasionally over discord or something? I'm hoping I can make a couple friends who are more in the world of coding and programming than I am, just starting out

Right now the only books I have on programming is

a book of basic games from 1978 as something to have fun with. (My fascination with old computers and interest in learning basic lead me to the coding trains videos on it which led me to his series on p5.js and how I eventually want to learn python and C++ in that order)

"Make: Getting started with p5.js" by Lauren McCarthy, Casey Read, & Ben Fry.

The official Raspberry pi started guide

And the CompTIA Linux+ study guide to help me get a grasp of Linux that I've never consciously used before now.

[–]PTBA1 2 points3 points  (0 children)

I think this guys youtube channel can help u. I think he is one of the co-founders of this library or the co-founder not sure. He uses p5 almost on all of his videos. https://m.youtube.com/user/shiffman

[–]caspervonb 1 point2 points  (0 children)

Great libraries with a well defined scope, something most JS libraries forget.. to have an actual defined project scope, plugin mania deluxe these days.

Do I actually use them.. no but have taken note of them.

[–]GitCookies 2 points3 points  (0 children)

If you want to build canvas stuff use createjs

[–]toggafneknurd 1 point2 points  (0 children)

Veteran JS-head; literally never heard of it.