| Crates.io | gravita-collections |
| lib.rs | gravita-collections |
| version | 0.1.0 |
| created_at | 2025-12-25 22:19:05.823492+00 |
| updated_at | 2025-12-25 22:19:05.823492+00 |
| description | Pre-built game objects for rapid prototyping with Gravita |
| homepage | |
| repository | https://github.com/cantoramann/gravita |
| max_upload_size | |
| id | 2005006 |
| size | 33,608 |
Pre-built game objects for rapid prototyping.
Animated humanoid character with walking and jumping.
use gravita_collections::Stickman;
let mut stickman = Stickman::new(ground_y, screen_width);
// Input handling
stickman.set_move_direction(1.0); // Move right (-1 = left, 0 = stop)
stickman.jump(); // Jump if grounded
// Update and render
stickman.update(dt, screen_width);
stickman.render(&mut frame, width, height);
Thrust-based vehicle with rotation controls.
use gravita_collections::Spaceship;
let mut ship = Spaceship::new(Vec2::new(400.0, 300.0));
// Input handling
ship.set_input(thrust, turn); // thrust: 0-1, turn: -1 to 1
// Update and render
ship.update(dt);
ship.render(&mut frame, width, height);
Static celestial body for orbital mechanics demos.
use gravita_collections::Planet;
let planet = Planet::new(Vec2::new(512.0, 384.0), 50.0);
planet.render(&mut frame, width, height);
MIT OR Apache-2.0