Hi,
I'm doing a test, trying to migrate code that works with Spine 4.1.x spine files with 4.2.x spine files. Upon trying out the relatively current Spine-ts runtime (4.2.36):
https://unpkg.com/@esotericsoftware/spine-webgl@4.2.36/dist/iife/spine-webgl.js
When trying to load up a skeleton, I'm encountering this problem:
TypeError: First argument to DataView constructor must be an ArrayBuffer
at new DataView (<anonymous>)
at new BinaryInput (Matrix4.ts:266:59)
at SkeletonBinary.readSkeletonData (SkeletonJson.ts:463:27)
If I look at my code, it's around this area:
this.spineObjects['spineAnimationObjects'][spineTarget]['spineAtlas'] = atlas;
let spatlasLoader = new spine.AtlasAttachmentLoader(atlas);
this.spineObjects['spineAnimationObjects'][spineTarget]['spatlasLoader'] = spatlasLoader;
let spskeletonLoader = new spine.SkeletonBinary(spatlasLoader);
this.spineObjects['spineAnimationObjects'][spineTarget]['spskeletonLoader'] = spskeletonLoader;
spskeletonLoader.scale = 1;
let skeletonData = spskeletonLoader.readSkeletonData(this.spineObjects['spineAnimationObjects'][spineTarget]['spineBinaryPath']);
The problem occurs at the last line, in the readSkeletonData function.
The code works with Spine-TS 4.1.x runtime and loading up Spine 4.1 binary outputs. The code gives me problems with Spine-TS 4.2.x runtime and loading up either Spine 4.2.x or 4.1.x binary outputs.