Crates.io | macroquad-canvas |
lib.rs | macroquad-canvas |
version | 0.4.1 |
source | src |
created_at | 2022-01-08 23:14:46.961639 |
updated_at | 2023-08-22 14:48:31.888058 |
description | Adds canvas functionality to Macroquad. |
homepage | |
repository | https://gitlab.com/alexmozaidze/macroquad-canvas |
max_upload_size | |
id | 510584 |
size | 28,171 |
This is a hard fork of the original macroquad-canvas-2d
A simple resolution-handling library for Macroquad that allows you to focus on making your games with fixed resolution.
If you're making a pixel game, then this library is for you!
To use this library, import Canvas2D
use macroquad_canvas::Canvas2D;
Then simply create the canvas
let canvas = Canvas2D::new(800_f32, 600_f32);
And here's how to draw the canvas
loop {
set_camera(&canvas.camera);
// Draw inside canvas...
set_default_camera();
canvas.draw();
next_frame().await
}
That's all you need to know to get started!
For more examples, check out the
examples folder.