HI, Im trying to use the importMeshAsync method from the gltfLoader.
I was able to split my glb data to obtain an object with the two property like this:
const gltfData = {
json: jsonObject,
bin: chunkBinaryData,
};
But the chunkBinaryData is an ArrayBuffer and the importMeshAsync method expect the bin to be an IDataBuffer.
export interface IDataBuffer {
/**
* Reads bytes from the data buffer.
* @param byteOffset The byte offset to read
* @param byteLength The byte length to read
* @returns A promise that resolves when the bytes are read
*/
readAsync(byteOffset: number, byteLength: number): Promise<ArrayBufferView>;
/**
* The byte length of the buffer.
*/
readonly byteLength: number;
}
Im a bit confuse here about how to prepare the bin data to be proceed in the importMeshAsync method. Im using Typescript.
Thank you!
Marc-Andre.