mrz_lxa

Hi!

Have previously posted an issue on github (probably wrong place, sorry in that case) https://github.com/EsotericSoftware/spine-runtimes/issues/2108

Copying message from there:

Was trying to create my own ThreeJsTexture. Faced an error, because of a check in constructor.
export class ThreeJsTexture extends Texture {
constructor(image) {
super(image);


// SUPPOSEDLY WRONG CHECK?
if (image instanceof ImageBitmap)
throw new Error("ImageBitmap not supported.");
// !SUPPOSEDLY WRONG CHECK?


this.texture = new THREE.Texture(image);
this.texture.flipY = false;
this.texture.needsUpdate = true;
}
}
Thought this change is weird, found a commit with it here
https://github.com/EsotericSoftware/spine-runtimes/commit/e4372e5329f9fe66b7b97e939d2fa800b04ce99a

This was introduced with "TS strict mode" which should not probably lead to this change.

Does this check have to be there?

Also, given ImageBitmap is supported in AssetManagerBase.js (link to loadTexture() method https://github.com/EsotericSoftware/spine-runtimes/blob/4.1/spine-ts/spine-core/src/AssetManagerBase.ts#L136) this looks suspiciously wrong.

Also, nothing like that is found in release-notes to a runtime.

Thanks in advance!
mrz_lxa
  • Mesajlar: 1

Mario

Just saw the corresponding issue on GitHub. I'll have a look.
Kullanıcı avatarı
Mario

Mario
  • Mesajlar: 3274


Dön Runtimes