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

Updating spotlight's definition, detaches the spotlight target. #1490

Open
divyun opened this issue Aug 26, 2024 · 0 comments · May be fixed by #1491
Open

Updating spotlight's definition, detaches the spotlight target. #1490

divyun opened this issue Aug 26, 2024 · 0 comments · May be fixed by #1491
Labels
bug Something isn't working

Comments

@divyun
Copy link

divyun commented Aug 26, 2024

Describe the bug
In @glTF-transform/view, when updating the light's definition, causes the target to no longer update, with parent's transformation.

To Reproduce

  1. Create a light
  2. Attach to a node.
  3. Update any property on light.
  4. Target no longer responds to updates to the node, like rotation.
const lightsExt = doc.createExtension(KHRLightsPunctual);
const light = lightsExt.createLight('Light 1');
const node = doc.createNode('Node 1');
node.setExtension("KHR_lights_punctual", light);

let lightObj = docView.view(light);
lightObj.target.parent; // correct

light.setIntensity(10);

let lightObj = docView.view(light);
lightObj.target.parent; // undfined

Expected behavior
Transformations to the parent should continue to reflect on the target.

Versions:

  • Version: 4.0.8
  • Environment: Browser
@divyun divyun added the bug Something isn't working label Aug 26, 2024
@donmccurdy donmccurdy added this to the 🗄️ Backlog milestone Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants