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

Implement light manager #138

Open
fallenoak opened this issue May 31, 2016 · 0 comments
Open

Implement light manager #138

fallenoak opened this issue May 31, 2016 · 0 comments

Comments

@fallenoak
Copy link
Member

Rather than hardcoding values for diffuse light, ambient light, fog color, fog start, and fog end directly in each material, we should centralize the values in a light manager, and use EventEmitter to notify materials when a change occurs. Initial values should be copied from the light manager at the time the material is instantiated.

It seems to me that the appropriate place for this new manager to live is on Map. We can eventually hook in to render(x, y) on Map and use that to trigger DBC checks for new values for the light manager to use.

For the purposes of this issue, let's keep things simple: we can set up the light manager, give it initial values, and set up relevant event subscriptions, but let's skip out on hooking up DBC lookups for now.

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

No branches or pull requests

1 participant