Cannot Create Shadow Map with Point Light in Node on Server

I am trying to create a model on a server using node with a shadow map.

const light = new BABYLON.PointLight("PointLight", new BABYLON.Vector3(1,1,1), scene);
const shadowGenerator = new BABYLON.ShadowGenerator(1024, light);

When I call this code, I get an exception thrown: “Cannot read property ‘TEXTURE_CUBE_MAP’ of undefined”

Any suggestions?


Welcome aboard!

I think you can only use use the null engine on the server side: it seems you are using the regular Engine class as TEXTURE_CUBE_MAP is a gl identifier.