# p5.js

**URL:** https://discourse.processing.org/c/p5js/10.md?page=7

[Latest](https://discourse.processing.org/latest.md) · [Categories](https://discourse.processing.org/categories.md) · [Tags](https://discourse.processing.org/tags.md)

**Page:** 8

---

## [How to have circles increase their radius](https://discourse.processing.org/t/how-to-have-circles-increase-their-radius/44171)

<div class="topic-metadata">

**Author:** [@Vovja](https://discourse.processing.org/u/Vovja)\
**Replies:** 5\
**Last updated:** [April 6, 2024, 7:02am UTC](https://discourse.processing.org/t/how-to-have-circles-increase-their-radius/44171 "2024-04-06T07:02:39Z")

</div>

I cant figure out how to have a certain amount of semicircles increase their radius without needing to define a new var for ever new circle. I am trying to recreate this: (the semicircles generate with delay but with …

---

## [How to create new unit test](https://discourse.processing.org/t/how-to-create-new-unit-test/44219)

<div class="topic-metadata">

**Author:** [@Renatolo](https://discourse.processing.org/u/Renatolo)\
**Replies:** 4\
**Last updated:** [April 4, 2024, 8:54am UTC](https://discourse.processing.org/t/how-to-create-new-unit-test/44219 "2024-04-04T08:54:45Z")

</div>

Hey, I’m new to contributing for P5, I was trying to add a simple unit test for an event. But it seems that when i run the command npm test its not running that specific test. Any help?

---

## [Why set(...) doesn't clip](https://discourse.processing.org/t/why-set-doesnt-clip/44183)

<div class="topic-metadata">

**Author:** [@seanc4s](https://discourse.processing.org/u/seanc4s)\
**Replies:** 4\
**Last updated:** [March 31, 2024, 6:50am UTC](https://discourse.processing.org/t/why-set-doesnt-clip/44183 "2024-03-31T06:50:04Z")

</div>

Why does set not clip x,y parameters that are off-screen in this example: function setup() { createCanvas(512, 512); background(0); for (let i = 0, rs = 0; i \< 65536; i++) { rs = (rs + 0x105d7152) & 0xffffffff…

---

## [bezierDetail() doesn't work in bezierVertex()](https://discourse.processing.org/t/bezierdetail-doesnt-work-in-beziervertex/44173)

<div class="topic-metadata">

**Author:** [@unfootbird](https://discourse.processing.org/u/unfootbird)\
**Replies:** 4\
**Last updated:** [March 30, 2024, 3:26am UTC](https://discourse.processing.org/t/bezierdetail-doesnt-work-in-beziervertex/44173 "2024-03-30T03:26:50Z")

</div>

When I was exploring bezier curves. I realized that these two lines of code: detail = 2 \* int(map(mouseY, 0, height, 1, division \* 5)); bezierDetail(detail); works perfectly when I define bezier curve through bezier()…

---

## [I don't know the reason of this error](https://discourse.processing.org/t/i-dont-know-the-reason-of-this-error/44169)

<div class="topic-metadata">

**Author:** [@silverhee](https://discourse.processing.org/u/silverhee)\
**Replies:** 4\
**Last updated:** [March 28, 2024, 8:42am UTC](https://discourse.processing.org/t/i-dont-know-the-reason-of-this-error/44169 "2024-03-28T08:42:43Z")

</div>

hi. I want to make ‘matrix rain’ in p5js but… let symbols = \[\]; let symbolSize = 26; function setup() { createCanvas(window.innerWidth, window.innerHeight); background(0); let x = 0; for (let i = 0; i \<= width…

---

## [SVG blend in p5](https://discourse.processing.org/t/svg-blend-in-p5/44143)

<div class="topic-metadata">

**Author:** [@vjjv](https://discourse.processing.org/u/vjjv)\
**Replies:** 1\
**Last updated:** [March 23, 2024, 8:00pm UTC](https://discourse.processing.org/t/svg-blend-in-p5/44143 "2024-03-23T20:00:13Z")

</div>

function setup() { const DIM = Math.min(window.innerWidth, window.innerHeight); const svg = createSVGCanvas(DIM, DIM); const filter = document.createElementNS("http://www.w3.org/2000/svg", "filter"); filter.set…

---

## [ASCII art + GLSL shaders](https://discourse.processing.org/t/ascii-art-glsl-shaders/44122)

<div class="topic-metadata">

**Author:** [@funnyrectangles](https://discourse.processing.org/u/funnyrectangles)\
**Replies:** 0\
**Last updated:** [March 20, 2024, 2:40am UTC](https://discourse.processing.org/t/ascii-art-glsl-shaders/44122 "2024-03-20T02:40:39Z")

</div>

Hi! I would like to start coding some animations like this: https://twitter.com/i/status/1767859604191318235 https://www.instagram.com/p/CznnRLEI7yL/?img\_index=1 https://www.instagram.com/p/C4YcE1-NaWI/?img\_index=…

---

## [Bug when converting pixel into text value. ASCII](https://discourse.processing.org/t/bug-when-converting-pixel-into-text-value-ascii/44092)

<div class="topic-metadata">

**Author:** [@RomainGr](https://discourse.processing.org/u/RomainGr)\
**Replies:** 5\
**Last updated:** [March 17, 2024, 3:07pm UTC](https://discourse.processing.org/t/bug-when-converting-pixel-into-text-value-ascii/44092 "2024-03-17T15:07:35Z")

</div>

Hi, Sorry I’m unable to explain the issue I have in the title without showing the example. So here is the little p5 sketch and the version with the code When you drop an image it vectorises the image, something very …

---

## [Removing camera influence from shader](https://discourse.processing.org/t/removing-camera-influence-from-shader/44088)

<div class="topic-metadata">

**Author:** [@bdooley](https://discourse.processing.org/u/bdooley)\
**Replies:** 0\
**Last updated:** [March 12, 2024, 5:54pm UTC](https://discourse.processing.org/t/removing-camera-influence-from-shader/44088 "2024-03-12T17:54:00Z")

</div>

Hi all, This is a bit of a two-part question: I’m working on a sketch of falling 3D cubes that uses cannon.js and shaders. I currently have a shader applied that creates a gradient on each face based on the vertex posi…

---

## [Unable to apply filter to a capture from the webcam](https://discourse.processing.org/t/unable-to-apply-filter-to-a-capture-from-the-webcam/44045)

<div class="topic-metadata">

**Author:** [@RomainGr](https://discourse.processing.org/u/RomainGr)\
**Replies:** 10\
**Last updated:** [March 12, 2024, 5:41pm UTC](https://discourse.processing.org/t/unable-to-apply-filter-to-a-capture-from-the-webcam/44045 "2024-03-12T17:41:21Z")

</div>

Hi, I’m trying to apply filter using the filter() ( eg: filter(GRAY) ), the problem I have is that it applies the filter to the whole Canvas instead of only the “selected” element. So what I’m doing exactly is capturin…

---

## [Tensorflow js processing](https://discourse.processing.org/t/tensorflow-js-processing/44038)

<div class="topic-metadata">

**Author:** [@ctremblay](https://discourse.processing.org/u/ctremblay)\
**Replies:** 0\
**Last updated:** [March 6, 2024, 4:05am UTC](https://discourse.processing.org/t/tensorflow-js-processing/44038 "2024-03-06T04:05:14Z")

</div>

I was following this example https://www.youtube.com/watch?v=cdUNkwXx-I4 & then when i went to test i keep getting this error, but in the code he used he didn’t add shape; Right now I’m just trying to get 1 bird to thin…

---

## [How to visualise the "timeline" of a song](https://discourse.processing.org/t/how-to-visualise-the-timeline-of-a-song/43999)

<div class="topic-metadata">

**Author:** [@Irrlicht](https://discourse.processing.org/u/Irrlicht)\
**Replies:** 1\
**Last updated:** [February 27, 2024, 7:51pm UTC](https://discourse.processing.org/t/how-to-visualise-the-timeline-of-a-song/43999 "2024-02-27T19:51:30Z")

</div>

Hi, first post here, so I hop I won’t do anything wrong and if I do, please just tell me… (and english as a second language, so i try to explain what I have in mind…) So, I’m trying to visualise sound in a grid, by chan…

---

## [How to get the current index in a forEach loop?](https://discourse.processing.org/t/how-to-get-the-current-index-in-a-foreach-loop/43992)

<div class="topic-metadata">

**Author:** [@amundsen](https://discourse.processing.org/u/amundsen)\
**Replies:** 4\
**Last updated:** [February 26, 2024, 12:07pm UTC](https://discourse.processing.org/t/how-to-get-the-current-index-in-a-foreach-loop/43992 "2024-02-26T12:07:29Z")

</div>

Hello, Is it possible to have the current index of the item currently handled inside a forEach loop? Thank you.

---

## [Using OSC messages in Processing in p5.js mode](https://discourse.processing.org/t/using-osc-messages-in-processing-in-p5-js-mode/43871)

<div class="topic-metadata">

**Author:** [@mormegil](https://discourse.processing.org/u/mormegil)\
**Replies:** 1\
**Last updated:** [February 19, 2024, 12:39am UTC](https://discourse.processing.org/t/using-osc-messages-in-processing-in-p5-js-mode/43871 "2024-02-19T00:39:01Z")

</div>

Hello there, I have started discovering Processing only yesterday, but I am already trying out connecting a few things with OSC. Right now I am stuck at figuring out connecting OSC to p5.js scripts run from Processing 4…

---

## [How to create the below image using p5.js](https://discourse.processing.org/t/how-to-create-the-below-image-using-p5-js/43951)

<div class="topic-metadata">

**Author:** [@m00n620](https://discourse.processing.org/u/m00n620)\
**Replies:** 1\
**Last updated:** [February 20, 2024, 12:40pm UTC](https://discourse.processing.org/t/how-to-create-the-below-image-using-p5-js/43951 "2024-02-20T12:40:50Z")

</div>

How to generate this art? Please help!

---

## [Looping several videos](https://discourse.processing.org/t/looping-several-videos/43854)

<div class="topic-metadata">

**Author:** [@uili](https://discourse.processing.org/u/uili)\
**Replies:** 2\
**Last updated:** [February 19, 2024, 11:54am UTC](https://discourse.processing.org/t/looping-several-videos/43854 "2024-02-19T11:54:20Z")

</div>

https://editor.p5js.org/guillermo\_d/sketches/jMAtBLViX Hello!! I have three videos in this sketch, but i only get the first one to loop. I need to make a loop with the three videos. I’ve been trying different options an…

---

## [Images failing to fetch in p5.js web editor, but only on specific browsers](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227)

<div class="topic-metadata">

**Author:** [@pstephan4](https://discourse.processing.org/u/pstephan4)\
**Replies:** 5\
**Last updated:** [February 19, 2024, 12:02am UTC](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227 "2024-02-19T00:02:16Z")

</div>

I am a teacher and have noticed this issue repeatedly: several students will run a project with images and only one will get an error that says “couldn’t fetch”. The students are all working from a duplicated starter fil…

---

## [Failed To Fetch Error](https://discourse.processing.org/t/failed-to-fetch-error/43027)

<div class="topic-metadata">

**Author:** [@eharkins](https://discourse.processing.org/u/eharkins)\
**Replies:** 11\
**Last updated:** [February 17, 2024, 6:43pm UTC](https://discourse.processing.org/t/failed-to-fetch-error/43027 "2024-02-17T18:43:22Z")

</div>

I am a teacher of a beginning coding class in P5 and our class project is to create a themed Maze Game with all the typical features of a maze. Since the students need to pick a theme, I’ve asked them to upload and displ…

---

## [P5.js Using Shaders with FrameBuffers](https://discourse.processing.org/t/p5-js-using-shaders-with-framebuffers/43874)

<div class="topic-metadata">

**Author:** [@prontopablo](https://discourse.processing.org/u/prontopablo)\
**Replies:** 3\
**Last updated:** [February 16, 2024, 10:58am UTC](https://discourse.processing.org/t/p5-js-using-shaders-with-framebuffers/43874 "2024-02-16T10:58:56Z")

</div>

Hi all! I’m trying to use p5.js framebuffers with shaders. I have had success with other shaders but this threshold shader and a few other similar ones I have only work for a moment and then the screen fades to black. I…

---

## [How to make bitmap editor (plot a family tree)](https://discourse.processing.org/t/how-to-make-bitmap-editor-plot-a-family-tree/43769)

<div class="topic-metadata">

**Author:** [@lennartd](https://discourse.processing.org/u/lennartd)\
**Replies:** 22\
**Last updated:** [February 14, 2024, 1:12am UTC](https://discourse.processing.org/t/how-to-make-bitmap-editor-plot-a-family-tree/43769 "2024-02-14T01:12:22Z")

</div>

… to show as dots ancestors found in family tree, that is a 2D rendering of the entire tree using a dot for each ancestor. Black dots on white canvas. →

---

## [Reaction Diffusion Shader Implementation (problems)](https://discourse.processing.org/t/reaction-diffusion-shader-implementation-problems/43879)

<div class="topic-metadata">

**Author:** [@JorgeRando](https://discourse.processing.org/u/JorgeRando)\
**Replies:** 7\
**Last updated:** [February 12, 2024, 9:38pm UTC](https://discourse.processing.org/t/reaction-diffusion-shader-implementation-problems/43879 "2024-02-12T21:38:44Z")

</div>

Hi there! I’m working on an implementation of the well-known reaction-diffusion model with p5 shaders. However, I’m experiencing issues because the model seems to work, but after a few iterations, it gets stuck and stops…

---

## [Question on quirks of loop() and noLoop() and control of draw() iterations](https://discourse.processing.org/t/question-on-quirks-of-loop-and-noloop-and-control-of-draw-iterations/43872)

<div class="topic-metadata">

**Author:** [@grege2](https://discourse.processing.org/u/grege2)\
**Replies:** 2\
**Last updated:** [February 10, 2024, 10:11am UTC](https://discourse.processing.org/t/question-on-quirks-of-loop-and-noloop-and-control-of-draw-iterations/43872 "2024-02-10T10:11:18Z")

</div>

Hi all, An elementary question but it has me puzzled, after all this time using p5.js. There seem to some odd quirks of loop() and noLoop(). Please see p5.js Web Editor It seems that loop() can force one, or two, runs…

---

## [Webcam view is tiny](https://discourse.processing.org/t/webcam-view-is-tiny/43870)

<div class="topic-metadata">

**Author:** [@Infi](https://discourse.processing.org/u/Infi)\
**Replies:** 0\
**Last updated:** [February 9, 2024, 9:33pm UTC](https://discourse.processing.org/t/webcam-view-is-tiny/43870 "2024-02-09T21:33:10Z")

</div>

Hello! I am in a desperate need of simple app that can be used as a camera color filter, e.g. shows only red values while rest is 0. I have been doing this with shaders. The effect itself works but the problem is that t…

---

## [I raised a pull request four days ago, and it is currently displaying two workflows awaiting approval](https://discourse.processing.org/t/i-raised-a-pull-request-four-days-ago-and-it-is-currently-displaying-two-workflows-awaiting-approval/43820)

<div class="topic-metadata">

**Author:** [@yashgupta\_1221](https://discourse.processing.org/u/yashgupta_1221)\
**Replies:** 2\
**Last updated:** [February 9, 2024, 11:02am UTC](https://discourse.processing.org/t/i-raised-a-pull-request-four-days-ago-and-it-is-currently-displaying-two-workflows-awaiting-approval/43820 "2024-02-09T11:02:13Z")

</div>

I submitted a pull request four days ago, and I’ve noticed that there are currently two workflows awaiting approval and @nikhilkalburgi is not accepting my pull request . can anyone help me how to resolve this?

---

## [Failed to load image](https://discourse.processing.org/t/failed-to-load-image/43864)

<div class="topic-metadata">

**Author:** [@the](https://discourse.processing.org/u/the)\
**Replies:** 9\
**Last updated:** [February 9, 2024, 1:19am UTC](https://discourse.processing.org/t/failed-to-load-image/43864 "2024-02-09T01:19:53Z")

</div>

Hello, I am teaching a coding class and trying to load and display images on the p5js website as a part of an assignment. I keep running into an error: failed to load error. p5.js says: It looks like there was a proble…

---

## [🌸 Your Chance to Shape the Future of p5.js](https://discourse.processing.org/t/your-chance-to-shape-the-future-of-p5-js/43749)

<div class="topic-metadata">

**Author:** [@ProcessingOrg](https://discourse.processing.org/u/ProcessingOrg)\
**Replies:** 8\
**Last updated:** [February 7, 2024, 8:48pm UTC](https://discourse.processing.org/t/your-chance-to-shape-the-future-of-p5-js/43749 "2024-02-07T20:48:39Z")

</div>

Hi everyone! Major announcement incoming… :mega: The p5.js community is now inviting proposals for p5.js 2.0… and it’s a big deal! A major release allows us to make changes that are usually difficult or impossible: sys…

---

## [Getting issue in uploading image. Facing 'Access-Control-Allow-Origin' issue](https://discourse.processing.org/t/getting-issue-in-uploading-image-facing-access-control-allow-origin-issue/43832)

<div class="topic-metadata">

**Author:** [@ashwani](https://discourse.processing.org/u/ashwani)\
**Replies:** 0\
**Last updated:** [February 5, 2024, 9:21am UTC](https://discourse.processing.org/t/getting-issue-in-uploading-image-facing-access-control-allow-origin-issue/43832 "2024-02-05T09:21:41Z")

</div>

I am facing issues while uploading images in my sketch in local setup, and issue is with AWS setup. Pasting the screenshot of error: I have followed all the step given in guide These are my .env variable Please…

---

## [Wanted someone's review on these issues](https://discourse.processing.org/t/wanted-someones-review-on-these-issues/43825)

<div class="topic-metadata">

**Author:** [@vaishnavi192](https://discourse.processing.org/u/vaishnavi192)\
**Replies:** 1\
**Last updated:** [February 4, 2024, 11:02am UTC](https://discourse.processing.org/t/wanted-someones-review-on-these-issues/43825 "2024-02-04T11:02:06Z")

</div>

I am working on these 2 issues and proposed a solution as well. Wanted someone to check it so that I can create a PR. Also, I read contributors guide, but can I create PR without getting assigned? Give PMatrix a print()…

---

## [Error message :- failed to fetch](https://discourse.processing.org/t/error-message-failed-to-fetch/43756)

<div class="topic-metadata">

**Author:** [@megarou76](https://discourse.processing.org/u/megarou76)\
**Replies:** 3\
**Last updated:** [January 27, 2024, 3:48pm UTC](https://discourse.processing.org/t/error-message-failed-to-fetch/43756 "2024-01-27T15:48:40Z")

</div>

Hello there, i’m having a problem lately in p5.js web editor project, the sketch runs well at the first time & everything is ok but, when i re run it again it gives me an error message :- failed to fetch, & then, it free…

---

## [Not work p5.js in Elementor external window (iframe)](https://discourse.processing.org/t/not-work-p5-js-in-elementor-external-window-iframe/43681)

<div class="topic-metadata">

**Author:** [@Serhii](https://discourse.processing.org/u/Serhii)\
**Replies:** 2\
**Last updated:** [January 27, 2024, 2:22pm UTC](https://discourse.processing.org/t/not-work-p5-js-in-elementor-external-window-iframe/43681 "2024-01-27T14:22:27Z")

</div>

Hi all. Problem with iframe Elementor in Frontend editor, library not find element, when i create canvas. Any idea? Thanks! const canvasAudio = createCanvas(windowWidth, windowHeight); canvasAudio.parent(‘audio\_visuali…

[Previous page](https://discourse.processing.org/c/p5js/10.md?page=6)

[Next page](https://discourse.processing.org/c/p5js/10.md?page=8)
