Skip to content

Conversation

@davepagurek
Copy link
Contributor

Resolves #8396

Changes:

  • Previously, we would call .copy() on any object modified in any way in a branch. If you assign to color.rgb, we want to do color.copy(). That made sense because that's a sizzle assignment. But it broke if you assigned to inputs.color, it would do inputs.copy(), which doesn't work because inputs is a struct.
  • Now, we copy the outermost property accessed object that is not a swizzle. So that's color in color.rgb, inputs.color in inputs.color, and inputs.color in inputs.color.rgb.

Live: https://editor.p5js.org/davepagurek/sketches/vOrLgKr0R

PR Checklist

@davepagurek davepagurek merged commit b4f23ee into dev-2.0 Jan 10, 2026
5 checks passed
@davepagurek davepagurek deleted the fix/assign-inputs-branching branch January 10, 2026 15:13
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.

2 participants