Artimate
A simple, pixel-based graphics framework for Rust, perfect for creative coding, generative art, and interactive applications.
Features
- Simple API: Just define a draw function that returns RGBA pixel data
- Two modes: Sketch mode for simple graphics, App mode for stateful applications
- Built-in utilities: Mouse input, time tracking, window management
- Frame saving: Automatically save frames as PNG files
- Input handling: Keyboard and mouse event handling
- GPU-accelerated: Uses
pixelscrate for efficient rendering
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Quick Start
Simple Sketch
use ;
Stateful Application
use ;
Configuration
Customize your application with the Config struct:
use Config;
let config = with_dims
.set_title
.set_frames_to_save // Save first 60 frames as PNG
.set_cursor_visibility // Hide cursor
.no_loop; // Render only one frame
Input Handling
Handle mouse and keyboard input:
use ;
use Key;
Integration with Graphics Libraries
Artimate works well with other graphics libraries that can render to pixel buffers:
- tiny-skia: For 2D vector graphics
- wassily: For creative coding utilities
- imageproc: For image processing
- raqote: For 2D graphics
Examples
Check out the examples/ directory for more complete examples including:
- Simple animations
- Interactive graphics
- Generative art patterns
- Integration with external libraries
Performance
Artimate is designed for real-time graphics:
- GPU-accelerated rendering via the
pixelscrate - Minimal overhead pixel buffer management
- Supports high frame rates for smooth animations
Performance statistics are printed when the application exits.
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.