Referencing the 'babylonjs-materials' dependency in the react project and using 'CustomMaterial'?

I tried to load the babylonjs-materials dependency and use the CustomMaterial in the react project, but it didn’t work.My steps are as follows:
NPM installation – save babylonian materials (" babylonian materials “:” ^ 4.1.0 ")
Where needed:
Import * from ‘babylonjs’ as Babylon;
Imported babylonian - materials;aaa


It has been successfully quoted:
Just load the ‘CustomMaterial’ class when referenced
And then I’m going to instantiate it

1 Like