in the component play function, one can find the following code
this.sceneEl.addEventListener('renderstart', this.onRenderTargetLoaded, false);
// ...
// and later ...
onRenderTargetLoaded: function () {
console.log('component onRenderTargetLoaded')
this.sceneEl.removeEventListener('renderstart', this.onRenderTargetLoaded, false);
this.canvasEl = this.sceneEl.canvas;
this.addEventListeners();
},
But if play is called after renderstart is triggered, then onRenderTargetLoaded is never called, and .addEventListeners either.
this.sceneEl.addEventListener('renderstart', this.onRenderTargetLoaded, false);
// test if renderstart has already been triggered
if( this.sceneEl.renderStarted ){
this.onRenderTargetLoaded()
}
Thanks for your work, really appreciated :)
in the component play function, one can find the following code
But if play is called after renderstart is triggered, then
onRenderTargetLoaded
is never called, and .addEventListeners either.Thanks