Is there a way to embed a canvas within another?


#1

I’m creating a web app which makes use of interactive simulations made as canvas to teach subjects. I have a basic canvas where things can be written and drawn just like basic drawing app. I need option to embed another canvas(simulations) within this canvas (An option to import interactive simulation to the drawing app so that it can be used to teach). Is it possible to do this? I use p5.js to create interactive simulations.


#2

You can’t embed a canvas inside another canvas! That would be cool, though :stuck_out_tongue:

What you can do is overlay canvas elements on top of each other using CSS. That would work well.