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.
Controls are a sort of combined virtual shape / mini state node that render on top of the canvas? IDK. I was into this when i first thought about it but now i'm not so sure.
The idea: call
addControls
with a reactive function that returns some number of Control objects. You can think of this function as being similar to a react component, e.g.is conceptually similar to
The control object itself has geometry, a component, and can store any information it needs too.
When a pointer event comes in, if we're hovering a control, then the event is sent there first. From there, we can use normal state chart modifications or do whatever else we want. I had to add a
.preventDefault()
to get this to play nice. idk about it. very buggy and rough, but check the speech bubble example for a demo of how this might work