# Latest

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

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

**Page:** 169

---

## [Eval() not working](https://discourse.processing.org/t/eval-not-working/34248)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 1\
**Last updated:** [December 22, 2021, 3:46pm UTC](https://discourse.processing.org/t/eval-not-working/34248 "2021-12-22T15:46:51Z")

</div>

var x; var y; var z; var alpha; function setup() { createCanvas(600,600); x = "if(millis() % 1000 = 0){ eval(alpha);}"; y = "hello world"; z = "text(y, width/2, height/2);"; alpha = "background(rand…

---

## [How to change the icon of your application using PJOGL.setIcon()?](https://discourse.processing.org/t/how-to-change-the-icon-of-your-application-using-pjogl-seticon/34236)

<div class="topic-metadata">

**Author:** [@Dwight](https://discourse.processing.org/u/Dwight)\
**Replies:** 1\
**Last updated:** [December 22, 2021, 3:01pm UTC](https://discourse.processing.org/t/how-to-change-the-icon-of-your-application-using-pjogl-seticon/34236 "2021-12-22T15:01:50Z")

</div>

Hello there. I’m writing an application in processing, and I want to change application’s default icon on the taskbar. I know how this can be done by using surface.setIcon(PImage). But this doesn’t work when I’m using P…

---

## [\[Android\] When the application is reconnected, 'setup' operates again](https://discourse.processing.org/t/android-when-the-application-is-reconnected-setup-operates-again/34215)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 2\
**Last updated:** [December 22, 2021, 1:57pm UTC](https://discourse.processing.org/t/android-when-the-application-is-reconnected-setup-operates-again/34215 "2021-12-22T13:57:15Z")

</div>

When the application is reconnected, ‘setup’ operates again. How to operate ‘SETUP’ only once? void setup(){ s1 = new MediaPlayer(); s2 = new MediaPlayer(); af1 = context.getAssets().openFd("1.mp3"); …

---

## [Multiple transformations](https://discourse.processing.org/t/multiple-transformations/34243)

<div class="topic-metadata">

**Author:** [@Chihiro](https://discourse.processing.org/u/Chihiro)\
**Replies:** 3\
**Last updated:** [December 22, 2021, 12:23pm UTC](https://discourse.processing.org/t/multiple-transformations/34243 "2021-12-22T12:23:29Z")

</div>

Hi! I’m pretty new to coding, and am having an issue with the transformations in my code. My program is quite long so I’ve just used a rectangle as an example here. I’m trying to make the object spiral in a small circle …

---

## [Processing 4 crashes when trying to open file](https://discourse.processing.org/t/processing-4-crashes-when-trying-to-open-file/34239)

<div class="topic-metadata">

**Author:** [@MythicalSora](https://discourse.processing.org/u/MythicalSora)\
**Replies:** 0\
**Last updated:** [December 22, 2021, 8:57am UTC](https://discourse.processing.org/t/processing-4-crashes-when-trying-to-open-file/34239 "2021-12-22T08:57:40Z")

</div>

Hello folks! I’ve encountered a strange problem while trying to setup Processing on my machine. I managed to install and launch it, but whenever I try to open a file, it freezes for about 3 seconds and quits. System spe…

---

## [Basic white triangle grid homework pls help](https://discourse.processing.org/t/basic-white-triangle-grid-homework-pls-help/34178)

<div class="topic-metadata">

**Author:** [@myhatzulu](https://discourse.processing.org/u/myhatzulu)\
**Replies:** 3\
**Last updated:** [December 22, 2021, 5:57am UTC](https://discourse.processing.org/t/basic-white-triangle-grid-homework-pls-help/34178 "2021-12-22T05:57:30Z")

</div>

could anyone sort me out with this I’m trying to make a grid of upside down white triangles exactly like \[Album\] imgur.com …

---

## [Gaming Questions (levels and states/screens)](https://discourse.processing.org/t/gaming-questions-levels-and-states-screens/34201)

<div class="topic-metadata">

**Author:** [@lily186](https://discourse.processing.org/u/lily186)\
**Replies:** 5\
**Last updated:** [December 21, 2021, 8:27pm UTC](https://discourse.processing.org/t/gaming-questions-levels-and-states-screens/34201 "2021-12-21T20:27:50Z")

</div>

Hi I was wondering how someone can create levels for a game in processing?? ,Thank you!

---

## [A question regarding depth sorting in raytracers](https://discourse.processing.org/t/a-question-regarding-depth-sorting-in-raytracers/34231)

<div class="topic-metadata">

**Author:** [@heawn](https://discourse.processing.org/u/heawn)\
**Replies:** 0\
**Last updated:** [December 21, 2021, 5:27pm UTC](https://discourse.processing.org/t/a-question-regarding-depth-sorting-in-raytracers/34231 "2021-12-21T17:27:55Z")

</div>

How do properly depth sort in raytracers So this is more or less a debugging kind of problem, which im unable to solve. My problem is that the rays for some reason dont return the color of the closest intersection, alld…

---

## [Can I use Processing to search a site for very specific results?](https://discourse.processing.org/t/can-i-use-processing-to-search-a-site-for-very-specific-results/34052)

<div class="topic-metadata">

**Author:** [@Teljemo](https://discourse.processing.org/u/Teljemo)\
**Replies:** 10\
**Last updated:** [December 20, 2021, 11:52pm UTC](https://discourse.processing.org/t/can-i-use-processing-to-search-a-site-for-very-specific-results/34052 "2021-12-20T23:52:08Z")

</div>

Hi, I collect old books about industry, technology, construction, engineering and so on. Mostly books in my native language, Swedish. We have a great site where people sell and buy books but there is no way to search …

---

## [How to check if a key exists within a JSON file](https://discourse.processing.org/t/how-to-check-if-a-key-exists-within-a-json-file/34214)

<div class="topic-metadata">

**Author:** [@ybr](https://discourse.processing.org/u/ybr)\
**Replies:** 1\
**Last updated:** [December 20, 2021, 11:20pm UTC](https://discourse.processing.org/t/how-to-check-if-a-key-exists-within-a-json-file/34214 "2021-12-20T23:20:51Z")

</div>

Hi, I’m importing a JSON file using an API. For most elements within the array the key “rating” exists, for some it doesn’t. At that point my code stops with a null pointer exception. I’m trying to do a check whether a k…

---

## [Little stuck on a concept](https://discourse.processing.org/t/little-stuck-on-a-concept/34173)

<div class="topic-metadata">

**Author:** [@Jamii](https://discourse.processing.org/u/Jamii)\
**Replies:** 6\
**Last updated:** [December 20, 2021, 6:28pm UTC](https://discourse.processing.org/t/little-stuck-on-a-concept/34173 "2021-12-20T18:28:14Z")

</div>

I’m really new to processing and I have an idea I want to execute but I’m not too sure where to start in general. I haven’t started just I’m just wondering if anyone has tips on how to do it. I want to create a maze-lik…

---

## [Store Tree data and Show on TreeView Control](https://discourse.processing.org/t/store-tree-data-and-show-on-treeview-control/34210)

<div class="topic-metadata">

**Author:** [@RichardDL](https://discourse.processing.org/u/RichardDL)\
**Replies:** 0\
**Last updated:** [December 20, 2021, 10:01pm UTC](https://discourse.processing.org/t/store-tree-data-and-show-on-treeview-control/34210 "2021-12-20T22:01:34Z")

</div>

Hi, Now and then I have data which would be ideal to store and show with a TreeView control. Searching the forum finds almost nothing (surprising). A few references to “g4p.tool.gui.treeview” but GP4, ControlP5, Guido…

---

## [Processing Eclipse Java P3D Problem](https://discourse.processing.org/t/processing-eclipse-java-p3d-problem/34076)

<div class="topic-metadata">

**Author:** [@Herr\_Nerdstrom](https://discourse.processing.org/u/Herr_Nerdstrom)\
**Replies:** 11\
**Last updated:** [December 20, 2021, 4:34pm UTC](https://discourse.processing.org/t/processing-eclipse-java-p3d-problem/34076 "2021-12-20T16:34:04Z")

</div>

I’m trying to learn how to use the Processing library with Eclipse to solve a puzzle (Rubik’s Cube) my son challenged me with. The main problem seems to be with using P3D in Eclipse. Here is the test code: import proces…

---

## [Calling Method Properties Issue](https://discourse.processing.org/t/calling-method-properties-issue/34138)

<div class="topic-metadata">

**Author:** [@anoniem](https://discourse.processing.org/u/anoniem)\
**Replies:** 2\
**Last updated:** [December 20, 2021, 2:43pm UTC](https://discourse.processing.org/t/calling-method-properties-issue/34138 "2021-12-20T14:43:43Z")

</div>

Hi, I’m having problem with my OOP homework. So I’m basically working on a sheep that moves around, and is draggable. When those Sheeps intersect a new one should be made. I wrote down the code for this on line 101 an…

---

## [Paint an image with transparency on a quad via a fragment shader](https://discourse.processing.org/t/paint-an-image-with-transparency-on-a-quad-via-a-fragment-shader/34189)

<div class="topic-metadata">

**Author:** [@stewart](https://discourse.processing.org/u/stewart)\
**Replies:** 5\
**Last updated:** [December 20, 2021, 2:21am UTC](https://discourse.processing.org/t/paint-an-image-with-transparency-on-a-quad-via-a-fragment-shader/34189 "2021-12-20T02:21:12Z")

</div>

Hi I would appreciate help implementing this feature for an art project I’m working on. Functionally it would be similar to a p5.Image filter() but using my own fragment shader instead of the built in filters. So what I…

---

## [Where is the \`whileLoadingCallback\` for images?](https://discourse.processing.org/t/where-is-the-whileloadingcallback-for-images/34200)

<div class="topic-metadata">

**Author:** [@Errorbot1122](https://discourse.processing.org/u/Errorbot1122)\
**Replies:** 1\
**Last updated:** [December 20, 2021, 12:00am UTC](https://discourse.processing.org/t/where-is-the-whileloadingcallback-for-images/34200 "2021-12-20T00:00:04Z")

</div>

Where is the whileLoadingCallback for images? I know p5 has one for sound, but not images for some reason… Well, you know what, if you’re going to add on for images, what about adding them for tables or XML Files, etc.

---

## [Processing mousePressed twice](https://discourse.processing.org/t/processing-mousepressed-twice/34194)

<div class="topic-metadata">

**Author:** [@Kristina](https://discourse.processing.org/u/Kristina)\
**Replies:** 4\
**Last updated:** [December 19, 2021, 3:25pm UTC](https://discourse.processing.org/t/processing-mousepressed-twice/34194 "2021-12-19T15:25:28Z")

</div>

Hi, I wanted to make a code where an Object appears when you press the mouse, which works out fine. But if you press again it should disappear again. Also I have two Objects, and it should always be one that appears. Whi…

---

## [Is there any way to upload a p5.js game to the galaxy store?](https://discourse.processing.org/t/is-there-any-way-to-upload-a-p5-js-game-to-the-galaxy-store/33799)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 1\
**Last updated:** [December 19, 2021, 3:13am UTC](https://discourse.processing.org/t/is-there-any-way-to-upload-a-p5-js-game-to-the-galaxy-store/33799 "2021-12-19T03:13:25Z")

</div>

I tried to figure out if you can upload a p5.js game to the galaxy store but I’m struggling to do it. I’m especially having trouble with this I have no idea what I have to but in here. well it’s probably the binary …

---

## [\[p5.js\] Web page source code security issues / How can I do 'p5 Encryption'?](https://discourse.processing.org/t/p5-js-web-page-source-code-security-issues-how-can-i-do-p5-encryption/34094)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 14\
**Last updated:** [December 19, 2021, 1:58am UTC](https://discourse.processing.org/t/p5-js-web-page-source-code-security-issues-how-can-i-do-p5-encryption/34094 "2021-12-19T01:58:27Z")

</div>

\[p5.js\] Web page source code security issues Hello. You can easily create web pages through ‘p5.js’. good. However, I am curious about one thing. Can’t you hide the code? If you press the ‘F12’ button after implementi…

---

## [Smily Helper Fuse](https://discourse.processing.org/t/smily-helper-fuse/34188)

<div class="topic-metadata">

**Author:** [@Skys](https://discourse.processing.org/u/Skys)\
**Replies:** 0\
**Last updated:** [December 18, 2021, 10:49pm UTC](https://discourse.processing.org/t/smily-helper-fuse/34188 "2021-12-18T22:49:31Z")

</div>

Hi there! i got a new version of Smily helper, Called Fuse. it still have anoying bugs. it got a funktion make your pick to a black white pick only 0 or 255 pixel color. it will be very simpel with my txt to png conv…

---

## [Starting out with Shaders](https://discourse.processing.org/t/starting-out-with-shaders/34164)

<div class="topic-metadata">

**Author:** [@bcabc](https://discourse.processing.org/u/bcabc)\
**Replies:** 3\
**Last updated:** [December 18, 2021, 10:21pm UTC](https://discourse.processing.org/t/starting-out-with-shaders/34164 "2021-12-18T22:21:58Z")

</div>

Hi all - I’ve looked through the forum and documentation for information about using Shaders in Processing - but the results have been pretty mixed. Examples from the Book of Shaders and Shadertoy don’t seem to play ve…

---

## [\[p5.js\] How to use 'CryptoJS'](https://discourse.processing.org/t/p5-js-how-to-use-cryptojs/34185)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 0\
**Last updated:** [December 18, 2021, 2:51pm UTC](https://discourse.processing.org/t/p5-js-how-to-use-cryptojs/34185 "2021-12-18T14:51:56Z")

</div>

How to use ‘CryptoJS’ Add library \<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/aes.js"\>\</script\> Add code var encrypted = CryptoJS.AES.encrypt(myString, myPassword); var decrypted…

---

## [Just a bit lost](https://discourse.processing.org/t/just-a-bit-lost/34179)

<div class="topic-metadata">

**Author:** [@Jamii](https://discourse.processing.org/u/Jamii)\
**Replies:** 4\
**Last updated:** [December 18, 2021, 2:03pm UTC](https://discourse.processing.org/t/just-a-bit-lost/34179 "2021-12-18T14:03:57Z")

</div>

I’ve been working on this for god knows how long, but I’m just not that sure how to make this better. Thoughts or comments? I couldn’t figure out how to make the lines not touch each other, so it constantly looks so mess…

---

## [Bug: After typing in the code window, mouse cursor no longer aligns with typed text](https://discourse.processing.org/t/bug-after-typing-in-the-code-window-mouse-cursor-no-longer-aligns-with-typed-text/34177)

<div class="topic-metadata">

**Author:** [@ltolenti](https://discourse.processing.org/u/ltolenti)\
**Replies:** 2\
**Last updated:** [December 18, 2021, 9:03am UTC](https://discourse.processing.org/t/bug-after-typing-in-the-code-window-mouse-cursor-no-longer-aligns-with-typed-text/34177 "2021-12-18T09:03:40Z")

</div>

When I type into the coding window, after typing 12 or more characters, the spacing between the (flashing) typing cursor and the typed text gets so wide that I can no longer correctly put my cursor between letters I want…

---

## [Startup keeps running](https://discourse.processing.org/t/startup-keeps-running/34088)

<div class="topic-metadata">

**Author:** [@hacketet](https://discourse.processing.org/u/hacketet)\
**Replies:** 2\
**Last updated:** [December 18, 2021, 3:35am UTC](https://discourse.processing.org/t/startup-keeps-running/34088 "2021-12-18T03:35:42Z")

</div>

This is some code from a bigger project. This is startup code that is supposed to run only once. Howeve, it keeps resetting stuff. So I added the two lines that have the global variable ‘run’ . Now it performs as it…

---

## [Drawing an faulty advent calendar](https://discourse.processing.org/t/drawing-an-faulty-advent-calendar/34171)

<div class="topic-metadata">

**Author:** [@thorbensson](https://discourse.processing.org/u/thorbensson)\
**Replies:** 4\
**Last updated:** [December 18, 2021, 12:16am UTC](https://discourse.processing.org/t/drawing-an-faulty-advent-calendar/34171 "2021-12-18T00:16:23Z")

</div>

Hey guys, I hope you are having a nice pre-christmas time… For my university homework I’ll have to draw an advent calendar which (in the first step) has to be drawn by a loop and a draw\_advent\_calendar\_door(float x, flo…

---

## [How to decrease GPU load when displaying an image in the window?](https://discourse.processing.org/t/how-to-decrease-gpu-load-when-displaying-an-image-in-the-window/34152)

<div class="topic-metadata">

**Author:** [@BenjaminColligan](https://discourse.processing.org/u/BenjaminColligan)\
**Replies:** 4\
**Last updated:** [December 17, 2021, 4:41pm UTC](https://discourse.processing.org/t/how-to-decrease-gpu-load-when-displaying-an-image-in-the-window/34152 "2021-12-17T16:41:42Z")

</div>

Hi there, My first question so please dismiss any silly mistakes with my wording. I am developing a knock off of Photoshop, suitably named ‘Fotoshop’, as a part of my 2nd year university graphics coursework. I am doing …

---

## [A general question from a code novice](https://discourse.processing.org/t/a-general-question-from-a-code-novice/34163)

<div class="topic-metadata">

**Author:** [@AudioBabble](https://discourse.processing.org/u/AudioBabble)\
**Replies:** 7\
**Last updated:** [December 17, 2021, 4:16pm UTC](https://discourse.processing.org/t/a-general-question-from-a-code-novice/34163 "2021-12-17T16:16:04Z")

</div>

hey all, this is not specifically a processing question, but I have found folks here to be very helpful in the past so would like to see if anyone can help me out… I’m wondering where would be a good place to ask total …

---

## [Saving canvas to a file](https://discourse.processing.org/t/saving-canvas-to-a-file/11027)

<div class="topic-metadata">

**Author:** [@astraszab](https://discourse.processing.org/u/astraszab)\
**Replies:** 4\
**Last updated:** [December 17, 2021, 1:36pm UTC](https://discourse.processing.org/t/saving-canvas-to-a-file/11027 "2021-12-17T13:36:03Z")

</div>

I need to save canvas to a file inside a server directory to process it later in another program. When I use saveCanvas() browser creates a prompt window. How can I save a file to a specified directory without a prompt w…

---

## [How do you create an instance of an object and reference it eg. to rotate an object at a later time?](https://discourse.processing.org/t/how-do-you-create-an-instance-of-an-object-and-reference-it-eg-to-rotate-an-object-at-a-later-time/34067)

<div class="topic-metadata">

**Author:** [@jmg007](https://discourse.processing.org/u/jmg007)\
**Replies:** 5\
**Last updated:** [December 17, 2021, 12:27pm UTC](https://discourse.processing.org/t/how-do-you-create-an-instance-of-an-object-and-reference-it-eg-to-rotate-an-object-at-a-later-time/34067 "2021-12-17T12:27:11Z")

</div>

Hi, I’ve loaded in a 3d model and I looked at the p5 docs for rotating the model and one of the functions is: function draw() { background(200); rotateX(frameCount \* 0.01); rotateY(frameCount \* 0.01); model(oct…

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

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