# Latest

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

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

**Page:** 313

---

## [Best way to emulate a rotary encoder wheel?](https://discourse.processing.org/t/best-way-to-emulate-a-rotary-encoder-wheel/21982)

<div class="topic-metadata">

**Author:** [@rkdnson](https://discourse.processing.org/u/rkdnson)\
**Replies:** 22\
**Last updated:** [August 21, 2020, 11:21am UTC](https://discourse.processing.org/t/best-way-to-emulate-a-rotary-encoder-wheel/21982 "2020-08-21T11:21:07Z")

</div>

Hello all. Trying to find the easiest way to capture user input on an encoder wheel. In theory, I would want to track the clockwise / counterclockwise mouse movement within the area representing the encoder. So instead o…

---

## [Cp5 TextField bug](https://discourse.processing.org/t/cp5-textfield-bug/23471)

<div class="topic-metadata">

**Author:** [@shuptuu](https://discourse.processing.org/u/shuptuu)\
**Replies:** 3\
**Last updated:** [August 25, 2020, 8:47am UTC](https://discourse.processing.org/t/cp5-textfield-bug/23471 "2020-08-25T08:47:40Z")

</div>

Hi, Something weird with TextField controller from cp5: In a project, I have to manage the visibility of an ArrayList of Textfield controllers, according different parameters. So the best way I found to do it is in my …

---

## [strokeWeight(1) draws 2 pixel width](https://discourse.processing.org/t/strokeweight-1-draws-2-pixel-width/23425)

<div class="topic-metadata">

**Author:** [@FunThomas](https://discourse.processing.org/u/FunThomas)\
**Replies:** 7\
**Last updated:** [August 24, 2020, 11:07pm UTC](https://discourse.processing.org/t/strokeweight-1-draws-2-pixel-width/23425 "2020-08-24T23:07:21Z")

</div>

While playing with some basic stuff, I found that some of my drawings seemd to be off. After some fiddling, I found that if I use strokeWeight(1), the line or rect has in fact a width of 2 pixels. I tried Firefox and Chr…

---

## [Importing Processing Video Library into IntelliJ](https://discourse.processing.org/t/importing-processing-video-library-into-intellij/23437)

<div class="topic-metadata">

**Author:** [@Caleb](https://discourse.processing.org/u/Caleb)\
**Replies:** 3\
**Last updated:** [August 24, 2020, 10:37pm UTC](https://discourse.processing.org/t/importing-processing-video-library-into-intellij/23437 "2020-08-24T22:37:13Z")

</div>

I’m able to import Processing just fine but I’m unable to import the Processing Video library. I’ve tried tried adding the whole folder to the library and adding the .jars to the library. When I just put in the whole…

---

## [Ccapture with up to date p5js](https://discourse.processing.org/t/ccapture-with-up-to-date-p5js/23467)

<div class="topic-metadata">

**Author:** [@Hapiel](https://discourse.processing.org/u/Hapiel)\
**Replies:** 2\
**Last updated:** [August 24, 2020, 10:28pm UTC](https://discourse.processing.org/t/ccapture-with-up-to-date-p5js/23467 "2020-08-24T22:28:16Z")

</div>

Hi guys, I was trying to work out how to save animations with ccapture, a js library. I couldn’t get it to work, so I looked up an example that uses p5 and ccapture and found one here. After getting confused for a long…

---

## [Why does windowWidth not trigger?](https://discourse.processing.org/t/why-does-windowwidth-not-trigger/23473)

<div class="topic-metadata">

**Author:** [@Clebosevic](https://discourse.processing.org/u/Clebosevic)\
**Replies:** 0\
**Last updated:** [August 24, 2020, 5:15pm UTC](https://discourse.processing.org/t/why-does-windowwidth-not-trigger/23473 "2020-08-24T17:15:51Z")

</div>

So my code is rather simple, it looks at an image and for every pixel brighter than a threshold, it puts a one there, which in turn just creates a interpretation of that image (code below): let grid = \[\]; const gridSize…

---

## [Trying to convert a basic grow shrink sketch from processing to p5.js](https://discourse.processing.org/t/trying-to-convert-a-basic-grow-shrink-sketch-from-processing-to-p5-js/23389)

<div class="topic-metadata">

**Author:** [@BackTo](https://discourse.processing.org/u/BackTo)\
**Replies:** 4\
**Last updated:** [August 24, 2020, 12:26pm UTC](https://discourse.processing.org/t/trying-to-convert-a-basic-grow-shrink-sketch-from-processing-to-p5-js/23389 "2020-08-24T12:26:31Z")

</div>

Hi, I’m trying to convert a processing 3 sketch that works to a p5.js and I can’t wrap my head around what the changes are or where to find a translation guide. I think if I can crack this conversion I’ll be able to do …

---

## [Detection of collision between elements from same array only works sometimes](https://discourse.processing.org/t/detection-of-collision-between-elements-from-same-array-only-works-sometimes/23447)

<div class="topic-metadata">

**Author:** [@Leonsuper](https://discourse.processing.org/u/Leonsuper)\
**Replies:** 6\
**Last updated:** [August 24, 2020, 11:16am UTC](https://discourse.processing.org/t/detection-of-collision-between-elements-from-same-array-only-works-sometimes/23447 "2020-08-24T11:16:07Z")

</div>

Hello! I’ve created a small program where circles stored in an array move through the window. They rebound when they hit the window’s limits and they’re supposed to rebound when they collide with each other, but thesse …

---

## [Make one of my sketches a screensaver](https://discourse.processing.org/t/make-one-of-my-sketches-a-screensaver/23456)

<div class="topic-metadata">

**Author:** [@Crysp](https://discourse.processing.org/u/Crysp)\
**Replies:** 1\
**Last updated:** [August 24, 2020, 9:34am UTC](https://discourse.processing.org/t/make-one-of-my-sketches-a-screensaver/23456 "2020-08-24T09:34:58Z")

</div>

Hello, I want to make one of my Processing sketches my screensaver, and am wondering if there was a way that I can make it one. Here is the sketch that I am talking about if you’re interested. I have Windows 10 if that i…

---

## [Spider Web Evolution](https://discourse.processing.org/t/spider-web-evolution/23451)

<div class="topic-metadata">

**Author:** [@driangle](https://discourse.processing.org/u/driangle)\
**Replies:** 4\
**Last updated:** [August 24, 2020, 8:15am UTC](https://discourse.processing.org/t/spider-web-evolution/23451 "2020-08-24T08:15:13Z")

</div>

Hello! It’s my first time posting here, let me know if there is a better place or category to make these kinds of posts. I wanted to share a sketch I made that I thought others may enjoy. It’s a sketch that allows the …

---

## [Create multiple custom rectangles in p5.js](https://discourse.processing.org/t/create-multiple-custom-rectangles-in-p5-js/23459)

<div class="topic-metadata">

**Author:** [@Axiang1225](https://discourse.processing.org/u/Axiang1225)\
**Replies:** 1\
**Last updated:** [August 24, 2020, 7:14am UTC](https://discourse.processing.org/t/create-multiple-custom-rectangles-in-p5-js/23459 "2020-08-24T07:14:43Z")

</div>

I’m beginning to explore p5.js web editor, and I was wondering if there is a way to create multiple custom rectangles with mouse in canvas.That’s the only way I can think of. I want it be like Illustrator’s rectangle too…

---

## [textWidth() .... what is being returned?](https://discourse.processing.org/t/textwidth-what-is-being-returned/7864)

<div class="topic-metadata">

**Author:** [@shedMusic](https://discourse.processing.org/u/shedMusic)\
**Replies:** 8\
**Last updated:** [August 24, 2020, 5:30am UTC](https://discourse.processing.org/t/textwidth-what-is-being-returned/7864 "2020-08-24T05:30:43Z")

</div>

Just playing with text and think that textWidth() returns a length that includes an added space? Test code: String\[\] strArray = {"the", "quick", "brown", "fox"} ; int xOffset = 0 ; void setup() { size(400, 400) ; …

---

## [Print vector from left to right in terminal](https://discourse.processing.org/t/print-vector-from-left-to-right-in-terminal/23100)

<div class="topic-metadata">

**Author:** [@juanjoc](https://discourse.processing.org/u/juanjoc)\
**Replies:** 2\
**Last updated:** [August 23, 2020, 10:23pm UTC](https://discourse.processing.org/t/print-vector-from-left-to-right-in-terminal/23100 "2020-08-23T22:23:12Z")

</div>

Hello everyone. I’m new programming in processing. py. I was looking for ways of printing vectors in terminal, I know that in Java mode I can make the following: int vector\[\] = { 1, 2, 3, 4 }; void setup() { size(50,…

---

## [Syntax error on(s), misplaced construct(s)](https://discourse.processing.org/t/syntax-error-on-s-misplaced-construct-s/23446)

<div class="topic-metadata">

**Author:** [@shaymin-le-dev](https://discourse.processing.org/u/shaymin-le-dev)\
**Replies:** 0\
**Last updated:** [August 23, 2020, 7:16pm UTC](https://discourse.processing.org/t/syntax-error-on-s-misplaced-construct-s/23446 "2020-08-23T19:16:21Z")

</div>

Hello i have this error: Syntax error on(s), misplaced construct(s) when I want to start this code: import static javax.swing.JOptionPane.\*; String snto = "55"; snto = showInputDialog("enter the number of faces"); I h…

---

## [Problem with storing user-entered text in a string](https://discourse.processing.org/t/problem-with-storing-user-entered-text-in-a-string/23348)

<div class="topic-metadata">

**Author:** [@benvining](https://discourse.processing.org/u/benvining)\
**Replies:** 9\
**Last updated:** [August 23, 2020, 2:58pm UTC](https://discourse.processing.org/t/problem-with-storing-user-entered-text-in-a-string/23348 "2020-08-23T14:58:59Z")

</div>

Hello all! As part of a larger project, I created a popup window where a user can enter some text (to change their username in a game). I have a String that stores the player’s username and a separate String that stores …

---

## [Trying to offset vector](https://discourse.processing.org/t/trying-to-offset-vector/23304)

<div class="topic-metadata">

**Author:** [@TimoL](https://discourse.processing.org/u/TimoL)\
**Replies:** 2\
**Last updated:** [August 23, 2020, 6:14am UTC](https://discourse.processing.org/t/trying-to-offset-vector/23304 "2020-08-23T06:14:16Z")

</div>

Im trying to offset a vector. Im sure this is really easy, but Im struggling with the maths. Basically I have 2 vectors: A & B. (Green & red) Using them I am creating a new Vector: C (blue) My goal is to ‘offset’ ve…

---

## [Is this possible? Interactive panning inside video play](https://discourse.processing.org/t/is-this-possible-interactive-panning-inside-video-play/23434)

<div class="topic-metadata">

**Author:** [@Algorithmicself](https://discourse.processing.org/u/Algorithmicself)\
**Replies:** 0\
**Last updated:** [August 23, 2020, 3:03am UTC](https://discourse.processing.org/t/is-this-possible-interactive-panning-inside-video-play/23434 "2020-08-23T03:03:13Z")

</div>

Hi! I have a question or request for guidelines how to approach my task to create an interactive pan inside a video play. I have one video file. It is a 4 x 4K video - meaning a video file in resolution size of (4x384…

---

## [Fixing an 'unknown source' issue preventing Eclipse debugging within a custom Processing library](https://discourse.processing.org/t/fixing-an-unknown-source-issue-preventing-eclipse-debugging-within-a-custom-processing-library/23432)

<div class="topic-metadata">

**Author:** [@colinpt](https://discourse.processing.org/u/colinpt)\
**Replies:** 0\
**Last updated:** [August 23, 2020, 3:03am UTC](https://discourse.processing.org/t/fixing-an-unknown-source-issue-preventing-eclipse-debugging-within-a-custom-processing-library/23432 "2020-08-23T03:03:04Z")

</div>

I’m building myself a processing library, and I would like to be able to step into my library methods fro my Proclipsing sketch in order to properly debug. However, after trying numerous fixes, I am unable to get this fu…

---

## [Too many calls to pushMatrix()](https://discourse.processing.org/t/too-many-calls-to-pushmatrix/23411)

<div class="topic-metadata">

**Author:** [@todai](https://discourse.processing.org/u/todai)\
**Replies:** 8\
**Last updated:** [August 23, 2020, 2:31am UTC](https://discourse.processing.org/t/too-many-calls-to-pushmatrix/23411 "2020-08-23T02:31:02Z")

</div>

Hey, Is there a way to increase the matrix stack depth for pushMatrix()? I am working with 3D objects that have to be displayed with a relative position from one and other. The 3D objects are all created with box() fro…

---

## [Degree of rotation is broken](https://discourse.processing.org/t/degree-of-rotation-is-broken/23428)

<div class="topic-metadata">

**Author:** [@NoName](https://discourse.processing.org/u/NoName)\
**Replies:** 3\
**Last updated:** [August 22, 2020, 11:02pm UTC](https://discourse.processing.org/t/degree-of-rotation-is-broken/23428 "2020-08-22T23:02:34Z")

</div>

I rotate the shape manually by iterating over the vertices. But as with a normal turn, the turn comes from the first peak. I have a Vector that means the position of this shape, but after rotation the vector is not in …

---

## [P2D Misbehaviour](https://discourse.processing.org/t/p2d-misbehaviour/23427)

<div class="topic-metadata">

**Author:** [@MasterSailor](https://discourse.processing.org/u/MasterSailor)\
**Replies:** 1\
**Last updated:** [August 22, 2020, 5:14pm UTC](https://discourse.processing.org/t/p2d-misbehaviour/23427 "2020-08-22T17:14:35Z")

</div>

I needed to adapt a fairly large application to use P2D instead of JAVA2D as the main renderer, because a new feature uses some 3D graphics (createGraphics(wdth,hght, P3D)) and this is evidently not possible with the mai…

---

## [About JS Google Maps](https://discourse.processing.org/t/about-js-google-maps/23206)

<div class="topic-metadata">

**Author:** [@SouSageYa](https://discourse.processing.org/u/SouSageYa)\
**Replies:** 1\
**Last updated:** [August 22, 2020, 4:29pm UTC](https://discourse.processing.org/t/about-js-google-maps/23206 "2020-08-22T16:29:19Z")

</div>

How to send arduino values to a map created by Js

---

## [How to adjust the API level when exporting signed package for Android?](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286)

<div class="topic-metadata">

**Author:** [@Mowtine](https://discourse.processing.org/u/Mowtine)\
**Replies:** 6\
**Last updated:** [August 22, 2020, 2:47pm UTC](https://discourse.processing.org/t/how-to-adjust-the-api-level-when-exporting-signed-package-for-android/23286 "2020-08-22T14:47:41Z")

</div>

I am trying to add my first app to the google app store and when uploading the signed\_aligned APK I get the following error: Your app currently targets API level 28 and must target at least API level 29 to ensure it is …

---

## [I need save values the list points and sum new values without sum id](https://discourse.processing.org/t/i-need-save-values-the-list-points-and-sum-new-values-without-sum-id/23334)

<div class="topic-metadata">

**Author:** [@Xremix31](https://discourse.processing.org/u/Xremix31)\
**Replies:** 2\
**Last updated:** [August 22, 2020, 10:27am UTC](https://discourse.processing.org/t/i-need-save-values-the-list-points-and-sum-new-values-without-sum-id/23334 "2020-08-22T10:27:42Z")

</div>

Hi, I need save the last values for sum new values in points to show the cards in the same position the player. But i have a problem when try first time the position is correct and the same numbers of dices, but when try…

---

## [How to use \*require.js\* to load another library inside p5](https://discourse.processing.org/t/how-to-use-require-js-to-load-another-library-inside-p5/23362)

<div class="topic-metadata">

**Author:** [@watermelon2020](https://discourse.processing.org/u/watermelon2020)\
**Replies:** 1\
**Last updated:** [August 22, 2020, 9:38am UTC](https://discourse.processing.org/t/how-to-use-require-js-to-load-another-library-inside-p5/23362 "2020-08-22T09:38:01Z")

</div>

Hi, I’d like to use the ‘require.js’ library in p5.js to load another library, say ‘fast-csv’ I’ve done locally: npm install fast-csv modify the index.html to include the ‘require’: \<script src=“https://cdnjs.cloudf…

---

## [Not work mousePressed left click!](https://discourse.processing.org/t/not-work-mousepressed-left-click/23413)

<div class="topic-metadata">

**Author:** [@Mayarch](https://discourse.processing.org/u/Mayarch)\
**Replies:** 1\
**Last updated:** [August 21, 2020, 8:31pm UTC](https://discourse.processing.org/t/not-work-mousepressed-left-click/23413 "2020-08-21T20:31:05Z")

</div>

tileCountX=2 tileCountY=10 colorsLeft=\[\] colorsRight=\[\] interpolateShortest=True def setup(): size(800,800) colorMode(HSB) noStroke() shakeColors() def draw(): tileCountX=int(map(mouseX,0,width,2,100)) tileCo…

---

## [The only I see is the message: "Loading..." :-(](https://discourse.processing.org/t/the-only-i-see-is-the-message-loading/23394)

<div class="topic-metadata">

**Author:** [@mancpato](https://discourse.processing.org/u/mancpato)\
**Replies:** 5\
**Last updated:** [August 21, 2020, 7:32pm UTC](https://discourse.processing.org/t/the-only-i-see-is-the-message-loading/23394 "2020-08-21T19:32:56Z")

</div>

I wrote my sketch in the online editor and runs very well. I download it and double clicked index.html, but there is only the “Loading…” message. What am I doing wrong?

---

## [Help running PeerJS 'Hello World' example (in Web Editor)](https://discourse.processing.org/t/help-running-peerjs-hello-world-example-in-web-editor/23403)

<div class="topic-metadata">

**Author:** [@ottenm](https://discourse.processing.org/u/ottenm)\
**Replies:** 1\
**Last updated:** [August 21, 2020, 1:38pm UTC](https://discourse.processing.org/t/help-running-peerjs-hello-world-example-in-web-editor/23403 "2020-08-21T13:38:33Z")

</div>

I’m struggling to get the following example of p5js/PeerJS up and running: https://editor.p5js.org/creativecoding/sketches/a9tDT2M1\_ I open the same page in 2 different windows and launch the first one as-is, including…

---

## [Execution failed for task ':app:processDebugRecources'](https://discourse.processing.org/t/execution-failed-for-task-processdebugrecources/23328)

<div class="topic-metadata">

**Author:** [@TheEternalDragon](https://discourse.processing.org/u/TheEternalDragon)\
**Replies:** 17\
**Last updated:** [August 21, 2020, 9:26am UTC](https://discourse.processing.org/t/execution-failed-for-task-processdebugrecources/23328 "2020-08-21T09:26:39Z")

</div>

Whenever I try to run my app with the android library available in processing, I have recently started to encounter a long error log which after sifting through it told me: What went wrong: Execution failed for task ‘…

---

## [Translating everything/ moving on the canvas](https://discourse.processing.org/t/translating-everything-moving-on-the-canvas/23409)

<div class="topic-metadata">

**Author:** [@Luis\_Luethi1](https://discourse.processing.org/u/Luis_Luethi1)\
**Replies:** 1\
**Last updated:** [August 21, 2020, 9:19am UTC](https://discourse.processing.org/t/translating-everything-moving-on-the-canvas/23409 "2020-08-21T09:19:48Z")

</div>

Hi, I want to move over my canvas by clicking and dragging. With the code below, the rect is getting reinstatiated every time the mouse is clicked. How can I change the code, so the rect is being translated from its new…

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

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