React-babylonjs light color

I am using react-babylonjs and I want to change the color of light.

        position={new Vector3(0, 50, 0)}

What are the correct parameters.
Also how can I find all the parameters for pointLight for example, in which file should I look in the package.

Pinging our react master @brianzinn

I think it just has a diffuse and specular properties - you can find the parameters in the API documentation.

If you want to look in the package you can look at the typings (*.d.ts). In a modern IDE like VS Code you should get intellisense with ctrl + space to list the available properties, since the JSX intrinsic elements are included in the typings of react-babylonjs. Typings are erased when you build, so don’t worry about the size of those files.

Since react-babylonjs is generated directly from @babylonjs typings, you can always rely on the official API documentation. There are only a few extra properties that allow us to create more declarative scenes for things like shadows, physics, etc…

This storybook sets diffuse and specular - without knowing what you are trying to accomplish I would suspect you want to set the diffuse:


Hope that helps. Cheers.

1 Like

Fantastic, thank you so much for your answer and even more for react-babylonjs, is great, I intend to use it extensively.

1 Like

Thanks @arooly that’s really encouraging and motivating :slight_smile: If you have more questions or any functionality is missing make sure to ask. There have been 6 releases in the last month, so always adding new stuff :slight_smile: