humman / box2d-rs Goto Github PK
View Code? Open in Web Editor NEWPort of Box2d
License: MIT License
Port of Box2d
License: MIT License
The members of B2contactEdge have visibility pub(crate).
Maybe it is correct to disallow access to these fields, since using the contact listener is better, but this is a difference in box2d-rs and box2d. This makes porting code using box2d to box2d-rs difficult if the code requires direct access to the contents of a contact edge and cannot use the contact listener.
Suggestion: Change the visibility of these fields to pub.
Hey, some hello world example would be very useful, like this one -> https://box2d.org/documentation/md__d_1__git_hub_box2d_docs_hello.html
Cos when I for example try to create world, I get this error:
let mut world = B2world::new(B2vec2::new(0.0, -10.0));
| --------- ^^^^^^^^^^^^ cannot infer type for type parameter D
| |
| consider giving world
the explicit type Rc<RefCell<B2world<D>>>
, where the type parameter D
is specified
regards
Awesome work porting this! I currently have a C++ application using Box2d and was contemplating the merit of switching to native rust. After a quick search I came across your library and was thrilled to see a native port that is in working condition. I have started porting my code into rust and, so far, I have the following (very minor) notes:
_rs
suffix. From the naming guidelines: "Crate names should not use -rs or -rust as a suffix or prefix. Every crate is Rust! It serves no purpose to remind users of this constantly." Is this because of the other box2d crate that existed already?B2vec
vs B2Vec
. This seems to happen throughout the library with some types assuming the first style and some the latter.glium
(v0.31.0) + imgui/winit (e.g., WinitPlatform::attach_window
). Is there a reason you aren't using the latest glium
? I ask in case I should be on v0.30.0 as well.Some other questions:
Hopefully I am not being to picky; I am just excited to use this library and would like to help / see it mature. In general, how would you prefer me reporting stuff I find as I dig deeper?
Wondering why Atomics are needed in Box2D? I dont see any other code spawning new threads, and thought Box2D was single threaded.
box2d-rs/src/b2_time_of_impact.rs
Line 5 in c6e0929
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.