GithubHelp home page GithubHelp logo

adri326 / appl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aribyadi/appl

0.0 0.0 0.0 25 KB

Appl is a physics engine powered by Rapier. It is currently 2d only.

License: MIT License

Rust 100.00%

appl's Introduction

Appl

version downloads license

Description

Appl Logo

Appl is a library that provides abstraction over the Rapier library.
Appl was created due to the lack of any physics engine for beginners to use.
Appl's main purpose is to be simple and easy to use.

Example

use appl::*;

fn main() {
  // Initialize Appl World
  let mut appl = ApplWorld::new(Vect2 { x: 0.0, y: 9.81 }, 50.0);
  // Create ground rigid body
  let ground = appl.add_rigid_body(
    BodyType::Static,
    0.3,
    BodyShape::Cuboid {
      width: 64.0,
      height: 32.0,
    },
    0.3,
    Vect2 { x: 0.0, y: 320.0 }
  );
  // Create box1 rigid body
  let box1 = appl.add_rigid_body(
    BodyType::Dynamic,
    0.3,
    BodyShape::Cuboid {
      width: 32.0,
      height: 32.0,
    },
    0.3,
    Vect2 { x: 0.0, y: 0.0 }
  );

  for _ in 0..200 {
    // Update the world
    appl.step();

    // Prints box1 position
    let box1_pos = appl.get_rigid_body_pos(box1);
    println("{}, {}", box1_pos.x, box1_pos.y);
  }
}

How to contribute

Any pull request are definitely welcomed and appreciated!

If you have any issues or questions, please open an issue and i will try to help you.

Project Status

This project is in it's very very early stage and currently only works for 2d.

License

MIT

appl's People

Contributors

aribyadi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.