# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=348

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

**Page:** 349

---

## [Strange performance issue](https://discourse.processing.org/t/strange-performance-issue/20976)

<div class="topic-metadata">

**Author:** [@Miguelac](https://discourse.processing.org/u/Miguelac)\
**Replies:** 2\
**Last updated:** [May 18, 2020, 7:21am UTC](https://discourse.processing.org/t/strange-performance-issue/20976 "2020-05-18T07:21:18Z")

</div>

I’m writing a game (a clone of the game “untangle”) and I’m quite happy with how it turned out. However, while yesterday the game was running well on my phone, today after a few small additions for new features I notice…

---

## [Uncaught TypeError: Cannot read property 'collide' of undefined (sketch: line 19)](https://discourse.processing.org/t/uncaught-typeerror-cannot-read-property-collide-of-undefined-sketch-line-19/20914)

<div class="topic-metadata">

**Author:** [@cmoredock](https://discourse.processing.org/u/cmoredock)\
**Replies:** 5\
**Last updated:** [May 18, 2020, 6:45am UTC](https://discourse.processing.org/t/uncaught-typeerror-cannot-read-property-collide-of-undefined-sketch-line-19/20914 "2020-05-18T06:45:20Z")

</div>

Hello, I am trying to spend some time to figure out how to track and remove elements from an object array, and “thought” I had a pretty good understanding of what I needed to do. I am getting the above error on occasion…

---

## [Why does not processing work well on my MacBook Air 2015](https://discourse.processing.org/t/why-does-not-processing-work-well-on-my-macbook-air-2015/20901)

<div class="topic-metadata">

**Author:** [@Amesh](https://discourse.processing.org/u/Amesh)\
**Replies:** 2\
**Last updated:** [May 18, 2020, 6:00am UTC](https://discourse.processing.org/t/why-does-not-processing-work-well-on-my-macbook-air-2015/20901 "2020-05-18T06:00:29Z")

</div>

I want to ask you why processing doesn’t work on my MacBook Air 2015? Here are specs this mac; MacBook Air 2015(11-inch) processer 1.6 GHz Intel Core i5 Memory 4GB 1600 MHz DDR3 Before I opened and coded in 1th Apri…

---

## [Trying to make a perlin noise loop into a Music visualization](https://discourse.processing.org/t/trying-to-make-a-perlin-noise-loop-into-a-music-visualization/20988)

<div class="topic-metadata">

**Author:** [@Cub](https://discourse.processing.org/u/Cub)\
**Replies:** 1\
**Last updated:** [May 18, 2020, 1:26am UTC](https://discourse.processing.org/t/trying-to-make-a-perlin-noise-loop-into-a-music-visualization/20988 "2020-05-18T01:26:55Z")

</div>

please format code with \</\> button \* homework policy \* asking questions int totalFrames = 100; int counter = 0; boolean record = false; Particle\[\] particles = new Particle\[100\]; void setup() { size(600, 600); …

---

## [Easy way to see variable values after sketch is run?](https://discourse.processing.org/t/easy-way-to-see-variable-values-after-sketch-is-run/20981)

<div class="topic-metadata">

**Author:** [@jl33](https://discourse.processing.org/u/jl33)\
**Replies:** 6\
**Last updated:** [May 17, 2020, 11:48pm UTC](https://discourse.processing.org/t/easy-way-to-see-variable-values-after-sketch-is-run/20981 "2020-05-17T23:48:29Z")

</div>

I’m using Processing to work on some procedural generation stuff with a lot of random(), so for debugging/developing the code I often want to check what value some variable ended up throwing. I’m aware that if I know in …

---

## [Processing setup](https://discourse.processing.org/t/processing-setup/20885)

<div class="topic-metadata">

**Author:** [@mike\_z](https://discourse.processing.org/u/mike_z)\
**Replies:** 3\
**Last updated:** [May 17, 2020, 9:48pm UTC](https://discourse.processing.org/t/processing-setup/20885 "2020-05-17T21:48:28Z")

</div>

I just downloaded Processing and intend to use it to design GUI’s for Arduino projects. My question is in regards to how to set up a Processing file structure on my home network. I have a number of computers that I use w…

---

## [Getting java exception in G4P while creating child window](https://discourse.processing.org/t/getting-java-exception-in-g4p-while-creating-child-window/20882)

<div class="topic-metadata">

**Author:** [@David](https://discourse.processing.org/u/David)\
**Replies:** 6\
**Last updated:** [May 17, 2020, 6:19pm UTC](https://discourse.processing.org/t/getting-java-exception-in-g4p-while-creating-child-window/20882 "2020-05-17T18:19:10Z")

</div>

I think I know what the problem is, I just wanted to get a second opinion. This is by far the most complex window I’ve tried to create so far. Sometimes it comes up OK and sometimes I get a “java.util.ConcurrentModificat…

---

## [Help with Shapes3D](https://discourse.processing.org/t/help-with-shapes3d/20930)

<div class="topic-metadata">

**Author:** [@lilqtip](https://discourse.processing.org/u/lilqtip)\
**Replies:** 1\
**Last updated:** [May 16, 2020, 7:33am UTC](https://discourse.processing.org/t/help-with-shapes3d/20930 "2020-05-16T07:33:05Z")

</div>

I am new to using libraries, to be frank, this is my first time trying. Now I am trying to use shapes3D to well, make 3D shapes and I can’t figure out how to work it. I have used their website ‘http://www.lagers.org.uk…

---

## [Doubts about readStringUntil ()](https://discourse.processing.org/t/doubts-about-readstringuntil/20938)

<div class="topic-metadata">

**Author:** [@Black\_1](https://discourse.processing.org/u/Black_1)\
**Replies:** 4\
**Last updated:** [May 17, 2020, 4:53pm UTC](https://discourse.processing.org/t/doubts-about-readstringuntil/20938 "2020-05-17T16:53:50Z")

</div>

hi everyone, i’m a new member, and i’m using processing recently. I am currently having difficulty with the “readStringUntil ()” function. Processing communicates with Arduino via LAN, but if the connection fails, the …

---

## [Animation problem: delay](https://discourse.processing.org/t/animation-problem-delay/20973)

<div class="topic-metadata">

**Author:** [@kukukoks](https://discourse.processing.org/u/kukukoks)\
**Replies:** 3\
**Last updated:** [May 17, 2020, 4:17pm UTC](https://discourse.processing.org/t/animation-problem-delay/20973 "2020-05-17T16:17:21Z")

</div>

Hi i have a problem with my code, i have 6 png and need to load this png from 0 to 5, but when i start program i have instantly 5 PImage zero, jeden, dwa, trzy, cztery, piec; void setup() { size(200, 200); zero=loa…

---

## [createInput() for Java](https://discourse.processing.org/t/createinput-for-java/20925)

<div class="topic-metadata">

**Author:** [@patricio1979](https://discourse.processing.org/u/patricio1979)\
**Replies:** 3\
**Last updated:** [May 17, 2020, 2:43pm UTC](https://discourse.processing.org/t/createinput-for-java/20925 "2020-05-17T14:43:04Z")

</div>

Hello, looking for a way to create a number box like the Pure Data one, Any ideas please? Is a simple box with a cursor. Enter a number or change it by mouse drag.

---

## [Help with integrating a Javascript p5 file into HTML](https://discourse.processing.org/t/help-with-integrating-a-javascript-p5-file-into-html/20962)

<div class="topic-metadata">

**Author:** [@Noaaaa](https://discourse.processing.org/u/Noaaaa)\
**Replies:** 2\
**Last updated:** [May 17, 2020, 12:35pm UTC](https://discourse.processing.org/t/help-with-integrating-a-javascript-p5-file-into-html/20962 "2020-05-17T12:35:03Z")

</div>

Just started trying to learn HTML, and I’m having trouble using a Javascript file within it. I want to use the p5.js Javascript library and I have created a canvas within a file called sketch.js. Why does only my H1 show…

---

## [Canvas size does not resize on click](https://discourse.processing.org/t/canvas-size-does-not-resize-on-click/20941)

<div class="topic-metadata">

**Author:** [@lerelolli](https://discourse.processing.org/u/lerelolli)\
**Replies:** 4\
**Last updated:** [May 17, 2020, 10:32am UTC](https://discourse.processing.org/t/canvas-size-does-not-resize-on-click/20941 "2020-05-17T10:32:18Z")

</div>

I have multiple different sketches defined and put them all in an array so I can iterate through them and show them one by one with an on click event. It does work fine except when I change the visual after a window resi…

---

## [How to gradient this color preview](https://discourse.processing.org/t/how-to-gradient-this-color-preview/19526)

<div class="topic-metadata">

**Author:** [@newbietot](https://discourse.processing.org/u/newbietot)\
**Replies:** 3\
**Last updated:** [April 8, 2020, 1:41pm UTC](https://discourse.processing.org/t/how-to-gradient-this-color-preview/19526 "2020-04-08T13:41:54Z")

</div>

i want to make my color previewer will display the gradient black at bottom the gradient white at the top right corner, once i click the color slider into red .. the top left corner will display the color that i picked…

---

## [Loading from TXT and implementing into my current code](https://discourse.processing.org/t/loading-from-txt-and-implementing-into-my-current-code/20898)

<div class="topic-metadata">

**Author:** [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Replies:** 1\
**Last updated:** [May 17, 2020, 3:28am UTC](https://discourse.processing.org/t/loading-from-txt-and-implementing-into-my-current-code/20898 "2020-05-17T03:28:45Z")

</div>

Hello all. As some of you may know, it is the month of Ramadan. As a challenge, I decided to make a Ramadan app, and a desktop version of the app. Currently its programmed with all the prayer times for the duration of Ra…

---

## [What does the following syntax do? =\_=\>](https://discourse.processing.org/t/what-does-the-following-syntax-do/20927)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 4\
**Last updated:** [May 17, 2020, 3:12am UTC](https://discourse.processing.org/t/what-does-the-following-syntax-do/20927 "2020-05-17T03:12:39Z")

</div>

Looking at code from open processing and I come across this piece of code. C=0 setup=\_=\>{ createCanvas(W=720,W,WEBGL) noStroke() T=createGraphics(W,W).noStroke() texture(T) } draw=\_=\>{ C+=1e-3 background(…

---

## [Buttons to switch sketches in the browser?](https://discourse.processing.org/t/buttons-to-switch-sketches-in-the-browser/20607)

<div class="topic-metadata">

**Author:** [@ballinoates](https://discourse.processing.org/u/ballinoates)\
**Replies:** 6\
**Last updated:** [May 17, 2020, 2:42am UTC](https://discourse.processing.org/t/buttons-to-switch-sketches-in-the-browser/20607 "2020-05-17T02:42:15Z")

</div>

Hi all- Im new to p5js but decent in processing 3, so my apologies up front. I would like to have lets say 4 sketches in p5js available for users to swap between. Lets say for simplicity a 400x400 canvas and below the c…

---

## [Image not recognized](https://discourse.processing.org/t/image-not-recognized/20912)

<div class="topic-metadata">

**Author:** [@virtuous1](https://discourse.processing.org/u/virtuous1)\
**Replies:** 6\
**Last updated:** [May 17, 2020, 1:48am UTC](https://discourse.processing.org/t/image-not-recognized/20912 "2020-05-17T01:48:58Z")

</div>

Hello I was to create a sketch in p5js in the atom editor. As part of it I tried to upload an image and I got this error: Refused to execute script from 'http://127.0.0.1:3000/Draw-Pixel/MyGame.png' because its MIME typ…

---

## [Resize background image](https://discourse.processing.org/t/resize-background-image/20883)

<div class="topic-metadata">

**Author:** [@juanjoc](https://discourse.processing.org/u/juanjoc)\
**Replies:** 1\
**Last updated:** [May 16, 2020, 11:21pm UTC](https://discourse.processing.org/t/resize-background-image/20883 "2020-05-16T23:21:48Z")

</div>

Hi everyone, I have created an image (1920 x 1080 px) for my background. When I open the the file in another laptop that has a lower window size, then I get problems running the file. I wonder if there is a way to resiz…

---

## [Problems with translate](https://discourse.processing.org/t/problems-with-translate/20952)

<div class="topic-metadata">

**Author:** [@valeria0616](https://discourse.processing.org/u/valeria0616)\
**Replies:** 4\
**Last updated:** [May 16, 2020, 11:14pm UTC](https://discourse.processing.org/t/problems-with-translate/20952 "2020-05-16T23:14:24Z")

</div>

Hi everyone, i’m really new to processing, and I have a project that consists on doing something in 3d, so I was trying to draw the Starry Night and add the stars and houses with spheres that rotate and boxes, but when I…

---

## [Shapes3d library terrain](https://discourse.processing.org/t/shapes3d-library-terrain/20929)

<div class="topic-metadata">

**Author:** [@Mark962](https://discourse.processing.org/u/Mark962)\
**Replies:** 4\
**Last updated:** [May 16, 2020, 10:55pm UTC](https://discourse.processing.org/t/shapes3d-library-terrain/20929 "2020-05-16T22:55:07Z")

</div>

Has anyone used the terrain class in V3.0 of shapes3d? It is substantially different from what was done in V2 and I haven’t seen any V3.0 examples. Mark

---

## [Game State Management with Key Events](https://discourse.processing.org/t/game-state-management-with-key-events/19492)

<div class="topic-metadata">

**Author:** [@graysonh](https://discourse.processing.org/u/graysonh)\
**Replies:** 2\
**Last updated:** [May 16, 2020, 9:20pm UTC](https://discourse.processing.org/t/game-state-management-with-key-events/19492 "2020-05-16T21:20:08Z")

</div>

Hello all, I’m working on a Roguelike dungeon crawler and I am learning new game development/coding techniques along the way. I am having trouble creating a finite state machine that switches between states with user in…

---

## [Problem with redraw](https://discourse.processing.org/t/problem-with-redraw/20922)

<div class="topic-metadata">

**Author:** [@bunal](https://discourse.processing.org/u/bunal)\
**Replies:** 9\
**Last updated:** [May 16, 2020, 9:12pm UTC](https://discourse.processing.org/t/problem-with-redraw/20922 "2020-05-16T21:12:13Z")

</div>

Hello, I’m trying to create a grid solver. I’m calling redraw after I visit some cell and I want that cell to be green one by one until the goal cell. But it just makes all of the visited cells green after the function t…

---

## [Matrix multiplication issue](https://discourse.processing.org/t/matrix-multiplication-issue/20622)

<div class="topic-metadata">

**Author:** [@some](https://discourse.processing.org/u/some)\
**Replies:** 3\
**Last updated:** [May 16, 2020, 7:39pm UTC](https://discourse.processing.org/t/matrix-multiplication-issue/20622 "2020-05-16T19:39:36Z")

</div>

Hi i tried to perform matrix multiplication for 2d rotation. I expected result that points will rotate in place, but instead i got flicker and movement outside screen. Here is the source code: float angle=10; PVector\[…

---

## [Helping assignments](https://discourse.processing.org/t/helping-assignments/20942)

<div class="topic-metadata">

**Author:** [@tengtengloves](https://discourse.processing.org/u/tengtengloves)\
**Replies:** 2\
**Last updated:** [May 16, 2020, 6:36pm UTC](https://discourse.processing.org/t/helping-assignments/20942 "2020-05-16T18:36:00Z")

</div>

Hi, I am trying to draw a planet that keeps spinning with a little interaction with the users. I couldn’t run the data in processing and couldn’t find the error below. The users click on the planet, it will interact wit…

---

## [Creating sectors in a rotating circular image](https://discourse.processing.org/t/creating-sectors-in-a-rotating-circular-image/20781)

<div class="topic-metadata">

**Author:** [@soraiaxb](https://discourse.processing.org/u/soraiaxb)\
**Replies:** 16\
**Last updated:** [May 16, 2020, 4:49pm UTC](https://discourse.processing.org/t/creating-sectors-in-a-rotating-circular-image/20781 "2020-05-16T16:49:14Z")

</div>

Hi, I have a circular image that rotates on mouseDragged and the image has various letters around the circle, when I drag the image to a certain position, one of the letters goes on top of a box indicating i want to writ…

---

## [noErase() is not working in WEBGL](https://discourse.processing.org/t/noerase-is-not-working-in-webgl/20920)

<div class="topic-metadata">

**Author:** [@vheun](https://discourse.processing.org/u/vheun)\
**Replies:** 4\
**Last updated:** [May 16, 2020, 1:50pm UTC](https://discourse.processing.org/t/noerase-is-not-working-in-webgl/20920 "2020-05-16T13:50:25Z")

</div>

The following example does not work the way it should. Once erase() is called it just erases everything. noErase() is not stopping the mode. https://p5js.org/reference/#/p5/erase

---

## [Issues with pixel resolutions using image() on a phone?](https://discourse.processing.org/t/issues-with-pixel-resolutions-using-image-on-a-phone/20887)

<div class="topic-metadata">

**Author:** [@seang42](https://discourse.processing.org/u/seang42)\
**Replies:** 1\
**Last updated:** [May 16, 2020, 12:46pm UTC](https://discourse.processing.org/t/issues-with-pixel-resolutions-using-image-on-a-phone/20887 "2020-05-16T12:46:33Z")

</div>

Hi, I’m attempting to use p5js to place a bunch of images in a grid like fashion on a canvas and have the user save the sketch to use as a background for their phone. I get the users phone resolution using displayWidth…

---

## [Position relative to shape](https://discourse.processing.org/t/position-relative-to-shape/20926)

<div class="topic-metadata">

**Author:** [@casperleerink](https://discourse.processing.org/u/casperleerink)\
**Replies:** 1\
**Last updated:** [May 16, 2020, 7:17am UTC](https://discourse.processing.org/t/position-relative-to-shape/20926 "2020-05-16T07:17:34Z")

</div>

Hi! Beginner question: is it possible to position elements relative to another shape. For example lets say I want to place 9 rectangles into another rectangle, it would be great if the size and position of the child rec…

---

## [Question regarding resetting animation for tank game](https://discourse.processing.org/t/question-regarding-resetting-animation-for-tank-game/20857)

<div class="topic-metadata">

**Author:** [@Pepbaggen](https://discourse.processing.org/u/Pepbaggen)\
**Replies:** 1\
**Last updated:** [May 16, 2020, 5:45am UTC](https://discourse.processing.org/t/question-regarding-resetting-animation-for-tank-game/20857 "2020-05-16T05:45:32Z")

</div>

Hi! I can fire my gun and hit the other tank, but when i shoot once, i cannot reset the code so i can shoot again… I need to stop the program and hit play again. Help? Thanks! import controlP5.\*; //library voor de power…

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=347)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=349)
