# Trying to convert a basic grow shrink sketch from processing to p5.js

**URL:** https://discourse.processing.org/t/trying-to-convert-a-basic-grow-shrink-sketch-from-processing-to-p5-js/23389
**Category:** Coding Questions
**Created:** [August 20, 2020, 1:51pm UTC](https://discourse.processing.org/t/trying-to-convert-a-basic-grow-shrink-sketch-from-processing-to-p5-js/23389 "2020-08-20T13:51:43Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [August 20, 2020, 6:13pm UTC](https://discourse.processing.org/t/trying-to-convert-a-basic-grow-shrink-sketch-from-processing-to-p5-js/23389/4 "2020-08-20T18:13:49Z")

</div>

Hello,

I was working through a similar experience with a member here:

> [@Translate Processing sketch into P5 issue](https://discourse.processing.org/t/translate-processing-sketch-into-p5-issue/23344):
>
> HI, im trying to translate this processing sketch into P5, P5 is currently unable to give me an error that I can understand. below I posted the original processing sketch, and my wild guess on p5. P5: class CubeClass { constructor (x, y, z, on, col1, col2, col3) { this.x = xpos; this.y = ypos; this.z = zpos; this.col1 = colOne; this.col2 = colTwo; this.col3 = colTre; } update() { if(oN){ push(); translate(xpos,ypos,zpos); beginShape(QUADS); fill(colors[colOne…

You may be able to glean some insight and tips from that also.

I am new to P5.js also and always manage to work out a solution.

It was useful for me to also go through the resources and examples here:

> **[home | p5.js](https://p5js.org/)**
>
> p5.js a JS client-side library for creating graphic and interactive experiences, based on the core principles of Processing.

And related content on the Coding Train in YouTube; a search will get you there.

`:)`

---

_[View the full topic](https://discourse.processing.org/t/trying-to-convert-a-basic-grow-shrink-sketch-from-processing-to-p5-js/23389)._
