MCPcopy
hub / github.com/phaserjs/phaser / IBodyDefinition

Interface IBodyDefinition

types/matter.d.ts:30–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 interface IBodyDefinition {
31
32 /**
33 * A `Number` specifying the angle of the body, in radians.
34 *
35 * @property angle
36 * @type number
37 * @default 0
38 */
39 angle?: number;
40
41 /**
42 * A `Number` that _measures_ the current angular speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.angularVelocity`).
43 *
44 * @readOnly
45 * @property angularSpeed
46 * @type number
47 * @default 0
48 */
49 angularSpeed?: number;
50
51 /**
52 * A `Number` that _measures_ the current angular velocity of the body after the last `Body.update`. It is read-only.
53 * If you need to modify a body's angular velocity directly, you should apply a torque or simply change the body's `angle` (as the engine uses position-Verlet integration).
54 *
55 * @readOnly
56 * @property angularVelocity
57 * @type number
58 * @default 0
59 */
60 angularVelocity?: number;
61
62 /**
63 * A `Number` that _measures_ the area of the body's convex hull, calculated at creation by `Body.create`.
64 *
65 * @property area
66 * @type string
67 * @default
68 */
69 area?: number;
70
71 /**
72 * An array of unique axis vectors (edge normals) used for collision detection.
73 * These are automatically calculated from the given convex hull (`vertices` array) in `Body.create`.
74 * They are constantly updated by `Body.update` during the simulation.
75 *
76 * @property axes
77 * @type vector[]
78 */
79 axes?: Array<Vector>;
80
81 /**
82 * A `Bounds` object that defines the AABB region for the body.
83 * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation.
84 *
85 * @property bounds
86 * @type bounds
87 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…