Skip to content

Bug: draw retains data references, causing unintended mutations #96

@MinCrohn

Description

@MinCrohn

Current Behavior

When calling the draw method, the passed-in data object reference is stored directly on the Pixi display object’s properties. If you later modify the original data, the Pixi display object’s values update as well, leading to confusing side effects.

Expected Behavior

Break the reference link so that modifying the original data after calling draw does not affect the Pixi display object’s stored values.

Steps to Reproduce

  1. Call the draw method with a data object.
  2. Modify a property on the original data object.
  3. Observe that the corresponding property on the Pixi display object has also changed.

Environment

.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞 BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions