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

glTF KHR_lights update #13340

Closed
wants to merge 7 commits into from
Closed

glTF KHR_lights update #13340

wants to merge 7 commits into from

Conversation

MiiBond
Copy link
Contributor

@MiiBond MiiBond commented Feb 15, 2018

Updated to match current spec.
KhronosGroup/glTF#1223

Copy link
Collaborator

@donmccurdy donmccurdy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good! There are some merge conflicts in various pages though, you may want to cherrypick this to a new branch or rebase.

I believe it will also be necessary to set:

renderer.physicallyCorrectLights = true;

... to ensure that color * intensity is interpreted as luminous intensity measured in candela.

For now I think we should consider this WIP for testing, and only merge when the KHR_lights spec is nearer to converging.

// Handle spotlight properties.
var spot = light.spot || {};
var innerConeAngle = spot.innerConeAngle ? spot.innerConeAngle : 0;
var outerConeAngle = spot.outerConeAngle || Math.PI / 4.0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: for consistency with other code here, I would write:

var innerConeAngle = spot.innerConeAngle !== undefined ? spot.innerConeAngle : 0;
var outerConeAngle = spot.outerConeAngle !== undefined ? spot.outerConeAngle : Math.PI / 4.0;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do.

Also opening a new pull request to clean up the PR.

@MiiBond
Copy link
Contributor Author

MiiBond commented Feb 15, 2018

Closing to open a clean pull request without conflicts.

@MiiBond MiiBond closed this Feb 15, 2018
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

Successfully merging this pull request may close these issues.

2 participants