# p5.js

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

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

**Page:** 51

---

## [Loading excel data in P5](https://discourse.processing.org/t/loading-excel-data-in-p5/27930)

<div class="topic-metadata">

**Author:** [@xbix](https://discourse.processing.org/u/xbix)\
**Replies:** 1\
**Last updated:** [February 19, 2021, 1:53pm UTC](https://discourse.processing.org/t/loading-excel-data-in-p5/27930 "2021-02-19T13:53:06Z")

</div>

I haven’t found any libraries for that purpose. What are my options when I want to load excel data into p5? Thanks in advance

---

## [loadJSON() function error message](https://discourse.processing.org/t/loadjson-function-error-message/27893)

<div class="topic-metadata">

**Author:** [@EunieceHarris](https://discourse.processing.org/u/EunieceHarris)\
**Replies:** 8\
**Last updated:** [February 19, 2021, 10:09am UTC](https://discourse.processing.org/t/loadjson-function-error-message/27893 "2021-02-19T10:09:00Z")

</div>

I’m a newbie to p5.js but I’ve been playing around with using API’s. Whenever I call an API using the function loadJSON(), no matter what I always get the same error message that reads: p5.js says: It looks like there w…

---

## [How to modify the program? Sound detection and face tracking](https://discourse.processing.org/t/how-to-modify-the-program-sound-detection-and-face-tracking/27881)

<div class="topic-metadata">

**Author:** [@KateK](https://discourse.processing.org/u/KateK)\
**Replies:** 5\
**Last updated:** [February 18, 2021, 6:52pm UTC](https://discourse.processing.org/t/how-to-modify-the-program-sound-detection-and-face-tracking/27881 "2021-02-18T18:52:38Z")

</div>

Hi, I’m learning programming and I’m stuck in one place. According to the code Cassie wrote on the webinar (https://www.youtube.com/watch?v=sRLWIAPaiRI&t=1546s), the sound comes when you click. I want the sound to go on…

---

## [Converting byte array or String to float](https://discourse.processing.org/t/converting-byte-array-or-string-to-float/27863)

<div class="topic-metadata">

**Author:** [@TanviM](https://discourse.processing.org/u/TanviM)\
**Replies:** 6\
**Last updated:** [February 18, 2021, 7:29am UTC](https://discourse.processing.org/t/converting-byte-array-or-string-to-float/27863 "2021-02-18T07:29:21Z")

</div>

Hi, I have been successful in getting serial data using this - GitHub - p5-serial/p5.serialport: Serial Port API and Server for p5.js library as either byte array or string values. But when I tried converting string t…

---

## [Bug with createRadio(): it doesn't create separate radios](https://discourse.processing.org/t/bug-with-createradio-it-doesnt-create-separate-radios/27856)

<div class="topic-metadata">

**Author:** [@benjaminmarkus](https://discourse.processing.org/u/benjaminmarkus)\
**Replies:** 2\
**Last updated:** [February 16, 2021, 11:55am UTC](https://discourse.processing.org/t/bug-with-createradio-it-doesnt-create-separate-radios/27856 "2021-02-16T11:55:46Z")

</div>

I want to include three separate set of radio buttons in my code and for that I am using createRadio() three separate times, such as: radio1 = createRadio(), radio2 = createRadio(), radio3= createRadio(). But there seem…

---

## [p5.FFT with cordova](https://discourse.processing.org/t/p5-fft-with-cordova/27836)

<div class="topic-metadata">

**Author:** [@sarthak\_g](https://discourse.processing.org/u/sarthak_g)\
**Replies:** 1\
**Last updated:** [February 15, 2021, 7:53pm UTC](https://discourse.processing.org/t/p5-fft-with-cordova/27836 "2021-02-15T19:53:46Z")

</div>

p5.AudioIn() does not work when build app using cordova. Therefore, I’ve used cordova plugin to receive microphone audioContext. Now, I want to connect above context as input to p5.fft to visualize waveform. How can I a…

---

## [How do I load images with loadImage() and webpack?](https://discourse.processing.org/t/how-do-i-load-images-with-loadimage-and-webpack/25363)

<div class="topic-metadata">

**Author:** [@sdnorris](https://discourse.processing.org/u/sdnorris)\
**Replies:** 2\
**Last updated:** [February 15, 2021, 12:34pm UTC](https://discourse.processing.org/t/how-do-i-load-images-with-loadimage-and-webpack/25363 "2021-02-15T12:34:58Z")

</div>

Hello, I am using p5 in instance mode with an Express server in Node.js. I am importing the p5.js library via npm and webpack rather than with an inline script tag on an html document. This has been working fine, but I…

---

## [Make use of camera in device and live stream](https://discourse.processing.org/t/make-use-of-camera-in-device-and-live-stream/27834)

<div class="topic-metadata">

**Author:** [@bandhavya](https://discourse.processing.org/u/bandhavya)\
**Replies:** 0\
**Last updated:** [February 15, 2021, 9:33am UTC](https://discourse.processing.org/t/make-use-of-camera-in-device-and-live-stream/27834 "2021-02-15T09:33:15Z")

</div>

I want to live stream a video captured from mobile using p5.js. This is possible? any ideas how to implement? I checked the sample tutorials which opens the front webcam and it can be displayed on canvas. But incase i w…

---

## [Problems with print() function](https://discourse.processing.org/t/problems-with-print-function/27824)

<div class="topic-metadata">

**Author:** [@sirin](https://discourse.processing.org/u/sirin)\
**Replies:** 7\
**Last updated:** [February 15, 2021, 1:50am UTC](https://discourse.processing.org/t/problems-with-print-function/27824 "2021-02-15T01:50:53Z")

</div>

I am new to p5.js and I encountered a problem with a simple code: var a=10; var b; function setup() { createCanvas(400, 400); //some expressions using variables go here } function draw() { background(220); //…

---

## [Npm ci showing error](https://discourse.processing.org/t/npm-ci-showing-error/27735)

<div class="topic-metadata">

**Author:** [@sagar-joshi](https://discourse.processing.org/u/sagar-joshi)\
**Replies:** 16\
**Last updated:** [February 14, 2021, 3:46pm UTC](https://discourse.processing.org/t/npm-ci-showing-error/27735 "2021-02-14T15:46:22Z")

</div>

I was trying to set up p5.js locally but npm ci is failing. It says: error path /home/sagar/Desktop/processing/p5.js/node\_modules/puppeteer error command failed error command sh -c node install.js I have attached th…

---

## [HELP! p5.js Rect - Rect Collions other!](https://discourse.processing.org/t/help-p5-js-rect-rect-collions-other/27771)

<div class="topic-metadata">

**Author:** [@Zwaan69](https://discourse.processing.org/u/Zwaan69)\
**Replies:** 1\
**Last updated:** [February 14, 2021, 3:01pm UTC](https://discourse.processing.org/t/help-p5-js-rect-rect-collions-other/27771 "2021-02-14T15:01:19Z")

</div>

Hi, I have 2 questions that I love to have for making my own fun games like the helicopter. see picture… Small rectangle to right bosting with large rectangle, but small rect does not stand through, how? stuck just …

---

## [How do you add text that wraps a circle?](https://discourse.processing.org/t/how-do-you-add-text-that-wraps-a-circle/27789)

<div class="topic-metadata">

**Author:** [@Potato3218](https://discourse.processing.org/u/Potato3218)\
**Replies:** 4\
**Last updated:** [February 14, 2021, 2:04pm UTC](https://discourse.processing.org/t/how-do-you-add-text-that-wraps-a-circle/27789 "2021-02-14T14:04:50Z")

</div>

I have made a code something like this: createCanvas(800, 800); } function draw() { background("lightblue"); noStroke(); fill("green") ellipse(width/2,height/2,0.8\*width); fill("white") ellipse(width/2,he…

---

## [High CPU / Crash under IOS Safari using p5 Audio js](https://discourse.processing.org/t/high-cpu-crash-under-ios-safari-using-p5-audio-js/27798)

<div class="topic-metadata">

**Author:** [@Skuenzl](https://discourse.processing.org/u/Skuenzl)\
**Replies:** 1\
**Last updated:** [February 14, 2021, 12:12am UTC](https://discourse.processing.org/t/high-cpu-crash-under-ios-safari-using-p5-audio-js/27798 "2021-02-14T00:12:53Z")

</div>

Hey ive using the Audio lib for my shooter game but at several times the sounds crashes my game (on mac and iphone) seems the sound is the Problem if i only load the shoot sound, the browser Crashes after a while. i mak…

---

## [P5-manager install errors (deprecated)](https://discourse.processing.org/t/p5-manager-install-errors-deprecated/27808)

<div class="topic-metadata">

**Author:** [@rmodesi](https://discourse.processing.org/u/rmodesi)\
**Replies:** 2\
**Last updated:** [February 13, 2021, 11:27pm UTC](https://discourse.processing.org/t/p5-manager-install-errors-deprecated/27808 "2021-02-13T23:27:47Z")

</div>

sudo npm install -g p5-manager gives me the following errors: npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated babel-preset-…

---

## [How to draw on a video](https://discourse.processing.org/t/how-to-draw-on-a-video/27642)

<div class="topic-metadata">

**Author:** [@skypickle](https://discourse.processing.org/u/skypickle)\
**Replies:** 8\
**Last updated:** [February 12, 2021, 1:02pm UTC](https://discourse.processing.org/t/how-to-draw-on-a-video/27642 "2021-02-12T13:02:46Z")

</div>

This sketch below puts up a video on the upper part of a light blue canvas. When the mouse is pressed, I can draw a line on the canvas but wherevere there is video, the line is not persistent. let capture; function set…

---

## [mousePressed() callback function inside object](https://discourse.processing.org/t/mousepressed-callback-function-inside-object/27753)

<div class="topic-metadata">

**Author:** [@jasonhallen](https://discourse.processing.org/u/jasonhallen)\
**Replies:** 4\
**Last updated:** [February 12, 2021, 3:44am UTC](https://discourse.processing.org/t/mousepressed-callback-function-inside-object/27753 "2021-02-12T03:44:32Z")

</div>

Hi everyone, I started learning p5.js a couple weeks ago and have been working on my first big project. I’m having a hard time troubleshooting an issue involving mousePressed() used inside of an object. Here’s a simpl…

---

## [Feature request: toggle comments on/off](https://discourse.processing.org/t/feature-request-toggle-comments-on-off/27720)

<div class="topic-metadata">

**Author:** [@rmacdonald](https://discourse.processing.org/u/rmacdonald)\
**Replies:** 1\
**Last updated:** [February 11, 2021, 12:59am UTC](https://discourse.processing.org/t/feature-request-toggle-comments-on-off/27720 "2021-02-11T00:59:19Z")

</div>

When I create sample code for my students, I often include lots of comments for them, and it would be amazing if there was a simple way to toggle those comments on and off. Once students have processed the comments, hid…

---

## [Weird behavior with array uniforms for fragment shader, ideas?](https://discourse.processing.org/t/weird-behavior-with-array-uniforms-for-fragment-shader-ideas/27636)

<div class="topic-metadata">

**Author:** [@baylyd](https://discourse.processing.org/u/baylyd)\
**Replies:** 3\
**Last updated:** [February 10, 2021, 6:07pm UTC](https://discourse.processing.org/t/weird-behavior-with-array-uniforms-for-fragment-shader-ideas/27636 "2021-02-10T18:07:37Z")

</div>

Hi there, I have a pretty simple shader sketch going but for some reason none of the array uniforms act the way I expect. I was hoping someone with some more experience than me could point out whats causing the strange …

---

## [I need help with my code, I don't know why it isn't working](https://discourse.processing.org/t/i-need-help-with-my-code-i-dont-know-why-it-isnt-working/27689)

<div class="topic-metadata">

**Author:** [@thorax1st](https://discourse.processing.org/u/thorax1st)\
**Replies:** 16\
**Last updated:** [February 9, 2021, 3:48pm UTC](https://discourse.processing.org/t/i-need-help-with-my-code-i-dont-know-why-it-isnt-working/27689 "2021-02-09T15:48:10Z")

</div>

I have tried to make ellipses with random positions on the canvas which disappear when they are clicked on, I tried doing this by putting an if statement in a for loop which should check if the mouse is inside one of the…

---

## [Want to make some styling changes in images/visualization in p5.js sub-area of math](https://discourse.processing.org/t/want-to-make-some-styling-changes-in-images-visualization-in-p5-js-sub-area-of-math/27565)

<div class="topic-metadata">

**Author:** [@Shubham](https://discourse.processing.org/u/Shubham)\
**Replies:** 3\
**Last updated:** [February 8, 2021, 9:19pm UTC](https://discourse.processing.org/t/want-to-make-some-styling-changes-in-images-visualization-in-p5-js-sub-area-of-math/27565 "2021-02-08T21:19:05Z")

</div>

Hi, I am new to the p5.js codebase and found some styling error in some math sub-area images, but I couldn’t find where these images/visualization is being rendered. I want to change some text alignment and image size in…

---

## [Is there an easy way to bold individual words while using text()?](https://discourse.processing.org/t/is-there-an-easy-way-to-bold-individual-words-while-using-text/27645)

<div class="topic-metadata">

**Author:** [@Bassam](https://discourse.processing.org/u/Bassam)\
**Replies:** 7\
**Last updated:** [February 8, 2021, 2:58am UTC](https://discourse.processing.org/t/is-there-an-easy-way-to-bold-individual-words-while-using-text/27645 "2021-02-08T02:58:41Z")

</div>

I want to print My name is Bassam. on the canvas. This is the code I had to write: function setup() { const x = 50, y = 100; let xpos; createCanvas(400, 400); background("white"); textSize(28); tex…

---

## [Oblique text using CSS directly in P5](https://discourse.processing.org/t/oblique-text-using-css-directly-in-p5/27458)

<div class="topic-metadata">

**Author:** [@holytypo](https://discourse.processing.org/u/holytypo)\
**Replies:** 2\
**Last updated:** [February 8, 2021, 12:08am UTC](https://discourse.processing.org/t/oblique-text-using-css-directly-in-p5/27458 "2021-02-08T00:08:31Z")

</div>

Hey guys, I want to change the font weight and oblique angle directly in p5. I’ve managed to change the weight this way: p.style('font-weight', map(mouseX, 0, width, 1, 999)) but cannot find a way to change the slant…

---

## [Question about TexttoPoint()](https://discourse.processing.org/t/question-about-texttopoint/27627)

<div class="topic-metadata">

**Author:** [@kmn063836](https://discourse.processing.org/u/kmn063836)\
**Replies:** 7\
**Last updated:** [February 7, 2021, 4:47pm UTC](https://discourse.processing.org/t/question-about-texttopoint/27627 "2021-02-07T16:47:48Z")

</div>

Hi, I have a question about TexttoPoint() in p5.js. Is there a way to set/limit the number of points that draw the letter? For example, I’d like to draw both letters ‘A’ and ‘B’ only with 10 points but not sure how… (U…

---

## [QUAD\_STRIP not working in WEBGL](https://discourse.processing.org/t/quad-strip-not-working-in-webgl/27638)

<div class="topic-metadata">

**Author:** [@KeirMeDear](https://discourse.processing.org/u/KeirMeDear)\
**Replies:** 2\
**Last updated:** [February 7, 2021, 9:37am UTC](https://discourse.processing.org/t/quad-strip-not-working-in-webgl/27638 "2021-02-07T09:37:38Z")

</div>

So I’m trying to create a grid, with each row being a single beginShape() object using QUAD\_STRIP. My code uses a nested for loop to generate the x and y values, and then runs through these values per row, with each xy …

---

## [getURLParams() returning undefined](https://discourse.processing.org/t/geturlparams-returning-undefined/27631)

<div class="topic-metadata">

**Author:** [@toby](https://discourse.processing.org/u/toby)\
**Replies:** 2\
**Last updated:** [February 7, 2021, 9:20am UTC](https://discourse.processing.org/t/geturlparams-returning-undefined/27631 "2021-02-07T09:20:49Z")

</div>

Hi, I’m trying to use getURLParams() but get undefined, tested in Chrome and Firefox. Code below and online. Can anyone see what is wrong, please? thanks! // test with https://editor.p5js.org/tobyhoward/sketches/TJeGFhQ…

---

## [Add song to sketch in Processing p5-Mode](https://discourse.processing.org/t/add-song-to-sketch-in-processing-p5-mode/27580)

<div class="topic-metadata">

**Author:** [@myCatIsAwesome](https://discourse.processing.org/u/myCatIsAwesome)\
**Replies:** 6\
**Last updated:** [February 6, 2021, 6:17pm UTC](https://discourse.processing.org/t/add-song-to-sketch-in-processing-p5-mode/27580 "2021-02-06T18:17:29Z")

</div>

I am using Processing in p5 Mode. I added a songfile to my sketch via sketch-\> add file (I hope that add file is the correct english translation). The thing is I tried all various ways to make it work code wise (preload…

---

## [Get width/height of text("Hello world!", x, y)?](https://discourse.processing.org/t/get-width-height-of-text-hello-world-x-y/27611)

<div class="topic-metadata">

**Author:** [@Bassam](https://discourse.processing.org/u/Bassam)\
**Replies:** 2\
**Last updated:** [February 5, 2021, 7:48pm UTC](https://discourse.processing.org/t/get-width-height-of-text-hello-world-x-y/27611 "2021-02-05T19:48:00Z")

</div>

Is there someway to ascertain the width and height of text printed via text("Hello world!", 100, 100);? Thanks!

---

## [P5.js Createfileinput custom text](https://discourse.processing.org/t/p5-js-createfileinput-custom-text/27602)

<div class="topic-metadata">

**Author:** [@nxmusic](https://discourse.processing.org/u/nxmusic)\
**Replies:** 1\
**Last updated:** [February 5, 2021, 6:27pm UTC](https://discourse.processing.org/t/p5-js-createfileinput-custom-text/27602 "2021-02-05T18:27:48Z")

</div>

When I create a input = createFileInput(handleFile); appears the text ‘seleccionar archivo’ and the name of file near. I can change this messages with .style or .attribute? Thanks

---

## [Editor feature request: Edit\>Select All](https://discourse.processing.org/t/editor-feature-request-edit-select-all/27588)

<div class="topic-metadata">

**Author:** [@GeorgeRoland](https://discourse.processing.org/u/GeorgeRoland)\
**Replies:** 2\
**Last updated:** [February 4, 2021, 9:11pm UTC](https://discourse.processing.org/t/editor-feature-request-edit-select-all/27588 "2021-02-04T21:11:53Z")

</div>

It would be nice to add this feature. I like to select code and copy it to the Clipboard for use elsewhere. Using a Mac Trackpad, it’s very difficult to click-drag through an entire document.

---

## [Audio Without User Interaction?](https://discourse.processing.org/t/audio-without-user-interaction/27556)

<div class="topic-metadata">

**Author:** [@karenmsn](https://discourse.processing.org/u/karenmsn)\
**Replies:** 4\
**Last updated:** [February 4, 2021, 9:02am UTC](https://discourse.processing.org/t/audio-without-user-interaction/27556 "2021-02-04T09:02:09Z")

</div>

Any way to start audio without having a user click a key or button for p5.js?

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

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