I was trying to update Babylon to the latest Release (5.33.1).
When I run my test suite (with jest) I’m now getting this error:
this._externalTexture = (_b = (_a = this._engine) === null || _a === void 0 ? void 0 : _a.createExternalTexture(this.video)) !== null && _b !== void 0 ? _b : null;
TypeError: _a.createExternalTexture is not a function
at new VideoTexture (.../core/generated/Materials/Textures/videoTexture.ts:185:59)
It was working with the 5.22.2 release.
Seems that it was introduced here:
Am I’m doing something wrong? Did I miss something?
Is it a Bug?
You may need to import
Engines/Extensions/engine.externalTexture if you are using ES6.
Thx for your help!
Seems that if I import it via:
it is working.
But shouldn’t his be somehow part of the
No because depending on the engine you are using you must use a different path:
We could add both imports in
VideoTexture but if you ever use a single engine you would pay for the other too.
Ah ok. Thank you for the explanation!