I’m trying to use an NME material I created in my application.
In the NME editor, I generated the code and saved but it seems that it does not contain any imports.
I’m using Typescript + NPM packages, and I’m having trouble figuring out from which package to import what.
I can fix some of the issues with the legacy import:
import * as BABYLON from "@babylonjs/core/Legacy/legacy";
but some issues still remain like BABYLON.PBRMetallicRoughnessBlock or Texture.convertToLinearSpace or BABYLON.ReflectionBlock, etc…
I looked in the documentation and found some of those types but there doesn’t seem to be any indication regarding which packages they belong to.
Also the fact that there are 2 sets of packages for BabylonJS on NPM confuses me a bit (the @babylonjs ones and the babylonjs ones) and I am not sure if I got the right one.
How/where can I find which packages correspond to which types?
And do I need to get the @babylonjs or babylonjs packages from NPM
What is the difference between the two?
Thanks in advance! Help would be highly appreciated!
I then checked which release version that corresponds to:
npm view @babylonjs/core time --json
and it seems to me that it is a change that’s for 4.2.x
Comparing the version of babylon in my package.json (4.1.0) with the NME Editor (4.2.0-beta.5) seems to confirm that this is the problem!
Is there a way to change the version of babylon that the NME editor uses? Or will I need to build it locally to be able to use it for 4.1.0?
Ok, Since it seems 4.1 is the latest stable version I was expecting that this would be the version deployed on nme.babylonjs.com. In any case now I know and I’ll run nme locally Thanks again!