iwb_canvas_engine 0.2.0
iwb_canvas_engine: ^0.2.0 copied to clipboard
Scene-based canvas engine for Flutter: model, rendering, input, JSON serialization.
Unreleased #
0.2.0 - 2026-02-04 #
- Breaking: remove legacy
package:iwb_canvas_engine/iwb_canvas_engine.dartentrypoint; usebasic.dartoradvanced.dart. SceneView:imageResolveris now optional; add optional configuration parameters (pointerSettings,dragStartSlop,nodeIdGenerator) for the internally owned controller.SceneController: breaking: remove direct setters formode/drawTool/drawColor(usesetMode/setDrawTool/setDrawColor); add selection helpers (setSelection,toggleSelection,selectAll) and selection geometry getters (selectionBoundsWorld,selectionCenterWorld); addmutate(...)andgetNode/findNode.- Nodes: add AABB-based
topLeftWorld/fromTopLeftWorldhelpers forRectNode,ImageNode, andTextNode. - Breaking: remove legacy aliases
SceneNode.aabbandschemaVersion. - Action events: document payload schemas and add typed payload accessors.
- More accurate hit-test for rotated rect/image/text nodes;
hitPaddingnow affects them. - Internal: tighten repaint notification invariants and add a debug-only guard that disables drag-move buffering on external structural scene mutations.
- Refactor input internals into vertical slices with explicit boundary contracts, strict import boundary checks, and slice-level regression tests.
- Tooling: add invariant registry + coverage checks to ensure every invariant is enforced by a test and/or tool check.
- Docs: add
CODE_REVIEW_CHECKLIST.mdfor maintainers. - Docs/tooling: keep
dart docwarning-free viadartdoc_options.yaml.
0.1.0 - 2026-02-03 #
Performance #
- Cache
PathNodelocal paths to reduce selection rendering overhead. - Avoid extra scene traversal when rendering selections.
- Simplify selection halo rendering to avoid expensive path unions/layers.
Serialization (breaking) #
- JSON import/export is now v2-only (
schemaVersion = 2). v1 scenes are not supported.
Selection transforms #
- Add horizontal flip alongside vertical flip.
- Replace rotate/flip/drag-move action events with
ActionType.transformandpayload.delta(2×3 affine matrix). - Breaking:
ActionType.rotateandActionType.flipremoved.
Stage 1 — Public API split (basic vs advanced) #
- Add
basic.dartentrypoint with a minimal public surface. - Add
advanced.dartentrypoint that exports the full API. - Document public API split and usage in README.
Stage 2 — SceneController mutations #
- Add
SceneControllermutation helpers (addNode,removeNode,moveNode).
Stage 3 — notifySceneChanged invariants #
- Enforce selection cleanup on
notifySceneChanged()after external mutations.
Stage 4 — NodeId generation #
- Use per-controller NodeId seed; document
nodeIdGenerator.
Stage 5 — SceneView without external controller #
- Allow
SceneViewwithout an external controller +onControllerReady.
Stage 6 — Locked/transformable rules #
- Define locked/transformable selection rules and document behavior.
Stage 7 — Public API docs #
- Add Dartdoc for
SceneControllerpublic methods and streams.
Stage 8 — Example app updates #
- Update example app to use
basic.dartand demonstrate JSON export/import.
Selection rendering #
- Draw selection outlines using each node's geometry instead of the combined AABB.
- Render selection as a halo around the node geometry.
Backlog item delivered #
- Add viewport culling in
ScenePainterto skip offscreen nodes.
0.0.3 #
- Publish web demo (Flutter Web) to GitHub Pages.
- Improve README links for pub.dev.
0.0.2 #
- Declare supported platforms on pub.dev.
- Add documentation link to GitHub Pages.
0.0.1 #
Initial release.
- Scene model (layers, nodes, background, camera)
- Rendering via
ScenePainterandSceneView - Input handling via
SceneController(move/draw modes) - JSON v1 import/export with validation
- Example app and unit tests