geometry_kit_editor 0.1.0
geometry_kit_editor: ^0.1.0 copied to clipboard
Interactive editing for geometry_kit scenes — selection, drag to move, undo and redo on an immutable document, with a tool API for handles and gizmos.
0.1.0 #
Initial release.
EditorNode: a solid in local space plus aTransform3placement, style, an optionalSolidGradient(gradient),lockedandhidden.copyWith(gradient: null)removes the gradient; leaving it out keeps it.Document: immutable, ordered nodes keyed by id;put,update,updateAll,translate,removeAll.EditorController: selection, active tool, snapshot undo/redo with a history limit, andbegin/preview/commit/canceltransactions so a drag is one undo step.apply(and the helpers built on it) commits an open transaction first, so an outside edit ends a drag instead of being lost.EditorToolAPI andSelectTool: click, Shift+click, drag to move on the floor (camera-facing plane when the floor is edge-on), selection box.EditorScene: draws the document in aGeoScene(local solids plus transforms, so dragging never re-triangulates), routes each gesture to the tool that claimed it, orbits on empty space, and handles undo/redo, select all, delete, arrow nudge and Escape shortcuts. Mid-drag only Escape (cancel) is honoured. Node gradients are drawn as they are;nodeStylestyles fill colour and edges.
