# p5.js

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

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

**Page:** 78

---

## [Translate all pixels of a canvas?](https://discourse.processing.org/t/translate-all-pixels-of-a-canvas/18224)

<div class="topic-metadata">

**Author:** [@Coton](https://discourse.processing.org/u/Coton)\
**Replies:** 1\
**Last updated:** [February 29, 2020, 12:28pm UTC](https://discourse.processing.org/t/translate-all-pixels-of-a-canvas/18224 "2020-02-29T12:28:22Z")

</div>

Hi! I’m really new to P5.js and as I’m experimenting, I was wondering how to modify a pre existing file. I was looking at Daniel Shiffman’s Slit Scan here: The code is pretty simple and goes like this: // Daniel Shi…

---

## [P5.bots connect arduino to public website](https://discourse.processing.org/t/p5-bots-connect-arduino-to-public-website/18133)

<div class="topic-metadata">

**Author:** [@botbotbot](https://discourse.processing.org/u/botbotbot)\
**Replies:** 1\
**Last updated:** [February 29, 2020, 4:51am UTC](https://discourse.processing.org/t/p5-bots-connect-arduino-to-public-website/18133 "2020-02-29T04:51:41Z")

</div>

Hi all! I’m new to networking so bear with me. I want to be able to instantly control a public website through some sensor input on an arduino. Let say I want the color of the background to change when i push a physical …

---

## [Can't find the folder for my program](https://discourse.processing.org/t/cant-find-the-folder-for-my-program/18138)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 4\
**Last updated:** [February 29, 2020, 3:41am UTC](https://discourse.processing.org/t/cant-find-the-folder-for-my-program/18138 "2020-02-29T03:41:23Z")

</div>

I’m using p5.js web editor & I’m trying to place a picture in my program, but idk where the folder is so I can place the image in the folder & then display it. I know how to display it once I get the picture in the folde…

---

## [How do I target a specific circle in a random circle packing?](https://discourse.processing.org/t/how-do-i-target-a-specific-circle-in-a-random-circle-packing/18227)

<div class="topic-metadata">

**Author:** [@cesca](https://discourse.processing.org/u/cesca)\
**Replies:** 4\
**Last updated:** [February 29, 2020, 1:06am UTC](https://discourse.processing.org/t/how-do-i-target-a-specific-circle-in-a-random-circle-packing/18227 "2020-02-29T01:06:56Z")

</div>

I want to change the circles’ colours when the mouse hovers them (but not all at once, just that specific circle the mouse is on)? I copied this code from a tutorial so I don’t know how to code at all. var circles = \[\];…

---

## [How to change a circle's colour when the mouse hovers it?](https://discourse.processing.org/t/how-to-change-a-circles-colour-when-the-mouse-hovers-it/18192)

<div class="topic-metadata">

**Author:** [@cesca](https://discourse.processing.org/u/cesca)\
**Replies:** 3\
**Last updated:** [February 28, 2020, 10:59am UTC](https://discourse.processing.org/t/how-to-change-a-circles-colour-when-the-mouse-hovers-it/18192 "2020-02-28T10:59:40Z")

</div>

New to Processing. I know I’m supposed to check if the distance from the mouse to the circle is less than the radius, but I don’t know how to write the code for that or where to place it. This code below is just an adapt…

---

## [Using ellipse as button to play sound file?](https://discourse.processing.org/t/using-ellipse-as-button-to-play-sound-file/18077)

<div class="topic-metadata">

**Author:** [@msugar](https://discourse.processing.org/u/msugar)\
**Replies:** 3\
**Last updated:** [February 28, 2020, 2:48am UTC](https://discourse.processing.org/t/using-ellipse-as-button-to-play-sound-file/18077 "2020-02-28T02:48:03Z")

</div>

Hi all, I’m new to p5.js (and a pretty rusty at JavaScript!) and working on building a little program that will have buttons on a map that will play sounds recorded at those points on the map. I’m attempting to use an e…

---

## [ML5 Face API neural net classification](https://discourse.processing.org/t/ml5-face-api-neural-net-classification/18188)

<div class="topic-metadata">

**Author:** [@j3n](https://discourse.processing.org/u/j3n)\
**Replies:** 0\
**Last updated:** [February 27, 2020, 4:03pm UTC](https://discourse.processing.org/t/ml5-face-api-neural-net-classification/18188 "2020-02-27T16:03:42Z")

</div>

Hello, I am combining the ML5 Face API example and their new neural net functionality to make a FaceAPi classifier. The code works in terms of it is parsing the features to the brain (neural net model), training and sa…

---

## [How to make text output curve in a circle range?](https://discourse.processing.org/t/how-to-make-text-output-curve-in-a-circle-range/18135)

<div class="topic-metadata">

**Author:** [@linebrinkmann](https://discourse.processing.org/u/linebrinkmann)\
**Replies:** 9\
**Last updated:** [February 27, 2020, 2:51pm UTC](https://discourse.processing.org/t/how-to-make-text-output-curve-in-a-circle-range/18135 "2020-02-27T14:51:18Z")

</div>

I have problem with making text lines output in my canvas curve in a circle move? Have anyone or can anyone do that? :smile:

---

## [Cannot build P5 sketch in React. WebpackError: ReferenceError: window is not defined](https://discourse.processing.org/t/cannot-build-p5-sketch-in-react-webpackerror-referenceerror-window-is-not-defined/18182)

<div class="topic-metadata">

**Author:** [@TimR](https://discourse.processing.org/u/TimR)\
**Replies:** 0\
**Last updated:** [February 27, 2020, 1:56pm UTC](https://discourse.processing.org/t/cannot-build-p5-sketch-in-react-webpackerror-referenceerror-window-is-not-defined/18182 "2020-02-27T13:56:37Z")

</div>

I’ve got a p5.js sketch that is included in my React project. When I build my project it throws: error "window" is not available during server side rendering. on: window.requestAnimationFrame = (function() { Webpack…

---

## [Help! Why I cannot use the P5JS](https://discourse.processing.org/t/help-why-i-cannot-use-the-p5js/18067)

<div class="topic-metadata">

**Author:** [@impandapasta](https://discourse.processing.org/u/impandapasta)\
**Replies:** 4\
**Last updated:** [February 27, 2020, 11:57am UTC](https://discourse.processing.org/t/help-why-i-cannot-use-the-p5js/18067 "2020-02-27T11:57:10Z")

</div>

I’m learning my Coursera courses about P5JS and I downloaded it ,however when I opened the sketch.js, (I didn’t do anything before open it .) I found there always have many errors… and when I tried to open the index.h…

---

## [Table javascript p5.js](https://discourse.processing.org/t/table-javascript-p5-js/18168)

<div class="topic-metadata">

**Author:** [@ctrembla](https://discourse.processing.org/u/ctrembla)\
**Replies:** 0\
**Last updated:** [February 27, 2020, 2:09am UTC](https://discourse.processing.org/t/table-javascript-p5-js/18168 "2020-02-27T02:09:40Z")

</div>

Am I doing this correct? I read the tutoral on making Tables in p5.js, but when I try to make one it won’t run. ATM i’m trying to get a table to hold all the positions of the walls. here main var wall = \[35\]; var bs = …

---

## [PR review (p5-web-editor)](https://discourse.processing.org/t/pr-review-p5-web-editor/18104)

<div class="topic-metadata">

**Author:** [@mynk](https://discourse.processing.org/u/mynk)\
**Replies:** 2\
**Last updated:** [February 27, 2020, 1:42am UTC](https://discourse.processing.org/t/pr-review-p5-web-editor/18104 "2020-02-27T01:42:16Z")

</div>

Hi guys, any p5-web-editor dev here… I would request you to please review the pr that I made few days ago, I don’t know If the issue was relevant, or my solution was accurate . Sorry if this was not the right place to po…

---

## [Need help with buttons and array](https://discourse.processing.org/t/need-help-with-buttons-and-array/17117)

<div class="topic-metadata">

**Author:** [@TjarkTV](https://discourse.processing.org/u/TjarkTV)\
**Replies:** 5\
**Last updated:** [February 26, 2020, 8:14pm UTC](https://discourse.processing.org/t/need-help-with-buttons-and-array/17117 "2020-02-26T20:14:22Z")

</div>

hey guys I have a problem. I want to make a programm where i can press buttons to add something to an array which i can read, so like an numpad. the layout and all is great but when i want to add the function that when i…

---

## [Line problem with rotatingY axis](https://discourse.processing.org/t/line-problem-with-rotatingy-axis/18131)

<div class="topic-metadata">

**Author:** [@iriquois](https://discourse.processing.org/u/iriquois)\
**Replies:** 2\
**Last updated:** [February 26, 2020, 4:36pm UTC](https://discourse.processing.org/t/line-problem-with-rotatingy-axis/18131 "2020-02-26T16:36:52Z")

</div>

the line becomes distorted when rotating in the Y axis, but if I make the same thing in processing it works fine! any ideas? let btn, btn2; let y = 0; let x = 0; function setup() { createCanvas(600, 400, WEBGL); …

---

## [Minimum Spanning Tree - Minimum distance problem](https://discourse.processing.org/t/minimum-spanning-tree-minimum-distance-problem/18038)

<div class="topic-metadata">

**Author:** [@Giyomu](https://discourse.processing.org/u/Giyomu)\
**Replies:** 2\
**Last updated:** [February 26, 2020, 3:46pm UTC](https://discourse.processing.org/t/minimum-spanning-tree-minimum-distance-problem/18038 "2020-02-26T15:46:14Z")

</div>

Hey there, I am having some issue with the minimum distance method. In this test, I am trying to reproduce; 9.9: Minimum Spanning Tree from the coding train in Processing.js (https://www.youtube.com/watch?v=BxabnKrOjT0&t…

---

## [Task repeat every 10 seconds](https://discourse.processing.org/t/task-repeat-every-10-seconds/18028)

<div class="topic-metadata">

**Author:** [@nathan1](https://discourse.processing.org/u/nathan1)\
**Replies:** 6\
**Last updated:** [February 23, 2020, 7:24pm UTC](https://discourse.processing.org/t/task-repeat-every-10-seconds/18028 "2020-02-23T19:24:31Z")

</div>

Hi, I am using p5 js and I am trying to have some code execute every 10 seconds. I am having trouble finding the solution. Thanks.

---

## [textToPoints - error loading](https://discourse.processing.org/t/texttopoints-error-loading/17943)

<div class="topic-metadata">

**Author:** [@bmehta](https://discourse.processing.org/u/bmehta)\
**Replies:** 1\
**Last updated:** [February 22, 2020, 10:16pm UTC](https://discourse.processing.org/t/texttopoints-error-loading/17943 "2020-02-22T22:16:09Z")

</div>

I’m trying to use the textToPoints function: https://p5js.org/reference/#/p5.Font/textToPoints But keep getting the following error: \> p5.js says: It looks like there was a problem loading your font. Try checking if the…

---

## [Tutorial on Easing](https://discourse.processing.org/t/tutorial-on-easing/18011)

<div class="topic-metadata">

**Author:** [@hessa](https://discourse.processing.org/u/hessa)\
**Replies:** 2\
**Last updated:** [February 22, 2020, 3:33pm UTC](https://discourse.processing.org/t/tutorial-on-easing/18011 "2020-02-22T15:33:05Z")

</div>

Theres an easing example on p5js that i would love to make my own but i’m not completely sure how easing works. Can anyone explain how easing works? like why we’re defining these variables and what each of them do? that …

---

## [Beginner needs help](https://discourse.processing.org/t/beginner-needs-help/11589)

<div class="topic-metadata">

**Author:** [@d\_vibe](https://discourse.processing.org/u/d_vibe)\
**Replies:** 9\
**Last updated:** [February 21, 2020, 2:23am UTC](https://discourse.processing.org/t/beginner-needs-help/11589 "2020-02-21T02:23:50Z")

</div>

Hi! I’m fairly new to programming graphical effects, and I thought, as a starter, it would be a fun thing to try to imitate some of the early demoscene effects that was seen on computers, such as the Commodore Amiga, bac…

---

## [Variable must change from 3.67 to 3.15](https://discourse.processing.org/t/variable-must-change-from-3-67-to-3-15/17929)

<div class="topic-metadata">

**Author:** [@JochemTD](https://discourse.processing.org/u/JochemTD)\
**Replies:** 3\
**Last updated:** [February 19, 2020, 6:14pm UTC](https://discourse.processing.org/t/variable-must-change-from-3-67-to-3-15/17929 "2020-02-19T18:14:08Z")

</div>

Hi there! I need my variable i to go from 3.67 to 3.15 to 3.67 to 3.15 to 3.67 and so on. I’m able to do this just fine from 3.67 to 3.15, however I can’t manage to let it go back to 3.67. This is the code i’m using rig…

---

## [Javascript library on p5 (location on the screen while scrolling)](https://discourse.processing.org/t/javascript-library-on-p5-location-on-the-screen-while-scrolling/13300)

<div class="topic-metadata">

**Author:** [@calornorte](https://discourse.processing.org/u/calornorte)\
**Replies:** 16\
**Last updated:** [February 19, 2020, 1:51am UTC](https://discourse.processing.org/t/javascript-library-on-p5-location-on-the-screen-while-scrolling/13300 "2020-02-19T01:51:40Z")

</div>

I’m such a newby.! on p5, my problem is that I need to know the precise (visible) location on a very long vertical canvas after mouse scrolling down/up. MouseWheel doesn’t really do the job and might cause problems whe…

---

## [How powerful is p5js?](https://discourse.processing.org/t/how-powerful-is-p5js/1713)

<div class="topic-metadata">

**Author:** [@Jithin](https://discourse.processing.org/u/Jithin)\
**Replies:** 1\
**Last updated:** [February 19, 2020, 1:07am UTC](https://discourse.processing.org/t/how-powerful-is-p5js/1713 "2020-02-19T01:07:17Z")

</div>

I’m just curious to know how powerful actually p5js is, what are its possibilities? I want you guys to post below the links to the awesomest works that you’ve done with p5js. Thanks… I will post mine https://jithinks…

---

## [Issue with windowResize(windowWidth, windowHeight)](https://discourse.processing.org/t/issue-with-windowresize-windowwidth-windowheight/17858)

<div class="topic-metadata">

**Author:** [@jctitan](https://discourse.processing.org/u/jctitan)\
**Replies:** 8\
**Last updated:** [February 18, 2020, 8:54pm UTC](https://discourse.processing.org/t/issue-with-windowresize-windowwidth-windowheight/17858 "2020-02-18T20:54:07Z")

</div>

Hi, recently I was making my reactjs app and decided to use p5 canvas as background. Since I didn’t use p5 before, I found some code on internet and copy it to my app. Canvas (background) looks good on page first load, b…

---

## [Sketches not working in Firefox](https://discourse.processing.org/t/sketches-not-working-in-firefox/17705)

<div class="topic-metadata">

**Author:** [@August](https://discourse.processing.org/u/August)\
**Replies:** 1\
**Last updated:** [February 17, 2020, 12:21am UTC](https://discourse.processing.org/t/sketches-not-working-in-firefox/17705 "2020-02-17T00:21:37Z")

</div>

Hi! I am trying to incorporate a P5.js sketch on my Wordpress site. I am using a theme named Lay Theme and have been following this tutorial to get sketches to load on the site. I have tested three different sketches and…

---

## [FrameRate gets slow over time](https://discourse.processing.org/t/framerate-gets-slow-over-time/3149)

<div class="topic-metadata">

**Author:** [@willianxz](https://discourse.processing.org/u/willianxz)\
**Replies:** 6\
**Last updated:** [February 16, 2020, 3:28pm UTC](https://discourse.processing.org/t/framerate-gets-slow-over-time/3149 "2020-02-16T15:28:38Z")

</div>

Hello my friends, I’m having trouble with the speed of my program. I set the default speed to 60 fps, but over time the increment of my variable “time” is slowly increasing. I wonder how I could solve this “bug”. I al…

---

## [Cant write to 2D-Array? Wanna set specific pixel](https://discourse.processing.org/t/cant-write-to-2d-array-wanna-set-specific-pixel/17801)

<div class="topic-metadata">

**Author:** [@aeh](https://discourse.processing.org/u/aeh)\
**Replies:** 2\
**Last updated:** [February 14, 2020, 10:14pm UTC](https://discourse.processing.org/t/cant-write-to-2d-array-wanna-set-specific-pixel/17801 "2020-02-14T22:14:33Z")

</div>

Hello, I wanna try to set specific pixels, but only when the 2d-array position has an “x”. What do I wrong? I cant find the mistake I do :frowning: //this will store the crap-mountain var data = {}; function preload()…

---

## [Scrolling on one canvas only (instance mode)](https://discourse.processing.org/t/scrolling-on-one-canvas-only-instance-mode/17802)

<div class="topic-metadata">

**Author:** [@calornorte](https://discourse.processing.org/u/calornorte)\
**Replies:** 2\
**Last updated:** [February 14, 2020, 3:47am UTC](https://discourse.processing.org/t/scrolling-on-one-canvas-only-instance-mode/17802 "2020-02-14T03:47:03Z")

</div>

hello! I’m producing two canvases on Instance Mode, my plan is to be able to mouseScroll on just one canvas, but I can’t make it work. I believe… I’m making a name function that is called from mousewheel in the first c…

---

## [\*Almost\* combining brightness example and posenet](https://discourse.processing.org/t/almost-combining-brightness-example-and-posenet/17649)

<div class="topic-metadata">

**Author:** [@mweinberg](https://discourse.processing.org/u/mweinberg)\
**Replies:** 4\
**Last updated:** [February 14, 2020, 1:39am UTC](https://discourse.processing.org/t/almost-combining-brightness-example-and-posenet/17649 "2020-02-14T01:39:39Z")

</div>

Hi everyone. I am trying to modify the brightness example: https://p5js.org/examples/color-brightness.html to combine it with ml5 posenet. Instead of using the mouse position to move around the image I want to use the…

---

## [Stop audio from MIDI input detection](https://discourse.processing.org/t/stop-audio-from-midi-input-detection/17665)

<div class="topic-metadata">

**Author:** [@Carpece](https://discourse.processing.org/u/Carpece)\
**Replies:** 1\
**Last updated:** [February 13, 2020, 10:15pm UTC](https://discourse.processing.org/t/stop-audio-from-midi-input-detection/17665 "2020-02-13T22:15:46Z")

</div>

Hi, I’m trying to stop my audios when I click on reset button. I guess I have to point to “audio” in abstract, because I preloaded an array of audios… https://editor.p5js.org/carpece/sketches/5NWyhBHT Any idea? Thanks …

---

## [Contributing to P5.js](https://discourse.processing.org/t/contributing-to-p5-js/17792)

<div class="topic-metadata">

**Author:** [@Deepansharora27](https://discourse.processing.org/u/Deepansharora27)\
**Replies:** 0\
**Last updated:** [February 13, 2020, 2:13pm UTC](https://discourse.processing.org/t/contributing-to-p5-js/17792 "2020-02-13T14:13:33Z")

</div>

Hello Everyone , I am Deepanshu Arora , A second year Computer Science Undergrad Student currently in my Second Year in Manav Rachna International University,India . I am a Passionate about Web Development , and more s…

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

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