magic_cube 1.0.1
magic_cube: ^1.0.1 copied to clipboard
A pure Flutter 3D Rubik's cube widget with draggable layer turns, free whole-cube rotation, standard notation moves, scrambling and undo.
1.0.1 #
- ๐ Docs: improved the documentation.
1.0.0 #
- ๐ Gestures โ drag a sticker to turn its layer (axis auto-detected, snaps to the nearest 90ยฐ); drag outside the cube to orbit with inertia, or use two fingers to orbit while the in-progress turn smoothly rolls back.
- ๐ Free viewpoint โ full 360ยฐ flips with no gimbal lock; view animations always take the shortest path.
- ๐ค Notation & NxN โ standard
U D L R F B M E S x y zwith'/2, numeric layer prefixes (e.g.3X') for odd cubes up to 11ร11;parse/notationround-trip and throwFormatExceptionon malformed tokens. - ๐ง State & controller โ scramble, undo, step-by-step restore, solved detection, solved-face count, bounded history and queued animations;
taskEpochmarks the state generation, and one controller is safe to share across widgets. - ๐จ Appearance โ four hot-swappable themes, two-level corner rounding with patches, raised stickers with side walls and shadows, view-space lighting, and a fully validated
CubeTheme. - ๐ผ๏ธ Centre-piece logo โ an
ui.Imageon one centre sticker that follows the cubie's perspective and lighting; helpers rasterise text, icons or the Flutter logo into square transparent images. - ๐ Pixel-quality rendering โ adaptive arc tessellation (โค0.12 px), hairline anti-aliasing on side walls, stencil-free on Web, plus near-plane / degenerate-homography guards.
- โก Performance โ static layers cached as
Pictures, theme/signature-keyed caches for geometry, shading and outlines, pooled temporaries, and unified cache disposal on last unmount (~69% less per-frame work at 400ร400 on a 3ร3). - ๐งช Quality โ regression tests for notation, state math, controller lifecycle, layer sorting, corner patches, logo perspective and anti-aliasing; CI runs format / analyze / tests for the package and example.
