pixelflux_codecerebrum 1.1.0
pixelflux_codecerebrum: ^1.1.0 copied to clipboard
Official Flutter package of PixelFlux app. Render your PixelFlux (.pxlflux) files in Flutter with full animation control.
pixelflux_codecerebrum #
Official Flutter package of PixelFlux app.
Render your PixelFlux (.pxlflux) files directly in Flutter with ease — whether it’s a static pixel image or a full animation.
Easily load files, display them on a canvas, and control playback or transformations in just a few lines of code.
✨ Features #
- 🎨 Render
.pxlfluximages & animations - 🖼️ Load files from assets or network
- 🎛️ Full animation controls: play, pause, stop, reverse
- 🔁 Loop modes: once, loop, ping-pong
- ⏩ Adjustable playback speed
- 🪞 Transformations: scale, rotate, flip, translate
- 🎲 Optional pixel borders
- 📏 Configurable canvas & pixel size
- 🖌️ Override background color
📦 Installation #
Add to your pubspec.yaml:
dependencies:
pixelflux_codecerebrum: latest
🚀 Usage #
Load a project #
final project = await PixelFluxLoader.loadFromAsset("assets/sample_video.pxlflux");
// Or from network:
// final project = await PixelFluxLoader.loadFromNetwork("https://example.com/myart.pxlflux");
Create a controller #
final controller = PixelFluxController();
Render on canvas #
PixelFluxCanvas(
project: project,
controller: controller,
canvasWidth: 320,
canvasHeight: 240,
pixelSize: 12.0,
showPixelBorders: true,
scale: 1.5,
rotation: 0.2,
flipHorizontal: false,
flipVertical: false,
translateX: 10,
translateY: -5,
),
🎬 Playback Controls #
controller.play();
controller.pause();
controller.stop();
controller.reverse();
controller.setSpeed(2.0); // 2x speed
controller.setLoopMode(LoopMode.pingPong);
🧪 Example App #
A demo app is included (pixelflux_demo) showing how to:
- Load & render
.pxlfluxfiles - Control playback
- Adjust speed & loop modes
- Apply transformations
Run with:
cd pixelflux_demo
flutter run
📄 License #
MIT License.
See LICENSE for details.