Skip to main content

d_zero_canvas 0.1.1 copy "d_zero_canvas: ^0.1.1" to clipboard
d_zero_canvas: ^0.1.1 copied to clipboard

Zero-allocation massive-element canvas widgets (live stream danmaku, infinite pan/zoom grid, 120Hz freehand drawing) for Flutter and Impeller.

⚡️ d_zero_canvas #

Zero-allocation massive-element canvas widgets (ZDanmaku, ZInfiniteGrid, ZFreehandCanvas) for Flutter and Impeller.

License: MIT Impeller: Vulkan & Metal


📦 Distributed Z Widgets & Controllers #

Widget Active Alias Controller Zero-Allocation Architecture
ZDanmaku ZChatStream ZeroDanmakuController Fixed-capacity SoA (_x, _y, _speed, _width Float32List) + pooled TextPainter slots that step and render live bullet comments inside a single ZeroRenderBox (0 Positioned/Text widgets).
ZInfiniteGrid ZCanvasGrid ZeroViewportController Interactive 2D pan/zoom grid that packs visible minor/major grid lines into a pre-allocated Float32List and flushes them in a single Canvas.drawRawPoints(PointMode.lines) call with ZeroNumberPainter coordinate HUD.
ZFreehandCanvas - ZeroFreehandController 120Hz/240Hz low-latency stylus/touch drawing canvas storing line segments in a flat Float32List (0 Path or Offset allocations during pointer move).

🚀 Installation & Usage #

dependencies:
  d_zero_canvas: ^0.1.0
import 'package:flutter/material.dart';
import 'package:d_zero_canvas/d_zero_canvas.dart';

final danmakuCtrl = ZeroDanmakuController(capacity: 64)..emit('⚡️ 120fps Danmaku!');
final viewportCtrl = ZeroViewportController();
final freehandCtrl = ZeroFreehandController(maxSegments: 2048);

Column(
  children: [
    ZDanmaku(controller: danmakuCtrl, size: const Size(360, 120)),
    ZInfiniteGrid(controller: viewportCtrl, size: const Size(360, 180)),
    ZFreehandCanvas(controller: freehandCtrl, size: const Size(360, 180)),
  ],
);

📱 High-Load Comparison Benchmark App (example/) #

The example/ app compares d_zero_canvas (ZDanmaku + ZInfiniteGrid + ZFreehandCanvas) against traditional Stack + Positioned + Text bullet streams with live FPS, UI CPU Load (%), RSS Memory (MB), and Rebuild counters.

cd packages/d_zero_canvas/example
flutter run

📄 License #

MIT License © 2026 fexcy

0
likes
0
points
1.15k
downloads

Publisher

unverified uploader

Weekly Downloads

Zero-allocation massive-element canvas widgets (live stream danmaku, infinite pan/zoom grid, 120Hz freehand drawing) for Flutter and Impeller.

Homepage
Repository (GitHub)
View/report issues

Topics

#canvas #danmaku #grid #zero-allocation #impeller

License

unknown (license)

Dependencies

d_zero_core, flutter

More

Packages that depend on d_zero_canvas