You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/physics/matter-js/index.js
+57Lines changed: 57 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -20,3 +20,60 @@ module.exports = {
20
20
World: require('./World')
21
21
22
22
};
23
+
24
+
/**
25
+
* @namespace Matter
26
+
*/
27
+
28
+
/**
29
+
* @classdesc
30
+
* The `Matter.Body` module contains methods for creating and manipulating body models.
31
+
* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.
32
+
* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.
33
+
*
34
+
* @class Body
35
+
* @memberOf Matter
36
+
*/
37
+
38
+
/**
39
+
* @classdesc
40
+
* The `Matter.Composite` module contains methods for creating and manipulating composite bodies.
41
+
* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.
42
+
* It is important to use the functions in this module to modify composites, rather than directly modifying their properties.
43
+
* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.
44
+
*
45
+
* @class Composite
46
+
* @memberOf Matter
47
+
*/
48
+
49
+
/**
50
+
* @classdesc
51
+
* The `Matter.World` module contains methods for creating and manipulating the world composite.
52
+
* A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.
53
+
* A `Matter.World` has a few additional properties including `gravity` and `bounds`.
54
+
* It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.
55
+
* There are also a few methods here that alias those in `Matter.Composite` for easier readability.
56
+
*
57
+
* @class World
58
+
* @extends Matter.Composite
59
+
* @memberOf Matter
60
+
*/
61
+
62
+
/**
63
+
* @classdesc
64
+
* The `Matter.Constraint` module contains methods for creating and manipulating constraints.
65
+
* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).
66
+
* The stiffness of constraints can be modified to create springs or elastic.
67
+
*
68
+
* @class Constraint
69
+
* @memberOf Matter
70
+
*/
71
+
72
+
/**
73
+
* @classdesc
74
+
* The `Matter.Engine` module contains methods for creating and manipulating engines.
75
+
* An engine is a controller that manages updating the simulation of the world.
0 commit comments