Maybe we need another callback for right after the first render (or before). You could add it via a custom component i think that dispatches an event on the engine element (this.context.domElement.dispatchEvent(new CustomEvent(“first-render”,…)))
See Finished Loading is around a few frames where the screen is white from the loading before content shows (this is the css white background that shows after an initial Loading bar that Needle shows by default)
It actually shows finished loading at frame 9 and 10 of the gif but the gif framerate isn’t in sync with Chrome itself here as I recorded the gif at 12 fps
Such a callback might help with my recursive instantiation error, and also with the issue in engine_networking_files_default_components where trying to restore the code to add components to newly created objects locks up the engine.
I can confirm I just used a method with Start() to tell the html side that Needle finished loading which works great currently but an external javascript method would be ace
@marcel can we subscribe to the loader event for ‘create scene’ to check when the ‘scene’ has loaded. something must fire then to display the object. so when that object is first displayed can we tie some listener into that?
At the moment I am using a function in Start() but I am being told that the start function fires as the loader gets to ‘create scene’ after some diagnosis, as I was using a function in Start() to show a loading screen, the loading screen hides too early before create scene has finished