Skip to main content

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

Zero-allocation 3D mesh globe, pressure ribbon, live stream danmaku, infinite grid, and 120Hz freehand canvas widgets for Flutter.

⚡️ d_zero_canvas #

Zero-allocation massive-element & 3D canvas widgets (Z3DMesh, ZRibbon, ZDanmaku, ZInfiniteGrid, ZFreehandCanvas) for Flutter and Impeller.

License: MIT Impeller: Vulkan & Metal


📦 Distributed Z Widgets & Controllers #

Widget Active Alias Controller Zero-Allocation Architecture
Z3DMesh Z3DGlobe Zero3DMeshController Real-time 3D wireframe & flat-shaded sphere/torus mesh engine using SoA Float32List vertex buffers, in-place depth sorting, and a single Canvas.drawVertices / drawRawPoints batch.
ZRibbon ZLowLatencyInk ZeroRibbonController 120Hz/240Hz pressure-sensitive triangle-strip ribbon trail rendered via a single Canvas.drawVertices(VertexMode.triangleStrip) call.
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 3D mesh globe, pressure ribbon, live stream danmaku, infinite grid, and 120Hz freehand canvas widgets for Flutter.

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