Giter VIP home page Giter VIP logo

Comments (5)

NiciusB avatar NiciusB commented on May 2, 2024

I did not need the documentation, having the script itself.
https://github.com/liabru/matter-js/tree/master/src
The code it's commented and so clear. Check it out

from matter-js.

andrew-luhring avatar andrew-luhring commented on May 2, 2024

I've been reading it-
The problem is that the documentation is generated from the code comments- so by looking at the documentation I'm just looking at a styled version of what's written in the code.
Don't get me wrong, the documentation of the methods of the main classes are pretty descriptive, but the classes themselves have no description and no examples of what they do on their own.

That's my main issue.

If I could get something on the screen, I could poke around but there's nothing I've found that will show me how to get started from scratch- from a point of a literal blank script.
The demos are helpful in showing what Matter.js does but I'm not finding them helpful in how to create a new document...

@NiciusB you know how to start from scratch, you could add a few lines to the readme that provide a point of reference.

from matter-js.

liabru avatar liabru commented on May 2, 2024

Apologies for the lack of documentation, but please note that the project is still in an alpha state and the API has not solidified. I plan to spend some time on it before I get to the first non-alpha release.

This is why the documentation points you to Demo.js as this is currently the best resource on how to use the engine and many have already used this to figure out how to get started working with it.

Another good resource is this collection on CodePen, in particular this one is a good minimal example.

Generally though the code and architecture follow that of a standard physics engine, so if you've used something like Box2d before then the naming should be fairly familiar - a Body for example refers to a rigid body.

As @NiciusB points out, I've made a lot of effort to make the code clear and well commented, so it's worth scanning over if you're interested in learning from it.

Feel free to add any more questions here though, cheers

from matter-js.

andrew-luhring avatar andrew-luhring commented on May 2, 2024

I actually discovered matter.js via CodePen :-)
I've never worked with a physics engine before. I've actually never even written a full fledged game before either...but I want to! This is day 1.

from matter-js.

liabru avatar liabru commented on May 2, 2024

No worries! The CodePen examples are probably the best place for you to start then.

I've opened an issue re. improving documentation, so I'll close this one now.

Best of luck on starting with starting game dev though :)

from matter-js.

Related Issues (20)

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.