# Latest

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

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

**Page:** 193

---

## [How do I import p5 via npm?](https://discourse.processing.org/t/how-do-i-import-p5-via-npm/11543)

<div class="topic-metadata">

**Author:** [@lion9](https://discourse.processing.org/u/lion9)\
**Replies:** 6\
**Last updated:** [September 18, 2021, 8:53pm UTC](https://discourse.processing.org/t/how-do-i-import-p5-via-npm/11543 "2021-09-18T20:53:07Z")

</div>

I have tried to import p5 into my project using webpack (you can see the code here GitHub - lion9/p5-npm), but to no avail. Everything seems to be built into the app.bundle.js file, but the canvas is not appering at all. …

---

## [SVG image doesn't work](https://discourse.processing.org/t/svg-image-doesnt-work/32115)

<div class="topic-metadata">

**Author:** [@Quorum](https://discourse.processing.org/u/Quorum)\
**Replies:** 1\
**Last updated:** [September 18, 2021, 8:42pm UTC](https://discourse.processing.org/t/svg-image-doesnt-work/32115 "2021-09-18T20:42:06Z")

</div>

I created a grid where the squares have a color assigned by the URL constant. const URL = \[ "https://coolors.co/283d3b-197278-edddd4-c44536-772e25" \]; Inside the squares I place individual images. In two squares I …

---

## [I could use some help to reverse engineer this artwork :)](https://discourse.processing.org/t/i-could-use-some-help-to-reverse-engineer-this-artwork/32181)

<div class="topic-metadata">

**Author:** [@goldorak](https://discourse.processing.org/u/goldorak)\
**Replies:** 2\
**Last updated:** [September 18, 2021, 6:30pm UTC](https://discourse.processing.org/t/i-could-use-some-help-to-reverse-engineer-this-artwork/32181 "2021-09-18T18:30:28Z")

</div>

Hello, I came across a couple of artworks that I really appreciate. I’m very intrigued by these results, and I’m absolutely struggling to reverse engineer the way it has been done. One of the most beautiful example I …

---

## [Get same X and Y positions relative to screen resolution](https://discourse.processing.org/t/get-same-x-and-y-positions-relative-to-screen-resolution/32252)

<div class="topic-metadata">

**Author:** [@QwertySamyak](https://discourse.processing.org/u/QwertySamyak)\
**Replies:** 15\
**Last updated:** [September 18, 2021, 8:08pm UTC](https://discourse.processing.org/t/get-same-x-and-y-positions-relative-to-screen-resolution/32252 "2021-09-18T20:08:53Z")

</div>

Hi, So I need to get a x and y position relative to the screen resolution that I am working with. For example: I need the y coord 760 in a resolution of 1920x1080 to be at the same spot in the resolution 1280x720 I do…

---

## [Load .obj Model with mtl file and jpg texture](https://discourse.processing.org/t/load-obj-model-with-mtl-file-and-jpg-texture/4634)

<div class="topic-metadata">

**Author:** [@rtalexLL](https://discourse.processing.org/u/rtalexLL)\
**Replies:** 8\
**Last updated:** [September 6, 2021, 5:04pm UTC](https://discourse.processing.org/t/load-obj-model-with-mtl-file-and-jpg-texture/4634 "2021-09-06T17:04:50Z")

</div>

Hey Guys, i need some help with loading and 3D Model stored as .obj with an .mtl File and an jpg texture. With loadModel() I only get the mesh loaded and displayed, but the texture isn’t loaded. If I also load the Tex…

---

## [p5.Vector.div() doesnt work for 2D vectors](https://discourse.processing.org/t/p5-vector-div-doesnt-work-for-2d-vectors/32202)

<div class="topic-metadata">

**Author:** [@Kentucky](https://discourse.processing.org/u/Kentucky)\
**Replies:** 2\
**Last updated:** [September 18, 2021, 5:46pm UTC](https://discourse.processing.org/t/p5-vector-div-doesnt-work-for-2d-vectors/32202 "2021-09-18T17:46:37Z")

</div>

The div method doesn’t work with 2D vectors because the z component of the divisor is set automatically to 0. This should be fixed so the z component is ignored.

---

## [2d screen / world transformations for buttons (p5 2d Scene Graph?)](https://discourse.processing.org/t/2d-screen-world-transformations-for-buttons-p5-2d-scene-graph/32222)

<div class="topic-metadata">

**Author:** [@DCsan](https://discourse.processing.org/u/DCsan)\
**Replies:** 2\
**Last updated:** [September 18, 2021, 4:43pm UTC](https://discourse.processing.org/t/2d-screen-world-transformations-for-buttons-p5-2d-scene-graph/32222 "2021-09-18T16:43:23Z")

</div>

wondering how people deal with nested transforms and trying to detect what a user clicked on. I have something like the below with nested elements that all do their own push/transform/pop and the nested elements need to…

---

## [Check if object is inbetween 2 points](https://discourse.processing.org/t/check-if-object-is-inbetween-2-points/32288)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 10\
**Last updated:** [September 17, 2021, 8:04pm UTC](https://discourse.processing.org/t/check-if-object-is-inbetween-2-points/32288 "2021-09-17T20:04:00Z")

</div>

how to check if an object is anywhere inbetween the two x values, width-(width/4) and eight-(height/4)

---

## [Pause / stop / \`noLoop()\` p5 sketch when not actively seen by the user (e.g. after scrolling out of window)](https://discourse.processing.org/t/pause-stop-noloop-p5-sketch-when-not-actively-seen-by-the-user-e-g-after-scrolling-out-of-window/32294)

<div class="topic-metadata">

**Author:** [@janmaltel](https://discourse.processing.org/u/janmaltel)\
**Replies:** 1\
**Last updated:** [September 18, 2021, 3:51am UTC](https://discourse.processing.org/t/pause-stop-noloop-p5-sketch-when-not-actively-seen-by-the-user-e-g-after-scrolling-out-of-window/32294 "2021-09-18T03:51:18Z")

</div>

Hi everyone, is there a setting that would automatically pause my sketch when the user cannot currently see it? For example, I got this blog post here where there’s one sketch at the very top and another sketch at the …

---

## [Loops inside loops](https://discourse.processing.org/t/loops-inside-loops/32289)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 2\
**Last updated:** [September 17, 2021, 7:39pm UTC](https://discourse.processing.org/t/loops-inside-loops/32289 "2021-09-17T19:39:35Z")

</div>

Hi there! I have created a function with a diagonal queue of points in random positions and now I want to convert It into blocks of diagonal queues in random positions, as you can see in the picture. I am trying to make…

---

## [Multiple polygons with a loop](https://discourse.processing.org/t/multiple-polygons-with-a-loop/32260)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 8\
**Last updated:** [September 17, 2021, 7:05pm UTC](https://discourse.processing.org/t/multiple-polygons-with-a-loop/32260 "2021-09-17T19:05:57Z")

</div>

Hi there! I have made a function to create a random polygon, could you please help me to create, for example, 30 polygons like this? Thank you so much void setup(){ size(1000,1000); float x1 = random(width); …

---

## [Drawing a skeleton for the movenet p5js sketch](https://discourse.processing.org/t/drawing-a-skeleton-for-the-movenet-p5js-sketch/31346)

<div class="topic-metadata">

**Author:** [@basicvisual](https://discourse.processing.org/u/basicvisual)\
**Replies:** 13\
**Last updated:** [September 17, 2021, 12:44pm UTC](https://discourse.processing.org/t/drawing-a-skeleton-for-the-movenet-p5js-sketch/31346 "2021-09-17T12:44:54Z")

</div>

Hi, I have been trying to run movenet with p5js. I have managed to get the detector working and can log out the poses. However , I am trying to draw a skeleton on top of the connected circle for vizualization purposes. I…

---

## [LSystems (travelling salesman) in py5](https://discourse.processing.org/t/lsystems-travelling-salesman-in-py5/32255)

<div class="topic-metadata">

**Author:** [@monkstone](https://discourse.processing.org/u/monkstone)\
**Replies:** 2\
**Last updated:** [September 16, 2021, 10:40pm UTC](https://discourse.processing.org/t/lsystems-travelling-salesman-in-py5/32255 "2021-09-16T22:40:49Z")

</div>

Here is a sketch I recently converted from processing.py to py5 (also for me an exploration of NamedTuple) could easily be adapted with other LSystem rules. import py5 from math import cos, pi, sin, sqrt, radians from g…

---

## [Variable Fonts on p5.js Canvas](https://discourse.processing.org/t/variable-fonts-on-p5-js-canvas/32268)

<div class="topic-metadata">

**Author:** [@DennisM](https://discourse.processing.org/u/DennisM)\
**Replies:** 2\
**Last updated:** [September 16, 2021, 6:26pm UTC](https://discourse.processing.org/t/variable-fonts-on-p5-js-canvas/32268 "2021-09-16T18:26:50Z")

</div>

Hi Everyone, i want to work with a variable font on the canvas. I’m wondering, if there is any method to access and modify the variable-font parameters of a text on the canvas. Cheers Dennis

---

## [Resetting a PShape](https://discourse.processing.org/t/resetting-a-pshape/31866)

<div class="topic-metadata">

**Author:** [@SNICKRS](https://discourse.processing.org/u/SNICKRS)\
**Replies:** 3\
**Last updated:** [September 16, 2021, 6:12pm UTC](https://discourse.processing.org/t/resetting-a-pshape/31866 "2021-09-16T18:12:58Z")

</div>

Hello everyone, I am making a voxel game and have been using PShapes to generate chunk meshes. I am currently working on Raycasting so that the player can break and place a block. However, when the player breaks a block,…

---

## [Polygons Distribution with loops](https://discourse.processing.org/t/polygons-distribution-with-loops/32270)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 5\
**Last updated:** [September 16, 2021, 4:18pm UTC](https://discourse.processing.org/t/polygons-distribution-with-loops/32270 "2021-09-16T16:18:36Z")

</div>

Hi there! I am learning about loops these weeks and I have been able to do a screen full of rectangles like the one you can see in the picture. Now I would like to do a screen full of quadrilaterals, but If I do a loop a…

---

## [Arduino RFID and Processing Connection](https://discourse.processing.org/t/arduino-rfid-and-processing-connection/32108)

<div class="topic-metadata">

**Author:** [@angoldini01](https://discourse.processing.org/u/angoldini01)\
**Replies:** 12\
**Last updated:** [September 16, 2021, 1:51pm UTC](https://discourse.processing.org/t/arduino-rfid-and-processing-connection/32108 "2021-09-16T13:51:22Z")

</div>

Hey, I’m currently working on a project where I want to switch the colors of a square in processing through using rfid chips with arduino. So everytime I place a rfid-chip on my rfid-reader, arduino should send the data…

---

## [LEAP motion doesn´t works](https://discourse.processing.org/t/leap-motion-doesn-t-works/6763)

<div class="topic-metadata">

**Author:** [@danyman](https://discourse.processing.org/u/danyman)\
**Replies:** 8\
**Last updated:** [September 16, 2021, 10:32am UTC](https://discourse.processing.org/t/leap-motion-doesn-t-works/6763 "2021-09-16T10:32:45Z")

</div>

Hello, I have a new LEAP motion sensor. I installed it and also the library, but when I start to run the processing sketch basics, its looks like that (picture). Thanks in advance for the help Daniel

---

## [Exported program runs very poorly on Raspberry 4, but the program uses no system resources](https://discourse.processing.org/t/exported-program-runs-very-poorly-on-raspberry-4-but-the-program-uses-no-system-resources/32264)

<div class="topic-metadata">

**Author:** [@Piipperi](https://discourse.processing.org/u/Piipperi)\
**Replies:** 5\
**Last updated:** [September 16, 2021, 10:07am UTC](https://discourse.processing.org/t/exported-program-runs-very-poorly-on-raspberry-4-but-the-program-uses-no-system-resources/32264 "2021-09-16T10:07:52Z")

</div>

Been troubleshooting my program since I got a Raspberry 4, I tried increasing GPU mem, overclocking the GPU, until I realized with htop, the program doesn’t even use any system resources. I’ve tried to increase the frame…

---

## [Error message when starting python mod](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841)

<div class="topic-metadata">

**Author:** [@Bobby54](https://discourse.processing.org/u/Bobby54)\
**Replies:** 6\
**Last updated:** [September 16, 2021, 6:41am UTC](https://discourse.processing.org/t/error-message-when-starting-python-mod/26841 "2021-09-16T06:41:22Z")

</div>

When I start the python mode in processing I get following error statemant: I found a website that has a workaround for this issue. However I can’t seem to find pycodestyle.py. It is not in my Python 3.9 folder and…

---

## [Put P5js Canvas in the web page (support CSS and responsive)](https://discourse.processing.org/t/put-p5js-canvas-in-the-web-page-support-css-and-responsive/32280)

<div class="topic-metadata">

**Author:** [@niuuin](https://discourse.processing.org/u/niuuin)\
**Replies:** 0\
**Last updated:** [September 16, 2021, 3:46am UTC](https://discourse.processing.org/t/put-p5js-canvas-in-the-web-page-support-css-and-responsive/32280 "2021-09-16T03:46:04Z")

</div>

I wanted to have the P5js canvas as an element in the page and support CSS and responsive, rather than filling the whole screen as usual. Here are the steps I took to solve the problem, I hope it helps. Step\_01 Putting…

---

## [PythonMode not working. (No display window?)](https://discourse.processing.org/t/pythonmode-not-working-no-display-window/32106)

<div class="topic-metadata">

**Author:** [@palmiye](https://discourse.processing.org/u/palmiye)\
**Replies:** 5\
**Last updated:** [September 16, 2021, 4:41am UTC](https://discourse.processing.org/t/pythonmode-not-working-no-display-window/32106 "2021-09-16T04:41:30Z")

</div>

Hello everybody, I’m having some big trouble with pythonmode. Run button seems like not working.(Not turning to green when I click on it.) And no display window is appearing. I’m just getting this warning on console, no…

---

## [Stroke Gradient for Lines](https://discourse.processing.org/t/stroke-gradient-for-lines/32112)

<div class="topic-metadata">

**Author:** [@humano](https://discourse.processing.org/u/humano)\
**Replies:** 15\
**Last updated:** [September 16, 2021, 1:54am UTC](https://discourse.processing.org/t/stroke-gradient-for-lines/32112 "2021-09-16T01:54:23Z")

</div>

Hi there, I am trying to make lines with gradient strokes. I have done something, but It does not work, who can help me with this? Thanks! size (900, 900); background (255); colorMode(HSB, 360, 100, 100); int hueStart…

---

## [Utility issue: Alt+Arrowkeys combination not working anymore](https://discourse.processing.org/t/utility-issue-alt-arrowkeys-combination-not-working-anymore/32269)

<div class="topic-metadata">

**Author:** [@Namrad](https://discourse.processing.org/u/Namrad)\
**Replies:** 2\
**Last updated:** [September 15, 2021, 8:49pm UTC](https://discourse.processing.org/t/utility-issue-alt-arrowkeys-combination-not-working-anymore/32269 "2021-09-15T20:49:10Z")

</div>

Hello, Since the launch of Processing 4 I have noticed that the (left-)Alt keyboard-combinations (Alt+Arrowkeys, Alt+Delete/Backspace, etc.) don’t work for me anymore. The issue seems really specific considering other, …

---

## [Check if character sees other character](https://discourse.processing.org/t/check-if-character-sees-other-character/32274)

<div class="topic-metadata">

**Author:** [@MoonAlien822](https://discourse.processing.org/u/MoonAlien822)\
**Replies:** 1\
**Last updated:** [September 15, 2021, 8:23pm UTC](https://discourse.processing.org/t/check-if-character-sees-other-character/32274 "2021-09-15T20:23:57Z")

</div>

how to check if enimy sees midas? if i3 is 1, enimy looks to the left and if its 2 he looks to the right. //characters int midashp= 30; int enimyhp= 30; PImage\[\] midas= new PImage\[8\]; PImage\[\] reversemidas= new PIma…

---

## [Bizarre Hard-to-Diagnose Javascript Bug While Using P5.js in Firebase App](https://discourse.processing.org/t/bizarre-hard-to-diagnose-javascript-bug-while-using-p5-js-in-firebase-app/32240)

<div class="topic-metadata">

**Author:** [@nguzman](https://discourse.processing.org/u/nguzman)\
**Replies:** 1\
**Last updated:** [September 15, 2021, 7:38pm UTC](https://discourse.processing.org/t/bizarre-hard-to-diagnose-javascript-bug-while-using-p5-js-in-firebase-app/32240 "2021-09-15T19:38:29Z")

</div>

Edit, Update: I can now reproduce the error 100% of the time across all browsers in any context. By much trial and error, I discovered that by rapidly clicking the right arrow key on the first instruction screen (where t…

---

## [Need to meet to talk about p5.js or Processing in the classroom?](https://discourse.processing.org/t/need-to-meet-to-talk-about-p5-js-or-processing-in-the-classroom/32275)

<div class="topic-metadata">

**Author:** [@saberkhan](https://discourse.processing.org/u/saberkhan)\
**Replies:** 0\
**Last updated:** [September 15, 2021, 6:44pm UTC](https://discourse.processing.org/t/need-to-meet-to-talk-about-p5-js-or-processing-in-the-classroom/32275 "2021-09-15T18:44:57Z")

</div>

I have some time tomorrow, September 16, Thursday, if anyone wants to grab a 20 minute block of time - Calendly - Saber Khan

---

## [Updating P3 library for P4](https://discourse.processing.org/t/updating-p3-library-for-p4/32191)

<div class="topic-metadata">

**Author:** [@robertesler](https://discourse.processing.org/u/robertesler)\
**Replies:** 10\
**Last updated:** [September 15, 2021, 5:01pm UTC](https://discourse.processing.org/t/updating-p3-library-for-p4/32191 "2021-09-15T17:01:21Z")

</div>

Does anyone know if there is, or will be, a way to distribute different versions of a library for P3 and P4. Right now my own library, and others I use, works in P4 but are compiled for Java 8. Can we have two versions…

---

## [Issue with fullScreen()](https://discourse.processing.org/t/issue-with-fullscreen/744)

<div class="topic-metadata">

**Author:** [@Fausto](https://discourse.processing.org/u/Fausto)\
**Replies:** 3\
**Last updated:** [September 15, 2021, 4:02pm UTC](https://discourse.processing.org/t/issue-with-fullscreen/744 "2021-09-15T16:02:32Z")

</div>

I have encountered a problem when using fullScreen(). For testing I have been given a small projector 800x600 connected to my Mac via thunderbolt to VGA adapter. I can see my second monitor projected, I can mouse over i…

---

## [MouseClick event for an Arc in CP5 Button](https://discourse.processing.org/t/mouseclick-event-for-an-arc-in-cp5-button/32250)

<div class="topic-metadata">

**Author:** [@seym](https://discourse.processing.org/u/seym)\
**Replies:** 11\
**Last updated:** [September 15, 2021, 1:54pm UTC](https://discourse.processing.org/t/mouseclick-event-for-an-arc-in-cp5-button/32250 "2021-09-15T13:54:08Z")

</div>

I have 4 buttons each shaped an arc. The 4 buttons: I made the buttons like this: button1 = cp5.addButton("A1") // The button for the first area. The other 3 buttons will be "A2" , "A3" , "A4" .setValu…

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

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