# Latest

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

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

**Page:** 479

---

## [Enemy object not moving!](https://discourse.processing.org/t/enemy-object-not-moving/11814)

<div class="topic-metadata">

**Author:** [@sc4p3g0a7](https://discourse.processing.org/u/sc4p3g0a7)\
**Replies:** 6\
**Last updated:** [June 3, 2019, 11:36pm UTC](https://discourse.processing.org/t/enemy-object-not-moving/11814 "2019-06-03T23:36:38Z")

</div>

Hi. i decided one day to make the dinosaur game in the chrome browser. it all worked fine, until i made the cactus.(i suck at programming, so don’t judge) The problem is that he( the cactus) is not moving, even if i assi…

---

## [How to adapt a library for Instance Mode (P5JS)](https://discourse.processing.org/t/how-to-adapt-a-library-for-instance-mode-p5js/11775)

<div class="topic-metadata">

**Author:** [@FreddieRa](https://discourse.processing.org/u/FreddieRa)\
**Replies:** 7\
**Last updated:** [June 3, 2019, 9:23pm UTC](https://discourse.processing.org/t/how-to-adapt-a-library-for-instance-mode-p5js/11775 "2019-06-03T21:23:12Z")

</div>

Hi there, I have already written the p5.3D library, for adding 3D text and images into WebGL, but currently this only works for Global Mode. I’m not sure exactly what needs to be done, or how it needs to be reformatted…

---

## [When can you use cos and sin outside of setup or draw](https://discourse.processing.org/t/when-can-you-use-cos-and-sin-outside-of-setup-or-draw/11805)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 4\
**Last updated:** [June 3, 2019, 6:22pm UTC](https://discourse.processing.org/t/when-can-you-use-cos-and-sin-outside-of-setup-or-draw/11805 "2019-06-03T18:22:42Z")

</div>

Is there any instances where you can do this. So far I understand that you can create a function outside of setup or draw which contain cos or sin, but they have to be called in draw or setup to work or it will give you …

---

## [Mirror-drawing and following mouse](https://discourse.processing.org/t/mirror-drawing-and-following-mouse/11661)

<div class="topic-metadata">

**Author:** [@linebp](https://discourse.processing.org/u/linebp)\
**Replies:** 4\
**Last updated:** [June 3, 2019, 12:23am UTC](https://discourse.processing.org/t/mirror-drawing-and-following-mouse/11661 "2019-06-03T00:23:55Z")

</div>

Hello Processing forum, I’m trying to create a programme where I can draw mirrored lines. My code looks like this: void setup() { fullScreen(); background(255); noStroke(); translate (width/2, 0); } void dr…

---

## [Optical mouse CAMERA](https://discourse.processing.org/t/optical-mouse-camera/11803)

<div class="topic-metadata">

**Author:** [@komats](https://discourse.processing.org/u/komats)\
**Replies:** 1\
**Last updated:** [June 3, 2019, 3:57pm UTC](https://discourse.processing.org/t/optical-mouse-camera/11803 "2019-06-03T15:57:57Z")

</div>

Hello all! Recently I discovered that an optical mouse can be hacked into a camera with a use of Arduino and Processing (from THIS video)! I bought a cheap mouse, opened it up. And for my surprise, the guts where differ…

---

## [FFT in p5.js p5.sound](https://discourse.processing.org/t/fft-in-p5-js-p5-sound/8265)

<div class="topic-metadata">

**Author:** [@srinivas](https://discourse.processing.org/u/srinivas)\
**Replies:** 4\
**Last updated:** [June 3, 2019, 1:06pm UTC](https://discourse.processing.org/t/fft-in-p5-js-p5-sound/8265 "2019-06-03T13:06:05Z")

</div>

How is FFT done in p5.sound… i need fft Algorithm of p5.FFT .please…

---

## [Does anyone know how I can make that (mesh)](https://discourse.processing.org/t/does-anyone-know-how-i-can-make-that-mesh/11783)

<div class="topic-metadata">

**Author:** [@Eyvindr](https://discourse.processing.org/u/Eyvindr)\
**Replies:** 2\
**Last updated:** [June 3, 2019, 11:13am UTC](https://discourse.processing.org/t/does-anyone-know-how-i-can-make-that-mesh/11783 "2019-06-03T11:13:49Z")

</div>

Does anyone knows how to make one of these? I am really trying my best, but somehow can’t figure it out… I have to do this as a project in uni. I have to include the pattern in a letter. I would very much appreciate …

---

## [Noise grid stops moving after a while](https://discourse.processing.org/t/noise-grid-stops-moving-after-a-while/11704)

<div class="topic-metadata">

**Author:** [@madsogstrup](https://discourse.processing.org/u/madsogstrup)\
**Replies:** 3\
**Last updated:** [June 3, 2019, 5:16am UTC](https://discourse.processing.org/t/noise-grid-stops-moving-after-a-while/11704 "2019-06-03T05:16:13Z")

</div>

Hello! I have this code that is doing what i want. But i would like for it to keep “animating” in eternity. I think i know why i stops, but I don’t know how to explain it properly or do anything about it. :slight\_smile…

---

## [Problem with "String Index Out Of Bounds Exception"](https://discourse.processing.org/t/problem-with-string-index-out-of-bounds-exception/11790)

<div class="topic-metadata">

**Author:** [@ToastyOosty](https://discourse.processing.org/u/ToastyOosty)\
**Replies:** 5\
**Last updated:** [June 3, 2019, 12:57am UTC](https://discourse.processing.org/t/problem-with-string-index-out-of-bounds-exception/11790 "2019-06-03T00:57:12Z")

</div>

So I’m writing this code for a small project I’m working and I keep getting the error message “StringIndexOutOfBoundsException: String index out of range: 0” I won’t post the entire code cause its a bit long but here’s …

---

## [Updating void draw() while another function is in a loop](https://discourse.processing.org/t/updating-void-draw-while-another-function-is-in-a-loop/11787)

<div class="topic-metadata">

**Author:** [@SoulT](https://discourse.processing.org/u/SoulT)\
**Replies:** 2\
**Last updated:** [June 2, 2019, 8:53pm UTC](https://discourse.processing.org/t/updating-void-draw-while-another-function-is-in-a-loop/11787 "2019-06-02T20:53:12Z")

</div>

Hi guys, I’m having a bit of trouble with something. I have a FOR loop that’s running inside of a function. The loop loads a few file names from a website, and then adds them to a list. My goal is to have the program u…

---

## [What is your prefered UI library for your sketches?](https://discourse.processing.org/t/what-is-your-prefered-ui-library-for-your-sketches/11623)

<div class="topic-metadata">

**Author:** [@yairkass](https://discourse.processing.org/u/yairkass)\
**Replies:** 7\
**Last updated:** [June 2, 2019, 8:30pm UTC](https://discourse.processing.org/t/what-is-your-prefered-ui-library-for-your-sketches/11623 "2019-06-02T20:30:27Z")

</div>

hey all, For the last couple of years that I’ve been coding with Processing, I used only ControlP5 for UI stuff. It’s been great but I am very curious what other people are using for UI these days. Thanks, Yair :gri…

---

## [Moving and cutting](https://discourse.processing.org/t/moving-and-cutting/11777)

<div class="topic-metadata">

**Author:** [@BallazX](https://discourse.processing.org/u/BallazX)\
**Replies:** 7\
**Last updated:** [June 2, 2019, 7:49pm UTC](https://discourse.processing.org/t/moving-and-cutting/11777 "2019-06-02T19:49:03Z")

</div>

Hey Guys, I’m trying to do some demo project. What I’d like to do is draw some lines and a rectangle. Those part of the lines will be invisible which are out of the rectangle. I give the end-coordinates of the lines by …

---

## [Run P5 from the command line?](https://discourse.processing.org/t/run-p5-from-the-command-line/11641)

<div class="topic-metadata">

**Author:** [@lfb](https://discourse.processing.org/u/lfb)\
**Replies:** 2\
**Last updated:** [June 2, 2019, 7:37pm UTC](https://discourse.processing.org/t/run-p5-from-the-command-line/11641 "2019-06-02T19:37:26Z")

</div>

Hello friends. First post. I’d like to create sketches that take hours to produce an image that can then be written out to an image file. I’d like to run this from the command line and let it run overnight. How? I can ru…

---

## [Using a complex numbers library -- Apache math](https://discourse.processing.org/t/using-a-complex-numbers-library-apache-math/11771)

<div class="topic-metadata">

**Author:** [@toby](https://discourse.processing.org/u/toby)\
**Replies:** 4\
**Last updated:** [June 2, 2019, 6:10pm UTC](https://discourse.processing.org/t/using-a-complex-numbers-library-apache-math/11771 "2019-06-02T18:10:02Z")

</div>

Hello all, I’m working on a sketch for generating fractals and would like to replace my hand-rolled complex math functions with a “proper” library :slight\_smile: I’ve downloaded the jar for Adobe Commons Math to “sketch…

---

## [How to add libraries to p5 Web editor?](https://discourse.processing.org/t/how-to-add-libraries-to-p5-web-editor/11769)

<div class="topic-metadata">

**Author:** [@TurboFanny](https://discourse.processing.org/u/TurboFanny)\
**Replies:** 1\
**Last updated:** [June 2, 2019, 9:17am UTC](https://discourse.processing.org/t/how-to-add-libraries-to-p5-web-editor/11769 "2019-06-02T09:17:18Z")

</div>

I am new to using p5 and am struggling to find out how to add libraries to the web editor. :upside\_down\_face::upside\_down\_face:

---

## [Using clear() correctly, Magic Leap Example](https://discourse.processing.org/t/using-clear-correctly-magic-leap-example/11747)

<div class="topic-metadata">

**Author:** [@Zevensuy](https://discourse.processing.org/u/Zevensuy)\
**Replies:** 1\
**Last updated:** [June 2, 2019, 6:04am UTC](https://discourse.processing.org/t/using-clear-correctly-magic-leap-example/11747 "2019-06-02T06:04:57Z")

</div>

Hi all, I am working on some examples of using p5js with the Magic Leap One Headset. The Magic Leap comes built in with its own browser called Helios. One of the “tricks” that the browser can do is set basically a transp…

---

## [Data from txt file](https://discourse.processing.org/t/data-from-txt-file/11764)

<div class="topic-metadata">

**Author:** [@GuilhermeVolker](https://discourse.processing.org/u/GuilhermeVolker)\
**Replies:** 3\
**Last updated:** [June 2, 2019, 5:27am UTC](https://discourse.processing.org/t/data-from-txt-file/11764 "2019-06-02T05:27:08Z")

</div>

I have to read a file with 4000 lines or more, when i run this code the sketch reads something near to 500 lines only. Is there some kind of limitation? i’d try with double variables too but didan’t work. //global varia…

---

## [How do the p5.js preload functions work?](https://discourse.processing.org/t/how-do-the-p5-js-preload-functions-work/3767)

<div class="topic-metadata">

**Author:** [@FirstProphet](https://discourse.processing.org/u/FirstProphet)\
**Replies:** 6\
**Last updated:** [June 1, 2019, 7:48pm UTC](https://discourse.processing.org/t/how-do-the-p5-js-preload-functions-work/3767 "2019-06-01T19:48:28Z")

</div>

I’m just interested in how it was implemented that functions like loadFont() or loadImage() can be called with a callback or in the preload function. How does p5.js know, when preload is done and when it is save to call …

---

## [Help, with projectile motion in game](https://discourse.processing.org/t/help-with-projectile-motion-in-game/11760)

<div class="topic-metadata">

**Author:** [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Replies:** 3\
**Last updated:** [June 1, 2019, 7:16pm UTC](https://discourse.processing.org/t/help-with-projectile-motion-in-game/11760 "2019-06-01T19:16:56Z")

</div>

I’m making a game with a digger, at the moment I’ve added a fire mechanism which shoots little projectile, this was just a test to see if I could code it. It works however I do not understand how to adjust for the vehicl…

---

## [How to put a "replay" button on my game?](https://discourse.processing.org/t/how-to-put-a-replay-button-on-my-game/11676)

<div class="topic-metadata">

**Author:** [@sachy](https://discourse.processing.org/u/sachy)\
**Replies:** 2\
**Last updated:** [June 1, 2019, 5:41pm UTC](https://discourse.processing.org/t/how-to-put-a-replay-button-on-my-game/11676 "2019-06-01T17:41:59Z")

</div>

Hello everyone, i made a small game with processing (coded in JAVA) for my exams. But i still don’t know how to replay the game when it’s lost. I already searched on the net and tried few things but it doesn’t work. So I…

---

## [Using filter() with glvideo](https://discourse.processing.org/t/using-filter-with-glvideo/11758)

<div class="topic-metadata">

**Author:** [@admiralpiett](https://discourse.processing.org/u/admiralpiett)\
**Replies:** 0\
**Last updated:** [June 1, 2019, 5:20pm UTC](https://discourse.processing.org/t/using-filter-with-glvideo/11758 "2019-06-01T17:20:43Z")

</div>

Hi; Is there any way to use the filters or shaders with the glvideo? I’m trying to invert the video but the filter(INVERT) doesn’t work. I have also tried using Pshader invert to no avail. Thanks.

---

## [Trouble activating the four arrow keys at the same time](https://discourse.processing.org/t/trouble-activating-the-four-arrow-keys-at-the-same-time/11753)

<div class="topic-metadata">

**Author:** [@Yamanqui](https://discourse.processing.org/u/Yamanqui)\
**Replies:** 2\
**Last updated:** [June 1, 2019, 11:55am UTC](https://discourse.processing.org/t/trouble-activating-the-four-arrow-keys-at-the-same-time/11753 "2019-06-01T11:55:41Z")

</div>

I’m making a game that requires the user to press different combinations of the arrow keys for different moves. But I’m having trouble when they need to press 3 or 4 keys at the same time. I wrote a very simple example …

---

## [How draw rect() with texture with alpha channel?](https://discourse.processing.org/t/how-draw-rect-with-texture-with-alpha-channel/11755)

<div class="topic-metadata">

**Author:** [@erkosone](https://discourse.processing.org/u/erkosone)\
**Replies:** 3\
**Last updated:** [June 1, 2019, 11:11am UTC](https://discourse.processing.org/t/how-draw-rect-with-texture-with-alpha-channel/11755 "2019-06-01T11:11:51Z")

</div>

i have this problem… in 2d the problem not exists… but in 3d when i draw boxes… apears background color in sprites… sprites are drawed with a simple shape with rect()

---

## [Kinect image mapping](https://discourse.processing.org/t/kinect-image-mapping/11445)

<div class="topic-metadata">

**Author:** [@Anstar](https://discourse.processing.org/u/Anstar)\
**Replies:** 5\
**Last updated:** [June 1, 2019, 10:48am UTC](https://discourse.processing.org/t/kinect-image-mapping/11445 "2019-06-01T10:48:03Z")

</div>

Hi guys, as part of a community project for a local library and some school credits (not getting marked on my code or processing!) My goal is to have a kinect set up and have people’s silhouettes made up of words (simil…

---

## [Random and If Else help](https://discourse.processing.org/t/random-and-if-else-help/11718)

<div class="topic-metadata">

**Author:** [@b3pkay](https://discourse.processing.org/u/b3pkay)\
**Replies:** 10\
**Last updated:** [June 1, 2019, 12:22am UTC](https://discourse.processing.org/t/random-and-if-else-help/11718 "2019-06-01T00:22:09Z")

</div>

Hello, I am making a “drawing” program and running into an issue. I’ve written a smaller, less complex sample of the program pasted below and am hoping someone can help. Essentially, I want to draw rectangles within a ce…

---

## [So close... how to display images from RSS](https://discourse.processing.org/t/so-close-how-to-display-images-from-rss/11750)

<div class="topic-metadata">

**Author:** [@Artie\_veirkant\_sux](https://discourse.processing.org/u/Artie_veirkant_sux)\
**Replies:** 0\
**Last updated:** [May 31, 2019, 11:36pm UTC](https://discourse.processing.org/t/so-close-how-to-display-images-from-rss/11750 "2019-05-31T23:36:29Z")

</div>

Hey again, Returning after some code tweaks, I still can’t get images to display from RSS. I’ve significantly refactored my code and have successfully created a tool for grabbing and loading images. The problem arises w…

---

## [Problema con Class, extend y herencia](https://discourse.processing.org/t/problema-con-class-extend-y-herencia/11204)

<div class="topic-metadata">

**Author:** [@aledante](https://discourse.processing.org/u/aledante)\
**Replies:** 12\
**Last updated:** [May 31, 2019, 11:08pm UTC](https://discourse.processing.org/t/problema-con-class-extend-y-herencia/11204 "2019-05-31T23:08:47Z")

</div>

Hola a todos. Este es mi primer post. Soy bastante nuevo en esto. Estoy haciendo una clase, supongamos “animales”. Dentro de la misma tengo un procedimiento “void hijo”, que crea una copia de si misma con algunas varia…

---

## [Making things happen sequentially within an array](https://discourse.processing.org/t/making-things-happen-sequentially-within-an-array/11749)

<div class="topic-metadata">

**Author:** [@Hetoft](https://discourse.processing.org/u/Hetoft)\
**Replies:** 1\
**Last updated:** [May 31, 2019, 10:59pm UTC](https://discourse.processing.org/t/making-things-happen-sequentially-within-an-array/11749 "2019-05-31T22:59:41Z")

</div>

Hi there, I’m trying to display all the objects in an array, not all at once, but one after the other. Basically, what my code does is to load sequences of SVGs and then display them as one fluent animation. What I wan…

---

## [Create randomly placed circles loop not working(runtime error)](https://discourse.processing.org/t/create-randomly-placed-circles-loop-not-working-runtime-error/11719)

<div class="topic-metadata">

**Author:** [@dakito](https://discourse.processing.org/u/dakito)\
**Replies:** 3\
**Last updated:** [May 31, 2019, 10:39pm UTC](https://discourse.processing.org/t/create-randomly-placed-circles-loop-not-working-runtime-error/11719 "2019-05-31T22:39:34Z")

</div>

So I am making a game where you would click on randomly appearing circles, and for the sake of reusability and self-improvement I have chosen to use for loops and arrays for the first time. After some unexpected results…

---

## [Importing animated vector graphics?](https://discourse.processing.org/t/importing-animated-vector-graphics/11627)

<div class="topic-metadata">

**Author:** [@Hetoft](https://discourse.processing.org/u/Hetoft)\
**Replies:** 6\
**Last updated:** [May 31, 2019, 9:19pm UTC](https://discourse.processing.org/t/importing-animated-vector-graphics/11627 "2019-05-31T21:19:30Z")

</div>

Hi there, I did some small animations in After Effects and want them included in my Processing project. I know that I could display GIFs, but since AE allows me to export animated SVGs (as JSON files) by the help of a p…

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

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