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] Spotlights imported from GLB have their target reset after page reload #23016

Closed
hybridherbst opened this issue Dec 13, 2021 · 5 comments

Comments

@hybridherbst
Copy link
Contributor

Describe the bug

When importing Spotlights from GLB, their target seems to be reset after page reload, resulting in different lighting / broken scene.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://threejs.org/editor/
  2. Import World.zip
  3. Note spotlights shining from above
  4. Refresh page
  5. Note spotlights all shining towards (0,0,0)

Expected behavior

Spotlights still work after page reload

Screenshots

After dropping GLB (and turning physical lighting on)
image

After page reload
image

Note: it seems that generally, when creating a spotlight the target can't be moved in the threejs editor. Is this expected? Should I open a separate issue for this?

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 14, 2021

Duplicate of #9508.

There is currently not editor support for the target property of lights.

@hybridherbst
Copy link
Contributor Author

I see how that relates but I feel "a file breaks in the editor" is a separate issue than "there's no support to move the target around".

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 14, 2021

We use #9508 to track the general lack of support for target light properties (in whatever manifestation) in the editor. Meaning target can't be transformed in the editor and there is no serialization/deserialization support.

@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 14, 2021

Notice that it is considered to remove the target property from lights, see #5079. There is also a respective PR, see #14658.

It probably makes sense to solve #5079 first before considering updates to the editor. I hope we get #14658 (comment) in place at some point.

@hybridherbst
Copy link
Contributor Author

+1 from me for removing "target" and fixing some of the weird behaviours of three in regards to "objects that use their position as rotation" as well ;)

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

2 participants