Add integration from Strudel patterns and canvas into hydra #309
+42
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
P
Function like this:useStrudelCanvas(s0)
Strudel needs to be loaded first, in order to be able to use the mini parser.
We also just access strudel via the window parent object, which might cause problems in some sandboxes?
I would love to have a different solution for this, maybe if we render hydra and strudel in the same iframe? But I feel like I don't understand the reason behind the iframes enough, in order to judge that (cc: @munshkr).
A very short demonstration: (thanks pastagang for the tune to copy :P)
https://github.com/user-attachments/assets/76e93300-b991-4610-9592-ad954e0ad43b
Alternative to #300