Hello guys!
The little visual tool prototype I’ve create to help me visualize values on the render canvas is evolving. Maybe you will find a good usage for it as well!
If you get a white screen just smash the Play button! There is something wrong with the init code
I have added a console at the bottom. C, O buttons hides the bottom console or the whole thing, P pauses logging. Mostly I need help to visualize some positions or direction vectors so I started to add some sort of Vector3 visualization.
And this all works in the Playground:
You just have to change the createScene function to async and add some init code.
var createScene = async function () {
await new Promise(r => {
var s = document.createElement("script");
s.src = "https://console3.babylonjs.xyz/console3-playground.js";
document.head.appendChild(s);
s.onload = r()
})
var scene = new BABYLON.Scene(engine);
var c3 = window.console3 // or whatever you want to name it
c3.create(engine, scene)
c3.log("Scene created")
... your code follows
It looks like the promise was resolving early on line 9, but once those errant parenthesis are removed it wont resolve until the script is done loading, fixing the error that caused the first run to fail. And this could def come in handy - I’ll have to try it out soon. https://playground.babylonjs.com/#39CH06#4