Hi all,
May I know what should be in the asset.resource? I’m using this GLB loader sample code form playcanvas:
HTML:
<html>
<script src="https://code.playcanvas.com/playcanvas-latest.js"></script>
<body>
<canvas id="application-canvas"></canvas>
<a id="logo" href="https://playcanvas.com/" target="_blank"><img src="http://static.playcanvas.com/images/logo/PLAY_FLAT_ORANGE3_SMALL.png" /></a>
</body>
<script>
Script from
https://playcanvas.github.io/#/loaders/glb
</script>
and trying to use this outsourced GLB file as the URL:
https://ipfs.io/ipfs/QmVWgxQnPT21K6nXSSmosmYRcgfhwBNAMHfsouo5dCNEZ6?filename=BabyElephant_GLB.glb
I keep getting these 2 errors:
- playcanvas-latest.js:35247 SyntaxError: Unexpected token g in JSON at position 0
- glb_loader.html:79 Uncaught TypeError: Cannot read properties of undefined (reading ‘instantiateRenderEntity’)
I am new to playcanvas and glb files. I am not sure what should be included in the asset.resource to make initiateRenderEntity() work. This code seems to be stopping my code:
Any help will be appreciated.
Thanks!