# Latest

**URL:** https://discourse.processing.org/latest.md?page=130

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

**Page:** 131

---

## [Program works on Processing editor but not webpage](https://discourse.processing.org/t/program-works-on-processing-editor-but-not-webpage/37412)

<div class="topic-metadata">

**Author:** [@zellwd](https://discourse.processing.org/u/zellwd)\
**Replies:** 1\
**Last updated:** [June 12, 2022, 3:49am UTC](https://discourse.processing.org/t/program-works-on-processing-editor-but-not-webpage/37412 "2022-06-12T03:49:33Z")

</div>

Hi there, I have this .pde program that works perfectly on the Processing software, but when I add it to a webpage it just appears as a black canvas. I already tried converting it to p5.js but it’s just way too complica…

---

## [Could someone tell me why this isn't working please?](https://discourse.processing.org/t/could-someone-tell-me-why-this-isnt-working-please/37468)

<div class="topic-metadata">

**Author:** [@locky.mcdonald](https://discourse.processing.org/u/locky.mcdonald)\
**Replies:** 2\
**Last updated:** [June 12, 2022, 5:37am UTC](https://discourse.processing.org/t/could-someone-tell-me-why-this-isnt-working-please/37468 "2022-06-12T05:37:07Z")

</div>

// I know its a bit all over the place, but any little help would be much appreciated. The background is supposed to fade from cream to black and back while a circle moves up and down the screen, behind the waves at the …

---

## [What value is missing in my JSON parse?](https://discourse.processing.org/t/what-value-is-missing-in-my-json-parse/37483)

<div class="topic-metadata">

**Author:** [@gis667](https://discourse.processing.org/u/gis667)\
**Replies:** 1\
**Last updated:** [June 12, 2022, 1:28am UTC](https://discourse.processing.org/t/what-value-is-missing-in-my-json-parse/37483 "2022-06-12T01:28:18Z")

</div>

I’m working on building two programs, one in Python and one in Processing, to communicate over socket TCP / data stream. 75% is working perfectly: Encoding JSON and sending over socket from Processing Receiving messag…

---

## [Variable scope, \<script\> tage with type="module" option? (firebase)](https://discourse.processing.org/t/variable-scope-script-tage-with-type-module-option-firebase/37477)

<div class="topic-metadata">

**Author:** [@schuelaw](https://discourse.processing.org/u/schuelaw)\
**Replies:** 2\
**Last updated:** [June 11, 2022, 6:46pm UTC](https://discourse.processing.org/t/variable-scope-script-tage-with-type-module-option-firebase/37477 "2022-06-11T18:46:32Z")

</div>

I’m trying to use a firebase database in p5js to read and write a high score table for a game. I followed Shiffman’s Firebase: Saving Data - Programming with Text video, but it’s now out of date. I’m trying to build an e…

---

## [Thoughts on my GUI library for using swing](https://discourse.processing.org/t/thoughts-on-my-gui-library-for-using-swing/37268)

<div class="topic-metadata">

**Author:** [@NumericPrime](https://discourse.processing.org/u/NumericPrime)\
**Replies:** 3\
**Last updated:** [June 11, 2022, 4:23pm UTC](https://discourse.processing.org/t/thoughts-on-my-gui-library-for-using-swing/37268 "2022-06-11T16:23:50Z")

</div>

My first library (Swing Helper) is available on the contributions manager now! It is supposed to help with using swing components in processing. Since this is the first time for me to publish a library I don’t know how …

---

## [Draw function, Processing, Python](https://discourse.processing.org/t/draw-function-processing-python/37451)

<div class="topic-metadata">

**Author:** [@Daniel11](https://discourse.processing.org/u/Daniel11)\
**Replies:** 8\
**Last updated:** [June 11, 2022, 1:01pm UTC](https://discourse.processing.org/t/draw-function-processing-python/37451 "2022-06-11T13:01:52Z")

</div>

Hi just wondering if the draw function is called when a while loop is running. I would like the draw function to be called after every iteration of the while loop and I would like to put a delay in every iteration. Howev…

---

## [What parts of the transform get reset in the draw loop? Does the matrix stack get reset?](https://discourse.processing.org/t/what-parts-of-the-transform-get-reset-in-the-draw-loop-does-the-matrix-stack-get-reset/37454)

<div class="topic-metadata">

**Author:** [@LordXerus](https://discourse.processing.org/u/LordXerus)\
**Replies:** 5\
**Last updated:** [June 10, 2022, 10:32pm UTC](https://discourse.processing.org/t/what-parts-of-the-transform-get-reset-in-the-draw-loop-does-the-matrix-stack-get-reset/37454 "2022-06-10T22:32:58Z")

</div>

Asking because this wasn’t clear in the reference. I thought that the entire matrix stack was discarded, but I ran into the cannot push more than 32 time error. Are the translate, rotate, and scale the only things that a…

---

## [Combined arrays position text](https://discourse.processing.org/t/combined-arrays-position-text/37452)

<div class="topic-metadata">

**Author:** [@mvb](https://discourse.processing.org/u/mvb)\
**Replies:** 2\
**Last updated:** [June 10, 2022, 4:24pm UTC](https://discourse.processing.org/t/combined-arrays-position-text/37452 "2022-06-10T16:24:07Z")

</div>

I have a loaded image of a country and an int array with the coordinates and population of each city, and another string array with the names of the cities. I want to combine them and have the names of the cities appea…

---

## [How does Processing Export work?](https://discourse.processing.org/t/how-does-processing-export-work/36816)

<div class="topic-metadata">

**Author:** [@LordXerus](https://discourse.processing.org/u/LordXerus)\
**Replies:** 6\
**Last updated:** [June 10, 2022, 3:17pm UTC](https://discourse.processing.org/t/how-does-processing-export-work/36816 "2022-06-10T15:17:29Z")

</div>

What exactly does the Processing’s Export Application do? I’m working on a project that uses Processing in IntelliJ, and I managed to get it building as a jar file. How do I turn it into a exe?

---

## [Using API with node.js and p5](https://discourse.processing.org/t/using-api-with-node-js-and-p5/37410)

<div class="topic-metadata">

**Author:** [@Omri](https://discourse.processing.org/u/Omri)\
**Replies:** 3\
**Last updated:** [June 10, 2022, 11:42am UTC](https://discourse.processing.org/t/using-api-with-node-js-and-p5/37410 "2022-06-10T11:42:36Z")

</div>

hey, there is a website I’d like to use his API in a P5 sketch I’m doing. The API looks like that: const { Configuration, OpenAIApi } = require("openai"); const configuration = new Configuration({ apiKey: process.en…

---

## [Fade between random colours for a background](https://discourse.processing.org/t/fade-between-random-colours-for-a-background/1433)

<div class="topic-metadata">

**Author:** [@Carpece](https://discourse.processing.org/u/Carpece)\
**Replies:** 13\
**Last updated:** [June 10, 2022, 11:15am UTC](https://discourse.processing.org/t/fade-between-random-colours-for-a-background/1433 "2022-06-10T11:15:49Z")

</div>

Hi, I’m trying to design a fading transition between random colours for the background (based on time). I thought it could be done with frameRate, but doesn’t respond. Any suggestion? Thanks in advance.

---

## [For anidados ilusion](https://discourse.processing.org/t/for-anidados-ilusion/37415)

<div class="topic-metadata">

**Author:** [@Jony16](https://discourse.processing.org/u/Jony16)\
**Replies:** 4\
**Last updated:** [June 10, 2022, 1:02am UTC](https://discourse.processing.org/t/for-anidados-ilusion/37415 "2022-06-10T01:02:08Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Como puedo iniciar esta ilusion optica?

---

## [Just For Fun: 2000iQ Game](https://discourse.processing.org/t/just-for-fun-2000iq-game/37435)

<div class="topic-metadata">

**Author:** [@Carlos138](https://discourse.processing.org/u/Carlos138)\
**Replies:** 0\
**Last updated:** [June 9, 2022, 8:59pm UTC](https://discourse.processing.org/t/just-for-fun-2000iq-game/37435 "2022-06-09T20:59:14Z")

</div>

Try this tricky game (without looking the code). Send me screenshot of your result and tell me how many attempts did you need to pass it. int x=12; int y=12; int diam=20; int lives=10; void setup() { size(300,300); …

---

## [Please, help me, really easy question](https://discourse.processing.org/t/please-help-me-really-easy-question/37433)

<div class="topic-metadata">

**Author:** [@Carlos138](https://discourse.processing.org/u/Carlos138)\
**Replies:** 2\
**Last updated:** [June 9, 2022, 8:49pm UTC](https://discourse.processing.org/t/please-help-me-really-easy-question/37433 "2022-06-09T20:49:19Z")

</div>

With this easy code: void setup () { size(500, 500); background(255, 255, 255); } void draw() { if(keyPressed){ if(key=='a'){ rect(20, 20, 50, 50); } } } Why the square didn’t disappear when I stop clic…

---

## [Putting a delay during a display. Processing, Python](https://discourse.processing.org/t/putting-a-delay-during-a-display-processing-python/37428)

<div class="topic-metadata">

**Author:** [@Daniel11](https://discourse.processing.org/u/Daniel11)\
**Replies:** 1\
**Last updated:** [June 9, 2022, 6:31pm UTC](https://discourse.processing.org/t/putting-a-delay-during-a-display-processing-python/37428 "2022-06-09T18:31:14Z")

</div>

Hi I am coding a Rubik’s cube simulator and I have currently coded it so if you press a button for example ‘f’ it will turn a piece. And I have coded it so that you can see the faces turning, however it happens so quickl…

---

## [Application in the background](https://discourse.processing.org/t/application-in-the-background/37402)

<div class="topic-metadata">

**Author:** [@NomMi](https://discourse.processing.org/u/NomMi)\
**Replies:** 2\
**Last updated:** [June 9, 2022, 5:17pm UTC](https://discourse.processing.org/t/application-in-the-background/37402 "2022-06-09T17:17:27Z")

</div>

I have a code for communicating between a phone and an Arduino to make an alarm for a scooter. My problem is that I don’t know how to make the program run in the background (when the phone is in sleep mode or the app is …

---

## [Translate indefinitely in a for loop](https://discourse.processing.org/t/translate-indefinitely-in-a-for-loop/37373)

<div class="topic-metadata">

**Author:** [@yves](https://discourse.processing.org/u/yves)\
**Replies:** 10\
**Last updated:** [June 9, 2022, 3:30pm UTC](https://discourse.processing.org/t/translate-indefinitely-in-a-for-loop/37373 "2022-06-09T15:30:52Z")

</div>

Hi everyone, I try to translate indefinitely a loop of rectangles, but it doesn’t work properly my code : pushMatrix() ; pushStyle(); fill(255); for (float i=0; i \< width; i = i + 100) { for (int x = 0…

---

## [Disable scaling](https://discourse.processing.org/t/disable-scaling/37417)

<div class="topic-metadata">

**Author:** [@luckorloss](https://discourse.processing.org/u/luckorloss)\
**Replies:** 2\
**Last updated:** [June 9, 2022, 10:47am UTC](https://discourse.processing.org/t/disable-scaling/37417 "2022-06-09T10:47:59Z")

</div>

I use 200% scaling on my desktop to be able to read, but it causes the output window to be twice as large. Everything looks super aliased too. Is there a way to disable scaling on the display window?

---

## [Sketch doesn't scale right with size() function](https://discourse.processing.org/t/sketch-doesnt-scale-right-with-size-function/37396)

<div class="topic-metadata">

**Author:** [@karo](https://discourse.processing.org/u/karo)\
**Replies:** 8\
**Last updated:** [June 9, 2022, 10:46am UTC](https://discourse.processing.org/t/sketch-doesnt-scale-right-with-size-function/37396 "2022-06-09T10:46:50Z")

</div>

Hey there, lately i got an new surface 8pro, and i directly wanted to start coding on it as well as on my desktop work station. But there is a problem, because the sketch on the new laptop does not run with the correc…

---

## [Create 💎 GUI programs with p5.js](https://discourse.processing.org/t/create-gui-programs-with-p5-js/27120)

<div class="topic-metadata">

**Author:** [@codeguppy](https://discourse.processing.org/u/codeguppy)\
**Replies:** 4\
**Last updated:** [June 9, 2022, 3:03am UTC](https://discourse.processing.org/t/create-gui-programs-with-p5-js/27120 "2022-06-09T03:03:12Z")

</div>

I want to show you a tiny lib that allow you to create GUI programs using p5.js! Everything runs on CANVAS. You can use this library for: running p5.js sketches in windows implement window based games for learning how…

---

## [How to manually set the camera white balance using Ketai?](https://discourse.processing.org/t/how-to-manually-set-the-camera-white-balance-using-ketai/37366)

<div class="topic-metadata">

**Author:** [@outslider](https://discourse.processing.org/u/outslider)\
**Replies:** 7\
**Last updated:** [June 9, 2022, 2:51am UTC](https://discourse.processing.org/t/how-to-manually-set-the-camera-white-balance-using-ketai/37366 "2022-06-09T02:51:40Z")

</div>

Is there any way to manually set the white balance using Ketai? I know it has the manualSettings() method but it does virtually nothing for setting things manually, it just disables automatic setting changes by the syste…

---

## [Using p5.js to generate SVG markup from a module](https://discourse.processing.org/t/using-p5-js-to-generate-svg-markup-from-a-module/37360)

<div class="topic-metadata">

**Author:** [@blundin](https://discourse.processing.org/u/blundin)\
**Replies:** 1\
**Last updated:** [June 8, 2022, 6:50pm UTC](https://discourse.processing.org/t/using-p5-js-to-generate-svg-markup-from-a-module/37360 "2022-06-08T18:50:53Z")

</div>

Hello all! I am an experienced web developer who is brand new to p5.js and generative art in general. I’ve spent several hours searching around for an answer to this question, and I suspect I am just thinking about this …

---

## [AR: GetPose of Camera (Pose class)](https://discourse.processing.org/t/ar-getpose-of-camera-pose-class/37337)

<div class="topic-metadata">

**Author:** [@jensensound](https://discourse.processing.org/u/jensensound)\
**Replies:** 6\
**Last updated:** [June 8, 2022, 3:16pm UTC](https://discourse.processing.org/t/ar-getpose-of-camera-pose-class/37337 "2022-06-08T15:16:51Z")

</div>

Hi there, i am working with Processing for Android for a AR App and I am trying to work with the camera position (e.g. to rotate things according to camera rotation etc.) I used the commented out lines in the “Cubes” E…

---

## [createGraphics referencing existing canvas context](https://discourse.processing.org/t/creategraphics-referencing-existing-canvas-context/21067)

<div class="topic-metadata">

**Author:** [@vheun](https://discourse.processing.org/u/vheun)\
**Replies:** 4\
**Last updated:** [June 8, 2022, 2:24pm UTC](https://discourse.processing.org/t/creategraphics-referencing-existing-canvas-context/21067 "2022-06-08T14:24:33Z")

</div>

Is there an easy way to bind an existing html canvas to the Graphics object you create with createGraphics()? Example: I have an existing painted 2D canvas that I would like to draw via image() into my existing WEBGL ca…

---

## [Virtual CC Fest on June 18, Saturday](https://discourse.processing.org/t/virtual-cc-fest-on-june-18-saturday/37405)

<div class="topic-metadata">

**Author:** [@saberkhan](https://discourse.processing.org/u/saberkhan)\
**Replies:** 0\
**Last updated:** [June 8, 2022, 1:34pm UTC](https://discourse.processing.org/t/virtual-cc-fest-on-june-18-saturday/37405 "2022-06-08T13:34:30Z")

</div>

Hi folks, We have another virtual CC Fest coming up on June 18, Saturday, at 12 pm ET (-4 UTC). We have a couple of great keynotes, and a number of workshops from educators across the globe. Hope you are able to join. D…

---

## [Maximum number in noiseSeed() p5js](https://discourse.processing.org/t/maximum-number-in-noiseseed-p5js/37399)

<div class="topic-metadata">

**Author:** [@Nik](https://discourse.processing.org/u/Nik)\
**Replies:** 2\
**Last updated:** [June 8, 2022, 11:22am UTC](https://discourse.processing.org/t/maximum-number-in-noiseseed-p5js/37399 "2022-06-08T11:22:39Z")

</div>

Hello! What is maximum number that can be used in noiseSeed() in P5JS? Just like for randomSeed() integer range 0 to 4294967295 or not? Thanks!

---

## [Simple Iterative List](https://discourse.processing.org/t/simple-iterative-list/37398)

<div class="topic-metadata">

**Author:** [@panko](https://discourse.processing.org/u/panko)\
**Replies:** 1\
**Last updated:** [June 8, 2022, 7:53am UTC](https://discourse.processing.org/t/simple-iterative-list/37398 "2022-06-08T07:53:41Z")

</div>

Hi there - I am doing something a few times in a row. I feel like there must be a better way to write this. Can anyone help me? Thank you! PShape square1, square2, square3; void setup() { size(300, 300); // Crea…

---

## [3D graphics not working python](https://discourse.processing.org/t/3d-graphics-not-working-python/37400)

<div class="topic-metadata">

**Author:** [@Daniel11](https://discourse.processing.org/u/Daniel11)\
**Replies:** 6\
**Last updated:** [June 8, 2022, 10:53am UTC](https://discourse.processing.org/t/3d-graphics-not-working-python/37400 "2022-06-08T10:53:06Z")

</div>

Hi I’m creating a Rubik’s cube simulator and I’m really confused because I have programmed it to create a 3 by 3 and it is for some reason creating a 4 by 4. I have tried making a 2 by 2 and it makes a 3 by 3 but only i…

---

## [Mouse click to add rows and columns to grid](https://discourse.processing.org/t/mouse-click-to-add-rows-and-columns-to-grid/37392)

<div class="topic-metadata">

**Author:** [@hues\_storm](https://discourse.processing.org/u/hues_storm)\
**Replies:** 2\
**Last updated:** [June 7, 2022, 9:09pm UTC](https://discourse.processing.org/t/mouse-click-to-add-rows-and-columns-to-grid/37392 "2022-06-07T21:09:49Z")

</div>

Hi, hope someone can help - I am trying to make a grid that when you mouse is clicked it adds another column and row - like an ever expanding grid - I have the base set up for a grid and i know i need a void mouseFuncti…

---

## [Need help w/ keyboard that take multiple inputs at once](https://discourse.processing.org/t/need-help-w-keyboard-that-take-multiple-inputs-at-once/37323)

<div class="topic-metadata">

**Author:** [@Mook](https://discourse.processing.org/u/Mook)\
**Replies:** 17\
**Last updated:** [June 7, 2022, 9:08pm UTC](https://discourse.processing.org/t/need-help-w-keyboard-that-take-multiple-inputs-at-once/37323 "2022-06-07T21:08:32Z")

</div>

I’m trying to make a program that can take for example, “LG” (pressed at the same time) as an input and output a unique letter. So far I’ve done the usual if (key == 108) { lDown = true; } if (key == 103) { gDown …

[Previous page](https://discourse.processing.org/latest.md?page=129)

[Next page](https://discourse.processing.org/latest.md?page=131)
