From 863c686b8951fc72664f2517683231400d55a160 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20Gro=C3=9F?= Date: Wed, 2 Oct 2024 07:55:37 +0200 Subject: [PATCH] Exported docs and @types --- @types/classes/index.d.ts | 24 +-- docs/Ball.html | 262 ++++++++++++++++----------------- docs/Ball.js.html | 4 +- docs/Block.html | 254 ++++++++++++++++---------------- docs/Block.js.html | 26 ++-- docs/BlockCore.html | 4 +- docs/BlockCore.js.html | 4 +- docs/BlocksFromSVG.html | 4 +- docs/BlocksFromSVG.js.html | 4 +- docs/Chain.html | 262 ++++++++++++++++----------------- docs/Chain.js.html | 4 +- docs/Magnet.html | 262 ++++++++++++++++----------------- docs/Magnet.js.html | 4 +- docs/Mouse.html | 4 +- docs/Mouse.js.html | 4 +- docs/Parts.html | 262 ++++++++++++++++----------------- docs/Parts.js.html | 4 +- docs/Polygon.html | 262 ++++++++++++++++----------------- docs/Polygon.js.html | 4 +- docs/PolygonFromPoints.html | 262 ++++++++++++++++----------------- docs/PolygonFromPoints.js.html | 4 +- docs/PolygonFromSVG.html | 262 ++++++++++++++++----------------- docs/PolygonFromSVG.js.html | 4 +- docs/Stack.html | 262 ++++++++++++++++----------------- docs/Stack.js.html | 4 +- docs/index.html | 4 +- 26 files changed, 1230 insertions(+), 1230 deletions(-) diff --git a/@types/classes/index.d.ts b/@types/classes/index.d.ts index 34f3318..56337dd 100644 --- a/@types/classes/index.d.ts +++ b/@types/classes/index.d.ts @@ -112,18 +112,18 @@ declare class Block extends BlockCore { * @memberof Block * @example * // Rotate the block to 45 degrees - * block.rotateTo(PI / 4) + * block.rotate(PI / 4) * * // Rotate the block to 45 degrees around a specific point - * block.rotateTo(PI / 4, { x: 100, y: 100 }) + * block.rotate(PI / 4, { x: 100, y: 100 }) * * // Rotate the block to 45 degrees around a specific point and update the velocity - * block.rotateTo(PI / 4, { x: 100, y: 100 }, true) + * block.rotate(PI / 4, { x: 100, y: 100 }, true) * * // Rotate the block to 45 degrees around a specific point and update the velocity - * block.rotateTo(PI / 4, { x: 100, y: 100 }, true) + * block.rotate(PI / 4, { x: 100, y: 100 }, true) */ - rotateTo(rotation: number, point?: Matter.Vector, updateVelocity?: boolean): void; + rotate(rotation: number, point?: Matter.Vector, updateVelocity?: boolean): void; /** * Rotates the block by a specific angle (relative) * adds the angle to the current angle of the block @@ -132,13 +132,13 @@ declare class Block extends BlockCore { * @param {boolean} [updateVelocity] - Whether to update the velocity of the block * @memberof Block * @example - * // Rotate the block by 45 degrees - * block.rotate(PI / 4) + * // Increments the rotation of the block by 1 degrees + * block.rotateBy(PI / 180) * - * // Rotate the block by 45 degrees around a specific point - * block.rotate(PI / 4, { x: 100, y: 100 }) + * // Increments the rotation of the block by 1 degrees around a specific point + * block.rotateBy(PI / 180, { x: 100, y: 100 }) */ - rotate(rotation: number, point?: Matter.Vector, updateVelocity?: boolean): void; + rotateBy(rotation: number, point?: Matter.Vector, updateVelocity?: boolean): void; /** * Sets the mass centre of the block to a specific offset * the offset is relative to the current mass centre @@ -146,7 +146,7 @@ declare class Block extends BlockCore { * @param {Matter.Vector} offset * @memberof Block */ - setMassCentre(offset: Matter.Vector): void; + offsetMassCentre(offset: Matter.Vector): void; /** * Draw an image "sprite" instead of the shape of the block. * Make sure to set attributes.image so that there is an image to draw. @@ -544,4 +544,4 @@ declare class Stack extends Block { } -// ./sample/generate-types.bash - Last created: Tue Oct 1 10:50:40 CEST 2024 +// ./sample/generate-types.bash - Last created: Wed Oct 2 07:54:28 CEST 2024 diff --git a/docs/Ball.html b/docs/Ball.html index 36b045f..a1aceab 100644 --- a/docs/Ball.html +++ b/docs/Ball.html @@ -83,7 +83,7 @@ @@ -1211,9 +1211,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1221,7 +1221,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1258,13 +1259,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1301,7 +1325,7 @@

@@ -1326,7 +1350,7 @@

@@ -1360,9 +1384,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1370,8 +1394,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1396,8 +1419,6 @@

Type - Attributes - @@ -1410,97 +1431,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1527,7 +1474,7 @@

@@ -1552,7 +1499,7 @@

@@ -1580,30 +1527,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -1768,7 +1700,7 @@

Overrides:
@@ -1826,16 +1758,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -1848,9 +1780,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -1858,8 +1790,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -1884,6 +1816,8 @@

Type + Attributes + @@ -1896,30 +1830,38 @@

- block + rotation -Block +number + + + + + + + + - + The angle in radians - offset + point @@ -1932,10 +1874,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -1962,7 +1947,7 @@

@@ -1987,7 +1972,7 @@

@@ -2015,6 +2000,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2047,7 +2047,7 @@

diff --git a/docs/Ball.js.html b/docs/Ball.js.html index 6506ffa..108db9b 100644 --- a/docs/Ball.js.html +++ b/docs/Ball.js.html @@ -83,7 +83,7 @@ @@ -184,7 +184,7 @@

diff --git a/docs/Block.html b/docs/Block.html index d14e4ea..86936ff 100644 --- a/docs/Block.html +++ b/docs/Block.html @@ -83,7 +83,7 @@ @@ -1277,9 +1277,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1287,7 +1287,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1324,13 +1325,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1385,7 +1409,7 @@

@@ -1419,9 +1443,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1429,8 +1453,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1455,8 +1478,6 @@

Type - Attributes - @@ -1469,97 +1490,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1604,7 +1551,7 @@

@@ -1632,30 +1579,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -1871,16 +1803,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -1893,9 +1825,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -1903,8 +1835,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -1929,6 +1861,8 @@

Type + Attributes + @@ -1941,30 +1875,38 @@

- block + rotation -Block +number + + + + + + - + + + The angle in radians - offset + point @@ -1977,10 +1919,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -2025,7 +2010,7 @@

@@ -2053,6 +2038,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2085,7 +2085,7 @@

diff --git a/docs/Block.js.html b/docs/Block.js.html index 0b9b4e3..1a448ed 100644 --- a/docs/Block.js.html +++ b/docs/Block.js.html @@ -83,7 +83,7 @@ @@ -308,18 +308,18 @@

* @memberof Block * @example * // Rotate the block to 45 degrees - * block.rotateTo(PI / 4) + * block.rotate(PI / 4) * * // Rotate the block to 45 degrees around a specific point - * block.rotateTo(PI / 4, { x: 100, y: 100 }) + * block.rotate(PI / 4, { x: 100, y: 100 }) * * // Rotate the block to 45 degrees around a specific point and update the velocity - * block.rotateTo(PI / 4, { x: 100, y: 100 }, true) + * block.rotate(PI / 4, { x: 100, y: 100 }, true) * * // Rotate the block to 45 degrees around a specific point and update the velocity - * block.rotateTo(PI / 4, { x: 100, y: 100 }, true) + * block.rotate(PI / 4, { x: 100, y: 100 }, true) */ - rotateTo(rotation, point, updateVelocity) { + rotate(rotation, point, updateVelocity) { const body = this.body; if (!point) { Matter.Body.setAngle(body, rotation, updateVelocity); @@ -348,13 +348,13 @@

* @param {boolean} [updateVelocity] - Whether to update the velocity of the block * @memberof Block * @example - * // Rotate the block by 45 degrees - * block.rotate(PI / 4) + * // Increments the rotation of the block by 1 degrees + * block.rotateBy(PI / 180) * - * // Rotate the block by 45 degrees around a specific point - * block.rotate(PI / 4, { x: 100, y: 100 }) + * // Increments the rotation of the block by 1 degrees around a specific point + * block.rotateBy(PI / 180, { x: 100, y: 100 }) */ - rotate(rotation, point, updateVelocity) { + rotateBy(rotation, point, updateVelocity) { const body = this.body; if (!point) { Matter.Body.setAngle(body, body.angle + rotation, updateVelocity); @@ -380,7 +380,7 @@

* @param {Matter.Vector} offset * @memberof Block */ - setMassCentre(offset) { + offsetMassCentre(offset) { this.body.position.x += offset.x; this.body.position.y += offset.y; this.body.positionPrev.x += offset.x; @@ -429,7 +429,7 @@

diff --git a/docs/BlockCore.html b/docs/BlockCore.html index 430f0f1..a02b7d4 100644 --- a/docs/BlockCore.html +++ b/docs/BlockCore.html @@ -83,7 +83,7 @@ @@ -636,7 +636,7 @@

diff --git a/docs/BlockCore.js.html b/docs/BlockCore.js.html index 47885b1..08e8a40 100644 --- a/docs/BlockCore.js.html +++ b/docs/BlockCore.js.html @@ -83,7 +83,7 @@ @@ -233,7 +233,7 @@

diff --git a/docs/BlocksFromSVG.html b/docs/BlocksFromSVG.html index 9c77fc3..8c6b3aa 100644 --- a/docs/BlocksFromSVG.html +++ b/docs/BlocksFromSVG.html @@ -83,7 +83,7 @@ @@ -461,7 +461,7 @@

diff --git a/docs/BlocksFromSVG.js.html b/docs/BlocksFromSVG.js.html index c2c5d75..4b1af1d 100644 --- a/docs/BlocksFromSVG.js.html +++ b/docs/BlocksFromSVG.js.html @@ -83,7 +83,7 @@ @@ -454,7 +454,7 @@

diff --git a/docs/Chain.html b/docs/Chain.html index bf9cfb5..aca59d4 100644 --- a/docs/Chain.html +++ b/docs/Chain.html @@ -83,7 +83,7 @@ @@ -1314,9 +1314,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1324,7 +1324,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1361,13 +1362,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1404,7 +1428,7 @@

@@ -1429,7 +1453,7 @@

@@ -1463,9 +1487,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1473,8 +1497,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1499,8 +1522,6 @@

Type - Attributes - @@ -1513,97 +1534,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1630,7 +1577,7 @@

@@ -1655,7 +1602,7 @@

@@ -1683,30 +1630,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -1871,7 +1803,7 @@

Overrides:
@@ -1929,16 +1861,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -1951,9 +1883,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -1961,8 +1893,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -1987,6 +1919,8 @@

Type + Attributes + @@ -1999,30 +1933,38 @@

- block + rotation -Block +number + + + + + + + + - + The angle in radians - offset + point @@ -2035,10 +1977,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -2065,7 +2050,7 @@

@@ -2090,7 +2075,7 @@

@@ -2118,6 +2103,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2150,7 +2150,7 @@

diff --git a/docs/Chain.js.html b/docs/Chain.js.html index 37b3e49..897f8be 100644 --- a/docs/Chain.js.html +++ b/docs/Chain.js.html @@ -83,7 +83,7 @@ @@ -170,7 +170,7 @@

diff --git a/docs/Magnet.html b/docs/Magnet.html index eed53a2..0164637 100644 --- a/docs/Magnet.html +++ b/docs/Magnet.html @@ -83,7 +83,7 @@ @@ -1496,9 +1496,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1506,7 +1506,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1543,13 +1544,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1586,7 +1610,7 @@

@@ -1611,7 +1635,7 @@

@@ -1645,9 +1669,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1655,8 +1679,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1681,8 +1704,6 @@

Type - Attributes - @@ -1695,97 +1716,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1812,7 +1759,7 @@

@@ -1837,7 +1784,7 @@

@@ -1865,30 +1812,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -2053,7 +1985,7 @@

Overrides:
@@ -2111,16 +2043,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -2133,9 +2065,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -2143,8 +2075,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -2169,6 +2101,8 @@

Type + Attributes + @@ -2181,30 +2115,38 @@

- block + rotation -Block +number + + + + + + + + - + The angle in radians - offset + point @@ -2217,10 +2159,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -2247,7 +2232,7 @@

@@ -2272,7 +2257,7 @@

@@ -2300,6 +2285,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2332,7 +2332,7 @@

diff --git a/docs/Magnet.js.html b/docs/Magnet.js.html index 211db92..69dc58a 100644 --- a/docs/Magnet.js.html +++ b/docs/Magnet.js.html @@ -83,7 +83,7 @@ @@ -206,7 +206,7 @@

diff --git a/docs/Mouse.html b/docs/Mouse.html index e2f7c97..c5b8572 100644 --- a/docs/Mouse.html +++ b/docs/Mouse.html @@ -83,7 +83,7 @@ @@ -784,7 +784,7 @@

diff --git a/docs/Mouse.js.html b/docs/Mouse.js.html index 262f28b..84b3842 100644 --- a/docs/Mouse.js.html +++ b/docs/Mouse.js.html @@ -83,7 +83,7 @@ @@ -208,7 +208,7 @@

diff --git a/docs/Parts.html b/docs/Parts.html index 291f8ce..d15eeb0 100644 --- a/docs/Parts.html +++ b/docs/Parts.html @@ -83,7 +83,7 @@ @@ -1172,9 +1172,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1182,7 +1182,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1219,13 +1220,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1262,7 +1286,7 @@

@@ -1287,7 +1311,7 @@

@@ -1321,9 +1345,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1331,8 +1355,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1357,8 +1380,6 @@

Type - Attributes - @@ -1371,97 +1392,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1488,7 +1435,7 @@

@@ -1513,7 +1460,7 @@

@@ -1541,30 +1488,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -1729,7 +1661,7 @@

Overrides:
@@ -1787,16 +1719,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -1809,9 +1741,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -1819,8 +1751,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -1845,6 +1777,8 @@

Type + Attributes + @@ -1857,30 +1791,38 @@

- block + rotation -Block +number + + + + + + + + - + The angle in radians - offset + point @@ -1893,10 +1835,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -1923,7 +1908,7 @@

@@ -1948,7 +1933,7 @@

@@ -1976,6 +1961,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2008,7 +2008,7 @@

diff --git a/docs/Parts.js.html b/docs/Parts.js.html index 5320611..fb2062f 100644 --- a/docs/Parts.js.html +++ b/docs/Parts.js.html @@ -83,7 +83,7 @@ @@ -176,7 +176,7 @@

diff --git a/docs/Polygon.html b/docs/Polygon.html index 8dcdcb6..ccc80a2 100644 --- a/docs/Polygon.html +++ b/docs/Polygon.html @@ -83,7 +83,7 @@ @@ -1195,9 +1195,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1205,7 +1205,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1242,13 +1243,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1285,7 +1309,7 @@

@@ -1310,7 +1334,7 @@

@@ -1344,9 +1368,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1354,8 +1378,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1380,8 +1403,6 @@

Type - Attributes - @@ -1394,97 +1415,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1511,7 +1458,7 @@

@@ -1536,7 +1483,7 @@

@@ -1564,30 +1511,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -1752,7 +1684,7 @@

Overrides:
@@ -1810,16 +1742,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -1832,9 +1764,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -1842,8 +1774,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -1868,6 +1800,8 @@

Type + Attributes + @@ -1880,30 +1814,38 @@

- block + rotation -Block +number + + + + + + + + - + The angle in radians - offset + point @@ -1916,10 +1858,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -1946,7 +1931,7 @@

@@ -1971,7 +1956,7 @@

@@ -1999,6 +1984,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2031,7 +2031,7 @@

diff --git a/docs/Polygon.js.html b/docs/Polygon.js.html index 67e27f4..f0448a2 100644 --- a/docs/Polygon.js.html +++ b/docs/Polygon.js.html @@ -83,7 +83,7 @@ @@ -161,7 +161,7 @@

diff --git a/docs/PolygonFromPoints.html b/docs/PolygonFromPoints.html index 343023e..8c551e0 100644 --- a/docs/PolygonFromPoints.html +++ b/docs/PolygonFromPoints.html @@ -83,7 +83,7 @@ @@ -1214,9 +1214,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1224,7 +1224,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1261,13 +1262,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1304,7 +1328,7 @@

@@ -1329,7 +1353,7 @@

@@ -1363,9 +1387,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1373,8 +1397,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1399,8 +1422,6 @@

Type - Attributes - @@ -1413,97 +1434,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1530,7 +1477,7 @@

@@ -1555,7 +1502,7 @@

@@ -1583,30 +1530,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -1771,7 +1703,7 @@

Overrides:
@@ -1829,16 +1761,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -1851,9 +1783,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -1861,8 +1793,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -1887,6 +1819,8 @@

Type + Attributes + @@ -1899,30 +1833,38 @@

- block + rotation -Block +number + + + + + + + + - + The angle in radians - offset + point @@ -1935,10 +1877,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -1965,7 +1950,7 @@

@@ -1990,7 +1975,7 @@

@@ -2018,6 +2003,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2050,7 +2050,7 @@

diff --git a/docs/PolygonFromPoints.js.html b/docs/PolygonFromPoints.js.html index 249e9ec..628058e 100644 --- a/docs/PolygonFromPoints.js.html +++ b/docs/PolygonFromPoints.js.html @@ -83,7 +83,7 @@ @@ -182,7 +182,7 @@

diff --git a/docs/PolygonFromSVG.html b/docs/PolygonFromSVG.html index e218782..0d10bc5 100644 --- a/docs/PolygonFromSVG.html +++ b/docs/PolygonFromSVG.html @@ -83,7 +83,7 @@ @@ -1389,9 +1389,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1399,7 +1399,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1436,13 +1437,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1479,7 +1503,7 @@

@@ -1504,7 +1528,7 @@

@@ -1538,9 +1562,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1548,8 +1572,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1574,8 +1597,6 @@

Type - Attributes - @@ -1588,97 +1609,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1705,7 +1652,7 @@

@@ -1730,7 +1677,7 @@

@@ -1758,30 +1705,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -1946,7 +1878,7 @@

Overrides:
@@ -2004,16 +1936,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -2026,9 +1958,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -2036,8 +1968,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -2062,6 +1994,8 @@

Type + Attributes + @@ -2074,30 +2008,38 @@

- block + rotation -Block +number + + + + + + + + - + The angle in radians - offset + point @@ -2110,10 +2052,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -2140,7 +2125,7 @@

@@ -2165,7 +2150,7 @@

@@ -2193,6 +2178,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2225,7 +2225,7 @@

diff --git a/docs/PolygonFromSVG.js.html b/docs/PolygonFromSVG.js.html index 96c88b3..9b26cb6 100644 --- a/docs/PolygonFromSVG.js.html +++ b/docs/PolygonFromSVG.js.html @@ -83,7 +83,7 @@ @@ -285,7 +285,7 @@

diff --git a/docs/Stack.html b/docs/Stack.html index 1310d5b..1f1ae80 100644 --- a/docs/Stack.html +++ b/docs/Stack.html @@ -83,7 +83,7 @@ @@ -1207,9 +1207,9 @@

-

- # - removeConstraint(constraint) +

+ # + offsetMassCentre(block, offset)

@@ -1217,7 +1217,8 @@

- Remove a constraint of this block to another block. + Sets the mass centre of the block to a specific offset +the offset is relative to the current mass centre
@@ -1254,13 +1255,36 @@

- constraint + block -Matter.Constraint +Block + + + + + + + + + + + + + + + + + offset + + + + + +Matter.Vector @@ -1297,7 +1321,7 @@

@@ -1322,7 +1346,7 @@

@@ -1356,9 +1380,9 @@

-

- # - rotate(rotation, pointopt, updateVelocityopt) +

+ # + removeConstraint(constraint)

@@ -1366,8 +1390,7 @@

- Rotates the block by a specific angle (relative) -adds the angle to the current angle of the block + Remove a constraint of this block to another block.
@@ -1392,8 +1415,6 @@

Type - Attributes - @@ -1406,97 +1427,23 @@

- rotation - - - - - -number - - - - - - - - - - - - - - - - - - The angle in radians - - - - - - - point - - - - - -Matter.Vector - - - - - - - - - <optional>
- - - - - - - - - - - The point to rotate around - - - - - - - updateVelocity + constraint -boolean +Matter.Constraint - - - <optional>
- - - - - - - - Whether to update the velocity of the block + @@ -1523,7 +1470,7 @@

@@ -1548,7 +1495,7 @@

@@ -1576,30 +1523,15 @@

-
- Example - -
-
// Rotate the block by 45 degrees
-block.rotate(PI / 4)
-
-// Rotate the block by 45 degrees around a specific point
-block.rotate(PI / 4, { x: 100, y: 100 })
- - -
- -
- -

- # - rotateTo(rotation, pointopt, updateVelocityopt) +

+ # + rotate(rotation, pointopt, updateVelocityopt)

@@ -1764,7 +1696,7 @@

Overrides:
@@ -1822,16 +1754,16 @@

// Rotate the block to 45 degrees
-block.rotateTo(PI / 4)
+block.rotate(PI / 4)
 
 // Rotate the block to 45 degrees around a specific point
-block.rotateTo(PI / 4, { x: 100, y: 100 })
+block.rotate(PI / 4, { x: 100, y: 100 })
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
 
 // Rotate the block to 45 degrees around a specific point and update the velocity
-block.rotateTo(PI / 4, { x: 100, y: 100 }, true)
+block.rotate(PI / 4, { x: 100, y: 100 }, true)
@@ -1844,9 +1776,9 @@

-

- # - setMassCentre(block, offset) +

+ # + rotateBy(rotation, pointopt, updateVelocityopt)

@@ -1854,8 +1786,8 @@

- Sets the mass centre of the block to a specific offset -the offset is relative to the current mass centre + Rotates the block by a specific angle (relative) +adds the angle to the current angle of the block
@@ -1880,6 +1812,8 @@

Type + Attributes + @@ -1892,30 +1826,38 @@

- block + rotation -Block +number + + + + + + + + - + The angle in radians - offset + point @@ -1928,10 +1870,53 @@

+ + + <optional>
+ + + + + + + + + + + The point to rotate around + + + + + + + updateVelocity + + + + + +boolean + + + + + + + + + <optional>
+ + + + + + + - + Whether to update the velocity of the block @@ -1958,7 +1943,7 @@

@@ -1983,7 +1968,7 @@

@@ -2011,6 +1996,21 @@

+
+ Example + +
+
// Increments the rotation of the block by 1 degrees
+block.rotateBy(PI / 180)
+
+// Increments the rotation of the block by 1 degrees around a specific point
+block.rotateBy(PI / 180, { x: 100, y: 100 })
+ + +
+ +
+ @@ -2043,7 +2043,7 @@

diff --git a/docs/Stack.js.html b/docs/Stack.js.html index 7a024ea..e672f5b 100644 --- a/docs/Stack.js.html +++ b/docs/Stack.js.html @@ -83,7 +83,7 @@ @@ -176,7 +176,7 @@

diff --git a/docs/index.html b/docs/index.html index ce581b7..3e61dd5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -83,7 +83,7 @@ @@ -181,7 +181,7 @@

Class reference