# Latest

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

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

**Page:** 166

---

## [Method of custom type not returning?](https://discourse.processing.org/t/method-of-custom-type-not-returning/34495)

<div class="topic-metadata">

**Author:** [@millibyte](https://discourse.processing.org/u/millibyte)\
**Replies:** 4\
**Last updated:** [January 7, 2022, 7:25pm UTC](https://discourse.processing.org/t/method-of-custom-type-not-returning/34495 "2022-01-07T19:25:48Z")

</div>

I’m creating a simple football video game with object oriented programming. One problem I’m having is a method with a return type of a custom object is not returning with said object. More specifically: I wrote the Play…

---

## [Seperating a function from mousePressed function?](https://discourse.processing.org/t/seperating-a-function-from-mousepressed-function/34503)

<div class="topic-metadata">

**Author:** [@aejstr20](https://discourse.processing.org/u/aejstr20)\
**Replies:** 0\
**Last updated:** [January 7, 2022, 2:36pm UTC](https://discourse.processing.org/t/seperating-a-function-from-mousepressed-function/34503 "2022-01-07T14:36:21Z")

</div>

Hi! So, I’m at uni trying to figure out this code and how to get it to work how I want it. The project consists of an Arduino, which measures voltage going through a plant and also has a potentiometer. These inputs will…

---

## [Get mouseX and mouseY position with current transformation](https://discourse.processing.org/t/get-mousex-and-mousey-position-with-current-transformation/34489)

<div class="topic-metadata">

**Author:** [@clankill3r](https://discourse.processing.org/u/clankill3r)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 11:49am UTC](https://discourse.processing.org/t/get-mousex-and-mousey-position-with-current-transformation/34489 "2022-01-07T11:49:01Z")

</div>

How can I get the mouse position (and where z hits the camera plane), inside the transformation. So I need this before the popMatrix(). void setup() { size(600, 600, P3D); } public void draw() { background(0); …

---

## [Jumping mechanic](https://discourse.processing.org/t/jumping-mechanic/34499)

<div class="topic-metadata">

**Author:** [@parichko](https://discourse.processing.org/u/parichko)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 10:27am UTC](https://discourse.processing.org/t/jumping-mechanic/34499 "2022-01-07T10:27:07Z")

</div>

What is the best way to add a jumping mechanic to a shape in p5js

---

## [How to process Java runs on the web](https://discourse.processing.org/t/how-to-process-java-runs-on-the-web/34485)

<div class="topic-metadata">

**Author:** [@peter100u](https://discourse.processing.org/u/peter100u)\
**Replies:** 6\
**Last updated:** [January 7, 2022, 5:40am UTC](https://discourse.processing.org/t/how-to-process-java-runs-on-the-web/34485 "2022-01-07T05:40:46Z")

</div>

As we all know, processing JS project has stopped maintenance, so what is the latest method? I think there is still processing in openprocessing Java projects can run. Why, except for processing JS, is there any other pl…

---

## [Adjusting cursor in Processing Editor for Dark Mode](https://discourse.processing.org/t/adjusting-cursor-in-processing-editor-for-dark-mode/34475)

<div class="topic-metadata">

**Author:** [@CaseyJ](https://discourse.processing.org/u/CaseyJ)\
**Replies:** 2\
**Last updated:** [January 7, 2022, 5:28am UTC](https://discourse.processing.org/t/adjusting-cursor-in-processing-editor-for-dark-mode/34475 "2022-01-07T05:28:30Z")

</div>

Loving life with the Dark Mode as enabled by changing some of the fields in the “theme.txt” file within the Processing app. Found this forum post to be very handy in achieving the look. However, I cannot see the cursor …

---

## [How to use size() function on external canvas](https://discourse.processing.org/t/how-to-use-size-function-on-external-canvas/34493)

<div class="topic-metadata">

**Author:** [@Errorbot1122](https://discourse.processing.org/u/Errorbot1122)\
**Replies:** 1\
**Last updated:** [January 7, 2022, 2:51am UTC](https://discourse.processing.org/t/how-to-use-size-function-on-external-canvas/34493 "2022-01-07T02:51:22Z")

</div>

I currently want to use the size() method on an external canvas, but I’m worried the size function will change the CSS W/H instead of the W/H attribute itself. almost like this: webglCanvas = select('#mainViewport'); w…

---

## [Seek\_closest\_sync](https://discourse.processing.org/t/seek-closest-sync/27593)

<div class="topic-metadata">

**Author:** [@paturn](https://discourse.processing.org/u/paturn)\
**Replies:** 0\
**Last updated:** [February 4, 2021, 9:54pm UTC](https://discourse.processing.org/t/seek-closest-sync/27593 "2021-02-04T21:54:25Z")

</div>

I am using video to display on screen. The code requires capability to start at any location. I have used seekTo but the video restarts some distance from the required position, possibly the nearest key frame. Elsewhere…

---

## [Processing to Arduino serial](https://discourse.processing.org/t/processing-to-arduino-serial/34382)

<div class="topic-metadata">

**Author:** [@danjy](https://discourse.processing.org/u/danjy)\
**Replies:** 2\
**Last updated:** [January 6, 2022, 10:21pm UTC](https://discourse.processing.org/t/processing-to-arduino-serial/34382 "2022-01-06T22:21:26Z")

</div>

I am trying to send arduino serial commands. I have set up port4 after following some documentation in the sample files. the below code is not working as expected, textfield11 has a float value inside and the arduino c…

---

## [Three parallel beziers](https://discourse.processing.org/t/three-parallel-beziers/34471)

<div class="topic-metadata">

**Author:** [@jaspervb](https://discourse.processing.org/u/jaspervb)\
**Replies:** 14\
**Last updated:** [January 6, 2022, 7:10pm UTC](https://discourse.processing.org/t/three-parallel-beziers/34471 "2022-01-06T19:10:53Z")

</div>

Hi there. I was wondering if there is a method to make three beziers parallel to each other with the same spacing between them. I have already made in example with three beziers.

---

## [Lerp in a Object Class](https://discourse.processing.org/t/lerp-in-a-object-class/34491)

<div class="topic-metadata">

**Author:** [@Noxus010](https://discourse.processing.org/u/Noxus010)\
**Replies:** 0\
**Last updated:** [January 6, 2022, 6:27pm UTC](https://discourse.processing.org/t/lerp-in-a-object-class/34491 "2022-01-06T18:27:10Z")

</div>

Hi people! I just started with processing and I would like to have a class that is loaded before I start the draw function… In this class I wanted to use the lerp function but I get a error “lerp function does not exist”…

---

## [How to create Minimum bounding shapes such as ellipse, triangle, quadrilateral from a given 2d shape](https://discourse.processing.org/t/how-to-create-minimum-bounding-shapes-such-as-ellipse-triangle-quadrilateral-from-a-given-2d-shape/29460)

<div class="topic-metadata">

**Author:** [@Goodman](https://discourse.processing.org/u/Goodman)\
**Replies:** 8\
**Last updated:** [January 6, 2022, 5:20pm UTC](https://discourse.processing.org/t/how-to-create-minimum-bounding-shapes-such-as-ellipse-triangle-quadrilateral-from-a-given-2d-shape/29460 "2022-01-06T17:20:00Z")

</div>

I have a 2d shape(boundary) and generated the convex hull. Now, I want to create a minimum bounding quadrilateral, minimum bounding triangle, and minimum bounding ellipse for that boundary. I have generated these minimum…

---

## [Put letters from input in array](https://discourse.processing.org/t/put-letters-from-input-in-array/34486)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 2\
**Last updated:** [January 6, 2022, 3:55pm UTC](https://discourse.processing.org/t/put-letters-from-input-in-array/34486 "2022-01-06T15:55:34Z")

</div>

How do I break “text” apart and put it into an array? let input, button, greeting; function setup() { // create canvas createCanvas(710, 400); input = createInput(); input.position(20, 65); button = createB…

---

## [Swing works until](https://discourse.processing.org/t/swing-works-until/33322)

<div class="topic-metadata">

**Author:** [@HackinHarry](https://discourse.processing.org/u/HackinHarry)\
**Replies:** 13\
**Last updated:** [January 6, 2022, 1:36pm UTC](https://discourse.processing.org/t/swing-works-until/33322 "2022-01-06T13:36:22Z")

</div>

I’m using a swing gui to control some variables and if I just insert that into a sketch with nothing except a setup() and the code to get swing gui to launch, I can edit text and use that to update a slider. I can also …

---

## [Help changing square colours after time](https://discourse.processing.org/t/help-changing-square-colours-after-time/34467)

<div class="topic-metadata">

**Author:** [@teeny13](https://discourse.processing.org/u/teeny13)\
**Replies:** 15\
**Last updated:** [January 6, 2022, 9:52am UTC](https://discourse.processing.org/t/help-changing-square-colours-after-time/34467 "2022-01-06T09:52:23Z")

</div>

Hey everyone, I’m trying to make the squares I’ve created change their colour randomly. Instead my code is only working on click. The reason I am doing this is so that when a square changes the colour, the person play…

---

## [If the program does not work well after deployment](https://discourse.processing.org/t/if-the-program-does-not-work-well-after-deployment/34484)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 0\
**Last updated:** [January 6, 2022, 8:44am UTC](https://discourse.processing.org/t/if-the-program-does-not-work-well-after-deployment/34484 "2022-01-06T08:44:58Z")

</div>

If the program does not work well after deployment// Creating a new window for ‘G4P Library’. Implemented in ‘JAVA Mode’. Works well for debugging ‘through processing’. If it works after ‘distributing the .ex…

---

## [Where are the examples and media for "Processing: A Programming Handbook for Visual Designers and Artists"](https://discourse.processing.org/t/where-are-the-examples-and-media-for-processing-a-programming-handbook-for-visual-designers-and-artists/34122)

<div class="topic-metadata">

**Author:** [@CaseyJ](https://discourse.processing.org/u/CaseyJ)\
**Replies:** 5\
**Last updated:** [January 5, 2022, 3:07am UTC](https://discourse.processing.org/t/where-are-the-examples-and-media-for-processing-a-programming-handbook-for-visual-designers-and-artists/34122 "2022-01-05T03:07:26Z")

</div>

I am working through the excellent book “Processing: A Programming Handbook for Visual Designers and Artists” by Casey Reas and Ben Fry. Upon entering the 13th Chapter, Images, I am finding that I cannot locate the sket…

---

## [Spectrum analyzer software/ hardware](https://discourse.processing.org/t/spectrum-analyzer-software-hardware/34175)

<div class="topic-metadata">

**Author:** [@jafal](https://discourse.processing.org/u/jafal)\
**Replies:** 2\
**Last updated:** [January 5, 2022, 1:39am UTC](https://discourse.processing.org/t/spectrum-analyzer-software-hardware/34175 "2022-01-05T01:39:12Z")

</div>

hi this example about the great power using processing programming i run it it is a great tool with this hardware for some testing i replaced using my heavy and expensive spectrum analyzer with this soft…

---

## [Best practice to merge images](https://discourse.processing.org/t/best-practice-to-merge-images/34461)

<div class="topic-metadata">

**Author:** [@AAAnatoly](https://discourse.processing.org/u/AAAnatoly)\
**Replies:** 4\
**Last updated:** [January 5, 2022, 1:40am UTC](https://discourse.processing.org/t/best-practice-to-merge-images/34461 "2022-01-05T01:40:58Z")

</div>

Hello everyone. I am trying to merge 3 pictures into 1. Right now I am loading their pixels, getting the average colour of each pixel and simply putting that pixel back on the screen, like this - img\_one = loadImage(ra…

---

## [Composite shape collision detection](https://discourse.processing.org/t/composite-shape-collision-detection/34473)

<div class="topic-metadata">

**Author:** [@myhatzulu](https://discourse.processing.org/u/myhatzulu)\
**Replies:** 1\
**Last updated:** [January 4, 2022, 11:45pm UTC](https://discourse.processing.org/t/composite-shape-collision-detection/34473 "2022-01-04T23:45:20Z")

</div>

I really need some help, I’m trying to make a composite shape of 2 ellipses, shaped like a snow man’s body with no arms, move (using arrows) towards 3 randomly positioned small circles that were created with an array, up…

---

## [Blinking random objects in arrays](https://discourse.processing.org/t/blinking-random-objects-in-arrays/34470)

<div class="topic-metadata">

**Author:** [@myhatzulu](https://discourse.processing.org/u/myhatzulu)\
**Replies:** 3\
**Last updated:** [January 4, 2022, 11:42pm UTC](https://discourse.processing.org/t/blinking-random-objects-in-arrays/34470 "2022-01-04T23:42:39Z")

</div>

hi I really need some tips, I’m trying to make my object array “blink” once it’s executed, the 10 ellipses in the array appear in random positions, and then they flash in and out while staying in that initial random posi…

---

## [Processing with VSCode, working with a codebase?](https://discourse.processing.org/t/processing-with-vscode-working-with-a-codebase/34459)

<div class="topic-metadata">

**Author:** [@sentoplene](https://discourse.processing.org/u/sentoplene)\
**Replies:** 0\
**Last updated:** [January 4, 2022, 10:54am UTC](https://discourse.processing.org/t/processing-with-vscode-working-with-a-codebase/34459 "2022-01-04T10:54:34Z")

</div>

Hi, I love using Processing. But I don’t like it that in order to share code among sketches I either have to copy paste files, or update and create a library. So my question is: When I code in Visual Studio Code (I k…

---

## [Save in vectorial + background aspect](https://discourse.processing.org/t/save-in-vectorial-background-aspect/34457)

<div class="topic-metadata">

**Author:** [@jdelaro](https://discourse.processing.org/u/jdelaro)\
**Replies:** 0\
**Last updated:** [January 4, 2022, 8:36am UTC](https://discourse.processing.org/t/save-in-vectorial-background-aspect/34457 "2022-01-04T08:36:33Z")

</div>

Hello, I hope I am in the right place to post my question. I am using this code created by Manoylov AC : var blockSize = 150; var countBorder = 2; var wdt = blockSize \* countBorder; var hgt = blockSize \* countBorder; v…

---

## [Same shader, multiple graphics?](https://discourse.processing.org/t/same-shader-multiple-graphics/34427)

<div class="topic-metadata">

**Author:** [@modusponens](https://discourse.processing.org/u/modusponens)\
**Replies:** 2\
**Last updated:** [January 4, 2022, 6:38am UTC](https://discourse.processing.org/t/same-shader-multiple-graphics/34427 "2022-01-04T06:38:49Z")

</div>

Is it possible for more than one graphics object to use the same shader? In this sketch here, I would expect two squares to be drawn, a yellow one on the left and a blue on the right, but only the yellow one appears: A…

---

## [CPU usage seemingly capped (different from the 2019 question on this topic)](https://discourse.processing.org/t/cpu-usage-seemingly-capped-different-from-the-2019-question-on-this-topic/34440)

<div class="topic-metadata">

**Author:** [@AlDickins](https://discourse.processing.org/u/AlDickins)\
**Replies:** 1\
**Last updated:** [January 3, 2022, 4:30pm UTC](https://discourse.processing.org/t/cpu-usage-seemingly-capped-different-from-the-2019-question-on-this-topic/34440 "2022-01-03T16:30:48Z")

</div>

I want my Processing sketch to run with the CPU close to 100% utilisation, compared with the current 14%. My Processing sketch trains a neural network for a puzzle where a mouse learns to evade a cat which is pursuing i…

---

## [Access the magnetometer sensor](https://discourse.processing.org/t/access-the-magnetometer-sensor/33605)

<div class="topic-metadata">

**Author:** [@sasharvrn](https://discourse.processing.org/u/sasharvrn)\
**Replies:** 3\
**Last updated:** [January 3, 2022, 4:06pm UTC](https://discourse.processing.org/t/access-the-magnetometer-sensor/33605 "2022-01-03T16:06:41Z")

</div>

Hello, I am working on a project to display and test the phone’s sensors (accelerometer, gyroscope etc) by using p5.js. I can’t find any information to access the magnetometer sensor, is there something implemented in P5…

---

## [Drag and drop file and obtain path](https://discourse.processing.org/t/drag-and-drop-file-and-obtain-path/16737)

<div class="topic-metadata">

**Author:** [@molo32](https://discourse.processing.org/u/molo32)\
**Replies:** 3\
**Last updated:** [January 3, 2022, 3:37pm UTC](https://discourse.processing.org/t/drag-and-drop-file-and-obtain-path/16737 "2022-01-03T15:37:51Z")

</div>

How drag and drop file inside screen sketch and obtain path of file. do not use the sDrop library

---

## [How to obfuscate P5js?](https://discourse.processing.org/t/how-to-obfuscate-p5js/34245)

<div class="topic-metadata">

**Author:** [@nemecsek69](https://discourse.processing.org/u/nemecsek69)\
**Replies:** 2\
**Last updated:** [December 31, 2021, 4:20pm UTC](https://discourse.processing.org/t/how-to-obfuscate-p5js/34245 "2021-12-31T16:20:22Z")

</div>

I embedded some P5js sketches in another app (python+flask). Any way to obfuscate P5js code? How is the code in Hungry Bird 3: Drop a seed obfuscated obtained? I tried some javascript minifiers online and offline ( YU…

---

## [Pentagonal Tesselation](https://discourse.processing.org/t/pentagonal-tesselation/34416)

<div class="topic-metadata">

**Author:** [@villares](https://discourse.processing.org/u/villares)\
**Replies:** 3\
**Last updated:** [January 3, 2022, 8:52am UTC](https://discourse.processing.org/t/pentagonal-tesselation/34416 "2022-01-03T08:52:48Z")

</div>

Happy New Year everyone! I hope you enjoy some tiling with pentagons. More ideas here: https://math.dartmouth.edu/~mutzel/pentagonal\_tiling.pdf And here: Cairo pentagonal tiling - Wikipedia def setup(): size(…

---

## [All new to this trying to understand](https://discourse.processing.org/t/all-new-to-this-trying-to-understand/34429)

<div class="topic-metadata">

**Author:** [@visnudeva](https://discourse.processing.org/u/visnudeva)\
**Replies:** 12\
**Last updated:** [January 3, 2022, 7:54am UTC](https://discourse.processing.org/t/all-new-to-this-trying-to-understand/34429 "2022-01-03T07:54:30Z")

</div>

I’m trying to understand something very basic looking at the exemple and trying to modify them but i don’t get it yet. For exemple with the code here: what should i do to get many circles doing the same thing ?

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

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