Crates.io | liquidfun |
lib.rs | liquidfun |
version | 0.8.0 |
source | src |
created_at | 2015-11-15 18:47:11.555455 |
updated_at | 2015-12-29 01:30:43.14246 |
description | Rust bindings for LiquidFun. |
homepage | |
repository | https://github.com/rjanicek/liquidfun-rust |
max_upload_size | |
id | 3431 |
size | 972,545 |
Rust bindings for LiquidFun.
LiquidFun C++ API Documentation
First, add the following to your Cargo.toml
:
[dependencies]
liquidfun = "*"
Next, add this to your crate root:
extern crate liquidfun;
extern crate liquidfun;
use liquidfun::box2d::common::math::*;
use liquidfun::box2d::dynamics::world::*;
#[test]
fn hello_world() {
// Define the gravity vector.
let gravity = Vec2::new(0.0, -10.0);
// Construct a world object, which will hold and simulate the rigid bodies.
let mut world = World::new(&gravity);
assert_eq!(gravity, world.get_gravity());
}
The LiquidFun Hello World example compiles and runs. More bindings will be added as needed by projects that depend on LiquidFun Rust.
Erin Catto for Box2D
Google for LiquidFun
Nicolas Silva for box2d.rs