Hi everyone !
I have a issue while trying to dispose a dynamicTexture which has beed created in a babylon thread running on a web worker.
/**
* Disposes the dynamic texture.
*/
public dispose(): void {
super.dispose();
if (this._ownCanvas) {
this._canvas?.remove();
}
(this._canvas as any) = null;
(this._context as any) = null;
}
this._ownCanvas
is set to true but refers to an OffScreenCanvas, which does not implements the “remove” function.
The code runs well if I disable the worker, as the canvas of the DynamicTexture is then a simple HTMLCanvasElement which inherits Element.
Thank for any help !