I’ve tried to post it using text/markdown and text/json (be…
I’ve tried to post it using text/markdown and text/json (because .babylon files are technically json files)… and the text result of the file does look correct in Decode on Whatonchain… but no luck referencing as a .babylon files within the HTML successfully like I did with the file referenced from Github.
I’ve tried likely all methods of referencing it, too. You’re welcome to give it a try. I’ll most the HTML, too.
Here’s the text/JSON inscription:
https://alpha.1satordinals.com/outpoint/9eb73c4ed02f5268e1dfdb86b234e0ffb43996be554d4f594adf5118b62aa16a_0/timeline
Replies
<!DOCTYPE html>
<html>
<head>
<title>Egg_OnChain</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://alpha.1satordinals.com/outpoint/9eb73c4ed02f5268e1dfdb86b234e0ffb43996be554d4f594adf5118b62aa16a_0", engine, (scene) => {
scene.createDefaultCameraOrLight(true, true, true);
engine.runRenderLoop(() => scene.render());
});
window.addEventListener("resize", () => engine.resize());
</script>
</body>
</html>
Try using application/babylon as your mime type
cool, will try, thank you.
i didn’t see that one listed in the advanced text option… but the field is freeform, so i’ll give it a try.
thank you for the pointer!
this definitely seems like it should work, because when I inscribe as application/babylon on 1Sat and then go view it in Decode on Whatonchain, it downloads the file "0" to my computer, and if I append .babylon as the extension it loads the file on the babylonjs sandbox site just like the original.
https://whatsonchain.com/tx/45abf13714cdcd1cba6106a13d04f39ba7fc914a5c12a6b0590bee5f3b3c79de
But, it's not working in the HTML code.
Maybe I'm just referencing the URL wrong?
I've tried all of these formats:
https://alpha.1satordinals.com/outpoint/45abf13714cdcd1cba6106a13d04f39ba7fc914a5c12a6b0590bee5f3b3c79de_0
https://alpha.1satordinals.com/outpoint/45abf13714cdcd1cba6106a13d04f39ba7fc914a5c12a6b0590bee5f3b3c79de_0.babylon
https://alpha.1satordinals.com/outpoint/45abf13714cdcd1cba6106a13d04f39ba7fc914a5c12a6b0590bee5f3b3c79de/0
https://alpha.1satordinals.com/outpoint/45abf13714cdcd1cba6106a13d04f39ba7fc914a5c12a6b0590bee5f3b3c79de/0.babylon