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

Editor: Add RectAreaLight #16251

Closed
wants to merge 8 commits into from
Closed

Conversation

Temdog007
Copy link
Contributor

See #16234

@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 15, 2019

It seems the PR has a merge conflict...

@Mugen87
Copy link
Collaborator

Mugen87 commented Jun 24, 2019

To get RectAreaLights work properly, you have to include RectAreaLightUniformsLib and call the respective init() method.

@Temdog007 Temdog007 force-pushed the editor/RectAreaLight branch from 9cd618a to 38a5d8e Compare June 25, 2019 06:28
@Temdog007 Temdog007 force-pushed the editor/RectAreaLight branch from 38a5d8e to 2704ce2 Compare June 29, 2019 05:12

// RectAreaLightHelper was designed to work only if it is a child of its light.
// Since that cannot be done in the edtior, the updateMatrixWorld function is overwritten to apply the matrix calculations to the light.
THREE.RectAreaLightHelper.prototype.updateMatrixWorld = function () {
Copy link
Collaborator

@Mugen87 Mugen87 Oct 12, 2019

Choose a reason for hiding this comment

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

RectAreaLightHelper was designed to work only if it is a child of its light.

@mrdoob @WestLangley Do you know the reasons for this? I've checked the history of RectAreaLightHelper but found nothing.

Other users have already run into issues because of how RectAreaLightHelper works (see https://discourse.threejs.org/t/rectarealight-remaining-at-0-0-0/10057). I think it would be less confusing if adding the helper to the light is not required (similar to e.g. PointLightHelper). This modification here would not be necessary then.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Do you know the reasons for this? I've checked the history of RectAreaLightHelper but found nothing.

#14935

I expect all light helpers will be changed to match the behavior of RectAreaLightHelper once lights are controlled by the quaternion.

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 22, 2019

Since the editor is now module based (#18201), a lot of code has changed. It's better to implement this feature from scratch.

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.

3 participants