I’ve created a 3d worldmap with Playcanvas, downloaded the source, put it on a webserver and implemented it to my website using " Serve your own HTML". Works fine! It renders a canvas right before end of body tag.
What I want now is to render the canvas into a specific div that is located im my html structure with a specific size and position (like if I’m using an iframe, but I need it inline to communicate with the elements of the website). How do I control this? Thanks for helping out!
If you are already rendering the canvas in your webpage, you can easily move it from the end of the body tag to any other element, after it loaded, using Javascript:
By the way, you can still use the iframe solution and easily communicate with your parent window using the postMessage api: