iwb_canvas_engine 0.2.0 copy "iwb_canvas_engine: ^0.2.0" to clipboard
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.dart entrypoint; use basic.dart or advanced.dart.
  • SceneView: imageResolver is now optional; add optional configuration parameters (pointerSettings, dragStartSlop, nodeIdGenerator) for the internally owned controller.
  • SceneController: breaking: remove direct setters for mode/drawTool/drawColor (use setMode/setDrawTool/setDrawColor); add selection helpers (setSelection, toggleSelection, selectAll) and selection geometry getters (selectionBoundsWorld, selectionCenterWorld); add mutate(...) and getNode/findNode.
  • Nodes: add AABB-based topLeftWorld / fromTopLeftWorld helpers for RectNode, ImageNode, and TextNode.
  • Breaking: remove legacy aliases SceneNode.aabb and schemaVersion.
  • Action events: document payload schemas and add typed payload accessors.
  • More accurate hit-test for rotated rect/image/text nodes; hitPadding now 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.md for maintainers.
  • Docs/tooling: keep dart doc warning-free via dartdoc_options.yaml.

0.1.0 - 2026-02-03 #

Performance #

  • Cache PathNode local 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.transform and payload.delta (2×3 affine matrix).
  • Breaking: ActionType.rotate and ActionType.flip removed.

Stage 1 — Public API split (basic vs advanced) #

  • Add basic.dart entrypoint with a minimal public surface.
  • Add advanced.dart entrypoint that exports the full API.
  • Document public API split and usage in README.

Stage 2 — SceneController mutations #

  • Add SceneController mutation 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 SceneView without 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 SceneController public methods and streams.

Stage 8 — Example app updates #

  • Update example app to use basic.dart and 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 ScenePainter to 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 ScenePainter and SceneView
  • Input handling via SceneController (move/draw modes)
  • JSON v1 import/export with validation
  • Example app and unit tests
0
likes
160
points
162
downloads

Publisher

unverified uploader

Weekly Downloads

Scene-based canvas engine for Flutter: model, rendering, input, JSON serialization.

Repository (GitHub)
View/report issues

Topics

#flutter #canvas #whiteboard #drawing #graphics

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, path_drawing

More

Packages that depend on iwb_canvas_engine