Skip to content

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