Skip to content

Make sure all p5.strands math operators are converted to strands nodes#8785

Merged
davepagurek merged 2 commits into
dev-2.0from
fix/strands-constants
May 12, 2026
Merged

Make sure all p5.strands math operators are converted to strands nodes#8785
davepagurek merged 2 commits into
dev-2.0from
fix/strands-constants

Conversation

@davepagurek
Copy link
Copy Markdown
Contributor

Resolves #8784

Changes

Previously, we were only ensuring something is a strands node before chaining strands methods on it like .mult if it's a variable name, an array, or a value literal. There are other cases where you could end up chaining methods though, one of which being if you reference a property of a js object.

To be safe, now, instead of picking out specific types of code that need to be turned into a strands node, I've made it apply to everything. This has no effect if an operator is already a strands node other than the transpiled code looking a tad more complex, but means we'll always ensure we have a strands node before calling a method on it.

PR Checklist

@p5-bot
Copy link
Copy Markdown

p5-bot Bot commented May 12, 2026

Continuous Release

CDN link

Published Packages

Commit hash: bf42ef5

Previous deployments

f1c2596


This is an automated message.

@davepagurek davepagurek merged commit 3302713 into dev-2.0 May 12, 2026
8 checks passed
@davepagurek davepagurek deleted the fix/strands-constants branch May 12, 2026 13:42
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.

1 participant