BabylonJS Viewer - is it possible to change the light position?

Hello! I’m using the Viewer to simply display some 3D models on a web page.
I’ve been able to configure it a bit, removing the ground, the autorotation, etc.
Now I’d like to change the light(s) position, so to have a top-down lighting.
ideally I should have just one or two lights from the top.
Is it possible? I’ve read in the configuration.ts a “lights” parameter, but I can’t understand how can I use it…
Any help would be much appreciated!
Many thanks!

So, the way to configure your lights sort of depends on the type of lights that you’re using. For example, if you want to have a pure top down light, you could use a DirectionalLight:

// The vector provided defines the direction of the light
// A good way to think about it is that you're at the origin (0,0,0) and looking at the provided point
var light = new BABYLON.DirectionalLight("DirectionalLight", new BABYLON.Vector3(0, -1, 0), scene);

The above light will effectively just put light on scene in the given direction (no specific source). You could also use a SpotLight if you need to be more precise about position and direction.
For more on the different configuration, as well as examples, check out the docs.

Thank-you, but I’m referring to the “Viewer”

Hi. I think you need use something like < DirectionalLight position=[0,0,0] ></ DirectionalLight> tag in your html configuration. Like others tags in this example Modify the Babylon.js Viewer | Babylon.js Documentation