JoeyKo
February 26, 2025, 7:13am
1
Hi, babylonjs forum.
I use the same code, and different results between the PG and the CodeSandbox(Or the local environment)
1. Here is the PG: KHR_materials_sheen
exported
2. Here is the CodeSandBox: KHR_materials_sheen
not exported
https://codesandbox.io/p/sandbox/4dstxc
You’re very right, but I can’t place what the difference could be between the codepen and the Babylon playground. I did adjust the codepen a bit to rule out any canvas or scene timing issues, which neither seemed to be the case.
cc @RaananW At a glance, do you spot anything in the codepen that looks suspicious?
(and @JoeyKo , just to be sure: what babylon dependencies are listed in your local package.json? Are they the exact same as the one in the codepen?)
Thanks for your patience!
JoeyKo
March 1, 2025, 7:24am
5
@alexchuber Here is the list in my dependencies in my local package.json:
My previous babylonjs version was 7.37.0, and everything was working fine.
I mentioned an issue before, and it was fine on the PG, but I’m actually having this problem locally.
Will need to debug this locally. It must be some form of init or side effects missed here, but i can’t find anything without a good debugging session
I’ll try to recreate that later today or tomorrow.
2 Likes
Totally missed this one - the extensions are loaded async and are not included in the main index file, and you need to import them yourself.
Adding this right after the GLTF2Export
import will solve it for all extensions:
import "@babylonjs/serializers/glTF/2.0/Extensions";
2 Likes
Ahh, makes sense. Looks like it should be exported by the serializer package. This should do it:
master
← alexchuber:fix-extension-export
opened 09:04PM - 04 Mar 25 UTC
Extensions register themselves with the GLTF exporter, so they must be included … in the index.ts.
4 Likes