Skip to content

Removing a light from a scene can break updates to other lights #194

@csvurt

Description

@csvurt

Removing the last instance of a certain light type (point, spot or directional) can break light parameter updates for other lights in the scene. For example, a rotating spot light will not have its rotation updated anymore.

To reproduce, add two directional lights to the MeshLab example:

<light model="urn:xml3d:light:directional" style="transform: rotate3d(0, 1, 0, -45deg)">
      <float3 name="intensity">0.7 0.7 0.7</float3>
</light>
<light model="urn:xml3d:light:directional" style="transform: rotate3d(0, 1, 0, -45deg)">
      <float3 name="intensity">0.7 0.7 0.7</float3>
</light>

Then remove one during runtime by deleting the element from the DOM. The spotlight should continue to behave normally. Remove the second directional light. The spotlight should now stop rotating. Adding new lights also has no effect anymore.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions