staub ·
@J1 Pelaez alrighty... here's the original .bablyon file stored on github
https://raw.githubusercontent.com/invertedNormal81/serve/main/glowSuccess_mod.babylon
I'm able to successfully reference it from there with HTML that I inscribe on-chain from 1satOrd... it displays correctly there during preview and then becomes static once inscribed... but it works completely correctly in Decode on What's onchian.
But I want also inscribe the .babylon file and reference it on-chain, as well.
I don't really need you to focus on implementing the bablyon viewer, because the HTML embedded viewer works fine... but you're welcome to go that length if you want.
All I really need is the ability to successfully reference the .bablyon file on-chain as a URL in place of the github URL in the code example below. This is the code that works perfectly fine by referencing the github file and then inscribing the HTML on-chain and viewing it on Whatsonchain decoder.
See video here to see what I'm talking about
https://app.treechat.com/quest/2a46a5a1-9147-46b1-9d3f-ed85b093bf1a
...
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Babylon_Egg_Test</title>
<script src="https://cdn.babylonjs.com/babylon.js"></script>
<script src="https://cdn.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>
<style>
html, body { overflow: hidden; width: 100%; height: 100%; margin: 0; padding: 0; }
#renderCanvas { width: 100%; height: 100%; touch-action: none; }
</style>
</head>
<body>
<canvas id="renderCanvas"></canvas>
<script>
const canvas = document.getElementById("renderCanvas");
const engine = new BABYLON.Engine(canvas, true);
BABYLON.SceneLoader.Load("", "https://raw.githubusercontent.com/invertedNormal81/serve/main/glowSuccess_mod.babylon", engine, (scene) => {
scene.createDefaultCameraOrLight(true, true, true);
engine.runRenderLoop(() => scene.render());
});
window.addEventListener("resize", () => engine.resize());
</script>
</body>
</html>