# p5.js

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

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

**Page:** 73

---

## [Problem with p5 Collections Folder](https://discourse.processing.org/t/problem-with-p5-collections-folder/20467)

<div class="topic-metadata">

**Author:** [@gjs](https://discourse.processing.org/u/gjs)\
**Replies:** 4\
**Last updated:** [May 5, 2020, 11:09pm UTC](https://discourse.processing.org/t/problem-with-p5-collections-folder/20467 "2020-05-05T23:09:14Z")

</div>

I appreciate the “My Collections” feature but for the past two weeks I have been unable to drop a sketch into it. After clicking “My account” then “My collections” the list of collections appears as it should. However, c…

---

## [Help parsing an array inside a String](https://discourse.processing.org/t/help-parsing-an-array-inside-a-string/19934)

<div class="topic-metadata">

**Author:** [@Yom](https://discourse.processing.org/u/Yom)\
**Replies:** 7\
**Last updated:** [May 5, 2020, 4:58pm UTC](https://discourse.processing.org/t/help-parsing-an-array-inside-a-string/19934 "2020-05-05T16:58:36Z")

</div>

Hello I need help with parsing a String to get the content of an array. I know nothing about regular expressions, patterns, it looks so complicated… I’ve tried a few things but nothing works :frowning: But I’m almost su…

---

## [Javascript: Question re functions](https://discourse.processing.org/t/javascript-question-re-functions/20478)

<div class="topic-metadata">

**Author:** [@femke.blanco](https://discourse.processing.org/u/femke.blanco)\
**Replies:** 1\
**Last updated:** [May 4, 2020, 10:03pm UTC](https://discourse.processing.org/t/javascript-question-re-functions/20478 "2020-05-04T22:03:42Z")

</div>

1 - I can reference a function by its name. function funName () { //code } console.log (funName); // -\> function funName () {//code} console.log (typeof funName); // -\> function 2 - I can assign a function t…

---

## [Not displaying text over certain size](https://discourse.processing.org/t/not-displaying-text-over-certain-size/20077)

<div class="topic-metadata">

**Author:** [@tanzor](https://discourse.processing.org/u/tanzor)\
**Replies:** 4\
**Last updated:** [May 5, 2020, 7:24am UTC](https://discourse.processing.org/t/not-displaying-text-over-certain-size/20077 "2020-05-05T07:24:32Z")

</div>

Dear experts, I’m coding an online experiment in jspsych and p5js and enjoying it very much. There’s a strange issue with font sizes however: if I increase the fontsize from 39 to 40 the text disappears (see line 61 in…

---

## [How do I load a .txt file into a textbox and make the textbox readonly?](https://discourse.processing.org/t/how-do-i-load-a-txt-file-into-a-textbox-and-make-the-textbox-readonly/20407)

<div class="topic-metadata">

**Author:** [@Bassam](https://discourse.processing.org/u/Bassam)\
**Replies:** 3\
**Last updated:** [May 4, 2020, 2:09pm UTC](https://discourse.processing.org/t/how-do-i-load-a-txt-file-into-a-textbox-and-make-the-textbox-readonly/20407 "2020-05-04T14:09:33Z")

</div>

I’m trying to create essentially a EULA page. I want to load a preexisting text file into it a textbox and I want to make the textbox read only. Is this possible in p5.js? Thanks in advance. https://editor.p5js.org/B…

---

## [Drag and Drop random behaviour](https://discourse.processing.org/t/drag-and-drop-random-behaviour/20419)

<div class="topic-metadata">

**Author:** [@yurikleb](https://discourse.processing.org/u/yurikleb)\
**Replies:** 2\
**Last updated:** [May 4, 2020, 10:55am UTC](https://discourse.processing.org/t/drag-and-drop-random-behaviour/20419 "2020-05-04T10:55:52Z")

</div>

I’m following this example which seems to work very well. I’m trying to rewrite it using classes, as I need to have several draggable objects in my project (I’m creating an image tagging tool for a computer vision proje…

---

## [Image resize animation and duplication using squareroot size](https://discourse.processing.org/t/image-resize-animation-and-duplication-using-squareroot-size/20438)

<div class="topic-metadata">

**Author:** [@cuvner](https://discourse.processing.org/u/cuvner)\
**Replies:** 13\
**Last updated:** [May 3, 2020, 5:58pm UTC](https://discourse.processing.org/t/image-resize-animation-and-duplication-using-squareroot-size/20438 "2020-05-03T17:58:48Z")

</div>

Hi, I want to create an animation with images where the image divides by inverse square and more images loaded. Anyone done something like this? Any help much appreciated, even a starting point. Chris

---

## [How to make the hour and minute hands rotate according to the real time](https://discourse.processing.org/t/how-to-make-the-hour-and-minute-hands-rotate-according-to-the-real-time/19994)

<div class="topic-metadata">

**Author:** [@Gravic216](https://discourse.processing.org/u/Gravic216)\
**Replies:** 3\
**Last updated:** [May 3, 2020, 5:17pm UTC](https://discourse.processing.org/t/how-to-make-the-hour-and-minute-hands-rotate-according-to-the-real-time/19994 "2020-05-03T17:17:30Z")

</div>

How to make the hour and minute hands rotate according to the real time, I refer to the example of the clock provided on the website （ https://p5js.org/zh-Hans/examples/input-clock.html ） When I brought the code into it …

---

## [Full Screen Does Not Work On Apple Products](https://discourse.processing.org/t/full-screen-does-not-work-on-apple-products/20406)

<div class="topic-metadata">

**Author:** [@Suttebun](https://discourse.processing.org/u/Suttebun)\
**Replies:** 1\
**Last updated:** [May 3, 2020, 11:02am UTC](https://discourse.processing.org/t/full-screen-does-not-work-on-apple-products/20406 "2020-05-03T11:02:35Z")

</div>

Html 5 fullscreen does not work on apple products, and I believe having the p5 reference reflect the current availability would be helpful for others! Have a nice day.

---

## [Hi guys, trying to simply play a sound in p5js but code doesn't work?](https://discourse.processing.org/t/hi-guys-trying-to-simply-play-a-sound-in-p5js-but-code-doesnt-work/20395)

<div class="topic-metadata">

**Author:** [@llcoolj](https://discourse.processing.org/u/llcoolj)\
**Replies:** 3\
**Last updated:** [May 3, 2020, 6:18am UTC](https://discourse.processing.org/t/hi-guys-trying-to-simply-play-a-sound-in-p5js-but-code-doesnt-work/20395 "2020-05-03T06:18:37Z")

</div>

Hi, so basically the code below doesn’t work, I don’t know if it’s the file path, but it cannot load the sound for some reason. Error: There was no response from the server at C:UserslauriDownloadsInput.mp3. Check the ur…

---

## [Sound files making my code run much slower](https://discourse.processing.org/t/sound-files-making-my-code-run-much-slower/20289)

<div class="topic-metadata">

**Author:** [@achandra](https://discourse.processing.org/u/achandra)\
**Replies:** 6\
**Last updated:** [May 2, 2020, 8:42pm UTC](https://discourse.processing.org/t/sound-files-making-my-code-run-much-slower/20289 "2020-05-02T20:42:17Z")

</div>

Hi, I’m new to P5 and working on a code for a school project. I have four sound clips in my code but everytime I have them on, the code becomes very visibly slower. I’m using the preload function to load them in, and th…

---

## [ERROR installing p5bots-server](https://discourse.processing.org/t/error-installing-p5bots-server/20069)

<div class="topic-metadata">

**Author:** [@lucaswoz](https://discourse.processing.org/u/lucaswoz)\
**Replies:** 2\
**Last updated:** [May 2, 2020, 8:17pm UTC](https://discourse.processing.org/t/error-installing-p5bots-server/20069 "2020-05-02T20:17:01Z")

</div>

Hello! I’m having some trouble following along with the HelloWorld p5bots tutorial: https://github.com/sarahgp/p5bots/blob/master/examples/HelloWorld.md I keep getting a bunch of errors when I try to run “npm install -g…

---

## [P5js on Tumblr Discussion - How to? \[not solved\]](https://discourse.processing.org/t/p5js-on-tumblr-discussion-how-to-not-solved/19664)

<div class="topic-metadata">

**Author:** [@danielx](https://discourse.processing.org/u/danielx)\
**Replies:** 5\
**Last updated:** [April 18, 2020, 4:20am UTC](https://discourse.processing.org/t/p5js-on-tumblr-discussion-how-to-not-solved/19664 "2020-04-18T04:20:17Z")

</div>

Hi! I know this is a broad question but I think its not only mine and I can’t find a discussion over this anywhere. Please excuse any typos or mistakes in my writing because I’m not a native English speaker. Let’s cut to…

---

## [Game of life code error](https://discourse.processing.org/t/game-of-life-code-error/20238)

<div class="topic-metadata">

**Author:** [@pallavi24](https://discourse.processing.org/u/pallavi24)\
**Replies:** 4\
**Last updated:** [May 2, 2020, 2:40pm UTC](https://discourse.processing.org/t/game-of-life-code-error/20238 "2020-05-02T14:40:29Z")

</div>

I m trying to make the game of life on p5.js. I have used a 2d array of CA class object called ‘cell’ and saving every iteration in ‘new\_cell’ and finally copying back the values from ‘new \_cell’ to ‘cell’. The code work…

---

## [Audio processing](https://discourse.processing.org/t/audio-processing/20370)

<div class="topic-metadata">

**Author:** [@dinkerpatel](https://discourse.processing.org/u/dinkerpatel)\
**Replies:** 2\
**Last updated:** [May 2, 2020, 1:33am UTC](https://discourse.processing.org/t/audio-processing/20370 "2020-05-02T01:33:53Z")

</div>

Hi! I am new to p5.js and want to use the audio libraries to extract music tones from an audio clip that has instrumental music. Essentially, I want to display ‘freq’ in the ‘y’ axis versus time in the ‘x’ axis and notat…

---

## [loadImage() fails to load image served on reverse proxy (Safari/iOS)](https://discourse.processing.org/t/loadimage-fails-to-load-image-served-on-reverse-proxy-safari-ios/20240)

<div class="topic-metadata">

**Author:** [@dfd0226](https://discourse.processing.org/u/dfd0226)\
**Replies:** 6\
**Last updated:** [May 1, 2020, 6:40pm UTC](https://discourse.processing.org/t/loadimage-fails-to-load-image-served-on-reverse-proxy-safari-ios/20240 "2020-05-01T18:40:57Z")

</div>

p5.js version: 0.10.2 Web browser and version: Safari: Version 13.1 (15609.1.20.111.8) Operating System: macOS 10.15.4 Steps to reproduce this: I’ve built an application that creates simulations of chemical systems inc…

---

## [I want a google spread sheets using p5!](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632)

<div class="topic-metadata">

**Author:** [@fankimm](https://discourse.processing.org/u/fankimm)\
**Replies:** 6\
**Last updated:** [May 1, 2020, 5:42pm UTC](https://discourse.processing.org/t/i-want-a-google-spread-sheets-using-p5/2632 "2020-05-01T17:42:31Z")

</div>

I have a Google Spreadsheet with full access. And I want to add new content to the Google Spreadsheet using p5js. Can I…? What should I do?

---

## [Photo editing example pointers](https://discourse.processing.org/t/photo-editing-example-pointers/20191)

<div class="topic-metadata">

**Author:** [@malindra](https://discourse.processing.org/u/malindra)\
**Replies:** 1\
**Last updated:** [May 1, 2020, 4:08pm UTC](https://discourse.processing.org/t/photo-editing-example-pointers/20191 "2020-05-01T16:08:33Z")

</div>

Loving these images and apparently they’re done using processing or something similar. Does anyone have any pointers on how to achieve things like these, have been hunting around but not found any tuts so far. (t…

---

## [Console is printing a vague/incorrect error](https://discourse.processing.org/t/console-is-printing-a-vague-incorrect-error/20303)

<div class="topic-metadata">

**Author:** [@PKFire17](https://discourse.processing.org/u/PKFire17)\
**Replies:** 1\
**Last updated:** [May 1, 2020, 6:17am UTC](https://discourse.processing.org/t/console-is-printing-a-vague-incorrect-error/20303 "2020-05-01T06:17:19Z")

</div>

Hi, I’m trying to make a polyhedron renderer thing but when I try to draw a vertex, it prints out Script error. (: line 0) and p5 had problems creating the global function "createElement", possibly because your code is…

---

## [Detecting eye color using PoseNet](https://discourse.processing.org/t/detecting-eye-color-using-posenet/20254)

<div class="topic-metadata">

**Author:** [@gjs](https://discourse.processing.org/u/gjs)\
**Replies:** 2\
**Last updated:** [April 30, 2020, 1:57pm UTC](https://discourse.processing.org/t/detecting-eye-color-using-posenet/20254 "2020-04-30T13:57:55Z")

</div>

Building on Dan Shiffman’s PoseNet example, I built a model to get eye color using the left and right eye points. I applied a 6 pixel offset from each point’s center to avoid the pupil and, ideally, land on the iris. It …

---

## [Video help please - no content type found for .webm](https://discourse.processing.org/t/video-help-please-no-content-type-found-for-webm/20234)

<div class="topic-metadata">

**Author:** [@samthetinkerer](https://discourse.processing.org/u/samthetinkerer)\
**Replies:** 1\
**Last updated:** [April 30, 2020, 7:10am UTC](https://discourse.processing.org/t/video-help-please-no-content-type-found-for-webm/20234 "2020-04-30T07:10:28Z")

</div>

I am writing an interactive video animation with a series of video clips in .webm format. It runs correctly but the console log shows the error: no content type found for .webm. I have tried looking at MIME types but hav…

---

## [Volume dips when connecting to p5.Amp](https://discourse.processing.org/t/volume-dips-when-connecting-to-p5-amp/20285)

<div class="topic-metadata">

**Author:** [@unofficial](https://discourse.processing.org/u/unofficial)\
**Replies:** 0\
**Last updated:** [April 29, 2020, 8:17pm UTC](https://discourse.processing.org/t/volume-dips-when-connecting-to-p5-amp/20285 "2020-04-29T20:17:03Z")

</div>

Hey all I have been crazy about what I thought was a more complicated problem, but it seems like it is perhaps just a simple bug? If you connect an audio source to a p5.Gain it seems to drastically reduce the level of th…

---

## [P5 Envelope Sound Clipping/Crackle](https://discourse.processing.org/t/p5-envelope-sound-clipping-crackle/18310)

<div class="topic-metadata">

**Author:** [@godmach1ne](https://discourse.processing.org/u/godmach1ne)\
**Replies:** 1\
**Last updated:** [April 29, 2020, 8:04pm UTC](https://discourse.processing.org/t/p5-envelope-sound-clipping-crackle/18310 "2020-04-29T20:04:01Z")

</div>

Hi all, Have been trying to create a sequencer using the p5.sound library with the use of Parts. It works smoothly with sample files, however I would like to add more parameters (ADSR) to the sound to play with by using…

---

## [Contributing to p5.js - where to put function?](https://discourse.processing.org/t/contributing-to-p5-js-where-to-put-function/20213)

<div class="topic-metadata">

**Author:** [@rizz0s](https://discourse.processing.org/u/rizz0s)\
**Replies:** 3\
**Last updated:** [April 29, 2020, 6:32pm UTC](https://discourse.processing.org/t/contributing-to-p5-js-where-to-put-function/20213 "2020-04-29T18:32:05Z")

</div>

Hey folks! Beginner dev here. I’m a big fan of Processing and have used p5.js in personal projects. I wanted to try contributing to open source code to get some practice so I thought, why not p5? Anyway, I watched The …

---

## [Capturer.start() from CCapture library causing my sketch animation to be jumpy](https://discourse.processing.org/t/capturer-start-from-ccapture-library-causing-my-sketch-animation-to-be-jumpy/20217)

<div class="topic-metadata">

**Author:** [@Darkmatterial](https://discourse.processing.org/u/Darkmatterial)\
**Replies:** 0\
**Last updated:** [April 28, 2020, 1:29am UTC](https://discourse.processing.org/t/capturer-start-from-ccapture-library-causing-my-sketch-animation-to-be-jumpy/20217 "2020-04-28T01:29:31Z")

</div>

Hi! I have a p5.js sketch I want to create a .gif from using CCapture library the problem is that when I run the sketch the final video is all jumpy in the drawGrid() object, does anyone have a clue why this is happenin…

---

## [Nested canvases?](https://discourse.processing.org/t/nested-canvases/20033)

<div class="topic-metadata">

**Author:** [@Yom](https://discourse.processing.org/u/Yom)\
**Replies:** 5\
**Last updated:** [April 27, 2020, 10:47pm UTC](https://discourse.processing.org/t/nested-canvases/20033 "2020-04-27T22:47:29Z")

</div>

Hello, I’m new to p5.js, javascript, etc… I would like to have a canvas inside another canvas. Here is my current code, it works but is it a bad idea ? And if so, why ? const sketch1 = p5 =\> { p5.setup = () =\> { …

---

## [Variables from php to j5](https://discourse.processing.org/t/variables-from-php-to-j5/20153)

<div class="topic-metadata">

**Author:** [@goorny](https://discourse.processing.org/u/goorny)\
**Replies:** 2\
**Last updated:** [April 25, 2020, 11:51pm UTC](https://discourse.processing.org/t/variables-from-php-to-j5/20153 "2020-04-25T23:51:05Z")

</div>

Hello. I start" programing" in p5 few weeks ago. Last week try figure out one problem by reading refference , look tons from YT, and searching at forums. Small example: index.php \<?php $ble=blebleble ?\> index.js …

---

## [Exceptions in random()](https://discourse.processing.org/t/exceptions-in-random/20187)

<div class="topic-metadata">

**Author:** [@Rahul](https://discourse.processing.org/u/Rahul)\
**Replies:** 2\
**Last updated:** [April 27, 2020, 1:58am UTC](https://discourse.processing.org/t/exceptions-in-random/20187 "2020-04-27T01:58:39Z")

</div>

Hello. Recently, I’ve been working on a sketch in which I need to line up circles in a random order. Basically, I have an array with all the x-coordinates of the circles, and I have a for loop in setup to display enough …

---

## [Sequenced animation with state](https://discourse.processing.org/t/sequenced-animation-with-state/20140)

<div class="topic-metadata">

**Author:** [@alexalex25](https://discourse.processing.org/u/alexalex25)\
**Replies:** 2\
**Last updated:** [April 26, 2020, 1:48pm UTC](https://discourse.processing.org/t/sequenced-animation-with-state/20140 "2020-04-26T13:48:52Z")

</div>

Hi, I’m trying to do a simple animation in sequence: at start of sketch : a square moves to the right 100px. after it finishes that step, it waits 2 seconds after it finishes that step it goes down for 100px. after tha…

---

## [Clicking on and moving rotated shapes](https://discourse.processing.org/t/clicking-on-and-moving-rotated-shapes/20177)

<div class="topic-metadata">

**Author:** [@dansdnadesigns](https://discourse.processing.org/u/dansdnadesigns)\
**Replies:** 0\
**Last updated:** [April 26, 2020, 1:40pm UTC](https://discourse.processing.org/t/clicking-on-and-moving-rotated-shapes/20177 "2020-04-26T13:40:00Z")

</div>

Hello. I have made the following sketch which draws rod shapes using a class at random angles on the canvas. I want the rods to change color when the mouse is rolled over and when the mouse is pressed inside the rods I w…

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

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