Comments (5)
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.
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.
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.
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.
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)
- Render.setSize is not present in the build
- Trying to change seed, to take control of deterministic behavior
- How to suppress body tremors? HOT 2
- Why does the attractor only work on one of the two BODYs? HOT 1
- Using compound bodies with Bodies.fromVertices does not work it just shows a filled in shape. HOT 1
- Why don't bodies sometimes collide? HOT 1
- Constraints with distance limits (e.g. for ropes)
- Why might there be such an error? HOT 1
- Simple Polygon Physics Issues HOT 1
- How to add project to the Wiki gallery ?
- How to scale the world? HOT 2
- [Phaser 3] Position of matter sprite's image not correct in container HOT 1
- loss of sprite quality on mobile HOT 1
- `Composite.translate` didn't move the bodies included
- Create Matter.Bodies.fromVertices with rounded vertices
- MouseConstraint preventing clicks on buttons on mobile. HOT 2
- Vulnerability related to the formula of universal gravitation
- Body with high mass and low inertia behaves erratically
- The startdrag event of dragging a body does not trigger after losing focus.
- How to move camera in matter.js world?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matter-js.