Just thinking out loud here before going into a large production. Is there a way to communicate with a playcanvas app via URL link. Let’s say I wanted to load a certain scene or pass on a flag/argument/parameter that would change something dynamically in my scene, could I do that via a link / GET URL ?
What I do to send basic data to Playcanvas is using postMessage to send data to my iframe with my canvas inside of it. So, I can have an HTML website with buttons that can change the content of my Playcanvas project.
aha, interesting. That’s a possibility. Now I was mostly thinking about if I wanted to access my playcanvas app (residing and hosted locally on it’s own page) from two different parts of larger site. Perhaps one of the links to the playcanvas page want’s to access a certain part of the app, but the other link is after something else. Two different camera position/zoom levels, or loading two separate scenes. Or perhaps, passing on a variable saying which country the user is in - then dynamically replacing it with a 3D model of that flag of the country somehere in the 3D models.
Buy perhaps I should be thinking more like this: The page where the webgl app is placed and loaded has a script responsible for reading URL/GET parameters, then communicates with the app depending on what it gets.