commits
Initial pass on adding an outliner, showing all objects in the scene
and allowing users to click to select them, even objects without a
physical representation on screen like Anchors and Groups.
Starting to becoming a chore to scroll around everywhere.
Added keyboard shortcuts, and patched a number of small bugs that were
interfering with undo/redo working properly.
Commands now make copies of the active selection, TranslateCommands
now accept an outside source of oldTransforms, and the EditCommands
update the path of the selection.
Makes more sense for them to calculate where their widgets needs to go,
or to bypass it altogether if they don't draw widgets or if they just
need to do Something Different.
Added EditCommand, broke out panel management into its own class.
The input enhancements now dispatch `change` events when a drag is
finished, in line with what I think is normal-ish browser behavior.
At least for text/text-adjacent inputs, change events are normally
sent when the user finishes editing and "commits" the change.
The property panel now does interactive updates on `input` events, and
commits them to history on `change` events.
However, the old behavior was kinda nice for rotations and
translations, so modify their step values to be negative.
Adjust implementation of SelectCommand and the underlying functions it calls.
It's now the responsibility of the caller to update any UI necessary.
To Be Determined if that's a good idea or not.
Probably going to get rid of this shadow down the line, but
Makes it a lot easier to get fine-grained input out of stock browser
input elements. Still a little bit of jank to dispel (desktop browsers
will let you drag selected text between inputs, which is easy to
trigger accidentally), but we'll revisit later.
Got a little overzealous with my copying and pasting.
Properties can be edited in the panel and they will now live update
within the editor.
Displaying properties of individual selected objects works, but
currently multiple object property display is freaking out.
Editing displayed properties is currently unimplemented.
This is definitely going to need to be updated. Rotations don't map well to widgets like this, so we'll need to extract and abstract our basis vectors from getWorldTransforms if this is going to work as expected.
Or maybe we embrace gimbal lock and update drawWidget to show the unbalanced rotation rings.
Now the highlight and widgets shouldn't lag behind by a frame.
Also removed currently-unimplemented VIEW mode for translation.
This commit has a lot of changes underpinning "implement widget drawing."
- Added Zoodle.updateUI() that redraws widgets based on the current selection, similar to `updateHighlights`.
- UI input handling uses the same event handlers, so added the concept of layers to distinguish which layer the event is coming from.
- Added a `TemporaryTool` that draws the widgets of one tool while acting as another, to allow things like orbiting and panning without dropping the original tool.
Also rename Widget layer to UI. I plan to merge the Highlights layer into the UI layer. I'm hoping this can be a path to solving some filter issues I'm seeing in Safari.
Collapsing/merging compatible commands is a neat idea but actually
managing all that merging logic and undoing the partial command and
executing the combined command is actually kinda horrific.
Instead for interaction operations we'll just keep a reference around
to the command we started and ensure it encapsulates our changes.
It's more than it looks like. Getting selection and orbiting working
required implementing my own input layer since Zdog doesn't easily
allow you to grab input events on its objects. And selection
highlighting was a whole can of worms itself.
Added EditCommand, broke out panel management into its own class.
The input enhancements now dispatch `change` events when a drag is
finished, in line with what I think is normal-ish browser behavior.
At least for text/text-adjacent inputs, change events are normally
sent when the user finishes editing and "commits" the change.
The property panel now does interactive updates on `input` events, and
commits them to history on `change` events.
This is definitely going to need to be updated. Rotations don't map well to widgets like this, so we'll need to extract and abstract our basis vectors from getWorldTransforms if this is going to work as expected.
Or maybe we embrace gimbal lock and update drawWidget to show the unbalanced rotation rings.
This commit has a lot of changes underpinning "implement widget drawing."
- Added Zoodle.updateUI() that redraws widgets based on the current selection, similar to `updateHighlights`.
- UI input handling uses the same event handlers, so added the concept of layers to distinguish which layer the event is coming from.
- Added a `TemporaryTool` that draws the widgets of one tool while acting as another, to allow things like orbiting and panning without dropping the original tool.
Collapsing/merging compatible commands is a neat idea but actually
managing all that merging logic and undoing the partial command and
executing the combined command is actually kinda horrific.
Instead for interaction operations we'll just keep a reference around
to the command we started and ensure it encapsulates our changes.