# How do you combine canvases in p5j weather you overlap or organise them

**URL:** https://discourse.processing.org/t/how-do-you-combine-canvases-in-p5j-weather-you-overlap-or-organise-them/10275
**Category:** Coding Questions
**Created:** [April 14, 2019, 7:56pm UTC](https://discourse.processing.org/t/how-do-you-combine-canvases-in-p5j-weather-you-overlap-or-organise-them/10275 "2019-04-14T19:56:11Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [April 14, 2019, 9:31pm UTC](https://discourse.processing.org/t/how-do-you-combine-canvases-in-p5j-weather-you-overlap-or-organise-them/10275/2 "2019-04-14T21:31:14Z")

</div>

> [@octaminotin](#):
>
> I’m considering instance mode…

You can also consider using `<iframe>` containers, so you can keep the “global mode” approach: 🖼

[Developer.Mozilla.org/en-US/docs/Web/HTML/Element/iframe](http://Developer.Mozilla.org/en-US/docs/Web/HTML/Element/iframe)

> [@How i extends class in p5.js?](https://discourse.processing.org/t/how-i-extends-class-in-p5-js/894/13):
>
> This is a Processing concept thingy! Our “Global Mode” approach is strange to JS world! scream Basically, it auto instantiates, then dumps & binds the whole p5 class to the global scope, which allows us to access them all w/o using the dot . operator. clown_face Yup! And that’s the standard way most apps do in the JS world! smirk Correct. However, we still can have multiple p5 “global mode” instances by placing them all inside separate \<iframe\> tags, like I did below: …

---

_[View the full topic](https://discourse.processing.org/t/how-do-you-combine-canvases-in-p5j-weather-you-overlap-or-organise-them/10275)._
