# Latest

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

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

**Page:** 299

---

## [How to write my code so that it adjusts to mobile screen for p5.js?](https://discourse.processing.org/t/how-to-write-my-code-so-that-it-adjusts-to-mobile-screen-for-p5-js/24456)

<div class="topic-metadata">

**Author:** [@sam101](https://discourse.processing.org/u/sam101)\
**Replies:** 1\
**Last updated:** [October 9, 2020, 7:02am UTC](https://discourse.processing.org/t/how-to-write-my-code-so-that-it-adjusts-to-mobile-screen-for-p5-js/24456 "2020-10-09T07:02:22Z")

</div>

Hey everyone, I was just wondering if I have a code that when I upload it as a website it works on a desktop, but then how would I write it out so that it also adjusts to a mobile screen as well. The code is in p5.js and…

---

## [Ways to hide the HTML text-input box? Or alternatives?](https://discourse.processing.org/t/ways-to-hide-the-html-text-input-box-or-alternatives/24429)

<div class="topic-metadata">

**Author:** [@aith](https://discourse.processing.org/u/aith)\
**Replies:** 4\
**Last updated:** [October 9, 2020, 4:22am UTC](https://discourse.processing.org/t/ways-to-hide-the-html-text-input-box-or-alternatives/24429 "2020-10-09T04:22:34Z")

</div>

Hi! I’m using p5 to fake a retro computer terminal for a spooky game. I want the user to be able to type in the terminal, but I find the html text-input box to be visually jarring. Is there a way to let the user click o…

---

## [Can I use shaders with electron and p5js?](https://discourse.processing.org/t/can-i-use-shaders-with-electron-and-p5js/24444)

<div class="topic-metadata">

**Author:** [@stephanschulz](https://discourse.processing.org/u/stephanschulz)\
**Replies:** 3\
**Last updated:** [October 9, 2020, 4:20am UTC](https://discourse.processing.org/t/can-i-use-shaders-with-electron-and-p5js/24444 "2020-10-09T04:20:17Z")

</div>

I am able to run this template, which create an electron app with p5js code. But as soon as I add shader loading the app displays a black window. Everything works fine when running the same code through Brackets as a…

---

## [pv.random3D(target, parent);](https://discourse.processing.org/t/pv-random3d-target-parent/24442)

<div class="topic-metadata">

**Author:** [@J\_Silva](https://discourse.processing.org/u/J_Silva)\
**Replies:** 10\
**Last updated:** [October 9, 2020, 4:04am UTC](https://discourse.processing.org/t/pv-random3d-target-parent/24442 "2020-10-09T04:04:09Z")

</div>

Hi. Could someone explain when pv.random3D(target, parent); is used? like PVector pv = PVector.random3D(this); What are target and parent referring to?

---

## [Pregunta mouseDragged , control en función draw](https://discourse.processing.org/t/pregunta-mousedragged-control-en-funcion-draw/24447)

<div class="topic-metadata">

**Author:** [@TiagoNess](https://discourse.processing.org/u/TiagoNess)\
**Replies:** 2\
**Last updated:** [October 9, 2020, 1:50am UTC](https://discourse.processing.org/t/pregunta-mousedragged-control-en-funcion-draw/24447 "2020-10-09T01:50:15Z")

</div>

please format code with \</\> button \* homework policy \* asking questions Hola muchas gracias por la ayuda de antemano, tengo el siguiente código, y quiero que no pinte la elipse de la posición (0,0). Quiero que funcion…

---

## [How to check for similar number in array and bring out a error sign](https://discourse.processing.org/t/how-to-check-for-similar-number-in-array-and-bring-out-a-error-sign/24454)

<div class="topic-metadata">

**Author:** [@newtothis](https://discourse.processing.org/u/newtothis)\
**Replies:** 6\
**Last updated:** [October 8, 2020, 10:59pm UTC](https://discourse.processing.org/t/how-to-check-for-similar-number-in-array-and-bring-out-a-error-sign/24454 "2020-10-08T22:59:10Z")

</div>

please format code with \</\> button \* homework policy \* asking questions for(int iIndex=0;iIndex\<6; iIndex++) { fill(67, 214, 250); text(iArray\[iIn…

---

## [Autostart a program](https://discourse.processing.org/t/autostart-a-program/24368)

<div class="topic-metadata">

**Author:** [@KNealO96](https://discourse.processing.org/u/KNealO96)\
**Replies:** 10\
**Last updated:** [October 8, 2020, 10:26pm UTC](https://discourse.processing.org/t/autostart-a-program/24368 "2020-10-08T22:26:09Z")

</div>

I would like to start a sketch automatically on startup. Is that possible?

---

## [Cant change SDK location](https://discourse.processing.org/t/cant-change-sdk-location/24348)

<div class="topic-metadata">

**Author:** [@alaricdragon](https://discourse.processing.org/u/alaricdragon)\
**Replies:** 2\
**Last updated:** [October 8, 2020, 5:53pm UTC](https://discourse.processing.org/t/cant-change-sdk-location/24348 "2020-10-08T17:53:17Z")

</div>

I have no idea what I am doing, and failed to manually install my ‘SDK’ correctly, (or maybe the chosen ‘path’ I used was not right) and now I have to change my ‘path’ to my ‘SDK’ dose anyone know how to change this? or…

---

## [How to determine ratio of growth of figure based on distance?](https://discourse.processing.org/t/how-to-determine-ratio-of-growth-of-figure-based-on-distance/24441)

<div class="topic-metadata">

**Author:** [@silphonix](https://discourse.processing.org/u/silphonix)\
**Replies:** 7\
**Last updated:** [October 8, 2020, 5:26pm UTC](https://discourse.processing.org/t/how-to-determine-ratio-of-growth-of-figure-based-on-distance/24441 "2020-10-08T17:26:47Z")

</div>

Hi, I’m new to Processing. I wanted to know the best/simpliest method to achive the following: I need to move a square from right to left and make it scale while moving. The square must be 2x2 at the beggining, and en…

---

## [Advice for Assembly Language](https://discourse.processing.org/t/advice-for-assembly-language/24097)

<div class="topic-metadata">

**Author:** [@adisharma](https://discourse.processing.org/u/adisharma)\
**Replies:** 2\
**Last updated:** [October 8, 2020, 3:09pm UTC](https://discourse.processing.org/t/advice-for-assembly-language/24097 "2020-10-08T15:09:28Z")

</div>

Hello All, Can anyone suggest me which assembly language tutorial is best? I am working on some projects which need assembly programming, So I want to learn it. Does anyone know best tutorial?

---

## [Indexing for (datatype element : array) loops](https://discourse.processing.org/t/indexing-for-datatype-element-array-loops/24406)

<div class="topic-metadata">

**Author:** [@RFullum](https://discourse.processing.org/u/RFullum)\
**Replies:** 5\
**Last updated:** [October 8, 2020, 2:34pm UTC](https://discourse.processing.org/t/indexing-for-datatype-element-array-loops/24406 "2020-10-08T14:34:43Z")

</div>

I’ve been trying to figure out if there’s a simple way to extract the index of the iteration through a for-loop when using the for(elements in an array) style iteration. It’s simple enough using the for(init; test; upda…

---

## [How to save a previous mouse position](https://discourse.processing.org/t/how-to-save-a-previous-mouse-position/24434)

<div class="topic-metadata">

**Author:** [@moms\_spaghetti](https://discourse.processing.org/u/moms_spaghetti)\
**Replies:** 1\
**Last updated:** [October 8, 2020, 12:58pm UTC](https://discourse.processing.org/t/how-to-save-a-previous-mouse-position/24434 "2020-10-08T12:58:43Z")

</div>

Hello I am having a problem with trying to connect dots ,everytime I click on a position with my mouse I create a dot and what is supposed to happen is that the dots get connected with a line. For this I need to save th…

---

## [How to get the words to appear in a horizontal line rather than vertical line in p5.js?](https://discourse.processing.org/t/how-to-get-the-words-to-appear-in-a-horizontal-line-rather-than-vertical-line-in-p5-js/24430)

<div class="topic-metadata">

**Author:** [@sam101](https://discourse.processing.org/u/sam101)\
**Replies:** 2\
**Last updated:** [October 8, 2020, 12:35pm UTC](https://discourse.processing.org/t/how-to-get-the-words-to-appear-in-a-horizontal-line-rather-than-vertical-line-in-p5-js/24430 "2020-10-08T12:35:20Z")

</div>

Hey everyone I was just wondering how do I get the words to appear in a horizontal line rather than a vertical line in this code??? any help would be great! var myText = 'S H O U T'; var words; function setup() { cr…

---

## [Quad() gets drawn twice](https://discourse.processing.org/t/quad-gets-drawn-twice/24382)

<div class="topic-metadata">

**Author:** [@theqxy](https://discourse.processing.org/u/theqxy)\
**Replies:** 13\
**Last updated:** [October 8, 2020, 11:58am UTC](https://discourse.processing.org/t/quad-gets-drawn-twice/24382 "2020-10-08T11:58:16Z")

</div>

Hello, everyone. Lately I’ve been casually working through Daniel Shiffman’s book Learning Processing, to better familiarize myself with Processing. I was working on exercise 14-5 in the book: “Create a three-dimension…

---

## [Better Fast Moving Object Collision Detection](https://discourse.processing.org/t/better-fast-moving-object-collision-detection/23150)

<div class="topic-metadata">

**Author:** [@chuchu](https://discourse.processing.org/u/chuchu)\
**Replies:** 1\
**Last updated:** [October 8, 2020, 9:36am UTC](https://discourse.processing.org/t/better-fast-moving-object-collision-detection/23150 "2020-10-08T09:36:58Z")

</div>

Following on from this post: https://discourse.processing.org/t/double-hit-on-object-collision-and-repeat-trigger/22970 I’m now focusing on the collision detection algorithm used in my program, rather than the simple de…

---

## [Trouble with Vector.add](https://discourse.processing.org/t/trouble-with-vector-add/24170)

<div class="topic-metadata">

**Author:** [@noonscoomo](https://discourse.processing.org/u/noonscoomo)\
**Replies:** 3\
**Last updated:** [October 8, 2020, 7:27am UTC](https://discourse.processing.org/t/trouble-with-vector-add/24170 "2020-10-08T07:27:40Z")

</div>

Hi, I am in trouble with the p5.Vector.add() method and I don’t see why. My code generates a 2D Vector in setup, adds a random 2D vector in draw, pushes the result in an array and draws the whole array in a loop. If I …

---

## [Is there a way to extract samples from an audio file?](https://discourse.processing.org/t/is-there-a-way-to-extract-samples-from-an-audio-file/24423)

<div class="topic-metadata">

**Author:** [@Grimtin10](https://discourse.processing.org/u/Grimtin10)\
**Replies:** 0\
**Last updated:** [October 8, 2020, 3:42am UTC](https://discourse.processing.org/t/is-there-a-way-to-extract-samples-from-an-audio-file/24423 "2020-10-08T03:42:00Z")

</div>

Is there a way to extract every individual sample from an audio file for processing? I want to do things with samples from audio files, but I’m not sure how to do that. It doesn’t matter what format of audio file, alth…

---

## [Online editor for processing](https://discourse.processing.org/t/online-editor-for-processing/24398)

<div class="topic-metadata">

**Author:** [@ch3](https://discourse.processing.org/u/ch3)\
**Replies:** 4\
**Last updated:** [October 8, 2020, 2:13am UTC](https://discourse.processing.org/t/online-editor-for-processing/24398 "2020-10-08T02:13:49Z")

</div>

Is there something similar to editor.p5js.org for processing? I’d like to introduce my houdini students to some basic programming terms and concepts, starting with datatypes. It may be more convenient for them to exper…

---

## [Processing formatter for VSCode](https://discourse.processing.org/t/processing-formatter-for-vscode/24421)

<div class="topic-metadata">

**Author:** [@millennIumAMbiguity](https://discourse.processing.org/u/millennIumAMbiguity)\
**Replies:** 0\
**Last updated:** [October 7, 2020, 10:35pm UTC](https://discourse.processing.org/t/processing-formatter-for-vscode/24421 "2020-10-07T22:35:23Z")

</div>

Working on a Processing formatter for VSCode, feel free to check it out. It’s still unfinished, so don’t go too hard on it. processing-formatter

---

## [WEBGL get the specific lineVertexes of a shape](https://discourse.processing.org/t/webgl-get-the-specific-linevertexes-of-a-shape/24399)

<div class="topic-metadata">

**Author:** [@SamuelCobb](https://discourse.processing.org/u/SamuelCobb)\
**Replies:** 1\
**Last updated:** [October 8, 2020, 12:11am UTC](https://discourse.processing.org/t/webgl-get-the-specific-linevertexes-of-a-shape/24399 "2020-10-08T00:11:07Z")

</div>

I am trying to make a ray-triangle intersection for a library that I am working on. My problem is not the actual ray-intersection algorithm, since I already have that ready. My issue is that I cannot access the individu…

---

## [Multiple windows, same thread or seperate?](https://discourse.processing.org/t/multiple-windows-same-thread-or-seperate/24375)

<div class="topic-metadata">

**Author:** [@Tomfoolery](https://discourse.processing.org/u/Tomfoolery)\
**Replies:** 2\
**Last updated:** [October 8, 2020, 12:05am UTC](https://discourse.processing.org/t/multiple-windows-same-thread-or-seperate/24375 "2020-10-08T00:05:06Z")

</div>

So according to this post here: Every window you run with runSketch has its own animation thread. To test this out, I had a single window draw 100 ellipses per frame at 60 frames per second, then I had it draw 400 …

---

## [A question about coding (bar chart race)](https://discourse.processing.org/t/a-question-about-coding-bar-chart-race/24319)

<div class="topic-metadata">

**Author:** [@DubTheGamer](https://discourse.processing.org/u/DubTheGamer)\
**Replies:** 16\
**Last updated:** [October 6, 2020, 7:28pm UTC](https://discourse.processing.org/t/a-question-about-coding-bar-chart-race/24319 "2020-10-06T19:28:16Z")

</div>

So I’m new to Processing 3, and would love to know how to make a bar chart race similar to this one: https://www.youtube.com/watch?v=ZkcaANwCrMQ

---

## [Game collision dection problem](https://discourse.processing.org/t/game-collision-dection-problem/24415)

<div class="topic-metadata">

**Author:** [@lupos](https://discourse.processing.org/u/lupos)\
**Replies:** 0\
**Last updated:** [October 7, 2020, 5:54pm UTC](https://discourse.processing.org/t/game-collision-dection-problem/24415 "2020-10-07T17:54:25Z")

</div>

hi this is for a university project. on line 223 I am having trouble making so the player doesn’t go over the water. I cant figure out a way for the player to not move over the water without the player getting stuck cou…

---

## [CodeTrain Circlepacking with random sticky colors](https://discourse.processing.org/t/codetrain-circlepacking-with-random-sticky-colors/24390)

<div class="topic-metadata">

**Author:** [@keddefar](https://discourse.processing.org/u/keddefar)\
**Replies:** 2\
**Last updated:** [October 7, 2020, 11:26am UTC](https://discourse.processing.org/t/codetrain-circlepacking-with-random-sticky-colors/24390 "2020-10-07T11:26:46Z")

</div>

Hi there - very new to Processing, so be gentle :slight\_smile: Starting with some coding train tutorials and modding a bit along the way, below code is an example of that. I want to fill the circles with colors from a …

---

## [Button clicked when not visible](https://discourse.processing.org/t/button-clicked-when-not-visible/23887)

<div class="topic-metadata">

**Author:** [@Ladan](https://discourse.processing.org/u/Ladan)\
**Replies:** 3\
**Last updated:** [October 7, 2020, 11:20am UTC](https://discourse.processing.org/t/button-clicked-when-not-visible/23887 "2020-10-07T11:20:54Z")

</div>

When clicking the Quiz button at a point, where the “richtig” or the “falsch” button would be, like on the left of the i, im not shown the first question, but the result screen, so the question is answered with the click…

---

## [Mouse moved() function](https://discourse.processing.org/t/mouse-moved-function/24373)

<div class="topic-metadata">

**Author:** [@thughes](https://discourse.processing.org/u/thughes)\
**Replies:** 7\
**Last updated:** [October 7, 2020, 10:46am UTC](https://discourse.processing.org/t/mouse-moved-function/24373 "2020-10-07T10:46:16Z")

</div>

This is what I am trying to re-create. I have this so far…i have the 1st square, but i don’t know how to get the last 3. void setup() {size (400, 400); background (0);} int value = 0; void draw() { fill(255, 255,…

---

## [XYScope and FFT sketch - Assign audio input?](https://discourse.processing.org/t/xyscope-and-fft-sketch-assign-audio-input/24400)

<div class="topic-metadata">

**Author:** [@thagreatbelow](https://discourse.processing.org/u/thagreatbelow)\
**Replies:** 3\
**Last updated:** [October 7, 2020, 9:13am UTC](https://discourse.processing.org/t/xyscope-and-fft-sketch-assign-audio-input/24400 "2020-10-07T09:13:46Z")

</div>

Hello all, I’m trying to figure out how to get this particular sketch to function properly, and I assume I’m doing something wrong as that’s generally the case. The code can be found here https://forum.processing.org/two…

---

## [Convolution Solution? Changing size and shape](https://discourse.processing.org/t/convolution-solution-changing-size-and-shape/24393)

<div class="topic-metadata">

**Author:** [@stellakramer](https://discourse.processing.org/u/stellakramer)\
**Replies:** 1\
**Last updated:** [October 7, 2020, 8:54am UTC](https://discourse.processing.org/t/convolution-solution-changing-size-and-shape/24393 "2020-10-07T08:54:16Z")

</div>

Hellooo, I have a question. I’m very much a beginner to Processing and I’m kind of struggling to figure everything out. For an art installation I’m making right now I’m using processing to hopefully make a visual that c…

---

## [Can i de-load or selectively load in images?](https://discourse.processing.org/t/can-i-de-load-or-selectively-load-in-images/24392)

<div class="topic-metadata">

**Author:** [@jstodd](https://discourse.processing.org/u/jstodd)\
**Replies:** 2\
**Last updated:** [October 7, 2020, 8:35am UTC](https://discourse.processing.org/t/can-i-de-load-or-selectively-load-in-images/24392 "2020-10-07T08:35:14Z")

</div>

Im having performance problems in my application due to i believe a lot of different images and files being loaded in at once. My program starts off fast, but gets slower over time. I believe this is a memory issue and …

---

## [A question about my code (video)](https://discourse.processing.org/t/a-question-about-my-code-video/24329)

<div class="topic-metadata">

**Author:** [@8SU](https://discourse.processing.org/u/8SU)\
**Replies:** 4\
**Last updated:** [October 7, 2020, 6:19am UTC](https://discourse.processing.org/t/a-question-about-my-code-video/24329 "2020-10-07T06:19:57Z")

</div>

So I’m new to Processing 3, and i can’t understand this issue import processing.video.\*; Capture cam; Capture G; Capture B; Capture R; int capW = 320; int capH = 240; int nDelayFrames = 20; // about 3 seconds (3s…

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

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