# Transitioning to p5.js from Processing. Maybe. Begrudgingly

**URL:** <https://discourse.processing.org/t/transitioning-to-p5-js-from-processing-maybe-begrudgingly/5125>\
**Category:** p5.js\
**Created:** [November 2, 2018, 3:35pm UTC](https://discourse.processing.org/t/transitioning-to-p5-js-from-processing-maybe-begrudgingly/5125 "2018-11-02T15:35:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgennetten](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/dgennetten/32/1308_2.png) [@dgennetten](https://discourse.processing.org/u/dgennetten)\
**Post date:** [November 2, 2018, 3:35pm UTC](https://discourse.processing.org/t/transitioning-to-p5-js-from-processing-maybe-begrudgingly/5125/1 "2018-11-02T15:35:29Z")

</div>

It is my understanding that p5.js still puts a bunch of stuff in the global scope which isn’t a common pattern for JS libraries anymore, and isn’t very comforting to someone coming from Java. This also trips up my desire to use Typescript. Am I missing something?

Thanks.

---

<div class="post-metadata">

**Author:** ![Kevin](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kevin/32/2297_2.png) [@Kevin](https://discourse.processing.org/u/Kevin)\
**Post date:** [November 2, 2018, 5:56pm UTC](https://discourse.processing.org/t/transitioning-to-p5-js-from-processing-maybe-begrudgingly/5125/2 "2018-11-02T17:56:00Z")

</div>

For most single-page apps meant to mostly showcase the P5.js sketch, using the global scope is completely fine.

If you have a different context or it just bothers you, then you can always use instance mode.

More info here:

> **[processing/p5.js](https://github.com/processing/p5.js/wiki/Global-and-instance-mode)**
>
> p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Proces...
