I’m coding an A-Frame project for our University at the moment with a PHP Backend.
You can find the relevant parts here on Glitch:
Thanks for your help!
The HTML is duplicated. Two
<a-scene>, A-Frame imported twice… Also PHP code mixed in. It looks like a misunderstanding about how PHP works. The PHP code is run by the server and the client receives valid HTML with no PHP code in it. See the basic tutorial and notice the server side PHP code with
<?php echo '<p>Hello World</p>'; ?> and what the client browser receives
I removed the PHP code from the
index.html and left only the scene with the models. Notice that scripts and model URLs are incorrect and the audio assets are missing. In Glitch you can click on the assets within the asset folder to copy the URLs. With URLs corrected and code that depends on server side removed the models load fine: