# Latest

**URL:** https://discourse.processing.org/latest.md?no_subcategories=false&page=126

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

**Page:** 127

---

## [How do I use a method in other Processing projects?](https://discourse.processing.org/t/how-do-i-use-a-method-in-other-processing-projects/37863)

<div class="topic-metadata">

**Author:** [@Random\_Ghost](https://discourse.processing.org/u/Random_Ghost)\
**Replies:** 1\
**Last updated:** [July 6, 2022, 9:39pm UTC](https://discourse.processing.org/t/how-do-i-use-a-method-in-other-processing-projects/37863 "2022-07-06T21:39:50Z")

</div>

I created a function that takes an image and returns a similar version of the image but with Gameboy graphics. Is there a way I can sort of save the function so I can use it in other projects similar to the way we use fu…

---

## [Combining the copy and blend functions into a 'brush'](https://discourse.processing.org/t/combining-the-copy-and-blend-functions-into-a-brush/37830)

<div class="topic-metadata">

**Author:** [@JonoCES](https://discourse.processing.org/u/JonoCES)\
**Replies:** 6\
**Last updated:** [July 6, 2022, 7:26am UTC](https://discourse.processing.org/t/combining-the-copy-and-blend-functions-into-a-brush/37830 "2022-07-06T07:26:08Z")

</div>

Hi, Processing beginner here! Go easy on me. I’m interested in making images with Processing and have an idea I’d like to try out, but I’m stuggling to find existing examples where it’s been done before. Here’s what I’m…

---

## [Trigger Mac shortcut on button click \[Processing\]](https://discourse.processing.org/t/trigger-mac-shortcut-on-button-click-processing/37785)

<div class="topic-metadata">

**Author:** [@LearnCode](https://discourse.processing.org/u/LearnCode)\
**Replies:** 4\
**Last updated:** [July 5, 2022, 10:07pm UTC](https://discourse.processing.org/t/trigger-mac-shortcut-on-button-click-processing/37785 "2022-07-05T22:07:12Z")

</div>

Hi All :slight\_smile: My name is Alwin, and I used Processing some years ago at college. And now, I want to use Processing again to prototype some UX hobby projects. I was curious if someone could maybe help me with a …

---

## [Pulling HTML data from my node.js server](https://discourse.processing.org/t/pulling-html-data-from-my-node-js-server/37849)

<div class="topic-metadata">

**Author:** [@PrinceSalmon](https://discourse.processing.org/u/PrinceSalmon)\
**Replies:** 1\
**Last updated:** [July 5, 2022, 7:04pm UTC](https://discourse.processing.org/t/pulling-html-data-from-my-node-js-server/37849 "2022-07-05T19:04:07Z")

</div>

Hello! Is it possible logging HTML data from a website (the number updates 60 times a secound) and then sending it to my arduino via serial? I want to pull certain data from the h1 from my HTML and then process and send…

---

## [Amplitude of oscillator using slider in p5.js](https://discourse.processing.org/t/amplitude-of-oscillator-using-slider-in-p5-js/37817)

<div class="topic-metadata">

**Author:** [@processing\_user](https://discourse.processing.org/u/processing_user)\
**Replies:** 7\
**Last updated:** [July 5, 2022, 5:33pm UTC](https://discourse.processing.org/t/amplitude-of-oscillator-using-slider-in-p5-js/37817 "2022-07-05T17:33:14Z")

</div>

i am following the tutorial https://www.youtube.com/watch?v=Bk8rLzzSink where frequency is changed using slider. how can i change the amplitude using slider in the same manner? i tried the following: function draw() { …

---

## [Examples from "Make: Getting Started with p5.js" not working](https://discourse.processing.org/t/examples-from-make-getting-started-with-p5-js-not-working/37835)

<div class="topic-metadata">

**Author:** [@MissAda](https://discourse.processing.org/u/MissAda)\
**Replies:** 4\
**Last updated:** [July 5, 2022, 3:21pm UTC](https://discourse.processing.org/t/examples-from-make-getting-started-with-p5-js-not-working/37835 "2022-07-05T15:21:03Z")

</div>

Hi hi, all! I’ve been working with p5 for a few months now. Going through the “getting started with p5.js” book from McCarthy + Reas. I’ve noticed that even if I copy the examples exactly as written, they sometimes don’t…

---

## [How to make tilemap/tileset from .png file?](https://discourse.processing.org/t/how-to-make-tilemap-tileset-from-png-file/37837)

<div class="topic-metadata">

**Author:** [@StasPovaliaevUkraine](https://discourse.processing.org/u/StasPovaliaevUkraine)\
**Replies:** 4\
**Last updated:** [July 5, 2022, 2:21pm UTC](https://discourse.processing.org/t/how-to-make-tilemap-tileset-from-png-file/37837 "2022-07-05T14:21:58Z")

</div>

Hello. Glory to Ukraine. I want to make a class that will render and display a tilemap, but I didn’t find any example how to this can be done, how to display part of the picture?

---

## [Com.github library?](https://discourse.processing.org/t/com-github-library/37843)

<div class="topic-metadata">

**Author:** [@remie92](https://discourse.processing.org/u/remie92)\
**Replies:** 6\
**Last updated:** [July 5, 2022, 12:46pm UTC](https://discourse.processing.org/t/com-github-library/37843 "2022-07-05T12:46:50Z")

</div>

Hello, I am trying to make a sketch using a library from github. Link to the library And in the example it imports a bunch of com.github.? files. but when I try to import them, it justs says: //the import command impo…

---

## [Problems with P2D and P3D renderers with new Apple M1 processor](https://discourse.processing.org/t/problems-with-p2d-and-p3d-renderers-with-new-apple-m1-processor/27287)

<div class="topic-metadata">

**Author:** [@RetProf](https://discourse.processing.org/u/RetProf)\
**Replies:** 5\
**Last updated:** [July 5, 2022, 11:54am UTC](https://discourse.processing.org/t/problems-with-p2d-and-p3d-renderers-with-new-apple-m1-processor/27287 "2022-07-05T11:54:08Z")

</div>

I have encountered an issue when trying to execute sketches that function and export correctly on an older MacBook Pro when these sketches are attempted to be run on a new MacBook Pro using a new M1 processor. I have tri…

---

## [Black to white and then white to black](https://discourse.processing.org/t/black-to-white-and-then-white-to-black/26307)

<div class="topic-metadata">

**Author:** [@Jayda](https://discourse.processing.org/u/Jayda)\
**Replies:** 30\
**Last updated:** [July 5, 2022, 10:03am UTC](https://discourse.processing.org/t/black-to-white-and-then-white-to-black/26307 "2022-07-05T10:03:42Z")

</div>

Why it doesn’t work? Want the background turn from black to white and then white to black. Thank you! let bg; function setup() { createCanvas(400, 400); bg = 255; } function draw() { background(bg); bg -= 1; i…

---

## [Default Font for ControlP5 lib](https://discourse.processing.org/t/default-font-for-controlp5-lib/37819)

<div class="topic-metadata">

**Author:** [@Ghostsss](https://discourse.processing.org/u/Ghostsss)\
**Replies:** 3\
**Last updated:** [July 5, 2022, 2:12am UTC](https://discourse.processing.org/t/default-font-for-controlp5-lib/37819 "2022-07-05T02:12:43Z")

</div>

Is there a way to change default font of ControlP5 library ?

---

## [How to find more description of ControlP5 lib functions](https://discourse.processing.org/t/how-to-find-more-description-of-controlp5-lib-functions/37766)

<div class="topic-metadata">

**Author:** [@Ghostsss](https://discourse.processing.org/u/Ghostsss)\
**Replies:** 6\
**Last updated:** [July 5, 2022, 12:49am UTC](https://discourse.processing.org/t/how-to-find-more-description-of-controlp5-lib-functions/37766 "2022-07-05T00:49:52Z")

</div>

Hello everyone, I am new to processing. I am using ControlP5 to create GUI. I am looking at examples of ControlP5 lib (which are great) and its website. However I am not able to figure out how to find the description …

---

## [Defining JSONArray with name but without array](https://discourse.processing.org/t/defining-jsonarray-with-name-but-without-array/37822)

<div class="topic-metadata">

**Author:** [@Ruchi](https://discourse.processing.org/u/Ruchi)\
**Replies:** 1\
**Last updated:** [July 4, 2022, 8:47am UTC](https://discourse.processing.org/t/defining-jsonarray-with-name-but-without-array/37822 "2022-07-04T08:47:22Z")

</div>

I am trying to define a JSONArray within a JSON object but I will be adding objects in array later. So when declaring it , I cannot use setJSONArray function. How can I retrieve it by getJSONArray function if I have no…

---

## [How do I capture the same webcam source on two machines](https://discourse.processing.org/t/how-do-i-capture-the-same-webcam-source-on-two-machines/37265)

<div class="topic-metadata">

**Author:** [@mario60](https://discourse.processing.org/u/mario60)\
**Replies:** 8\
**Last updated:** [July 3, 2022, 9:24pm UTC](https://discourse.processing.org/t/how-do-i-capture-the-same-webcam-source-on-two-machines/37265 "2022-07-03T21:24:34Z")

</div>

Hi I need some good hint on the following. It is not really a Processing question, but I need it for a Processing project. Say I have installed a Processing executable on two machines (say same OS). The script is such…

---

## [Url stream to canvas / frame updating](https://discourse.processing.org/t/url-stream-to-canvas-frame-updating/37810)

<div class="topic-metadata">

**Author:** [@Sofie](https://discourse.processing.org/u/Sofie)\
**Replies:** 8\
**Last updated:** [July 3, 2022, 6:27pm UTC](https://discourse.processing.org/t/url-stream-to-canvas-frame-updating/37810 "2022-07-03T18:27:25Z")

</div>

Hi, i’m struggeling to write a stream to the canvas. I can get one frame every time the sketch loads but its not updating the variable. My thought was that if i call image() in draw() it updates every cycle, but it doesn…

---

## [Microphone usage browser popup stops working](https://discourse.processing.org/t/microphone-usage-browser-popup-stops-working/37808)

<div class="topic-metadata">

**Author:** [@processing\_user](https://discourse.processing.org/u/processing_user)\
**Replies:** 3\
**Last updated:** [July 3, 2022, 2:14pm UTC](https://discourse.processing.org/t/microphone-usage-browser-popup-stops-working/37808 "2022-07-03T14:14:06Z")

</div>

I am using the microphone example here examples | p5.js and it works only but just for the first time. after page refresh the browser stops asking for microphone usage the program stops working. how can i re-enable the …

---

## [Two problems of using video capture](https://discourse.processing.org/t/two-problems-of-using-video-capture/37801)

<div class="topic-metadata">

**Author:** [@Yifan](https://discourse.processing.org/u/Yifan)\
**Replies:** 0\
**Last updated:** [July 3, 2022, 2:10am UTC](https://discourse.processing.org/t/two-problems-of-using-video-capture/37801 "2022-07-03T02:10:18Z")

</div>

Hello guys, yesterday I first tried to use video capture. I ran the example code in Daniel Shiffman’s book, learning processing, to display live video. But, the live video displayed is very choppy and laggy, meanwhile, t…

---

## [Cellular Automata without Animation](https://discourse.processing.org/t/cellular-automata-without-animation/37789)

<div class="topic-metadata">

**Author:** [@bcabc](https://discourse.processing.org/u/bcabc)\
**Replies:** 6\
**Last updated:** [July 2, 2022, 8:23pm UTC](https://discourse.processing.org/t/cellular-automata-without-animation/37789 "2022-07-02T20:23:32Z")

</div>

I’ve been following along with Daniel Shiffman’s Cellular Automata tutorials (the code is here: noc-examples-processing/chp07\_CA at master · arianatri/noc-examples-processing · GitHub). And I’ve noticed that most CA see…

---

## [P5.js editor for mobile device](https://discourse.processing.org/t/p5-js-editor-for-mobile-device/37709)

<div class="topic-metadata">

**Author:** [@skybosi](https://discourse.processing.org/u/skybosi)\
**Replies:** 1\
**Last updated:** [July 2, 2022, 5:57pm UTC](https://discourse.processing.org/t/p5-js-editor-for-mobile-device/37709 "2022-07-02T17:57:10Z")

</div>

About a month ago, I accidentally discovered p5.js, which was very amazing. Later, I tried related functions and browsed openprocessing . I found it interesting. As a programmer, I tried to find a suitable editor to pla…

---

## [Sketch using p5-wrapper-react not receiving props on route change but is receiving them on page refresh, reload](https://discourse.processing.org/t/sketch-using-p5-wrapper-react-not-receiving-props-on-route-change-but-is-receiving-them-on-page-refresh-reload/37797)

<div class="topic-metadata">

**Author:** [@hifilorau](https://discourse.processing.org/u/hifilorau)\
**Replies:** 0\
**Last updated:** [July 2, 2022, 4:01pm UTC](https://discourse.processing.org/t/sketch-using-p5-wrapper-react-not-receiving-props-on-route-change-but-is-receiving-them-on-page-refresh-reload/37797 "2022-07-02T16:01:11Z")

</div>

Am facing an interesting challenge here. Have a somewhat straightforward architecture where i am passing props into my sketch via: p5.updateWithProps = props =\> { if (props.isLoading) { isLoading = props…

---

## [G4P java.lang.IllegalArgumentException: Width (-2) and height (10) cannot be \<= 0](https://discourse.processing.org/t/g4p-java-lang-illegalargumentexception-width-2-and-height-10-cannot-be-0/28841)

<div class="topic-metadata">

**Author:** [@C-Level-Increment](https://discourse.processing.org/u/C-Level-Increment)\
**Replies:** 2\
**Last updated:** [March 26, 2021, 7:54pm UTC](https://discourse.processing.org/t/g4p-java-lang-illegalargumentexception-width-2-and-height-10-cannot-be-0/28841 "2021-03-26T19:54:51Z")

</div>

Hi there, sadly, i already need your help again. Yesterday the last thing i did was to export my grapher-sketch to an executable and after that closed processing. When i tried to open gui builder today to continue worki…

---

## [Callback context](https://discourse.processing.org/t/callback-context/37768)

<div class="topic-metadata">

**Author:** [@anne](https://discourse.processing.org/u/anne)\
**Replies:** 6\
**Last updated:** [July 1, 2022, 10:34am UTC](https://discourse.processing.org/t/callback-context/37768 "2022-07-01T10:34:03Z")

</div>

How does one pass on the context to a callback in p5? fx in this code, the x i undefined: function setup() { createCanvas(400, 400); noLoop() } function draw() { background(128); let x = 100; loadImage(“birch.p…

---

## [Problem with acceptance of displayWidth/displayHeight in iPhone app](https://discourse.processing.org/t/problem-with-acceptance-of-displaywidth-displayheight-in-iphone-app/37765)

<div class="topic-metadata">

**Author:** [@anrui71](https://discourse.processing.org/u/anrui71)\
**Replies:** 2\
**Last updated:** [July 1, 2022, 10:24am UTC](https://discourse.processing.org/t/problem-with-acceptance-of-displaywidth-displayheight-in-iphone-app/37765 "2022-07-01T10:24:36Z")

</div>

Hello everyone, I hope I did not miss an earlier post with the same question: I ran into a problem trying to use displayWidth/displayHeight within the iPhone app. The code is: void settings() { fullScreen(); cwh = mi…

---

## [Serial.list() on Linux doesn't seem to work](https://discourse.processing.org/t/serial-list-on-linux-doesnt-seem-to-work/37075)

<div class="topic-metadata">

**Author:** [@dattasaurabh82](https://discourse.processing.org/u/dattasaurabh82)\
**Replies:** 2\
**Last updated:** [June 30, 2022, 10:01pm UTC](https://discourse.processing.org/t/serial-list-on-linux-doesnt-seem-to-work/37075 "2022-06-30T22:01:52Z")

</div>

OS: Ubuntu 22.04 LTS x86\_64 Kernel: 5.17.8-051708-generic Processing IDE version: 4.0b8 Issue: Serial.list() doesn’t list all the serial ports, just one. Sketch to try for checking: import processing.serial.\*; impor…

---

## [Very basic file reading question - where is the data directory?](https://discourse.processing.org/t/very-basic-file-reading-question-where-is-the-data-directory/25119)

<div class="topic-metadata">

**Author:** [@MuddyGardener](https://discourse.processing.org/u/MuddyGardener)\
**Replies:** 11\
**Last updated:** [June 30, 2022, 11:12pm UTC](https://discourse.processing.org/t/very-basic-file-reading-question-where-is-the-data-directory/25119 "2022-06-30T23:12:22Z")

</div>

I am trying to figure out how to access files. All the documentation I’ve seen says that loadImage() etc will only work on files in the data directory. (It seems very strange, that I can’t give an absolute pathname… …

---

## [Rotating text "|" vs rotating line](https://discourse.processing.org/t/rotating-text-vs-rotating-line/37762)

<div class="topic-metadata">

**Author:** [@Erif](https://discourse.processing.org/u/Erif)\
**Replies:** 10\
**Last updated:** [June 30, 2022, 9:02pm UTC](https://discourse.processing.org/t/rotating-text-vs-rotating-line/37762 "2022-06-30T21:02:40Z")

</div>

Hi all, I’ve been playing with rotating and looping the keyboard vertical bar, however when trying to replicate that by using a regular line I’m struggling with what it would be the equivalent to the textSize() function…

---

## [MPU teapot not showing 3d model](https://discourse.processing.org/t/mpu-teapot-not-showing-3d-model/28632)

<div class="topic-metadata">

**Author:** [@ethankong](https://discourse.processing.org/u/ethankong)\
**Replies:** 15\
**Last updated:** [June 30, 2022, 5:52pm UTC](https://discourse.processing.org/t/mpu-teapot-not-showing-3d-model/28632 "2022-06-30T17:52:29Z")

</div>

Hi, I have a teapot code that is able to receive and write out the ypr of the mpu 6050, but it is unable to make the 3d rendered modeled in processing, it just shows a new window with a white background. What am I missin…

---

## [Why this Graham Scan algorithm of convex hull works wrong when number of points more than 10k](https://discourse.processing.org/t/why-this-graham-scan-algorithm-of-convex-hull-works-wrong-when-number-of-points-more-than-10k/37749)

<div class="topic-metadata">

**Author:** [@obry](https://discourse.processing.org/u/obry)\
**Replies:** 6\
**Last updated:** [June 30, 2022, 9:38am UTC](https://discourse.processing.org/t/why-this-graham-scan-algorithm-of-convex-hull-works-wrong-when-number-of-points-more-than-10k/37749 "2022-06-30T09:38:33Z")

</div>

Here is the code. It works fine with 10k and less. NUM variable it is number of points import java.util.Arrays; import java.util.Comparator; ArrayList\<PVector\> init, sorted; int NUM = 10000; int border = 100; void set…

---

## [Can you break and start an if loop?](https://discourse.processing.org/t/can-you-break-and-start-an-if-loop/37761)

<div class="topic-metadata">

**Author:** [@Kalarila](https://discourse.processing.org/u/Kalarila)\
**Replies:** 7\
**Last updated:** [June 30, 2022, 8:35am UTC](https://discourse.processing.org/t/can-you-break-and-start-an-if-loop/37761 "2022-06-30T08:35:53Z")

</div>

\[details=“Summary”\] This text will be hidden So I want to create a simple program where some shapes slowly change color from red to green, then to blue and then back to red. To do so, I created integers r, g and b and…

---

## [Frogger Code/Break Down](https://discourse.processing.org/t/frogger-code-break-down/36872)

<div class="topic-metadata">

**Author:** [@king\_B99](https://discourse.processing.org/u/king_B99)\
**Replies:** 1\
**Last updated:** [June 30, 2022, 3:34am UTC](https://discourse.processing.org/t/frogger-code-break-down/36872 "2022-06-30T03:34:29Z")

</div>

Anyone Have a simple frogger/frogger style code I can pick apart and learn from (I’m a self learner)

[Previous page](https://discourse.processing.org/latest.md?no_subcategories=false&page=125)

[Next page](https://discourse.processing.org/latest.md?no_subcategories=false&page=127)
