August 3rd, 2024

p5.js

p5.js is a free JavaScript library for artistic creation, supported by a diverse community. Recent workshops include a coding club for seniors in Korea and global events at various institutions.

Read original articleLink Icon
EnthusiasmNostalgiaAppreciation
p5.js

p5.js is a free and open-source JavaScript library designed to facilitate coding and artistic creation, catering to a diverse audience that includes artists, designers, beginners, and educators. The library is supported by an inclusive community that emphasizes accessibility. Recent activities include workshops and events aimed at various demographics, such as a coding club for individuals aged 50 and older in Korea, led by Inhwa Yeom, and a community salon featuring over 600 contributors, introduced by Qianqian Ye. The p5.js community actively engages in workshops globally, including events at institutions like ITP-NYU in New York and Tunapanda Institute in Nairobi. The p5.js team has announced that no new features will be added to the library, except those that enhance accessibility. The community is encouraged to explore the library's resources, including references, tutorials, and examples, to learn and create with p5.js. The platform also invites contributions and donations to support its ongoing development and community initiatives. Overall, p5.js serves as a valuable tool for learning coding and creating art, fostering a collaborative environment for users of all skill levels.

Related

Malicious Code Injection Found in CDN Polyfill Link Targeting Mobile Users

Malicious Code Injection Found in CDN Polyfill Link Targeting Mobile Users

Polyfill.io selectively polyfills browser features based on User-Agent headers. Tailored polyfills are provided, with official documentation on their website. Contribution guide on GitHub, self-hosting info, and MIT license available.

Show HN: Simulating 20M Particles in JavaScript

Show HN: Simulating 20M Particles in JavaScript

This article discusses optimizing JavaScript performance for simulating 1,000,000 particles in a browser. It covers data access optimization, multi-threading with SharedArrayBuffers and web workers, and memory management strategies.

CodeMirror: Extensible code editor component for the web

CodeMirror: Extensible code editor component for the web

CodeMirror is a versatile web code editor with accessibility, syntax highlighting, collaborative editing, and more. It supports multiple languages, offers extensive features, and encourages community contributions and discussions.

Show HN: Z Js - The literally low overhead Js framework.

Show HN: Z Js - The literally low overhead Js framework.

Z.Js Framework enhances HTML, CSS, and JavaScript with routing, components, styling, and state management. Developers create components with JavaScript template literals, manage state, handle reactivity, and navigate pages efficiently. Explore documentation and contribute via the provided GitHub URL.

Node.js Is Here to Stay

Node.js Is Here to Stay

Node.js, a key technology for 15 years, powers 6.3 million sites and 98% of Fortune 500 companies. Its lightweight, event-driven design suits real-time and high-concurrency needs. Security updates, Linux preference, and new features like ECMAScript Modules ensure Node.js remains a versatile and secure tool for modern web development.

AI: What people are saying
The comments reflect a strong appreciation for p5.js and its community, along with some critiques and personal experiences.
  • Many users praise the new website and improved documentation, noting it enhances accessibility and usability.
  • Several commenters share their personal projects and experiences using p5.js, highlighting its ease of use for creative coding.
  • There are mentions of the library's role in generative art and its influence on learning programming concepts.
  • Some users express concerns about the library's performance and the background of its founders.
  • Daniel Shiffman's contributions through educational content are frequently acknowledged as pivotal for many users.
Link Icon 27 comments
By @rikroots - 2 months
I think the key reason why this link has been posted to HN now is because p5js has a new website? Back in 2023 the Sovereign Tech Fund gave the p5js folks a €450k grant[1] "to enhance p5.js Documentation organization & accessibility" and this seems to be some of the results of that investment.

In my view, it seems to be paying off - the site feels a lot easier to navigate and search, with more useful information. For example, compare the old[2] and new[3][4] versions of how to use p5js editor/canvases with a screen reader.

[1] - STF announcement/progress - https://p5js.org/events/stf-2024/

[2] - Using p5 with a screen reader (old version) - https://archive.p5js.org/learn/p5-screen-reader.html

[3] - How to Use the p5.js Web Editor with a Screen Reader (new) - https://p5js.org/tutorials/p5js-with-screen-reader/

[4] - Writing Accessible Canvas Descriptions (new) - https://p5js.org/tutorials/writing-accessible-canvas-descrip...

By @_spduchamp - 2 months
ChatGPT knows P5.js pretty well so you can ask "Write a P5 program that plots a sine wave and let's me control phase with a slider." and it does it.

I used P5.js with ChatGPT to make a design tool that balances 5 masses on a circumference for creating a rotary magnetic bow with reduced harmonic locking.

Drag vertices of the pentagon... https://editor.p5js.org/spDuchamp/full/zgtkE2xik

Here 3D printed result https://www.instagram.com/p/Cr4ZXGztY27/

By @Centigonal - 2 months
This is a really pretty website! I'm surprised that they decided to take out the part in the About section mentioning that this is a continuation of the ideas from Processing - I guess maybe now P5.js is more popular than processing is/was?
By @Ezhik - 2 months
I had an absolute blast playing with p5.js in college - I made my own little cellular automata with it back in the day: https://ezhik.me/beyond184/

As a wonderful coincidence, the piece of digital art that got me interested in digital art in the first place - which is a delightful tribute to computing - also used p5.js: https://baku89.com/work/ffff?lang=en https://animethemes.moe/anime/subete_ga_f_ni_naru_the_perfec...

I think one of the hardest things for me as a programmer is getting through all the boilerplate to put the first pixel on the screen and p5.js solves that pretty well, letting me focus on more on the "creative" aspect of "creative coding".

I probably wouldn't use p5.js for Big Boy Software Development, but whenever I want to sketch, it's the first digital tool I reach for.

By @alator21 - 2 months
Daniel Shiffman was the one that introduced me to this library years ago. Their videos were essential to my development as a programmer
By @trungdq88 - 2 months
Pretty cool library to quickly build a game out of. I've built a small water simulation [1] with p5.js and really like how simple it is to learn p5.

[1]: https://github.com/trungdq88/summer

By @soegaard - 2 months
Processing (the original Java one) has inspired many libraries. These days it is possible to find (more-or-less) compatible libraries for most popular language.

As a summer project I wrote a version for Racket:

https://docs.racket-lang.org/manual-sketching/

The main inspiration was Daniel Shiffman's YouTube channel "The Coding Train". He has a knack for picking visual interesting problems/algorithms and his enthusiasm is unmatched.

https://thecodingtrain.com/

By @whywhywhywhy - 2 months
I've used P5.js in a ton of my professional work although would suggest anyone interested in using it today know what happened with one of the founders of the foundation and creator of the original Processing language P5 derived from.

https://news.ycombinator.com/item?id=37760363

Knowing what I know now I regret supporting the work of Processing Foundation.

By @john-tells-all - 2 months
I adore P5js -- the community OpenProcessing[1] has thousands of wonderful artworks that are easily viewed, cloned, and modified. I'm mostly a Python guy but making small changes to P5js programs has helped me learn Javascript.

[1] -- https://openprocessing.org/discover/#/trending

By @nonoesp - 2 months
You can write and run code in the browser with p5.js's playground, and even create an account to store your code sketches.

https://editor.p5js.org/nonoesp/sketches/ruSYeEUEH

By @gnabgib - 2 months
Big in:

2022 (244 points, 57 comments) https://news.ycombinator.com/item?id=33176026

2017 (349 points, 77 comments) https://news.ycombinator.com/item?id=14749527

2014 (381 points, 93 comments) https://news.ycombinator.com/item?id=8144212

By @sjdonado - 2 months
Really good library and documentation, helped me to jump into animations in no time.Got this https://cs-games.sjdonado.com/ done in a few days
By @jimmar - 2 months
Is there a JavaScript library that does animation using timelines, key frames, etc? It seems like p5js and several other animation libraries focus on things like partial simulations or other animations driven by mathematical formulas rather than animations done by placing objects on timelines and transforming them.
By @jna_sh - 2 months
Oh the new website shipped! They’ve been working on this for a while, looking great.
By @murciof - 2 months
The p5.js is a really awesome library because of their increased functionality and ease of use for artistic applications.

Last year, I made a p5.js and Ruby on Rails powered application [1] [2] for my Bachelor's degree that allowed the user to create generative art directly from the user interface, and the experience with that tool was straightforward.

[1] - https://www.facili.art/

[2] - https://github.com/murciof/faciliart

By @ikesau - 2 months
Love p5 - I learned a bunch of new concepts through it: polar coordinate space; thinking in radians; dot products; event-driven programming.

It's one of the fastest ways I know of to make something fun and expressive in code.

By @jerpint - 2 months
Ive used p5js to build my own Tetris game with vim bindings :)

https://www.jerpint.io/blog/tetris/

By @martijnvds - 2 months
Kind of sad that this isn't an implementation of Perl 5 in JS
By @pmohun - 2 months
Strange but true: p5 was a major component in the recent popularization of generative art — a branch of computer art that relies on computer generated visuals based on random seeds.

p5 was a core dependency for Art Blocks, a popular Ethereum art platform that gained popularity due to its asset class of entirely generative artworks.

By @throw156754228 - 2 months
It is indeed slow. It's a library written by non-developers for non-developers and it shows in the APIs.
By @NotAnOtter - 2 months
I used p5.js to make my "first ever website". Which got me my first internship

https://cody811.github.io/BlockPlacer/Lost.html

By @petarb - 2 months
I started learning how to program using Processing about 16 years ago, so P5 and other similar libraries always have a soft spot in my heart. It’s so gratifying for a beginner to write some code and see some shapes move around the screen.
By @trentearl - 2 months
Nice new website! Great project, I've been using it since the pro55esing java applet days. I got my 10 year old niece interested in programming by showing her some quick openprocessing code.
By @javaunsafe2019 - 2 months
I tried the examples on a recent iPhone and all of them didn’t work :(
By @FounderBurr - 2 months
I’m not convinced about the inclusiveness claims made here, can you offer more proof?