gaussianSplattingMesh.ts:222 Uncaught (in promise) RangeError: byte length of Float32Array should be a multiple of 4
at new Float32Array (<anonymous>)
at t._loadData (gaussianSplattingMesh.ts:222:25)
at gaussianSplattingMesh.ts:150:18
t._loadData @ gaussianSplattingMesh.ts:222
(anonymous) @ gaussianSplattingMesh.ts:150
So it appears that it is ignoring the actual filename in code paths where both are passed in. This is the codepath used when utilizing a Model in react-babylonjs which takes the root filename and model filename as independent parameters.
In contrast the glTFFileLoader has an importMeshAsync signature that takes in both parts of the path and it works correctly…
I was able to fix this by extending importMeshAsync in splatFileLoader.ts to include the other optional parameters from the interface it implements. I just did a simple hack to concat the root path and filename. The correct fix should use some file name utils to properly combine the root and filename, and I don’t fully understand the other cases where root can be passed in without a filename. But this does now work with Model from react-babylonjs. Just pass it a ply or splat file and it loads fine.