Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

h3d.scene.LightSystem has no field ambientLight #1212

Open
min-pascal opened this issue May 10, 2024 · 1 comment
Open

h3d.scene.LightSystem has no field ambientLight #1212

min-pascal opened this issue May 10, 2024 · 1 comment

Comments

@min-pascal
Copy link

min-pascal commented May 10, 2024

In the docs' Lights section under Ambient Lighting it says you set the scene ambient light color like

s3d.lightSystem.ambientLight.set(0, 0, 0);

@rcstuber
Copy link
Contributor

rcstuber commented May 10, 2024

Only the (older) forward light system has an ambient property. So you need to downcast to that if you are using the forward renderer like shown in the World sample.
cast(s3d.lightSystem,h3d.scene.fwd.LightSystem).ambientLight.setColor(0x909090);

As for ambient light with the PBR renderer, I'm not quite sure. Maybe through the environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants