Not able to generate the glb file properly correctly in react js

I am using React js and trying to convert the scene to glb file but when the conversion is done and the i open the converted glb file in babylon sandbox it is showing error like your file has some validation issue .


I am using conversion with “babylonjs-serializers”: “^7.17.2”, .

It will be extremely difficult (if possible at all) to help without the repro.

hey ,thanks for the quick response actually the repo will not be possible can if I provide the code will it be helpful .Actually early my code was generating the glb file perfectly but when I have updated the “babylonjs-serializers”: “^7.17.2”, then it is not generating correclty

In this case please check if all your Babylon imports have the same version number.

 "@babylonjs/core": "5.8.0",
    "@babylonjs/gui": "5.8.0",
    "@babylonjs/loaders": "5.8.0",

my other versions are these .And also can you clarify that the import { GLTF2Export } from “babylonjs-serializers”; the GLTF2Export is imported this way

Here is some info.

You need to add "babylonjs/serializers/": THE SAME VERSION AS OTHER BABYLON FILES to you package.json, then delete node_modules folder and perform npm install.

yep thanks so much now its working perfectly … But I have a small question i tried two to scenes to convert to glb in one scene the object is inside a sphere and second one I without it.



and for the sphere one I am unable to zoom to the model inside

The Sandbox camera radius is calculated according bounding boxes info.
If automated values don’t suit you, open the Inspector and change Lower radius limit of the camera to 1.

yes thanks got it … Thanks for the help…

1 Like