gravita-collections

Crates.iogravita-collections
lib.rsgravita-collections
version0.1.0
created_at2025-12-25 22:19:05.823492+00
updated_at2025-12-25 22:19:05.823492+00
descriptionPre-built game objects for rapid prototyping with Gravita
homepage
repositoryhttps://github.com/cantoramann/gravita
max_upload_size
id2005006
size33,608
Can Toraman (cantoramann)

documentation

README

gravita-collections

Pre-built game objects for rapid prototyping.

Available Objects

Stickman

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);

Spaceship

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);

Planet

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);

License

MIT OR Apache-2.0

Commit count: 0

cargo fmt