# Need some guidance to convert processing code to p5.js code

**URL:** <https://discourse.processing.org/t/need-some-guidance-to-convert-processing-code-to-p5-js-code/9164>\
**Category:** Coding Questions\
**Created:** [March 10, 2019, 6:10am UTC](https://discourse.processing.org/t/need-some-guidance-to-convert-processing-code-to-p5-js-code/9164 "2019-03-10T06:10:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![keshavv\_123](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/keshavv_123/32/4217_2.png) [@keshavv\_123](https://discourse.processing.org/u/keshavv_123)\
**Post date:** [March 10, 2019, 6:10am UTC](https://discourse.processing.org/t/need-some-guidance-to-convert-processing-code-to-p5-js-code/9164/1 "2019-03-10T06:10:04Z")

</div>

Hi everyone, I’m trying to convert the processing code into the p5.js code but I didn’t understand how to convert the processing class and object into the p5.js code. can anyone please help me?

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 10, 2019, 6:56am UTC](https://discourse.processing.org/t/need-some-guidance-to-convert-processing-code-to-p5-js-code/9164/2 "2019-03-10T06:56:38Z")

</div>

best is a example of a

> p5.js

array of class

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

i just see at the examples…  
as at the

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

“class” is missing.

---

<div class="post-metadata">

**Author:** ![keshavv\_123](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/keshavv_123/32/4217_2.png) [@keshavv\_123](https://discourse.processing.org/u/keshavv_123)\
**Post date:** [March 10, 2019, 7:33am UTC](https://discourse.processing.org/t/need-some-guidance-to-convert-processing-code-to-p5-js-code/9164/3 "2019-03-10T07:33:33Z")

</div>

Thank you I try to understand this.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [March 10, 2019, 2:24pm UTC](https://discourse.processing.org/t/need-some-guidance-to-convert-processing-code-to-p5-js-code/9164/4 "2019-03-10T14:24:28Z")

</div>

> **[r/processing - OpenProcessing: converting code written in Java to JavaScript](https://www.reddit.com/r/processing/comments/7dqqvh/openprocessing_converting_code_written_in_java_to/dq0ecac/)**
>
> 8 votes and 14 comments so far on Reddit

---

<div class="post-metadata">

**Author:** ![keshavv\_123](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/keshavv_123/32/4217_2.png) [@keshavv\_123](https://discourse.processing.org/u/keshavv_123)\
**Post date:** [March 10, 2019, 4:25pm UTC](https://discourse.processing.org/t/need-some-guidance-to-convert-processing-code-to-p5-js-code/9164/5 "2019-03-10T16:25:18Z")

</div>

Thanks, @GoToLoop, and @kll.
