# Latest

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

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

**Page:** 310

---

## [Equivalent of p5's "on-demand global mode" for regular (Java) Processing?](https://discourse.processing.org/t/equivalent-of-p5s-on-demand-global-mode-for-regular-java-processing/23701)

<div class="topic-metadata">

**Author:** [@pablohotsauce](https://discourse.processing.org/u/pablohotsauce)\
**Replies:** 8\
**Last updated:** [September 6, 2020, 7:49am UTC](https://discourse.processing.org/t/equivalent-of-p5s-on-demand-global-mode-for-regular-java-processing/23701 "2020-09-06T07:49:49Z")

</div>

Is there an equivalent of p5’s on-demand global mode … new p5(); // in global space … but for regular (Java) Processing? I want to be able to use all Processing functions / methods outside of setup() and draw(). Searche…

---

## [Keeping a ball within bounds](https://discourse.processing.org/t/keeping-a-ball-within-bounds/23700)

<div class="topic-metadata">

**Author:** [@FloorBean](https://discourse.processing.org/u/FloorBean)\
**Replies:** 3\
**Last updated:** [September 6, 2020, 7:35am UTC](https://discourse.processing.org/t/keeping-a-ball-within-bounds/23700 "2020-09-06T07:35:58Z")

</div>

I am trying to keep the ball in the display window and it only is sometimes working. I am not really sure where to go from here. (Ignore the paddle for now). float gap; //Assign variables float ballX = random(300); …

---

## [Detecting the start of a scroll](https://discourse.processing.org/t/detecting-the-start-of-a-scroll/23681)

<div class="topic-metadata">

**Author:** [@Jithin](https://discourse.processing.org/u/Jithin)\
**Replies:** 1\
**Last updated:** [September 6, 2020, 4:16am UTC](https://discourse.processing.org/t/detecting-the-start-of-a-scroll/23681 "2020-09-06T04:16:46Z")

</div>

Is there any way to detect the start of a scroll in p5? I want just the start of the scroll. The mouseWheel event doesn’t seem to help.

---

## [How to get current stroke weight?](https://discourse.processing.org/t/how-to-get-current-stroke-weight/23695)

<div class="topic-metadata">

**Author:** [@mr\_riptano](https://discourse.processing.org/u/mr_riptano)\
**Replies:** 4\
**Last updated:** [September 5, 2020, 6:29pm UTC](https://discourse.processing.org/t/how-to-get-current-stroke-weight/23695 "2020-09-05T18:29:23Z")

</div>

I can set strokeWeight(x) but I can’t find a method to return the current weight.

---

## [My phone was hacked now i need help](https://discourse.processing.org/t/my-phone-was-hacked-now-i-need-help/23676)

<div class="topic-metadata">

**Author:** [@Dominik\_rgn](https://discourse.processing.org/u/Dominik_rgn)\
**Replies:** 4\
**Last updated:** [September 4, 2020, 7:24pm UTC](https://discourse.processing.org/t/my-phone-was-hacked-now-i-need-help/23676 "2020-09-04T19:24:56Z")

</div>

my phone was hacked now i need help. can I also program something similar? Can i program a gallery?

---

## [GIFAnimation Library](https://discourse.processing.org/t/gifanimation-library/2229)

<div class="topic-metadata">

**Author:** [@nvwingh](https://discourse.processing.org/u/nvwingh)\
**Replies:** 8\
**Last updated:** [September 5, 2020, 11:19am UTC](https://discourse.processing.org/t/gifanimation-library/2229 "2020-09-05T11:19:43Z")

</div>

I have some issues importing the GIFAnimation library in Processing. In my Contribution Manager, in Processing IDE, I get the notification that GifAnimation 2.3.1. is not compatible with my Processing Version. So I cann…

---

## [HeatMap colours without if else](https://discourse.processing.org/t/heatmap-colours-without-if-else/23670)

<div class="topic-metadata">

**Author:** [@tribblesontoast](https://discourse.processing.org/u/tribblesontoast)\
**Replies:** 1\
**Last updated:** [September 5, 2020, 10:12am UTC](https://discourse.processing.org/t/heatmap-colours-without-if-else/23670 "2020-09-05T10:12:12Z")

</div>

Hi, I’m working on a heat map and I’m trying to improve my colour code. I have a grid of squares with each having a value for the heat map, based on that value I have been assigning a colour from an array. I have been …

---

## [Processing Network Library does not work over 2 computers](https://discourse.processing.org/t/processing-network-library-does-not-work-over-2-computers/23687)

<div class="topic-metadata">

**Author:** [@TechMaster04](https://discourse.processing.org/u/TechMaster04)\
**Replies:** 2\
**Last updated:** [September 5, 2020, 2:36am UTC](https://discourse.processing.org/t/processing-network-library-does-not-work-over-2-computers/23687 "2020-09-05T02:36:36Z")

</div>

Hello I was messing around with the Processing Network Library examples earlier today and noticed that they dont seem to work on 2 different computers (Connected to the same network). They only work if I run both exampl…

---

## [Smooth() repositioning p5.js sketch unexpectedly](https://discourse.processing.org/t/smooth-repositioning-p5-js-sketch-unexpectedly/23675)

<div class="topic-metadata">

**Author:** [@jimy102](https://discourse.processing.org/u/jimy102)\
**Replies:** 2\
**Last updated:** [September 5, 2020, 1:38am UTC](https://discourse.processing.org/t/smooth-repositioning-p5-js-sketch-unexpectedly/23675 "2020-09-05T01:38:00Z")

</div>

So I’ve been trying to get a bit of an animation going, and it’s basically finished, except for antialiasing. The problem is whenever I try to use smooth(); my entire sketch gets positioned lower on the index.html. I t…

---

## [Is there a 'Search period' or 'Date search' interface?](https://discourse.processing.org/t/is-there-a-search-period-or-date-search-interface/22582)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 19\
**Last updated:** [September 5, 2020, 1:26am UTC](https://discourse.processing.org/t/is-there-a-search-period-or-date-search-interface/22582 "2020-09-05T01:26:52Z")

</div>

If you look at the picture, you can search for time as above. Is there an interface library or source code like that? help me.

---

## [Help) The type MouseEvent is ambiguous / java.awt.event vs g4p\_controls](https://discourse.processing.org/t/help-the-type-mouseevent-is-ambiguous-java-awt-event-vs-g4p-controls/23686)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 1\
**Last updated:** [September 5, 2020, 12:50am UTC](https://discourse.processing.org/t/help-the-type-mouseevent-is-ambiguous-java-awt-event-vs-g4p-controls/23686 "2020-09-05T00:50:36Z")

</div>

Hello. Nice to meet you. It seems that the two libraries are conflicting. Is there a workaround? import java.awt.event.; import g4p\_controls.; GWindow window1; public void windowMouse1(PApplet appc, GWinData data,…

---

## [Write code in Gradle](https://discourse.processing.org/t/write-code-in-gradle/23684)

<div class="topic-metadata">

**Author:** [@Ultrawinzer](https://discourse.processing.org/u/Ultrawinzer)\
**Replies:** 0\
**Last updated:** [September 4, 2020, 11:13pm UTC](https://discourse.processing.org/t/write-code-in-gradle/23684 "2020-09-04T23:13:05Z")

</div>

Hello. I want to build a qr code reader with zxing. Therefore I need to write some code in the gradle files. If i export my project, I can change these files, but how can I run that on my device?

---

## ["zoom" into image based on window center only](https://discourse.processing.org/t/zoom-into-image-based-on-window-center-only/23647)

<div class="topic-metadata">

**Author:** [@jetjaguar](https://discourse.processing.org/u/jetjaguar)\
**Replies:** 3\
**Last updated:** [September 4, 2020, 3:53pm UTC](https://discourse.processing.org/t/zoom-into-image-based-on-window-center-only/23647 "2020-09-04T15:53:01Z")

</div>

Hello everyone! I am trying to create the effect of zooming in on an image based on the center of the program window, NOT based on the center of an image whose mode has been set to CENTER. The code below shows what hap…

---

## [Why does empty draw() function change canvas?](https://discourse.processing.org/t/why-does-empty-draw-function-change-canvas/23679)

<div class="topic-metadata">

**Author:** [@mr\_riptano](https://discourse.processing.org/u/mr_riptano)\
**Replies:** 1\
**Last updated:** [September 4, 2020, 3:41pm UTC](https://discourse.processing.org/t/why-does-empty-draw-function-change-canvas/23679 "2020-09-04T15:41:53Z")

</div>

void setup(){ size(400,400); background(0); paint(200,200,150,10); } void draw() { } void paint(float x, float y, float r, float v){ noFill(); strokeWeight(v); stroke(250,180,0,10); ellipse(x,y,r,r); } P…

---

## [Box2d still the way to go?](https://discourse.processing.org/t/box2d-still-the-way-to-go/23677)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 0\
**Last updated:** [September 4, 2020, 2:00pm UTC](https://discourse.processing.org/t/box2d-still-the-way-to-go/23677 "2020-09-04T14:00:37Z")

</div>

Hi, I want to do some 2D physics based text stuff, ie rigid body simulations with gravity and collisions. Along the lines of Dan Schiffman’s examples with boxes falling onto static objects with box2d. Those examples ar…

---

## [Unable to load fonts using createFont()](https://discourse.processing.org/t/unable-to-load-fonts-using-createfont/23666)

<div class="topic-metadata">

**Author:** [@Lucianoinfanti](https://discourse.processing.org/u/Lucianoinfanti)\
**Replies:** 3\
**Last updated:** [September 4, 2020, 1:03pm UTC](https://discourse.processing.org/t/unable-to-load-fonts-using-createfont/23666 "2020-09-04T13:03:22Z")

</div>

I tried to load a few different fonts I have inside my data folder but to no success. This is my code: PGraphics pg; void setup() { PFont font = createFont("ZapfDingbats.ttf", 100); size(800,800, P2D); pg = creat…

---

## [Why backwards-for-loops don't work?](https://discourse.processing.org/t/why-backwards-for-loops-dont-work/23672)

<div class="topic-metadata">

**Author:** [@Tinkerer](https://discourse.processing.org/u/Tinkerer)\
**Replies:** 5\
**Last updated:** [September 4, 2020, 10:53am UTC](https://discourse.processing.org/t/why-backwards-for-loops-dont-work/23672 "2020-09-04T10:53:29Z")

</div>

Hello, How come a for-loop can’t run backwards? I sometimes need to run backwards through arrays and wanted something shorter than a while loop and reverse() doesnt seem to work for higher-D arrays e.g. reverse(array) …

---

## [Android processing and Puredata communication](https://discourse.processing.org/t/android-processing-and-puredata-communication/23627)

<div class="topic-metadata">

**Author:** [@Purr](https://discourse.processing.org/u/Purr)\
**Replies:** 4\
**Last updated:** [September 4, 2020, 9:18am UTC](https://discourse.processing.org/t/android-processing-and-puredata-communication/23627 "2020-09-04T09:18:57Z")

</div>

Hi there, I have problem about communication between Android processing and Pure data. When I run my code in processing, I see on the back of my screen that the phone send information to my computer but definitly not to…

---

## [I need a little Help (APDE)](https://discourse.processing.org/t/i-need-a-little-help-apde/23663)

<div class="topic-metadata">

**Author:** [@Dominik\_rgn](https://discourse.processing.org/u/Dominik_rgn)\
**Replies:** 2\
**Last updated:** [September 4, 2020, 4:49am UTC](https://discourse.processing.org/t/i-need-a-little-help-apde/23663 "2020-09-04T04:49:25Z")

</div>

can I play a video in “LANDSCAPE” which has displayHeight and width? With (skip, Play, pause)?

---

## [AlwaysOnHotwordDetector Examples for Android Mode](https://discourse.processing.org/t/alwaysonhotworddetector-examples-for-android-mode/22292)

<div class="topic-metadata">

**Author:** [@Erald](https://discourse.processing.org/u/Erald)\
**Replies:** 2\
**Last updated:** [September 4, 2020, 3:24am UTC](https://discourse.processing.org/t/alwaysonhotworddetector-examples-for-android-mode/22292 "2020-09-04T03:24:37Z")

</div>

I have been lurking around StackExchange and Processing forums for any leads on a starting project for AlwaysOnHotwordDetector voice service for Android Mode on Processing but I don’t think many have ventured on this pro…

---

## [strokeCap in P3D not working](https://discourse.processing.org/t/strokecap-in-p3d-not-working/23633)

<div class="topic-metadata">

**Author:** [@DaaWaan](https://discourse.processing.org/u/DaaWaan)\
**Replies:** 2\
**Last updated:** [September 4, 2020, 2:41am UTC](https://discourse.processing.org/t/strokecap-in-p3d-not-working/23633 "2020-09-04T02:41:21Z")

</div>

Just for a background, I’m currently using P3D for 2D animations instead of the default, P2D, and FX2D because of performance issues that I get with the customization of strokes. I assume this probably has something to d…

---

## [Crear disparo y eliminarlo](https://discourse.processing.org/t/crear-disparo-y-eliminarlo/16343)

<div class="topic-metadata">

**Author:** [@hokuto](https://discourse.processing.org/u/hokuto)\
**Replies:** 6\
**Last updated:** [September 3, 2020, 11:04pm UTC](https://discourse.processing.org/t/crear-disparo-y-eliminarlo/16343 "2020-09-03T23:04:51Z")

</div>

Hola. Estoy intentando crear un pequeño juego de naves en processing,pero no se como puedo hacer para que un objeto dispare balas y luego esas balas se eliminen al salir de la pantalla.

---

## [Ploting a shape along a path](https://discourse.processing.org/t/ploting-a-shape-along-a-path/23641)

<div class="topic-metadata">

**Author:** [@pandl](https://discourse.processing.org/u/pandl)\
**Replies:** 4\
**Last updated:** [September 3, 2020, 11:01pm UTC](https://discourse.processing.org/t/ploting-a-shape-along-a-path/23641 "2020-09-03T23:01:04Z")

</div>

I’ve able to have a shape follow a circular path and now I’d like to do the same thing with other paths starting with a straight line. I once had some BASIC code that plotted a line but that was 40 odd years ago and I ca…

---

## [Infinite value for algorithm](https://discourse.processing.org/t/infinite-value-for-algorithm/23661)

<div class="topic-metadata">

**Author:** [@arcadeperfect](https://discourse.processing.org/u/arcadeperfect)\
**Replies:** 2\
**Last updated:** [September 3, 2020, 9:21pm UTC](https://discourse.processing.org/t/infinite-value-for-algorithm/23661 "2020-09-03T21:21:22Z")

</div>

Hi Is there an equivalent of float(‘inf’) in Python to use in min operations to find the smallest value in a loop? Thanks

---

## [P5 instance mode with image and sliders](https://discourse.processing.org/t/p5-instance-mode-with-image-and-sliders/23654)

<div class="topic-metadata">

**Author:** [@nikodemd](https://discourse.processing.org/u/nikodemd)\
**Replies:** 1\
**Last updated:** [September 3, 2020, 4:48pm UTC](https://discourse.processing.org/t/p5-instance-mode-with-image-and-sliders/23654 "2020-09-03T16:48:01Z")

</div>

Hi guys! I am trying to convert my p5 code into instance mode, but it does not seem to work. Does anybody have an idea what am I doing wrong? here is the code: let sketch = function(p) { let DAYLIGHT; let canva…

---

## [Beginner having problems, for cycle, lines coordinates](https://discourse.processing.org/t/beginner-having-problems-for-cycle-lines-coordinates/23659)

<div class="topic-metadata">

**Author:** [@TabeaErre](https://discourse.processing.org/u/TabeaErre)\
**Replies:** 1\
**Last updated:** [September 3, 2020, 3:24pm UTC](https://discourse.processing.org/t/beginner-having-problems-for-cycle-lines-coordinates/23659 "2020-09-03T15:24:28Z")

</div>

Hi everybody, I’m very new to processing. I’m trying to finish this code, my uni professor told me I had to do a “for cycle” to draw all the lines using the coordinates. I don’t know how to do it, I’m stuck. Also after t…

---

## [There is an error, so I ask for advice: The program freezes. The program takes a lag](https://discourse.processing.org/t/there-is-an-error-so-i-ask-for-advice-the-program-freezes-the-program-takes-a-lag/23579)

<div class="topic-metadata">

**Author:** [@GWAK](https://discourse.processing.org/u/GWAK)\
**Replies:** 5\
**Last updated:** [September 3, 2020, 1:54pm UTC](https://discourse.processing.org/t/there-is-an-error-so-i-ask-for-advice-the-program-freezes-the-program-takes-a-lag/23579 "2020-09-03T13:54:02Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hello. Nice to meet you. I want to make a monitoring program through’processing tool’. There is an error in making, so I ask you for advice…

---

## [Menu toolbar and custom events](https://discourse.processing.org/t/menu-toolbar-and-custom-events/23653)

<div class="topic-metadata">

**Author:** [@MiguelSanches](https://discourse.processing.org/u/MiguelSanches)\
**Replies:** 0\
**Last updated:** [September 3, 2020, 8:22am UTC](https://discourse.processing.org/t/menu-toolbar-and-custom-events/23653 "2020-09-03T08:22:44Z")

</div>

Hi all, I have been trying to work and play with creating a menu toolbar. I recently found this post (https://forum.processing.org/two/discussion/21749/how-to-create-an-application-with-a-toolbar) and I have used some …

---

## [Moving a cursor with Robot makes it skip across the window?](https://discourse.processing.org/t/moving-a-cursor-with-robot-makes-it-skip-across-the-window/23373)

<div class="topic-metadata">

**Author:** [@CosmicCrowMC](https://discourse.processing.org/u/CosmicCrowMC)\
**Replies:** 5\
**Last updated:** [September 3, 2020, 2:11am UTC](https://discourse.processing.org/t/moving-a-cursor-with-robot-makes-it-skip-across-the-window/23373 "2020-09-03T02:11:21Z")

</div>

So, I’ve been working on a 3d game for quite a while now. It’s first-person, and you look around by moving the mouse - makes sense. I’ve sent the game to some friends to playtest, and it works fine for all but one of the…

---

## [Help with picking a webcam](https://discourse.processing.org/t/help-with-picking-a-webcam/23645)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 0\
**Last updated:** [September 3, 2020, 1:13am UTC](https://discourse.processing.org/t/help-with-picking-a-webcam/23645 "2020-09-03T01:13:23Z")

</div>

not sure if I’m missing something really obvious I’m using the stock camera code to extract an image from my webcam. Processing lists 33 camers total 33 Available cameras: 0 name=Integrated Camera,size=640x480,fps=15 …

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

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