diff --git a/docs/ast/source/icon-point.mjs.json b/docs/ast/source/icon-point.mjs.json
index 705c39a..fa7da18 100644
--- a/docs/ast/source/icon-point.mjs.json
+++ b/docs/ast/source/icon-point.mjs.json
@@ -1,28 +1,28 @@
{
"type": "File",
"start": 0,
- "end": 9365,
+ "end": 9903,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
- "line": 194,
+ "line": 210,
"column": 0
}
},
"program": {
"type": "Program",
"start": 0,
- "end": 9365,
+ "end": 9903,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
- "line": 194,
+ "line": 210,
"column": 0
}
},
@@ -30,29 +30,29 @@
"body": [
{
"type": "Identifier",
- "start": 1158,
- "end": 9301,
+ "start": 1137,
+ "end": 9839,
"loc": {
"start": {
- "line": 30,
+ "line": 29,
"column": 0
},
"end": {
- "line": 190,
+ "line": 206,
"column": 1
}
},
"id": {
"type": "Identifier",
- "start": 1164,
- "end": 1173,
+ "start": 1143,
+ "end": 1152,
"loc": {
"start": {
- "line": 30,
+ "line": 29,
"column": 6
},
"end": {
- "line": 30,
+ "line": 29,
"column": 15
},
"identifierName": "IconPoint"
@@ -63,30 +63,30 @@
"superClass": null,
"body": {
"type": "ClassBody",
- "start": 1174,
- "end": 9301,
+ "start": 1153,
+ "end": 9839,
"loc": {
"start": {
- "line": 30,
+ "line": 29,
"column": 16
},
"end": {
- "line": 190,
+ "line": 206,
"column": 1
}
},
"body": [
{
"type": "ClassProperty",
- "start": 1245,
- "end": 1283,
+ "start": 1224,
+ "end": 1262,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 4
},
"end": {
- "line": 34,
+ "line": 33,
"column": 42
}
},
@@ -94,15 +94,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1252,
- "end": 1265,
+ "start": 1231,
+ "end": 1244,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 11
},
"end": {
- "line": 34,
+ "line": 33,
"column": 24
},
"identifierName": "defaultOffset"
@@ -111,30 +111,30 @@
},
"value": {
"type": "ObjectExpression",
- "start": 1268,
- "end": 1282,
+ "start": 1247,
+ "end": 1261,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 27
},
"end": {
- "line": 34,
+ "line": 33,
"column": 41
}
},
"properties": [
{
"type": "ObjectProperty",
- "start": 1270,
- "end": 1274,
+ "start": 1249,
+ "end": 1253,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 29
},
"end": {
- "line": 34,
+ "line": 33,
"column": 33
}
},
@@ -143,15 +143,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1270,
- "end": 1271,
+ "start": 1249,
+ "end": 1250,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 29
},
"end": {
- "line": 34,
+ "line": 33,
"column": 30
},
"identifierName": "x"
@@ -160,15 +160,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 1273,
- "end": 1274,
+ "start": 1252,
+ "end": 1253,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 32
},
"end": {
- "line": 34,
+ "line": 33,
"column": 33
}
},
@@ -181,15 +181,15 @@
},
{
"type": "ObjectProperty",
- "start": 1276,
- "end": 1280,
+ "start": 1255,
+ "end": 1259,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 35
},
"end": {
- "line": 34,
+ "line": 33,
"column": 39
}
},
@@ -198,15 +198,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1276,
- "end": 1277,
+ "start": 1255,
+ "end": 1256,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 35
},
"end": {
- "line": 34,
+ "line": 33,
"column": 36
},
"identifierName": "y"
@@ -215,15 +215,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 1279,
- "end": 1280,
+ "start": 1258,
+ "end": 1259,
"loc": {
"start": {
- "line": 34,
+ "line": 33,
"column": 38
},
"end": {
- "line": 34,
+ "line": 33,
"column": 39
}
},
@@ -240,15 +240,15 @@
{
"type": "CommentBlock",
"value": "*\n * Static offset to use when none is passed.\n ",
- "start": 1180,
- "end": 1240,
+ "start": 1159,
+ "end": 1219,
"loc": {
"start": {
- "line": 31,
+ "line": 30,
"column": 4
},
"end": {
- "line": 33,
+ "line": 32,
"column": 7
}
}
@@ -258,15 +258,15 @@
{
"type": "CommentBlock",
"value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
- "start": 1288,
- "end": 1411,
+ "start": 1267,
+ "end": 1390,
"loc": {
"start": {
- "line": 35,
+ "line": 34,
"column": 4
},
"end": {
- "line": 37,
+ "line": 36,
"column": 7
}
}
@@ -275,15 +275,15 @@
},
{
"type": "ClassProperty",
- "start": 1416,
- "end": 1458,
+ "start": 1395,
+ "end": 1437,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 4
},
"end": {
- "line": 38,
+ "line": 37,
"column": 46
}
},
@@ -291,15 +291,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1423,
- "end": 1436,
+ "start": 1402,
+ "end": 1415,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 11
},
"end": {
- "line": 38,
+ "line": 37,
"column": 24
},
"identifierName": "defaultAnchor"
@@ -308,30 +308,30 @@
},
"value": {
"type": "ObjectExpression",
- "start": 1439,
- "end": 1457,
+ "start": 1418,
+ "end": 1436,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 27
},
"end": {
- "line": 38,
+ "line": 37,
"column": 45
}
},
"properties": [
{
"type": "ObjectProperty",
- "start": 1441,
- "end": 1447,
+ "start": 1420,
+ "end": 1426,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 29
},
"end": {
- "line": 38,
+ "line": 37,
"column": 35
}
},
@@ -340,15 +340,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1441,
- "end": 1442,
+ "start": 1420,
+ "end": 1421,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 29
},
"end": {
- "line": 38,
+ "line": 37,
"column": 30
},
"identifierName": "x"
@@ -357,15 +357,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 1444,
- "end": 1447,
+ "start": 1423,
+ "end": 1426,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 32
},
"end": {
- "line": 38,
+ "line": 37,
"column": 35
}
},
@@ -378,15 +378,15 @@
},
{
"type": "ObjectProperty",
- "start": 1449,
- "end": 1455,
+ "start": 1428,
+ "end": 1434,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 37
},
"end": {
- "line": 38,
+ "line": 37,
"column": 43
}
},
@@ -395,15 +395,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1449,
- "end": 1450,
+ "start": 1428,
+ "end": 1429,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 37
},
"end": {
- "line": 38,
+ "line": 37,
"column": 38
},
"identifierName": "y"
@@ -412,15 +412,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 1452,
- "end": 1455,
+ "start": 1431,
+ "end": 1434,
"loc": {
"start": {
- "line": 38,
+ "line": 37,
"column": 40
},
"end": {
- "line": 38,
+ "line": 37,
"column": 43
}
},
@@ -437,15 +437,15 @@
{
"type": "CommentBlock",
"value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
- "start": 1288,
- "end": 1411,
+ "start": 1267,
+ "end": 1390,
"loc": {
"start": {
- "line": 35,
+ "line": 34,
"column": 4
},
"end": {
- "line": 37,
+ "line": 36,
"column": 7
}
}
@@ -455,15 +455,15 @@
{
"type": "CommentBlock",
"value": "*\n * The version of the module.\n ",
- "start": 1463,
- "end": 1508,
+ "start": 1442,
+ "end": 1487,
"loc": {
"start": {
- "line": 39,
+ "line": 38,
"column": 4
},
"end": {
- "line": 41,
+ "line": 40,
"column": 7
}
}
@@ -472,15 +472,15 @@
},
{
"type": "ClassProperty",
- "start": 1513,
- "end": 1531,
+ "start": 1492,
+ "end": 1510,
"loc": {
"start": {
- "line": 42,
+ "line": 41,
"column": 4
},
"end": {
- "line": 42,
+ "line": 41,
"column": 22
}
},
@@ -488,15 +488,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1513,
- "end": 1520,
+ "start": 1492,
+ "end": 1499,
"loc": {
"start": {
- "line": 42,
+ "line": 41,
"column": 4
},
"end": {
- "line": 42,
+ "line": 41,
"column": 11
},
"identifierName": "version"
@@ -506,15 +506,15 @@
},
"value": {
"type": "StringLiteral",
- "start": 1523,
- "end": 1530,
+ "start": 1502,
+ "end": 1509,
"loc": {
"start": {
- "line": 42,
+ "line": 41,
"column": 14
},
"end": {
- "line": 42,
+ "line": 41,
"column": 21
}
},
@@ -528,15 +528,15 @@
{
"type": "CommentBlock",
"value": "*\n * The version of the module.\n ",
- "start": 1463,
- "end": 1508,
+ "start": 1442,
+ "end": 1487,
"loc": {
"start": {
- "line": 39,
+ "line": 38,
"column": 4
},
"end": {
- "line": 41,
+ "line": 40,
"column": 7
}
}
@@ -546,15 +546,15 @@
{
"type": "CommentBlock",
"value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
- "start": 1536,
- "end": 1641,
+ "start": 1515,
+ "end": 1620,
"loc": {
"start": {
- "line": 43,
+ "line": 42,
"column": 4
},
"end": {
- "line": 46,
+ "line": 45,
"column": 7
}
}
@@ -563,15 +563,15 @@
},
{
"type": "ClassProperty",
- "start": 1646,
- "end": 1653,
+ "start": 1625,
+ "end": 1632,
"loc": {
"start": {
- "line": 47,
+ "line": 46,
"column": 4
},
"end": {
- "line": 47,
+ "line": 46,
"column": 11
}
},
@@ -579,15 +579,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1646,
- "end": 1652,
+ "start": 1625,
+ "end": 1631,
"loc": {
"start": {
- "line": 47,
+ "line": 46,
"column": 4
},
"end": {
- "line": 47,
+ "line": 46,
"column": 10
},
"identifierName": "logger"
@@ -600,15 +600,15 @@
{
"type": "CommentBlock",
"value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
- "start": 1536,
- "end": 1641,
+ "start": 1515,
+ "end": 1620,
"loc": {
"start": {
- "line": 43,
+ "line": 42,
"column": 4
},
"end": {
- "line": 46,
+ "line": 45,
"column": 7
}
}
@@ -617,16 +617,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the raw pixel position\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
- "start": 1658,
- "end": 1894,
+ "value": "*\n * An object storing the position of the point that was set. This is the point on the rectangle.\n * It can be changed at runtime.\n * ________\n * | |\n * | x |\n * | |\n * |_______|\n * @private\n * @type {Point}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
+ "start": 1637,
+ "end": 2043,
"loc": {
"start": {
- "line": 48,
+ "line": 47,
"column": 4
},
"end": {
- "line": 54,
+ "line": 59,
"column": 7
}
}
@@ -635,65 +635,65 @@
},
{
"type": "ClassProperty",
- "start": 1899,
- "end": 1931,
+ "start": 2048,
+ "end": 2075,
"loc": {
"start": {
- "line": 55,
+ "line": 60,
"column": 4
},
"end": {
- "line": 55,
- "column": 36
+ "line": 60,
+ "column": 31
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
- "start": 1899,
- "end": 1913,
+ "start": 2048,
+ "end": 2057,
"loc": {
"start": {
- "line": 55,
+ "line": 60,
"column": 4
},
"end": {
- "line": 55,
- "column": 18
+ "line": 60,
+ "column": 13
},
- "identifierName": "rawPixelsPoint"
+ "identifierName": "iconPoint"
},
- "name": "rawPixelsPoint",
+ "name": "iconPoint",
"leadingComments": null
},
"value": {
"type": "ObjectExpression",
- "start": 1916,
- "end": 1930,
+ "start": 2060,
+ "end": 2074,
"loc": {
"start": {
- "line": 55,
- "column": 21
+ "line": 60,
+ "column": 16
},
"end": {
- "line": 55,
- "column": 35
+ "line": 60,
+ "column": 30
}
},
"properties": [
{
"type": "ObjectProperty",
- "start": 1918,
- "end": 1922,
+ "start": 2062,
+ "end": 2066,
"loc": {
"start": {
- "line": 55,
- "column": 23
+ "line": 60,
+ "column": 18
},
"end": {
- "line": 55,
- "column": 27
+ "line": 60,
+ "column": 22
}
},
"method": false,
@@ -701,16 +701,16 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1918,
- "end": 1919,
+ "start": 2062,
+ "end": 2063,
"loc": {
"start": {
- "line": 55,
- "column": 23
+ "line": 60,
+ "column": 18
},
"end": {
- "line": 55,
- "column": 24
+ "line": 60,
+ "column": 19
},
"identifierName": "x"
},
@@ -718,16 +718,16 @@
},
"value": {
"type": "NumericLiteral",
- "start": 1921,
- "end": 1922,
+ "start": 2065,
+ "end": 2066,
"loc": {
"start": {
- "line": 55,
- "column": 26
+ "line": 60,
+ "column": 21
},
"end": {
- "line": 55,
- "column": 27
+ "line": 60,
+ "column": 22
}
},
"extra": {
@@ -739,16 +739,16 @@
},
{
"type": "ObjectProperty",
- "start": 1924,
- "end": 1928,
+ "start": 2068,
+ "end": 2072,
"loc": {
"start": {
- "line": 55,
- "column": 29
+ "line": 60,
+ "column": 24
},
"end": {
- "line": 55,
- "column": 33
+ "line": 60,
+ "column": 28
}
},
"method": false,
@@ -756,16 +756,16 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1924,
- "end": 1925,
+ "start": 2068,
+ "end": 2069,
"loc": {
"start": {
- "line": 55,
- "column": 29
+ "line": 60,
+ "column": 24
},
"end": {
- "line": 55,
- "column": 30
+ "line": 60,
+ "column": 25
},
"identifierName": "y"
},
@@ -773,16 +773,16 @@
},
"value": {
"type": "NumericLiteral",
- "start": 1927,
- "end": 1928,
+ "start": 2071,
+ "end": 2072,
"loc": {
"start": {
- "line": 55,
- "column": 32
+ "line": 60,
+ "column": 27
},
"end": {
- "line": 55,
- "column": 33
+ "line": 60,
+ "column": 28
}
},
"extra": {
@@ -797,16 +797,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the raw pixel position\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
- "start": 1658,
- "end": 1894,
+ "value": "*\n * An object storing the position of the point that was set. This is the point on the rectangle.\n * It can be changed at runtime.\n * ________\n * | |\n * | x |\n * | |\n * |_______|\n * @private\n * @type {Point}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
+ "start": 1637,
+ "end": 2043,
"loc": {
"start": {
- "line": 48,
+ "line": 47,
"column": 4
},
"end": {
- "line": 54,
+ "line": 59,
"column": 7
}
}
@@ -815,16 +815,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the position of the rectangle\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 1936,
- "end": 2165,
+ "value": "*\n * An object storing the position of the rectangle.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the rectangle.\n * @prop {number} y - The y position of the rectangle.\n ",
+ "start": 2080,
+ "end": 2302,
"loc": {
"start": {
- "line": 56,
+ "line": 61,
"column": 4
},
"end": {
- "line": 62,
+ "line": 67,
"column": 7
}
}
@@ -833,31 +833,31 @@
},
{
"type": "ClassProperty",
- "start": 2170,
- "end": 2193,
+ "start": 2307,
+ "end": 2323,
"loc": {
"start": {
- "line": 63,
+ "line": 68,
"column": 4
},
"end": {
- "line": 63,
- "column": 27
+ "line": 68,
+ "column": 20
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
- "start": 2170,
- "end": 2185,
+ "start": 2307,
+ "end": 2322,
"loc": {
"start": {
- "line": 63,
+ "line": 68,
"column": 4
},
"end": {
- "line": 63,
+ "line": 68,
"column": 19
},
"identifierName": "positionalPoint"
@@ -865,34 +865,20 @@
"name": "positionalPoint",
"leadingComments": null
},
- "value": {
- "type": "NullLiteral",
- "start": 2188,
- "end": 2192,
- "loc": {
- "start": {
- "line": 63,
- "column": 22
- },
- "end": {
- "line": 63,
- "column": 26
- }
- }
- },
+ "value": null,
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the position of the rectangle\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 1936,
- "end": 2165,
+ "value": "*\n * An object storing the position of the rectangle.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the rectangle.\n * @prop {number} y - The y position of the rectangle.\n ",
+ "start": 2080,
+ "end": 2302,
"loc": {
"start": {
- "line": 56,
+ "line": 61,
"column": 4
},
"end": {
- "line": 62,
+ "line": 67,
"column": 7
}
}
@@ -901,16 +887,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 2198,
- "end": 2452,
+ "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the point after rotation is applied.\n * @prop {number} y - The y position of the point after rotation is applied.\n ",
+ "start": 2328,
+ "end": 2618,
"loc": {
"start": {
- "line": 64,
+ "line": 69,
"column": 4
},
"end": {
- "line": 70,
+ "line": 75,
"column": 7
}
}
@@ -919,15 +905,15 @@
},
{
"type": "ClassProperty",
- "start": 2457,
- "end": 2480,
+ "start": 2623,
+ "end": 2646,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 4
},
"end": {
- "line": 71,
+ "line": 76,
"column": 27
}
},
@@ -935,15 +921,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2457,
- "end": 2462,
+ "start": 2623,
+ "end": 2628,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 4
},
"end": {
- "line": 71,
+ "line": 76,
"column": 9
},
"identifierName": "point"
@@ -953,30 +939,30 @@
},
"value": {
"type": "ObjectExpression",
- "start": 2465,
- "end": 2479,
+ "start": 2631,
+ "end": 2645,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 12
},
"end": {
- "line": 71,
+ "line": 76,
"column": 26
}
},
"properties": [
{
"type": "ObjectProperty",
- "start": 2467,
- "end": 2471,
+ "start": 2633,
+ "end": 2637,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 14
},
"end": {
- "line": 71,
+ "line": 76,
"column": 18
}
},
@@ -985,15 +971,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2467,
- "end": 2468,
+ "start": 2633,
+ "end": 2634,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 14
},
"end": {
- "line": 71,
+ "line": 76,
"column": 15
},
"identifierName": "x"
@@ -1002,15 +988,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 2470,
- "end": 2471,
+ "start": 2636,
+ "end": 2637,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 17
},
"end": {
- "line": 71,
+ "line": 76,
"column": 18
}
},
@@ -1023,15 +1009,15 @@
},
{
"type": "ObjectProperty",
- "start": 2473,
- "end": 2477,
+ "start": 2639,
+ "end": 2643,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 20
},
"end": {
- "line": 71,
+ "line": 76,
"column": 24
}
},
@@ -1040,15 +1026,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2473,
- "end": 2474,
+ "start": 2639,
+ "end": 2640,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 20
},
"end": {
- "line": 71,
+ "line": 76,
"column": 21
},
"identifierName": "y"
@@ -1057,15 +1043,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 2476,
- "end": 2477,
+ "start": 2642,
+ "end": 2643,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 23
},
"end": {
- "line": 71,
+ "line": 76,
"column": 24
}
},
@@ -1081,16 +1067,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 2198,
- "end": 2452,
+ "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the point after rotation is applied.\n * @prop {number} y - The y position of the point after rotation is applied.\n ",
+ "start": 2328,
+ "end": 2618,
"loc": {
"start": {
- "line": 64,
+ "line": 69,
"column": 4
},
"end": {
- "line": 70,
+ "line": 75,
"column": 7
}
}
@@ -1099,16 +1085,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle\n * @prop {number} height - The height of the rectangle\n ",
- "start": 2485,
- "end": 2697,
+ "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle.\n * @prop {number} height - The height of the rectangle.\n ",
+ "start": 2651,
+ "end": 2865,
"loc": {
"start": {
- "line": 72,
+ "line": 77,
"column": 4
},
"end": {
- "line": 78,
+ "line": 83,
"column": 7
}
}
@@ -1117,15 +1103,15 @@
},
{
"type": "ClassProperty",
- "start": 2702,
- "end": 2737,
+ "start": 2870,
+ "end": 2905,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 4
},
"end": {
- "line": 79,
+ "line": 84,
"column": 39
}
},
@@ -1133,15 +1119,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2702,
- "end": 2708,
+ "start": 2870,
+ "end": 2876,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 4
},
"end": {
- "line": 79,
+ "line": 84,
"column": 10
},
"identifierName": "bounds"
@@ -1151,30 +1137,30 @@
},
"value": {
"type": "ObjectExpression",
- "start": 2711,
- "end": 2736,
+ "start": 2879,
+ "end": 2904,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 13
},
"end": {
- "line": 79,
+ "line": 84,
"column": 38
}
},
"properties": [
{
"type": "ObjectProperty",
- "start": 2713,
- "end": 2722,
+ "start": 2881,
+ "end": 2890,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 15
},
"end": {
- "line": 79,
+ "line": 84,
"column": 24
}
},
@@ -1183,15 +1169,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2713,
- "end": 2718,
+ "start": 2881,
+ "end": 2886,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 15
},
"end": {
- "line": 79,
+ "line": 84,
"column": 20
},
"identifierName": "width"
@@ -1200,15 +1186,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 2720,
- "end": 2722,
+ "start": 2888,
+ "end": 2890,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 22
},
"end": {
- "line": 79,
+ "line": 84,
"column": 24
}
},
@@ -1221,15 +1207,15 @@
},
{
"type": "ObjectProperty",
- "start": 2724,
- "end": 2734,
+ "start": 2892,
+ "end": 2902,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 26
},
"end": {
- "line": 79,
+ "line": 84,
"column": 36
}
},
@@ -1238,15 +1224,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2724,
- "end": 2730,
+ "start": 2892,
+ "end": 2898,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 26
},
"end": {
- "line": 79,
+ "line": 84,
"column": 32
},
"identifierName": "height"
@@ -1255,15 +1241,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 2732,
- "end": 2734,
+ "start": 2900,
+ "end": 2902,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 34
},
"end": {
- "line": 79,
+ "line": 84,
"column": 36
}
},
@@ -1279,16 +1265,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle\n * @prop {number} height - The height of the rectangle\n ",
- "start": 2485,
- "end": 2697,
+ "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle.\n * @prop {number} height - The height of the rectangle.\n ",
+ "start": 2651,
+ "end": 2865,
"loc": {
"start": {
- "line": 72,
+ "line": 77,
"column": 4
},
"end": {
- "line": 78,
+ "line": 83,
"column": 7
}
}
@@ -1297,16 +1283,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of\n * @prop {number} pPoint.x - The x coordinate of the rectangle\n * @prop {number} pPoint.y - The y coordinate of the rectangle\n * @param {Bounds} pBounds - The size of the rectangle\n * @prop {number} pBounds.width - The width of the rectangle\n * @prop {number} pBounds.height - The height of the rectangle\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle\n * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range\n ",
- "start": 2742,
- "end": 3649,
+ "value": "*\n * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.\n * @prop {number} pPoint.x - The x coordinate of the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the rectangle.\n * @param {Bounds} pBounds - The size of the rectangle.\n * @prop {number} pBounds.width - The width of the rectangle.\n * @prop {number} pBounds.height - The height of the rectangle.\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.\n *\n * ## Normalized\n If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`\n The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.\n ",
+ "start": 2910,
+ "end": 4086,
"loc": {
"start": {
- "line": 80,
+ "line": 85,
"column": 4
},
"end": {
- "line": 91,
+ "line": 100,
"column": 7
}
}
@@ -1315,15 +1301,15 @@
},
{
"type": "ClassMethod",
- "start": 3654,
- "end": 5017,
+ "start": 4091,
+ "end": 4425,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 4
},
"end": {
- "line": 117,
+ "line": 109,
"column": 5
}
},
@@ -1331,15 +1317,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 3654,
- "end": 3665,
+ "start": 4091,
+ "end": 4102,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 4
},
"end": {
- "line": 92,
+ "line": 101,
"column": 15
},
"identifierName": "constructor"
@@ -1355,15 +1341,15 @@
"params": [
{
"type": "Identifier",
- "start": 3666,
- "end": 3672,
+ "start": 4103,
+ "end": 4109,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 16
},
"end": {
- "line": 92,
+ "line": 101,
"column": 22
},
"identifierName": "pPoint"
@@ -1372,15 +1358,15 @@
},
{
"type": "Identifier",
- "start": 3674,
- "end": 3681,
+ "start": 4111,
+ "end": 4118,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 24
},
"end": {
- "line": 92,
+ "line": 101,
"column": 31
},
"identifierName": "pBounds"
@@ -1389,15 +1375,15 @@
},
{
"type": "Identifier",
- "start": 3683,
- "end": 3693,
+ "start": 4120,
+ "end": 4130,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 33
},
"end": {
- "line": 92,
+ "line": 101,
"column": 43
},
"identifierName": "pIconPoint"
@@ -1407,2616 +1393,906 @@
],
"body": {
"type": "BlockStatement",
- "start": 3695,
- "end": 5017,
+ "start": 4132,
+ "end": 4425,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 45
},
"end": {
- "line": 117,
+ "line": 109,
"column": 5
}
},
"body": [
{
- "type": "IfStatement",
- "start": 3755,
- "end": 4401,
+ "type": "VariableDeclaration",
+ "start": 4142,
+ "end": 4176,
"loc": {
"start": {
- "line": 94,
+ "line": 102,
"column": 8
},
"end": {
- "line": 104,
- "column": 9
+ "line": 102,
+ "column": 42
}
},
- "test": {
- "type": "LogicalExpression",
- "start": 3759,
- "end": 3850,
- "loc": {
- "start": {
- "line": 94,
- "column": 12
- },
- "end": {
- "line": 94,
- "column": 103
- }
- },
- "left": {
- "type": "LogicalExpression",
- "start": 3759,
- "end": 3816,
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4148,
+ "end": 4175,
"loc": {
"start": {
- "line": 94,
- "column": 12
+ "line": 102,
+ "column": 14
},
"end": {
- "line": 94,
- "column": 69
+ "line": 102,
+ "column": 41
}
},
- "left": {
- "type": "BinaryExpression",
- "start": 3759,
- "end": 3785,
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4148,
+ "end": 4165,
"loc": {
"start": {
- "line": 94,
- "column": 12
+ "line": 102,
+ "column": 14
},
"end": {
- "line": 94,
- "column": 38
+ "line": 102,
+ "column": 31
}
},
- "left": {
- "type": "UnaryExpression",
- "start": 3759,
- "end": 3772,
- "loc": {
- "start": {
- "line": 94,
- "column": 12
- },
- "end": {
- "line": 94,
- "column": 25
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "Identifier",
- "start": 3766,
- "end": 3772,
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 4150,
+ "end": 4155,
"loc": {
"start": {
- "line": 94,
- "column": 19
+ "line": 102,
+ "column": 16
},
"end": {
- "line": 94,
- "column": 25
- },
- "identifierName": "pPoint"
+ "line": 102,
+ "column": 21
+ }
},
- "name": "pPoint",
- "leadingComments": null
- },
- "extra": {
- "parenthesizedArgument": false
- },
- "leadingComments": null
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 3777,
- "end": 3785,
- "loc": {
- "start": {
- "line": 94,
- "column": 30
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4150,
+ "end": 4155,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 16
+ },
+ "end": {
+ "line": 102,
+ "column": 21
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
},
- "end": {
- "line": 94,
- "column": 38
- }
- },
- "extra": {
- "rawValue": "object",
- "raw": "'object'"
- },
- "value": "object"
- },
- "leadingComments": null
- },
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 3789,
- "end": 3816,
- "loc": {
- "start": {
- "line": 94,
- "column": 42
- },
- "end": {
- "line": 94,
- "column": 69
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 3789,
- "end": 3803,
- "loc": {
- "start": {
- "line": 94,
- "column": 42
+ "value": {
+ "type": "Identifier",
+ "start": 4150,
+ "end": 4155,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 16
+ },
+ "end": {
+ "line": 102,
+ "column": 21
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
},
- "end": {
- "line": 94,
- "column": 56
+ "extra": {
+ "shorthand": true
}
},
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "Identifier",
- "start": 3796,
- "end": 3803,
+ {
+ "type": "ObjectProperty",
+ "start": 4157,
+ "end": 4163,
"loc": {
"start": {
- "line": 94,
- "column": 49
+ "line": 102,
+ "column": 23
},
"end": {
- "line": 94,
- "column": 56
+ "line": 102,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4157,
+ "end": 4163,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 23
+ },
+ "end": {
+ "line": 102,
+ "column": 29
+ },
+ "identifierName": "height"
},
- "identifierName": "pBounds"
+ "name": "height"
},
- "name": "pBounds"
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 3808,
- "end": 3816,
- "loc": {
- "start": {
- "line": 94,
- "column": 61
+ "value": {
+ "type": "Identifier",
+ "start": 4157,
+ "end": 4163,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 23
+ },
+ "end": {
+ "line": 102,
+ "column": 29
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
},
- "end": {
- "line": 94,
- "column": 69
+ "extra": {
+ "shorthand": true
}
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 4168,
+ "end": 4175,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 34
},
- "extra": {
- "rawValue": "object",
- "raw": "'object'"
+ "end": {
+ "line": 102,
+ "column": 41
},
- "value": "object"
- }
+ "identifierName": "pBounds"
+ },
+ "name": "pBounds"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4185,
+ "end": 4211,
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
+ },
+ "end": {
+ "line": 103,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 4185,
+ "end": 4210,
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
},
- "leadingComments": null
+ "end": {
+ "line": 103,
+ "column": 33
+ }
},
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 3820,
- "end": 3850,
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 4185,
+ "end": 4202,
"loc": {
"start": {
- "line": 94,
- "column": 73
+ "line": 103,
+ "column": 8
},
"end": {
- "line": 94,
- "column": 103
+ "line": 103,
+ "column": 25
}
},
- "left": {
+ "object": {
"type": "MemberExpression",
- "start": 3820,
- "end": 3839,
+ "start": 4185,
+ "end": 4196,
"loc": {
"start": {
- "line": 94,
- "column": 73
+ "line": 103,
+ "column": 8
},
"end": {
- "line": 94,
- "column": 92
+ "line": 103,
+ "column": 19
}
},
"object": {
- "type": "Identifier",
- "start": 3820,
- "end": 3827,
+ "type": "ThisExpression",
+ "start": 4185,
+ "end": 4189,
"loc": {
"start": {
- "line": 94,
- "column": 73
+ "line": 103,
+ "column": 8
},
"end": {
- "line": 94,
- "column": 80
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
+ "line": 103,
+ "column": 12
+ }
+ }
},
"property": {
"type": "Identifier",
- "start": 3828,
- "end": 3839,
+ "start": 4190,
+ "end": 4196,
"loc": {
"start": {
- "line": 94,
- "column": 81
+ "line": 103,
+ "column": 13
},
"end": {
- "line": 94,
- "column": 92
+ "line": 103,
+ "column": 19
},
- "identifierName": "constructor"
+ "identifierName": "bounds"
},
- "name": "constructor"
+ "name": "bounds"
},
"computed": false
},
- "operator": "===",
- "right": {
+ "property": {
"type": "Identifier",
- "start": 3844,
- "end": 3850,
+ "start": 4197,
+ "end": 4202,
"loc": {
"start": {
- "line": 94,
- "column": 97
+ "line": 103,
+ "column": 20
},
"end": {
- "line": 94,
- "column": 103
+ "line": 103,
+ "column": 25
},
- "identifierName": "Object"
+ "identifierName": "width"
},
- "name": "Object"
- }
+ "name": "width"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 4205,
+ "end": 4210,
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 28
+ },
+ "end": {
+ "line": 103,
+ "column": 33
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4220,
+ "end": 4248,
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 8
},
- "leadingComments": null
+ "end": {
+ "line": 104,
+ "column": 36
+ }
},
- "consequent": {
- "type": "BlockStatement",
- "start": 3852,
- "end": 4401,
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 4220,
+ "end": 4247,
"loc": {
"start": {
- "line": 94,
- "column": 105
+ "line": 104,
+ "column": 8
},
"end": {
"line": 104,
- "column": 9
+ "column": 35
}
},
- "body": [
- {
- "type": "IfStatement",
- "start": 3944,
- "end": 4391,
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 4220,
+ "end": 4238,
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 8
+ },
+ "end": {
+ "line": 104,
+ "column": 26
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 4220,
+ "end": 4231,
"loc": {
"start": {
- "line": 96,
- "column": 12
+ "line": 104,
+ "column": 8
},
"end": {
- "line": 103,
- "column": 13
+ "line": 104,
+ "column": 19
}
},
- "test": {
- "type": "LogicalExpression",
- "start": 3948,
- "end": 4083,
+ "object": {
+ "type": "ThisExpression",
+ "start": 4220,
+ "end": 4224,
"loc": {
"start": {
- "line": 96,
- "column": 16
+ "line": 104,
+ "column": 8
},
"end": {
- "line": 96,
- "column": 151
+ "line": 104,
+ "column": 12
}
- },
- "left": {
- "type": "LogicalExpression",
- "start": 3948,
- "end": 4045,
- "loc": {
- "start": {
- "line": 96,
- "column": 16
- },
- "end": {
- "line": 96,
- "column": 113
- }
- },
- "left": {
- "type": "LogicalExpression",
- "start": 3948,
- "end": 4008,
- "loc": {
- "start": {
- "line": 96,
- "column": 16
- },
- "end": {
- "line": 96,
- "column": 76
- }
- },
- "left": {
- "type": "BinaryExpression",
- "start": 3948,
- "end": 3976,
- "loc": {
- "start": {
- "line": 96,
- "column": 16
- },
- "end": {
- "line": 96,
- "column": 44
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 3948,
- "end": 3963,
- "loc": {
- "start": {
- "line": 96,
- "column": 16
- },
- "end": {
- "line": 96,
- "column": 31
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 3955,
- "end": 3963,
- "loc": {
- "start": {
- "line": 96,
- "column": 23
- },
- "end": {
- "line": 96,
- "column": 31
- }
- },
- "object": {
- "type": "Identifier",
- "start": 3955,
- "end": 3961,
- "loc": {
- "start": {
- "line": 96,
- "column": 23
- },
- "end": {
- "line": 96,
- "column": 29
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint",
- "leadingComments": null
- },
- "property": {
- "type": "Identifier",
- "start": 3962,
- "end": 3963,
- "loc": {
- "start": {
- "line": 96,
- "column": 30
- },
- "end": {
- "line": 96,
- "column": 31
- },
- "identifierName": "x"
- },
- "name": "x"
- },
- "computed": false,
- "leadingComments": null
- },
- "extra": {
- "parenthesizedArgument": false
- },
- "leadingComments": null
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 3968,
- "end": 3976,
- "loc": {
- "start": {
- "line": 96,
- "column": 36
- },
- "end": {
- "line": 96,
- "column": 44
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- },
- "leadingComments": null
- },
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 3980,
- "end": 4008,
- "loc": {
- "start": {
- "line": 96,
- "column": 48
- },
- "end": {
- "line": 96,
- "column": 76
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 3980,
- "end": 3995,
- "loc": {
- "start": {
- "line": 96,
- "column": 48
- },
- "end": {
- "line": 96,
- "column": 63
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 3987,
- "end": 3995,
- "loc": {
- "start": {
- "line": 96,
- "column": 55
- },
- "end": {
- "line": 96,
- "column": 63
- }
- },
- "object": {
- "type": "Identifier",
- "start": 3987,
- "end": 3993,
- "loc": {
- "start": {
- "line": 96,
- "column": 55
- },
- "end": {
- "line": 96,
- "column": 61
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 3994,
- "end": 3995,
- "loc": {
- "start": {
- "line": 96,
- "column": 62
- },
- "end": {
- "line": 96,
- "column": 63
- },
- "identifierName": "y"
- },
- "name": "y"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4000,
- "end": 4008,
- "loc": {
- "start": {
- "line": 96,
- "column": 68
- },
- "end": {
- "line": 96,
- "column": 76
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- }
- },
- "leadingComments": null
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4225,
+ "end": 4231,
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 13
},
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 4012,
- "end": 4045,
- "loc": {
- "start": {
- "line": 96,
- "column": 80
- },
- "end": {
- "line": 96,
- "column": 113
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 4012,
- "end": 4032,
- "loc": {
- "start": {
- "line": 96,
- "column": 80
- },
- "end": {
- "line": 96,
- "column": 100
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 4019,
- "end": 4032,
- "loc": {
- "start": {
- "line": 96,
- "column": 87
- },
- "end": {
- "line": 96,
- "column": 100
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4019,
- "end": 4026,
- "loc": {
- "start": {
- "line": 96,
- "column": 87
- },
- "end": {
- "line": 96,
- "column": 94
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
- },
- "property": {
- "type": "Identifier",
- "start": 4027,
- "end": 4032,
- "loc": {
- "start": {
- "line": 96,
- "column": 95
- },
- "end": {
- "line": 96,
- "column": 100
- },
- "identifierName": "width"
- },
- "name": "width"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4037,
- "end": 4045,
- "loc": {
- "start": {
- "line": 96,
- "column": 105
- },
- "end": {
- "line": 96,
- "column": 113
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- }
+ "end": {
+ "line": 104,
+ "column": 19
},
- "leadingComments": null
+ "identifierName": "bounds"
},
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 4049,
- "end": 4083,
- "loc": {
- "start": {
- "line": 96,
- "column": 117
- },
- "end": {
- "line": 96,
- "column": 151
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 4049,
- "end": 4070,
- "loc": {
- "start": {
- "line": 96,
- "column": 117
- },
- "end": {
- "line": 96,
- "column": 138
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 4056,
- "end": 4070,
- "loc": {
- "start": {
- "line": 96,
- "column": 124
- },
- "end": {
- "line": 96,
- "column": 138
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4056,
- "end": 4063,
- "loc": {
- "start": {
- "line": 96,
- "column": 124
- },
- "end": {
- "line": 96,
- "column": 131
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
- },
- "property": {
- "type": "Identifier",
- "start": 4064,
- "end": 4070,
- "loc": {
- "start": {
- "line": 96,
- "column": 132
- },
- "end": {
- "line": 96,
- "column": 138
- },
- "identifierName": "height"
- },
- "name": "height"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4075,
- "end": 4083,
- "loc": {
- "start": {
- "line": 96,
- "column": 143
- },
- "end": {
- "line": 96,
- "column": 151
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- }
+ "name": "bounds"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4232,
+ "end": 4238,
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 20
},
- "leadingComments": null
+ "end": {
+ "line": 104,
+ "column": 26
+ },
+ "identifierName": "height"
},
- "consequent": {
- "type": "BlockStatement",
- "start": 4085,
- "end": 4251,
- "loc": {
- "start": {
- "line": 96,
- "column": 153
- },
- "end": {
- "line": 100,
- "column": 13
- }
+ "name": "height"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 4241,
+ "end": 4247,
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 29
+ },
+ "end": {
+ "line": 104,
+ "column": 35
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4257,
+ "end": 4287,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 8
+ },
+ "end": {
+ "line": 105,
+ "column": 38
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 4257,
+ "end": 4286,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 8
+ },
+ "end": {
+ "line": 105,
+ "column": 37
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 4257,
+ "end": 4277,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 8
+ },
+ "end": {
+ "line": 105,
+ "column": 28
+ }
+ },
+ "object": {
+ "type": "ThisExpression",
+ "start": 4257,
+ "end": 4261,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 8
},
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 4103,
- "end": 4133,
- "loc": {
- "start": {
- "line": 97,
- "column": 16
- },
- "end": {
- "line": 97,
- "column": 46
- }
- },
- "expression": {
- "type": "AssignmentExpression",
- "start": 4103,
- "end": 4132,
- "loc": {
- "start": {
- "line": 97,
- "column": 16
- },
- "end": {
- "line": 97,
- "column": 45
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 4103,
- "end": 4123,
- "loc": {
- "start": {
- "line": 97,
- "column": 16
- },
- "end": {
- "line": 97,
- "column": 36
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4103,
- "end": 4107,
- "loc": {
- "start": {
- "line": 97,
- "column": 16
- },
- "end": {
- "line": 97,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4108,
- "end": 4123,
- "loc": {
- "start": {
- "line": 97,
- "column": 21
- },
- "end": {
- "line": 97,
- "column": 36
- },
- "identifierName": "positionalPoint"
- },
- "name": "positionalPoint"
- },
- "computed": false
- },
- "right": {
- "type": "Identifier",
- "start": 4126,
- "end": 4132,
- "loc": {
- "start": {
- "line": 97,
- "column": 39
- },
- "end": {
- "line": 97,
- "column": 45
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- }
- }
- },
- {
- "type": "ExpressionStatement",
- "start": 4150,
- "end": 4184,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 50
- }
- },
- "expression": {
- "type": "AssignmentExpression",
- "start": 4150,
- "end": 4183,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 49
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 4150,
- "end": 4167,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 33
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4150,
- "end": 4161,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 27
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4150,
- "end": 4154,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4155,
- "end": 4161,
- "loc": {
- "start": {
- "line": 98,
- "column": 21
- },
- "end": {
- "line": 98,
- "column": 27
- },
- "identifierName": "bounds"
- },
- "name": "bounds"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4162,
- "end": 4167,
- "loc": {
- "start": {
- "line": 98,
- "column": 28
- },
- "end": {
- "line": 98,
- "column": 33
- },
- "identifierName": "width"
- },
- "name": "width"
- },
- "computed": false
- },
- "right": {
- "type": "MemberExpression",
- "start": 4170,
- "end": 4183,
- "loc": {
- "start": {
- "line": 98,
- "column": 36
- },
- "end": {
- "line": 98,
- "column": 49
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4170,
- "end": 4177,
- "loc": {
- "start": {
- "line": 98,
- "column": 36
- },
- "end": {
- "line": 98,
- "column": 43
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
- },
- "property": {
- "type": "Identifier",
- "start": 4178,
- "end": 4183,
- "loc": {
- "start": {
- "line": 98,
- "column": 44
- },
- "end": {
- "line": 98,
- "column": 49
- },
- "identifierName": "width"
- },
- "name": "width"
- },
- "computed": false
- }
- }
- },
- {
- "type": "ExpressionStatement",
- "start": 4201,
- "end": 4237,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 52
- }
- },
- "expression": {
- "type": "AssignmentExpression",
- "start": 4201,
- "end": 4236,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 51
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 4201,
- "end": 4219,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 34
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4201,
- "end": 4212,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 27
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4201,
- "end": 4205,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4206,
- "end": 4212,
- "loc": {
- "start": {
- "line": 99,
- "column": 21
- },
- "end": {
- "line": 99,
- "column": 27
- },
- "identifierName": "bounds"
- },
- "name": "bounds"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4213,
- "end": 4219,
- "loc": {
- "start": {
- "line": 99,
- "column": 28
- },
- "end": {
- "line": 99,
- "column": 34
- },
- "identifierName": "height"
- },
- "name": "height"
- },
- "computed": false
- },
- "right": {
- "type": "MemberExpression",
- "start": 4222,
- "end": 4236,
- "loc": {
- "start": {
- "line": 99,
- "column": 37
- },
- "end": {
- "line": 99,
- "column": 51
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4222,
- "end": 4229,
- "loc": {
- "start": {
- "line": 99,
- "column": 37
- },
- "end": {
- "line": 99,
- "column": 44
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
- },
- "property": {
- "type": "Identifier",
- "start": 4230,
- "end": 4236,
- "loc": {
- "start": {
- "line": 99,
- "column": 45
- },
- "end": {
- "line": 99,
- "column": 51
- },
- "identifierName": "height"
- },
- "name": "height"
- },
- "computed": false
- }
- }
- }
- ],
- "directives": []
- },
- "alternate": {
- "type": "BlockStatement",
- "start": 4269,
- "end": 4391,
- "loc": {
- "start": {
- "line": 101,
- "column": 17
- },
- "end": {
- "line": 103,
- "column": 13
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 4287,
- "end": 4377,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 106
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 4287,
- "end": 4376,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 105
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4287,
- "end": 4332,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 61
- }
- },
- "object": {
- "type": "CallExpression",
- "start": 4287,
- "end": 4326,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 55
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4287,
- "end": 4305,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 34
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4287,
- "end": 4298,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 27
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4287,
- "end": 4291,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4292,
- "end": 4298,
- "loc": {
- "start": {
- "line": 102,
- "column": 21
- },
- "end": {
- "line": 102,
- "column": 27
- },
- "identifierName": "logger"
- },
- "name": "logger"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4299,
- "end": 4305,
- "loc": {
- "start": {
- "line": 102,
- "column": 28
- },
- "end": {
- "line": 102,
- "column": 34
- },
- "identifierName": "prefix"
- },
- "name": "prefix"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4306,
- "end": 4325,
- "loc": {
- "start": {
- "line": 102,
- "column": 35
- },
- "end": {
- "line": 102,
- "column": 54
- }
- },
- "extra": {
- "rawValue": "Icon-Point-Module",
- "raw": "'Icon-Point-Module'"
- },
- "value": "Icon-Point-Module"
- }
- ]
- },
- "property": {
- "type": "Identifier",
- "start": 4327,
- "end": 4332,
- "loc": {
- "start": {
- "line": 102,
- "column": 56
- },
- "end": {
- "line": 102,
- "column": 61
- },
- "identifierName": "error"
- },
- "name": "error"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4333,
- "end": 4375,
- "loc": {
- "start": {
- "line": 102,
- "column": 62
- },
- "end": {
- "line": 102,
- "column": 104
- }
- },
- "extra": {
- "rawValue": "Invalid properties on pPoint or pBounds!",
- "raw": "'Invalid properties on pPoint or pBounds!'"
- },
- "value": "Invalid properties on pPoint or pBounds!"
- }
- ]
- }
- }
- ],
- "directives": []
- },
- "leadingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the rectangle has valid properties (x,y,width,height)",
- "start": 3866,
- "end": 3931,
- "loc": {
- "start": {
- "line": 95,
- "column": 12
- },
- "end": {
- "line": 95,
- "column": 77
- }
- }
+ "end": {
+ "line": 105,
+ "column": 12
}
- ]
- }
- ],
- "directives": [],
- "trailingComments": null
- },
- "alternate": null,
- "leadingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the rectangle is a valid type",
- "start": 3705,
- "end": 3746,
- "loc": {
- "start": {
- "line": 93,
- "column": 8
- },
- "end": {
- "line": 93,
- "column": 49
}
- }
- }
- ],
- "trailingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the point is a valid type",
- "start": 4410,
- "end": 4447,
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4262,
+ "end": 4277,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 13
+ },
+ "end": {
+ "line": 105,
+ "column": 28
+ },
+ "identifierName": "positionalPoint"
+ },
+ "name": "positionalPoint"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 4280,
+ "end": 4286,
"loc": {
"start": {
"line": 105,
- "column": 8
+ "column": 31
},
"end": {
"line": 105,
- "column": 45
- }
- }
+ "column": 37
+ },
+ "identifierName": "pPoint"
+ },
+ "name": "pPoint"
}
- ]
+ }
},
{
- "type": "IfStatement",
- "start": 4456,
- "end": 4914,
+ "type": "ExpressionStatement",
+ "start": 4296,
+ "end": 4322,
"loc": {
"start": {
"line": 106,
"column": 8
},
"end": {
- "line": 114,
- "column": 9
+ "line": 106,
+ "column": 34
}
},
- "test": {
- "type": "LogicalExpression",
- "start": 4460,
- "end": 4527,
+ "expression": {
+ "type": "CallExpression",
+ "start": 4296,
+ "end": 4321,
"loc": {
"start": {
"line": 106,
- "column": 12
+ "column": 8
},
"end": {
"line": 106,
- "column": 79
+ "column": 33
}
},
- "left": {
- "type": "BinaryExpression",
- "start": 4460,
- "end": 4490,
+ "callee": {
+ "type": "MemberExpression",
+ "start": 4296,
+ "end": 4309,
"loc": {
"start": {
"line": 106,
- "column": 12
+ "column": 8
},
"end": {
"line": 106,
- "column": 42
+ "column": 21
}
},
- "left": {
- "type": "UnaryExpression",
- "start": 4460,
- "end": 4477,
+ "object": {
+ "type": "ThisExpression",
+ "start": 4296,
+ "end": 4300,
"loc": {
"start": {
"line": 106,
- "column": 12
+ "column": 8
},
"end": {
"line": 106,
- "column": 29
+ "column": 12
}
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4301,
+ "end": 4309,
+ "loc": {
+ "start": {
+ "line": 106,
+ "column": 13
+ },
+ "end": {
+ "line": 106,
+ "column": 21
+ },
+ "identifierName": "setPoint"
},
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "Identifier",
- "start": 4467,
- "end": 4477,
- "loc": {
- "start": {
- "line": 106,
- "column": 19
- },
- "end": {
- "line": 106,
- "column": 29
- },
- "identifierName": "pIconPoint"
+ "name": "setPoint"
+ },
+ "computed": false
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 4310,
+ "end": 4320,
+ "loc": {
+ "start": {
+ "line": 106,
+ "column": 22
},
- "name": "pIconPoint",
- "leadingComments": null
+ "end": {
+ "line": 106,
+ "column": 32
+ },
+ "identifierName": "pIconPoint"
},
- "extra": {
- "parenthesizedArgument": false
+ "name": "pIconPoint"
+ }
+ ]
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4331,
+ "end": 4353,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 8
+ },
+ "end": {
+ "line": 107,
+ "column": 30
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 4331,
+ "end": 4352,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 8
+ },
+ "end": {
+ "line": 107,
+ "column": 29
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 4331,
+ "end": 4342,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 8
},
- "leadingComments": null
+ "end": {
+ "line": 107,
+ "column": 19
+ }
},
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4482,
- "end": 4490,
+ "object": {
+ "type": "ThisExpression",
+ "start": 4331,
+ "end": 4335,
"loc": {
"start": {
- "line": 106,
- "column": 34
+ "line": 107,
+ "column": 8
},
"end": {
- "line": 106,
- "column": 42
+ "line": 107,
+ "column": 12
}
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4336,
+ "end": 4342,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 13
+ },
+ "end": {
+ "line": 107,
+ "column": 19
+ },
+ "identifierName": "logger"
},
- "extra": {
- "rawValue": "object",
- "raw": "'object'"
- },
- "value": "object"
+ "name": "logger"
},
- "leadingComments": null
+ "computed": false
},
- "operator": "&&",
"right": {
- "type": "BinaryExpression",
- "start": 4494,
- "end": 4527,
+ "type": "NewExpression",
+ "start": 4345,
+ "end": 4352,
"loc": {
"start": {
- "line": 106,
- "column": 46
+ "line": 107,
+ "column": 22
},
"end": {
- "line": 106,
- "column": 79
+ "line": 107,
+ "column": 29
}
},
- "left": {
+ "callee": {
+ "type": "Identifier",
+ "start": 4349,
+ "end": 4350,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 26
+ },
+ "end": {
+ "line": 107,
+ "column": 27
+ },
+ "identifierName": "i"
+ },
+ "name": "i"
+ },
+ "arguments": []
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4362,
+ "end": 4419,
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 8
+ },
+ "end": {
+ "line": 108,
+ "column": 65
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 4362,
+ "end": 4418,
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 8
+ },
+ "end": {
+ "line": 108,
+ "column": 64
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 4362,
+ "end": 4386,
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 8
+ },
+ "end": {
+ "line": 108,
+ "column": 32
+ }
+ },
+ "object": {
"type": "MemberExpression",
- "start": 4494,
- "end": 4516,
+ "start": 4362,
+ "end": 4373,
"loc": {
"start": {
- "line": 106,
- "column": 46
+ "line": 108,
+ "column": 8
},
"end": {
- "line": 106,
- "column": 68
+ "line": 108,
+ "column": 19
}
},
"object": {
- "type": "Identifier",
- "start": 4494,
- "end": 4504,
+ "type": "ThisExpression",
+ "start": 4362,
+ "end": 4366,
"loc": {
"start": {
- "line": 106,
- "column": 46
+ "line": 108,
+ "column": 8
},
"end": {
- "line": 106,
- "column": 56
- },
- "identifierName": "pIconPoint"
- },
- "name": "pIconPoint"
+ "line": 108,
+ "column": 12
+ }
+ }
},
"property": {
"type": "Identifier",
- "start": 4505,
- "end": 4516,
+ "start": 4367,
+ "end": 4373,
"loc": {
"start": {
- "line": 106,
- "column": 57
+ "line": 108,
+ "column": 13
},
"end": {
- "line": 106,
- "column": 68
+ "line": 108,
+ "column": 19
},
- "identifierName": "constructor"
+ "identifierName": "logger"
},
- "name": "constructor"
+ "name": "logger"
},
"computed": false
},
- "operator": "===",
- "right": {
+ "property": {
"type": "Identifier",
- "start": 4521,
- "end": 4527,
+ "start": 4374,
+ "end": 4386,
"loc": {
"start": {
- "line": 106,
- "column": 73
+ "line": 108,
+ "column": 20
},
"end": {
- "line": 106,
- "column": 79
+ "line": 108,
+ "column": 32
},
- "identifierName": "Object"
+ "identifierName": "registerType"
},
- "name": "Object"
- }
- },
- "leadingComments": null
- },
- "consequent": {
- "type": "BlockStatement",
- "start": 4529,
- "end": 4914,
- "loc": {
- "start": {
- "line": 106,
- "column": 81
+ "name": "registerType"
},
- "end": {
- "line": 114,
- "column": 9
- }
+ "computed": false
},
- "body": [
+ "arguments": [
{
- "type": "IfStatement",
- "start": 4598,
- "end": 4904,
+ "type": "StringLiteral",
+ "start": 4387,
+ "end": 4406,
"loc": {
"start": {
"line": 108,
- "column": 12
+ "column": 33
},
"end": {
- "line": 113,
- "column": 13
+ "line": 108,
+ "column": 52
}
},
- "test": {
- "type": "LogicalExpression",
- "start": 4602,
- "end": 4670,
- "loc": {
- "start": {
- "line": 108,
- "column": 16
- },
- "end": {
- "line": 108,
- "column": 84
- }
+ "extra": {
+ "rawValue": "Icon-Point-Module",
+ "raw": "'Icon-Point-Module'"
+ },
+ "value": "Icon-Point-Module"
+ },
+ {
+ "type": "StringLiteral",
+ "start": 4408,
+ "end": 4417,
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 54
},
- "left": {
- "type": "BinaryExpression",
- "start": 4602,
- "end": 4634,
- "loc": {
- "start": {
- "line": 108,
- "column": 16
- },
- "end": {
- "line": 108,
- "column": 48
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 4602,
- "end": 4621,
- "loc": {
- "start": {
- "line": 108,
- "column": 16
- },
- "end": {
- "line": 108,
- "column": 35
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 4609,
- "end": 4621,
- "loc": {
- "start": {
- "line": 108,
- "column": 23
- },
- "end": {
- "line": 108,
- "column": 35
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4609,
- "end": 4619,
- "loc": {
- "start": {
- "line": 108,
- "column": 23
- },
- "end": {
- "line": 108,
- "column": 33
- },
- "identifierName": "pIconPoint"
- },
- "name": "pIconPoint",
- "leadingComments": null
- },
- "property": {
- "type": "Identifier",
- "start": 4620,
- "end": 4621,
- "loc": {
- "start": {
- "line": 108,
- "column": 34
- },
- "end": {
- "line": 108,
- "column": 35
- },
- "identifierName": "x"
- },
- "name": "x"
- },
- "computed": false,
- "leadingComments": null
- },
- "extra": {
- "parenthesizedArgument": false
- },
- "leadingComments": null
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4626,
- "end": 4634,
- "loc": {
- "start": {
- "line": 108,
- "column": 40
- },
- "end": {
- "line": 108,
- "column": 48
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- },
- "leadingComments": null
- },
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 4638,
- "end": 4670,
- "loc": {
- "start": {
- "line": 108,
- "column": 52
- },
- "end": {
- "line": 108,
- "column": 84
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 4638,
- "end": 4657,
- "loc": {
- "start": {
- "line": 108,
- "column": 52
- },
- "end": {
- "line": 108,
- "column": 71
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 4645,
- "end": 4657,
- "loc": {
- "start": {
- "line": 108,
- "column": 59
- },
- "end": {
- "line": 108,
- "column": 71
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4645,
- "end": 4655,
- "loc": {
- "start": {
- "line": 108,
- "column": 59
- },
- "end": {
- "line": 108,
- "column": 69
- },
- "identifierName": "pIconPoint"
- },
- "name": "pIconPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 4656,
- "end": 4657,
- "loc": {
- "start": {
- "line": 108,
- "column": 70
- },
- "end": {
- "line": 108,
- "column": 71
- },
- "identifierName": "y"
- },
- "name": "y"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4662,
- "end": 4670,
- "loc": {
- "start": {
- "line": 108,
- "column": 76
- },
- "end": {
- "line": 108,
- "column": 84
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- }
- },
- "leadingComments": null
- },
- "consequent": {
- "type": "BlockStatement",
- "start": 4672,
- "end": 4730,
- "loc": {
- "start": {
- "line": 108,
- "column": 86
- },
- "end": {
- "line": 110,
- "column": 13
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 4690,
- "end": 4716,
- "loc": {
- "start": {
- "line": 109,
- "column": 16
- },
- "end": {
- "line": 109,
- "column": 42
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 4690,
- "end": 4715,
- "loc": {
- "start": {
- "line": 109,
- "column": 16
- },
- "end": {
- "line": 109,
- "column": 41
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4690,
- "end": 4703,
- "loc": {
- "start": {
- "line": 109,
- "column": 16
- },
- "end": {
- "line": 109,
- "column": 29
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4690,
- "end": 4694,
- "loc": {
- "start": {
- "line": 109,
- "column": 16
- },
- "end": {
- "line": 109,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4695,
- "end": 4703,
- "loc": {
- "start": {
- "line": 109,
- "column": 21
- },
- "end": {
- "line": 109,
- "column": 29
- },
- "identifierName": "setPoint"
- },
- "name": "setPoint"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "Identifier",
- "start": 4704,
- "end": 4714,
- "loc": {
- "start": {
- "line": 109,
- "column": 30
- },
- "end": {
- "line": 109,
- "column": 40
- },
- "identifierName": "pIconPoint"
- },
- "name": "pIconPoint"
- }
- ]
- }
- }
- ],
- "directives": []
+ "end": {
+ "line": 108,
+ "column": 63
+ }
},
- "alternate": {
- "type": "BlockStatement",
- "start": 4748,
- "end": 4904,
- "loc": {
- "start": {
- "line": 111,
- "column": 17
- },
- "end": {
- "line": 113,
- "column": 13
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 4766,
- "end": 4890,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 140
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 4766,
- "end": 4889,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 139
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4766,
- "end": 4811,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 61
- }
- },
- "object": {
- "type": "CallExpression",
- "start": 4766,
- "end": 4805,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 55
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4766,
- "end": 4784,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 34
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4766,
- "end": 4777,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 27
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4766,
- "end": 4770,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4771,
- "end": 4777,
- "loc": {
- "start": {
- "line": 112,
- "column": 21
- },
- "end": {
- "line": 112,
- "column": 27
- },
- "identifierName": "logger"
- },
- "name": "logger"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4778,
- "end": 4784,
- "loc": {
- "start": {
- "line": 112,
- "column": 28
- },
- "end": {
- "line": 112,
- "column": 34
- },
- "identifierName": "prefix"
- },
- "name": "prefix"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4785,
- "end": 4804,
- "loc": {
- "start": {
- "line": 112,
- "column": 35
- },
- "end": {
- "line": 112,
- "column": 54
- }
- },
- "extra": {
- "rawValue": "Icon-Point-Module",
- "raw": "'Icon-Point-Module'"
- },
- "value": "Icon-Point-Module"
- }
- ]
- },
- "property": {
- "type": "Identifier",
- "start": 4806,
- "end": 4811,
- "loc": {
- "start": {
- "line": 112,
- "column": 56
- },
- "end": {
- "line": 112,
- "column": 61
- },
- "identifierName": "error"
- },
- "name": "error"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4812,
- "end": 4888,
- "loc": {
- "start": {
- "line": 112,
- "column": 62
- },
- "end": {
- "line": 112,
- "column": 138
- }
- },
- "extra": {
- "rawValue": "Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!",
- "raw": "'Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!'"
- },
- "value": "Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!"
- }
- ]
- }
- }
- ],
- "directives": []
- },
- "leadingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the point has valid properties",
- "start": 4543,
- "end": 4585,
- "loc": {
- "start": {
- "line": 107,
- "column": 12
- },
- "end": {
- "line": 107,
- "column": 54
- }
- }
- }
- ]
- }
- ],
- "directives": []
- },
- "alternate": null,
- "leadingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the point is a valid type",
- "start": 4410,
- "end": 4447,
- "loc": {
- "start": {
- "line": 105,
- "column": 8
- },
- "end": {
- "line": 105,
- "column": 45
- }
- }
- }
- ]
- },
- {
- "type": "ExpressionStatement",
- "start": 4923,
- "end": 4945,
- "loc": {
- "start": {
- "line": 115,
- "column": 8
- },
- "end": {
- "line": 115,
- "column": 30
- }
- },
- "expression": {
- "type": "AssignmentExpression",
- "start": 4923,
- "end": 4944,
- "loc": {
- "start": {
- "line": 115,
- "column": 8
- },
- "end": {
- "line": 115,
- "column": 29
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 4923,
- "end": 4934,
- "loc": {
- "start": {
- "line": 115,
- "column": 8
- },
- "end": {
- "line": 115,
- "column": 19
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4923,
- "end": 4927,
- "loc": {
- "start": {
- "line": 115,
- "column": 8
- },
- "end": {
- "line": 115,
- "column": 12
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4928,
- "end": 4934,
- "loc": {
- "start": {
- "line": 115,
- "column": 13
- },
- "end": {
- "line": 115,
- "column": 19
- },
- "identifierName": "logger"
- },
- "name": "logger"
- },
- "computed": false
- },
- "right": {
- "type": "NewExpression",
- "start": 4937,
- "end": 4944,
- "loc": {
- "start": {
- "line": 115,
- "column": 22
- },
- "end": {
- "line": 115,
- "column": 29
- }
- },
- "callee": {
- "type": "Identifier",
- "start": 4941,
- "end": 4942,
- "loc": {
- "start": {
- "line": 115,
- "column": 26
- },
- "end": {
- "line": 115,
- "column": 27
- },
- "identifierName": "i"
- },
- "name": "i"
- },
- "arguments": []
- }
- }
- },
- {
- "type": "ExpressionStatement",
- "start": 4954,
- "end": 5011,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 65
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 4954,
- "end": 5010,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 64
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4954,
- "end": 4978,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 32
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4954,
- "end": 4965,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 19
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4954,
- "end": 4958,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 12
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4959,
- "end": 4965,
- "loc": {
- "start": {
- "line": 116,
- "column": 13
- },
- "end": {
- "line": 116,
- "column": 19
- },
- "identifierName": "logger"
- },
- "name": "logger"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4966,
- "end": 4978,
- "loc": {
- "start": {
- "line": 116,
- "column": 20
- },
- "end": {
- "line": 116,
- "column": 32
- },
- "identifierName": "registerType"
- },
- "name": "registerType"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4979,
- "end": 4998,
- "loc": {
- "start": {
- "line": 116,
- "column": 33
- },
- "end": {
- "line": 116,
- "column": 52
- }
- },
- "extra": {
- "rawValue": "Icon-Point-Module",
- "raw": "'Icon-Point-Module'"
- },
- "value": "Icon-Point-Module"
- },
- {
- "type": "StringLiteral",
- "start": 5000,
- "end": 5009,
- "loc": {
- "start": {
- "line": 116,
- "column": 54
- },
- "end": {
- "line": 116,
- "column": 63
- }
- },
- "extra": {
- "rawValue": "#ff6600",
- "raw": "'#ff6600'"
+ "extra": {
+ "rawValue": "#ff6600",
+ "raw": "'#ff6600'"
},
"value": "#ff6600"
}
@@ -4030,16 +2306,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of\n * @prop {number} pPoint.x - The x coordinate of the rectangle\n * @prop {number} pPoint.y - The y coordinate of the rectangle\n * @param {Bounds} pBounds - The size of the rectangle\n * @prop {number} pBounds.width - The width of the rectangle\n * @prop {number} pBounds.height - The height of the rectangle\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle\n * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range\n ",
- "start": 2742,
- "end": 3649,
+ "value": "*\n * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.\n * @prop {number} pPoint.x - The x coordinate of the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the rectangle.\n * @param {Bounds} pBounds - The size of the rectangle.\n * @prop {number} pBounds.width - The width of the rectangle.\n * @prop {number} pBounds.height - The height of the rectangle.\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.\n *\n * ## Normalized\n If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`\n The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.\n ",
+ "start": 2910,
+ "end": 4086,
"loc": {
"start": {
- "line": 80,
+ "line": 85,
"column": 4
},
"end": {
- "line": 91,
+ "line": 100,
"column": 7
}
}
@@ -4048,16 +2324,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle\n * @prop {number} pOffset.x - The x offset of the rectangle\n * @prop {number} pOffset.y - The y offset of the rectangle\n * @example
Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
- "start": 5022,
- "end": 7343,
+ "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account.\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.\n * @prop {number} pOffset.x - The x offset of the rectangle.\n * @prop {number} pOffset.y - The y offset of the rectangle.\n * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.\n * @prop {number} pAnchor.x - The x anchor of the rectangle.\n * @prop {number} pAnchor.y - The y anchor of the rectangle.\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
+ "start": 4430,
+ "end": 6955,
"loc": {
"start": {
- "line": 118,
+ "line": 110,
"column": 4
},
"end": {
- "line": 153,
+ "line": 148,
"column": 7
}
}
@@ -4066,15 +2342,15 @@
},
{
"type": "ClassMethod",
- "start": 7348,
- "end": 8709,
+ "start": 6960,
+ "end": 8256,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 4
},
"end": {
- "line": 178,
+ "line": 171,
"column": 5
}
},
@@ -4082,15 +2358,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 7348,
- "end": 7356,
+ "start": 6960,
+ "end": 6968,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 4
},
"end": {
- "line": 154,
+ "line": 149,
"column": 12
},
"identifierName": "getPoint"
@@ -4106,29 +2382,29 @@
"params": [
{
"type": "AssignmentPattern",
- "start": 7357,
- "end": 7367,
+ "start": 6969,
+ "end": 6979,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 13
},
"end": {
- "line": 154,
+ "line": 149,
"column": 23
}
},
"left": {
"type": "Identifier",
- "start": 7357,
- "end": 7363,
+ "start": 6969,
+ "end": 6975,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 13
},
"end": {
- "line": 154,
+ "line": 149,
"column": 19
},
"identifierName": "pAngle"
@@ -4137,15 +2413,15 @@
},
"right": {
"type": "NumericLiteral",
- "start": 7366,
- "end": 7367,
+ "start": 6978,
+ "end": 6979,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 22
},
"end": {
- "line": 154,
+ "line": 149,
"column": 23
}
},
@@ -4158,29 +2434,29 @@
},
{
"type": "AssignmentPattern",
- "start": 7369,
- "end": 7402,
+ "start": 6981,
+ "end": 7014,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 25
},
"end": {
- "line": 154,
+ "line": 149,
"column": 58
}
},
"left": {
"type": "Identifier",
- "start": 7369,
- "end": 7376,
+ "start": 6981,
+ "end": 6988,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 25
},
"end": {
- "line": 154,
+ "line": 149,
"column": 32
},
"identifierName": "pOffset"
@@ -4189,29 +2465,29 @@
},
"right": {
"type": "MemberExpression",
- "start": 7379,
- "end": 7402,
+ "start": 6991,
+ "end": 7014,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 35
},
"end": {
- "line": 154,
+ "line": 149,
"column": 58
}
},
"object": {
"type": "Identifier",
- "start": 7379,
- "end": 7388,
+ "start": 6991,
+ "end": 7000,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 35
},
"end": {
- "line": 154,
+ "line": 149,
"column": 44
},
"identifierName": "IconPoint"
@@ -4220,15 +2496,15 @@
},
"property": {
"type": "Identifier",
- "start": 7389,
- "end": 7402,
+ "start": 7001,
+ "end": 7014,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 45
},
"end": {
- "line": 154,
+ "line": 149,
"column": 58
},
"identifierName": "defaultOffset"
@@ -4240,29 +2516,29 @@
},
{
"type": "AssignmentPattern",
- "start": 7404,
- "end": 7437,
+ "start": 7016,
+ "end": 7049,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 60
},
"end": {
- "line": 154,
+ "line": 149,
"column": 93
}
},
"left": {
"type": "Identifier",
- "start": 7404,
- "end": 7411,
+ "start": 7016,
+ "end": 7023,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 60
},
"end": {
- "line": 154,
+ "line": 149,
"column": 67
},
"identifierName": "pAnchor"
@@ -4271,29 +2547,29 @@
},
"right": {
"type": "MemberExpression",
- "start": 7414,
- "end": 7437,
+ "start": 7026,
+ "end": 7049,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 70
},
"end": {
- "line": 154,
+ "line": 149,
"column": 93
}
},
"object": {
"type": "Identifier",
- "start": 7414,
- "end": 7423,
+ "start": 7026,
+ "end": 7035,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 70
},
"end": {
- "line": 154,
+ "line": 149,
"column": 79
},
"identifierName": "IconPoint"
@@ -4302,15 +2578,15 @@
},
"property": {
"type": "Identifier",
- "start": 7424,
- "end": 7437,
+ "start": 7036,
+ "end": 7049,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 80
},
"end": {
- "line": 154,
+ "line": 149,
"column": 93
},
"identifierName": "defaultAnchor"
@@ -4323,211 +2599,59 @@
],
"body": {
"type": "BlockStatement",
- "start": 7439,
- "end": 8709,
+ "start": 7051,
+ "end": 8256,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 95
},
"end": {
- "line": 178,
+ "line": 171,
"column": 5
}
},
"body": [
{
- "type": "IfStatement",
- "start": 7449,
- "end": 7495,
+ "type": "VariableDeclaration",
+ "start": 7215,
+ "end": 7295,
"loc": {
"start": {
- "line": 155,
+ "line": 153,
"column": 8
},
"end": {
- "line": 156,
- "column": 19
- }
- },
- "test": {
- "type": "UnaryExpression",
- "start": 7453,
- "end": 7474,
- "loc": {
- "start": {
- "line": 155,
- "column": 12
- },
- "end": {
- "line": 155,
- "column": 33
- }
- },
- "operator": "!",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 7454,
- "end": 7474,
- "loc": {
- "start": {
- "line": 155,
- "column": 13
- },
- "end": {
- "line": 155,
- "column": 33
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 7454,
- "end": 7458,
- "loc": {
- "start": {
- "line": 155,
- "column": 13
- },
- "end": {
- "line": 155,
- "column": 17
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 7459,
- "end": 7474,
- "loc": {
- "start": {
- "line": 155,
- "column": 18
- },
- "end": {
- "line": 155,
- "column": 33
- },
- "identifierName": "positionalPoint"
- },
- "name": "positionalPoint"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "consequent": {
- "type": "ReturnStatement",
- "start": 7488,
- "end": 7495,
- "loc": {
- "start": {
- "line": 156,
- "column": 12
- },
- "end": {
- "line": 156,
- "column": 19
- }
- },
- "argument": null,
- "leadingComments": null,
- "trailingComments": null
- },
- "alternate": null,
- "trailingComments": [
- {
- "type": "CommentLine",
- "value": " cx, cy - center of square coordinates ",
- "start": 7504,
- "end": 7545,
- "loc": {
- "start": {
- "line": 157,
- "column": 8
- },
- "end": {
- "line": 157,
- "column": 49
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " x, y - coordinates of a corner point of the square",
- "start": 7554,
- "end": 7607,
- "loc": {
- "start": {
- "line": 158,
- "column": 8
- },
- "end": {
- "line": 158,
- "column": 61
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " angle is the angle of rotation",
- "start": 7616,
- "end": 7649,
- "loc": {
- "start": {
- "line": 159,
- "column": 8
- },
- "end": {
- "line": 159,
- "column": 41
- }
- }
- }
- ]
- },
- {
- "type": "VariableDeclaration",
- "start": 7658,
- "end": 7738,
- "loc": {
- "start": {
- "line": 160,
- "column": 8
- },
- "end": {
- "line": 160,
- "column": 88
+ "line": 153,
+ "column": 88
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 7664,
- "end": 7737,
+ "start": 7221,
+ "end": 7294,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 14
},
"end": {
- "line": 160,
+ "line": 153,
"column": 87
}
},
"id": {
"type": "Identifier",
- "start": 7664,
- "end": 7666,
+ "start": 7221,
+ "end": 7223,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 14
},
"end": {
- "line": 160,
+ "line": 153,
"column": 16
},
"identifierName": "cx"
@@ -4537,86 +2661,86 @@
},
"init": {
"type": "BinaryExpression",
- "start": 7669,
- "end": 7737,
+ "start": 7226,
+ "end": 7294,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 19
},
"end": {
- "line": 160,
+ "line": 153,
"column": 87
}
},
"left": {
"type": "BinaryExpression",
- "start": 7670,
- "end": 7704,
+ "start": 7227,
+ "end": 7261,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 20
},
"end": {
- "line": 160,
+ "line": 153,
"column": 54
}
},
"left": {
"type": "MemberExpression",
- "start": 7670,
- "end": 7692,
+ "start": 7227,
+ "end": 7249,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 20
},
"end": {
- "line": 160,
+ "line": 153,
"column": 42
}
},
"object": {
"type": "MemberExpression",
- "start": 7670,
- "end": 7690,
+ "start": 7227,
+ "end": 7247,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 20
},
"end": {
- "line": 160,
+ "line": 153,
"column": 40
}
},
"object": {
"type": "ThisExpression",
- "start": 7670,
- "end": 7674,
+ "start": 7227,
+ "end": 7231,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 20
},
"end": {
- "line": 160,
+ "line": 153,
"column": 24
}
}
},
"property": {
"type": "Identifier",
- "start": 7675,
- "end": 7690,
+ "start": 7232,
+ "end": 7247,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 25
},
"end": {
- "line": 160,
+ "line": 153,
"column": 40
},
"identifierName": "positionalPoint"
@@ -4627,15 +2751,15 @@
},
"property": {
"type": "Identifier",
- "start": 7691,
- "end": 7692,
+ "start": 7248,
+ "end": 7249,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 41
},
"end": {
- "line": 160,
+ "line": 153,
"column": 42
},
"identifierName": "x"
@@ -4647,29 +2771,29 @@
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 7695,
- "end": 7704,
+ "start": 7252,
+ "end": 7261,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 45
},
"end": {
- "line": 160,
+ "line": 153,
"column": 54
}
},
"object": {
"type": "Identifier",
- "start": 7695,
- "end": 7702,
+ "start": 7252,
+ "end": 7259,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 45
},
"end": {
- "line": 160,
+ "line": 153,
"column": 52
},
"identifierName": "pOffset"
@@ -4678,15 +2802,15 @@
},
"property": {
"type": "Identifier",
- "start": 7703,
- "end": 7704,
+ "start": 7260,
+ "end": 7261,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 53
},
"end": {
- "line": 160,
+ "line": 153,
"column": 54
},
"identifierName": "x"
@@ -4697,78 +2821,78 @@
},
"extra": {
"parenthesized": true,
- "parenStart": 7669
+ "parenStart": 7226
}
},
"operator": "+",
"right": {
"type": "BinaryExpression",
- "start": 7708,
- "end": 7737,
+ "start": 7265,
+ "end": 7294,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 58
},
"end": {
- "line": 160,
+ "line": 153,
"column": 87
}
},
"left": {
"type": "MemberExpression",
- "start": 7708,
- "end": 7725,
+ "start": 7265,
+ "end": 7282,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 58
},
"end": {
- "line": 160,
+ "line": 153,
"column": 75
}
},
"object": {
"type": "MemberExpression",
- "start": 7708,
- "end": 7719,
+ "start": 7265,
+ "end": 7276,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 58
},
"end": {
- "line": 160,
+ "line": 153,
"column": 69
}
},
"object": {
"type": "ThisExpression",
- "start": 7708,
- "end": 7712,
+ "start": 7265,
+ "end": 7269,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 58
},
"end": {
- "line": 160,
+ "line": 153,
"column": 62
}
}
},
"property": {
"type": "Identifier",
- "start": 7713,
- "end": 7719,
+ "start": 7270,
+ "end": 7276,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 63
},
"end": {
- "line": 160,
+ "line": 153,
"column": 69
},
"identifierName": "bounds"
@@ -4779,15 +2903,15 @@
},
"property": {
"type": "Identifier",
- "start": 7720,
- "end": 7725,
+ "start": 7277,
+ "end": 7282,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 70
},
"end": {
- "line": 160,
+ "line": 153,
"column": 75
},
"identifierName": "width"
@@ -4799,29 +2923,29 @@
"operator": "*",
"right": {
"type": "MemberExpression",
- "start": 7728,
- "end": 7737,
+ "start": 7285,
+ "end": 7294,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 78
},
"end": {
- "line": 160,
+ "line": 153,
"column": 87
}
},
"object": {
"type": "Identifier",
- "start": 7728,
- "end": 7735,
+ "start": 7285,
+ "end": 7292,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 78
},
"end": {
- "line": 160,
+ "line": 153,
"column": 85
},
"identifierName": "pAnchor"
@@ -4830,15 +2954,15 @@
},
"property": {
"type": "Identifier",
- "start": 7736,
- "end": 7737,
+ "start": 7293,
+ "end": 7294,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 86
},
"end": {
- "line": 160,
+ "line": 153,
"column": 87
},
"identifierName": "x"
@@ -4857,15 +2981,15 @@
{
"type": "CommentLine",
"value": " cx, cy - center of square coordinates ",
- "start": 7504,
- "end": 7545,
+ "start": 7061,
+ "end": 7102,
"loc": {
"start": {
- "line": 157,
+ "line": 150,
"column": 8
},
"end": {
- "line": 157,
+ "line": 150,
"column": 49
}
}
@@ -4873,15 +2997,15 @@
{
"type": "CommentLine",
"value": " x, y - coordinates of a corner point of the square",
- "start": 7554,
- "end": 7607,
+ "start": 7111,
+ "end": 7164,
"loc": {
"start": {
- "line": 158,
+ "line": 151,
"column": 8
},
"end": {
- "line": 158,
+ "line": 151,
"column": 61
}
}
@@ -4889,15 +3013,15 @@
{
"type": "CommentLine",
"value": " angle is the angle of rotation",
- "start": 7616,
- "end": 7649,
+ "start": 7173,
+ "end": 7206,
"loc": {
"start": {
- "line": 159,
+ "line": 152,
"column": 8
},
"end": {
- "line": 159,
+ "line": 152,
"column": 41
}
}
@@ -4906,44 +3030,44 @@
},
{
"type": "VariableDeclaration",
- "start": 7747,
- "end": 7828,
+ "start": 7304,
+ "end": 7385,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 8
},
"end": {
- "line": 161,
+ "line": 154,
"column": 89
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 7753,
- "end": 7827,
+ "start": 7310,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 14
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
}
},
"id": {
"type": "Identifier",
- "start": 7753,
- "end": 7755,
+ "start": 7310,
+ "end": 7312,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 14
},
"end": {
- "line": 161,
+ "line": 154,
"column": 16
},
"identifierName": "cy"
@@ -4952,86 +3076,86 @@
},
"init": {
"type": "BinaryExpression",
- "start": 7758,
- "end": 7827,
+ "start": 7315,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 19
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
}
},
"left": {
"type": "BinaryExpression",
- "start": 7759,
- "end": 7793,
+ "start": 7316,
+ "end": 7350,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 20
},
"end": {
- "line": 161,
+ "line": 154,
"column": 54
}
},
"left": {
"type": "MemberExpression",
- "start": 7759,
- "end": 7781,
+ "start": 7316,
+ "end": 7338,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 20
},
"end": {
- "line": 161,
+ "line": 154,
"column": 42
}
},
"object": {
"type": "MemberExpression",
- "start": 7759,
- "end": 7779,
+ "start": 7316,
+ "end": 7336,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 20
},
"end": {
- "line": 161,
+ "line": 154,
"column": 40
}
},
"object": {
"type": "ThisExpression",
- "start": 7759,
- "end": 7763,
+ "start": 7316,
+ "end": 7320,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 20
},
"end": {
- "line": 161,
+ "line": 154,
"column": 24
}
}
},
"property": {
"type": "Identifier",
- "start": 7764,
- "end": 7779,
+ "start": 7321,
+ "end": 7336,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 25
},
"end": {
- "line": 161,
+ "line": 154,
"column": 40
},
"identifierName": "positionalPoint"
@@ -5042,15 +3166,15 @@
},
"property": {
"type": "Identifier",
- "start": 7780,
- "end": 7781,
+ "start": 7337,
+ "end": 7338,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 41
},
"end": {
- "line": 161,
+ "line": 154,
"column": 42
},
"identifierName": "y"
@@ -5062,29 +3186,29 @@
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 7784,
- "end": 7793,
+ "start": 7341,
+ "end": 7350,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 45
},
"end": {
- "line": 161,
+ "line": 154,
"column": 54
}
},
"object": {
"type": "Identifier",
- "start": 7784,
- "end": 7791,
+ "start": 7341,
+ "end": 7348,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 45
},
"end": {
- "line": 161,
+ "line": 154,
"column": 52
},
"identifierName": "pOffset"
@@ -5093,15 +3217,15 @@
},
"property": {
"type": "Identifier",
- "start": 7792,
- "end": 7793,
+ "start": 7349,
+ "end": 7350,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 53
},
"end": {
- "line": 161,
+ "line": 154,
"column": 54
},
"identifierName": "y"
@@ -5112,78 +3236,78 @@
},
"extra": {
"parenthesized": true,
- "parenStart": 7758
+ "parenStart": 7315
}
},
"operator": "+",
"right": {
"type": "BinaryExpression",
- "start": 7797,
- "end": 7827,
+ "start": 7354,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 58
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
}
},
"left": {
"type": "MemberExpression",
- "start": 7797,
- "end": 7815,
+ "start": 7354,
+ "end": 7372,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 58
},
"end": {
- "line": 161,
+ "line": 154,
"column": 76
}
},
"object": {
"type": "MemberExpression",
- "start": 7797,
- "end": 7808,
+ "start": 7354,
+ "end": 7365,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 58
},
"end": {
- "line": 161,
+ "line": 154,
"column": 69
}
},
"object": {
"type": "ThisExpression",
- "start": 7797,
- "end": 7801,
+ "start": 7354,
+ "end": 7358,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 58
},
"end": {
- "line": 161,
+ "line": 154,
"column": 62
}
}
},
"property": {
"type": "Identifier",
- "start": 7802,
- "end": 7808,
+ "start": 7359,
+ "end": 7365,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 63
},
"end": {
- "line": 161,
+ "line": 154,
"column": 69
},
"identifierName": "bounds"
@@ -5194,15 +3318,15 @@
},
"property": {
"type": "Identifier",
- "start": 7809,
- "end": 7815,
+ "start": 7366,
+ "end": 7372,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 70
},
"end": {
- "line": 161,
+ "line": 154,
"column": 76
},
"identifierName": "height"
@@ -5214,29 +3338,29 @@
"operator": "*",
"right": {
"type": "MemberExpression",
- "start": 7818,
- "end": 7827,
+ "start": 7375,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 79
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
}
},
"object": {
"type": "Identifier",
- "start": 7818,
- "end": 7825,
+ "start": 7375,
+ "end": 7382,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 79
},
"end": {
- "line": 161,
+ "line": 154,
"column": 86
},
"identifierName": "pAnchor"
@@ -5245,15 +3369,15 @@
},
"property": {
"type": "Identifier",
- "start": 7826,
- "end": 7827,
+ "start": 7383,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 87
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
},
"identifierName": "y"
@@ -5271,15 +3395,15 @@
{
"type": "CommentLine",
"value": " We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle",
- "start": 7837,
- "end": 7968,
+ "start": 7394,
+ "end": 7525,
"loc": {
"start": {
- "line": 162,
+ "line": 155,
"column": 8
},
"end": {
- "line": 162,
+ "line": 155,
"column": 139
}
}
@@ -5287,15 +3411,15 @@
{
"type": "CommentLine",
"value": " Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates",
- "start": 7977,
- "end": 8059,
+ "start": 7534,
+ "end": 7616,
"loc": {
"start": {
- "line": 163,
+ "line": 156,
"column": 8
},
"end": {
- "line": 163,
+ "line": 156,
"column": 90
}
}
@@ -5304,44 +3428,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8068,
- "end": 8148,
+ "start": 7625,
+ "end": 7700,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 8
},
"end": {
- "line": 164,
- "column": 88
+ "line": 157,
+ "column": 83
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8074,
- "end": 8147,
+ "start": 7631,
+ "end": 7699,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 14
},
"end": {
- "line": 164,
- "column": 87
+ "line": 157,
+ "column": 82
}
},
"id": {
"type": "Identifier",
- "start": 8074,
- "end": 8080,
+ "start": 7631,
+ "end": 7637,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 14
},
"end": {
- "line": 164,
+ "line": 157,
"column": 20
},
"identifierName": "pointX"
@@ -5351,100 +3475,100 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8083,
- "end": 8147,
+ "start": 7640,
+ "end": 7699,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 23
},
"end": {
- "line": 164,
- "column": 87
+ "line": 157,
+ "column": 82
}
},
"left": {
"type": "BinaryExpression",
- "start": 8084,
- "end": 8122,
+ "start": 7641,
+ "end": 7679,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 62
}
},
"left": {
"type": "BinaryExpression",
- "start": 8084,
- "end": 8118,
+ "start": 7641,
+ "end": 7675,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 58
}
},
"left": {
"type": "MemberExpression",
- "start": 8084,
- "end": 8106,
+ "start": 7641,
+ "end": 7663,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 46
}
},
"object": {
"type": "MemberExpression",
- "start": 8084,
- "end": 8104,
+ "start": 7641,
+ "end": 7661,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 44
}
},
"object": {
"type": "ThisExpression",
- "start": 8084,
- "end": 8088,
+ "start": 7641,
+ "end": 7645,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 28
}
}
},
"property": {
"type": "Identifier",
- "start": 8089,
- "end": 8104,
+ "start": 7646,
+ "end": 7661,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 29
},
"end": {
- "line": 164,
+ "line": 157,
"column": 44
},
"identifierName": "positionalPoint"
@@ -5455,15 +3579,15 @@
},
"property": {
"type": "Identifier",
- "start": 8105,
- "end": 8106,
+ "start": 7662,
+ "end": 7663,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 45
},
"end": {
- "line": 164,
+ "line": 157,
"column": 46
},
"identifierName": "x"
@@ -5475,29 +3599,29 @@
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 8109,
- "end": 8118,
+ "start": 7666,
+ "end": 7675,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 49
},
"end": {
- "line": 164,
+ "line": 157,
"column": 58
}
},
"object": {
"type": "Identifier",
- "start": 8109,
- "end": 8116,
+ "start": 7666,
+ "end": 7673,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 49
},
"end": {
- "line": 164,
+ "line": 157,
"column": 56
},
"identifierName": "pOffset"
@@ -5506,15 +3630,15 @@
},
"property": {
"type": "Identifier",
- "start": 8117,
- "end": 8118,
+ "start": 7674,
+ "end": 7675,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 57
},
"end": {
- "line": 164,
+ "line": 157,
"column": 58
},
"identifierName": "x"
@@ -5527,15 +3651,15 @@
"operator": "-",
"right": {
"type": "NumericLiteral",
- "start": 8121,
- "end": 8122,
+ "start": 7678,
+ "end": 7679,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 61
},
"end": {
- "line": 164,
+ "line": 157,
"column": 62
}
},
@@ -5547,84 +3671,84 @@
},
"extra": {
"parenthesized": true,
- "parenStart": 8083
+ "parenStart": 7640
}
},
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 8126,
- "end": 8147,
+ "start": 7683,
+ "end": 7699,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 66
},
"end": {
- "line": 164,
- "column": 87
+ "line": 157,
+ "column": 82
}
},
"object": {
"type": "MemberExpression",
- "start": 8126,
- "end": 8145,
+ "start": 7683,
+ "end": 7697,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 66
},
"end": {
- "line": 164,
- "column": 85
+ "line": 157,
+ "column": 80
}
},
"object": {
"type": "ThisExpression",
- "start": 8126,
- "end": 8130,
+ "start": 7683,
+ "end": 7687,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 66
},
"end": {
- "line": 164,
+ "line": 157,
"column": 70
}
}
},
"property": {
"type": "Identifier",
- "start": 8131,
- "end": 8145,
+ "start": 7688,
+ "end": 7697,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 71
},
"end": {
- "line": 164,
- "column": 85
+ "line": 157,
+ "column": 80
},
- "identifierName": "rawPixelsPoint"
+ "identifierName": "iconPoint"
},
- "name": "rawPixelsPoint"
+ "name": "iconPoint"
},
"computed": false
},
"property": {
"type": "Identifier",
- "start": 8146,
- "end": 8147,
+ "start": 7698,
+ "end": 7699,
"loc": {
"start": {
- "line": 164,
- "column": 86
+ "line": 157,
+ "column": 81
},
"end": {
- "line": 164,
- "column": 87
+ "line": 157,
+ "column": 82
},
"identifierName": "x"
},
@@ -5641,15 +3765,15 @@
{
"type": "CommentLine",
"value": " We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle",
- "start": 7837,
- "end": 7968,
+ "start": 7394,
+ "end": 7525,
"loc": {
"start": {
- "line": 162,
+ "line": 155,
"column": 8
},
"end": {
- "line": 162,
+ "line": 155,
"column": 139
}
}
@@ -5657,15 +3781,15 @@
{
"type": "CommentLine",
"value": " Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates",
- "start": 7977,
- "end": 8059,
+ "start": 7534,
+ "end": 7616,
"loc": {
"start": {
- "line": 163,
+ "line": 156,
"column": 8
},
"end": {
- "line": 163,
+ "line": 156,
"column": 90
}
}
@@ -5674,44 +3798,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8157,
- "end": 8237,
+ "start": 7709,
+ "end": 7784,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 8
},
"end": {
- "line": 165,
- "column": 88
+ "line": 158,
+ "column": 83
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8163,
- "end": 8236,
+ "start": 7715,
+ "end": 7783,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 14
},
"end": {
- "line": 165,
- "column": 87
+ "line": 158,
+ "column": 82
}
},
"id": {
"type": "Identifier",
- "start": 8163,
- "end": 8169,
+ "start": 7715,
+ "end": 7721,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 14
},
"end": {
- "line": 165,
+ "line": 158,
"column": 20
},
"identifierName": "pointY"
@@ -5720,100 +3844,100 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8172,
- "end": 8236,
+ "start": 7724,
+ "end": 7783,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 23
},
"end": {
- "line": 165,
- "column": 87
+ "line": 158,
+ "column": 82
}
},
"left": {
"type": "BinaryExpression",
- "start": 8173,
- "end": 8211,
+ "start": 7725,
+ "end": 7763,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 62
}
},
"left": {
"type": "BinaryExpression",
- "start": 8173,
- "end": 8207,
+ "start": 7725,
+ "end": 7759,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 58
}
},
"left": {
"type": "MemberExpression",
- "start": 8173,
- "end": 8195,
+ "start": 7725,
+ "end": 7747,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 46
}
},
"object": {
"type": "MemberExpression",
- "start": 8173,
- "end": 8193,
+ "start": 7725,
+ "end": 7745,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 44
}
},
"object": {
"type": "ThisExpression",
- "start": 8173,
- "end": 8177,
+ "start": 7725,
+ "end": 7729,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 28
}
}
},
"property": {
"type": "Identifier",
- "start": 8178,
- "end": 8193,
+ "start": 7730,
+ "end": 7745,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 29
},
"end": {
- "line": 165,
+ "line": 158,
"column": 44
},
"identifierName": "positionalPoint"
@@ -5824,15 +3948,15 @@
},
"property": {
"type": "Identifier",
- "start": 8194,
- "end": 8195,
+ "start": 7746,
+ "end": 7747,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 45
},
"end": {
- "line": 165,
+ "line": 158,
"column": 46
},
"identifierName": "y"
@@ -5844,29 +3968,29 @@
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 8198,
- "end": 8207,
+ "start": 7750,
+ "end": 7759,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 49
},
"end": {
- "line": 165,
+ "line": 158,
"column": 58
}
},
"object": {
"type": "Identifier",
- "start": 8198,
- "end": 8205,
+ "start": 7750,
+ "end": 7757,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 49
},
"end": {
- "line": 165,
+ "line": 158,
"column": 56
},
"identifierName": "pOffset"
@@ -5875,15 +3999,15 @@
},
"property": {
"type": "Identifier",
- "start": 8206,
- "end": 8207,
+ "start": 7758,
+ "end": 7759,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 57
},
"end": {
- "line": 165,
+ "line": 158,
"column": 58
},
"identifierName": "y"
@@ -5896,15 +4020,15 @@
"operator": "-",
"right": {
"type": "NumericLiteral",
- "start": 8210,
- "end": 8211,
+ "start": 7762,
+ "end": 7763,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 61
},
"end": {
- "line": 165,
+ "line": 158,
"column": 62
}
},
@@ -5916,84 +4040,84 @@
},
"extra": {
"parenthesized": true,
- "parenStart": 8172
+ "parenStart": 7724
}
},
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 8215,
- "end": 8236,
+ "start": 7767,
+ "end": 7783,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 66
},
"end": {
- "line": 165,
- "column": 87
+ "line": 158,
+ "column": 82
}
},
"object": {
"type": "MemberExpression",
- "start": 8215,
- "end": 8234,
+ "start": 7767,
+ "end": 7781,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 66
},
"end": {
- "line": 165,
- "column": 85
+ "line": 158,
+ "column": 80
}
},
"object": {
"type": "ThisExpression",
- "start": 8215,
- "end": 8219,
+ "start": 7767,
+ "end": 7771,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 66
},
"end": {
- "line": 165,
+ "line": 158,
"column": 70
}
}
},
"property": {
"type": "Identifier",
- "start": 8220,
- "end": 8234,
+ "start": 7772,
+ "end": 7781,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 71
},
"end": {
- "line": 165,
- "column": 85
+ "line": 158,
+ "column": 80
},
- "identifierName": "rawPixelsPoint"
+ "identifierName": "iconPoint"
},
- "name": "rawPixelsPoint"
+ "name": "iconPoint"
},
"computed": false
},
"property": {
"type": "Identifier",
- "start": 8235,
- "end": 8236,
+ "start": 7782,
+ "end": 7783,
"loc": {
"start": {
- "line": 165,
- "column": 86
+ "line": 158,
+ "column": 81
},
"end": {
- "line": 165,
- "column": 87
+ "line": 158,
+ "column": 82
},
"identifierName": "y"
},
@@ -6009,15 +4133,15 @@
{
"type": "CommentLine",
"value": " translate point to origin",
- "start": 8246,
- "end": 8274,
+ "start": 7793,
+ "end": 7821,
"loc": {
"start": {
- "line": 166,
+ "line": 159,
"column": 8
},
"end": {
- "line": 166,
+ "line": 159,
"column": 36
}
}
@@ -6026,44 +4150,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8283,
- "end": 8309,
+ "start": 7830,
+ "end": 7856,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 8
},
"end": {
- "line": 167,
+ "line": 160,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8289,
- "end": 8308,
+ "start": 7836,
+ "end": 7855,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 14
},
"end": {
- "line": 167,
+ "line": 160,
"column": 33
}
},
"id": {
"type": "Identifier",
- "start": 8289,
- "end": 8294,
+ "start": 7836,
+ "end": 7841,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 14
},
"end": {
- "line": 167,
+ "line": 160,
"column": 19
},
"identifierName": "tempX"
@@ -6073,29 +4197,29 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8297,
- "end": 8308,
+ "start": 7844,
+ "end": 7855,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 22
},
"end": {
- "line": 167,
+ "line": 160,
"column": 33
}
},
"left": {
"type": "Identifier",
- "start": 8297,
- "end": 8303,
+ "start": 7844,
+ "end": 7850,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 22
},
"end": {
- "line": 167,
+ "line": 160,
"column": 28
},
"identifierName": "pointX"
@@ -6105,15 +4229,15 @@
"operator": "-",
"right": {
"type": "Identifier",
- "start": 8306,
- "end": 8308,
+ "start": 7853,
+ "end": 7855,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 31
},
"end": {
- "line": 167,
+ "line": 160,
"column": 33
},
"identifierName": "cx"
@@ -6129,15 +4253,15 @@
{
"type": "CommentLine",
"value": " translate point to origin",
- "start": 8246,
- "end": 8274,
+ "start": 7793,
+ "end": 7821,
"loc": {
"start": {
- "line": 166,
+ "line": 159,
"column": 8
},
"end": {
- "line": 166,
+ "line": 159,
"column": 36
}
}
@@ -6146,44 +4270,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8318,
- "end": 8344,
+ "start": 7865,
+ "end": 7891,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 8
},
"end": {
- "line": 168,
+ "line": 161,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8324,
- "end": 8343,
+ "start": 7871,
+ "end": 7890,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 14
},
"end": {
- "line": 168,
+ "line": 161,
"column": 33
}
},
"id": {
"type": "Identifier",
- "start": 8324,
- "end": 8329,
+ "start": 7871,
+ "end": 7876,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 14
},
"end": {
- "line": 168,
+ "line": 161,
"column": 19
},
"identifierName": "tempY"
@@ -6192,29 +4316,29 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8332,
- "end": 8343,
+ "start": 7879,
+ "end": 7890,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 22
},
"end": {
- "line": 168,
+ "line": 161,
"column": 33
}
},
"left": {
"type": "Identifier",
- "start": 8332,
- "end": 8338,
+ "start": 7879,
+ "end": 7885,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 22
},
"end": {
- "line": 168,
+ "line": 161,
"column": 28
},
"identifierName": "pointY"
@@ -6224,15 +4348,15 @@
"operator": "-",
"right": {
"type": "Identifier",
- "start": 8341,
- "end": 8343,
+ "start": 7888,
+ "end": 7890,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 31
},
"end": {
- "line": 168,
+ "line": 161,
"column": 33
},
"identifierName": "cy"
@@ -6247,15 +4371,15 @@
{
"type": "CommentLine",
"value": " now apply rotation",
- "start": 8353,
- "end": 8374,
+ "start": 7900,
+ "end": 7921,
"loc": {
"start": {
- "line": 169,
+ "line": 162,
"column": 8
},
"end": {
- "line": 169,
+ "line": 162,
"column": 29
}
}
@@ -6264,44 +4388,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8383,
- "end": 8453,
+ "start": 7930,
+ "end": 8000,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 8
},
"end": {
- "line": 170,
+ "line": 163,
"column": 78
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8389,
- "end": 8452,
+ "start": 7936,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 14
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
"id": {
"type": "Identifier",
- "start": 8389,
- "end": 8397,
+ "start": 7936,
+ "end": 7944,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 14
},
"end": {
- "line": 170,
+ "line": 163,
"column": 22
},
"identifierName": "rotatedX"
@@ -6311,43 +4435,43 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8400,
- "end": 8452,
+ "start": 7947,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 25
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
"left": {
"type": "BinaryExpression",
- "start": 8400,
- "end": 8424,
+ "start": 7947,
+ "end": 7971,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 25
},
"end": {
- "line": 170,
+ "line": 163,
"column": 49
}
},
"left": {
"type": "Identifier",
- "start": 8400,
- "end": 8405,
+ "start": 7947,
+ "end": 7952,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 25
},
"end": {
- "line": 170,
+ "line": 163,
"column": 30
},
"identifierName": "tempX"
@@ -6357,43 +4481,43 @@
"operator": "*",
"right": {
"type": "CallExpression",
- "start": 8408,
- "end": 8424,
+ "start": 7955,
+ "end": 7971,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 33
},
"end": {
- "line": 170,
+ "line": 163,
"column": 49
}
},
"callee": {
"type": "MemberExpression",
- "start": 8408,
- "end": 8416,
+ "start": 7955,
+ "end": 7963,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 33
},
"end": {
- "line": 170,
+ "line": 163,
"column": 41
}
},
"object": {
"type": "Identifier",
- "start": 8408,
- "end": 8412,
+ "start": 7955,
+ "end": 7959,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 33
},
"end": {
- "line": 170,
+ "line": 163,
"column": 37
},
"identifierName": "Math"
@@ -6402,15 +4526,15 @@
},
"property": {
"type": "Identifier",
- "start": 8413,
- "end": 8416,
+ "start": 7960,
+ "end": 7963,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 38
},
"end": {
- "line": 170,
+ "line": 163,
"column": 41
},
"identifierName": "cos"
@@ -6422,15 +4546,15 @@
"arguments": [
{
"type": "Identifier",
- "start": 8417,
- "end": 8423,
+ "start": 7964,
+ "end": 7970,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 42
},
"end": {
- "line": 170,
+ "line": 163,
"column": 48
},
"identifierName": "pAngle"
@@ -6443,29 +4567,29 @@
"operator": "-",
"right": {
"type": "BinaryExpression",
- "start": 8427,
- "end": 8452,
+ "start": 7974,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 52
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
"left": {
"type": "Identifier",
- "start": 8427,
- "end": 8432,
+ "start": 7974,
+ "end": 7979,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 52
},
"end": {
- "line": 170,
+ "line": 163,
"column": 57
},
"identifierName": "tempY"
@@ -6475,15 +4599,15 @@
"operator": "*",
"right": {
"type": "UnaryExpression",
- "start": 8435,
- "end": 8452,
+ "start": 7982,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 60
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
@@ -6491,43 +4615,43 @@
"prefix": true,
"argument": {
"type": "CallExpression",
- "start": 8436,
- "end": 8452,
+ "start": 7983,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 61
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
"callee": {
"type": "MemberExpression",
- "start": 8436,
- "end": 8444,
+ "start": 7983,
+ "end": 7991,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 61
},
"end": {
- "line": 170,
+ "line": 163,
"column": 69
}
},
"object": {
"type": "Identifier",
- "start": 8436,
- "end": 8440,
+ "start": 7983,
+ "end": 7987,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 61
},
"end": {
- "line": 170,
+ "line": 163,
"column": 65
},
"identifierName": "Math"
@@ -6536,15 +4660,15 @@
},
"property": {
"type": "Identifier",
- "start": 8441,
- "end": 8444,
+ "start": 7988,
+ "end": 7991,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 66
},
"end": {
- "line": 170,
+ "line": 163,
"column": 69
},
"identifierName": "sin"
@@ -6556,15 +4680,15 @@
"arguments": [
{
"type": "Identifier",
- "start": 8445,
- "end": 8451,
+ "start": 7992,
+ "end": 7998,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 70
},
"end": {
- "line": 170,
+ "line": 163,
"column": 76
},
"identifierName": "pAngle"
@@ -6587,15 +4711,15 @@
{
"type": "CommentLine",
"value": " now apply rotation",
- "start": 8353,
- "end": 8374,
+ "start": 7900,
+ "end": 7921,
"loc": {
"start": {
- "line": 169,
+ "line": 162,
"column": 8
},
"end": {
- "line": 169,
+ "line": 162,
"column": 29
}
}
@@ -6604,44 +4728,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8462,
- "end": 8532,
+ "start": 8009,
+ "end": 8079,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 8
},
"end": {
- "line": 171,
+ "line": 164,
"column": 78
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8468,
- "end": 8531,
+ "start": 8015,
+ "end": 8078,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 14
},
"end": {
- "line": 171,
+ "line": 164,
"column": 77
}
},
"id": {
"type": "Identifier",
- "start": 8468,
- "end": 8476,
+ "start": 8015,
+ "end": 8023,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 14
},
"end": {
- "line": 171,
+ "line": 164,
"column": 22
},
"identifierName": "rotatedY"
@@ -6650,43 +4774,43 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8479,
- "end": 8531,
+ "start": 8026,
+ "end": 8078,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 25
},
"end": {
- "line": 171,
+ "line": 164,
"column": 77
}
},
"left": {
"type": "BinaryExpression",
- "start": 8479,
- "end": 8504,
+ "start": 8026,
+ "end": 8051,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 25
},
"end": {
- "line": 171,
+ "line": 164,
"column": 50
}
},
"left": {
"type": "Identifier",
- "start": 8479,
- "end": 8484,
+ "start": 8026,
+ "end": 8031,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 25
},
"end": {
- "line": 171,
+ "line": 164,
"column": 30
},
"identifierName": "tempX"
@@ -6696,15 +4820,15 @@
"operator": "*",
"right": {
"type": "UnaryExpression",
- "start": 8487,
- "end": 8504,
+ "start": 8034,
+ "end": 8051,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 33
},
"end": {
- "line": 171,
+ "line": 164,
"column": 50
}
},
@@ -6712,43 +4836,43 @@
"prefix": true,
"argument": {
"type": "CallExpression",
- "start": 8488,
- "end": 8504,
+ "start": 8035,
+ "end": 8051,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 34
},
"end": {
- "line": 171,
+ "line": 164,
"column": 50
}
},
"callee": {
"type": "MemberExpression",
- "start": 8488,
- "end": 8496,
+ "start": 8035,
+ "end": 8043,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 34
},
"end": {
- "line": 171,
+ "line": 164,
"column": 42
}
},
"object": {
"type": "Identifier",
- "start": 8488,
- "end": 8492,
+ "start": 8035,
+ "end": 8039,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 34
},
"end": {
- "line": 171,
+ "line": 164,
"column": 38
},
"identifierName": "Math"
@@ -6757,15 +4881,15 @@
},
"property": {
"type": "Identifier",
- "start": 8493,
- "end": 8496,
+ "start": 8040,
+ "end": 8043,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 39
},
"end": {
- "line": 171,
+ "line": 164,
"column": 42
},
"identifierName": "sin"
@@ -6777,15 +4901,15 @@
"arguments": [
{
"type": "Identifier",
- "start": 8497,
- "end": 8503,
+ "start": 8044,
+ "end": 8050,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 43
},
"end": {
- "line": 171,
+ "line": 164,
"column": 49
},
"identifierName": "pAngle"
@@ -6802,29 +4926,29 @@
"operator": "+",
"right": {
"type": "BinaryExpression",
- "start": 8507,
- "end": 8531,
+ "start": 8054,
+ "end": 8078,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 53
},
"end": {
- "line": 171,
+ "line": 164,
"column": 77
}
},
"left": {
"type": "Identifier",
- "start": 8507,
- "end": 8512,
+ "start": 8054,
+ "end": 8059,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 53
},
"end": {
- "line": 171,
+ "line": 164,
"column": 58
},
"identifierName": "tempY"
@@ -6834,43 +4958,43 @@
"operator": "*",
"right": {
"type": "CallExpression",
- "start": 8515,
- "end": 8531,
+ "start": 8062,
+ "end": 8078,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 61
},
"end": {
- "line": 171,
+ "line": 164,
"column": 77
}
},
"callee": {
"type": "MemberExpression",
- "start": 8515,
- "end": 8523,
+ "start": 8062,
+ "end": 8070,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 61
},
"end": {
- "line": 171,
+ "line": 164,
"column": 69
}
},
"object": {
"type": "Identifier",
- "start": 8515,
- "end": 8519,
+ "start": 8062,
+ "end": 8066,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 61
},
"end": {
- "line": 171,
+ "line": 164,
"column": 65
},
"identifierName": "Math"
@@ -6879,15 +5003,15 @@
},
"property": {
"type": "Identifier",
- "start": 8520,
- "end": 8523,
+ "start": 8067,
+ "end": 8070,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 66
},
"end": {
- "line": 171,
+ "line": 164,
"column": 69
},
"identifierName": "cos"
@@ -6899,15 +5023,15 @@
"arguments": [
{
"type": "Identifier",
- "start": 8524,
- "end": 8530,
+ "start": 8071,
+ "end": 8077,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 70
},
"end": {
- "line": 171,
+ "line": 164,
"column": 76
},
"identifierName": "pAngle"
@@ -6925,15 +5049,15 @@
{
"type": "CommentLine",
"value": " translate back",
- "start": 8541,
- "end": 8558,
+ "start": 8088,
+ "end": 8105,
"loc": {
"start": {
- "line": 172,
+ "line": 165,
"column": 8
},
"end": {
- "line": 172,
+ "line": 165,
"column": 25
}
}
@@ -6942,44 +5066,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8567,
- "end": 8591,
+ "start": 8114,
+ "end": 8138,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 8
},
"end": {
- "line": 173,
+ "line": 166,
"column": 32
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8573,
- "end": 8590,
+ "start": 8120,
+ "end": 8137,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 14
},
"end": {
- "line": 173,
+ "line": 166,
"column": 31
}
},
"id": {
"type": "Identifier",
- "start": 8573,
- "end": 8574,
+ "start": 8120,
+ "end": 8121,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 14
},
"end": {
- "line": 173,
+ "line": 166,
"column": 15
},
"identifierName": "x"
@@ -6989,29 +5113,29 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8577,
- "end": 8590,
+ "start": 8124,
+ "end": 8137,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 18
},
"end": {
- "line": 173,
+ "line": 166,
"column": 31
}
},
"left": {
"type": "Identifier",
- "start": 8577,
- "end": 8585,
+ "start": 8124,
+ "end": 8132,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 18
},
"end": {
- "line": 173,
+ "line": 166,
"column": 26
},
"identifierName": "rotatedX"
@@ -7021,15 +5145,15 @@
"operator": "+",
"right": {
"type": "Identifier",
- "start": 8588,
- "end": 8590,
+ "start": 8135,
+ "end": 8137,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 29
},
"end": {
- "line": 173,
+ "line": 166,
"column": 31
},
"identifierName": "cx"
@@ -7045,15 +5169,15 @@
{
"type": "CommentLine",
"value": " translate back",
- "start": 8541,
- "end": 8558,
+ "start": 8088,
+ "end": 8105,
"loc": {
"start": {
- "line": 172,
+ "line": 165,
"column": 8
},
"end": {
- "line": 172,
+ "line": 165,
"column": 25
}
}
@@ -7062,44 +5186,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8600,
- "end": 8624,
+ "start": 8147,
+ "end": 8171,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 8
},
"end": {
- "line": 174,
+ "line": 167,
"column": 32
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8606,
- "end": 8623,
+ "start": 8153,
+ "end": 8170,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 14
},
"end": {
- "line": 174,
+ "line": 167,
"column": 31
}
},
"id": {
"type": "Identifier",
- "start": 8606,
- "end": 8607,
+ "start": 8153,
+ "end": 8154,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 14
},
"end": {
- "line": 174,
+ "line": 167,
"column": 15
},
"identifierName": "y"
@@ -7108,29 +5232,29 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8610,
- "end": 8623,
+ "start": 8157,
+ "end": 8170,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 18
},
"end": {
- "line": 174,
+ "line": 167,
"column": 31
}
},
"left": {
"type": "Identifier",
- "start": 8610,
- "end": 8618,
+ "start": 8157,
+ "end": 8165,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 18
},
"end": {
- "line": 174,
+ "line": 167,
"column": 26
},
"identifierName": "rotatedY"
@@ -7140,15 +5264,15 @@
"operator": "+",
"right": {
"type": "Identifier",
- "start": 8621,
- "end": 8623,
+ "start": 8168,
+ "end": 8170,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 29
},
"end": {
- "line": 174,
+ "line": 167,
"column": 31
},
"identifierName": "cy"
@@ -7162,87 +5286,87 @@
},
{
"type": "ExpressionStatement",
- "start": 8633,
- "end": 8650,
+ "start": 8180,
+ "end": 8197,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
- "start": 8633,
- "end": 8649,
+ "start": 8180,
+ "end": 8196,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
- "start": 8633,
- "end": 8645,
+ "start": 8180,
+ "end": 8192,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 20
}
},
"object": {
"type": "MemberExpression",
- "start": 8633,
- "end": 8643,
+ "start": 8180,
+ "end": 8190,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 18
}
},
"object": {
"type": "ThisExpression",
- "start": 8633,
- "end": 8637,
+ "start": 8180,
+ "end": 8184,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 12
}
}
},
"property": {
"type": "Identifier",
- "start": 8638,
- "end": 8643,
+ "start": 8185,
+ "end": 8190,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 13
},
"end": {
- "line": 175,
+ "line": 168,
"column": 18
},
"identifierName": "point"
@@ -7253,15 +5377,15 @@
},
"property": {
"type": "Identifier",
- "start": 8644,
- "end": 8645,
+ "start": 8191,
+ "end": 8192,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 19
},
"end": {
- "line": 175,
+ "line": 168,
"column": 20
},
"identifierName": "x"
@@ -7272,15 +5396,15 @@
},
"right": {
"type": "Identifier",
- "start": 8648,
- "end": 8649,
+ "start": 8195,
+ "end": 8196,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 23
},
"end": {
- "line": 175,
+ "line": 168,
"column": 24
},
"identifierName": "x"
@@ -7291,87 +5415,87 @@
},
{
"type": "ExpressionStatement",
- "start": 8659,
- "end": 8676,
+ "start": 8206,
+ "end": 8223,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
- "start": 8659,
- "end": 8675,
+ "start": 8206,
+ "end": 8222,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
- "start": 8659,
- "end": 8671,
+ "start": 8206,
+ "end": 8218,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 20
}
},
"object": {
"type": "MemberExpression",
- "start": 8659,
- "end": 8669,
+ "start": 8206,
+ "end": 8216,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 18
}
},
"object": {
"type": "ThisExpression",
- "start": 8659,
- "end": 8663,
+ "start": 8206,
+ "end": 8210,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 12
}
}
},
"property": {
"type": "Identifier",
- "start": 8664,
- "end": 8669,
+ "start": 8211,
+ "end": 8216,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 13
},
"end": {
- "line": 176,
+ "line": 169,
"column": 18
},
"identifierName": "point"
@@ -7382,15 +5506,15 @@
},
"property": {
"type": "Identifier",
- "start": 8670,
- "end": 8671,
+ "start": 8217,
+ "end": 8218,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 19
},
"end": {
- "line": 176,
+ "line": 169,
"column": 20
},
"identifierName": "y"
@@ -7401,15 +5525,15 @@
},
"right": {
"type": "Identifier",
- "start": 8674,
- "end": 8675,
+ "start": 8221,
+ "end": 8222,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 23
},
"end": {
- "line": 176,
+ "line": 169,
"column": 24
},
"identifierName": "y"
@@ -7420,58 +5544,58 @@
},
{
"type": "ReturnStatement",
- "start": 8685,
- "end": 8703,
+ "start": 8232,
+ "end": 8250,
"loc": {
"start": {
- "line": 177,
+ "line": 170,
"column": 8
},
"end": {
- "line": 177,
+ "line": 170,
"column": 26
}
},
"argument": {
"type": "MemberExpression",
- "start": 8692,
- "end": 8702,
+ "start": 8239,
+ "end": 8249,
"loc": {
"start": {
- "line": 177,
+ "line": 170,
"column": 15
},
"end": {
- "line": 177,
+ "line": 170,
"column": 25
}
},
"object": {
"type": "ThisExpression",
- "start": 8692,
- "end": 8696,
+ "start": 8239,
+ "end": 8243,
"loc": {
"start": {
- "line": 177,
+ "line": 170,
"column": 15
},
"end": {
- "line": 177,
+ "line": 170,
"column": 19
}
}
},
"property": {
"type": "Identifier",
- "start": 8697,
- "end": 8702,
+ "start": 8244,
+ "end": 8249,
"loc": {
"start": {
- "line": 177,
+ "line": 170,
"column": 20
},
"end": {
- "line": 177,
+ "line": 170,
"column": 25
},
"identifierName": "point"
@@ -7488,16 +5612,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle\n * @prop {number} pOffset.x - The x offset of the rectangle\n * @prop {number} pOffset.y - The y offset of the rectangle\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
- "start": 5022,
- "end": 7343,
+ "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account.\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.\n * @prop {number} pOffset.x - The x offset of the rectangle.\n * @prop {number} pOffset.y - The y offset of the rectangle.\n * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.\n * @prop {number} pAnchor.x - The x anchor of the rectangle.\n * @prop {number} pAnchor.y - The y anchor of the rectangle.\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
+ "start": 4430,
+ "end": 6955,
"loc": {
"start": {
- "line": 118,
+ "line": 110,
"column": 4
},
"end": {
- "line": 153,
+ "line": 148,
"column": 7
}
}
@@ -7506,16 +5630,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle\n ",
- "start": 8714,
- "end": 9079,
+ "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 8261,
+ "end": 8712,
"loc": {
"start": {
- "line": 179,
+ "line": 172,
"column": 4
},
"end": {
- "line": 185,
+ "line": 179,
"column": 7
}
}
@@ -7524,15 +5648,15 @@
},
{
"type": "ClassMethod",
- "start": 9084,
- "end": 9299,
+ "start": 8717,
+ "end": 8927,
"loc": {
"start": {
- "line": 186,
+ "line": 180,
"column": 4
},
"end": {
- "line": 189,
+ "line": 184,
"column": 5
}
},
@@ -7540,15 +5664,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 9084,
- "end": 9092,
+ "start": 8717,
+ "end": 8725,
"loc": {
"start": {
- "line": 186,
+ "line": 180,
"column": 4
},
"end": {
- "line": 186,
+ "line": 180,
"column": 12
},
"identifierName": "setPoint"
@@ -7564,15 +5688,15 @@
"params": [
{
"type": "Identifier",
- "start": 9093,
- "end": 9099,
+ "start": 8726,
+ "end": 8732,
"loc": {
"start": {
- "line": 186,
+ "line": 180,
"column": 13
},
"end": {
- "line": 186,
+ "line": 180,
"column": 19
},
"identifierName": "pPoint"
@@ -7582,363 +5706,479 @@
],
"body": {
"type": "BlockStatement",
- "start": 9101,
- "end": 9299,
+ "start": 8734,
+ "end": 8927,
"loc": {
"start": {
- "line": 186,
+ "line": 180,
"column": 21
},
"end": {
- "line": 189,
+ "line": 184,
"column": 5
}
},
"body": [
{
- "type": "ExpressionStatement",
- "start": 9111,
- "end": 9197,
+ "type": "VariableDeclaration",
+ "start": 8744,
+ "end": 8782,
"loc": {
"start": {
- "line": 187,
+ "line": 181,
"column": 8
},
"end": {
- "line": 187,
- "column": 94
+ "line": 181,
+ "column": 46
}
},
- "expression": {
- "type": "AssignmentExpression",
- "start": 9111,
- "end": 9196,
- "loc": {
- "start": {
- "line": 187,
- "column": 8
- },
- "end": {
- "line": 187,
- "column": 93
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 9111,
- "end": 9132,
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 8750,
+ "end": 8781,
"loc": {
"start": {
- "line": 187,
- "column": 8
+ "line": 181,
+ "column": 14
},
"end": {
- "line": 187,
- "column": 29
+ "line": 181,
+ "column": 45
}
},
- "object": {
- "type": "MemberExpression",
- "start": 9111,
- "end": 9130,
+ "id": {
+ "type": "ObjectPattern",
+ "start": 8750,
+ "end": 8772,
"loc": {
"start": {
- "line": 187,
- "column": 8
+ "line": 181,
+ "column": 14
},
"end": {
- "line": 187,
- "column": 27
+ "line": 181,
+ "column": 36
}
},
- "object": {
- "type": "ThisExpression",
- "start": 9111,
- "end": 9115,
- "loc": {
- "start": {
- "line": 187,
- "column": 8
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 8752,
+ "end": 8753,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 16
+ },
+ "end": {
+ "line": 181,
+ "column": 17
+ }
},
- "end": {
- "line": 187,
- "column": 12
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 9116,
- "end": 9130,
- "loc": {
- "start": {
- "line": 187,
- "column": 13
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 8752,
+ "end": 8753,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 16
+ },
+ "end": {
+ "line": 181,
+ "column": 17
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
},
- "end": {
- "line": 187,
- "column": 27
+ "value": {
+ "type": "Identifier",
+ "start": 8752,
+ "end": 8753,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 16
+ },
+ "end": {
+ "line": 181,
+ "column": 17
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
},
- "identifierName": "rawPixelsPoint"
- },
- "name": "rawPixelsPoint"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 9131,
- "end": 9132,
- "loc": {
- "start": {
- "line": 187,
- "column": 28
- },
- "end": {
- "line": 187,
- "column": 29
+ "extra": {
+ "shorthand": true
+ }
},
- "identifierName": "x"
- },
- "name": "x"
+ {
+ "type": "ObjectProperty",
+ "start": 8755,
+ "end": 8756,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 19
+ },
+ "end": {
+ "line": 181,
+ "column": 20
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 8755,
+ "end": 8756,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 19
+ },
+ "end": {
+ "line": 181,
+ "column": 20
+ },
+ "identifierName": "y"
+ },
+ "name": "y"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 8755,
+ "end": 8756,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 19
+ },
+ "end": {
+ "line": 181,
+ "column": 20
+ },
+ "identifierName": "y"
+ },
+ "name": "y"
+ },
+ "extra": {
+ "shorthand": true
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 8758,
+ "end": 8770,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 22
+ },
+ "end": {
+ "line": 181,
+ "column": 34
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 8758,
+ "end": 8770,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 22
+ },
+ "end": {
+ "line": 181,
+ "column": 34
+ },
+ "identifierName": "isNormalized"
+ },
+ "name": "isNormalized"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 8758,
+ "end": 8770,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 22
+ },
+ "end": {
+ "line": 181,
+ "column": 34
+ },
+ "identifierName": "isNormalized"
+ },
+ "name": "isNormalized"
+ },
+ "extra": {
+ "shorthand": true
+ }
+ }
+ ]
},
- "computed": false
+ "init": {
+ "type": "Identifier",
+ "start": 8775,
+ "end": 8781,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 39
+ },
+ "end": {
+ "line": 181,
+ "column": 45
+ },
+ "identifierName": "pPoint"
+ },
+ "name": "pPoint"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 8791,
+ "end": 8851,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 8
},
- "right": {
- "type": "ConditionalExpression",
- "start": 9135,
- "end": 9196,
+ "end": {
+ "line": 182,
+ "column": 68
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 8791,
+ "end": 8850,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 8
+ },
+ "end": {
+ "line": 182,
+ "column": 67
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 8791,
+ "end": 8807,
"loc": {
"start": {
- "line": 187,
- "column": 32
+ "line": 182,
+ "column": 8
},
"end": {
- "line": 187,
- "column": 93
+ "line": 182,
+ "column": 24
}
},
- "test": {
+ "object": {
"type": "MemberExpression",
- "start": 9135,
- "end": 9154,
+ "start": 8791,
+ "end": 8805,
"loc": {
"start": {
- "line": 187,
- "column": 32
+ "line": 182,
+ "column": 8
},
"end": {
- "line": 187,
- "column": 51
+ "line": 182,
+ "column": 22
}
},
"object": {
- "type": "Identifier",
- "start": 9135,
- "end": 9141,
+ "type": "ThisExpression",
+ "start": 8791,
+ "end": 8795,
"loc": {
"start": {
- "line": 187,
- "column": 32
+ "line": 182,
+ "column": 8
},
"end": {
- "line": 187,
- "column": 38
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
+ "line": 182,
+ "column": 12
+ }
+ }
},
"property": {
"type": "Identifier",
- "start": 9142,
- "end": 9154,
+ "start": 8796,
+ "end": 8805,
"loc": {
"start": {
- "line": 187,
- "column": 39
+ "line": 182,
+ "column": 13
},
"end": {
- "line": 187,
- "column": 51
+ "line": 182,
+ "column": 22
},
- "identifierName": "useRawPixels"
+ "identifierName": "iconPoint"
},
- "name": "useRawPixels"
+ "name": "iconPoint"
},
"computed": false
},
- "consequent": {
- "type": "MemberExpression",
- "start": 9157,
- "end": 9165,
+ "property": {
+ "type": "Identifier",
+ "start": 8806,
+ "end": 8807,
"loc": {
"start": {
- "line": 187,
- "column": 54
+ "line": 182,
+ "column": 23
},
"end": {
- "line": 187,
- "column": 62
- }
- },
- "object": {
- "type": "Identifier",
- "start": 9157,
- "end": 9163,
- "loc": {
- "start": {
- "line": 187,
- "column": 54
- },
- "end": {
- "line": 187,
- "column": 60
- },
- "identifierName": "pPoint"
+ "line": 182,
+ "column": 24
},
- "name": "pPoint"
+ "identifierName": "x"
},
- "property": {
- "type": "Identifier",
- "start": 9164,
- "end": 9165,
- "loc": {
- "start": {
- "line": 187,
- "column": 61
- },
- "end": {
- "line": 187,
- "column": 62
- },
- "identifierName": "x"
+ "name": "x"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "ConditionalExpression",
+ "start": 8810,
+ "end": 8850,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 27
+ },
+ "end": {
+ "line": 182,
+ "column": 67
+ }
+ },
+ "test": {
+ "type": "Identifier",
+ "start": 8810,
+ "end": 8822,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 27
},
- "name": "x"
+ "end": {
+ "line": 182,
+ "column": 39
+ },
+ "identifierName": "isNormalized"
},
- "computed": false
+ "name": "isNormalized"
},
- "alternate": {
+ "consequent": {
"type": "BinaryExpression",
- "start": 9168,
- "end": 9196,
+ "start": 8825,
+ "end": 8846,
"loc": {
"start": {
- "line": 187,
- "column": 65
+ "line": 182,
+ "column": 42
},
"end": {
- "line": 187,
- "column": 93
+ "line": 182,
+ "column": 63
}
},
"left": {
- "type": "MemberExpression",
- "start": 9168,
- "end": 9176,
+ "type": "Identifier",
+ "start": 8825,
+ "end": 8826,
"loc": {
"start": {
- "line": 187,
- "column": 65
+ "line": 182,
+ "column": 42
},
"end": {
- "line": 187,
- "column": 73
- }
- },
- "object": {
- "type": "Identifier",
- "start": 9168,
- "end": 9174,
- "loc": {
- "start": {
- "line": 187,
- "column": 65
- },
- "end": {
- "line": 187,
- "column": 71
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 9175,
- "end": 9176,
- "loc": {
- "start": {
- "line": 187,
- "column": 72
- },
- "end": {
- "line": 187,
- "column": 73
- },
- "identifierName": "x"
+ "line": 182,
+ "column": 43
},
- "name": "x"
+ "identifierName": "x"
},
- "computed": false
+ "name": "x"
},
"operator": "*",
"right": {
"type": "MemberExpression",
- "start": 9179,
- "end": 9196,
+ "start": 8829,
+ "end": 8846,
"loc": {
"start": {
- "line": 187,
- "column": 76
+ "line": 182,
+ "column": 46
},
"end": {
- "line": 187,
- "column": 93
+ "line": 182,
+ "column": 63
}
},
"object": {
"type": "MemberExpression",
- "start": 9179,
- "end": 9190,
+ "start": 8829,
+ "end": 8840,
"loc": {
"start": {
- "line": 187,
- "column": 76
+ "line": 182,
+ "column": 46
},
"end": {
- "line": 187,
- "column": 87
+ "line": 182,
+ "column": 57
}
},
"object": {
"type": "ThisExpression",
- "start": 9179,
- "end": 9183,
+ "start": 8829,
+ "end": 8833,
"loc": {
"start": {
- "line": 187,
- "column": 76
+ "line": 182,
+ "column": 46
},
"end": {
- "line": 187,
- "column": 80
+ "line": 182,
+ "column": 50
}
}
},
"property": {
"type": "Identifier",
- "start": 9184,
- "end": 9190,
+ "start": 8834,
+ "end": 8840,
"loc": {
"start": {
- "line": 187,
- "column": 81
+ "line": 182,
+ "column": 51
},
"end": {
- "line": 187,
- "column": 87
+ "line": 182,
+ "column": 57
},
"identifierName": "bounds"
},
@@ -7948,16 +6188,16 @@
},
"property": {
"type": "Identifier",
- "start": 9191,
- "end": 9196,
+ "start": 8841,
+ "end": 8846,
"loc": {
"start": {
- "line": 187,
- "column": 88
+ "line": 182,
+ "column": 58
},
"end": {
- "line": 187,
- "column": 93
+ "line": 182,
+ "column": 63
},
"identifierName": "width"
},
@@ -7965,113 +6205,130 @@
},
"computed": false
}
+ },
+ "alternate": {
+ "type": "Identifier",
+ "start": 8849,
+ "end": 8850,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 66
+ },
+ "end": {
+ "line": 182,
+ "column": 67
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
}
}
}
},
{
"type": "ExpressionStatement",
- "start": 9206,
- "end": 9293,
+ "start": 8860,
+ "end": 8921,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
- "column": 95
+ "line": 183,
+ "column": 69
}
},
"expression": {
"type": "AssignmentExpression",
- "start": 9206,
- "end": 9292,
+ "start": 8860,
+ "end": 8920,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
- "column": 94
+ "line": 183,
+ "column": 68
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
- "start": 9206,
- "end": 9227,
+ "start": 8860,
+ "end": 8876,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
- "column": 29
+ "line": 183,
+ "column": 24
}
},
"object": {
"type": "MemberExpression",
- "start": 9206,
- "end": 9225,
+ "start": 8860,
+ "end": 8874,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
- "column": 27
+ "line": 183,
+ "column": 22
}
},
"object": {
"type": "ThisExpression",
- "start": 9206,
- "end": 9210,
+ "start": 8860,
+ "end": 8864,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
+ "line": 183,
"column": 12
}
}
},
"property": {
"type": "Identifier",
- "start": 9211,
- "end": 9225,
+ "start": 8865,
+ "end": 8874,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 13
},
"end": {
- "line": 188,
- "column": 27
+ "line": 183,
+ "column": 22
},
- "identifierName": "rawPixelsPoint"
+ "identifierName": "iconPoint"
},
- "name": "rawPixelsPoint"
+ "name": "iconPoint"
},
"computed": false
},
"property": {
"type": "Identifier",
- "start": 9226,
- "end": 9227,
+ "start": 8875,
+ "end": 8876,
"loc": {
"start": {
- "line": 188,
- "column": 28
+ "line": 183,
+ "column": 23
},
"end": {
- "line": 188,
- "column": 29
+ "line": 183,
+ "column": 24
},
"identifierName": "y"
},
@@ -8081,238 +6338,122 @@
},
"right": {
"type": "ConditionalExpression",
- "start": 9230,
- "end": 9292,
+ "start": 8879,
+ "end": 8920,
"loc": {
"start": {
- "line": 188,
- "column": 32
+ "line": 183,
+ "column": 27
},
"end": {
- "line": 188,
- "column": 94
+ "line": 183,
+ "column": 68
}
},
"test": {
- "type": "MemberExpression",
- "start": 9230,
- "end": 9249,
+ "type": "Identifier",
+ "start": 8879,
+ "end": 8891,
"loc": {
"start": {
- "line": 188,
- "column": 32
+ "line": 183,
+ "column": 27
},
"end": {
- "line": 188,
- "column": 51
- }
+ "line": 183,
+ "column": 39
+ },
+ "identifierName": "isNormalized"
},
- "object": {
- "type": "Identifier",
- "start": 9230,
- "end": 9236,
- "loc": {
- "start": {
- "line": 188,
- "column": 32
- },
- "end": {
- "line": 188,
- "column": 38
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 9237,
- "end": 9249,
- "loc": {
- "start": {
- "line": 188,
- "column": 39
- },
- "end": {
- "line": 188,
- "column": 51
- },
- "identifierName": "useRawPixels"
- },
- "name": "useRawPixels"
- },
- "computed": false
+ "name": "isNormalized"
},
"consequent": {
- "type": "MemberExpression",
- "start": 9252,
- "end": 9260,
+ "type": "BinaryExpression",
+ "start": 8894,
+ "end": 8916,
"loc": {
"start": {
- "line": 188,
- "column": 54
+ "line": 183,
+ "column": 42
},
"end": {
- "line": 188,
- "column": 62
+ "line": 183,
+ "column": 64
}
},
- "object": {
- "type": "Identifier",
- "start": 9252,
- "end": 9258,
- "loc": {
- "start": {
- "line": 188,
- "column": 54
- },
- "end": {
- "line": 188,
- "column": 60
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
+ "left": {
"type": "Identifier",
- "start": 9259,
- "end": 9260,
+ "start": 8894,
+ "end": 8895,
"loc": {
"start": {
- "line": 188,
- "column": 61
+ "line": 183,
+ "column": 42
},
"end": {
- "line": 188,
- "column": 62
+ "line": 183,
+ "column": 43
},
"identifierName": "y"
},
"name": "y"
},
- "computed": false
- },
- "alternate": {
- "type": "BinaryExpression",
- "start": 9263,
- "end": 9292,
- "loc": {
- "start": {
- "line": 188,
- "column": 65
- },
- "end": {
- "line": 188,
- "column": 94
- }
- },
- "left": {
- "type": "MemberExpression",
- "start": 9263,
- "end": 9271,
- "loc": {
- "start": {
- "line": 188,
- "column": 65
- },
- "end": {
- "line": 188,
- "column": 73
- }
- },
- "object": {
- "type": "Identifier",
- "start": 9263,
- "end": 9269,
- "loc": {
- "start": {
- "line": 188,
- "column": 65
- },
- "end": {
- "line": 188,
- "column": 71
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 9270,
- "end": 9271,
- "loc": {
- "start": {
- "line": 188,
- "column": 72
- },
- "end": {
- "line": 188,
- "column": 73
- },
- "identifierName": "y"
- },
- "name": "y"
- },
- "computed": false
- },
"operator": "*",
"right": {
"type": "MemberExpression",
- "start": 9274,
- "end": 9292,
+ "start": 8898,
+ "end": 8916,
"loc": {
"start": {
- "line": 188,
- "column": 76
+ "line": 183,
+ "column": 46
},
"end": {
- "line": 188,
- "column": 94
+ "line": 183,
+ "column": 64
}
},
"object": {
"type": "MemberExpression",
- "start": 9274,
- "end": 9285,
+ "start": 8898,
+ "end": 8909,
"loc": {
"start": {
- "line": 188,
- "column": 76
+ "line": 183,
+ "column": 46
},
"end": {
- "line": 188,
- "column": 87
+ "line": 183,
+ "column": 57
}
},
"object": {
"type": "ThisExpression",
- "start": 9274,
- "end": 9278,
+ "start": 8898,
+ "end": 8902,
"loc": {
"start": {
- "line": 188,
- "column": 76
+ "line": 183,
+ "column": 46
},
"end": {
- "line": 188,
- "column": 80
+ "line": 183,
+ "column": 50
}
}
},
"property": {
"type": "Identifier",
- "start": 9279,
- "end": 9285,
+ "start": 8903,
+ "end": 8909,
"loc": {
"start": {
- "line": 188,
- "column": 81
+ "line": 183,
+ "column": 51
},
"end": {
- "line": 188,
- "column": 87
+ "line": 183,
+ "column": 57
},
"identifierName": "bounds"
},
@@ -8322,16 +6463,16 @@
},
"property": {
"type": "Identifier",
- "start": 9286,
- "end": 9292,
+ "start": 8910,
+ "end": 8916,
"loc": {
"start": {
- "line": 188,
- "column": 88
+ "line": 183,
+ "column": 58
},
"end": {
- "line": 188,
- "column": 94
+ "line": 183,
+ "column": 64
},
"identifierName": "height"
},
@@ -8339,719 +6480,1136 @@
},
"computed": false
}
+ },
+ "alternate": {
+ "type": "Identifier",
+ "start": 8919,
+ "end": 8920,
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 67
+ },
+ "end": {
+ "line": 183,
+ "column": 68
+ },
+ "identifierName": "y"
+ },
+ "name": "y"
}
}
}
}
],
- "directives": []
+ "directives": [],
+ "trailingComments": null
},
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle\n ",
- "start": 8714,
- "end": 9079,
+ "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 8261,
+ "end": 8712,
"loc": {
"start": {
- "line": 179,
+ "line": 172,
"column": 4
},
"end": {
+ "line": 179,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Updates the bounds of the rectangle this icon point exists inside/outside of.\n * @param pBounds - The bounds to update the rectangle with.\n * @prop {number} pBounds.width - The width of the new rectangle.\n * @prop {number} pBounds.height - The height of the new rectangle.\n ",
+ "start": 8932,
+ "end": 9235,
+ "loc": {
+ "start": {
"line": 185,
+ "column": 4
+ },
+ "end": {
+ "line": 190,
"column": 7
}
}
}
]
- }
- ]
- },
- "leadingComments": [],
- "name": "_",
- "trailingComments": []
- },
- {
- "type": "ExportNamedDeclaration",
- "start": 9303,
- "end": 9324,
- "loc": {
- "start": {
- "line": 192,
- "column": 0
- },
- "end": {
- "line": 192,
- "column": 21
- }
- },
- "declaration": null,
- "specifiers": [
- {
- "type": "ExportSpecifier",
- "start": 9312,
- "end": 9321,
- "loc": {
- "start": {
- "line": 192,
- "column": 9
- },
- "end": {
- "line": 192,
- "column": 18
- }
- },
- "local": {
- "type": "Identifier",
- "start": 9312,
- "end": 9321,
- "loc": {
- "start": {
- "line": 192,
- "column": 9
- },
- "end": {
- "line": 192,
- "column": 18
- },
- "identifierName": "IconPoint"
- },
- "name": "IconPoint"
},
- "exported": {
- "type": "Identifier",
- "start": 9312,
- "end": 9321,
+ {
+ "type": "ClassMethod",
+ "start": 9240,
+ "end": 9384,
"loc": {
"start": {
- "line": 192,
- "column": 9
+ "line": 191,
+ "column": 4
},
"end": {
- "line": 192,
- "column": 18
- },
- "identifierName": "IconPoint"
- },
- "name": "IconPoint"
- }
- }
- ],
- "source": null,
- "trailingComments": [
- {
- "type": "CommentLine",
- "value": "# sourceMappingURL=icon-point.mjs.map",
- "start": 9325,
- "end": 9364,
- "loc": {
- "start": {
- "line": 193,
- "column": 0
- },
- "end": {
- "line": 193,
- "column": 39
- }
- }
- }
- ]
- },
- {
- "type": "ExportNamedDeclaration",
- "start": 9303,
- "end": 9324,
- "loc": {
- "start": {
- "line": 192,
- "column": 0
- },
- "end": {
- "line": 192,
- "column": 21
- }
- },
- "declaration": {
- "type": "ClassDeclaration",
- "start": 1158,
- "end": 9301,
- "loc": {
- "start": {
- "line": 30,
- "column": 0
- },
- "end": {
- "line": 190,
- "column": 1
- }
- },
- "id": {
- "type": "Identifier",
- "start": 1164,
- "end": 1173,
- "loc": {
- "start": {
- "line": 30,
- "column": 6
- },
- "end": {
- "line": 30,
- "column": 15
- },
- "identifierName": "IconPoint"
- },
- "name": "IconPoint",
- "leadingComments": null
- },
- "superClass": null,
- "body": {
- "type": "ClassBody",
- "start": 1174,
- "end": 9301,
- "loc": {
- "start": {
- "line": 30,
- "column": 16
+ "line": 195,
+ "column": 5
+ }
},
- "end": {
- "line": 190,
- "column": 1
- }
- },
- "body": [
- {
- "type": "ClassProperty",
- "start": 1245,
- "end": 1283,
+ "static": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9240,
+ "end": 9252,
"loc": {
"start": {
- "line": 34,
+ "line": 191,
"column": 4
},
"end": {
- "line": 34,
- "column": 42
- }
+ "line": 191,
+ "column": 16
+ },
+ "identifierName": "updateBounds"
},
- "static": true,
- "computed": false,
- "key": {
+ "name": "updateBounds",
+ "leadingComments": null
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
"type": "Identifier",
- "start": 1252,
- "end": 1265,
+ "start": 9253,
+ "end": 9260,
"loc": {
"start": {
- "line": 34,
- "column": 11
+ "line": 191,
+ "column": 17
},
"end": {
- "line": 34,
+ "line": 191,
"column": 24
},
- "identifierName": "defaultOffset"
+ "identifierName": "pBounds"
},
- "name": "defaultOffset"
+ "name": "pBounds"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 9262,
+ "end": 9384,
+ "loc": {
+ "start": {
+ "line": 191,
+ "column": 26
+ },
+ "end": {
+ "line": 195,
+ "column": 5
+ }
},
- "value": {
- "type": "ObjectExpression",
- "start": 1268,
- "end": 1282,
- "loc": {
- "start": {
- "line": 34,
- "column": 27
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 9272,
+ "end": 9306,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 8
+ },
+ "end": {
+ "line": 192,
+ "column": 42
+ }
},
- "end": {
- "line": 34,
- "column": 41
- }
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9278,
+ "end": 9305,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 14
+ },
+ "end": {
+ "line": 192,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 9278,
+ "end": 9295,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 14
+ },
+ "end": {
+ "line": 192,
+ "column": 31
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 9280,
+ "end": 9285,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 16
+ },
+ "end": {
+ "line": 192,
+ "column": 21
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9280,
+ "end": 9285,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 16
+ },
+ "end": {
+ "line": 192,
+ "column": 21
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 9280,
+ "end": 9285,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 16
+ },
+ "end": {
+ "line": 192,
+ "column": 21
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ },
+ "extra": {
+ "shorthand": true
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 9287,
+ "end": 9293,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 23
+ },
+ "end": {
+ "line": 192,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9287,
+ "end": 9293,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 23
+ },
+ "end": {
+ "line": 192,
+ "column": 29
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 9287,
+ "end": 9293,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 23
+ },
+ "end": {
+ "line": 192,
+ "column": 29
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
+ },
+ "extra": {
+ "shorthand": true
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 9298,
+ "end": 9305,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 34
+ },
+ "end": {
+ "line": 192,
+ "column": 41
+ },
+ "identifierName": "pBounds"
+ },
+ "name": "pBounds"
+ }
+ }
+ ],
+ "kind": "const"
},
- "properties": [
- {
- "type": "ObjectProperty",
- "start": 1270,
- "end": 1274,
+ {
+ "type": "ExpressionStatement",
+ "start": 9315,
+ "end": 9341,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 9315,
+ "end": 9340,
"loc": {
"start": {
- "line": 34,
- "column": 29
+ "line": 193,
+ "column": 8
},
"end": {
- "line": 34,
+ "line": 193,
"column": 33
}
},
- "method": false,
- "shorthand": false,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 1270,
- "end": 1271,
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 9315,
+ "end": 9332,
"loc": {
"start": {
- "line": 34,
- "column": 29
+ "line": 193,
+ "column": 8
},
"end": {
- "line": 34,
- "column": 30
+ "line": 193,
+ "column": 25
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 9315,
+ "end": 9326,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 19
+ }
},
- "identifierName": "x"
+ "object": {
+ "type": "ThisExpression",
+ "start": 9315,
+ "end": 9319,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9320,
+ "end": 9326,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 13
+ },
+ "end": {
+ "line": 193,
+ "column": 19
+ },
+ "identifierName": "bounds"
+ },
+ "name": "bounds"
+ },
+ "computed": false
},
- "name": "x"
+ "property": {
+ "type": "Identifier",
+ "start": 9327,
+ "end": 9332,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 20
+ },
+ "end": {
+ "line": 193,
+ "column": 25
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ },
+ "computed": false
},
- "value": {
- "type": "NumericLiteral",
- "start": 1273,
- "end": 1274,
+ "right": {
+ "type": "Identifier",
+ "start": 9335,
+ "end": 9340,
"loc": {
"start": {
- "line": 34,
- "column": 32
+ "line": 193,
+ "column": 28
},
"end": {
- "line": 34,
+ "line": 193,
"column": 33
- }
- },
- "extra": {
- "rawValue": 0,
- "raw": "0"
+ },
+ "identifierName": "width"
},
- "value": 0
+ "name": "width"
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 9350,
+ "end": 9378,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 8
+ },
+ "end": {
+ "line": 194,
+ "column": 36
}
},
- {
- "type": "ObjectProperty",
- "start": 1276,
- "end": 1280,
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 9350,
+ "end": 9377,
"loc": {
"start": {
- "line": 34,
- "column": 35
+ "line": 194,
+ "column": 8
},
"end": {
- "line": 34,
- "column": 39
+ "line": 194,
+ "column": 35
}
},
- "method": false,
- "shorthand": false,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 1276,
- "end": 1277,
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 9350,
+ "end": 9368,
"loc": {
"start": {
- "line": 34,
- "column": 35
+ "line": 194,
+ "column": 8
},
"end": {
- "line": 34,
- "column": 36
+ "line": 194,
+ "column": 26
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 9350,
+ "end": 9361,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 8
+ },
+ "end": {
+ "line": 194,
+ "column": 19
+ }
},
- "identifierName": "y"
+ "object": {
+ "type": "ThisExpression",
+ "start": 9350,
+ "end": 9354,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 8
+ },
+ "end": {
+ "line": 194,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9355,
+ "end": 9361,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 13
+ },
+ "end": {
+ "line": 194,
+ "column": 19
+ },
+ "identifierName": "bounds"
+ },
+ "name": "bounds"
+ },
+ "computed": false
},
- "name": "y"
+ "property": {
+ "type": "Identifier",
+ "start": 9362,
+ "end": 9368,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 20
+ },
+ "end": {
+ "line": 194,
+ "column": 26
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
+ },
+ "computed": false
},
- "value": {
- "type": "NumericLiteral",
- "start": 1279,
- "end": 1280,
+ "right": {
+ "type": "Identifier",
+ "start": 9371,
+ "end": 9377,
"loc": {
"start": {
- "line": 34,
- "column": 38
+ "line": 194,
+ "column": 29
},
"end": {
- "line": 34,
- "column": 39
- }
- },
- "extra": {
- "rawValue": 0,
- "raw": "0"
+ "line": 194,
+ "column": 35
+ },
+ "identifierName": "height"
},
- "value": 0
- }
- }
- ]
- },
- "leadingComments": [
- {
- "type": "CommentBlock",
- "value": "*\n * Static offset to use when none is passed.\n ",
- "start": 1180,
- "end": 1240,
- "loc": {
- "start": {
- "line": 31,
- "column": 4
- },
- "end": {
- "line": 33,
- "column": 7
+ "name": "height"
}
}
}
],
- "trailingComments": [
- {
- "type": "CommentBlock",
- "value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
- "start": 1288,
- "end": 1411,
- "loc": {
- "start": {
- "line": 35,
- "column": 4
- },
- "end": {
- "line": 37,
- "column": 7
- }
+ "directives": [],
+ "trailingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Updates the bounds of the rectangle this icon point exists inside/outside of.\n * @param pBounds - The bounds to update the rectangle with.\n * @prop {number} pBounds.width - The width of the new rectangle.\n * @prop {number} pBounds.height - The height of the new rectangle.\n ",
+ "start": 8932,
+ "end": 9235,
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 4
+ },
+ "end": {
+ "line": 190,
+ "column": 7
}
}
- ]
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Changes the icon point position.\n * @param pPoint - The point to update this icon point with.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 9389,
+ "end": 9774,
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 4
+ },
+ "end": {
+ "line": 202,
+ "column": 7
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ClassMethod",
+ "start": 9779,
+ "end": 9837,
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 4
+ },
+ "end": {
+ "line": 205,
+ "column": 5
+ }
},
- {
- "type": "ClassProperty",
- "start": 1416,
- "end": 1458,
+ "static": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9779,
+ "end": 9790,
"loc": {
"start": {
- "line": 38,
+ "line": 203,
"column": 4
},
"end": {
- "line": 38,
- "column": 46
- }
+ "line": 203,
+ "column": 15
+ },
+ "identifierName": "updatePoint"
},
- "static": true,
- "computed": false,
- "key": {
+ "name": "updatePoint",
+ "leadingComments": null
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
"type": "Identifier",
- "start": 1423,
- "end": 1436,
+ "start": 9791,
+ "end": 9797,
"loc": {
"start": {
- "line": 38,
- "column": 11
+ "line": 203,
+ "column": 16
},
"end": {
- "line": 38,
- "column": 24
+ "line": 203,
+ "column": 22
},
- "identifierName": "defaultAnchor"
+ "identifierName": "pPoint"
},
- "name": "defaultAnchor"
+ "name": "pPoint"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 9799,
+ "end": 9837,
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 24
+ },
+ "end": {
+ "line": 205,
+ "column": 5
+ }
},
- "value": {
- "type": "ObjectExpression",
- "start": 1439,
- "end": 1457,
- "loc": {
- "start": {
- "line": 38,
- "column": 27
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 9809,
+ "end": 9831,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 8
+ },
+ "end": {
+ "line": 204,
+ "column": 30
+ }
},
- "end": {
- "line": 38,
- "column": 45
- }
- },
- "properties": [
- {
- "type": "ObjectProperty",
- "start": 1441,
- "end": 1447,
+ "expression": {
+ "type": "CallExpression",
+ "start": 9809,
+ "end": 9830,
"loc": {
"start": {
- "line": 38,
- "column": 29
+ "line": 204,
+ "column": 8
},
"end": {
- "line": 38,
- "column": 35
+ "line": 204,
+ "column": 29
}
},
- "method": false,
- "shorthand": false,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 1441,
- "end": 1442,
+ "callee": {
+ "type": "MemberExpression",
+ "start": 9809,
+ "end": 9822,
"loc": {
"start": {
- "line": 38,
- "column": 29
+ "line": 204,
+ "column": 8
},
"end": {
- "line": 38,
- "column": 30
- },
- "identifierName": "x"
+ "line": 204,
+ "column": 21
+ }
},
- "name": "x"
- },
- "value": {
- "type": "NumericLiteral",
- "start": 1444,
- "end": 1447,
- "loc": {
- "start": {
- "line": 38,
- "column": 32
- },
- "end": {
- "line": 38,
- "column": 35
+ "object": {
+ "type": "ThisExpression",
+ "start": 9809,
+ "end": 9813,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 8
+ },
+ "end": {
+ "line": 204,
+ "column": 12
+ }
}
},
- "extra": {
- "rawValue": 0.5,
- "raw": "0.5"
- },
- "value": 0.5
- }
- },
- {
- "type": "ObjectProperty",
- "start": 1449,
- "end": 1455,
- "loc": {
- "start": {
- "line": 38,
- "column": 37
- },
- "end": {
- "line": 38,
- "column": 43
- }
- },
- "method": false,
- "shorthand": false,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 1449,
- "end": 1450,
- "loc": {
- "start": {
- "line": 38,
- "column": 37
- },
- "end": {
- "line": 38,
- "column": 38
+ "property": {
+ "type": "Identifier",
+ "start": 9814,
+ "end": 9822,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 13
+ },
+ "end": {
+ "line": 204,
+ "column": 21
+ },
+ "identifierName": "setPoint"
},
- "identifierName": "y"
+ "name": "setPoint"
},
- "name": "y"
+ "computed": false
},
- "value": {
- "type": "NumericLiteral",
- "start": 1452,
- "end": 1455,
- "loc": {
- "start": {
- "line": 38,
- "column": 40
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 9823,
+ "end": 9829,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 22
+ },
+ "end": {
+ "line": 204,
+ "column": 28
+ },
+ "identifierName": "pPoint"
},
- "end": {
- "line": 38,
- "column": 43
- }
- },
- "extra": {
- "rawValue": 0.5,
- "raw": "0.5"
- },
- "value": 0.5
- }
- }
- ]
- },
- "leadingComments": [
- {
- "type": "CommentBlock",
- "value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
- "start": 1288,
- "end": 1411,
- "loc": {
- "start": {
- "line": 35,
- "column": 4
- },
- "end": {
- "line": 37,
- "column": 7
- }
+ "name": "pPoint"
+ }
+ ]
}
}
],
- "trailingComments": [
- {
- "type": "CommentBlock",
- "value": "*\n * The version of the module.\n ",
- "start": 1463,
- "end": 1508,
- "loc": {
- "start": {
- "line": 39,
- "column": 4
- },
- "end": {
- "line": 41,
- "column": 7
- }
+ "directives": []
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Changes the icon point position.\n * @param pPoint - The point to update this icon point with.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 9389,
+ "end": 9774,
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 4
+ },
+ "end": {
+ "line": 202,
+ "column": 7
}
}
- ]
+ }
+ ]
+ }
+ ]
+ },
+ "leadingComments": [],
+ "name": "_",
+ "trailingComments": []
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 9841,
+ "end": 9862,
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 0
+ },
+ "end": {
+ "line": 208,
+ "column": 21
+ }
+ },
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 9850,
+ "end": 9859,
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 9
+ },
+ "end": {
+ "line": 208,
+ "column": 18
+ }
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 9850,
+ "end": 9859,
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 9
+ },
+ "end": {
+ "line": 208,
+ "column": 18
+ },
+ "identifierName": "IconPoint"
+ },
+ "name": "IconPoint"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 9850,
+ "end": 9859,
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 9
+ },
+ "end": {
+ "line": 208,
+ "column": 18
+ },
+ "identifierName": "IconPoint"
+ },
+ "name": "IconPoint"
+ }
+ }
+ ],
+ "source": null,
+ "trailingComments": [
+ {
+ "type": "CommentLine",
+ "value": "# sourceMappingURL=icon-point.mjs.map",
+ "start": 9863,
+ "end": 9902,
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 0
+ },
+ "end": {
+ "line": 209,
+ "column": 39
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 9841,
+ "end": 9862,
+ "loc": {
+ "start": {
+ "line": 208,
+ "column": 0
+ },
+ "end": {
+ "line": 208,
+ "column": 21
+ }
+ },
+ "declaration": {
+ "type": "ClassDeclaration",
+ "start": 1137,
+ "end": 9839,
+ "loc": {
+ "start": {
+ "line": 29,
+ "column": 0
+ },
+ "end": {
+ "line": 206,
+ "column": 1
+ }
+ },
+ "id": {
+ "type": "Identifier",
+ "start": 1143,
+ "end": 1152,
+ "loc": {
+ "start": {
+ "line": 29,
+ "column": 6
+ },
+ "end": {
+ "line": 29,
+ "column": 15
+ },
+ "identifierName": "IconPoint"
+ },
+ "name": "IconPoint",
+ "leadingComments": null
+ },
+ "superClass": null,
+ "body": {
+ "type": "ClassBody",
+ "start": 1153,
+ "end": 9839,
+ "loc": {
+ "start": {
+ "line": 29,
+ "column": 16
},
+ "end": {
+ "line": 206,
+ "column": 1
+ }
+ },
+ "body": [
{
"type": "ClassProperty",
- "start": 1513,
- "end": 1531,
+ "start": 1224,
+ "end": 1262,
"loc": {
"start": {
- "line": 42,
+ "line": 33,
"column": 4
},
"end": {
- "line": 42,
- "column": 22
+ "line": 33,
+ "column": 42
}
},
- "static": false,
+ "static": true,
"computed": false,
"key": {
"type": "Identifier",
- "start": 1513,
- "end": 1520,
+ "start": 1231,
+ "end": 1244,
"loc": {
"start": {
- "line": 42,
- "column": 4
+ "line": 33,
+ "column": 11
},
"end": {
- "line": 42,
- "column": 11
+ "line": 33,
+ "column": 24
},
- "identifierName": "version"
+ "identifierName": "defaultOffset"
},
- "name": "version",
- "leadingComments": null
+ "name": "defaultOffset"
},
"value": {
- "type": "StringLiteral",
- "start": 1523,
- "end": 1530,
+ "type": "ObjectExpression",
+ "start": 1247,
+ "end": 1261,
"loc": {
"start": {
- "line": 42,
- "column": 14
+ "line": 33,
+ "column": 27
},
"end": {
- "line": 42,
- "column": 21
+ "line": 33,
+ "column": 41
}
},
- "extra": {
- "rawValue": "1.0.0",
- "raw": "\"1.0.0\""
- },
- "value": "1.0.0"
- },
- "leadingComments": [
- {
- "type": "CommentBlock",
- "value": "*\n * The version of the module.\n ",
- "start": 1463,
- "end": 1508,
- "loc": {
- "start": {
- "line": 39,
- "column": 4
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 1249,
+ "end": 1253,
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 29
+ },
+ "end": {
+ "line": 33,
+ "column": 33
+ }
},
- "end": {
- "line": 41,
- "column": 7
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 1249,
+ "end": 1250,
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 29
+ },
+ "end": {
+ "line": 33,
+ "column": 30
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
+ },
+ "value": {
+ "type": "NumericLiteral",
+ "start": 1252,
+ "end": 1253,
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 32
+ },
+ "end": {
+ "line": 33,
+ "column": 33
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
- }
- }
- ],
- "trailingComments": [
- {
- "type": "CommentBlock",
- "value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
- "start": 1536,
- "end": 1641,
- "loc": {
- "start": {
- "line": 43,
- "column": 4
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 1255,
+ "end": 1259,
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 35
+ },
+ "end": {
+ "line": 33,
+ "column": 39
+ }
},
- "end": {
- "line": 46,
- "column": 7
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 1255,
+ "end": 1256,
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 35
+ },
+ "end": {
+ "line": 33,
+ "column": 36
+ },
+ "identifierName": "y"
+ },
+ "name": "y"
+ },
+ "value": {
+ "type": "NumericLiteral",
+ "start": 1258,
+ "end": 1259,
+ "loc": {
+ "start": {
+ "line": 33,
+ "column": 38
+ },
+ "end": {
+ "line": 33,
+ "column": 39
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
}
}
- }
- ]
- },
- {
- "type": "ClassProperty",
- "start": 1646,
- "end": 1653,
- "loc": {
- "start": {
- "line": 47,
- "column": 4
- },
- "end": {
- "line": 47,
- "column": 11
- }
- },
- "static": false,
- "computed": false,
- "key": {
- "type": "Identifier",
- "start": 1646,
- "end": 1652,
- "loc": {
- "start": {
- "line": 47,
- "column": 4
- },
- "end": {
- "line": 47,
- "column": 10
- },
- "identifierName": "logger"
- },
- "name": "logger",
- "leadingComments": null
+ ]
},
- "value": null,
"leadingComments": [
{
"type": "CommentBlock",
- "value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
- "start": 1536,
- "end": 1641,
+ "value": "*\n * Static offset to use when none is passed.\n ",
+ "start": 1159,
+ "end": 1219,
"loc": {
"start": {
- "line": 43,
+ "line": 30,
"column": 4
},
"end": {
- "line": 46,
+ "line": 32,
"column": 7
}
}
@@ -9060,16 +7618,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the raw pixel position\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
- "start": 1658,
- "end": 1894,
+ "value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
+ "start": 1267,
+ "end": 1390,
"loc": {
"start": {
- "line": 48,
+ "line": 34,
"column": 4
},
"end": {
- "line": 54,
+ "line": 36,
"column": 7
}
}
@@ -9078,65 +7636,64 @@
},
{
"type": "ClassProperty",
- "start": 1899,
- "end": 1931,
+ "start": 1395,
+ "end": 1437,
"loc": {
"start": {
- "line": 55,
+ "line": 37,
"column": 4
},
"end": {
- "line": 55,
- "column": 36
+ "line": 37,
+ "column": 46
}
},
- "static": false,
+ "static": true,
"computed": false,
"key": {
"type": "Identifier",
- "start": 1899,
- "end": 1913,
+ "start": 1402,
+ "end": 1415,
"loc": {
"start": {
- "line": 55,
- "column": 4
+ "line": 37,
+ "column": 11
},
"end": {
- "line": 55,
- "column": 18
+ "line": 37,
+ "column": 24
},
- "identifierName": "rawPixelsPoint"
+ "identifierName": "defaultAnchor"
},
- "name": "rawPixelsPoint",
- "leadingComments": null
+ "name": "defaultAnchor"
},
"value": {
"type": "ObjectExpression",
- "start": 1916,
- "end": 1930,
+ "start": 1418,
+ "end": 1436,
"loc": {
"start": {
- "line": 55,
- "column": 21
+ "line": 37,
+ "column": 27
},
"end": {
- "line": 55,
- "column": 35
+ "line": 37,
+ "column": 45
}
},
"properties": [
{
"type": "ObjectProperty",
- "start": 1918,
- "end": 1922,
+ "start": 1420,
+ "end": 1426,
"loc": {
"start": {
- "line": 55,
- "column": 23
+ "line": 37,
+ "column": 29
},
"end": {
- "line": 55,
- "column": 27
+ "line": 37,
+ "column": 35
}
},
"method": false,
@@ -9144,16 +7701,16 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1918,
- "end": 1919,
+ "start": 1420,
+ "end": 1421,
"loc": {
"start": {
- "line": 55,
- "column": 23
+ "line": 37,
+ "column": 29
},
"end": {
- "line": 55,
- "column": 24
+ "line": 37,
+ "column": 30
},
"identifierName": "x"
},
@@ -9161,37 +7718,37 @@
},
"value": {
"type": "NumericLiteral",
- "start": 1921,
- "end": 1922,
+ "start": 1423,
+ "end": 1426,
"loc": {
"start": {
- "line": 55,
- "column": 26
+ "line": 37,
+ "column": 32
},
"end": {
- "line": 55,
- "column": 27
+ "line": 37,
+ "column": 35
}
},
"extra": {
- "rawValue": 0,
- "raw": "0"
+ "rawValue": 0.5,
+ "raw": "0.5"
},
- "value": 0
+ "value": 0.5
}
},
{
"type": "ObjectProperty",
- "start": 1924,
- "end": 1928,
+ "start": 1428,
+ "end": 1434,
"loc": {
"start": {
- "line": 55,
- "column": 29
+ "line": 37,
+ "column": 37
},
"end": {
- "line": 55,
- "column": 33
+ "line": 37,
+ "column": 43
}
},
"method": false,
@@ -9199,16 +7756,16 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 1924,
- "end": 1925,
+ "start": 1428,
+ "end": 1429,
"loc": {
"start": {
- "line": 55,
- "column": 29
+ "line": 37,
+ "column": 37
},
"end": {
- "line": 55,
- "column": 30
+ "line": 37,
+ "column": 38
},
"identifierName": "y"
},
@@ -9216,23 +7773,23 @@
},
"value": {
"type": "NumericLiteral",
- "start": 1927,
- "end": 1928,
+ "start": 1431,
+ "end": 1434,
"loc": {
"start": {
- "line": 55,
- "column": 32
+ "line": 37,
+ "column": 40
},
"end": {
- "line": 55,
- "column": 33
+ "line": 37,
+ "column": 43
}
},
"extra": {
- "rawValue": 0,
- "raw": "0"
+ "rawValue": 0.5,
+ "raw": "0.5"
},
- "value": 0
+ "value": 0.5
}
}
]
@@ -9240,16 +7797,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the raw pixel position\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
- "start": 1658,
- "end": 1894,
+ "value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
+ "start": 1267,
+ "end": 1390,
"loc": {
"start": {
- "line": 48,
+ "line": 34,
"column": 4
},
"end": {
- "line": 54,
+ "line": 36,
"column": 7
}
}
@@ -9258,16 +7815,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the position of the rectangle\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 1936,
- "end": 2165,
+ "value": "*\n * The version of the module.\n ",
+ "start": 1442,
+ "end": 1487,
"loc": {
"start": {
- "line": 56,
+ "line": 38,
"column": 4
},
"end": {
- "line": 62,
+ "line": 40,
"column": 7
}
}
@@ -9276,66 +7833,71 @@
},
{
"type": "ClassProperty",
- "start": 2170,
- "end": 2193,
+ "start": 1492,
+ "end": 1510,
"loc": {
"start": {
- "line": 63,
+ "line": 41,
"column": 4
},
"end": {
- "line": 63,
- "column": 27
+ "line": 41,
+ "column": 22
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
- "start": 2170,
- "end": 2185,
+ "start": 1492,
+ "end": 1499,
"loc": {
"start": {
- "line": 63,
+ "line": 41,
"column": 4
},
"end": {
- "line": 63,
- "column": 19
+ "line": 41,
+ "column": 11
},
- "identifierName": "positionalPoint"
+ "identifierName": "version"
},
- "name": "positionalPoint",
+ "name": "version",
"leadingComments": null
},
"value": {
- "type": "NullLiteral",
- "start": 2188,
- "end": 2192,
+ "type": "StringLiteral",
+ "start": 1502,
+ "end": 1509,
"loc": {
"start": {
- "line": 63,
- "column": 22
+ "line": 41,
+ "column": 14
},
"end": {
- "line": 63,
- "column": 26
+ "line": 41,
+ "column": 21
}
- }
+ },
+ "extra": {
+ "rawValue": "1.0.0",
+ "raw": "\"1.0.0\""
+ },
+ "value": "1.0.0"
},
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the position of the rectangle\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 1936,
- "end": 2165,
+ "value": "*\n * The version of the module.\n ",
+ "start": 1442,
+ "end": 1487,
"loc": {
"start": {
- "line": 56,
+ "line": 38,
"column": 4
},
"end": {
- "line": 62,
+ "line": 40,
"column": 7
}
}
@@ -9344,16 +7906,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 2198,
- "end": 2452,
+ "value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
+ "start": 1515,
+ "end": 1620,
"loc": {
"start": {
- "line": 64,
+ "line": 42,
"column": 4
},
"end": {
- "line": 70,
+ "line": 45,
"column": 7
}
}
@@ -9362,64 +7924,406 @@
},
{
"type": "ClassProperty",
- "start": 2457,
- "end": 2480,
+ "start": 1625,
+ "end": 1632,
"loc": {
"start": {
- "line": 71,
+ "line": 46,
"column": 4
},
"end": {
- "line": 71,
- "column": 27
+ "line": 46,
+ "column": 11
}
},
"static": false,
"computed": false,
"key": {
"type": "Identifier",
- "start": 2457,
- "end": 2462,
+ "start": 1625,
+ "end": 1631,
"loc": {
"start": {
- "line": 71,
+ "line": 46,
"column": 4
},
"end": {
- "line": 71,
- "column": 9
+ "line": 46,
+ "column": 10
},
- "identifierName": "point"
+ "identifierName": "logger"
},
- "name": "point",
+ "name": "logger",
"leadingComments": null
},
- "value": {
- "type": "ObjectExpression",
- "start": 2465,
- "end": 2479,
- "loc": {
- "start": {
- "line": 71,
- "column": 12
- },
- "end": {
- "line": 71,
- "column": 26
+ "value": null,
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
+ "start": 1515,
+ "end": 1620,
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 4
+ },
+ "end": {
+ "line": 45,
+ "column": 7
+ }
}
- },
- "properties": [
- {
- "type": "ObjectProperty",
- "start": 2467,
- "end": 2471,
- "loc": {
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the position of the point that was set. This is the point on the rectangle.\n * It can be changed at runtime.\n * ________\n * | |\n * | x |\n * | |\n * |_______|\n * @private\n * @type {Point}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
+ "start": 1637,
+ "end": 2043,
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 4
+ },
+ "end": {
+ "line": 59,
+ "column": 7
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ClassProperty",
+ "start": 2048,
+ "end": 2075,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 4
+ },
+ "end": {
+ "line": 60,
+ "column": 31
+ }
+ },
+ "static": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 2048,
+ "end": 2057,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 4
+ },
+ "end": {
+ "line": 60,
+ "column": 13
+ },
+ "identifierName": "iconPoint"
+ },
+ "name": "iconPoint",
+ "leadingComments": null
+ },
+ "value": {
+ "type": "ObjectExpression",
+ "start": 2060,
+ "end": 2074,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 16
+ },
+ "end": {
+ "line": 60,
+ "column": 30
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 2062,
+ "end": 2066,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 18
+ },
+ "end": {
+ "line": 60,
+ "column": 22
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 2062,
+ "end": 2063,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 18
+ },
+ "end": {
+ "line": 60,
+ "column": 19
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
+ },
+ "value": {
+ "type": "NumericLiteral",
+ "start": 2065,
+ "end": 2066,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 21
+ },
+ "end": {
+ "line": 60,
+ "column": 22
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 2068,
+ "end": 2072,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 24
+ },
+ "end": {
+ "line": 60,
+ "column": 28
+ }
+ },
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 2068,
+ "end": 2069,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 24
+ },
+ "end": {
+ "line": 60,
+ "column": 25
+ },
+ "identifierName": "y"
+ },
+ "name": "y"
+ },
+ "value": {
+ "type": "NumericLiteral",
+ "start": 2071,
+ "end": 2072,
+ "loc": {
+ "start": {
+ "line": 60,
+ "column": 27
+ },
+ "end": {
+ "line": 60,
+ "column": 28
+ }
+ },
+ "extra": {
+ "rawValue": 0,
+ "raw": "0"
+ },
+ "value": 0
+ }
+ }
+ ]
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the position of the point that was set. This is the point on the rectangle.\n * It can be changed at runtime.\n * ________\n * | |\n * | x |\n * | |\n * |_______|\n * @private\n * @type {Point}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
+ "start": 1637,
+ "end": 2043,
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 4
+ },
+ "end": {
+ "line": 59,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the position of the rectangle.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the rectangle.\n * @prop {number} y - The y position of the rectangle.\n ",
+ "start": 2080,
+ "end": 2302,
+ "loc": {
+ "start": {
+ "line": 61,
+ "column": 4
+ },
+ "end": {
+ "line": 67,
+ "column": 7
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ClassProperty",
+ "start": 2307,
+ "end": 2323,
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 4
+ },
+ "end": {
+ "line": 68,
+ "column": 20
+ }
+ },
+ "static": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 2307,
+ "end": 2322,
+ "loc": {
+ "start": {
+ "line": 68,
+ "column": 4
+ },
+ "end": {
+ "line": 68,
+ "column": 19
+ },
+ "identifierName": "positionalPoint"
+ },
+ "name": "positionalPoint",
+ "leadingComments": null
+ },
+ "value": null,
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the position of the rectangle.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the rectangle.\n * @prop {number} y - The y position of the rectangle.\n ",
+ "start": 2080,
+ "end": 2302,
+ "loc": {
+ "start": {
+ "line": 61,
+ "column": 4
+ },
+ "end": {
+ "line": 67,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the point after rotation is applied.\n * @prop {number} y - The y position of the point after rotation is applied.\n ",
+ "start": 2328,
+ "end": 2618,
+ "loc": {
+ "start": {
+ "line": 69,
+ "column": 4
+ },
+ "end": {
+ "line": 75,
+ "column": 7
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ClassProperty",
+ "start": 2623,
+ "end": 2646,
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 4
+ },
+ "end": {
+ "line": 76,
+ "column": 27
+ }
+ },
+ "static": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 2623,
+ "end": 2628,
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 4
+ },
+ "end": {
+ "line": 76,
+ "column": 9
+ },
+ "identifierName": "point"
+ },
+ "name": "point",
+ "leadingComments": null
+ },
+ "value": {
+ "type": "ObjectExpression",
+ "start": 2631,
+ "end": 2645,
+ "loc": {
+ "start": {
+ "line": 76,
+ "column": 12
+ },
+ "end": {
+ "line": 76,
+ "column": 26
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 2633,
+ "end": 2637,
+ "loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 14
},
"end": {
- "line": 71,
+ "line": 76,
"column": 18
}
},
@@ -9428,15 +8332,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2467,
- "end": 2468,
+ "start": 2633,
+ "end": 2634,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 14
},
"end": {
- "line": 71,
+ "line": 76,
"column": 15
},
"identifierName": "x"
@@ -9445,15 +8349,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 2470,
- "end": 2471,
+ "start": 2636,
+ "end": 2637,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 17
},
"end": {
- "line": 71,
+ "line": 76,
"column": 18
}
},
@@ -9466,15 +8370,15 @@
},
{
"type": "ObjectProperty",
- "start": 2473,
- "end": 2477,
+ "start": 2639,
+ "end": 2643,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 20
},
"end": {
- "line": 71,
+ "line": 76,
"column": 24
}
},
@@ -9483,15 +8387,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2473,
- "end": 2474,
+ "start": 2639,
+ "end": 2640,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 20
},
"end": {
- "line": 71,
+ "line": 76,
"column": 21
},
"identifierName": "y"
@@ -9500,15 +8404,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 2476,
- "end": 2477,
+ "start": 2642,
+ "end": 2643,
"loc": {
"start": {
- "line": 71,
+ "line": 76,
"column": 23
},
"end": {
- "line": 71,
+ "line": 76,
"column": 24
}
},
@@ -9524,16 +8428,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 2198,
- "end": 2452,
+ "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the point after rotation is applied.\n * @prop {number} y - The y position of the point after rotation is applied.\n ",
+ "start": 2328,
+ "end": 2618,
"loc": {
"start": {
- "line": 64,
+ "line": 69,
"column": 4
},
"end": {
- "line": 70,
+ "line": 75,
"column": 7
}
}
@@ -9542,16 +8446,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle\n * @prop {number} height - The height of the rectangle\n ",
- "start": 2485,
- "end": 2697,
+ "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle.\n * @prop {number} height - The height of the rectangle.\n ",
+ "start": 2651,
+ "end": 2865,
"loc": {
"start": {
- "line": 72,
+ "line": 77,
"column": 4
},
"end": {
- "line": 78,
+ "line": 83,
"column": 7
}
}
@@ -9560,15 +8464,15 @@
},
{
"type": "ClassProperty",
- "start": 2702,
- "end": 2737,
+ "start": 2870,
+ "end": 2905,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 4
},
"end": {
- "line": 79,
+ "line": 84,
"column": 39
}
},
@@ -9576,15 +8480,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2702,
- "end": 2708,
+ "start": 2870,
+ "end": 2876,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 4
},
"end": {
- "line": 79,
+ "line": 84,
"column": 10
},
"identifierName": "bounds"
@@ -9594,30 +8498,30 @@
},
"value": {
"type": "ObjectExpression",
- "start": 2711,
- "end": 2736,
+ "start": 2879,
+ "end": 2904,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 13
},
"end": {
- "line": 79,
+ "line": 84,
"column": 38
}
},
"properties": [
{
"type": "ObjectProperty",
- "start": 2713,
- "end": 2722,
+ "start": 2881,
+ "end": 2890,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 15
},
"end": {
- "line": 79,
+ "line": 84,
"column": 24
}
},
@@ -9626,15 +8530,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2713,
- "end": 2718,
+ "start": 2881,
+ "end": 2886,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 15
},
"end": {
- "line": 79,
+ "line": 84,
"column": 20
},
"identifierName": "width"
@@ -9643,15 +8547,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 2720,
- "end": 2722,
+ "start": 2888,
+ "end": 2890,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 22
},
"end": {
- "line": 79,
+ "line": 84,
"column": 24
}
},
@@ -9664,15 +8568,15 @@
},
{
"type": "ObjectProperty",
- "start": 2724,
- "end": 2734,
+ "start": 2892,
+ "end": 2902,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 26
},
"end": {
- "line": 79,
+ "line": 84,
"column": 36
}
},
@@ -9681,15 +8585,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 2724,
- "end": 2730,
+ "start": 2892,
+ "end": 2898,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 26
},
"end": {
- "line": 79,
+ "line": 84,
"column": 32
},
"identifierName": "height"
@@ -9698,15 +8602,15 @@
},
"value": {
"type": "NumericLiteral",
- "start": 2732,
- "end": 2734,
+ "start": 2900,
+ "end": 2902,
"loc": {
"start": {
- "line": 79,
+ "line": 84,
"column": 34
},
"end": {
- "line": 79,
+ "line": 84,
"column": 36
}
},
@@ -9722,16 +8626,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle\n * @prop {number} height - The height of the rectangle\n ",
- "start": 2485,
- "end": 2697,
+ "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle.\n * @prop {number} height - The height of the rectangle.\n ",
+ "start": 2651,
+ "end": 2865,
"loc": {
"start": {
- "line": 72,
+ "line": 77,
"column": 4
},
"end": {
- "line": 78,
+ "line": 83,
"column": 7
}
}
@@ -9740,16 +8644,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of\n * @prop {number} pPoint.x - The x coordinate of the rectangle\n * @prop {number} pPoint.y - The y coordinate of the rectangle\n * @param {Bounds} pBounds - The size of the rectangle\n * @prop {number} pBounds.width - The width of the rectangle\n * @prop {number} pBounds.height - The height of the rectangle\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle\n * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range\n ",
- "start": 2742,
- "end": 3649,
+ "value": "*\n * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.\n * @prop {number} pPoint.x - The x coordinate of the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the rectangle.\n * @param {Bounds} pBounds - The size of the rectangle.\n * @prop {number} pBounds.width - The width of the rectangle.\n * @prop {number} pBounds.height - The height of the rectangle.\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.\n *\n * ## Normalized\n If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`\n The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.\n ",
+ "start": 2910,
+ "end": 4086,
"loc": {
"start": {
- "line": 80,
+ "line": 85,
"column": 4
},
"end": {
- "line": 91,
+ "line": 100,
"column": 7
}
}
@@ -9758,15 +8662,15 @@
},
{
"type": "ClassMethod",
- "start": 3654,
- "end": 5017,
+ "start": 4091,
+ "end": 4425,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 4
},
"end": {
- "line": 117,
+ "line": 109,
"column": 5
}
},
@@ -9774,15 +8678,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 3654,
- "end": 3665,
+ "start": 4091,
+ "end": 4102,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 4
},
"end": {
- "line": 92,
+ "line": 101,
"column": 15
},
"identifierName": "constructor"
@@ -9798,15 +8702,15 @@
"params": [
{
"type": "Identifier",
- "start": 3666,
- "end": 3672,
+ "start": 4103,
+ "end": 4109,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 16
},
"end": {
- "line": 92,
+ "line": 101,
"column": 22
},
"identifierName": "pPoint"
@@ -9815,15 +8719,15 @@
},
{
"type": "Identifier",
- "start": 3674,
- "end": 3681,
+ "start": 4111,
+ "end": 4118,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 24
},
"end": {
- "line": 92,
+ "line": 101,
"column": 31
},
"identifierName": "pBounds"
@@ -9832,15 +8736,15 @@
},
{
"type": "Identifier",
- "start": 3683,
- "end": 3693,
+ "start": 4120,
+ "end": 4130,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 33
},
"end": {
- "line": 92,
+ "line": 101,
"column": 43
},
"identifierName": "pIconPoint"
@@ -9850,1514 +8754,487 @@
],
"body": {
"type": "BlockStatement",
- "start": 3695,
- "end": 5017,
+ "start": 4132,
+ "end": 4425,
"loc": {
"start": {
- "line": 92,
+ "line": 101,
"column": 45
},
"end": {
- "line": 117,
+ "line": 109,
"column": 5
}
},
"body": [
{
- "type": "IfStatement",
- "start": 3755,
- "end": 4401,
+ "type": "VariableDeclaration",
+ "start": 4142,
+ "end": 4176,
"loc": {
"start": {
- "line": 94,
+ "line": 102,
"column": 8
},
"end": {
- "line": 104,
- "column": 9
+ "line": 102,
+ "column": 42
}
},
- "test": {
- "type": "LogicalExpression",
- "start": 3759,
- "end": 3850,
- "loc": {
- "start": {
- "line": 94,
- "column": 12
- },
- "end": {
- "line": 94,
- "column": 103
- }
- },
- "left": {
- "type": "LogicalExpression",
- "start": 3759,
- "end": 3816,
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 4148,
+ "end": 4175,
"loc": {
"start": {
- "line": 94,
- "column": 12
+ "line": 102,
+ "column": 14
},
"end": {
- "line": 94,
- "column": 69
+ "line": 102,
+ "column": 41
}
},
- "left": {
- "type": "BinaryExpression",
- "start": 3759,
- "end": 3785,
+ "id": {
+ "type": "ObjectPattern",
+ "start": 4148,
+ "end": 4165,
"loc": {
"start": {
- "line": 94,
- "column": 12
+ "line": 102,
+ "column": 14
},
"end": {
- "line": 94,
- "column": 38
+ "line": 102,
+ "column": 31
}
},
- "left": {
- "type": "UnaryExpression",
- "start": 3759,
- "end": 3772,
- "loc": {
- "start": {
- "line": 94,
- "column": 12
- },
- "end": {
- "line": 94,
- "column": 25
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "Identifier",
- "start": 3766,
- "end": 3772,
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 4150,
+ "end": 4155,
"loc": {
"start": {
- "line": 94,
- "column": 19
+ "line": 102,
+ "column": 16
},
"end": {
- "line": 94,
- "column": 25
- },
- "identifierName": "pPoint"
+ "line": 102,
+ "column": 21
+ }
},
- "name": "pPoint",
- "leadingComments": null
- },
- "extra": {
- "parenthesizedArgument": false
- },
- "leadingComments": null
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 3777,
- "end": 3785,
- "loc": {
- "start": {
- "line": 94,
- "column": 30
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4150,
+ "end": 4155,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 16
+ },
+ "end": {
+ "line": 102,
+ "column": 21
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
},
- "end": {
- "line": 94,
- "column": 38
- }
- },
- "extra": {
- "rawValue": "object",
- "raw": "'object'"
- },
- "value": "object"
- },
- "leadingComments": null
- },
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 3789,
- "end": 3816,
- "loc": {
- "start": {
- "line": 94,
- "column": 42
- },
- "end": {
- "line": 94,
- "column": 69
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 3789,
- "end": 3803,
- "loc": {
- "start": {
- "line": 94,
- "column": 42
+ "value": {
+ "type": "Identifier",
+ "start": 4150,
+ "end": 4155,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 16
+ },
+ "end": {
+ "line": 102,
+ "column": 21
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
},
- "end": {
- "line": 94,
- "column": 56
+ "extra": {
+ "shorthand": true
}
},
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "Identifier",
- "start": 3796,
- "end": 3803,
+ {
+ "type": "ObjectProperty",
+ "start": 4157,
+ "end": 4163,
"loc": {
"start": {
- "line": 94,
- "column": 49
+ "line": 102,
+ "column": 23
},
"end": {
- "line": 94,
- "column": 56
+ "line": 102,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 4157,
+ "end": 4163,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 23
+ },
+ "end": {
+ "line": 102,
+ "column": 29
+ },
+ "identifierName": "height"
},
- "identifierName": "pBounds"
+ "name": "height"
},
- "name": "pBounds"
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 3808,
- "end": 3816,
- "loc": {
- "start": {
- "line": 94,
- "column": 61
+ "value": {
+ "type": "Identifier",
+ "start": 4157,
+ "end": 4163,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 23
+ },
+ "end": {
+ "line": 102,
+ "column": 29
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
},
- "end": {
- "line": 94,
- "column": 69
+ "extra": {
+ "shorthand": true
}
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 4168,
+ "end": 4175,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 34
},
- "extra": {
- "rawValue": "object",
- "raw": "'object'"
+ "end": {
+ "line": 102,
+ "column": 41
},
- "value": "object"
- }
+ "identifierName": "pBounds"
+ },
+ "name": "pBounds"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4185,
+ "end": 4211,
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
+ },
+ "end": {
+ "line": 103,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 4185,
+ "end": 4210,
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 8
},
- "leadingComments": null
+ "end": {
+ "line": 103,
+ "column": 33
+ }
},
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 3820,
- "end": 3850,
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 4185,
+ "end": 4202,
"loc": {
"start": {
- "line": 94,
- "column": 73
+ "line": 103,
+ "column": 8
},
"end": {
- "line": 94,
- "column": 103
+ "line": 103,
+ "column": 25
}
},
- "left": {
+ "object": {
"type": "MemberExpression",
- "start": 3820,
- "end": 3839,
+ "start": 4185,
+ "end": 4196,
"loc": {
"start": {
- "line": 94,
- "column": 73
+ "line": 103,
+ "column": 8
},
"end": {
- "line": 94,
- "column": 92
+ "line": 103,
+ "column": 19
}
},
"object": {
- "type": "Identifier",
- "start": 3820,
- "end": 3827,
+ "type": "ThisExpression",
+ "start": 4185,
+ "end": 4189,
"loc": {
"start": {
- "line": 94,
- "column": 73
+ "line": 103,
+ "column": 8
},
"end": {
- "line": 94,
- "column": 80
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
+ "line": 103,
+ "column": 12
+ }
+ }
},
"property": {
"type": "Identifier",
- "start": 3828,
- "end": 3839,
+ "start": 4190,
+ "end": 4196,
"loc": {
"start": {
- "line": 94,
- "column": 81
+ "line": 103,
+ "column": 13
},
"end": {
- "line": 94,
- "column": 92
+ "line": 103,
+ "column": 19
},
- "identifierName": "constructor"
+ "identifierName": "bounds"
},
- "name": "constructor"
+ "name": "bounds"
},
"computed": false
},
- "operator": "===",
- "right": {
+ "property": {
"type": "Identifier",
- "start": 3844,
- "end": 3850,
+ "start": 4197,
+ "end": 4202,
"loc": {
"start": {
- "line": 94,
- "column": 97
+ "line": 103,
+ "column": 20
},
"end": {
- "line": 94,
- "column": 103
+ "line": 103,
+ "column": 25
},
- "identifierName": "Object"
+ "identifierName": "width"
},
- "name": "Object"
- }
+ "name": "width"
+ },
+ "computed": false
},
- "leadingComments": null
+ "right": {
+ "type": "Identifier",
+ "start": 4205,
+ "end": 4210,
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 28
+ },
+ "end": {
+ "line": 103,
+ "column": 33
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4220,
+ "end": 4248,
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 8
+ },
+ "end": {
+ "line": 104,
+ "column": 36
+ }
},
- "consequent": {
- "type": "BlockStatement",
- "start": 3852,
- "end": 4401,
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 4220,
+ "end": 4247,
"loc": {
"start": {
- "line": 94,
- "column": 105
+ "line": 104,
+ "column": 8
},
"end": {
"line": 104,
- "column": 9
+ "column": 35
}
},
- "body": [
- {
- "type": "IfStatement",
- "start": 3944,
- "end": 4391,
- "loc": {
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 4220,
+ "end": 4238,
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 8
+ },
+ "end": {
+ "line": 104,
+ "column": 26
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 4220,
+ "end": 4231,
+ "loc": {
"start": {
- "line": 96,
- "column": 12
+ "line": 104,
+ "column": 8
},
"end": {
- "line": 103,
- "column": 13
+ "line": 104,
+ "column": 19
}
},
- "test": {
- "type": "LogicalExpression",
- "start": 3948,
- "end": 4083,
+ "object": {
+ "type": "ThisExpression",
+ "start": 4220,
+ "end": 4224,
"loc": {
"start": {
- "line": 96,
- "column": 16
+ "line": 104,
+ "column": 8
},
"end": {
- "line": 96,
- "column": 151
- }
- },
- "left": {
- "type": "LogicalExpression",
- "start": 3948,
- "end": 4045,
- "loc": {
- "start": {
- "line": 96,
- "column": 16
- },
- "end": {
- "line": 96,
- "column": 113
- }
- },
- "left": {
- "type": "LogicalExpression",
- "start": 3948,
- "end": 4008,
- "loc": {
- "start": {
- "line": 96,
- "column": 16
- },
- "end": {
- "line": 96,
- "column": 76
- }
- },
- "left": {
- "type": "BinaryExpression",
- "start": 3948,
- "end": 3976,
- "loc": {
- "start": {
- "line": 96,
- "column": 16
- },
- "end": {
- "line": 96,
- "column": 44
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 3948,
- "end": 3963,
- "loc": {
- "start": {
- "line": 96,
- "column": 16
- },
- "end": {
- "line": 96,
- "column": 31
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 3955,
- "end": 3963,
- "loc": {
- "start": {
- "line": 96,
- "column": 23
- },
- "end": {
- "line": 96,
- "column": 31
- }
- },
- "object": {
- "type": "Identifier",
- "start": 3955,
- "end": 3961,
- "loc": {
- "start": {
- "line": 96,
- "column": 23
- },
- "end": {
- "line": 96,
- "column": 29
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint",
- "leadingComments": null
- },
- "property": {
- "type": "Identifier",
- "start": 3962,
- "end": 3963,
- "loc": {
- "start": {
- "line": 96,
- "column": 30
- },
- "end": {
- "line": 96,
- "column": 31
- },
- "identifierName": "x"
- },
- "name": "x"
- },
- "computed": false,
- "leadingComments": null
- },
- "extra": {
- "parenthesizedArgument": false
- },
- "leadingComments": null
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 3968,
- "end": 3976,
- "loc": {
- "start": {
- "line": 96,
- "column": 36
- },
- "end": {
- "line": 96,
- "column": 44
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- },
- "leadingComments": null
- },
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 3980,
- "end": 4008,
- "loc": {
- "start": {
- "line": 96,
- "column": 48
- },
- "end": {
- "line": 96,
- "column": 76
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 3980,
- "end": 3995,
- "loc": {
- "start": {
- "line": 96,
- "column": 48
- },
- "end": {
- "line": 96,
- "column": 63
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 3987,
- "end": 3995,
- "loc": {
- "start": {
- "line": 96,
- "column": 55
- },
- "end": {
- "line": 96,
- "column": 63
- }
- },
- "object": {
- "type": "Identifier",
- "start": 3987,
- "end": 3993,
- "loc": {
- "start": {
- "line": 96,
- "column": 55
- },
- "end": {
- "line": 96,
- "column": 61
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 3994,
- "end": 3995,
- "loc": {
- "start": {
- "line": 96,
- "column": 62
- },
- "end": {
- "line": 96,
- "column": 63
- },
- "identifierName": "y"
- },
- "name": "y"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4000,
- "end": 4008,
- "loc": {
- "start": {
- "line": 96,
- "column": 68
- },
- "end": {
- "line": 96,
- "column": 76
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- }
- },
- "leadingComments": null
- },
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 4012,
- "end": 4045,
- "loc": {
- "start": {
- "line": 96,
- "column": 80
- },
- "end": {
- "line": 96,
- "column": 113
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 4012,
- "end": 4032,
- "loc": {
- "start": {
- "line": 96,
- "column": 80
- },
- "end": {
- "line": 96,
- "column": 100
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 4019,
- "end": 4032,
- "loc": {
- "start": {
- "line": 96,
- "column": 87
- },
- "end": {
- "line": 96,
- "column": 100
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4019,
- "end": 4026,
- "loc": {
- "start": {
- "line": 96,
- "column": 87
- },
- "end": {
- "line": 96,
- "column": 94
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
- },
- "property": {
- "type": "Identifier",
- "start": 4027,
- "end": 4032,
- "loc": {
- "start": {
- "line": 96,
- "column": 95
- },
- "end": {
- "line": 96,
- "column": 100
- },
- "identifierName": "width"
- },
- "name": "width"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4037,
- "end": 4045,
- "loc": {
- "start": {
- "line": 96,
- "column": 105
- },
- "end": {
- "line": 96,
- "column": 113
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- }
- },
- "leadingComments": null
- },
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 4049,
- "end": 4083,
- "loc": {
- "start": {
- "line": 96,
- "column": 117
- },
- "end": {
- "line": 96,
- "column": 151
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 4049,
- "end": 4070,
- "loc": {
- "start": {
- "line": 96,
- "column": 117
- },
- "end": {
- "line": 96,
- "column": 138
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 4056,
- "end": 4070,
- "loc": {
- "start": {
- "line": 96,
- "column": 124
- },
- "end": {
- "line": 96,
- "column": 138
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4056,
- "end": 4063,
- "loc": {
- "start": {
- "line": 96,
- "column": 124
- },
- "end": {
- "line": 96,
- "column": 131
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
- },
- "property": {
- "type": "Identifier",
- "start": 4064,
- "end": 4070,
- "loc": {
- "start": {
- "line": 96,
- "column": 132
- },
- "end": {
- "line": 96,
- "column": 138
- },
- "identifierName": "height"
- },
- "name": "height"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4075,
- "end": 4083,
- "loc": {
- "start": {
- "line": 96,
- "column": 143
- },
- "end": {
- "line": 96,
- "column": 151
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
+ "line": 104,
+ "column": 12
}
- },
- "leadingComments": null
+ }
},
- "consequent": {
- "type": "BlockStatement",
- "start": 4085,
- "end": 4251,
+ "property": {
+ "type": "Identifier",
+ "start": 4225,
+ "end": 4231,
"loc": {
"start": {
- "line": 96,
- "column": 153
+ "line": 104,
+ "column": 13
},
"end": {
- "line": 100,
- "column": 13
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 4103,
- "end": 4133,
- "loc": {
- "start": {
- "line": 97,
- "column": 16
- },
- "end": {
- "line": 97,
- "column": 46
- }
- },
- "expression": {
- "type": "AssignmentExpression",
- "start": 4103,
- "end": 4132,
- "loc": {
- "start": {
- "line": 97,
- "column": 16
- },
- "end": {
- "line": 97,
- "column": 45
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 4103,
- "end": 4123,
- "loc": {
- "start": {
- "line": 97,
- "column": 16
- },
- "end": {
- "line": 97,
- "column": 36
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4103,
- "end": 4107,
- "loc": {
- "start": {
- "line": 97,
- "column": 16
- },
- "end": {
- "line": 97,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4108,
- "end": 4123,
- "loc": {
- "start": {
- "line": 97,
- "column": 21
- },
- "end": {
- "line": 97,
- "column": 36
- },
- "identifierName": "positionalPoint"
- },
- "name": "positionalPoint"
- },
- "computed": false
- },
- "right": {
- "type": "Identifier",
- "start": 4126,
- "end": 4132,
- "loc": {
- "start": {
- "line": 97,
- "column": 39
- },
- "end": {
- "line": 97,
- "column": 45
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- }
- }
+ "line": 104,
+ "column": 19
},
- {
- "type": "ExpressionStatement",
- "start": 4150,
- "end": 4184,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 50
- }
- },
- "expression": {
- "type": "AssignmentExpression",
- "start": 4150,
- "end": 4183,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 49
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 4150,
- "end": 4167,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 33
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4150,
- "end": 4161,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 27
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4150,
- "end": 4154,
- "loc": {
- "start": {
- "line": 98,
- "column": 16
- },
- "end": {
- "line": 98,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4155,
- "end": 4161,
- "loc": {
- "start": {
- "line": 98,
- "column": 21
- },
- "end": {
- "line": 98,
- "column": 27
- },
- "identifierName": "bounds"
- },
- "name": "bounds"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4162,
- "end": 4167,
- "loc": {
- "start": {
- "line": 98,
- "column": 28
- },
- "end": {
- "line": 98,
- "column": 33
- },
- "identifierName": "width"
- },
- "name": "width"
- },
- "computed": false
- },
- "right": {
- "type": "MemberExpression",
- "start": 4170,
- "end": 4183,
- "loc": {
- "start": {
- "line": 98,
- "column": 36
- },
- "end": {
- "line": 98,
- "column": 49
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4170,
- "end": 4177,
- "loc": {
- "start": {
- "line": 98,
- "column": 36
- },
- "end": {
- "line": 98,
- "column": 43
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
- },
- "property": {
- "type": "Identifier",
- "start": 4178,
- "end": 4183,
- "loc": {
- "start": {
- "line": 98,
- "column": 44
- },
- "end": {
- "line": 98,
- "column": 49
- },
- "identifierName": "width"
- },
- "name": "width"
- },
- "computed": false
- }
- }
- },
- {
- "type": "ExpressionStatement",
- "start": 4201,
- "end": 4237,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 52
- }
- },
- "expression": {
- "type": "AssignmentExpression",
- "start": 4201,
- "end": 4236,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 51
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 4201,
- "end": 4219,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 34
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4201,
- "end": 4212,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 27
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4201,
- "end": 4205,
- "loc": {
- "start": {
- "line": 99,
- "column": 16
- },
- "end": {
- "line": 99,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4206,
- "end": 4212,
- "loc": {
- "start": {
- "line": 99,
- "column": 21
- },
- "end": {
- "line": 99,
- "column": 27
- },
- "identifierName": "bounds"
- },
- "name": "bounds"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4213,
- "end": 4219,
- "loc": {
- "start": {
- "line": 99,
- "column": 28
- },
- "end": {
- "line": 99,
- "column": 34
- },
- "identifierName": "height"
- },
- "name": "height"
- },
- "computed": false
- },
- "right": {
- "type": "MemberExpression",
- "start": 4222,
- "end": 4236,
- "loc": {
- "start": {
- "line": 99,
- "column": 37
- },
- "end": {
- "line": 99,
- "column": 51
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4222,
- "end": 4229,
- "loc": {
- "start": {
- "line": 99,
- "column": 37
- },
- "end": {
- "line": 99,
- "column": 44
- },
- "identifierName": "pBounds"
- },
- "name": "pBounds"
- },
- "property": {
- "type": "Identifier",
- "start": 4230,
- "end": 4236,
- "loc": {
- "start": {
- "line": 99,
- "column": 45
- },
- "end": {
- "line": 99,
- "column": 51
- },
- "identifierName": "height"
- },
- "name": "height"
- },
- "computed": false
- }
- }
- }
- ],
- "directives": []
+ "identifierName": "bounds"
+ },
+ "name": "bounds"
},
- "alternate": {
- "type": "BlockStatement",
- "start": 4269,
- "end": 4391,
- "loc": {
- "start": {
- "line": 101,
- "column": 17
- },
- "end": {
- "line": 103,
- "column": 13
- }
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4232,
+ "end": 4238,
+ "loc": {
+ "start": {
+ "line": 104,
+ "column": 20
},
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 4287,
- "end": 4377,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 106
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 4287,
- "end": 4376,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 105
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4287,
- "end": 4332,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 61
- }
- },
- "object": {
- "type": "CallExpression",
- "start": 4287,
- "end": 4326,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 55
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4287,
- "end": 4305,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 34
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4287,
- "end": 4298,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 27
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4287,
- "end": 4291,
- "loc": {
- "start": {
- "line": 102,
- "column": 16
- },
- "end": {
- "line": 102,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4292,
- "end": 4298,
- "loc": {
- "start": {
- "line": 102,
- "column": 21
- },
- "end": {
- "line": 102,
- "column": 27
- },
- "identifierName": "logger"
- },
- "name": "logger"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4299,
- "end": 4305,
- "loc": {
- "start": {
- "line": 102,
- "column": 28
- },
- "end": {
- "line": 102,
- "column": 34
- },
- "identifierName": "prefix"
- },
- "name": "prefix"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4306,
- "end": 4325,
- "loc": {
- "start": {
- "line": 102,
- "column": 35
- },
- "end": {
- "line": 102,
- "column": 54
- }
- },
- "extra": {
- "rawValue": "Icon-Point-Module",
- "raw": "'Icon-Point-Module'"
- },
- "value": "Icon-Point-Module"
- }
- ]
- },
- "property": {
- "type": "Identifier",
- "start": 4327,
- "end": 4332,
- "loc": {
- "start": {
- "line": 102,
- "column": 56
- },
- "end": {
- "line": 102,
- "column": 61
- },
- "identifierName": "error"
- },
- "name": "error"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4333,
- "end": 4375,
- "loc": {
- "start": {
- "line": 102,
- "column": 62
- },
- "end": {
- "line": 102,
- "column": 104
- }
- },
- "extra": {
- "rawValue": "Invalid properties on pPoint or pBounds!",
- "raw": "'Invalid properties on pPoint or pBounds!'"
- },
- "value": "Invalid properties on pPoint or pBounds!"
- }
- ]
- }
- }
- ],
- "directives": []
+ "end": {
+ "line": 104,
+ "column": 26
+ },
+ "identifierName": "height"
},
- "leadingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the rectangle has valid properties (x,y,width,height)",
- "start": 3866,
- "end": 3931,
- "loc": {
- "start": {
- "line": 95,
- "column": 12
- },
- "end": {
- "line": 95,
- "column": 77
- }
- }
- }
- ]
- }
- ],
- "directives": [],
- "trailingComments": null
- },
- "alternate": null,
- "leadingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the rectangle is a valid type",
- "start": 3705,
- "end": 3746,
+ "name": "height"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 4241,
+ "end": 4247,
"loc": {
"start": {
- "line": 93,
- "column": 8
+ "line": 104,
+ "column": 29
},
"end": {
- "line": 93,
- "column": 49
- }
- }
+ "line": 104,
+ "column": 35
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
}
- ],
- "trailingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the point is a valid type",
- "start": 4410,
- "end": 4447,
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4257,
+ "end": 4287,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 8
+ },
+ "end": {
+ "line": 105,
+ "column": 38
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 4257,
+ "end": 4286,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 8
+ },
+ "end": {
+ "line": 105,
+ "column": 37
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 4257,
+ "end": 4277,
"loc": {
"start": {
"line": 105,
@@ -11365,1142 +9242,459 @@
},
"end": {
"line": 105,
- "column": 45
+ "column": 28
}
- }
+ },
+ "object": {
+ "type": "ThisExpression",
+ "start": 4257,
+ "end": 4261,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 8
+ },
+ "end": {
+ "line": 105,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4262,
+ "end": 4277,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 13
+ },
+ "end": {
+ "line": 105,
+ "column": 28
+ },
+ "identifierName": "positionalPoint"
+ },
+ "name": "positionalPoint"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 4280,
+ "end": 4286,
+ "loc": {
+ "start": {
+ "line": 105,
+ "column": 31
+ },
+ "end": {
+ "line": 105,
+ "column": 37
+ },
+ "identifierName": "pPoint"
+ },
+ "name": "pPoint"
}
- ]
+ }
},
{
- "type": "IfStatement",
- "start": 4456,
- "end": 4914,
+ "type": "ExpressionStatement",
+ "start": 4296,
+ "end": 4322,
"loc": {
"start": {
"line": 106,
"column": 8
},
"end": {
- "line": 114,
- "column": 9
+ "line": 106,
+ "column": 34
}
},
- "test": {
- "type": "LogicalExpression",
- "start": 4460,
- "end": 4527,
+ "expression": {
+ "type": "CallExpression",
+ "start": 4296,
+ "end": 4321,
"loc": {
"start": {
"line": 106,
- "column": 12
+ "column": 8
},
"end": {
"line": 106,
- "column": 79
+ "column": 33
}
},
- "left": {
- "type": "BinaryExpression",
- "start": 4460,
- "end": 4490,
+ "callee": {
+ "type": "MemberExpression",
+ "start": 4296,
+ "end": 4309,
"loc": {
"start": {
"line": 106,
- "column": 12
+ "column": 8
},
"end": {
"line": 106,
- "column": 42
+ "column": 21
}
},
- "left": {
- "type": "UnaryExpression",
- "start": 4460,
- "end": 4477,
+ "object": {
+ "type": "ThisExpression",
+ "start": 4296,
+ "end": 4300,
"loc": {
"start": {
"line": 106,
- "column": 12
+ "column": 8
},
"end": {
"line": 106,
- "column": 29
+ "column": 12
}
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4301,
+ "end": 4309,
+ "loc": {
+ "start": {
+ "line": 106,
+ "column": 13
+ },
+ "end": {
+ "line": 106,
+ "column": 21
+ },
+ "identifierName": "setPoint"
},
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "Identifier",
- "start": 4467,
- "end": 4477,
- "loc": {
- "start": {
- "line": 106,
- "column": 19
- },
- "end": {
- "line": 106,
- "column": 29
- },
- "identifierName": "pIconPoint"
+ "name": "setPoint"
+ },
+ "computed": false
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 4310,
+ "end": 4320,
+ "loc": {
+ "start": {
+ "line": 106,
+ "column": 22
+ },
+ "end": {
+ "line": 106,
+ "column": 32
},
- "name": "pIconPoint",
- "leadingComments": null
+ "identifierName": "pIconPoint"
},
- "extra": {
- "parenthesizedArgument": false
+ "name": "pIconPoint"
+ }
+ ]
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4331,
+ "end": 4353,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 8
+ },
+ "end": {
+ "line": 107,
+ "column": 30
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 4331,
+ "end": 4352,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 8
+ },
+ "end": {
+ "line": 107,
+ "column": 29
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 4331,
+ "end": 4342,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 8
},
- "leadingComments": null
+ "end": {
+ "line": 107,
+ "column": 19
+ }
},
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4482,
- "end": 4490,
+ "object": {
+ "type": "ThisExpression",
+ "start": 4331,
+ "end": 4335,
"loc": {
"start": {
- "line": 106,
- "column": 34
+ "line": 107,
+ "column": 8
},
"end": {
- "line": 106,
- "column": 42
+ "line": 107,
+ "column": 12
}
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 4336,
+ "end": 4342,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 13
+ },
+ "end": {
+ "line": 107,
+ "column": 19
+ },
+ "identifierName": "logger"
},
- "extra": {
- "rawValue": "object",
- "raw": "'object'"
- },
- "value": "object"
+ "name": "logger"
},
- "leadingComments": null
+ "computed": false
},
- "operator": "&&",
"right": {
- "type": "BinaryExpression",
- "start": 4494,
- "end": 4527,
+ "type": "NewExpression",
+ "start": 4345,
+ "end": 4352,
"loc": {
"start": {
- "line": 106,
- "column": 46
+ "line": 107,
+ "column": 22
},
"end": {
- "line": 106,
- "column": 79
+ "line": 107,
+ "column": 29
}
},
- "left": {
+ "callee": {
+ "type": "Identifier",
+ "start": 4349,
+ "end": 4350,
+ "loc": {
+ "start": {
+ "line": 107,
+ "column": 26
+ },
+ "end": {
+ "line": 107,
+ "column": 27
+ },
+ "identifierName": "i"
+ },
+ "name": "i"
+ },
+ "arguments": []
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 4362,
+ "end": 4419,
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 8
+ },
+ "end": {
+ "line": 108,
+ "column": 65
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 4362,
+ "end": 4418,
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 8
+ },
+ "end": {
+ "line": 108,
+ "column": 64
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 4362,
+ "end": 4386,
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 8
+ },
+ "end": {
+ "line": 108,
+ "column": 32
+ }
+ },
+ "object": {
"type": "MemberExpression",
- "start": 4494,
- "end": 4516,
+ "start": 4362,
+ "end": 4373,
"loc": {
"start": {
- "line": 106,
- "column": 46
+ "line": 108,
+ "column": 8
},
"end": {
- "line": 106,
- "column": 68
+ "line": 108,
+ "column": 19
}
},
"object": {
- "type": "Identifier",
- "start": 4494,
- "end": 4504,
+ "type": "ThisExpression",
+ "start": 4362,
+ "end": 4366,
"loc": {
"start": {
- "line": 106,
- "column": 46
+ "line": 108,
+ "column": 8
},
"end": {
- "line": 106,
- "column": 56
- },
- "identifierName": "pIconPoint"
- },
- "name": "pIconPoint"
+ "line": 108,
+ "column": 12
+ }
+ }
},
"property": {
"type": "Identifier",
- "start": 4505,
- "end": 4516,
+ "start": 4367,
+ "end": 4373,
"loc": {
"start": {
- "line": 106,
- "column": 57
+ "line": 108,
+ "column": 13
},
"end": {
- "line": 106,
- "column": 68
+ "line": 108,
+ "column": 19
},
- "identifierName": "constructor"
+ "identifierName": "logger"
},
- "name": "constructor"
+ "name": "logger"
},
"computed": false
},
- "operator": "===",
- "right": {
+ "property": {
"type": "Identifier",
- "start": 4521,
- "end": 4527,
+ "start": 4374,
+ "end": 4386,
"loc": {
"start": {
- "line": 106,
- "column": 73
+ "line": 108,
+ "column": 20
},
"end": {
- "line": 106,
- "column": 79
+ "line": 108,
+ "column": 32
},
- "identifierName": "Object"
+ "identifierName": "registerType"
},
- "name": "Object"
- }
- },
- "leadingComments": null
- },
- "consequent": {
- "type": "BlockStatement",
- "start": 4529,
- "end": 4914,
- "loc": {
- "start": {
- "line": 106,
- "column": 81
+ "name": "registerType"
},
- "end": {
- "line": 114,
- "column": 9
- }
+ "computed": false
},
- "body": [
+ "arguments": [
{
- "type": "IfStatement",
- "start": 4598,
- "end": 4904,
+ "type": "StringLiteral",
+ "start": 4387,
+ "end": 4406,
"loc": {
"start": {
"line": 108,
- "column": 12
+ "column": 33
},
"end": {
- "line": 113,
- "column": 13
+ "line": 108,
+ "column": 52
}
},
- "test": {
- "type": "LogicalExpression",
- "start": 4602,
- "end": 4670,
- "loc": {
- "start": {
- "line": 108,
- "column": 16
- },
- "end": {
- "line": 108,
- "column": 84
- }
+ "extra": {
+ "rawValue": "Icon-Point-Module",
+ "raw": "'Icon-Point-Module'"
+ },
+ "value": "Icon-Point-Module"
+ },
+ {
+ "type": "StringLiteral",
+ "start": 4408,
+ "end": 4417,
+ "loc": {
+ "start": {
+ "line": 108,
+ "column": 54
},
- "left": {
- "type": "BinaryExpression",
- "start": 4602,
- "end": 4634,
- "loc": {
- "start": {
- "line": 108,
- "column": 16
- },
- "end": {
- "line": 108,
- "column": 48
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 4602,
- "end": 4621,
- "loc": {
- "start": {
- "line": 108,
- "column": 16
- },
- "end": {
- "line": 108,
- "column": 35
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 4609,
- "end": 4621,
- "loc": {
- "start": {
- "line": 108,
- "column": 23
- },
- "end": {
- "line": 108,
- "column": 35
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4609,
- "end": 4619,
- "loc": {
- "start": {
- "line": 108,
- "column": 23
- },
- "end": {
- "line": 108,
- "column": 33
- },
- "identifierName": "pIconPoint"
- },
- "name": "pIconPoint",
- "leadingComments": null
- },
- "property": {
- "type": "Identifier",
- "start": 4620,
- "end": 4621,
- "loc": {
- "start": {
- "line": 108,
- "column": 34
- },
- "end": {
- "line": 108,
- "column": 35
- },
- "identifierName": "x"
- },
- "name": "x"
- },
- "computed": false,
- "leadingComments": null
- },
- "extra": {
- "parenthesizedArgument": false
- },
- "leadingComments": null
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4626,
- "end": 4634,
- "loc": {
- "start": {
- "line": 108,
- "column": 40
- },
- "end": {
- "line": 108,
- "column": 48
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- },
- "leadingComments": null
- },
- "operator": "&&",
- "right": {
- "type": "BinaryExpression",
- "start": 4638,
- "end": 4670,
- "loc": {
- "start": {
- "line": 108,
- "column": 52
- },
- "end": {
- "line": 108,
- "column": 84
- }
- },
- "left": {
- "type": "UnaryExpression",
- "start": 4638,
- "end": 4657,
- "loc": {
- "start": {
- "line": 108,
- "column": 52
- },
- "end": {
- "line": 108,
- "column": 71
- }
- },
- "operator": "typeof",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 4645,
- "end": 4657,
- "loc": {
- "start": {
- "line": 108,
- "column": 59
- },
- "end": {
- "line": 108,
- "column": 71
- }
- },
- "object": {
- "type": "Identifier",
- "start": 4645,
- "end": 4655,
- "loc": {
- "start": {
- "line": 108,
- "column": 59
- },
- "end": {
- "line": 108,
- "column": 69
- },
- "identifierName": "pIconPoint"
- },
- "name": "pIconPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 4656,
- "end": 4657,
- "loc": {
- "start": {
- "line": 108,
- "column": 70
- },
- "end": {
- "line": 108,
- "column": 71
- },
- "identifierName": "y"
- },
- "name": "y"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "operator": "===",
- "right": {
- "type": "StringLiteral",
- "start": 4662,
- "end": 4670,
- "loc": {
- "start": {
- "line": 108,
- "column": 76
- },
- "end": {
- "line": 108,
- "column": 84
- }
- },
- "extra": {
- "rawValue": "number",
- "raw": "'number'"
- },
- "value": "number"
- }
- },
- "leadingComments": null
- },
- "consequent": {
- "type": "BlockStatement",
- "start": 4672,
- "end": 4730,
- "loc": {
- "start": {
- "line": 108,
- "column": 86
- },
- "end": {
- "line": 110,
- "column": 13
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 4690,
- "end": 4716,
- "loc": {
- "start": {
- "line": 109,
- "column": 16
- },
- "end": {
- "line": 109,
- "column": 42
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 4690,
- "end": 4715,
- "loc": {
- "start": {
- "line": 109,
- "column": 16
- },
- "end": {
- "line": 109,
- "column": 41
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4690,
- "end": 4703,
- "loc": {
- "start": {
- "line": 109,
- "column": 16
- },
- "end": {
- "line": 109,
- "column": 29
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4690,
- "end": 4694,
- "loc": {
- "start": {
- "line": 109,
- "column": 16
- },
- "end": {
- "line": 109,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4695,
- "end": 4703,
- "loc": {
- "start": {
- "line": 109,
- "column": 21
- },
- "end": {
- "line": 109,
- "column": 29
- },
- "identifierName": "setPoint"
- },
- "name": "setPoint"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "Identifier",
- "start": 4704,
- "end": 4714,
- "loc": {
- "start": {
- "line": 109,
- "column": 30
- },
- "end": {
- "line": 109,
- "column": 40
- },
- "identifierName": "pIconPoint"
- },
- "name": "pIconPoint"
- }
- ]
- }
- }
- ],
- "directives": []
+ "end": {
+ "line": 108,
+ "column": 63
+ }
},
- "alternate": {
- "type": "BlockStatement",
- "start": 4748,
- "end": 4904,
- "loc": {
- "start": {
- "line": 111,
- "column": 17
- },
- "end": {
- "line": 113,
- "column": 13
- }
- },
- "body": [
- {
- "type": "ExpressionStatement",
- "start": 4766,
- "end": 4890,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 140
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 4766,
- "end": 4889,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 139
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4766,
- "end": 4811,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 61
- }
- },
- "object": {
- "type": "CallExpression",
- "start": 4766,
- "end": 4805,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 55
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4766,
- "end": 4784,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 34
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4766,
- "end": 4777,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 27
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4766,
- "end": 4770,
- "loc": {
- "start": {
- "line": 112,
- "column": 16
- },
- "end": {
- "line": 112,
- "column": 20
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4771,
- "end": 4777,
- "loc": {
- "start": {
- "line": 112,
- "column": 21
- },
- "end": {
- "line": 112,
- "column": 27
- },
- "identifierName": "logger"
- },
- "name": "logger"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4778,
- "end": 4784,
- "loc": {
- "start": {
- "line": 112,
- "column": 28
- },
- "end": {
- "line": 112,
- "column": 34
- },
- "identifierName": "prefix"
- },
- "name": "prefix"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4785,
- "end": 4804,
- "loc": {
- "start": {
- "line": 112,
- "column": 35
- },
- "end": {
- "line": 112,
- "column": 54
- }
- },
- "extra": {
- "rawValue": "Icon-Point-Module",
- "raw": "'Icon-Point-Module'"
- },
- "value": "Icon-Point-Module"
- }
- ]
- },
- "property": {
- "type": "Identifier",
- "start": 4806,
- "end": 4811,
- "loc": {
- "start": {
- "line": 112,
- "column": 56
- },
- "end": {
- "line": 112,
- "column": 61
- },
- "identifierName": "error"
- },
- "name": "error"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4812,
- "end": 4888,
- "loc": {
- "start": {
- "line": 112,
- "column": 62
- },
- "end": {
- "line": 112,
- "column": 138
- }
- },
- "extra": {
- "rawValue": "Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!",
- "raw": "'Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!'"
- },
- "value": "Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!"
- }
- ]
- }
- }
- ],
- "directives": []
+ "extra": {
+ "rawValue": "#ff6600",
+ "raw": "'#ff6600'"
},
- "leadingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the point has valid properties",
- "start": 4543,
- "end": 4585,
- "loc": {
- "start": {
- "line": 107,
- "column": 12
- },
- "end": {
- "line": 107,
- "column": 54
- }
- }
- }
- ]
+ "value": "#ff6600"
}
- ],
- "directives": []
+ ]
+ }
+ }
+ ],
+ "directives": [],
+ "trailingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.\n * @prop {number} pPoint.x - The x coordinate of the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the rectangle.\n * @param {Bounds} pBounds - The size of the rectangle.\n * @prop {number} pBounds.width - The width of the rectangle.\n * @prop {number} pBounds.height - The height of the rectangle.\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.\n *\n * ## Normalized\n If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`\n The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.\n ",
+ "start": 2910,
+ "end": 4086,
+ "loc": {
+ "start": {
+ "line": 85,
+ "column": 4
},
- "alternate": null,
- "leadingComments": [
- {
- "type": "CommentLine",
- "value": " Check if the point is a valid type",
- "start": 4410,
- "end": 4447,
- "loc": {
- "start": {
- "line": 105,
- "column": 8
- },
- "end": {
- "line": 105,
- "column": 45
- }
- }
- }
- ]
- },
- {
- "type": "ExpressionStatement",
- "start": 4923,
- "end": 4945,
- "loc": {
- "start": {
- "line": 115,
- "column": 8
- },
- "end": {
- "line": 115,
- "column": 30
- }
- },
- "expression": {
- "type": "AssignmentExpression",
- "start": 4923,
- "end": 4944,
- "loc": {
- "start": {
- "line": 115,
- "column": 8
- },
- "end": {
- "line": 115,
- "column": 29
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 4923,
- "end": 4934,
- "loc": {
- "start": {
- "line": 115,
- "column": 8
- },
- "end": {
- "line": 115,
- "column": 19
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4923,
- "end": 4927,
- "loc": {
- "start": {
- "line": 115,
- "column": 8
- },
- "end": {
- "line": 115,
- "column": 12
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4928,
- "end": 4934,
- "loc": {
- "start": {
- "line": 115,
- "column": 13
- },
- "end": {
- "line": 115,
- "column": 19
- },
- "identifierName": "logger"
- },
- "name": "logger"
- },
- "computed": false
- },
- "right": {
- "type": "NewExpression",
- "start": 4937,
- "end": 4944,
- "loc": {
- "start": {
- "line": 115,
- "column": 22
- },
- "end": {
- "line": 115,
- "column": 29
- }
- },
- "callee": {
- "type": "Identifier",
- "start": 4941,
- "end": 4942,
- "loc": {
- "start": {
- "line": 115,
- "column": 26
- },
- "end": {
- "line": 115,
- "column": 27
- },
- "identifierName": "i"
- },
- "name": "i"
- },
- "arguments": []
- }
- }
- },
- {
- "type": "ExpressionStatement",
- "start": 4954,
- "end": 5011,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 65
- }
- },
- "expression": {
- "type": "CallExpression",
- "start": 4954,
- "end": 5010,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 64
- }
- },
- "callee": {
- "type": "MemberExpression",
- "start": 4954,
- "end": 4978,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 32
- }
- },
- "object": {
- "type": "MemberExpression",
- "start": 4954,
- "end": 4965,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 19
- }
- },
- "object": {
- "type": "ThisExpression",
- "start": 4954,
- "end": 4958,
- "loc": {
- "start": {
- "line": 116,
- "column": 8
- },
- "end": {
- "line": 116,
- "column": 12
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 4959,
- "end": 4965,
- "loc": {
- "start": {
- "line": 116,
- "column": 13
- },
- "end": {
- "line": 116,
- "column": 19
- },
- "identifierName": "logger"
- },
- "name": "logger"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 4966,
- "end": 4978,
- "loc": {
- "start": {
- "line": 116,
- "column": 20
- },
- "end": {
- "line": 116,
- "column": 32
- },
- "identifierName": "registerType"
- },
- "name": "registerType"
- },
- "computed": false
- },
- "arguments": [
- {
- "type": "StringLiteral",
- "start": 4979,
- "end": 4998,
- "loc": {
- "start": {
- "line": 116,
- "column": 33
- },
- "end": {
- "line": 116,
- "column": 52
- }
- },
- "extra": {
- "rawValue": "Icon-Point-Module",
- "raw": "'Icon-Point-Module'"
- },
- "value": "Icon-Point-Module"
- },
- {
- "type": "StringLiteral",
- "start": 5000,
- "end": 5009,
- "loc": {
- "start": {
- "line": 116,
- "column": 54
- },
- "end": {
- "line": 116,
- "column": 63
- }
- },
- "extra": {
- "rawValue": "#ff6600",
- "raw": "'#ff6600'"
- },
- "value": "#ff6600"
- }
- ]
- }
- }
- ],
- "directives": [],
- "trailingComments": null
- },
- "leadingComments": [
- {
- "type": "CommentBlock",
- "value": "*\n * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of\n * @prop {number} pPoint.x - The x coordinate of the rectangle\n * @prop {number} pPoint.y - The y coordinate of the rectangle\n * @param {Bounds} pBounds - The size of the rectangle\n * @prop {number} pBounds.width - The width of the rectangle\n * @prop {number} pBounds.height - The height of the rectangle\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle\n * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range\n ",
- "start": 2742,
- "end": 3649,
- "loc": {
- "start": {
- "line": 80,
- "column": 4
- },
- "end": {
- "line": 91,
- "column": 7
- }
- }
- }
- ],
- "trailingComments": [
- {
- "type": "CommentBlock",
- "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle\n * @prop {number} pOffset.x - The x offset of the rectangle\n * @prop {number} pOffset.y - The y offset of the rectangle\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
- "start": 5022,
- "end": 7343,
- "loc": {
- "start": {
- "line": 118,
- "column": 4
+ "end": {
+ "line": 100,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account.\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.\n * @prop {number} pOffset.x - The x offset of the rectangle.\n * @prop {number} pOffset.y - The y offset of the rectangle.\n * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.\n * @prop {number} pAnchor.x - The x anchor of the rectangle.\n * @prop {number} pAnchor.y - The y anchor of the rectangle.\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
+ "start": 4430,
+ "end": 6955,
+ "loc": {
+ "start": {
+ "line": 110,
+ "column": 4
},
"end": {
- "line": 153,
+ "line": 148,
"column": 7
}
}
@@ -12509,15 +9703,15 @@
},
{
"type": "ClassMethod",
- "start": 7348,
- "end": 8709,
+ "start": 6960,
+ "end": 8256,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 4
},
"end": {
- "line": 178,
+ "line": 171,
"column": 5
}
},
@@ -12525,15 +9719,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 7348,
- "end": 7356,
+ "start": 6960,
+ "end": 6968,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 4
},
"end": {
- "line": 154,
+ "line": 149,
"column": 12
},
"identifierName": "getPoint"
@@ -12549,29 +9743,29 @@
"params": [
{
"type": "AssignmentPattern",
- "start": 7357,
- "end": 7367,
+ "start": 6969,
+ "end": 6979,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 13
},
"end": {
- "line": 154,
+ "line": 149,
"column": 23
}
},
"left": {
"type": "Identifier",
- "start": 7357,
- "end": 7363,
+ "start": 6969,
+ "end": 6975,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 13
},
"end": {
- "line": 154,
+ "line": 149,
"column": 19
},
"identifierName": "pAngle"
@@ -12580,15 +9774,15 @@
},
"right": {
"type": "NumericLiteral",
- "start": 7366,
- "end": 7367,
+ "start": 6978,
+ "end": 6979,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 22
},
"end": {
- "line": 154,
+ "line": 149,
"column": 23
}
},
@@ -12601,29 +9795,29 @@
},
{
"type": "AssignmentPattern",
- "start": 7369,
- "end": 7402,
+ "start": 6981,
+ "end": 7014,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 25
},
"end": {
- "line": 154,
+ "line": 149,
"column": 58
}
},
"left": {
"type": "Identifier",
- "start": 7369,
- "end": 7376,
+ "start": 6981,
+ "end": 6988,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 25
},
"end": {
- "line": 154,
+ "line": 149,
"column": 32
},
"identifierName": "pOffset"
@@ -12632,29 +9826,29 @@
},
"right": {
"type": "MemberExpression",
- "start": 7379,
- "end": 7402,
+ "start": 6991,
+ "end": 7014,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 35
},
"end": {
- "line": 154,
+ "line": 149,
"column": 58
}
},
"object": {
"type": "Identifier",
- "start": 7379,
- "end": 7388,
+ "start": 6991,
+ "end": 7000,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 35
},
"end": {
- "line": 154,
+ "line": 149,
"column": 44
},
"identifierName": "IconPoint"
@@ -12663,15 +9857,15 @@
},
"property": {
"type": "Identifier",
- "start": 7389,
- "end": 7402,
+ "start": 7001,
+ "end": 7014,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 45
},
"end": {
- "line": 154,
+ "line": 149,
"column": 58
},
"identifierName": "defaultOffset"
@@ -12683,29 +9877,29 @@
},
{
"type": "AssignmentPattern",
- "start": 7404,
- "end": 7437,
+ "start": 7016,
+ "end": 7049,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 60
},
"end": {
- "line": 154,
+ "line": 149,
"column": 93
}
},
"left": {
"type": "Identifier",
- "start": 7404,
- "end": 7411,
+ "start": 7016,
+ "end": 7023,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 60
},
"end": {
- "line": 154,
+ "line": 149,
"column": 67
},
"identifierName": "pAnchor"
@@ -12714,29 +9908,29 @@
},
"right": {
"type": "MemberExpression",
- "start": 7414,
- "end": 7437,
+ "start": 7026,
+ "end": 7049,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 70
},
"end": {
- "line": 154,
+ "line": 149,
"column": 93
}
},
"object": {
"type": "Identifier",
- "start": 7414,
- "end": 7423,
+ "start": 7026,
+ "end": 7035,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 70
},
"end": {
- "line": 154,
+ "line": 149,
"column": 79
},
"identifierName": "IconPoint"
@@ -12745,15 +9939,15 @@
},
"property": {
"type": "Identifier",
- "start": 7424,
- "end": 7437,
+ "start": 7036,
+ "end": 7049,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 80
},
"end": {
- "line": 154,
+ "line": 149,
"column": 93
},
"identifierName": "defaultAnchor"
@@ -12766,300 +9960,148 @@
],
"body": {
"type": "BlockStatement",
- "start": 7439,
- "end": 8709,
+ "start": 7051,
+ "end": 8256,
"loc": {
"start": {
- "line": 154,
+ "line": 149,
"column": 95
},
"end": {
- "line": 178,
+ "line": 171,
"column": 5
}
},
"body": [
{
- "type": "IfStatement",
- "start": 7449,
- "end": 7495,
+ "type": "VariableDeclaration",
+ "start": 7215,
+ "end": 7295,
"loc": {
"start": {
- "line": 155,
+ "line": 153,
"column": 8
},
"end": {
- "line": 156,
- "column": 19
+ "line": 153,
+ "column": 88
}
},
- "test": {
- "type": "UnaryExpression",
- "start": 7453,
- "end": 7474,
- "loc": {
- "start": {
- "line": 155,
- "column": 12
- },
- "end": {
- "line": 155,
- "column": 33
- }
- },
- "operator": "!",
- "prefix": true,
- "argument": {
- "type": "MemberExpression",
- "start": 7454,
- "end": 7474,
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 7221,
+ "end": 7294,
"loc": {
"start": {
- "line": 155,
- "column": 13
+ "line": 153,
+ "column": 14
},
"end": {
- "line": 155,
- "column": 33
+ "line": 153,
+ "column": 87
}
},
- "object": {
- "type": "ThisExpression",
- "start": 7454,
- "end": 7458,
+ "id": {
+ "type": "Identifier",
+ "start": 7221,
+ "end": 7223,
"loc": {
"start": {
- "line": 155,
- "column": 13
+ "line": 153,
+ "column": 14
},
"end": {
- "line": 155,
- "column": 17
- }
- }
+ "line": 153,
+ "column": 16
+ },
+ "identifierName": "cx"
+ },
+ "name": "cx",
+ "leadingComments": null
},
- "property": {
- "type": "Identifier",
- "start": 7459,
- "end": 7474,
+ "init": {
+ "type": "BinaryExpression",
+ "start": 7226,
+ "end": 7294,
"loc": {
"start": {
- "line": 155,
- "column": 18
+ "line": 153,
+ "column": 19
},
"end": {
- "line": 155,
- "column": 33
- },
- "identifierName": "positionalPoint"
- },
- "name": "positionalPoint"
- },
- "computed": false
- },
- "extra": {
- "parenthesizedArgument": false
- }
- },
- "consequent": {
- "type": "ReturnStatement",
- "start": 7488,
- "end": 7495,
- "loc": {
- "start": {
- "line": 156,
- "column": 12
- },
- "end": {
- "line": 156,
- "column": 19
- }
- },
- "argument": null,
- "leadingComments": null,
- "trailingComments": null
- },
- "alternate": null,
- "trailingComments": [
- {
- "type": "CommentLine",
- "value": " cx, cy - center of square coordinates ",
- "start": 7504,
- "end": 7545,
- "loc": {
- "start": {
- "line": 157,
- "column": 8
- },
- "end": {
- "line": 157,
- "column": 49
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " x, y - coordinates of a corner point of the square",
- "start": 7554,
- "end": 7607,
- "loc": {
- "start": {
- "line": 158,
- "column": 8
- },
- "end": {
- "line": 158,
- "column": 61
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " angle is the angle of rotation",
- "start": 7616,
- "end": 7649,
- "loc": {
- "start": {
- "line": 159,
- "column": 8
- },
- "end": {
- "line": 159,
- "column": 41
- }
- }
- }
- ]
- },
- {
- "type": "VariableDeclaration",
- "start": 7658,
- "end": 7738,
- "loc": {
- "start": {
- "line": 160,
- "column": 8
- },
- "end": {
- "line": 160,
- "column": 88
- }
- },
- "declarations": [
- {
- "type": "VariableDeclarator",
- "start": 7664,
- "end": 7737,
- "loc": {
- "start": {
- "line": 160,
- "column": 14
- },
- "end": {
- "line": 160,
- "column": 87
- }
- },
- "id": {
- "type": "Identifier",
- "start": 7664,
- "end": 7666,
- "loc": {
- "start": {
- "line": 160,
- "column": 14
- },
- "end": {
- "line": 160,
- "column": 16
- },
- "identifierName": "cx"
- },
- "name": "cx",
- "leadingComments": null
- },
- "init": {
- "type": "BinaryExpression",
- "start": 7669,
- "end": 7737,
- "loc": {
- "start": {
- "line": 160,
- "column": 19
- },
- "end": {
- "line": 160,
+ "line": 153,
"column": 87
}
},
"left": {
"type": "BinaryExpression",
- "start": 7670,
- "end": 7704,
+ "start": 7227,
+ "end": 7261,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 20
},
"end": {
- "line": 160,
+ "line": 153,
"column": 54
}
},
"left": {
"type": "MemberExpression",
- "start": 7670,
- "end": 7692,
+ "start": 7227,
+ "end": 7249,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 20
},
"end": {
- "line": 160,
+ "line": 153,
"column": 42
}
},
"object": {
"type": "MemberExpression",
- "start": 7670,
- "end": 7690,
+ "start": 7227,
+ "end": 7247,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 20
},
"end": {
- "line": 160,
+ "line": 153,
"column": 40
}
},
"object": {
"type": "ThisExpression",
- "start": 7670,
- "end": 7674,
+ "start": 7227,
+ "end": 7231,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 20
},
"end": {
- "line": 160,
+ "line": 153,
"column": 24
}
}
},
"property": {
"type": "Identifier",
- "start": 7675,
- "end": 7690,
+ "start": 7232,
+ "end": 7247,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 25
},
"end": {
- "line": 160,
+ "line": 153,
"column": 40
},
"identifierName": "positionalPoint"
@@ -13070,15 +10112,15 @@
},
"property": {
"type": "Identifier",
- "start": 7691,
- "end": 7692,
+ "start": 7248,
+ "end": 7249,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 41
},
"end": {
- "line": 160,
+ "line": 153,
"column": 42
},
"identifierName": "x"
@@ -13090,29 +10132,29 @@
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 7695,
- "end": 7704,
+ "start": 7252,
+ "end": 7261,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 45
},
"end": {
- "line": 160,
+ "line": 153,
"column": 54
}
},
"object": {
"type": "Identifier",
- "start": 7695,
- "end": 7702,
+ "start": 7252,
+ "end": 7259,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 45
},
"end": {
- "line": 160,
+ "line": 153,
"column": 52
},
"identifierName": "pOffset"
@@ -13121,15 +10163,15 @@
},
"property": {
"type": "Identifier",
- "start": 7703,
- "end": 7704,
+ "start": 7260,
+ "end": 7261,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 53
},
"end": {
- "line": 160,
+ "line": 153,
"column": 54
},
"identifierName": "x"
@@ -13140,78 +10182,78 @@
},
"extra": {
"parenthesized": true,
- "parenStart": 7669
+ "parenStart": 7226
}
},
"operator": "+",
"right": {
"type": "BinaryExpression",
- "start": 7708,
- "end": 7737,
+ "start": 7265,
+ "end": 7294,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 58
},
"end": {
- "line": 160,
+ "line": 153,
"column": 87
}
},
"left": {
"type": "MemberExpression",
- "start": 7708,
- "end": 7725,
+ "start": 7265,
+ "end": 7282,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 58
},
"end": {
- "line": 160,
+ "line": 153,
"column": 75
}
},
"object": {
"type": "MemberExpression",
- "start": 7708,
- "end": 7719,
+ "start": 7265,
+ "end": 7276,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 58
},
"end": {
- "line": 160,
+ "line": 153,
"column": 69
}
},
"object": {
"type": "ThisExpression",
- "start": 7708,
- "end": 7712,
+ "start": 7265,
+ "end": 7269,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 58
},
"end": {
- "line": 160,
+ "line": 153,
"column": 62
}
}
},
"property": {
"type": "Identifier",
- "start": 7713,
- "end": 7719,
+ "start": 7270,
+ "end": 7276,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 63
},
"end": {
- "line": 160,
+ "line": 153,
"column": 69
},
"identifierName": "bounds"
@@ -13222,15 +10264,15 @@
},
"property": {
"type": "Identifier",
- "start": 7720,
- "end": 7725,
+ "start": 7277,
+ "end": 7282,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 70
},
"end": {
- "line": 160,
+ "line": 153,
"column": 75
},
"identifierName": "width"
@@ -13242,29 +10284,29 @@
"operator": "*",
"right": {
"type": "MemberExpression",
- "start": 7728,
- "end": 7737,
+ "start": 7285,
+ "end": 7294,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 78
},
"end": {
- "line": 160,
+ "line": 153,
"column": 87
}
},
"object": {
"type": "Identifier",
- "start": 7728,
- "end": 7735,
+ "start": 7285,
+ "end": 7292,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 78
},
"end": {
- "line": 160,
+ "line": 153,
"column": 85
},
"identifierName": "pAnchor"
@@ -13273,15 +10315,15 @@
},
"property": {
"type": "Identifier",
- "start": 7736,
- "end": 7737,
+ "start": 7293,
+ "end": 7294,
"loc": {
"start": {
- "line": 160,
+ "line": 153,
"column": 86
},
"end": {
- "line": 160,
+ "line": 153,
"column": 87
},
"identifierName": "x"
@@ -13300,15 +10342,15 @@
{
"type": "CommentLine",
"value": " cx, cy - center of square coordinates ",
- "start": 7504,
- "end": 7545,
+ "start": 7061,
+ "end": 7102,
"loc": {
"start": {
- "line": 157,
+ "line": 150,
"column": 8
},
"end": {
- "line": 157,
+ "line": 150,
"column": 49
}
}
@@ -13316,15 +10358,15 @@
{
"type": "CommentLine",
"value": " x, y - coordinates of a corner point of the square",
- "start": 7554,
- "end": 7607,
+ "start": 7111,
+ "end": 7164,
"loc": {
"start": {
- "line": 158,
+ "line": 151,
"column": 8
},
"end": {
- "line": 158,
+ "line": 151,
"column": 61
}
}
@@ -13332,15 +10374,15 @@
{
"type": "CommentLine",
"value": " angle is the angle of rotation",
- "start": 7616,
- "end": 7649,
+ "start": 7173,
+ "end": 7206,
"loc": {
"start": {
- "line": 159,
+ "line": 152,
"column": 8
},
"end": {
- "line": 159,
+ "line": 152,
"column": 41
}
}
@@ -13349,44 +10391,44 @@
},
{
"type": "VariableDeclaration",
- "start": 7747,
- "end": 7828,
+ "start": 7304,
+ "end": 7385,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 8
},
"end": {
- "line": 161,
+ "line": 154,
"column": 89
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 7753,
- "end": 7827,
+ "start": 7310,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 14
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
}
},
"id": {
"type": "Identifier",
- "start": 7753,
- "end": 7755,
+ "start": 7310,
+ "end": 7312,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 14
},
"end": {
- "line": 161,
+ "line": 154,
"column": 16
},
"identifierName": "cy"
@@ -13395,86 +10437,86 @@
},
"init": {
"type": "BinaryExpression",
- "start": 7758,
- "end": 7827,
+ "start": 7315,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 19
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
}
},
"left": {
"type": "BinaryExpression",
- "start": 7759,
- "end": 7793,
+ "start": 7316,
+ "end": 7350,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 20
},
"end": {
- "line": 161,
+ "line": 154,
"column": 54
}
},
"left": {
"type": "MemberExpression",
- "start": 7759,
- "end": 7781,
+ "start": 7316,
+ "end": 7338,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 20
},
"end": {
- "line": 161,
+ "line": 154,
"column": 42
}
},
"object": {
"type": "MemberExpression",
- "start": 7759,
- "end": 7779,
+ "start": 7316,
+ "end": 7336,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 20
},
"end": {
- "line": 161,
+ "line": 154,
"column": 40
}
},
"object": {
"type": "ThisExpression",
- "start": 7759,
- "end": 7763,
+ "start": 7316,
+ "end": 7320,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 20
},
"end": {
- "line": 161,
+ "line": 154,
"column": 24
}
}
},
"property": {
"type": "Identifier",
- "start": 7764,
- "end": 7779,
+ "start": 7321,
+ "end": 7336,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 25
},
"end": {
- "line": 161,
+ "line": 154,
"column": 40
},
"identifierName": "positionalPoint"
@@ -13485,15 +10527,15 @@
},
"property": {
"type": "Identifier",
- "start": 7780,
- "end": 7781,
+ "start": 7337,
+ "end": 7338,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 41
},
"end": {
- "line": 161,
+ "line": 154,
"column": 42
},
"identifierName": "y"
@@ -13505,29 +10547,29 @@
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 7784,
- "end": 7793,
+ "start": 7341,
+ "end": 7350,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 45
},
"end": {
- "line": 161,
+ "line": 154,
"column": 54
}
},
"object": {
"type": "Identifier",
- "start": 7784,
- "end": 7791,
+ "start": 7341,
+ "end": 7348,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 45
},
"end": {
- "line": 161,
+ "line": 154,
"column": 52
},
"identifierName": "pOffset"
@@ -13536,15 +10578,15 @@
},
"property": {
"type": "Identifier",
- "start": 7792,
- "end": 7793,
+ "start": 7349,
+ "end": 7350,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 53
},
"end": {
- "line": 161,
+ "line": 154,
"column": 54
},
"identifierName": "y"
@@ -13555,78 +10597,78 @@
},
"extra": {
"parenthesized": true,
- "parenStart": 7758
+ "parenStart": 7315
}
},
"operator": "+",
"right": {
"type": "BinaryExpression",
- "start": 7797,
- "end": 7827,
+ "start": 7354,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 58
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
}
},
"left": {
"type": "MemberExpression",
- "start": 7797,
- "end": 7815,
+ "start": 7354,
+ "end": 7372,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 58
},
"end": {
- "line": 161,
+ "line": 154,
"column": 76
}
},
"object": {
"type": "MemberExpression",
- "start": 7797,
- "end": 7808,
+ "start": 7354,
+ "end": 7365,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 58
},
"end": {
- "line": 161,
+ "line": 154,
"column": 69
}
},
"object": {
"type": "ThisExpression",
- "start": 7797,
- "end": 7801,
+ "start": 7354,
+ "end": 7358,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 58
},
"end": {
- "line": 161,
+ "line": 154,
"column": 62
}
}
},
"property": {
"type": "Identifier",
- "start": 7802,
- "end": 7808,
+ "start": 7359,
+ "end": 7365,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 63
},
"end": {
- "line": 161,
+ "line": 154,
"column": 69
},
"identifierName": "bounds"
@@ -13637,15 +10679,15 @@
},
"property": {
"type": "Identifier",
- "start": 7809,
- "end": 7815,
+ "start": 7366,
+ "end": 7372,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 70
},
"end": {
- "line": 161,
+ "line": 154,
"column": 76
},
"identifierName": "height"
@@ -13657,29 +10699,29 @@
"operator": "*",
"right": {
"type": "MemberExpression",
- "start": 7818,
- "end": 7827,
+ "start": 7375,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 79
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
}
},
"object": {
"type": "Identifier",
- "start": 7818,
- "end": 7825,
+ "start": 7375,
+ "end": 7382,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 79
},
"end": {
- "line": 161,
+ "line": 154,
"column": 86
},
"identifierName": "pAnchor"
@@ -13688,15 +10730,15 @@
},
"property": {
"type": "Identifier",
- "start": 7826,
- "end": 7827,
+ "start": 7383,
+ "end": 7384,
"loc": {
"start": {
- "line": 161,
+ "line": 154,
"column": 87
},
"end": {
- "line": 161,
+ "line": 154,
"column": 88
},
"identifierName": "y"
@@ -13714,15 +10756,15 @@
{
"type": "CommentLine",
"value": " We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle",
- "start": 7837,
- "end": 7968,
+ "start": 7394,
+ "end": 7525,
"loc": {
"start": {
- "line": 162,
+ "line": 155,
"column": 8
},
"end": {
- "line": 162,
+ "line": 155,
"column": 139
}
}
@@ -13730,15 +10772,15 @@
{
"type": "CommentLine",
"value": " Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates",
- "start": 7977,
- "end": 8059,
+ "start": 7534,
+ "end": 7616,
"loc": {
"start": {
- "line": 163,
+ "line": 156,
"column": 8
},
"end": {
- "line": 163,
+ "line": 156,
"column": 90
}
}
@@ -13747,44 +10789,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8068,
- "end": 8148,
+ "start": 7625,
+ "end": 7700,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 8
},
"end": {
- "line": 164,
- "column": 88
+ "line": 157,
+ "column": 83
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8074,
- "end": 8147,
+ "start": 7631,
+ "end": 7699,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 14
},
"end": {
- "line": 164,
- "column": 87
+ "line": 157,
+ "column": 82
}
},
"id": {
"type": "Identifier",
- "start": 8074,
- "end": 8080,
+ "start": 7631,
+ "end": 7637,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 14
},
"end": {
- "line": 164,
+ "line": 157,
"column": 20
},
"identifierName": "pointX"
@@ -13794,100 +10836,100 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8083,
- "end": 8147,
+ "start": 7640,
+ "end": 7699,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 23
},
"end": {
- "line": 164,
- "column": 87
+ "line": 157,
+ "column": 82
}
},
"left": {
"type": "BinaryExpression",
- "start": 8084,
- "end": 8122,
+ "start": 7641,
+ "end": 7679,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 62
}
},
"left": {
"type": "BinaryExpression",
- "start": 8084,
- "end": 8118,
+ "start": 7641,
+ "end": 7675,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 58
}
},
"left": {
"type": "MemberExpression",
- "start": 8084,
- "end": 8106,
+ "start": 7641,
+ "end": 7663,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 46
}
},
"object": {
"type": "MemberExpression",
- "start": 8084,
- "end": 8104,
+ "start": 7641,
+ "end": 7661,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 44
}
},
"object": {
"type": "ThisExpression",
- "start": 8084,
- "end": 8088,
+ "start": 7641,
+ "end": 7645,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 24
},
"end": {
- "line": 164,
+ "line": 157,
"column": 28
}
}
},
"property": {
"type": "Identifier",
- "start": 8089,
- "end": 8104,
+ "start": 7646,
+ "end": 7661,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 29
},
"end": {
- "line": 164,
+ "line": 157,
"column": 44
},
"identifierName": "positionalPoint"
@@ -13898,15 +10940,15 @@
},
"property": {
"type": "Identifier",
- "start": 8105,
- "end": 8106,
+ "start": 7662,
+ "end": 7663,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 45
},
"end": {
- "line": 164,
+ "line": 157,
"column": 46
},
"identifierName": "x"
@@ -13918,29 +10960,29 @@
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 8109,
- "end": 8118,
+ "start": 7666,
+ "end": 7675,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 49
},
"end": {
- "line": 164,
+ "line": 157,
"column": 58
}
},
"object": {
"type": "Identifier",
- "start": 8109,
- "end": 8116,
+ "start": 7666,
+ "end": 7673,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 49
},
"end": {
- "line": 164,
+ "line": 157,
"column": 56
},
"identifierName": "pOffset"
@@ -13949,15 +10991,15 @@
},
"property": {
"type": "Identifier",
- "start": 8117,
- "end": 8118,
+ "start": 7674,
+ "end": 7675,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 57
},
"end": {
- "line": 164,
+ "line": 157,
"column": 58
},
"identifierName": "x"
@@ -13970,15 +11012,15 @@
"operator": "-",
"right": {
"type": "NumericLiteral",
- "start": 8121,
- "end": 8122,
+ "start": 7678,
+ "end": 7679,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 61
},
"end": {
- "line": 164,
+ "line": 157,
"column": 62
}
},
@@ -13990,84 +11032,84 @@
},
"extra": {
"parenthesized": true,
- "parenStart": 8083
+ "parenStart": 7640
}
},
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 8126,
- "end": 8147,
+ "start": 7683,
+ "end": 7699,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 66
},
"end": {
- "line": 164,
- "column": 87
+ "line": 157,
+ "column": 82
}
},
"object": {
"type": "MemberExpression",
- "start": 8126,
- "end": 8145,
+ "start": 7683,
+ "end": 7697,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 66
},
"end": {
- "line": 164,
- "column": 85
+ "line": 157,
+ "column": 80
}
},
"object": {
"type": "ThisExpression",
- "start": 8126,
- "end": 8130,
+ "start": 7683,
+ "end": 7687,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 66
},
"end": {
- "line": 164,
+ "line": 157,
"column": 70
}
}
},
"property": {
"type": "Identifier",
- "start": 8131,
- "end": 8145,
+ "start": 7688,
+ "end": 7697,
"loc": {
"start": {
- "line": 164,
+ "line": 157,
"column": 71
},
"end": {
- "line": 164,
- "column": 85
+ "line": 157,
+ "column": 80
},
- "identifierName": "rawPixelsPoint"
+ "identifierName": "iconPoint"
},
- "name": "rawPixelsPoint"
+ "name": "iconPoint"
},
"computed": false
},
"property": {
"type": "Identifier",
- "start": 8146,
- "end": 8147,
+ "start": 7698,
+ "end": 7699,
"loc": {
"start": {
- "line": 164,
- "column": 86
+ "line": 157,
+ "column": 81
},
"end": {
- "line": 164,
- "column": 87
+ "line": 157,
+ "column": 82
},
"identifierName": "x"
},
@@ -14084,15 +11126,15 @@
{
"type": "CommentLine",
"value": " We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle",
- "start": 7837,
- "end": 7968,
+ "start": 7394,
+ "end": 7525,
"loc": {
"start": {
- "line": 162,
+ "line": 155,
"column": 8
},
"end": {
- "line": 162,
+ "line": 155,
"column": 139
}
}
@@ -14100,15 +11142,15 @@
{
"type": "CommentLine",
"value": " Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates",
- "start": 7977,
- "end": 8059,
+ "start": 7534,
+ "end": 7616,
"loc": {
"start": {
- "line": 163,
+ "line": 156,
"column": 8
},
"end": {
- "line": 163,
+ "line": 156,
"column": 90
}
}
@@ -14117,44 +11159,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8157,
- "end": 8237,
+ "start": 7709,
+ "end": 7784,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 8
},
"end": {
- "line": 165,
- "column": 88
+ "line": 158,
+ "column": 83
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8163,
- "end": 8236,
+ "start": 7715,
+ "end": 7783,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 14
},
"end": {
- "line": 165,
- "column": 87
+ "line": 158,
+ "column": 82
}
},
"id": {
"type": "Identifier",
- "start": 8163,
- "end": 8169,
+ "start": 7715,
+ "end": 7721,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 14
},
"end": {
- "line": 165,
+ "line": 158,
"column": 20
},
"identifierName": "pointY"
@@ -14163,100 +11205,100 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8172,
- "end": 8236,
+ "start": 7724,
+ "end": 7783,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 23
},
"end": {
- "line": 165,
- "column": 87
+ "line": 158,
+ "column": 82
}
},
"left": {
"type": "BinaryExpression",
- "start": 8173,
- "end": 8211,
+ "start": 7725,
+ "end": 7763,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 62
}
},
"left": {
"type": "BinaryExpression",
- "start": 8173,
- "end": 8207,
+ "start": 7725,
+ "end": 7759,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 58
}
},
"left": {
"type": "MemberExpression",
- "start": 8173,
- "end": 8195,
+ "start": 7725,
+ "end": 7747,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 46
}
},
"object": {
"type": "MemberExpression",
- "start": 8173,
- "end": 8193,
+ "start": 7725,
+ "end": 7745,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 44
}
},
"object": {
"type": "ThisExpression",
- "start": 8173,
- "end": 8177,
+ "start": 7725,
+ "end": 7729,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 24
},
"end": {
- "line": 165,
+ "line": 158,
"column": 28
}
}
},
"property": {
"type": "Identifier",
- "start": 8178,
- "end": 8193,
+ "start": 7730,
+ "end": 7745,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 29
},
"end": {
- "line": 165,
+ "line": 158,
"column": 44
},
"identifierName": "positionalPoint"
@@ -14267,15 +11309,15 @@
},
"property": {
"type": "Identifier",
- "start": 8194,
- "end": 8195,
+ "start": 7746,
+ "end": 7747,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 45
},
"end": {
- "line": 165,
+ "line": 158,
"column": 46
},
"identifierName": "y"
@@ -14287,29 +11329,29 @@
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 8198,
- "end": 8207,
+ "start": 7750,
+ "end": 7759,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 49
},
"end": {
- "line": 165,
+ "line": 158,
"column": 58
}
},
"object": {
"type": "Identifier",
- "start": 8198,
- "end": 8205,
+ "start": 7750,
+ "end": 7757,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 49
},
"end": {
- "line": 165,
+ "line": 158,
"column": 56
},
"identifierName": "pOffset"
@@ -14318,15 +11360,15 @@
},
"property": {
"type": "Identifier",
- "start": 8206,
- "end": 8207,
+ "start": 7758,
+ "end": 7759,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 57
},
"end": {
- "line": 165,
+ "line": 158,
"column": 58
},
"identifierName": "y"
@@ -14339,15 +11381,15 @@
"operator": "-",
"right": {
"type": "NumericLiteral",
- "start": 8210,
- "end": 8211,
+ "start": 7762,
+ "end": 7763,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 61
},
"end": {
- "line": 165,
+ "line": 158,
"column": 62
}
},
@@ -14359,84 +11401,84 @@
},
"extra": {
"parenthesized": true,
- "parenStart": 8172
+ "parenStart": 7724
}
},
"operator": "+",
"right": {
"type": "MemberExpression",
- "start": 8215,
- "end": 8236,
+ "start": 7767,
+ "end": 7783,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 66
},
"end": {
- "line": 165,
- "column": 87
+ "line": 158,
+ "column": 82
}
},
"object": {
"type": "MemberExpression",
- "start": 8215,
- "end": 8234,
+ "start": 7767,
+ "end": 7781,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 66
},
"end": {
- "line": 165,
- "column": 85
+ "line": 158,
+ "column": 80
}
},
"object": {
"type": "ThisExpression",
- "start": 8215,
- "end": 8219,
+ "start": 7767,
+ "end": 7771,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 66
},
"end": {
- "line": 165,
+ "line": 158,
"column": 70
}
}
},
"property": {
"type": "Identifier",
- "start": 8220,
- "end": 8234,
+ "start": 7772,
+ "end": 7781,
"loc": {
"start": {
- "line": 165,
+ "line": 158,
"column": 71
},
"end": {
- "line": 165,
- "column": 85
+ "line": 158,
+ "column": 80
},
- "identifierName": "rawPixelsPoint"
+ "identifierName": "iconPoint"
},
- "name": "rawPixelsPoint"
+ "name": "iconPoint"
},
"computed": false
},
"property": {
"type": "Identifier",
- "start": 8235,
- "end": 8236,
+ "start": 7782,
+ "end": 7783,
"loc": {
"start": {
- "line": 165,
- "column": 86
+ "line": 158,
+ "column": 81
},
"end": {
- "line": 165,
- "column": 87
+ "line": 158,
+ "column": 82
},
"identifierName": "y"
},
@@ -14452,15 +11494,15 @@
{
"type": "CommentLine",
"value": " translate point to origin",
- "start": 8246,
- "end": 8274,
+ "start": 7793,
+ "end": 7821,
"loc": {
"start": {
- "line": 166,
+ "line": 159,
"column": 8
},
"end": {
- "line": 166,
+ "line": 159,
"column": 36
}
}
@@ -14469,44 +11511,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8283,
- "end": 8309,
+ "start": 7830,
+ "end": 7856,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 8
},
"end": {
- "line": 167,
+ "line": 160,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8289,
- "end": 8308,
+ "start": 7836,
+ "end": 7855,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 14
},
"end": {
- "line": 167,
+ "line": 160,
"column": 33
}
},
"id": {
"type": "Identifier",
- "start": 8289,
- "end": 8294,
+ "start": 7836,
+ "end": 7841,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 14
},
"end": {
- "line": 167,
+ "line": 160,
"column": 19
},
"identifierName": "tempX"
@@ -14516,29 +11558,29 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8297,
- "end": 8308,
+ "start": 7844,
+ "end": 7855,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 22
},
"end": {
- "line": 167,
+ "line": 160,
"column": 33
}
},
"left": {
"type": "Identifier",
- "start": 8297,
- "end": 8303,
+ "start": 7844,
+ "end": 7850,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 22
},
"end": {
- "line": 167,
+ "line": 160,
"column": 28
},
"identifierName": "pointX"
@@ -14548,15 +11590,15 @@
"operator": "-",
"right": {
"type": "Identifier",
- "start": 8306,
- "end": 8308,
+ "start": 7853,
+ "end": 7855,
"loc": {
"start": {
- "line": 167,
+ "line": 160,
"column": 31
},
"end": {
- "line": 167,
+ "line": 160,
"column": 33
},
"identifierName": "cx"
@@ -14572,15 +11614,15 @@
{
"type": "CommentLine",
"value": " translate point to origin",
- "start": 8246,
- "end": 8274,
+ "start": 7793,
+ "end": 7821,
"loc": {
"start": {
- "line": 166,
+ "line": 159,
"column": 8
},
"end": {
- "line": 166,
+ "line": 159,
"column": 36
}
}
@@ -14589,44 +11631,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8318,
- "end": 8344,
+ "start": 7865,
+ "end": 7891,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 8
},
"end": {
- "line": 168,
+ "line": 161,
"column": 34
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8324,
- "end": 8343,
+ "start": 7871,
+ "end": 7890,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 14
},
"end": {
- "line": 168,
+ "line": 161,
"column": 33
}
},
"id": {
"type": "Identifier",
- "start": 8324,
- "end": 8329,
+ "start": 7871,
+ "end": 7876,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 14
},
"end": {
- "line": 168,
+ "line": 161,
"column": 19
},
"identifierName": "tempY"
@@ -14635,29 +11677,29 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8332,
- "end": 8343,
+ "start": 7879,
+ "end": 7890,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 22
},
"end": {
- "line": 168,
+ "line": 161,
"column": 33
}
},
"left": {
"type": "Identifier",
- "start": 8332,
- "end": 8338,
+ "start": 7879,
+ "end": 7885,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 22
},
"end": {
- "line": 168,
+ "line": 161,
"column": 28
},
"identifierName": "pointY"
@@ -14667,15 +11709,15 @@
"operator": "-",
"right": {
"type": "Identifier",
- "start": 8341,
- "end": 8343,
+ "start": 7888,
+ "end": 7890,
"loc": {
"start": {
- "line": 168,
+ "line": 161,
"column": 31
},
"end": {
- "line": 168,
+ "line": 161,
"column": 33
},
"identifierName": "cy"
@@ -14690,15 +11732,15 @@
{
"type": "CommentLine",
"value": " now apply rotation",
- "start": 8353,
- "end": 8374,
+ "start": 7900,
+ "end": 7921,
"loc": {
"start": {
- "line": 169,
+ "line": 162,
"column": 8
},
"end": {
- "line": 169,
+ "line": 162,
"column": 29
}
}
@@ -14707,44 +11749,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8383,
- "end": 8453,
+ "start": 7930,
+ "end": 8000,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 8
},
"end": {
- "line": 170,
+ "line": 163,
"column": 78
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8389,
- "end": 8452,
+ "start": 7936,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 14
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
"id": {
"type": "Identifier",
- "start": 8389,
- "end": 8397,
+ "start": 7936,
+ "end": 7944,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 14
},
"end": {
- "line": 170,
+ "line": 163,
"column": 22
},
"identifierName": "rotatedX"
@@ -14754,43 +11796,43 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8400,
- "end": 8452,
+ "start": 7947,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 25
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
"left": {
"type": "BinaryExpression",
- "start": 8400,
- "end": 8424,
+ "start": 7947,
+ "end": 7971,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 25
},
"end": {
- "line": 170,
+ "line": 163,
"column": 49
}
},
"left": {
"type": "Identifier",
- "start": 8400,
- "end": 8405,
+ "start": 7947,
+ "end": 7952,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 25
},
"end": {
- "line": 170,
+ "line": 163,
"column": 30
},
"identifierName": "tempX"
@@ -14800,43 +11842,43 @@
"operator": "*",
"right": {
"type": "CallExpression",
- "start": 8408,
- "end": 8424,
+ "start": 7955,
+ "end": 7971,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 33
},
"end": {
- "line": 170,
+ "line": 163,
"column": 49
}
},
"callee": {
"type": "MemberExpression",
- "start": 8408,
- "end": 8416,
+ "start": 7955,
+ "end": 7963,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 33
},
"end": {
- "line": 170,
+ "line": 163,
"column": 41
}
},
"object": {
"type": "Identifier",
- "start": 8408,
- "end": 8412,
+ "start": 7955,
+ "end": 7959,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 33
},
"end": {
- "line": 170,
+ "line": 163,
"column": 37
},
"identifierName": "Math"
@@ -14845,15 +11887,15 @@
},
"property": {
"type": "Identifier",
- "start": 8413,
- "end": 8416,
+ "start": 7960,
+ "end": 7963,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 38
},
"end": {
- "line": 170,
+ "line": 163,
"column": 41
},
"identifierName": "cos"
@@ -14865,15 +11907,15 @@
"arguments": [
{
"type": "Identifier",
- "start": 8417,
- "end": 8423,
+ "start": 7964,
+ "end": 7970,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 42
},
"end": {
- "line": 170,
+ "line": 163,
"column": 48
},
"identifierName": "pAngle"
@@ -14886,29 +11928,29 @@
"operator": "-",
"right": {
"type": "BinaryExpression",
- "start": 8427,
- "end": 8452,
+ "start": 7974,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 52
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
"left": {
"type": "Identifier",
- "start": 8427,
- "end": 8432,
+ "start": 7974,
+ "end": 7979,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 52
},
"end": {
- "line": 170,
+ "line": 163,
"column": 57
},
"identifierName": "tempY"
@@ -14918,15 +11960,15 @@
"operator": "*",
"right": {
"type": "UnaryExpression",
- "start": 8435,
- "end": 8452,
+ "start": 7982,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 60
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
@@ -14934,43 +11976,43 @@
"prefix": true,
"argument": {
"type": "CallExpression",
- "start": 8436,
- "end": 8452,
+ "start": 7983,
+ "end": 7999,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 61
},
"end": {
- "line": 170,
+ "line": 163,
"column": 77
}
},
"callee": {
"type": "MemberExpression",
- "start": 8436,
- "end": 8444,
+ "start": 7983,
+ "end": 7991,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 61
},
"end": {
- "line": 170,
+ "line": 163,
"column": 69
}
},
"object": {
"type": "Identifier",
- "start": 8436,
- "end": 8440,
+ "start": 7983,
+ "end": 7987,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 61
},
"end": {
- "line": 170,
+ "line": 163,
"column": 65
},
"identifierName": "Math"
@@ -14979,15 +12021,15 @@
},
"property": {
"type": "Identifier",
- "start": 8441,
- "end": 8444,
+ "start": 7988,
+ "end": 7991,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 66
},
"end": {
- "line": 170,
+ "line": 163,
"column": 69
},
"identifierName": "sin"
@@ -14999,15 +12041,15 @@
"arguments": [
{
"type": "Identifier",
- "start": 8445,
- "end": 8451,
+ "start": 7992,
+ "end": 7998,
"loc": {
"start": {
- "line": 170,
+ "line": 163,
"column": 70
},
"end": {
- "line": 170,
+ "line": 163,
"column": 76
},
"identifierName": "pAngle"
@@ -15030,15 +12072,15 @@
{
"type": "CommentLine",
"value": " now apply rotation",
- "start": 8353,
- "end": 8374,
+ "start": 7900,
+ "end": 7921,
"loc": {
"start": {
- "line": 169,
+ "line": 162,
"column": 8
},
"end": {
- "line": 169,
+ "line": 162,
"column": 29
}
}
@@ -15047,44 +12089,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8462,
- "end": 8532,
+ "start": 8009,
+ "end": 8079,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 8
},
"end": {
- "line": 171,
+ "line": 164,
"column": 78
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8468,
- "end": 8531,
+ "start": 8015,
+ "end": 8078,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 14
},
"end": {
- "line": 171,
+ "line": 164,
"column": 77
}
},
"id": {
"type": "Identifier",
- "start": 8468,
- "end": 8476,
+ "start": 8015,
+ "end": 8023,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 14
},
"end": {
- "line": 171,
+ "line": 164,
"column": 22
},
"identifierName": "rotatedY"
@@ -15093,43 +12135,43 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8479,
- "end": 8531,
+ "start": 8026,
+ "end": 8078,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 25
},
"end": {
- "line": 171,
+ "line": 164,
"column": 77
}
},
"left": {
"type": "BinaryExpression",
- "start": 8479,
- "end": 8504,
+ "start": 8026,
+ "end": 8051,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 25
},
"end": {
- "line": 171,
+ "line": 164,
"column": 50
}
},
"left": {
"type": "Identifier",
- "start": 8479,
- "end": 8484,
+ "start": 8026,
+ "end": 8031,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 25
},
"end": {
- "line": 171,
+ "line": 164,
"column": 30
},
"identifierName": "tempX"
@@ -15139,15 +12181,15 @@
"operator": "*",
"right": {
"type": "UnaryExpression",
- "start": 8487,
- "end": 8504,
+ "start": 8034,
+ "end": 8051,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 33
},
"end": {
- "line": 171,
+ "line": 164,
"column": 50
}
},
@@ -15155,43 +12197,43 @@
"prefix": true,
"argument": {
"type": "CallExpression",
- "start": 8488,
- "end": 8504,
+ "start": 8035,
+ "end": 8051,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 34
},
"end": {
- "line": 171,
+ "line": 164,
"column": 50
}
},
"callee": {
"type": "MemberExpression",
- "start": 8488,
- "end": 8496,
+ "start": 8035,
+ "end": 8043,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 34
},
"end": {
- "line": 171,
+ "line": 164,
"column": 42
}
},
"object": {
"type": "Identifier",
- "start": 8488,
- "end": 8492,
+ "start": 8035,
+ "end": 8039,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 34
},
"end": {
- "line": 171,
+ "line": 164,
"column": 38
},
"identifierName": "Math"
@@ -15200,15 +12242,15 @@
},
"property": {
"type": "Identifier",
- "start": 8493,
- "end": 8496,
+ "start": 8040,
+ "end": 8043,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 39
},
"end": {
- "line": 171,
+ "line": 164,
"column": 42
},
"identifierName": "sin"
@@ -15220,15 +12262,15 @@
"arguments": [
{
"type": "Identifier",
- "start": 8497,
- "end": 8503,
+ "start": 8044,
+ "end": 8050,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 43
},
"end": {
- "line": 171,
+ "line": 164,
"column": 49
},
"identifierName": "pAngle"
@@ -15245,29 +12287,29 @@
"operator": "+",
"right": {
"type": "BinaryExpression",
- "start": 8507,
- "end": 8531,
+ "start": 8054,
+ "end": 8078,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 53
},
"end": {
- "line": 171,
+ "line": 164,
"column": 77
}
},
"left": {
"type": "Identifier",
- "start": 8507,
- "end": 8512,
+ "start": 8054,
+ "end": 8059,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 53
},
"end": {
- "line": 171,
+ "line": 164,
"column": 58
},
"identifierName": "tempY"
@@ -15277,43 +12319,43 @@
"operator": "*",
"right": {
"type": "CallExpression",
- "start": 8515,
- "end": 8531,
+ "start": 8062,
+ "end": 8078,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 61
},
"end": {
- "line": 171,
+ "line": 164,
"column": 77
}
},
"callee": {
"type": "MemberExpression",
- "start": 8515,
- "end": 8523,
+ "start": 8062,
+ "end": 8070,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 61
},
"end": {
- "line": 171,
+ "line": 164,
"column": 69
}
},
"object": {
"type": "Identifier",
- "start": 8515,
- "end": 8519,
+ "start": 8062,
+ "end": 8066,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 61
},
"end": {
- "line": 171,
+ "line": 164,
"column": 65
},
"identifierName": "Math"
@@ -15322,15 +12364,15 @@
},
"property": {
"type": "Identifier",
- "start": 8520,
- "end": 8523,
+ "start": 8067,
+ "end": 8070,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 66
},
"end": {
- "line": 171,
+ "line": 164,
"column": 69
},
"identifierName": "cos"
@@ -15342,15 +12384,15 @@
"arguments": [
{
"type": "Identifier",
- "start": 8524,
- "end": 8530,
+ "start": 8071,
+ "end": 8077,
"loc": {
"start": {
- "line": 171,
+ "line": 164,
"column": 70
},
"end": {
- "line": 171,
+ "line": 164,
"column": 76
},
"identifierName": "pAngle"
@@ -15368,15 +12410,15 @@
{
"type": "CommentLine",
"value": " translate back",
- "start": 8541,
- "end": 8558,
+ "start": 8088,
+ "end": 8105,
"loc": {
"start": {
- "line": 172,
+ "line": 165,
"column": 8
},
"end": {
- "line": 172,
+ "line": 165,
"column": 25
}
}
@@ -15385,44 +12427,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8567,
- "end": 8591,
+ "start": 8114,
+ "end": 8138,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 8
},
"end": {
- "line": 173,
+ "line": 166,
"column": 32
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8573,
- "end": 8590,
+ "start": 8120,
+ "end": 8137,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 14
},
"end": {
- "line": 173,
+ "line": 166,
"column": 31
}
},
"id": {
"type": "Identifier",
- "start": 8573,
- "end": 8574,
+ "start": 8120,
+ "end": 8121,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 14
},
"end": {
- "line": 173,
+ "line": 166,
"column": 15
},
"identifierName": "x"
@@ -15432,29 +12474,29 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8577,
- "end": 8590,
+ "start": 8124,
+ "end": 8137,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 18
},
"end": {
- "line": 173,
+ "line": 166,
"column": 31
}
},
"left": {
"type": "Identifier",
- "start": 8577,
- "end": 8585,
+ "start": 8124,
+ "end": 8132,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 18
},
"end": {
- "line": 173,
+ "line": 166,
"column": 26
},
"identifierName": "rotatedX"
@@ -15464,15 +12506,15 @@
"operator": "+",
"right": {
"type": "Identifier",
- "start": 8588,
- "end": 8590,
+ "start": 8135,
+ "end": 8137,
"loc": {
"start": {
- "line": 173,
+ "line": 166,
"column": 29
},
"end": {
- "line": 173,
+ "line": 166,
"column": 31
},
"identifierName": "cx"
@@ -15488,15 +12530,15 @@
{
"type": "CommentLine",
"value": " translate back",
- "start": 8541,
- "end": 8558,
+ "start": 8088,
+ "end": 8105,
"loc": {
"start": {
- "line": 172,
+ "line": 165,
"column": 8
},
"end": {
- "line": 172,
+ "line": 165,
"column": 25
}
}
@@ -15505,44 +12547,44 @@
},
{
"type": "VariableDeclaration",
- "start": 8600,
- "end": 8624,
+ "start": 8147,
+ "end": 8171,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 8
},
"end": {
- "line": 174,
+ "line": 167,
"column": 32
}
},
"declarations": [
{
"type": "VariableDeclarator",
- "start": 8606,
- "end": 8623,
+ "start": 8153,
+ "end": 8170,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 14
},
"end": {
- "line": 174,
+ "line": 167,
"column": 31
}
},
"id": {
"type": "Identifier",
- "start": 8606,
- "end": 8607,
+ "start": 8153,
+ "end": 8154,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 14
},
"end": {
- "line": 174,
+ "line": 167,
"column": 15
},
"identifierName": "y"
@@ -15551,29 +12593,29 @@
},
"init": {
"type": "BinaryExpression",
- "start": 8610,
- "end": 8623,
+ "start": 8157,
+ "end": 8170,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 18
},
"end": {
- "line": 174,
+ "line": 167,
"column": 31
}
},
"left": {
"type": "Identifier",
- "start": 8610,
- "end": 8618,
+ "start": 8157,
+ "end": 8165,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 18
},
"end": {
- "line": 174,
+ "line": 167,
"column": 26
},
"identifierName": "rotatedY"
@@ -15583,15 +12625,15 @@
"operator": "+",
"right": {
"type": "Identifier",
- "start": 8621,
- "end": 8623,
+ "start": 8168,
+ "end": 8170,
"loc": {
"start": {
- "line": 174,
+ "line": 167,
"column": 29
},
"end": {
- "line": 174,
+ "line": 167,
"column": 31
},
"identifierName": "cy"
@@ -15605,87 +12647,87 @@
},
{
"type": "ExpressionStatement",
- "start": 8633,
- "end": 8650,
+ "start": 8180,
+ "end": 8197,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
- "start": 8633,
- "end": 8649,
+ "start": 8180,
+ "end": 8196,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
- "start": 8633,
- "end": 8645,
+ "start": 8180,
+ "end": 8192,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 20
}
},
"object": {
"type": "MemberExpression",
- "start": 8633,
- "end": 8643,
+ "start": 8180,
+ "end": 8190,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 18
}
},
"object": {
"type": "ThisExpression",
- "start": 8633,
- "end": 8637,
+ "start": 8180,
+ "end": 8184,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 8
},
"end": {
- "line": 175,
+ "line": 168,
"column": 12
}
}
},
"property": {
"type": "Identifier",
- "start": 8638,
- "end": 8643,
+ "start": 8185,
+ "end": 8190,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 13
},
"end": {
- "line": 175,
+ "line": 168,
"column": 18
},
"identifierName": "point"
@@ -15696,15 +12738,15 @@
},
"property": {
"type": "Identifier",
- "start": 8644,
- "end": 8645,
+ "start": 8191,
+ "end": 8192,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 19
},
"end": {
- "line": 175,
+ "line": 168,
"column": 20
},
"identifierName": "x"
@@ -15715,15 +12757,15 @@
},
"right": {
"type": "Identifier",
- "start": 8648,
- "end": 8649,
+ "start": 8195,
+ "end": 8196,
"loc": {
"start": {
- "line": 175,
+ "line": 168,
"column": 23
},
"end": {
- "line": 175,
+ "line": 168,
"column": 24
},
"identifierName": "x"
@@ -15734,87 +12776,87 @@
},
{
"type": "ExpressionStatement",
- "start": 8659,
- "end": 8676,
+ "start": 8206,
+ "end": 8223,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 25
}
},
"expression": {
"type": "AssignmentExpression",
- "start": 8659,
- "end": 8675,
+ "start": 8206,
+ "end": 8222,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 24
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
- "start": 8659,
- "end": 8671,
+ "start": 8206,
+ "end": 8218,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 20
}
},
"object": {
"type": "MemberExpression",
- "start": 8659,
- "end": 8669,
+ "start": 8206,
+ "end": 8216,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 18
}
},
"object": {
"type": "ThisExpression",
- "start": 8659,
- "end": 8663,
+ "start": 8206,
+ "end": 8210,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 8
},
"end": {
- "line": 176,
+ "line": 169,
"column": 12
}
}
},
"property": {
"type": "Identifier",
- "start": 8664,
- "end": 8669,
+ "start": 8211,
+ "end": 8216,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 13
},
"end": {
- "line": 176,
+ "line": 169,
"column": 18
},
"identifierName": "point"
@@ -15825,15 +12867,15 @@
},
"property": {
"type": "Identifier",
- "start": 8670,
- "end": 8671,
+ "start": 8217,
+ "end": 8218,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 19
},
"end": {
- "line": 176,
+ "line": 169,
"column": 20
},
"identifierName": "y"
@@ -15844,15 +12886,15 @@
},
"right": {
"type": "Identifier",
- "start": 8674,
- "end": 8675,
+ "start": 8221,
+ "end": 8222,
"loc": {
"start": {
- "line": 176,
+ "line": 169,
"column": 23
},
"end": {
- "line": 176,
+ "line": 169,
"column": 24
},
"identifierName": "y"
@@ -15863,58 +12905,58 @@
},
{
"type": "ReturnStatement",
- "start": 8685,
- "end": 8703,
+ "start": 8232,
+ "end": 8250,
"loc": {
"start": {
- "line": 177,
+ "line": 170,
"column": 8
},
"end": {
- "line": 177,
+ "line": 170,
"column": 26
}
},
"argument": {
"type": "MemberExpression",
- "start": 8692,
- "end": 8702,
+ "start": 8239,
+ "end": 8249,
"loc": {
"start": {
- "line": 177,
+ "line": 170,
"column": 15
},
"end": {
- "line": 177,
+ "line": 170,
"column": 25
}
},
"object": {
"type": "ThisExpression",
- "start": 8692,
- "end": 8696,
+ "start": 8239,
+ "end": 8243,
"loc": {
"start": {
- "line": 177,
+ "line": 170,
"column": 15
},
"end": {
- "line": 177,
+ "line": 170,
"column": 19
}
}
},
"property": {
"type": "Identifier",
- "start": 8697,
- "end": 8702,
+ "start": 8244,
+ "end": 8249,
"loc": {
"start": {
- "line": 177,
+ "line": 170,
"column": 20
},
"end": {
- "line": 177,
+ "line": 170,
"column": 25
},
"identifierName": "point"
@@ -15931,16 +12973,16 @@
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle\n * @prop {number} pOffset.x - The x offset of the rectangle\n * @prop {number} pOffset.y - The y offset of the rectangle\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
- "start": 5022,
- "end": 7343,
+ "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account.\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.\n * @prop {number} pOffset.x - The x offset of the rectangle.\n * @prop {number} pOffset.y - The y offset of the rectangle.\n * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.\n * @prop {number} pAnchor.x - The x anchor of the rectangle.\n * @prop {number} pAnchor.y - The y anchor of the rectangle.\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
+ "start": 4430,
+ "end": 6955,
"loc": {
"start": {
- "line": 118,
+ "line": 110,
"column": 4
},
"end": {
- "line": 153,
+ "line": 148,
"column": 7
}
}
@@ -15949,16 +12991,16 @@
"trailingComments": [
{
"type": "CommentBlock",
- "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle\n ",
- "start": 8714,
- "end": 9079,
+ "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 8261,
+ "end": 8712,
"loc": {
"start": {
- "line": 179,
+ "line": 172,
"column": 4
},
"end": {
- "line": 185,
+ "line": 179,
"column": 7
}
}
@@ -15967,15 +13009,15 @@
},
{
"type": "ClassMethod",
- "start": 9084,
- "end": 9299,
+ "start": 8717,
+ "end": 8927,
"loc": {
"start": {
- "line": 186,
+ "line": 180,
"column": 4
},
"end": {
- "line": 189,
+ "line": 184,
"column": 5
}
},
@@ -15983,15 +13025,15 @@
"computed": false,
"key": {
"type": "Identifier",
- "start": 9084,
- "end": 9092,
+ "start": 8717,
+ "end": 8725,
"loc": {
"start": {
- "line": 186,
+ "line": 180,
"column": 4
},
"end": {
- "line": 186,
+ "line": 180,
"column": 12
},
"identifierName": "setPoint"
@@ -16007,15 +13049,15 @@
"params": [
{
"type": "Identifier",
- "start": 9093,
- "end": 9099,
+ "start": 8726,
+ "end": 8732,
"loc": {
"start": {
- "line": 186,
+ "line": 180,
"column": 13
},
"end": {
- "line": 186,
+ "line": 180,
"column": 19
},
"identifierName": "pPoint"
@@ -16025,363 +13067,479 @@
],
"body": {
"type": "BlockStatement",
- "start": 9101,
- "end": 9299,
+ "start": 8734,
+ "end": 8927,
"loc": {
"start": {
- "line": 186,
+ "line": 180,
"column": 21
},
"end": {
- "line": 189,
+ "line": 184,
"column": 5
}
},
"body": [
{
- "type": "ExpressionStatement",
- "start": 9111,
- "end": 9197,
+ "type": "VariableDeclaration",
+ "start": 8744,
+ "end": 8782,
"loc": {
"start": {
- "line": 187,
+ "line": 181,
"column": 8
},
"end": {
- "line": 187,
- "column": 94
+ "line": 181,
+ "column": 46
}
},
- "expression": {
- "type": "AssignmentExpression",
- "start": 9111,
- "end": 9196,
- "loc": {
- "start": {
- "line": 187,
- "column": 8
- },
- "end": {
- "line": 187,
- "column": 93
- }
- },
- "operator": "=",
- "left": {
- "type": "MemberExpression",
- "start": 9111,
- "end": 9132,
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 8750,
+ "end": 8781,
"loc": {
"start": {
- "line": 187,
- "column": 8
+ "line": 181,
+ "column": 14
},
"end": {
- "line": 187,
- "column": 29
+ "line": 181,
+ "column": 45
}
},
- "object": {
- "type": "MemberExpression",
- "start": 9111,
- "end": 9130,
+ "id": {
+ "type": "ObjectPattern",
+ "start": 8750,
+ "end": 8772,
"loc": {
"start": {
- "line": 187,
- "column": 8
+ "line": 181,
+ "column": 14
},
"end": {
- "line": 187,
- "column": 27
+ "line": 181,
+ "column": 36
}
},
- "object": {
- "type": "ThisExpression",
- "start": 9111,
- "end": 9115,
- "loc": {
- "start": {
- "line": 187,
- "column": 8
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 8752,
+ "end": 8753,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 16
+ },
+ "end": {
+ "line": 181,
+ "column": 17
+ }
},
- "end": {
- "line": 187,
- "column": 12
- }
- }
- },
- "property": {
- "type": "Identifier",
- "start": 9116,
- "end": 9130,
- "loc": {
- "start": {
- "line": 187,
- "column": 13
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 8752,
+ "end": 8753,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 16
+ },
+ "end": {
+ "line": 181,
+ "column": 17
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
},
- "end": {
- "line": 187,
- "column": 27
+ "value": {
+ "type": "Identifier",
+ "start": 8752,
+ "end": 8753,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 16
+ },
+ "end": {
+ "line": 181,
+ "column": 17
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
},
- "identifierName": "rawPixelsPoint"
- },
- "name": "rawPixelsPoint"
- },
- "computed": false
- },
- "property": {
- "type": "Identifier",
- "start": 9131,
- "end": 9132,
- "loc": {
- "start": {
- "line": 187,
- "column": 28
- },
- "end": {
- "line": 187,
- "column": 29
- },
- "identifierName": "x"
- },
- "name": "x"
- },
- "computed": false
- },
- "right": {
- "type": "ConditionalExpression",
- "start": 9135,
- "end": 9196,
- "loc": {
- "start": {
- "line": 187,
- "column": 32
- },
- "end": {
- "line": 187,
- "column": 93
- }
- },
- "test": {
- "type": "MemberExpression",
- "start": 9135,
- "end": 9154,
- "loc": {
- "start": {
- "line": 187,
- "column": 32
+ "extra": {
+ "shorthand": true
+ }
},
- "end": {
- "line": 187,
- "column": 51
- }
- },
- "object": {
- "type": "Identifier",
- "start": 9135,
- "end": 9141,
- "loc": {
- "start": {
- "line": 187,
- "column": 32
- },
- "end": {
- "line": 187,
- "column": 38
+ {
+ "type": "ObjectProperty",
+ "start": 8755,
+ "end": 8756,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 19
+ },
+ "end": {
+ "line": 181,
+ "column": 20
+ }
},
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 9142,
- "end": 9154,
- "loc": {
- "start": {
- "line": 187,
- "column": 39
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 8755,
+ "end": 8756,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 19
+ },
+ "end": {
+ "line": 181,
+ "column": 20
+ },
+ "identifierName": "y"
+ },
+ "name": "y"
},
- "end": {
- "line": 187,
- "column": 51
+ "value": {
+ "type": "Identifier",
+ "start": 8755,
+ "end": 8756,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 19
+ },
+ "end": {
+ "line": 181,
+ "column": 20
+ },
+ "identifierName": "y"
+ },
+ "name": "y"
+ },
+ "extra": {
+ "shorthand": true
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 8758,
+ "end": 8770,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 22
+ },
+ "end": {
+ "line": 181,
+ "column": 34
+ }
},
- "identifierName": "useRawPixels"
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 8758,
+ "end": 8770,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 22
+ },
+ "end": {
+ "line": 181,
+ "column": 34
+ },
+ "identifierName": "isNormalized"
+ },
+ "name": "isNormalized"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 8758,
+ "end": 8770,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 22
+ },
+ "end": {
+ "line": 181,
+ "column": 34
+ },
+ "identifierName": "isNormalized"
+ },
+ "name": "isNormalized"
+ },
+ "extra": {
+ "shorthand": true
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 8775,
+ "end": 8781,
+ "loc": {
+ "start": {
+ "line": 181,
+ "column": 39
},
- "name": "useRawPixels"
+ "end": {
+ "line": 181,
+ "column": 45
+ },
+ "identifierName": "pPoint"
},
- "computed": false
+ "name": "pPoint"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 8791,
+ "end": 8851,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 8
+ },
+ "end": {
+ "line": 182,
+ "column": 68
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 8791,
+ "end": 8850,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 8
},
- "consequent": {
+ "end": {
+ "line": 182,
+ "column": 67
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 8791,
+ "end": 8807,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 8
+ },
+ "end": {
+ "line": 182,
+ "column": 24
+ }
+ },
+ "object": {
"type": "MemberExpression",
- "start": 9157,
- "end": 9165,
+ "start": 8791,
+ "end": 8805,
"loc": {
"start": {
- "line": 187,
- "column": 54
+ "line": 182,
+ "column": 8
},
"end": {
- "line": 187,
- "column": 62
+ "line": 182,
+ "column": 22
}
},
"object": {
- "type": "Identifier",
- "start": 9157,
- "end": 9163,
+ "type": "ThisExpression",
+ "start": 8791,
+ "end": 8795,
"loc": {
"start": {
- "line": 187,
- "column": 54
+ "line": 182,
+ "column": 8
},
"end": {
- "line": 187,
- "column": 60
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
+ "line": 182,
+ "column": 12
+ }
+ }
},
"property": {
"type": "Identifier",
- "start": 9164,
- "end": 9165,
+ "start": 8796,
+ "end": 8805,
"loc": {
"start": {
- "line": 187,
- "column": 61
+ "line": 182,
+ "column": 13
},
"end": {
- "line": 187,
- "column": 62
+ "line": 182,
+ "column": 22
},
- "identifierName": "x"
+ "identifierName": "iconPoint"
},
- "name": "x"
+ "name": "iconPoint"
},
"computed": false
},
- "alternate": {
+ "property": {
+ "type": "Identifier",
+ "start": 8806,
+ "end": 8807,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 23
+ },
+ "end": {
+ "line": 182,
+ "column": 24
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "ConditionalExpression",
+ "start": 8810,
+ "end": 8850,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 27
+ },
+ "end": {
+ "line": 182,
+ "column": 67
+ }
+ },
+ "test": {
+ "type": "Identifier",
+ "start": 8810,
+ "end": 8822,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 27
+ },
+ "end": {
+ "line": 182,
+ "column": 39
+ },
+ "identifierName": "isNormalized"
+ },
+ "name": "isNormalized"
+ },
+ "consequent": {
"type": "BinaryExpression",
- "start": 9168,
- "end": 9196,
+ "start": 8825,
+ "end": 8846,
"loc": {
"start": {
- "line": 187,
- "column": 65
+ "line": 182,
+ "column": 42
},
"end": {
- "line": 187,
- "column": 93
+ "line": 182,
+ "column": 63
}
},
"left": {
- "type": "MemberExpression",
- "start": 9168,
- "end": 9176,
+ "type": "Identifier",
+ "start": 8825,
+ "end": 8826,
"loc": {
"start": {
- "line": 187,
- "column": 65
+ "line": 182,
+ "column": 42
},
"end": {
- "line": 187,
- "column": 73
- }
- },
- "object": {
- "type": "Identifier",
- "start": 9168,
- "end": 9174,
- "loc": {
- "start": {
- "line": 187,
- "column": 65
- },
- "end": {
- "line": 187,
- "column": 71
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 9175,
- "end": 9176,
- "loc": {
- "start": {
- "line": 187,
- "column": 72
- },
- "end": {
- "line": 187,
- "column": 73
- },
- "identifierName": "x"
+ "line": 182,
+ "column": 43
},
- "name": "x"
+ "identifierName": "x"
},
- "computed": false
+ "name": "x"
},
"operator": "*",
"right": {
"type": "MemberExpression",
- "start": 9179,
- "end": 9196,
+ "start": 8829,
+ "end": 8846,
"loc": {
"start": {
- "line": 187,
- "column": 76
+ "line": 182,
+ "column": 46
},
"end": {
- "line": 187,
- "column": 93
+ "line": 182,
+ "column": 63
}
},
"object": {
"type": "MemberExpression",
- "start": 9179,
- "end": 9190,
+ "start": 8829,
+ "end": 8840,
"loc": {
"start": {
- "line": 187,
- "column": 76
+ "line": 182,
+ "column": 46
},
"end": {
- "line": 187,
- "column": 87
+ "line": 182,
+ "column": 57
}
},
"object": {
"type": "ThisExpression",
- "start": 9179,
- "end": 9183,
+ "start": 8829,
+ "end": 8833,
"loc": {
"start": {
- "line": 187,
- "column": 76
+ "line": 182,
+ "column": 46
},
"end": {
- "line": 187,
- "column": 80
+ "line": 182,
+ "column": 50
}
}
},
"property": {
"type": "Identifier",
- "start": 9184,
- "end": 9190,
+ "start": 8834,
+ "end": 8840,
"loc": {
"start": {
- "line": 187,
- "column": 81
+ "line": 182,
+ "column": 51
},
"end": {
- "line": 187,
- "column": 87
+ "line": 182,
+ "column": 57
},
"identifierName": "bounds"
},
@@ -16391,16 +13549,16 @@
},
"property": {
"type": "Identifier",
- "start": 9191,
- "end": 9196,
+ "start": 8841,
+ "end": 8846,
"loc": {
"start": {
- "line": 187,
- "column": 88
+ "line": 182,
+ "column": 58
},
"end": {
- "line": 187,
- "column": 93
+ "line": 182,
+ "column": 63
},
"identifierName": "width"
},
@@ -16408,113 +13566,130 @@
},
"computed": false
}
+ },
+ "alternate": {
+ "type": "Identifier",
+ "start": 8849,
+ "end": 8850,
+ "loc": {
+ "start": {
+ "line": 182,
+ "column": 66
+ },
+ "end": {
+ "line": 182,
+ "column": 67
+ },
+ "identifierName": "x"
+ },
+ "name": "x"
}
}
}
},
{
"type": "ExpressionStatement",
- "start": 9206,
- "end": 9293,
+ "start": 8860,
+ "end": 8921,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
- "column": 95
+ "line": 183,
+ "column": 69
}
},
"expression": {
"type": "AssignmentExpression",
- "start": 9206,
- "end": 9292,
+ "start": 8860,
+ "end": 8920,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
- "column": 94
+ "line": 183,
+ "column": 68
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
- "start": 9206,
- "end": 9227,
+ "start": 8860,
+ "end": 8876,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
- "column": 29
+ "line": 183,
+ "column": 24
}
},
"object": {
"type": "MemberExpression",
- "start": 9206,
- "end": 9225,
+ "start": 8860,
+ "end": 8874,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
- "column": 27
+ "line": 183,
+ "column": 22
}
},
"object": {
"type": "ThisExpression",
- "start": 9206,
- "end": 9210,
+ "start": 8860,
+ "end": 8864,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 8
},
"end": {
- "line": 188,
+ "line": 183,
"column": 12
}
}
},
"property": {
"type": "Identifier",
- "start": 9211,
- "end": 9225,
+ "start": 8865,
+ "end": 8874,
"loc": {
"start": {
- "line": 188,
+ "line": 183,
"column": 13
},
"end": {
- "line": 188,
- "column": 27
+ "line": 183,
+ "column": 22
},
- "identifierName": "rawPixelsPoint"
+ "identifierName": "iconPoint"
},
- "name": "rawPixelsPoint"
+ "name": "iconPoint"
},
"computed": false
},
"property": {
"type": "Identifier",
- "start": 9226,
- "end": 9227,
+ "start": 8875,
+ "end": 8876,
"loc": {
"start": {
- "line": 188,
- "column": 28
+ "line": 183,
+ "column": 23
},
"end": {
- "line": 188,
- "column": 29
+ "line": 183,
+ "column": 24
},
"identifierName": "y"
},
@@ -16524,238 +13699,122 @@
},
"right": {
"type": "ConditionalExpression",
- "start": 9230,
- "end": 9292,
+ "start": 8879,
+ "end": 8920,
"loc": {
"start": {
- "line": 188,
- "column": 32
+ "line": 183,
+ "column": 27
},
"end": {
- "line": 188,
- "column": 94
+ "line": 183,
+ "column": 68
}
},
"test": {
- "type": "MemberExpression",
- "start": 9230,
- "end": 9249,
+ "type": "Identifier",
+ "start": 8879,
+ "end": 8891,
"loc": {
"start": {
- "line": 188,
- "column": 32
+ "line": 183,
+ "column": 27
+ },
+ "end": {
+ "line": 183,
+ "column": 39
+ },
+ "identifierName": "isNormalized"
+ },
+ "name": "isNormalized"
+ },
+ "consequent": {
+ "type": "BinaryExpression",
+ "start": 8894,
+ "end": 8916,
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 42
},
"end": {
- "line": 188,
- "column": 51
+ "line": 183,
+ "column": 64
}
},
- "object": {
+ "left": {
"type": "Identifier",
- "start": 9230,
- "end": 9236,
+ "start": 8894,
+ "end": 8895,
"loc": {
"start": {
- "line": 188,
- "column": 32
+ "line": 183,
+ "column": 42
},
"end": {
- "line": 188,
- "column": 38
+ "line": 183,
+ "column": 43
},
- "identifierName": "pPoint"
+ "identifierName": "y"
},
- "name": "pPoint"
+ "name": "y"
},
- "property": {
- "type": "Identifier",
- "start": 9237,
- "end": 9249,
+ "operator": "*",
+ "right": {
+ "type": "MemberExpression",
+ "start": 8898,
+ "end": 8916,
"loc": {
"start": {
- "line": 188,
- "column": 39
+ "line": 183,
+ "column": 46
},
"end": {
- "line": 188,
- "column": 51
- },
- "identifierName": "useRawPixels"
- },
- "name": "useRawPixels"
- },
- "computed": false
- },
- "consequent": {
- "type": "MemberExpression",
- "start": 9252,
- "end": 9260,
- "loc": {
- "start": {
- "line": 188,
- "column": 54
- },
- "end": {
- "line": 188,
- "column": 62
- }
- },
- "object": {
- "type": "Identifier",
- "start": 9252,
- "end": 9258,
- "loc": {
- "start": {
- "line": 188,
- "column": 54
- },
- "end": {
- "line": 188,
- "column": 60
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 9259,
- "end": 9260,
- "loc": {
- "start": {
- "line": 188,
- "column": 61
- },
- "end": {
- "line": 188,
- "column": 62
- },
- "identifierName": "y"
- },
- "name": "y"
- },
- "computed": false
- },
- "alternate": {
- "type": "BinaryExpression",
- "start": 9263,
- "end": 9292,
- "loc": {
- "start": {
- "line": 188,
- "column": 65
- },
- "end": {
- "line": 188,
- "column": 94
- }
- },
- "left": {
- "type": "MemberExpression",
- "start": 9263,
- "end": 9271,
- "loc": {
- "start": {
- "line": 188,
- "column": 65
- },
- "end": {
- "line": 188,
- "column": 73
- }
- },
- "object": {
- "type": "Identifier",
- "start": 9263,
- "end": 9269,
- "loc": {
- "start": {
- "line": 188,
- "column": 65
- },
- "end": {
- "line": 188,
- "column": 71
- },
- "identifierName": "pPoint"
- },
- "name": "pPoint"
- },
- "property": {
- "type": "Identifier",
- "start": 9270,
- "end": 9271,
- "loc": {
- "start": {
- "line": 188,
- "column": 72
- },
- "end": {
- "line": 188,
- "column": 73
- },
- "identifierName": "y"
- },
- "name": "y"
- },
- "computed": false
- },
- "operator": "*",
- "right": {
- "type": "MemberExpression",
- "start": 9274,
- "end": 9292,
- "loc": {
- "start": {
- "line": 188,
- "column": 76
- },
- "end": {
- "line": 188,
- "column": 94
- }
+ "line": 183,
+ "column": 64
+ }
},
"object": {
"type": "MemberExpression",
- "start": 9274,
- "end": 9285,
+ "start": 8898,
+ "end": 8909,
"loc": {
"start": {
- "line": 188,
- "column": 76
+ "line": 183,
+ "column": 46
},
"end": {
- "line": 188,
- "column": 87
+ "line": 183,
+ "column": 57
}
},
"object": {
"type": "ThisExpression",
- "start": 9274,
- "end": 9278,
+ "start": 8898,
+ "end": 8902,
"loc": {
"start": {
- "line": 188,
- "column": 76
+ "line": 183,
+ "column": 46
},
"end": {
- "line": 188,
- "column": 80
+ "line": 183,
+ "column": 50
}
}
},
"property": {
"type": "Identifier",
- "start": 9279,
- "end": 9285,
+ "start": 8903,
+ "end": 8909,
"loc": {
"start": {
- "line": 188,
- "column": 81
+ "line": 183,
+ "column": 51
},
"end": {
- "line": 188,
- "column": 87
+ "line": 183,
+ "column": 57
},
"identifierName": "bounds"
},
@@ -16765,16 +13824,16 @@
},
"property": {
"type": "Identifier",
- "start": 9286,
- "end": 9292,
+ "start": 8910,
+ "end": 8916,
"loc": {
"start": {
- "line": 188,
- "column": 88
+ "line": 183,
+ "column": 58
},
"end": {
- "line": 188,
- "column": 94
+ "line": 183,
+ "column": 64
},
"identifierName": "height"
},
@@ -16782,2679 +13841,1362 @@
},
"computed": false
}
+ },
+ "alternate": {
+ "type": "Identifier",
+ "start": 8919,
+ "end": 8920,
+ "loc": {
+ "start": {
+ "line": 183,
+ "column": 67
+ },
+ "end": {
+ "line": 183,
+ "column": 68
+ },
+ "identifierName": "y"
+ },
+ "name": "y"
}
}
}
}
],
- "directives": []
+ "directives": [],
+ "trailingComments": null
},
"leadingComments": [
{
"type": "CommentBlock",
- "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle\n ",
- "start": 8714,
- "end": 9079,
+ "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 8261,
+ "end": 8712,
"loc": {
"start": {
- "line": 179,
+ "line": 172,
"column": 4
},
"end": {
+ "line": 179,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Updates the bounds of the rectangle this icon point exists inside/outside of.\n * @param pBounds - The bounds to update the rectangle with.\n * @prop {number} pBounds.width - The width of the new rectangle.\n * @prop {number} pBounds.height - The height of the new rectangle.\n ",
+ "start": 8932,
+ "end": 9235,
+ "loc": {
+ "start": {
"line": 185,
+ "column": 4
+ },
+ "end": {
+ "line": 190,
"column": 7
}
}
}
]
- }
- ]
- },
- "leadingComments": [
- {
- "type": "CommentBlock",
- "value": "!\n * icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint\n * Compiled Sun, 17 Nov 2024 16:33:36 UTC\n *\n * icon-point is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n ",
- "start": 0,
- "end": 213,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 3
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * logger@1.0.0 git+https://github.com/EvitcaStudio/Logger\n * Compiled 1/9/2024, 7:19:18 AM UTC\n * \n * logger is licensed under a MIT styled License. See LICENSE.md for more info.\n * \n * Copyright 2024, Evitca Studio, All Rights Reserved\n ",
- "start": 214,
- "end": 459,
- "loc": {
- "start": {
- "line": 8,
- "column": 0
- },
- "end": {
- "line": 15,
- "column": 3
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * The IconPoint class\n * A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.\n * @example Example usage of this class\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n ",
- "start": 461,
- "end": 1157,
- "loc": {
- "start": {
- "line": 17,
- "column": 0
+ },
+ {
+ "type": "ClassMethod",
+ "start": 9240,
+ "end": 9384,
+ "loc": {
+ "start": {
+ "line": 191,
+ "column": 4
+ },
+ "end": {
+ "line": 195,
+ "column": 5
+ }
},
- "end": {
- "line": 29,
- "column": 3
- }
- }
- }
- ],
- "__PseudoExport__": false,
- "trailingComments": [
- {
- "type": "CommentLine",
- "value": "# sourceMappingURL=icon-point.mjs.map",
- "start": 9325,
- "end": 9364,
- "loc": {
- "start": {
- "line": 193,
- "column": 0
+ "static": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9240,
+ "end": 9252,
+ "loc": {
+ "start": {
+ "line": 191,
+ "column": 4
+ },
+ "end": {
+ "line": 191,
+ "column": 16
+ },
+ "identifierName": "updateBounds"
+ },
+ "name": "updateBounds",
+ "leadingComments": null
},
- "end": {
- "line": 193,
- "column": 39
- }
- }
- }
- ]
- },
- "specifiers": null,
- "source": null,
- "trailingComments": [
- {
- "type": "CommentLine",
- "value": "# sourceMappingURL=icon-point.mjs.map",
- "start": 9325,
- "end": 9364,
- "loc": {
- "start": {
- "line": 193,
- "column": 0
- },
- "end": {
- "line": 193,
- "column": 39
- }
- }
- }
- ],
- "leadingComments": null
- }
- ],
- "directives": []
- },
- "comments": [
- {
- "type": "CommentBlock",
- "value": "!\n * icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint\n * Compiled Sun, 17 Nov 2024 16:33:36 UTC\n *\n * icon-point is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n ",
- "start": 0,
- "end": 213,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 3
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * logger@1.0.0 git+https://github.com/EvitcaStudio/Logger\n * Compiled 1/9/2024, 7:19:18 AM UTC\n * \n * logger is licensed under a MIT styled License. See LICENSE.md for more info.\n * \n * Copyright 2024, Evitca Studio, All Rights Reserved\n ",
- "start": 214,
- "end": 459,
- "loc": {
- "start": {
- "line": 8,
- "column": 0
- },
- "end": {
- "line": 15,
- "column": 3
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * The IconPoint class\n * A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.\n * @example Example usage of this class\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n ",
- "start": 461,
- "end": 1157,
- "loc": {
- "start": {
- "line": 17,
- "column": 0
- },
- "end": {
- "line": 29,
- "column": 3
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * Static offset to use when none is passed.\n ",
- "start": 1180,
- "end": 1240,
- "loc": {
- "start": {
- "line": 31,
- "column": 4
- },
- "end": {
- "line": 33,
- "column": 7
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
- "start": 1288,
- "end": 1411,
- "loc": {
- "start": {
- "line": 35,
- "column": 4
- },
- "end": {
- "line": 37,
- "column": 7
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * The version of the module.\n ",
- "start": 1463,
- "end": 1508,
- "loc": {
- "start": {
- "line": 39,
- "column": 4
- },
- "end": {
- "line": 41,
- "column": 7
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
- "start": 1536,
- "end": 1641,
- "loc": {
- "start": {
- "line": 43,
- "column": 4
- },
- "end": {
- "line": 46,
- "column": 7
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * An object storing the raw pixel position\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
- "start": 1658,
- "end": 1894,
- "loc": {
- "start": {
- "line": 48,
- "column": 4
- },
- "end": {
- "line": 54,
- "column": 7
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * An object storing the position of the rectangle\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 1936,
- "end": 2165,
- "loc": {
- "start": {
- "line": 56,
- "column": 4
- },
- "end": {
- "line": 62,
- "column": 7
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 2198,
- "end": 2452,
- "loc": {
- "start": {
- "line": 64,
- "column": 4
- },
- "end": {
- "line": 70,
- "column": 7
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle\n * @prop {number} height - The height of the rectangle\n ",
- "start": 2485,
- "end": 2697,
- "loc": {
- "start": {
- "line": 72,
- "column": 4
- },
- "end": {
- "line": 78,
- "column": 7
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of\n * @prop {number} pPoint.x - The x coordinate of the rectangle\n * @prop {number} pPoint.y - The y coordinate of the rectangle\n * @param {Bounds} pBounds - The size of the rectangle\n * @prop {number} pBounds.width - The width of the rectangle\n * @prop {number} pBounds.height - The height of the rectangle\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle\n * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range\n ",
- "start": 2742,
- "end": 3649,
- "loc": {
- "start": {
- "line": 80,
- "column": 4
- },
- "end": {
- "line": 91,
- "column": 7
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " Check if the rectangle is a valid type",
- "start": 3705,
- "end": 3746,
- "loc": {
- "start": {
- "line": 93,
- "column": 8
- },
- "end": {
- "line": 93,
- "column": 49
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " Check if the rectangle has valid properties (x,y,width,height)",
- "start": 3866,
- "end": 3931,
- "loc": {
- "start": {
- "line": 95,
- "column": 12
- },
- "end": {
- "line": 95,
- "column": 77
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " Check if the point is a valid type",
- "start": 4410,
- "end": 4447,
- "loc": {
- "start": {
- "line": 105,
- "column": 8
- },
- "end": {
- "line": 105,
- "column": 45
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " Check if the point has valid properties",
- "start": 4543,
- "end": 4585,
- "loc": {
- "start": {
- "line": 107,
- "column": 12
- },
- "end": {
- "line": 107,
- "column": 54
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle\n * @prop {number} pOffset.x - The x offset of the rectangle\n * @prop {number} pOffset.y - The y offset of the rectangle\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
- "start": 5022,
- "end": 7343,
- "loc": {
- "start": {
- "line": 118,
- "column": 4
- },
- "end": {
- "line": 153,
- "column": 7
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " cx, cy - center of square coordinates ",
- "start": 7504,
- "end": 7545,
- "loc": {
- "start": {
- "line": 157,
- "column": 8
- },
- "end": {
- "line": 157,
- "column": 49
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " x, y - coordinates of a corner point of the square",
- "start": 7554,
- "end": 7607,
- "loc": {
- "start": {
- "line": 158,
- "column": 8
- },
- "end": {
- "line": 158,
- "column": 61
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " angle is the angle of rotation",
- "start": 7616,
- "end": 7649,
- "loc": {
- "start": {
- "line": 159,
- "column": 8
- },
- "end": {
- "line": 159,
- "column": 41
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle",
- "start": 7837,
- "end": 7968,
- "loc": {
- "start": {
- "line": 162,
- "column": 8
- },
- "end": {
- "line": 162,
- "column": 139
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates",
- "start": 7977,
- "end": 8059,
- "loc": {
- "start": {
- "line": 163,
- "column": 8
- },
- "end": {
- "line": 163,
- "column": 90
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " translate point to origin",
- "start": 8246,
- "end": 8274,
- "loc": {
- "start": {
- "line": 166,
- "column": 8
- },
- "end": {
- "line": 166,
- "column": 36
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " now apply rotation",
- "start": 8353,
- "end": 8374,
- "loc": {
- "start": {
- "line": 169,
- "column": 8
- },
- "end": {
- "line": 169,
- "column": 29
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " translate back",
- "start": 8541,
- "end": 8558,
- "loc": {
- "start": {
- "line": 172,
- "column": 8
- },
- "end": {
- "line": 172,
- "column": 25
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle\n ",
- "start": 8714,
- "end": 9079,
- "loc": {
- "start": {
- "line": 179,
- "column": 4
- },
- "end": {
- "line": 185,
- "column": 7
- }
- }
- },
- {
- "type": "CommentLine",
- "value": "# sourceMappingURL=icon-point.mjs.map",
- "start": 9325,
- "end": 9364,
- "loc": {
- "start": {
- "line": 193,
- "column": 0
- },
- "end": {
- "line": 193,
- "column": 39
- }
- }
- }
- ],
- "tokens": [
- {
- "type": "CommentBlock",
- "value": "!\n * icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint\n * Compiled Sun, 17 Nov 2024 16:33:36 UTC\n *\n * icon-point is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n ",
- "start": 0,
- "end": 213,
- "loc": {
- "start": {
- "line": 1,
- "column": 0
- },
- "end": {
- "line": 7,
- "column": 3
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * logger@1.0.0 git+https://github.com/EvitcaStudio/Logger\n * Compiled 1/9/2024, 7:19:18 AM UTC\n * \n * logger is licensed under a MIT styled License. See LICENSE.md for more info.\n * \n * Copyright 2024, Evitca Studio, All Rights Reserved\n ",
- "start": 214,
- "end": 459,
- "loc": {
- "start": {
- "line": 8,
- "column": 0
- },
- "end": {
- "line": 15,
- "column": 3
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * The IconPoint class\n * A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.\n * @example Example usage of this class\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n ",
- "start": 461,
- "end": 1157,
- "loc": {
- "start": {
- "line": 17,
- "column": 0
- },
- "end": {
- "line": 29,
- "column": 3
- }
- }
- },
- {
- "type": {
- "label": "class",
- "keyword": "class",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "class",
- "start": 1158,
- "end": 1163,
- "loc": {
- "start": {
- "line": 30,
- "column": 0
- },
- "end": {
- "line": 30,
- "column": 5
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "IconPoint",
- "start": 1164,
- "end": 1173,
- "loc": {
- "start": {
- "line": 30,
- "column": 6
- },
- "end": {
- "line": 30,
- "column": 15
- }
- }
- },
- {
- "type": {
- "label": "{",
- "beforeExpr": true,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 1174,
- "end": 1175,
- "loc": {
- "start": {
- "line": 30,
- "column": 16
- },
- "end": {
- "line": 30,
- "column": 17
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * Static offset to use when none is passed.\n ",
- "start": 1180,
- "end": 1240,
- "loc": {
- "start": {
- "line": 31,
- "column": 4
- },
- "end": {
- "line": 33,
- "column": 7
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "static",
- "start": 1245,
- "end": 1251,
- "loc": {
- "start": {
- "line": 34,
- "column": 4
- },
- "end": {
- "line": 34,
- "column": 10
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "defaultOffset",
- "start": 1252,
- "end": 1265,
- "loc": {
- "start": {
- "line": 34,
- "column": 11
- },
- "end": {
- "line": 34,
- "column": 24
- }
- }
- },
- {
- "type": {
- "label": "=",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": true,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "=",
- "start": 1266,
- "end": 1267,
- "loc": {
- "start": {
- "line": 34,
- "column": 25
- },
- "end": {
- "line": 34,
- "column": 26
- }
- }
- },
- {
- "type": {
- "label": "{",
- "beforeExpr": true,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 1268,
- "end": 1269,
- "loc": {
- "start": {
- "line": 34,
- "column": 27
- },
- "end": {
- "line": 34,
- "column": 28
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "x",
- "start": 1270,
- "end": 1271,
- "loc": {
- "start": {
- "line": 34,
- "column": 29
- },
- "end": {
- "line": 34,
- "column": 30
- }
- }
- },
- {
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1271,
- "end": 1272,
- "loc": {
- "start": {
- "line": 34,
- "column": 30
- },
- "end": {
- "line": 34,
- "column": 31
- }
- }
- },
- {
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 0,
- "start": 1273,
- "end": 1274,
- "loc": {
- "start": {
- "line": 34,
- "column": 32
- },
- "end": {
- "line": 34,
- "column": 33
- }
- }
- },
- {
- "type": {
- "label": ",",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1274,
- "end": 1275,
- "loc": {
- "start": {
- "line": 34,
- "column": 33
- },
- "end": {
- "line": 34,
- "column": 34
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "y",
- "start": 1276,
- "end": 1277,
- "loc": {
- "start": {
- "line": 34,
- "column": 35
- },
- "end": {
- "line": 34,
- "column": 36
- }
- }
- },
- {
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1277,
- "end": 1278,
- "loc": {
- "start": {
- "line": 34,
- "column": 36
- },
- "end": {
- "line": 34,
- "column": 37
- }
- }
- },
- {
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 0,
- "start": 1279,
- "end": 1280,
- "loc": {
- "start": {
- "line": 34,
- "column": 38
- },
- "end": {
- "line": 34,
- "column": 39
- }
- }
- },
- {
- "type": {
- "label": "}",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 1281,
- "end": 1282,
- "loc": {
- "start": {
- "line": 34,
- "column": 40
- },
- "end": {
- "line": 34,
- "column": 41
- }
- }
- },
- {
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1282,
- "end": 1283,
- "loc": {
- "start": {
- "line": 34,
- "column": 41
- },
- "end": {
- "line": 34,
- "column": 42
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
- "start": 1288,
- "end": 1411,
- "loc": {
- "start": {
- "line": 35,
- "column": 4
- },
- "end": {
- "line": 37,
- "column": 7
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "static",
- "start": 1416,
- "end": 1422,
- "loc": {
- "start": {
- "line": 38,
- "column": 4
- },
- "end": {
- "line": 38,
- "column": 10
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "defaultAnchor",
- "start": 1423,
- "end": 1436,
- "loc": {
- "start": {
- "line": 38,
- "column": 11
- },
- "end": {
- "line": 38,
- "column": 24
- }
- }
- },
- {
- "type": {
- "label": "=",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": true,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "=",
- "start": 1437,
- "end": 1438,
- "loc": {
- "start": {
- "line": 38,
- "column": 25
- },
- "end": {
- "line": 38,
- "column": 26
- }
- }
- },
- {
- "type": {
- "label": "{",
- "beforeExpr": true,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 1439,
- "end": 1440,
- "loc": {
- "start": {
- "line": 38,
- "column": 27
- },
- "end": {
- "line": 38,
- "column": 28
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "x",
- "start": 1441,
- "end": 1442,
- "loc": {
- "start": {
- "line": 38,
- "column": 29
- },
- "end": {
- "line": 38,
- "column": 30
- }
- }
- },
- {
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1442,
- "end": 1443,
- "loc": {
- "start": {
- "line": 38,
- "column": 30
- },
- "end": {
- "line": 38,
- "column": 31
- }
- }
- },
- {
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 0.5,
- "start": 1444,
- "end": 1447,
- "loc": {
- "start": {
- "line": 38,
- "column": 32
- },
- "end": {
- "line": 38,
- "column": 35
- }
- }
- },
- {
- "type": {
- "label": ",",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1447,
- "end": 1448,
- "loc": {
- "start": {
- "line": 38,
- "column": 35
- },
- "end": {
- "line": 38,
- "column": 36
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "y",
- "start": 1449,
- "end": 1450,
- "loc": {
- "start": {
- "line": 38,
- "column": 37
- },
- "end": {
- "line": 38,
- "column": 38
- }
- }
- },
- {
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1450,
- "end": 1451,
- "loc": {
- "start": {
- "line": 38,
- "column": 38
- },
- "end": {
- "line": 38,
- "column": 39
- }
- }
- },
- {
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 0.5,
- "start": 1452,
- "end": 1455,
- "loc": {
- "start": {
- "line": 38,
- "column": 40
- },
- "end": {
- "line": 38,
- "column": 43
- }
- }
- },
- {
- "type": {
- "label": "}",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 1456,
- "end": 1457,
- "loc": {
- "start": {
- "line": 38,
- "column": 44
- },
- "end": {
- "line": 38,
- "column": 45
- }
- }
- },
- {
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1457,
- "end": 1458,
- "loc": {
- "start": {
- "line": 38,
- "column": 45
- },
- "end": {
- "line": 38,
- "column": 46
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * The version of the module.\n ",
- "start": 1463,
- "end": 1508,
- "loc": {
- "start": {
- "line": 39,
- "column": 4
- },
- "end": {
- "line": 41,
- "column": 7
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "version",
- "start": 1513,
- "end": 1520,
- "loc": {
- "start": {
- "line": 42,
- "column": 4
- },
- "end": {
- "line": 42,
- "column": 11
- }
- }
- },
- {
- "type": {
- "label": "=",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": true,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "=",
- "start": 1521,
- "end": 1522,
- "loc": {
- "start": {
- "line": 42,
- "column": 12
- },
- "end": {
- "line": 42,
- "column": 13
- }
- }
- },
- {
- "type": {
- "label": "string",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "1.0.0",
- "start": 1523,
- "end": 1530,
- "loc": {
- "start": {
- "line": 42,
- "column": 14
- },
- "end": {
- "line": 42,
- "column": 21
- }
- }
- },
- {
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1530,
- "end": 1531,
- "loc": {
- "start": {
- "line": 42,
- "column": 21
- },
- "end": {
- "line": 42,
- "column": 22
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
- "start": 1536,
- "end": 1641,
- "loc": {
- "start": {
- "line": 43,
- "column": 4
- },
- "end": {
- "line": 46,
- "column": 7
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "logger",
- "start": 1646,
- "end": 1652,
- "loc": {
- "start": {
- "line": 47,
- "column": 4
- },
- "end": {
- "line": 47,
- "column": 10
- }
- }
- },
- {
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1652,
- "end": 1653,
- "loc": {
- "start": {
- "line": 47,
- "column": 10
- },
- "end": {
- "line": 47,
- "column": 11
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * An object storing the raw pixel position\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
- "start": 1658,
- "end": 1894,
- "loc": {
- "start": {
- "line": 48,
- "column": 4
- },
- "end": {
- "line": 54,
- "column": 7
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "rawPixelsPoint",
- "start": 1899,
- "end": 1913,
- "loc": {
- "start": {
- "line": 55,
- "column": 4
- },
- "end": {
- "line": 55,
- "column": 18
- }
- }
- },
- {
- "type": {
- "label": "=",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": true,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "=",
- "start": 1914,
- "end": 1915,
- "loc": {
- "start": {
- "line": 55,
- "column": 19
- },
- "end": {
- "line": 55,
- "column": 20
- }
- }
- },
- {
- "type": {
- "label": "{",
- "beforeExpr": true,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 1916,
- "end": 1917,
- "loc": {
- "start": {
- "line": 55,
- "column": 21
- },
- "end": {
- "line": 55,
- "column": 22
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "x",
- "start": 1918,
- "end": 1919,
- "loc": {
- "start": {
- "line": 55,
- "column": 23
- },
- "end": {
- "line": 55,
- "column": 24
- }
- }
- },
- {
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1919,
- "end": 1920,
- "loc": {
- "start": {
- "line": 55,
- "column": 24
- },
- "end": {
- "line": 55,
- "column": 25
- }
- }
- },
- {
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 0,
- "start": 1921,
- "end": 1922,
- "loc": {
- "start": {
- "line": 55,
- "column": 26
- },
- "end": {
- "line": 55,
- "column": 27
- }
- }
- },
- {
- "type": {
- "label": ",",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1922,
- "end": 1923,
- "loc": {
- "start": {
- "line": 55,
- "column": 27
- },
- "end": {
- "line": 55,
- "column": 28
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "y",
- "start": 1924,
- "end": 1925,
- "loc": {
- "start": {
- "line": 55,
- "column": 29
- },
- "end": {
- "line": 55,
- "column": 30
- }
- }
- },
- {
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1925,
- "end": 1926,
- "loc": {
- "start": {
- "line": 55,
- "column": 30
- },
- "end": {
- "line": 55,
- "column": 31
- }
- }
- },
- {
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 0,
- "start": 1927,
- "end": 1928,
- "loc": {
- "start": {
- "line": 55,
- "column": 32
- },
- "end": {
- "line": 55,
- "column": 33
- }
- }
- },
- {
- "type": {
- "label": "}",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 1929,
- "end": 1930,
- "loc": {
- "start": {
- "line": 55,
- "column": 34
- },
- "end": {
- "line": 55,
- "column": 35
- }
- }
- },
- {
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 1930,
- "end": 1931,
- "loc": {
- "start": {
- "line": 55,
- "column": 35
- },
- "end": {
- "line": 55,
- "column": 36
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * An object storing the position of the rectangle\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 1936,
- "end": 2165,
- "loc": {
- "start": {
- "line": 56,
- "column": 4
- },
- "end": {
- "line": 62,
- "column": 7
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "positionalPoint",
- "start": 2170,
- "end": 2185,
- "loc": {
- "start": {
- "line": 63,
- "column": 4
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 9253,
+ "end": 9260,
+ "loc": {
+ "start": {
+ "line": 191,
+ "column": 17
+ },
+ "end": {
+ "line": 191,
+ "column": 24
+ },
+ "identifierName": "pBounds"
+ },
+ "name": "pBounds"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 9262,
+ "end": 9384,
+ "loc": {
+ "start": {
+ "line": 191,
+ "column": 26
+ },
+ "end": {
+ "line": 195,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 9272,
+ "end": 9306,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 8
+ },
+ "end": {
+ "line": 192,
+ "column": 42
+ }
+ },
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 9278,
+ "end": 9305,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 14
+ },
+ "end": {
+ "line": 192,
+ "column": 41
+ }
+ },
+ "id": {
+ "type": "ObjectPattern",
+ "start": 9278,
+ "end": 9295,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 14
+ },
+ "end": {
+ "line": 192,
+ "column": 31
+ }
+ },
+ "properties": [
+ {
+ "type": "ObjectProperty",
+ "start": 9280,
+ "end": 9285,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 16
+ },
+ "end": {
+ "line": 192,
+ "column": 21
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9280,
+ "end": 9285,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 16
+ },
+ "end": {
+ "line": 192,
+ "column": 21
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 9280,
+ "end": 9285,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 16
+ },
+ "end": {
+ "line": 192,
+ "column": 21
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ },
+ "extra": {
+ "shorthand": true
+ }
+ },
+ {
+ "type": "ObjectProperty",
+ "start": 9287,
+ "end": 9293,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 23
+ },
+ "end": {
+ "line": 192,
+ "column": 29
+ }
+ },
+ "method": false,
+ "shorthand": true,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9287,
+ "end": 9293,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 23
+ },
+ "end": {
+ "line": 192,
+ "column": 29
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
+ },
+ "value": {
+ "type": "Identifier",
+ "start": 9287,
+ "end": 9293,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 23
+ },
+ "end": {
+ "line": 192,
+ "column": 29
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
+ },
+ "extra": {
+ "shorthand": true
+ }
+ }
+ ]
+ },
+ "init": {
+ "type": "Identifier",
+ "start": 9298,
+ "end": 9305,
+ "loc": {
+ "start": {
+ "line": 192,
+ "column": 34
+ },
+ "end": {
+ "line": 192,
+ "column": 41
+ },
+ "identifierName": "pBounds"
+ },
+ "name": "pBounds"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 9315,
+ "end": 9341,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 9315,
+ "end": 9340,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 33
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 9315,
+ "end": 9332,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 25
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 9315,
+ "end": 9326,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 19
+ }
+ },
+ "object": {
+ "type": "ThisExpression",
+ "start": 9315,
+ "end": 9319,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 8
+ },
+ "end": {
+ "line": 193,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9320,
+ "end": 9326,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 13
+ },
+ "end": {
+ "line": 193,
+ "column": 19
+ },
+ "identifierName": "bounds"
+ },
+ "name": "bounds"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9327,
+ "end": 9332,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 20
+ },
+ "end": {
+ "line": 193,
+ "column": 25
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 9335,
+ "end": 9340,
+ "loc": {
+ "start": {
+ "line": 193,
+ "column": 28
+ },
+ "end": {
+ "line": 193,
+ "column": 33
+ },
+ "identifierName": "width"
+ },
+ "name": "width"
+ }
+ }
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 9350,
+ "end": 9378,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 8
+ },
+ "end": {
+ "line": 194,
+ "column": 36
+ }
+ },
+ "expression": {
+ "type": "AssignmentExpression",
+ "start": 9350,
+ "end": 9377,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 8
+ },
+ "end": {
+ "line": 194,
+ "column": 35
+ }
+ },
+ "operator": "=",
+ "left": {
+ "type": "MemberExpression",
+ "start": 9350,
+ "end": 9368,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 8
+ },
+ "end": {
+ "line": 194,
+ "column": 26
+ }
+ },
+ "object": {
+ "type": "MemberExpression",
+ "start": 9350,
+ "end": 9361,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 8
+ },
+ "end": {
+ "line": 194,
+ "column": 19
+ }
+ },
+ "object": {
+ "type": "ThisExpression",
+ "start": 9350,
+ "end": 9354,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 8
+ },
+ "end": {
+ "line": 194,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9355,
+ "end": 9361,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 13
+ },
+ "end": {
+ "line": 194,
+ "column": 19
+ },
+ "identifierName": "bounds"
+ },
+ "name": "bounds"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9362,
+ "end": 9368,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 20
+ },
+ "end": {
+ "line": 194,
+ "column": 26
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
+ },
+ "computed": false
+ },
+ "right": {
+ "type": "Identifier",
+ "start": 9371,
+ "end": 9377,
+ "loc": {
+ "start": {
+ "line": 194,
+ "column": 29
+ },
+ "end": {
+ "line": 194,
+ "column": 35
+ },
+ "identifierName": "height"
+ },
+ "name": "height"
+ }
+ }
+ }
+ ],
+ "directives": [],
+ "trailingComments": null
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Updates the bounds of the rectangle this icon point exists inside/outside of.\n * @param pBounds - The bounds to update the rectangle with.\n * @prop {number} pBounds.width - The width of the new rectangle.\n * @prop {number} pBounds.height - The height of the new rectangle.\n ",
+ "start": 8932,
+ "end": 9235,
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 4
+ },
+ "end": {
+ "line": 190,
+ "column": 7
+ }
+ }
+ }
+ ],
+ "trailingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Changes the icon point position.\n * @param pPoint - The point to update this icon point with.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 9389,
+ "end": 9774,
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 4
+ },
+ "end": {
+ "line": 202,
+ "column": 7
+ }
+ }
+ }
+ ]
+ },
+ {
+ "type": "ClassMethod",
+ "start": 9779,
+ "end": 9837,
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 4
+ },
+ "end": {
+ "line": 205,
+ "column": 5
+ }
+ },
+ "static": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 9779,
+ "end": 9790,
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 4
+ },
+ "end": {
+ "line": 203,
+ "column": 15
+ },
+ "identifierName": "updatePoint"
+ },
+ "name": "updatePoint",
+ "leadingComments": null
+ },
+ "kind": "method",
+ "id": null,
+ "generator": false,
+ "expression": false,
+ "async": false,
+ "params": [
+ {
+ "type": "Identifier",
+ "start": 9791,
+ "end": 9797,
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 16
+ },
+ "end": {
+ "line": 203,
+ "column": 22
+ },
+ "identifierName": "pPoint"
+ },
+ "name": "pPoint"
+ }
+ ],
+ "body": {
+ "type": "BlockStatement",
+ "start": 9799,
+ "end": 9837,
+ "loc": {
+ "start": {
+ "line": 203,
+ "column": 24
+ },
+ "end": {
+ "line": 205,
+ "column": 5
+ }
+ },
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 9809,
+ "end": 9831,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 8
+ },
+ "end": {
+ "line": 204,
+ "column": 30
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 9809,
+ "end": 9830,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 8
+ },
+ "end": {
+ "line": 204,
+ "column": 29
+ }
+ },
+ "callee": {
+ "type": "MemberExpression",
+ "start": 9809,
+ "end": 9822,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 8
+ },
+ "end": {
+ "line": 204,
+ "column": 21
+ }
+ },
+ "object": {
+ "type": "ThisExpression",
+ "start": 9809,
+ "end": 9813,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 8
+ },
+ "end": {
+ "line": 204,
+ "column": 12
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 9814,
+ "end": 9822,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 13
+ },
+ "end": {
+ "line": 204,
+ "column": 21
+ },
+ "identifierName": "setPoint"
+ },
+ "name": "setPoint"
+ },
+ "computed": false
+ },
+ "arguments": [
+ {
+ "type": "Identifier",
+ "start": 9823,
+ "end": 9829,
+ "loc": {
+ "start": {
+ "line": 204,
+ "column": 22
+ },
+ "end": {
+ "line": 204,
+ "column": 28
+ },
+ "identifierName": "pPoint"
+ },
+ "name": "pPoint"
+ }
+ ]
+ }
+ }
+ ],
+ "directives": []
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Changes the icon point position.\n * @param pPoint - The point to update this icon point with.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 9389,
+ "end": 9774,
+ "loc": {
+ "start": {
+ "line": 196,
+ "column": 4
+ },
+ "end": {
+ "line": 202,
+ "column": 7
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "leadingComments": [
+ {
+ "type": "CommentBlock",
+ "value": "!\n * icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint\n * Compiled Mon, 18 Nov 2024 12:34:38 UTC\n *\n * icon-point is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n ",
+ "start": 0,
+ "end": 213,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 3
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "*\n * logger@1.0.0 git+https://github.com/EvitcaStudio/Logger\n * Compiled 1/9/2024, 7:19:18 AM UTC\n * \n * logger is licensed under a MIT styled License. See LICENSE.md for more info.\n * \n * Copyright 2024, Evitca Studio, All Rights Reserved\n ",
+ "start": 214,
+ "end": 459,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 3
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "*\n * The IconPoint class\n * A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.\n * @example Example usage of this class\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n ",
+ "start": 460,
+ "end": 1136,
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 0
+ },
+ "end": {
+ "line": 28,
+ "column": 3
+ }
+ }
+ }
+ ],
+ "__PseudoExport__": false,
+ "trailingComments": [
+ {
+ "type": "CommentLine",
+ "value": "# sourceMappingURL=icon-point.mjs.map",
+ "start": 9863,
+ "end": 9902,
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 0
+ },
+ "end": {
+ "line": 209,
+ "column": 39
+ }
+ }
+ }
+ ]
},
- "end": {
- "line": 63,
- "column": 19
- }
+ "specifiers": null,
+ "source": null,
+ "trailingComments": [
+ {
+ "type": "CommentLine",
+ "value": "# sourceMappingURL=icon-point.mjs.map",
+ "start": 9863,
+ "end": 9902,
+ "loc": {
+ "start": {
+ "line": 209,
+ "column": 0
+ },
+ "end": {
+ "line": 209,
+ "column": 39
+ }
+ }
+ }
+ ],
+ "leadingComments": null
}
- },
+ ],
+ "directives": []
+ },
+ "comments": [
{
- "type": {
- "label": "=",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": true,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "=",
- "start": 2186,
- "end": 2187,
+ "type": "CommentBlock",
+ "value": "!\n * icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint\n * Compiled Mon, 18 Nov 2024 12:34:38 UTC\n *\n * icon-point is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n ",
+ "start": 0,
+ "end": 213,
"loc": {
"start": {
- "line": 63,
- "column": 20
+ "line": 1,
+ "column": 0
},
"end": {
- "line": 63,
- "column": 21
+ "line": 7,
+ "column": 3
}
}
},
{
- "type": {
- "label": "null",
- "keyword": "null",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "null",
- "start": 2188,
- "end": 2192,
+ "type": "CommentBlock",
+ "value": "*\n * logger@1.0.0 git+https://github.com/EvitcaStudio/Logger\n * Compiled 1/9/2024, 7:19:18 AM UTC\n * \n * logger is licensed under a MIT styled License. See LICENSE.md for more info.\n * \n * Copyright 2024, Evitca Studio, All Rights Reserved\n ",
+ "start": 214,
+ "end": 459,
"loc": {
"start": {
- "line": 63,
- "column": 22
+ "line": 8,
+ "column": 0
},
"end": {
- "line": 63,
- "column": 26
+ "line": 15,
+ "column": 3
}
}
},
{
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 2192,
- "end": 2193,
+ "type": "CommentBlock",
+ "value": "*\n * The IconPoint class\n * A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.\n * @example Example usage of this class\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n ",
+ "start": 460,
+ "end": 1136,
"loc": {
"start": {
- "line": 63,
- "column": 26
+ "line": 16,
+ "column": 0
},
"end": {
- "line": 63,
- "column": 27
+ "line": 28,
+ "column": 3
}
}
},
{
"type": "CommentBlock",
- "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n ",
- "start": 2198,
- "end": 2452,
+ "value": "*\n * Static offset to use when none is passed.\n ",
+ "start": 1159,
+ "end": 1219,
"loc": {
"start": {
- "line": 64,
+ "line": 30,
"column": 4
},
"end": {
- "line": 70,
+ "line": 32,
"column": 7
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "point",
- "start": 2457,
- "end": 2462,
+ "type": "CommentBlock",
+ "value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
+ "start": 1267,
+ "end": 1390,
"loc": {
"start": {
- "line": 71,
+ "line": 34,
"column": 4
},
"end": {
- "line": 71,
- "column": 9
+ "line": 36,
+ "column": 7
}
}
},
{
- "type": {
- "label": "=",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": true,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "=",
- "start": 2463,
- "end": 2464,
+ "type": "CommentBlock",
+ "value": "*\n * The version of the module.\n ",
+ "start": 1442,
+ "end": 1487,
"loc": {
"start": {
- "line": 71,
- "column": 10
+ "line": 38,
+ "column": 4
},
"end": {
- "line": 71,
- "column": 11
+ "line": 40,
+ "column": 7
}
}
},
{
- "type": {
- "label": "{",
- "beforeExpr": true,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 2465,
- "end": 2466,
+ "type": "CommentBlock",
+ "value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
+ "start": 1515,
+ "end": 1620,
"loc": {
"start": {
- "line": 71,
- "column": 12
+ "line": 42,
+ "column": 4
},
"end": {
- "line": 71,
- "column": 13
+ "line": 45,
+ "column": 7
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "x",
- "start": 2467,
- "end": 2468,
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the position of the point that was set. This is the point on the rectangle.\n * It can be changed at runtime.\n * ________\n * | |\n * | x |\n * | |\n * |_______|\n * @private\n * @type {Point}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
+ "start": 1637,
+ "end": 2043,
"loc": {
"start": {
- "line": 71,
- "column": 14
+ "line": 47,
+ "column": 4
},
"end": {
- "line": 71,
- "column": 15
+ "line": 59,
+ "column": 7
}
}
},
{
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 2468,
- "end": 2469,
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the position of the rectangle.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the rectangle.\n * @prop {number} y - The y position of the rectangle.\n ",
+ "start": 2080,
+ "end": 2302,
"loc": {
"start": {
- "line": 71,
- "column": 15
+ "line": 61,
+ "column": 4
},
"end": {
- "line": 71,
- "column": 16
+ "line": 67,
+ "column": 7
}
}
},
{
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 0,
- "start": 2470,
- "end": 2471,
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the point after rotation is applied.\n * @prop {number} y - The y position of the point after rotation is applied.\n ",
+ "start": 2328,
+ "end": 2618,
"loc": {
"start": {
- "line": 71,
- "column": 17
+ "line": 69,
+ "column": 4
},
"end": {
- "line": 71,
- "column": 18
+ "line": 75,
+ "column": 7
}
}
},
{
- "type": {
- "label": ",",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 2471,
- "end": 2472,
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle.\n * @prop {number} height - The height of the rectangle.\n ",
+ "start": 2651,
+ "end": 2865,
"loc": {
"start": {
- "line": 71,
- "column": 18
+ "line": 77,
+ "column": 4
},
"end": {
- "line": 71,
- "column": 19
+ "line": 83,
+ "column": 7
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "y",
- "start": 2473,
- "end": 2474,
+ "type": "CommentBlock",
+ "value": "*\n * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.\n * @prop {number} pPoint.x - The x coordinate of the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the rectangle.\n * @param {Bounds} pBounds - The size of the rectangle.\n * @prop {number} pBounds.width - The width of the rectangle.\n * @prop {number} pBounds.height - The height of the rectangle.\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.\n *\n * ## Normalized\n If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`\n The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.\n ",
+ "start": 2910,
+ "end": 4086,
"loc": {
"start": {
- "line": 71,
- "column": 20
+ "line": 85,
+ "column": 4
},
"end": {
- "line": 71,
- "column": 21
+ "line": 100,
+ "column": 7
}
}
},
{
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 2474,
- "end": 2475,
+ "type": "CommentBlock",
+ "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account.\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.\n * @prop {number} pOffset.x - The x offset of the rectangle.\n * @prop {number} pOffset.y - The y offset of the rectangle.\n * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.\n * @prop {number} pAnchor.x - The x anchor of the rectangle.\n * @prop {number} pAnchor.y - The y anchor of the rectangle.\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
+ "start": 4430,
+ "end": 6955,
"loc": {
"start": {
- "line": 71,
- "column": 21
+ "line": 110,
+ "column": 4
},
"end": {
- "line": 71,
- "column": 22
+ "line": 148,
+ "column": 7
}
}
},
{
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 0,
- "start": 2476,
- "end": 2477,
+ "type": "CommentLine",
+ "value": " cx, cy - center of square coordinates ",
+ "start": 7061,
+ "end": 7102,
"loc": {
"start": {
- "line": 71,
- "column": 23
+ "line": 150,
+ "column": 8
},
"end": {
- "line": 71,
- "column": 24
+ "line": 150,
+ "column": 49
}
}
},
{
- "type": {
- "label": "}",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 2478,
- "end": 2479,
+ "type": "CommentLine",
+ "value": " x, y - coordinates of a corner point of the square",
+ "start": 7111,
+ "end": 7164,
"loc": {
"start": {
- "line": 71,
- "column": 25
+ "line": 151,
+ "column": 8
},
"end": {
- "line": 71,
- "column": 26
+ "line": 151,
+ "column": 61
}
}
},
{
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 2479,
- "end": 2480,
+ "type": "CommentLine",
+ "value": " angle is the angle of rotation",
+ "start": 7173,
+ "end": 7206,
"loc": {
"start": {
- "line": 71,
- "column": 26
+ "line": 152,
+ "column": 8
},
"end": {
- "line": 71,
- "column": 27
+ "line": 152,
+ "column": 41
}
}
},
{
- "type": "CommentBlock",
- "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle\n * @prop {number} height - The height of the rectangle\n ",
- "start": 2485,
- "end": 2697,
+ "type": "CommentLine",
+ "value": " We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle",
+ "start": 7394,
+ "end": 7525,
"loc": {
"start": {
- "line": 72,
- "column": 4
+ "line": 155,
+ "column": 8
},
"end": {
- "line": 78,
- "column": 7
+ "line": 155,
+ "column": 139
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "bounds",
- "start": 2702,
- "end": 2708,
+ "type": "CommentLine",
+ "value": " Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates",
+ "start": 7534,
+ "end": 7616,
"loc": {
"start": {
- "line": 79,
- "column": 4
+ "line": 156,
+ "column": 8
},
"end": {
- "line": 79,
- "column": 10
+ "line": 156,
+ "column": 90
}
}
},
{
- "type": {
- "label": "=",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": true,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "=",
- "start": 2709,
- "end": 2710,
+ "type": "CommentLine",
+ "value": " translate point to origin",
+ "start": 7793,
+ "end": 7821,
"loc": {
"start": {
- "line": 79,
- "column": 11
+ "line": 159,
+ "column": 8
},
"end": {
- "line": 79,
- "column": 12
+ "line": 159,
+ "column": 36
}
}
},
{
- "type": {
- "label": "{",
- "beforeExpr": true,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 2711,
- "end": 2712,
+ "type": "CommentLine",
+ "value": " now apply rotation",
+ "start": 7900,
+ "end": 7921,
"loc": {
"start": {
- "line": 79,
- "column": 13
+ "line": 162,
+ "column": 8
},
"end": {
- "line": 79,
- "column": 14
+ "line": 162,
+ "column": 29
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "width",
- "start": 2713,
- "end": 2718,
+ "type": "CommentLine",
+ "value": " translate back",
+ "start": 8088,
+ "end": 8105,
"loc": {
"start": {
- "line": 79,
- "column": 15
+ "line": 165,
+ "column": 8
},
"end": {
- "line": 79,
- "column": 20
+ "line": 165,
+ "column": 25
}
}
},
{
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 2718,
- "end": 2719,
+ "type": "CommentBlock",
+ "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 8261,
+ "end": 8712,
"loc": {
"start": {
- "line": 79,
- "column": 20
+ "line": 172,
+ "column": 4
},
"end": {
- "line": 79,
- "column": 21
+ "line": 179,
+ "column": 7
}
}
},
{
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 32,
- "start": 2720,
- "end": 2722,
+ "type": "CommentBlock",
+ "value": "*\n * Updates the bounds of the rectangle this icon point exists inside/outside of.\n * @param pBounds - The bounds to update the rectangle with.\n * @prop {number} pBounds.width - The width of the new rectangle.\n * @prop {number} pBounds.height - The height of the new rectangle.\n ",
+ "start": 8932,
+ "end": 9235,
"loc": {
"start": {
- "line": 79,
- "column": 22
+ "line": 185,
+ "column": 4
},
"end": {
- "line": 79,
- "column": 24
+ "line": 190,
+ "column": 7
}
}
},
{
- "type": {
- "label": ",",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 2722,
- "end": 2723,
+ "type": "CommentBlock",
+ "value": "*\n * Changes the icon point position.\n * @param pPoint - The point to update this icon point with.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 9389,
+ "end": 9774,
"loc": {
"start": {
- "line": 79,
- "column": 24
+ "line": 196,
+ "column": 4
},
"end": {
- "line": 79,
- "column": 25
+ "line": 202,
+ "column": 7
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "height",
- "start": 2724,
- "end": 2730,
+ "type": "CommentLine",
+ "value": "# sourceMappingURL=icon-point.mjs.map",
+ "start": 9863,
+ "end": 9902,
"loc": {
"start": {
- "line": 79,
- "column": 26
+ "line": 209,
+ "column": 0
},
"end": {
- "line": 79,
- "column": 32
+ "line": 209,
+ "column": 39
}
}
- },
- {
- "type": {
- "label": ":",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 2730,
- "end": 2731,
+ }
+ ],
+ "tokens": [
+ {
+ "type": "CommentBlock",
+ "value": "!\n * icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint\n * Compiled Mon, 18 Nov 2024 12:34:38 UTC\n *\n * icon-point is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n ",
+ "start": 0,
+ "end": 213,
"loc": {
"start": {
- "line": 79,
- "column": 32
+ "line": 1,
+ "column": 0
},
"end": {
- "line": 79,
- "column": 33
+ "line": 7,
+ "column": 3
}
}
},
{
- "type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": 32,
- "start": 2732,
- "end": 2734,
+ "type": "CommentBlock",
+ "value": "*\n * logger@1.0.0 git+https://github.com/EvitcaStudio/Logger\n * Compiled 1/9/2024, 7:19:18 AM UTC\n * \n * logger is licensed under a MIT styled License. See LICENSE.md for more info.\n * \n * Copyright 2024, Evitca Studio, All Rights Reserved\n ",
+ "start": 214,
+ "end": 459,
"loc": {
"start": {
- "line": 79,
- "column": 34
+ "line": 8,
+ "column": 0
},
"end": {
- "line": 79,
- "column": 36
+ "line": 15,
+ "column": 3
}
}
},
{
- "type": {
- "label": "}",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 2735,
- "end": 2736,
+ "type": "CommentBlock",
+ "value": "*\n * The IconPoint class\n * A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.\n * @example Example usage of this class\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n ",
+ "start": 460,
+ "end": 1136,
"loc": {
"start": {
- "line": 79,
- "column": 37
+ "line": 16,
+ "column": 0
},
"end": {
- "line": 79,
- "column": 38
+ "line": 28,
+ "column": 3
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
+ "label": "class",
+ "keyword": "class",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -19464,32 +15206,17 @@
"binop": null,
"updateContext": null
},
- "start": 2736,
- "end": 2737,
- "loc": {
- "start": {
- "line": 79,
- "column": 38
- },
- "end": {
- "line": 79,
- "column": 39
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of\n * @prop {number} pPoint.x - The x coordinate of the rectangle\n * @prop {number} pPoint.y - The y coordinate of the rectangle\n * @param {Bounds} pBounds - The size of the rectangle\n * @prop {number} pBounds.width - The width of the rectangle\n * @prop {number} pBounds.height - The height of the rectangle\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle\n * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range\n ",
- "start": 2742,
- "end": 3649,
+ "value": "class",
+ "start": 1137,
+ "end": 1142,
"loc": {
"start": {
- "line": 80,
- "column": 4
+ "line": 29,
+ "column": 0
},
"end": {
- "line": 91,
- "column": 7
+ "line": 29,
+ "column": 5
}
}
},
@@ -19505,23 +15232,23 @@
"postfix": false,
"binop": null
},
- "value": "constructor",
- "start": 3654,
- "end": 3665,
+ "value": "IconPoint",
+ "start": 1143,
+ "end": 1152,
"loc": {
"start": {
- "line": 92,
- "column": 4
+ "line": 29,
+ "column": 6
},
"end": {
- "line": 92,
+ "line": 29,
"column": 15
}
}
},
{
"type": {
- "label": "(",
+ "label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
@@ -19531,68 +15258,58 @@
"postfix": false,
"binop": null
},
- "start": 3665,
- "end": 3666,
+ "start": 1153,
+ "end": 1154,
"loc": {
"start": {
- "line": 92,
- "column": 15
+ "line": 29,
+ "column": 16
},
"end": {
- "line": 92,
- "column": 16
+ "line": 29,
+ "column": 17
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "pPoint",
- "start": 3666,
- "end": 3672,
+ "type": "CommentBlock",
+ "value": "*\n * Static offset to use when none is passed.\n ",
+ "start": 1159,
+ "end": 1219,
"loc": {
"start": {
- "line": 92,
- "column": 16
+ "line": 30,
+ "column": 4
},
"end": {
- "line": 92,
- "column": 22
+ "line": 32,
+ "column": 7
}
}
},
{
"type": {
- "label": ",",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 3672,
- "end": 3673,
+ "value": "static",
+ "start": 1224,
+ "end": 1230,
"loc": {
"start": {
- "line": 92,
- "column": 22
+ "line": 33,
+ "column": 4
},
"end": {
- "line": 92,
- "column": 23
+ "line": 33,
+ "column": 10
}
}
},
@@ -19608,50 +15325,51 @@
"postfix": false,
"binop": null
},
- "value": "pBounds",
- "start": 3674,
- "end": 3681,
+ "value": "defaultOffset",
+ "start": 1231,
+ "end": 1244,
"loc": {
"start": {
- "line": 92,
- "column": 24
+ "line": 33,
+ "column": 11
},
"end": {
- "line": 92,
- "column": 31
+ "line": 33,
+ "column": 24
}
}
},
{
"type": {
- "label": ",",
+ "label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "start": 3681,
- "end": 3682,
+ "value": "=",
+ "start": 1245,
+ "end": 1246,
"loc": {
"start": {
- "line": 92,
- "column": 31
+ "line": 33,
+ "column": 25
},
"end": {
- "line": 92,
- "column": 32
+ "line": 33,
+ "column": 26
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
+ "label": "{",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -19660,49 +15378,23 @@
"postfix": false,
"binop": null
},
- "value": "pIconPoint",
- "start": 3683,
- "end": 3693,
+ "start": 1247,
+ "end": 1248,
"loc": {
"start": {
- "line": 92,
- "column": 33
+ "line": 33,
+ "column": 27
},
"end": {
- "line": 92,
- "column": 43
+ "line": 33,
+ "column": 28
}
}
},
{
"type": {
- "label": ")",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 3693,
- "end": 3694,
- "loc": {
- "start": {
- "line": 92,
- "column": 43
- },
- "end": {
- "line": 92,
- "column": 44
- }
- }
- },
- {
- "type": {
- "label": "{",
- "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -19711,40 +15403,24 @@
"postfix": false,
"binop": null
},
- "start": 3695,
- "end": 3696,
- "loc": {
- "start": {
- "line": 92,
- "column": 45
- },
- "end": {
- "line": 92,
- "column": 46
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " Check if the rectangle is a valid type",
- "start": 3705,
- "end": 3746,
+ "value": "x",
+ "start": 1249,
+ "end": 1250,
"loc": {
"start": {
- "line": 93,
- "column": 8
+ "line": 33,
+ "column": 29
},
"end": {
- "line": 93,
- "column": 49
+ "line": 33,
+ "column": 30
}
}
},
{
"type": {
- "label": "if",
- "keyword": "if",
- "beforeExpr": false,
+ "label": ":",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -19754,70 +15430,69 @@
"binop": null,
"updateContext": null
},
- "value": "if",
- "start": 3755,
- "end": 3757,
+ "start": 1250,
+ "end": 1251,
"loc": {
"start": {
- "line": 94,
- "column": 8
+ "line": 33,
+ "column": 30
},
"end": {
- "line": 94,
- "column": 10
+ "line": 33,
+ "column": 31
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
+ "label": "num",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 3758,
- "end": 3759,
+ "value": 0,
+ "start": 1252,
+ "end": 1253,
"loc": {
"start": {
- "line": 94,
- "column": 11
+ "line": 33,
+ "column": 32
},
"end": {
- "line": 94,
- "column": 12
+ "line": 33,
+ "column": 33
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
+ "label": ",",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "typeof",
- "start": 3759,
- "end": 3765,
+ "start": 1253,
+ "end": 1254,
"loc": {
"start": {
- "line": 94,
- "column": 12
+ "line": 33,
+ "column": 33
},
"end": {
- "line": 94,
- "column": 18
+ "line": 33,
+ "column": 34
}
}
},
@@ -19833,23 +15508,23 @@
"postfix": false,
"binop": null
},
- "value": "pPoint",
- "start": 3766,
- "end": 3772,
+ "value": "y",
+ "start": 1255,
+ "end": 1256,
"loc": {
"start": {
- "line": 94,
- "column": 19
+ "line": 33,
+ "column": 35
},
"end": {
- "line": 94,
- "column": 25
+ "line": 33,
+ "column": 36
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -19857,26 +15532,25 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 3773,
- "end": 3776,
+ "start": 1256,
+ "end": 1257,
"loc": {
"start": {
- "line": 94,
- "column": 26
+ "line": 33,
+ "column": 36
},
"end": {
- "line": 94,
- "column": 29
+ "line": 33,
+ "column": 37
}
}
},
{
"type": {
- "label": "string",
+ "label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -19887,72 +15561,84 @@
"binop": null,
"updateContext": null
},
- "value": "object",
- "start": 3777,
- "end": 3785,
+ "value": 0,
+ "start": 1258,
+ "end": 1259,
"loc": {
"start": {
- "line": 94,
- "column": 30
+ "line": 33,
+ "column": 38
},
"end": {
- "line": 94,
- "column": 38
+ "line": 33,
+ "column": 39
}
}
},
{
"type": {
- "label": "&&",
- "beforeExpr": true,
+ "label": "}",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 2,
- "updateContext": null
+ "binop": null
},
- "value": "&&",
- "start": 3786,
- "end": 3788,
+ "start": 1260,
+ "end": 1261,
"loc": {
"start": {
- "line": 94,
- "column": 39
+ "line": 33,
+ "column": 40
},
"end": {
- "line": 94,
+ "line": 33,
"column": 41
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
+ "label": ";",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "typeof",
- "start": 3789,
- "end": 3795,
+ "start": 1261,
+ "end": 1262,
"loc": {
"start": {
- "line": 94,
+ "line": 33,
+ "column": 41
+ },
+ "end": {
+ "line": 33,
"column": 42
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n ",
+ "start": 1267,
+ "end": 1390,
+ "loc": {
+ "start": {
+ "line": 34,
+ "column": 4
},
"end": {
- "line": 94,
- "column": 48
+ "line": 36,
+ "column": 7
}
}
},
@@ -19968,98 +15654,95 @@
"postfix": false,
"binop": null
},
- "value": "pBounds",
- "start": 3796,
- "end": 3803,
+ "value": "static",
+ "start": 1395,
+ "end": 1401,
"loc": {
"start": {
- "line": 94,
- "column": 49
+ "line": 37,
+ "column": 4
},
"end": {
- "line": 94,
- "column": 56
+ "line": 37,
+ "column": 10
}
}
},
{
"type": {
- "label": "==/!=",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
- "updateContext": null
+ "binop": null
},
- "value": "===",
- "start": 3804,
- "end": 3807,
+ "value": "defaultAnchor",
+ "start": 1402,
+ "end": 1415,
"loc": {
"start": {
- "line": 94,
- "column": 57
+ "line": 37,
+ "column": 11
},
"end": {
- "line": 94,
- "column": 60
+ "line": 37,
+ "column": 24
}
}
},
{
"type": {
- "label": "string",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": "=",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "object",
- "start": 3808,
- "end": 3816,
+ "value": "=",
+ "start": 1416,
+ "end": 1417,
"loc": {
"start": {
- "line": 94,
- "column": 61
+ "line": 37,
+ "column": 25
},
"end": {
- "line": 94,
- "column": 69
+ "line": 37,
+ "column": 26
}
}
},
{
"type": {
- "label": "&&",
+ "label": "{",
"beforeExpr": true,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 2,
- "updateContext": null
+ "binop": null
},
- "value": "&&",
- "start": 3817,
- "end": 3819,
+ "start": 1418,
+ "end": 1419,
"loc": {
"start": {
- "line": 94,
- "column": 70
+ "line": 37,
+ "column": 27
},
"end": {
- "line": 94,
- "column": 72
+ "line": 37,
+ "column": 28
}
}
},
@@ -20075,24 +15758,24 @@
"postfix": false,
"binop": null
},
- "value": "pBounds",
- "start": 3820,
- "end": 3827,
+ "value": "x",
+ "start": 1420,
+ "end": 1421,
"loc": {
"start": {
- "line": 94,
- "column": 73
+ "line": 37,
+ "column": 29
},
"end": {
- "line": 94,
- "column": 80
+ "line": 37,
+ "column": 30
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ":",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -20102,22 +15785,22 @@
"binop": null,
"updateContext": null
},
- "start": 3827,
- "end": 3828,
+ "start": 1421,
+ "end": 1422,
"loc": {
"start": {
- "line": 94,
- "column": 80
+ "line": 37,
+ "column": 30
},
"end": {
- "line": 94,
- "column": 81
+ "line": 37,
+ "column": 31
}
}
},
{
"type": {
- "label": "name",
+ "label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -20125,25 +15808,26 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "constructor",
- "start": 3828,
- "end": 3839,
+ "value": 0.5,
+ "start": 1423,
+ "end": 1426,
"loc": {
"start": {
- "line": 94,
- "column": 81
+ "line": 37,
+ "column": 32
},
"end": {
- "line": 94,
- "column": 92
+ "line": 37,
+ "column": 35
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -20151,20 +15835,19 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 3840,
- "end": 3843,
+ "start": 1426,
+ "end": 1427,
"loc": {
"start": {
- "line": 94,
- "column": 93
+ "line": 37,
+ "column": 35
},
"end": {
- "line": 94,
- "column": 96
+ "line": 37,
+ "column": 36
}
}
},
@@ -20180,91 +15863,102 @@
"postfix": false,
"binop": null
},
- "value": "Object",
- "start": 3844,
- "end": 3850,
+ "value": "y",
+ "start": 1428,
+ "end": 1429,
"loc": {
"start": {
- "line": 94,
- "column": 97
+ "line": 37,
+ "column": 37
},
"end": {
- "line": 94,
- "column": 103
+ "line": 37,
+ "column": 38
}
}
},
{
"type": {
- "label": ")",
- "beforeExpr": false,
+ "label": ":",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 3850,
- "end": 3851,
+ "start": 1429,
+ "end": 1430,
"loc": {
"start": {
- "line": 94,
- "column": 103
+ "line": 37,
+ "column": 38
},
"end": {
- "line": 94,
- "column": 104
+ "line": 37,
+ "column": 39
}
}
},
{
"type": {
- "label": "{",
- "beforeExpr": true,
+ "label": "num",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 3852,
- "end": 3853,
+ "value": 0.5,
+ "start": 1431,
+ "end": 1434,
"loc": {
"start": {
- "line": 94,
- "column": 105
+ "line": 37,
+ "column": 40
},
"end": {
- "line": 94,
- "column": 106
+ "line": 37,
+ "column": 43
}
}
},
{
- "type": "CommentLine",
- "value": " Check if the rectangle has valid properties (x,y,width,height)",
- "start": 3866,
- "end": 3931,
+ "type": {
+ "label": "}",
+ "beforeExpr": false,
+ "startsExpr": false,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": false,
+ "postfix": false,
+ "binop": null
+ },
+ "start": 1435,
+ "end": 1436,
"loc": {
"start": {
- "line": 95,
- "column": 12
+ "line": 37,
+ "column": 44
},
"end": {
- "line": 95,
- "column": 77
+ "line": 37,
+ "column": 45
}
}
},
{
"type": {
- "label": "if",
- "keyword": "if",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -20274,24 +15968,39 @@
"binop": null,
"updateContext": null
},
- "value": "if",
- "start": 3944,
- "end": 3946,
+ "start": 1436,
+ "end": 1437,
"loc": {
"start": {
- "line": 96,
- "column": 12
+ "line": 37,
+ "column": 45
},
"end": {
- "line": 96,
- "column": 14
+ "line": 37,
+ "column": 46
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "*\n * The version of the module.\n ",
+ "start": 1442,
+ "end": 1487,
+ "loc": {
+ "start": {
+ "line": 38,
+ "column": 4
+ },
+ "end": {
+ "line": 40,
+ "column": 7
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -20300,50 +16009,50 @@
"postfix": false,
"binop": null
},
- "start": 3947,
- "end": 3948,
+ "value": "version",
+ "start": 1492,
+ "end": 1499,
"loc": {
"start": {
- "line": 96,
- "column": 15
+ "line": 41,
+ "column": 4
},
"end": {
- "line": 96,
- "column": 16
+ "line": 41,
+ "column": 11
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
+ "label": "=",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
- "prefix": true,
+ "isAssign": true,
+ "prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "typeof",
- "start": 3948,
- "end": 3954,
+ "value": "=",
+ "start": 1500,
+ "end": 1501,
"loc": {
"start": {
- "line": 96,
- "column": 16
+ "line": 41,
+ "column": 12
},
"end": {
- "line": 96,
- "column": 22
+ "line": 41,
+ "column": 13
}
}
},
{
"type": {
- "label": "name",
+ "label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -20351,26 +16060,27 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "pPoint",
- "start": 3955,
- "end": 3961,
+ "value": "1.0.0",
+ "start": 1502,
+ "end": 1509,
"loc": {
"start": {
- "line": 96,
- "column": 23
+ "line": 41,
+ "column": 14
},
"end": {
- "line": 96,
- "column": 29
+ "line": 41,
+ "column": 21
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -20380,16 +16090,32 @@
"binop": null,
"updateContext": null
},
- "start": 3961,
- "end": 3962,
+ "start": 1509,
+ "end": 1510,
"loc": {
"start": {
- "line": 96,
- "column": 29
+ "line": 41,
+ "column": 21
},
"end": {
- "line": 96,
- "column": 30
+ "line": 41,
+ "column": 22
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "* The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n ",
+ "start": 1515,
+ "end": 1620,
+ "loc": {
+ "start": {
+ "line": 42,
+ "column": 4
+ },
+ "end": {
+ "line": 45,
+ "column": 7
}
}
},
@@ -20405,23 +16131,23 @@
"postfix": false,
"binop": null
},
- "value": "x",
- "start": 3962,
- "end": 3963,
+ "value": "logger",
+ "start": 1625,
+ "end": 1631,
"loc": {
"start": {
- "line": 96,
- "column": 30
+ "line": 46,
+ "column": 4
},
"end": {
- "line": 96,
- "column": 31
+ "line": 46,
+ "column": 10
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -20429,26 +16155,41 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 3964,
- "end": 3967,
+ "start": 1631,
+ "end": 1632,
"loc": {
"start": {
- "line": 96,
- "column": 32
+ "line": 46,
+ "column": 10
},
"end": {
- "line": 96,
- "column": 35
+ "line": 46,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the position of the point that was set. This is the point on the rectangle.\n * It can be changed at runtime.\n * ________\n * | |\n * | x |\n * | |\n * |_______|\n * @private\n * @type {Point}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n ",
+ "start": 1637,
+ "end": 2043,
+ "loc": {
+ "start": {
+ "line": 47,
+ "column": 4
+ },
+ "end": {
+ "line": 59,
+ "column": 7
}
}
},
{
"type": {
- "label": "string",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -20456,75 +16197,71 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "number",
- "start": 3968,
- "end": 3976,
+ "value": "iconPoint",
+ "start": 2048,
+ "end": 2057,
"loc": {
"start": {
- "line": 96,
- "column": 36
+ "line": 60,
+ "column": 4
},
"end": {
- "line": 96,
- "column": 44
+ "line": 60,
+ "column": 13
}
}
},
{
"type": {
- "label": "&&",
+ "label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
- "binop": 2,
+ "binop": null,
"updateContext": null
},
- "value": "&&",
- "start": 3977,
- "end": 3979,
+ "value": "=",
+ "start": 2058,
+ "end": 2059,
"loc": {
"start": {
- "line": 96,
- "column": 45
+ "line": 60,
+ "column": 14
},
"end": {
- "line": 96,
- "column": 47
+ "line": 60,
+ "column": 15
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
+ "label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "typeof",
- "start": 3980,
- "end": 3986,
+ "start": 2060,
+ "end": 2061,
"loc": {
"start": {
- "line": 96,
- "column": 48
+ "line": 60,
+ "column": 16
},
"end": {
- "line": 96,
- "column": 54
+ "line": 60,
+ "column": 17
}
}
},
@@ -20540,24 +16277,24 @@
"postfix": false,
"binop": null
},
- "value": "pPoint",
- "start": 3987,
- "end": 3993,
+ "value": "x",
+ "start": 2062,
+ "end": 2063,
"loc": {
"start": {
- "line": 96,
- "column": 55
+ "line": 60,
+ "column": 18
},
"end": {
- "line": 96,
- "column": 61
+ "line": 60,
+ "column": 19
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ":",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -20567,22 +16304,22 @@
"binop": null,
"updateContext": null
},
- "start": 3993,
- "end": 3994,
+ "start": 2063,
+ "end": 2064,
"loc": {
"start": {
- "line": 96,
- "column": 61
+ "line": 60,
+ "column": 19
},
"end": {
- "line": 96,
- "column": 62
+ "line": 60,
+ "column": 20
}
}
},
{
"type": {
- "label": "name",
+ "label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -20590,25 +16327,26 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "y",
- "start": 3994,
- "end": 3995,
+ "value": 0,
+ "start": 2065,
+ "end": 2066,
"loc": {
"start": {
- "line": 96,
- "column": 62
+ "line": 60,
+ "column": 21
},
"end": {
- "line": 96,
- "column": 63
+ "line": 60,
+ "column": 22
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -20616,26 +16354,25 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 3996,
- "end": 3999,
+ "start": 2066,
+ "end": 2067,
"loc": {
"start": {
- "line": 96,
- "column": 64
+ "line": 60,
+ "column": 22
},
"end": {
- "line": 96,
- "column": 67
+ "line": 60,
+ "column": 23
}
}
},
{
"type": {
- "label": "string",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -20643,26 +16380,25 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "number",
- "start": 4000,
- "end": 4008,
+ "value": "y",
+ "start": 2068,
+ "end": 2069,
"loc": {
"start": {
- "line": 96,
- "column": 68
+ "line": 60,
+ "column": 24
},
"end": {
- "line": 96,
- "column": 76
+ "line": 60,
+ "column": 25
}
}
},
{
"type": {
- "label": "&&",
+ "label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -20670,56 +16406,54 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 2,
+ "binop": null,
"updateContext": null
},
- "value": "&&",
- "start": 4009,
- "end": 4011,
+ "start": 2069,
+ "end": 2070,
"loc": {
"start": {
- "line": 96,
- "column": 77
+ "line": 60,
+ "column": 25
},
"end": {
- "line": 96,
- "column": 79
+ "line": 60,
+ "column": 26
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
- "beforeExpr": true,
+ "label": "num",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "typeof",
- "start": 4012,
- "end": 4018,
+ "value": 0,
+ "start": 2071,
+ "end": 2072,
"loc": {
"start": {
- "line": 96,
- "column": 80
+ "line": 60,
+ "column": 27
},
"end": {
- "line": 96,
- "column": 86
+ "line": 60,
+ "column": 28
}
}
},
{
"type": {
- "label": "name",
+ "label": "}",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -20727,24 +16461,23 @@
"postfix": false,
"binop": null
},
- "value": "pBounds",
- "start": 4019,
- "end": 4026,
+ "start": 2073,
+ "end": 2074,
"loc": {
"start": {
- "line": 96,
- "column": 87
+ "line": 60,
+ "column": 29
},
"end": {
- "line": 96,
- "column": 94
+ "line": 60,
+ "column": 30
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -20754,16 +16487,32 @@
"binop": null,
"updateContext": null
},
- "start": 4026,
- "end": 4027,
+ "start": 2074,
+ "end": 2075,
"loc": {
"start": {
- "line": 96,
- "column": 94
+ "line": 60,
+ "column": 30
},
"end": {
- "line": 96,
- "column": 95
+ "line": 60,
+ "column": 31
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the position of the rectangle.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the rectangle.\n * @prop {number} y - The y position of the rectangle.\n ",
+ "start": 2080,
+ "end": 2302,
+ "loc": {
+ "start": {
+ "line": 61,
+ "column": 4
+ },
+ "end": {
+ "line": 67,
+ "column": 7
}
}
},
@@ -20779,23 +16528,23 @@
"postfix": false,
"binop": null
},
- "value": "width",
- "start": 4027,
- "end": 4032,
+ "value": "positionalPoint",
+ "start": 2307,
+ "end": 2322,
"loc": {
"start": {
- "line": 96,
- "column": 95
+ "line": 68,
+ "column": 4
},
"end": {
- "line": 96,
- "column": 100
+ "line": 68,
+ "column": 19
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -20803,109 +16552,95 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 4033,
- "end": 4036,
+ "start": 2322,
+ "end": 2323,
"loc": {
"start": {
- "line": 96,
- "column": 101
+ "line": 68,
+ "column": 19
},
"end": {
- "line": 96,
- "column": 104
+ "line": 68,
+ "column": 20
}
}
},
{
- "type": {
- "label": "string",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "value": "number",
- "start": 4037,
- "end": 4045,
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the point after rotation is applied.\n * @prop {number} y - The y position of the point after rotation is applied.\n ",
+ "start": 2328,
+ "end": 2618,
"loc": {
"start": {
- "line": 96,
- "column": 105
+ "line": 69,
+ "column": 4
},
"end": {
- "line": 96,
- "column": 113
+ "line": 75,
+ "column": 7
}
}
},
{
"type": {
- "label": "&&",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 2,
- "updateContext": null
+ "binop": null
},
- "value": "&&",
- "start": 4046,
- "end": 4048,
+ "value": "point",
+ "start": 2623,
+ "end": 2628,
"loc": {
"start": {
- "line": 96,
- "column": 114
+ "line": 76,
+ "column": 4
},
"end": {
- "line": 96,
- "column": 116
+ "line": 76,
+ "column": 9
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
+ "label": "=",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
- "prefix": true,
+ "isAssign": true,
+ "prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "typeof",
- "start": 4049,
- "end": 4055,
+ "value": "=",
+ "start": 2629,
+ "end": 2630,
"loc": {
"start": {
- "line": 96,
- "column": 117
+ "line": 76,
+ "column": 10
},
"end": {
- "line": 96,
- "column": 123
+ "line": 76,
+ "column": 11
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
+ "label": "{",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -20914,43 +16649,16 @@
"postfix": false,
"binop": null
},
- "value": "pBounds",
- "start": 4056,
- "end": 4063,
- "loc": {
- "start": {
- "line": 96,
- "column": 124
- },
- "end": {
- "line": 96,
- "column": 131
- }
- }
- },
- {
- "type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 4063,
- "end": 4064,
+ "start": 2631,
+ "end": 2632,
"loc": {
"start": {
- "line": 96,
- "column": 131
+ "line": 76,
+ "column": 12
},
"end": {
- "line": 96,
- "column": 132
+ "line": 76,
+ "column": 13
}
}
},
@@ -20966,23 +16674,23 @@
"postfix": false,
"binop": null
},
- "value": "height",
- "start": 4064,
- "end": 4070,
+ "value": "x",
+ "start": 2633,
+ "end": 2634,
"loc": {
"start": {
- "line": 96,
- "column": 132
+ "line": 76,
+ "column": 14
},
"end": {
- "line": 96,
- "column": 138
+ "line": 76,
+ "column": 15
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -20990,26 +16698,25 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 4071,
- "end": 4074,
+ "start": 2634,
+ "end": 2635,
"loc": {
"start": {
- "line": 96,
- "column": 139
+ "line": 76,
+ "column": 15
},
"end": {
- "line": 96,
- "column": 142
+ "line": 76,
+ "column": 16
}
}
},
{
"type": {
- "label": "string",
+ "label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -21020,49 +16727,50 @@
"binop": null,
"updateContext": null
},
- "value": "number",
- "start": 4075,
- "end": 4083,
+ "value": 0,
+ "start": 2636,
+ "end": 2637,
"loc": {
"start": {
- "line": 96,
- "column": 143
+ "line": 76,
+ "column": 17
},
"end": {
- "line": 96,
- "column": 151
+ "line": 76,
+ "column": 18
}
}
},
{
"type": {
- "label": ")",
- "beforeExpr": false,
+ "label": ",",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4083,
- "end": 4084,
+ "start": 2637,
+ "end": 2638,
"loc": {
"start": {
- "line": 96,
- "column": 151
+ "line": 76,
+ "column": 18
},
"end": {
- "line": 96,
- "column": 152
+ "line": 76,
+ "column": 19
}
}
},
{
"type": {
- "label": "{",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -21071,25 +16779,25 @@
"postfix": false,
"binop": null
},
- "start": 4085,
- "end": 4086,
+ "value": "y",
+ "start": 2639,
+ "end": 2640,
"loc": {
"start": {
- "line": 96,
- "column": 153
+ "line": 76,
+ "column": 20
},
"end": {
- "line": 96,
- "column": 154
+ "line": 76,
+ "column": 21
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": ":",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -21098,25 +16806,24 @@
"binop": null,
"updateContext": null
},
- "value": "this",
- "start": 4103,
- "end": 4107,
+ "start": 2640,
+ "end": 2641,
"loc": {
"start": {
- "line": 97,
- "column": 16
+ "line": 76,
+ "column": 21
},
"end": {
- "line": 97,
- "column": 20
+ "line": 76,
+ "column": 22
}
}
},
{
"type": {
- "label": ".",
+ "label": "num",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -21125,24 +16832,25 @@
"binop": null,
"updateContext": null
},
- "start": 4107,
- "end": 4108,
+ "value": 0,
+ "start": 2642,
+ "end": 2643,
"loc": {
"start": {
- "line": 97,
- "column": 20
+ "line": 76,
+ "column": 23
},
"end": {
- "line": 97,
- "column": 21
+ "line": 76,
+ "column": 24
}
}
},
{
"type": {
- "label": "name",
+ "label": "}",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -21150,150 +16858,136 @@
"postfix": false,
"binop": null
},
- "value": "positionalPoint",
- "start": 4108,
- "end": 4123,
+ "start": 2644,
+ "end": 2645,
"loc": {
"start": {
- "line": 97,
- "column": 21
+ "line": 76,
+ "column": 25
},
"end": {
- "line": 97,
- "column": 36
+ "line": 76,
+ "column": 26
}
}
},
{
"type": {
- "label": "=",
+ "label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "=",
- "start": 4124,
- "end": 4125,
+ "start": 2645,
+ "end": 2646,
"loc": {
"start": {
- "line": 97,
- "column": 37
+ "line": 76,
+ "column": 26
},
"end": {
- "line": 97,
- "column": 38
+ "line": 76,
+ "column": 27
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "pPoint",
- "start": 4126,
- "end": 4132,
+ "type": "CommentBlock",
+ "value": "*\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle.\n * @prop {number} height - The height of the rectangle.\n ",
+ "start": 2651,
+ "end": 2865,
"loc": {
"start": {
- "line": 97,
- "column": 39
+ "line": 77,
+ "column": 4
},
"end": {
- "line": 97,
- "column": 45
+ "line": 83,
+ "column": 7
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 4132,
- "end": 4133,
+ "value": "bounds",
+ "start": 2870,
+ "end": 2876,
"loc": {
"start": {
- "line": 97,
- "column": 45
+ "line": 84,
+ "column": 4
},
"end": {
- "line": 97,
- "column": 46
+ "line": 84,
+ "column": 10
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": "=",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "this",
- "start": 4150,
- "end": 4154,
+ "value": "=",
+ "start": 2877,
+ "end": 2878,
"loc": {
"start": {
- "line": 98,
- "column": 16
+ "line": 84,
+ "column": 11
},
"end": {
- "line": 98,
- "column": 20
+ "line": 84,
+ "column": 12
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "{",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 4154,
- "end": 4155,
+ "start": 2879,
+ "end": 2880,
"loc": {
"start": {
- "line": 98,
- "column": 20
+ "line": 84,
+ "column": 13
},
"end": {
- "line": 98,
- "column": 21
+ "line": 84,
+ "column": 14
}
}
},
@@ -21309,24 +17003,24 @@
"postfix": false,
"binop": null
},
- "value": "bounds",
- "start": 4155,
- "end": 4161,
+ "value": "width",
+ "start": 2881,
+ "end": 2886,
"loc": {
"start": {
- "line": 98,
- "column": 21
+ "line": 84,
+ "column": 15
},
"end": {
- "line": 98,
- "column": 27
+ "line": 84,
+ "column": 20
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ":",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -21336,22 +17030,22 @@
"binop": null,
"updateContext": null
},
- "start": 4161,
- "end": 4162,
+ "start": 2886,
+ "end": 2887,
"loc": {
"start": {
- "line": 98,
- "column": 27
+ "line": 84,
+ "column": 20
},
"end": {
- "line": 98,
- "column": 28
+ "line": 84,
+ "column": 21
}
}
},
{
"type": {
- "label": "name",
+ "label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -21359,46 +17053,46 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "width",
- "start": 4162,
- "end": 4167,
+ "value": 32,
+ "start": 2888,
+ "end": 2890,
"loc": {
"start": {
- "line": 98,
- "column": 28
+ "line": 84,
+ "column": 22
},
"end": {
- "line": 98,
- "column": 33
+ "line": 84,
+ "column": 24
}
}
},
{
"type": {
- "label": "=",
+ "label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "=",
- "start": 4168,
- "end": 4169,
+ "start": 2890,
+ "end": 2891,
"loc": {
"start": {
- "line": 98,
- "column": 34
+ "line": 84,
+ "column": 24
},
"end": {
- "line": 98,
- "column": 35
+ "line": 84,
+ "column": 25
}
}
},
@@ -21414,24 +17108,24 @@
"postfix": false,
"binop": null
},
- "value": "pBounds",
- "start": 4170,
- "end": 4177,
+ "value": "height",
+ "start": 2892,
+ "end": 2898,
"loc": {
"start": {
- "line": 98,
- "column": 36
+ "line": 84,
+ "column": 26
},
"end": {
- "line": 98,
- "column": 43
+ "line": 84,
+ "column": 32
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ":",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -21441,22 +17135,22 @@
"binop": null,
"updateContext": null
},
- "start": 4177,
- "end": 4178,
+ "start": 2898,
+ "end": 2899,
"loc": {
"start": {
- "line": 98,
- "column": 43
+ "line": 84,
+ "column": 32
},
"end": {
- "line": 98,
- "column": 44
+ "line": 84,
+ "column": 33
}
}
},
{
"type": {
- "label": "name",
+ "label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -21464,54 +17158,53 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "width",
- "start": 4178,
- "end": 4183,
+ "value": 32,
+ "start": 2900,
+ "end": 2902,
"loc": {
"start": {
- "line": 98,
- "column": 44
+ "line": 84,
+ "column": 34
},
"end": {
- "line": 98,
- "column": 49
+ "line": 84,
+ "column": 36
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
+ "label": "}",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 4183,
- "end": 4184,
+ "start": 2903,
+ "end": 2904,
"loc": {
"start": {
- "line": 98,
- "column": 49
+ "line": 84,
+ "column": 37
},
"end": {
- "line": 98,
- "column": 50
+ "line": 84,
+ "column": 38
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": ";",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -21520,43 +17213,32 @@
"binop": null,
"updateContext": null
},
- "value": "this",
- "start": 4201,
- "end": 4205,
+ "start": 2904,
+ "end": 2905,
"loc": {
"start": {
- "line": 99,
- "column": 16
+ "line": 84,
+ "column": 38
},
"end": {
- "line": 99,
- "column": 20
+ "line": 84,
+ "column": 39
}
}
},
{
- "type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 4205,
- "end": 4206,
+ "type": "CommentBlock",
+ "value": "*\n * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.\n * @prop {number} pPoint.x - The x coordinate of the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the rectangle.\n * @param {Bounds} pBounds - The size of the rectangle.\n * @prop {number} pBounds.width - The width of the rectangle.\n * @prop {number} pBounds.height - The height of the rectangle.\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.\n *\n * ## Normalized\n If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`\n The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.\n ",
+ "start": 2910,
+ "end": 4086,
"loc": {
"start": {
- "line": 99,
- "column": 20
+ "line": 85,
+ "column": 4
},
"end": {
- "line": 99,
- "column": 21
+ "line": 100,
+ "column": 7
}
}
},
@@ -21572,43 +17254,42 @@
"postfix": false,
"binop": null
},
- "value": "bounds",
- "start": 4206,
- "end": 4212,
+ "value": "constructor",
+ "start": 4091,
+ "end": 4102,
"loc": {
"start": {
- "line": 99,
- "column": 21
+ "line": 101,
+ "column": 4
},
"end": {
- "line": 99,
- "column": 27
+ "line": 101,
+ "column": 15
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "(",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 4212,
- "end": 4213,
+ "start": 4102,
+ "end": 4103,
"loc": {
"start": {
- "line": 99,
- "column": 27
+ "line": 101,
+ "column": 15
},
"end": {
- "line": 99,
- "column": 28
+ "line": 101,
+ "column": 16
}
}
},
@@ -21624,44 +17305,43 @@
"postfix": false,
"binop": null
},
- "value": "height",
- "start": 4213,
- "end": 4219,
+ "value": "pPoint",
+ "start": 4103,
+ "end": 4109,
"loc": {
"start": {
- "line": 99,
- "column": 28
+ "line": 101,
+ "column": 16
},
"end": {
- "line": 99,
- "column": 34
+ "line": 101,
+ "column": 22
}
}
},
{
"type": {
- "label": "=",
+ "label": ",",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "=",
- "start": 4220,
- "end": 4221,
+ "start": 4109,
+ "end": 4110,
"loc": {
"start": {
- "line": 99,
- "column": 35
+ "line": 101,
+ "column": 22
},
"end": {
- "line": 99,
- "column": 36
+ "line": 101,
+ "column": 23
}
}
},
@@ -21678,23 +17358,23 @@
"binop": null
},
"value": "pBounds",
- "start": 4222,
- "end": 4229,
+ "start": 4111,
+ "end": 4118,
"loc": {
"start": {
- "line": 99,
- "column": 37
+ "line": 101,
+ "column": 24
},
"end": {
- "line": 99,
- "column": 44
+ "line": 101,
+ "column": 31
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ",",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -21704,16 +17384,16 @@
"binop": null,
"updateContext": null
},
- "start": 4229,
- "end": 4230,
+ "start": 4118,
+ "end": 4119,
"loc": {
"start": {
- "line": 99,
- "column": 44
+ "line": 101,
+ "column": 31
},
"end": {
- "line": 99,
- "column": 45
+ "line": 101,
+ "column": 32
}
}
},
@@ -21729,51 +17409,50 @@
"postfix": false,
"binop": null
},
- "value": "height",
- "start": 4230,
- "end": 4236,
+ "value": "pIconPoint",
+ "start": 4120,
+ "end": 4130,
"loc": {
"start": {
- "line": 99,
- "column": 45
+ "line": 101,
+ "column": 33
},
"end": {
- "line": 99,
- "column": 51
+ "line": 101,
+ "column": 43
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
+ "label": ")",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 4236,
- "end": 4237,
+ "start": 4130,
+ "end": 4131,
"loc": {
"start": {
- "line": 99,
- "column": 51
+ "line": 101,
+ "column": 43
},
"end": {
- "line": 99,
- "column": 52
+ "line": 101,
+ "column": 44
}
}
},
{
"type": {
- "label": "}",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "{",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -21781,24 +17460,24 @@
"postfix": false,
"binop": null
},
- "start": 4250,
- "end": 4251,
+ "start": 4132,
+ "end": 4133,
"loc": {
"start": {
- "line": 100,
- "column": 12
+ "line": 101,
+ "column": 45
},
"end": {
- "line": 100,
- "column": 13
+ "line": 101,
+ "column": 46
}
}
},
{
"type": {
- "label": "else",
- "keyword": "else",
- "beforeExpr": true,
+ "label": "const",
+ "keyword": "const",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -21808,17 +17487,17 @@
"binop": null,
"updateContext": null
},
- "value": "else",
- "start": 4264,
- "end": 4268,
+ "value": "const",
+ "start": 4142,
+ "end": 4147,
"loc": {
"start": {
- "line": 101,
- "column": 12
+ "line": 102,
+ "column": 8
},
"end": {
- "line": 101,
- "column": 16
+ "line": 102,
+ "column": 13
}
}
},
@@ -21834,23 +17513,22 @@
"postfix": false,
"binop": null
},
- "start": 4269,
- "end": 4270,
+ "start": 4148,
+ "end": 4149,
"loc": {
"start": {
- "line": 101,
- "column": 17
+ "line": 102,
+ "column": 14
},
"end": {
- "line": 101,
- "column": 18
+ "line": 102,
+ "column": 15
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -21858,12 +17536,11 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 4287,
- "end": 4291,
+ "value": "width",
+ "start": 4150,
+ "end": 4155,
"loc": {
"start": {
"line": 102,
@@ -21871,14 +17548,14 @@
},
"end": {
"line": 102,
- "column": 20
+ "column": 21
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ",",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -21888,16 +17565,16 @@
"binop": null,
"updateContext": null
},
- "start": 4291,
- "end": 4292,
+ "start": 4155,
+ "end": 4156,
"loc": {
"start": {
"line": 102,
- "column": 20
+ "column": 21
},
"end": {
"line": 102,
- "column": 21
+ "column": 22
}
}
},
@@ -21913,23 +17590,23 @@
"postfix": false,
"binop": null
},
- "value": "logger",
- "start": 4292,
- "end": 4298,
+ "value": "height",
+ "start": 4157,
+ "end": 4163,
"loc": {
"start": {
"line": 102,
- "column": 21
+ "column": 23
},
"end": {
"line": 102,
- "column": 27
+ "column": 29
}
}
},
{
"type": {
- "label": ".",
+ "label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -21937,19 +17614,45 @@
"isAssign": false,
"prefix": false,
"postfix": false,
+ "binop": null
+ },
+ "start": 4164,
+ "end": 4165,
+ "loc": {
+ "start": {
+ "line": 102,
+ "column": 30
+ },
+ "end": {
+ "line": 102,
+ "column": 31
+ }
+ }
+ },
+ {
+ "type": {
+ "label": "=",
+ "beforeExpr": true,
+ "startsExpr": false,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": true,
+ "prefix": false,
+ "postfix": false,
"binop": null,
"updateContext": null
},
- "start": 4298,
- "end": 4299,
+ "value": "=",
+ "start": 4166,
+ "end": 4167,
"loc": {
"start": {
"line": 102,
- "column": 27
+ "column": 32
},
"end": {
"line": 102,
- "column": 28
+ "column": 33
}
}
},
@@ -21965,48 +17668,50 @@
"postfix": false,
"binop": null
},
- "value": "prefix",
- "start": 4299,
- "end": 4305,
+ "value": "pBounds",
+ "start": 4168,
+ "end": 4175,
"loc": {
"start": {
"line": 102,
- "column": 28
+ "column": 34
},
"end": {
"line": 102,
- "column": 34
+ "column": 41
}
}
},
{
"type": {
- "label": "(",
+ "label": ";",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4305,
- "end": 4306,
+ "start": 4175,
+ "end": 4176,
"loc": {
"start": {
"line": 102,
- "column": 34
+ "column": 41
},
"end": {
"line": 102,
- "column": 35
+ "column": 42
}
}
},
{
"type": {
- "label": "string",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -22017,23 +17722,23 @@
"binop": null,
"updateContext": null
},
- "value": "Icon-Point-Module",
- "start": 4306,
- "end": 4325,
+ "value": "this",
+ "start": 4185,
+ "end": 4189,
"loc": {
"start": {
- "line": 102,
- "column": 35
+ "line": 103,
+ "column": 8
},
"end": {
- "line": 102,
- "column": 54
+ "line": 103,
+ "column": 12
}
}
},
{
"type": {
- "label": ")",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -22041,18 +17746,45 @@
"isAssign": false,
"prefix": false,
"postfix": false,
+ "binop": null,
+ "updateContext": null
+ },
+ "start": 4189,
+ "end": 4190,
+ "loc": {
+ "start": {
+ "line": 103,
+ "column": 12
+ },
+ "end": {
+ "line": 103,
+ "column": 13
+ }
+ }
+ },
+ {
+ "type": {
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": false,
+ "postfix": false,
"binop": null
},
- "start": 4325,
- "end": 4326,
+ "value": "bounds",
+ "start": 4190,
+ "end": 4196,
"loc": {
"start": {
- "line": 102,
- "column": 54
+ "line": 103,
+ "column": 13
},
"end": {
- "line": 102,
- "column": 55
+ "line": 103,
+ "column": 19
}
}
},
@@ -22069,16 +17801,16 @@
"binop": null,
"updateContext": null
},
- "start": 4326,
- "end": 4327,
+ "start": 4196,
+ "end": 4197,
"loc": {
"start": {
- "line": 102,
- "column": 55
+ "line": 103,
+ "column": 19
},
"end": {
- "line": 102,
- "column": 56
+ "line": 103,
+ "column": 20
}
}
},
@@ -22094,48 +17826,50 @@
"postfix": false,
"binop": null
},
- "value": "error",
- "start": 4327,
- "end": 4332,
+ "value": "width",
+ "start": 4197,
+ "end": 4202,
"loc": {
"start": {
- "line": 102,
- "column": 56
+ "line": 103,
+ "column": 20
},
"end": {
- "line": 102,
- "column": 61
+ "line": 103,
+ "column": 25
}
}
},
{
"type": {
- "label": "(",
+ "label": "=",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4332,
- "end": 4333,
+ "value": "=",
+ "start": 4203,
+ "end": 4204,
"loc": {
"start": {
- "line": 102,
- "column": 61
+ "line": 103,
+ "column": 26
},
"end": {
- "line": 102,
- "column": 62
+ "line": 103,
+ "column": 27
}
}
},
{
"type": {
- "label": "string",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -22143,53 +17877,54 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "Invalid properties on pPoint or pBounds!",
- "start": 4333,
- "end": 4375,
+ "value": "width",
+ "start": 4205,
+ "end": 4210,
"loc": {
"start": {
- "line": 102,
- "column": 62
+ "line": 103,
+ "column": 28
},
"end": {
- "line": 102,
- "column": 104
+ "line": 103,
+ "column": 33
}
}
},
{
"type": {
- "label": ")",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4375,
- "end": 4376,
+ "start": 4210,
+ "end": 4211,
"loc": {
"start": {
- "line": 102,
- "column": 104
+ "line": 103,
+ "column": 33
},
"end": {
- "line": 102,
- "column": 105
+ "line": 103,
+ "column": 34
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "this",
+ "keyword": "this",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -22198,22 +17933,23 @@
"binop": null,
"updateContext": null
},
- "start": 4376,
- "end": 4377,
+ "value": "this",
+ "start": 4220,
+ "end": 4224,
"loc": {
"start": {
- "line": 102,
- "column": 105
+ "line": 104,
+ "column": 8
},
"end": {
- "line": 102,
- "column": 106
+ "line": 104,
+ "column": 12
}
}
},
{
"type": {
- "label": "}",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -22221,26 +17957,27 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4390,
- "end": 4391,
+ "start": 4224,
+ "end": 4225,
"loc": {
"start": {
- "line": 103,
+ "line": 104,
"column": 12
},
"end": {
- "line": 103,
+ "line": 104,
"column": 13
}
}
},
{
"type": {
- "label": "}",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -22248,39 +17985,23 @@
"postfix": false,
"binop": null
},
- "start": 4400,
- "end": 4401,
+ "value": "bounds",
+ "start": 4225,
+ "end": 4231,
"loc": {
"start": {
"line": 104,
- "column": 8
+ "column": 13
},
"end": {
"line": 104,
- "column": 9
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " Check if the point is a valid type",
- "start": 4410,
- "end": 4447,
- "loc": {
- "start": {
- "line": 105,
- "column": 8
- },
- "end": {
- "line": 105,
- "column": 45
+ "column": 19
}
}
},
{
"type": {
- "label": "if",
- "keyword": "if",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -22291,24 +18012,23 @@
"binop": null,
"updateContext": null
},
- "value": "if",
- "start": 4456,
- "end": 4458,
+ "start": 4231,
+ "end": 4232,
"loc": {
"start": {
- "line": 106,
- "column": 8
+ "line": 104,
+ "column": 19
},
"end": {
- "line": 106,
- "column": 10
+ "line": 104,
+ "column": 20
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -22317,44 +18037,44 @@
"postfix": false,
"binop": null
},
- "start": 4459,
- "end": 4460,
+ "value": "height",
+ "start": 4232,
+ "end": 4238,
"loc": {
"start": {
- "line": 106,
- "column": 11
+ "line": 104,
+ "column": 20
},
"end": {
- "line": 106,
- "column": 12
+ "line": 104,
+ "column": 26
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
+ "label": "=",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
- "prefix": true,
+ "isAssign": true,
+ "prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "typeof",
- "start": 4460,
- "end": 4466,
+ "value": "=",
+ "start": 4239,
+ "end": 4240,
"loc": {
"start": {
- "line": 106,
- "column": 12
+ "line": 104,
+ "column": 27
},
"end": {
- "line": 106,
- "column": 18
+ "line": 104,
+ "column": 28
}
}
},
@@ -22370,23 +18090,23 @@
"postfix": false,
"binop": null
},
- "value": "pIconPoint",
- "start": 4467,
- "end": 4477,
+ "value": "height",
+ "start": 4241,
+ "end": 4247,
"loc": {
"start": {
- "line": 106,
- "column": 19
+ "line": 104,
+ "column": 29
},
"end": {
- "line": 106,
- "column": 29
+ "line": 104,
+ "column": 35
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -22394,26 +18114,26 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 4478,
- "end": 4481,
+ "start": 4247,
+ "end": 4248,
"loc": {
"start": {
- "line": 106,
- "column": 30
+ "line": 104,
+ "column": 35
},
"end": {
- "line": 106,
- "column": 33
+ "line": 104,
+ "column": 36
}
}
},
{
"type": {
- "label": "string",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -22424,44 +18144,43 @@
"binop": null,
"updateContext": null
},
- "value": "object",
- "start": 4482,
- "end": 4490,
+ "value": "this",
+ "start": 4257,
+ "end": 4261,
"loc": {
"start": {
- "line": 106,
- "column": 34
+ "line": 105,
+ "column": 8
},
"end": {
- "line": 106,
- "column": 42
+ "line": 105,
+ "column": 12
}
}
},
{
"type": {
- "label": "&&",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 2,
+ "binop": null,
"updateContext": null
},
- "value": "&&",
- "start": 4491,
- "end": 4493,
+ "start": 4261,
+ "end": 4262,
"loc": {
"start": {
- "line": 106,
- "column": 43
+ "line": 105,
+ "column": 12
},
"end": {
- "line": 106,
- "column": 45
+ "line": 105,
+ "column": 13
}
}
},
@@ -22477,43 +18196,44 @@
"postfix": false,
"binop": null
},
- "value": "pIconPoint",
- "start": 4494,
- "end": 4504,
+ "value": "positionalPoint",
+ "start": 4262,
+ "end": 4277,
"loc": {
"start": {
- "line": 106,
- "column": 46
+ "line": 105,
+ "column": 13
},
"end": {
- "line": 106,
- "column": 56
+ "line": 105,
+ "column": 28
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": "=",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "start": 4504,
- "end": 4505,
+ "value": "=",
+ "start": 4278,
+ "end": 4279,
"loc": {
"start": {
- "line": 106,
- "column": 56
+ "line": 105,
+ "column": 29
},
"end": {
- "line": 106,
- "column": 57
+ "line": 105,
+ "column": 30
}
}
},
@@ -22529,23 +18249,23 @@
"postfix": false,
"binop": null
},
- "value": "constructor",
- "start": 4505,
- "end": 4516,
+ "value": "pPoint",
+ "start": 4280,
+ "end": 4286,
"loc": {
"start": {
- "line": 106,
- "column": 57
+ "line": 105,
+ "column": 31
},
"end": {
- "line": 106,
- "column": 68
+ "line": 105,
+ "column": 37
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -22553,26 +18273,26 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 4517,
- "end": 4520,
+ "start": 4286,
+ "end": 4287,
"loc": {
"start": {
- "line": 106,
- "column": 69
+ "line": 105,
+ "column": 37
},
"end": {
- "line": 106,
- "column": 72
+ "line": 105,
+ "column": 38
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -22580,25 +18300,26 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "Object",
- "start": 4521,
- "end": 4527,
+ "value": "this",
+ "start": 4296,
+ "end": 4300,
"loc": {
"start": {
"line": 106,
- "column": 73
+ "column": 8
},
"end": {
"line": 106,
- "column": 79
+ "column": 12
}
}
},
{
"type": {
- "label": ")",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -22606,25 +18327,26 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4527,
- "end": 4528,
+ "start": 4300,
+ "end": 4301,
"loc": {
"start": {
"line": 106,
- "column": 79
+ "column": 12
},
"end": {
"line": 106,
- "column": 80
+ "column": 13
}
}
},
{
"type": {
- "label": "{",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -22633,68 +18355,76 @@
"postfix": false,
"binop": null
},
- "start": 4529,
- "end": 4530,
+ "value": "setPoint",
+ "start": 4301,
+ "end": 4309,
"loc": {
"start": {
"line": 106,
- "column": 81
+ "column": 13
},
"end": {
"line": 106,
- "column": 82
+ "column": 21
}
}
},
{
- "type": "CommentLine",
- "value": " Check if the point has valid properties",
- "start": 4543,
- "end": 4585,
+ "type": {
+ "label": "(",
+ "beforeExpr": true,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": false,
+ "postfix": false,
+ "binop": null
+ },
+ "start": 4309,
+ "end": 4310,
"loc": {
"start": {
- "line": 107,
- "column": 12
+ "line": 106,
+ "column": 21
},
"end": {
- "line": 107,
- "column": 54
+ "line": 106,
+ "column": 22
}
}
},
{
"type": {
- "label": "if",
- "keyword": "if",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "if",
- "start": 4598,
- "end": 4600,
+ "value": "pIconPoint",
+ "start": 4310,
+ "end": 4320,
"loc": {
"start": {
- "line": 108,
- "column": 12
+ "line": 106,
+ "column": 22
},
"end": {
- "line": 108,
- "column": 14
+ "line": 106,
+ "column": 32
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ")",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -22702,50 +18432,49 @@
"postfix": false,
"binop": null
},
- "start": 4601,
- "end": 4602,
+ "start": 4320,
+ "end": 4321,
"loc": {
"start": {
- "line": 108,
- "column": 15
+ "line": 106,
+ "column": 32
},
"end": {
- "line": 108,
- "column": 16
+ "line": 106,
+ "column": 33
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
+ "label": ";",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "typeof",
- "start": 4602,
- "end": 4608,
+ "start": 4321,
+ "end": 4322,
"loc": {
"start": {
- "line": 108,
- "column": 16
+ "line": 106,
+ "column": 33
},
"end": {
- "line": 108,
- "column": 22
+ "line": 106,
+ "column": 34
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -22753,19 +18482,20 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "pIconPoint",
- "start": 4609,
- "end": 4619,
+ "value": "this",
+ "start": 4331,
+ "end": 4335,
"loc": {
"start": {
- "line": 108,
- "column": 23
+ "line": 107,
+ "column": 8
},
"end": {
- "line": 108,
- "column": 33
+ "line": 107,
+ "column": 12
}
}
},
@@ -22782,16 +18512,16 @@
"binop": null,
"updateContext": null
},
- "start": 4619,
- "end": 4620,
+ "start": 4335,
+ "end": 4336,
"loc": {
"start": {
- "line": 108,
- "column": 33
+ "line": 107,
+ "column": 12
},
"end": {
- "line": 108,
- "column": 34
+ "line": 107,
+ "column": 13
}
}
},
@@ -22807,51 +18537,52 @@
"postfix": false,
"binop": null
},
- "value": "x",
- "start": 4620,
- "end": 4621,
+ "value": "logger",
+ "start": 4336,
+ "end": 4342,
"loc": {
"start": {
- "line": 108,
- "column": 34
+ "line": 107,
+ "column": 13
},
"end": {
- "line": 108,
- "column": 35
+ "line": 107,
+ "column": 19
}
}
},
{
"type": {
- "label": "==/!=",
+ "label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 4622,
- "end": 4625,
+ "value": "=",
+ "start": 4343,
+ "end": 4344,
"loc": {
"start": {
- "line": 108,
- "column": 36
+ "line": 107,
+ "column": 20
},
"end": {
- "line": 108,
- "column": 39
+ "line": 107,
+ "column": 21
}
}
},
{
"type": {
- "label": "string",
- "beforeExpr": false,
+ "label": "new",
+ "keyword": "new",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -22861,80 +18592,76 @@
"binop": null,
"updateContext": null
},
- "value": "number",
- "start": 4626,
- "end": 4634,
+ "value": "new",
+ "start": 4345,
+ "end": 4348,
"loc": {
"start": {
- "line": 108,
- "column": 40
+ "line": 107,
+ "column": 22
},
"end": {
- "line": 108,
- "column": 48
+ "line": 107,
+ "column": 25
}
}
},
{
"type": {
- "label": "&&",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 2,
- "updateContext": null
+ "binop": null
},
- "value": "&&",
- "start": 4635,
- "end": 4637,
+ "value": "i",
+ "start": 4349,
+ "end": 4350,
"loc": {
"start": {
- "line": 108,
- "column": 49
+ "line": 107,
+ "column": 26
},
"end": {
- "line": 108,
- "column": 51
+ "line": 107,
+ "column": 27
}
}
},
{
"type": {
- "label": "typeof",
- "keyword": "typeof",
+ "label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "typeof",
- "start": 4638,
- "end": 4644,
+ "start": 4350,
+ "end": 4351,
"loc": {
"start": {
- "line": 108,
- "column": 52
+ "line": 107,
+ "column": 27
},
"end": {
- "line": 108,
- "column": 58
+ "line": 107,
+ "column": 28
}
}
},
{
"type": {
- "label": "name",
+ "label": ")",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -22942,24 +18669,23 @@
"postfix": false,
"binop": null
},
- "value": "pIconPoint",
- "start": 4645,
- "end": 4655,
+ "start": 4351,
+ "end": 4352,
"loc": {
"start": {
- "line": 108,
- "column": 59
+ "line": 107,
+ "column": 28
},
"end": {
- "line": 108,
- "column": 69
+ "line": 107,
+ "column": 29
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -22969,22 +18695,23 @@
"binop": null,
"updateContext": null
},
- "start": 4655,
- "end": 4656,
+ "start": 4352,
+ "end": 4353,
"loc": {
"start": {
- "line": 108,
- "column": 69
+ "line": 107,
+ "column": 29
},
"end": {
- "line": 108,
- "column": 70
+ "line": 107,
+ "column": 30
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -22992,52 +18719,52 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "y",
- "start": 4656,
- "end": 4657,
+ "value": "this",
+ "start": 4362,
+ "end": 4366,
"loc": {
"start": {
"line": 108,
- "column": 70
+ "column": 8
},
"end": {
"line": 108,
- "column": 71
+ "column": 12
}
}
},
{
"type": {
- "label": "==/!=",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 6,
+ "binop": null,
"updateContext": null
},
- "value": "===",
- "start": 4658,
- "end": 4661,
+ "start": 4366,
+ "end": 4367,
"loc": {
"start": {
"line": 108,
- "column": 72
+ "column": 12
},
"end": {
"line": 108,
- "column": 75
+ "column": 13
}
}
},
{
"type": {
- "label": "string",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -23045,26 +18772,25 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "number",
- "start": 4662,
- "end": 4670,
+ "value": "logger",
+ "start": 4367,
+ "end": 4373,
"loc": {
"start": {
"line": 108,
- "column": 76
+ "column": 13
},
"end": {
"line": 108,
- "column": 84
+ "column": 19
}
}
},
{
"type": {
- "label": ")",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -23072,25 +18798,26 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4670,
- "end": 4671,
+ "start": 4373,
+ "end": 4374,
"loc": {
"start": {
"line": 108,
- "column": 84
+ "column": 19
},
"end": {
"line": 108,
- "column": 85
+ "column": 20
}
}
},
{
"type": {
- "label": "{",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -23099,52 +18826,50 @@
"postfix": false,
"binop": null
},
- "start": 4672,
- "end": 4673,
+ "value": "registerType",
+ "start": 4374,
+ "end": 4386,
"loc": {
"start": {
"line": 108,
- "column": 86
+ "column": 20
},
"end": {
"line": 108,
- "column": 87
+ "column": 32
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
- "beforeExpr": false,
+ "label": "(",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 4690,
- "end": 4694,
+ "start": 4386,
+ "end": 4387,
"loc": {
"start": {
- "line": 109,
- "column": 16
+ "line": 108,
+ "column": 32
},
"end": {
- "line": 109,
- "column": 20
+ "line": 108,
+ "column": 33
}
}
},
{
"type": {
- "label": ".",
+ "label": "string",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -23153,73 +18878,49 @@
"binop": null,
"updateContext": null
},
- "start": 4694,
- "end": 4695,
- "loc": {
- "start": {
- "line": 109,
- "column": 20
- },
- "end": {
- "line": 109,
- "column": 21
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "setPoint",
- "start": 4695,
- "end": 4703,
+ "value": "Icon-Point-Module",
+ "start": 4387,
+ "end": 4406,
"loc": {
"start": {
- "line": 109,
- "column": 21
+ "line": 108,
+ "column": 33
},
"end": {
- "line": 109,
- "column": 29
+ "line": 108,
+ "column": 52
}
}
},
{
"type": {
- "label": "(",
+ "label": ",",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4703,
- "end": 4704,
+ "start": 4406,
+ "end": 4407,
"loc": {
"start": {
- "line": 109,
- "column": 29
+ "line": 108,
+ "column": 52
},
"end": {
- "line": 109,
- "column": 30
+ "line": 108,
+ "column": 53
}
}
},
{
"type": {
- "label": "name",
+ "label": "string",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -23227,19 +18928,20 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "pIconPoint",
- "start": 4704,
- "end": 4714,
+ "value": "#ff6600",
+ "start": 4408,
+ "end": 4417,
"loc": {
"start": {
- "line": 109,
- "column": 30
+ "line": 108,
+ "column": 54
},
"end": {
- "line": 109,
- "column": 40
+ "line": 108,
+ "column": 63
}
}
},
@@ -23255,16 +18957,16 @@
"postfix": false,
"binop": null
},
- "start": 4714,
- "end": 4715,
+ "start": 4417,
+ "end": 4418,
"loc": {
"start": {
- "line": 109,
- "column": 40
+ "line": 108,
+ "column": 63
},
"end": {
- "line": 109,
- "column": 41
+ "line": 108,
+ "column": 64
}
}
},
@@ -23281,16 +18983,16 @@
"binop": null,
"updateContext": null
},
- "start": 4715,
- "end": 4716,
+ "start": 4418,
+ "end": 4419,
"loc": {
"start": {
- "line": 109,
- "column": 41
+ "line": 108,
+ "column": 64
},
"end": {
- "line": 109,
- "column": 42
+ "line": 108,
+ "column": 65
}
}
},
@@ -23306,50 +19008,64 @@
"postfix": false,
"binop": null
},
- "start": 4729,
- "end": 4730,
+ "start": 4424,
+ "end": 4425,
+ "loc": {
+ "start": {
+ "line": 109,
+ "column": 4
+ },
+ "end": {
+ "line": 109,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account.\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.\n * @prop {number} pOffset.x - The x offset of the rectangle.\n * @prop {number} pOffset.y - The y offset of the rectangle.\n * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.\n * @prop {number} pAnchor.x - The x anchor of the rectangle.\n * @prop {number} pAnchor.y - The y anchor of the rectangle.\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
+ "start": 4430,
+ "end": 6955,
"loc": {
"start": {
"line": 110,
- "column": 12
+ "column": 4
},
"end": {
- "line": 110,
- "column": 13
+ "line": 148,
+ "column": 7
}
}
},
{
"type": {
- "label": "else",
- "keyword": "else",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "else",
- "start": 4743,
- "end": 4747,
+ "value": "getPoint",
+ "start": 6960,
+ "end": 6968,
"loc": {
"start": {
- "line": 111,
- "column": 12
+ "line": 149,
+ "column": 4
},
"end": {
- "line": 111,
- "column": 16
+ "line": 149,
+ "column": 12
}
}
},
{
"type": {
- "label": "{",
+ "label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
@@ -23359,23 +19075,22 @@
"postfix": false,
"binop": null
},
- "start": 4748,
- "end": 4749,
+ "start": 6968,
+ "end": 6969,
"loc": {
"start": {
- "line": 111,
- "column": 17
+ "line": 149,
+ "column": 12
},
"end": {
- "line": 111,
- "column": 18
+ "line": 149,
+ "column": 13
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -23383,52 +19098,52 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 4766,
- "end": 4770,
+ "value": "pAngle",
+ "start": 6969,
+ "end": 6975,
"loc": {
"start": {
- "line": 112,
- "column": 16
+ "line": 149,
+ "column": 13
},
"end": {
- "line": 112,
- "column": 20
+ "line": 149,
+ "column": 19
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": "=",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "start": 4770,
- "end": 4771,
+ "value": "=",
+ "start": 6976,
+ "end": 6977,
"loc": {
"start": {
- "line": 112,
+ "line": 149,
"column": 20
},
"end": {
- "line": 112,
+ "line": 149,
"column": 21
}
}
},
{
"type": {
- "label": "name",
+ "label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -23436,26 +19151,27 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "logger",
- "start": 4771,
- "end": 4777,
+ "value": 0,
+ "start": 6978,
+ "end": 6979,
"loc": {
"start": {
- "line": 112,
- "column": 21
+ "line": 149,
+ "column": 22
},
"end": {
- "line": 112,
- "column": 27
+ "line": 149,
+ "column": 23
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ",",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -23465,16 +19181,16 @@
"binop": null,
"updateContext": null
},
- "start": 4777,
- "end": 4778,
+ "start": 6979,
+ "end": 6980,
"loc": {
"start": {
- "line": 112,
- "column": 27
+ "line": 149,
+ "column": 23
},
"end": {
- "line": 112,
- "column": 28
+ "line": 149,
+ "column": 24
}
}
},
@@ -23490,48 +19206,50 @@
"postfix": false,
"binop": null
},
- "value": "prefix",
- "start": 4778,
- "end": 4784,
+ "value": "pOffset",
+ "start": 6981,
+ "end": 6988,
"loc": {
"start": {
- "line": 112,
- "column": 28
+ "line": 149,
+ "column": 25
},
"end": {
- "line": 112,
- "column": 34
+ "line": 149,
+ "column": 32
}
}
},
{
"type": {
- "label": "(",
+ "label": "=",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4784,
- "end": 4785,
+ "value": "=",
+ "start": 6989,
+ "end": 6990,
"loc": {
"start": {
- "line": 112,
- "column": 34
+ "line": 149,
+ "column": 33
},
"end": {
- "line": 112,
- "column": 35
+ "line": 149,
+ "column": 34
}
}
},
{
"type": {
- "label": "string",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -23539,26 +19257,25 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "Icon-Point-Module",
- "start": 4785,
- "end": 4804,
+ "value": "IconPoint",
+ "start": 6991,
+ "end": 7000,
"loc": {
"start": {
- "line": 112,
+ "line": 149,
"column": 35
},
"end": {
- "line": 112,
- "column": 54
+ "line": 149,
+ "column": 44
}
}
},
{
"type": {
- "label": ")",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -23566,77 +19283,78 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4804,
- "end": 4805,
+ "start": 7000,
+ "end": 7001,
"loc": {
"start": {
- "line": 112,
- "column": 54
+ "line": 149,
+ "column": 44
},
"end": {
- "line": 112,
- "column": 55
+ "line": 149,
+ "column": 45
}
}
},
{
"type": {
- "label": ".",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 4805,
- "end": 4806,
+ "value": "defaultOffset",
+ "start": 7001,
+ "end": 7014,
"loc": {
"start": {
- "line": 112,
- "column": 55
+ "line": 149,
+ "column": 45
},
"end": {
- "line": 112,
- "column": 56
+ "line": 149,
+ "column": 58
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": ",",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "error",
- "start": 4806,
- "end": 4811,
+ "start": 7014,
+ "end": 7015,
"loc": {
"start": {
- "line": 112,
- "column": 56
+ "line": 149,
+ "column": 58
},
"end": {
- "line": 112,
- "column": 61
+ "line": 149,
+ "column": 59
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -23645,51 +19363,52 @@
"postfix": false,
"binop": null
},
- "start": 4811,
- "end": 4812,
+ "value": "pAnchor",
+ "start": 7016,
+ "end": 7023,
"loc": {
"start": {
- "line": 112,
- "column": 61
+ "line": 149,
+ "column": 60
},
"end": {
- "line": 112,
- "column": 62
+ "line": 149,
+ "column": 67
}
}
},
{
"type": {
- "label": "string",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": "=",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!",
- "start": 4812,
- "end": 4888,
+ "value": "=",
+ "start": 7024,
+ "end": 7025,
"loc": {
"start": {
- "line": 112,
- "column": 62
+ "line": 149,
+ "column": 68
},
"end": {
- "line": 112,
- "column": 138
+ "line": 149,
+ "column": 69
}
}
},
{
"type": {
- "label": ")",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -23697,23 +19416,24 @@
"postfix": false,
"binop": null
},
- "start": 4888,
- "end": 4889,
+ "value": "IconPoint",
+ "start": 7026,
+ "end": 7035,
"loc": {
"start": {
- "line": 112,
- "column": 138
+ "line": 149,
+ "column": 70
},
"end": {
- "line": 112,
- "column": 139
+ "line": 149,
+ "column": 79
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -23723,24 +19443,24 @@
"binop": null,
"updateContext": null
},
- "start": 4889,
- "end": 4890,
+ "start": 7035,
+ "end": 7036,
"loc": {
"start": {
- "line": 112,
- "column": 139
+ "line": 149,
+ "column": 79
},
"end": {
- "line": 112,
- "column": 140
+ "line": 149,
+ "column": 80
}
}
},
{
"type": {
- "label": "}",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -23748,22 +19468,23 @@
"postfix": false,
"binop": null
},
- "start": 4903,
- "end": 4904,
+ "value": "defaultAnchor",
+ "start": 7036,
+ "end": 7049,
"loc": {
"start": {
- "line": 113,
- "column": 12
+ "line": 149,
+ "column": 80
},
"end": {
- "line": 113,
- "column": 13
+ "line": 149,
+ "column": 93
}
}
},
{
"type": {
- "label": "}",
+ "label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -23773,50 +19494,96 @@
"postfix": false,
"binop": null
},
- "start": 4913,
- "end": 4914,
+ "start": 7049,
+ "end": 7050,
"loc": {
"start": {
- "line": 114,
- "column": 8
+ "line": 149,
+ "column": 93
},
"end": {
- "line": 114,
- "column": 9
+ "line": 149,
+ "column": 94
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
- "beforeExpr": false,
+ "label": "{",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 4923,
- "end": 4927,
+ "start": 7051,
+ "end": 7052,
+ "loc": {
+ "start": {
+ "line": 149,
+ "column": 95
+ },
+ "end": {
+ "line": 149,
+ "column": 96
+ }
+ }
+ },
+ {
+ "type": "CommentLine",
+ "value": " cx, cy - center of square coordinates ",
+ "start": 7061,
+ "end": 7102,
"loc": {
"start": {
- "line": 115,
+ "line": 150,
"column": 8
},
"end": {
- "line": 115,
- "column": 12
+ "line": 150,
+ "column": 49
+ }
+ }
+ },
+ {
+ "type": "CommentLine",
+ "value": " x, y - coordinates of a corner point of the square",
+ "start": 7111,
+ "end": 7164,
+ "loc": {
+ "start": {
+ "line": 151,
+ "column": 8
+ },
+ "end": {
+ "line": 151,
+ "column": 61
+ }
+ }
+ },
+ {
+ "type": "CommentLine",
+ "value": " angle is the angle of rotation",
+ "start": 7173,
+ "end": 7206,
+ "loc": {
+ "start": {
+ "line": 152,
+ "column": 8
+ },
+ "end": {
+ "line": 152,
+ "column": 41
}
}
},
{
"type": {
- "label": ".",
+ "label": "const",
+ "keyword": "const",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -23827,15 +19594,16 @@
"binop": null,
"updateContext": null
},
- "start": 4927,
- "end": 4928,
+ "value": "const",
+ "start": 7215,
+ "end": 7220,
"loc": {
"start": {
- "line": 115,
- "column": 12
+ "line": 153,
+ "column": 8
},
"end": {
- "line": 115,
+ "line": 153,
"column": 13
}
}
@@ -23852,17 +19620,17 @@
"postfix": false,
"binop": null
},
- "value": "logger",
- "start": 4928,
- "end": 4934,
+ "value": "cx",
+ "start": 7221,
+ "end": 7223,
"loc": {
"start": {
- "line": 115,
- "column": 13
+ "line": 153,
+ "column": 14
},
"end": {
- "line": 115,
- "column": 19
+ "line": 153,
+ "column": 16
}
}
},
@@ -23880,23 +19648,22 @@
"updateContext": null
},
"value": "=",
- "start": 4935,
- "end": 4936,
+ "start": 7224,
+ "end": 7225,
"loc": {
"start": {
- "line": 115,
- "column": 20
+ "line": 153,
+ "column": 17
},
"end": {
- "line": 115,
- "column": 21
+ "line": 153,
+ "column": 18
}
}
},
{
"type": {
- "label": "new",
- "keyword": "new",
+ "label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
@@ -23904,26 +19671,25 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "new",
- "start": 4937,
- "end": 4940,
+ "start": 7226,
+ "end": 7227,
"loc": {
"start": {
- "line": 115,
- "column": 22
+ "line": 153,
+ "column": 19
},
"end": {
- "line": 115,
- "column": 25
+ "line": 153,
+ "column": 20
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -23931,52 +19697,54 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "i",
- "start": 4941,
- "end": 4942,
+ "value": "this",
+ "start": 7227,
+ "end": 7231,
"loc": {
"start": {
- "line": 115,
- "column": 26
+ "line": 153,
+ "column": 20
},
"end": {
- "line": 115,
- "column": 27
+ "line": 153,
+ "column": 24
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ".",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 4942,
- "end": 4943,
+ "start": 7231,
+ "end": 7232,
"loc": {
"start": {
- "line": 115,
- "column": 27
+ "line": 153,
+ "column": 24
},
"end": {
- "line": 115,
- "column": 28
+ "line": 153,
+ "column": 25
}
}
},
{
"type": {
- "label": ")",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -23984,23 +19752,24 @@
"postfix": false,
"binop": null
},
- "start": 4943,
- "end": 4944,
+ "value": "positionalPoint",
+ "start": 7232,
+ "end": 7247,
"loc": {
"start": {
- "line": 115,
- "column": 28
+ "line": 153,
+ "column": 25
},
"end": {
- "line": 115,
- "column": 29
+ "line": 153,
+ "column": 40
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -24010,23 +19779,22 @@
"binop": null,
"updateContext": null
},
- "start": 4944,
- "end": 4945,
+ "start": 7247,
+ "end": 7248,
"loc": {
"start": {
- "line": 115,
- "column": 29
+ "line": 153,
+ "column": 40
},
"end": {
- "line": 115,
- "column": 30
+ "line": 153,
+ "column": 41
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -24034,46 +19802,46 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 4954,
- "end": 4958,
+ "value": "x",
+ "start": 7248,
+ "end": 7249,
"loc": {
"start": {
- "line": 116,
- "column": 8
+ "line": 153,
+ "column": 41
},
"end": {
- "line": 116,
- "column": 12
+ "line": 153,
+ "column": 42
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "+/-",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": false,
+ "prefix": true,
"postfix": false,
- "binop": null,
+ "binop": 9,
"updateContext": null
},
- "start": 4958,
- "end": 4959,
+ "value": "+",
+ "start": 7250,
+ "end": 7251,
"loc": {
"start": {
- "line": 116,
- "column": 12
+ "line": 153,
+ "column": 43
},
"end": {
- "line": 116,
- "column": 13
+ "line": 153,
+ "column": 44
}
}
},
@@ -24089,17 +19857,17 @@
"postfix": false,
"binop": null
},
- "value": "logger",
- "start": 4959,
- "end": 4965,
+ "value": "pOffset",
+ "start": 7252,
+ "end": 7259,
"loc": {
"start": {
- "line": 116,
- "column": 13
+ "line": 153,
+ "column": 45
},
"end": {
- "line": 116,
- "column": 19
+ "line": 153,
+ "column": 52
}
}
},
@@ -24116,16 +19884,16 @@
"binop": null,
"updateContext": null
},
- "start": 4965,
- "end": 4966,
+ "start": 7259,
+ "end": 7260,
"loc": {
"start": {
- "line": 116,
- "column": 19
+ "line": 153,
+ "column": 52
},
"end": {
- "line": 116,
- "column": 20
+ "line": 153,
+ "column": 53
}
}
},
@@ -24141,25 +19909,25 @@
"postfix": false,
"binop": null
},
- "value": "registerType",
- "start": 4966,
- "end": 4978,
+ "value": "x",
+ "start": 7260,
+ "end": 7261,
"loc": {
"start": {
- "line": 116,
- "column": 20
+ "line": 153,
+ "column": 53
},
"end": {
- "line": 116,
- "column": 32
+ "line": 153,
+ "column": 54
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ")",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -24167,51 +19935,52 @@
"postfix": false,
"binop": null
},
- "start": 4978,
- "end": 4979,
+ "start": 7261,
+ "end": 7262,
"loc": {
"start": {
- "line": 116,
- "column": 32
+ "line": 153,
+ "column": 54
},
"end": {
- "line": 116,
- "column": 33
+ "line": 153,
+ "column": 55
}
}
},
{
"type": {
- "label": "string",
- "beforeExpr": false,
+ "label": "+/-",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": false,
+ "prefix": true,
"postfix": false,
- "binop": null,
+ "binop": 9,
"updateContext": null
},
- "value": "Icon-Point-Module",
- "start": 4979,
- "end": 4998,
+ "value": "+",
+ "start": 7263,
+ "end": 7264,
"loc": {
"start": {
- "line": 116,
- "column": 33
+ "line": 153,
+ "column": 56
},
"end": {
- "line": 116,
- "column": 52
+ "line": 153,
+ "column": 57
}
}
},
{
"type": {
- "label": ",",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "this",
+ "keyword": "this",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -24220,24 +19989,25 @@
"binop": null,
"updateContext": null
},
- "start": 4998,
- "end": 4999,
+ "value": "this",
+ "start": 7265,
+ "end": 7269,
"loc": {
"start": {
- "line": 116,
- "column": 52
+ "line": 153,
+ "column": 58
},
"end": {
- "line": 116,
- "column": 53
+ "line": 153,
+ "column": 62
}
}
},
{
"type": {
- "label": "string",
+ "label": ".",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -24246,25 +20016,24 @@
"binop": null,
"updateContext": null
},
- "value": "#ff6600",
- "start": 5000,
- "end": 5009,
+ "start": 7269,
+ "end": 7270,
"loc": {
"start": {
- "line": 116,
- "column": 54
+ "line": 153,
+ "column": 62
},
"end": {
- "line": 116,
+ "line": 153,
"column": 63
}
}
},
{
"type": {
- "label": ")",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -24272,23 +20041,24 @@
"postfix": false,
"binop": null
},
- "start": 5009,
- "end": 5010,
+ "value": "bounds",
+ "start": 7270,
+ "end": 7276,
"loc": {
"start": {
- "line": 116,
+ "line": 153,
"column": 63
},
"end": {
- "line": 116,
- "column": 64
+ "line": 153,
+ "column": 69
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -24298,24 +20068,24 @@
"binop": null,
"updateContext": null
},
- "start": 5010,
- "end": 5011,
+ "start": 7276,
+ "end": 7277,
"loc": {
"start": {
- "line": 116,
- "column": 64
+ "line": 153,
+ "column": 69
},
"end": {
- "line": 116,
- "column": 65
+ "line": 153,
+ "column": 70
}
}
},
{
"type": {
- "label": "}",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -24323,65 +20093,51 @@
"postfix": false,
"binop": null
},
- "start": 5016,
- "end": 5017,
- "loc": {
- "start": {
- "line": 117,
- "column": 4
- },
- "end": {
- "line": 117,
- "column": 5
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * Gets the new point's position inside a rectangle after taking pAngle into account\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle\n * @prop {number} pOffset.x - The x offset of the rectangle\n * @prop {number} pOffset.y - The y offset of the rectangle\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n ",
- "start": 5022,
- "end": 7343,
+ "value": "width",
+ "start": 7277,
+ "end": 7282,
"loc": {
"start": {
- "line": 118,
- "column": 4
+ "line": 153,
+ "column": 70
},
"end": {
"line": 153,
- "column": 7
+ "column": 75
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": "*",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": 10,
+ "updateContext": null
},
- "value": "getPoint",
- "start": 7348,
- "end": 7356,
+ "value": "*",
+ "start": 7283,
+ "end": 7284,
"loc": {
"start": {
- "line": 154,
- "column": 4
+ "line": 153,
+ "column": 76
},
"end": {
- "line": 154,
- "column": 12
+ "line": 153,
+ "column": 77
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -24390,77 +20146,77 @@
"postfix": false,
"binop": null
},
- "start": 7356,
- "end": 7357,
+ "value": "pAnchor",
+ "start": 7285,
+ "end": 7292,
"loc": {
"start": {
- "line": 154,
- "column": 12
+ "line": 153,
+ "column": 78
},
"end": {
- "line": 154,
- "column": 13
+ "line": 153,
+ "column": 85
}
}
},
{
"type": {
- "label": "name",
+ "label": ".",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "pAngle",
- "start": 7357,
- "end": 7363,
+ "start": 7292,
+ "end": 7293,
"loc": {
"start": {
- "line": 154,
- "column": 13
+ "line": 153,
+ "column": 85
},
"end": {
- "line": 154,
- "column": 19
+ "line": 153,
+ "column": 86
}
}
},
{
"type": {
- "label": "=",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "=",
- "start": 7364,
- "end": 7365,
+ "value": "x",
+ "start": 7293,
+ "end": 7294,
"loc": {
"start": {
- "line": 154,
- "column": 20
+ "line": 153,
+ "column": 86
},
"end": {
- "line": 154,
- "column": 21
+ "line": 153,
+ "column": 87
}
}
},
{
"type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": ";",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -24469,24 +20225,24 @@
"binop": null,
"updateContext": null
},
- "value": 0,
- "start": 7366,
- "end": 7367,
+ "start": 7294,
+ "end": 7295,
"loc": {
"start": {
- "line": 154,
- "column": 22
+ "line": 153,
+ "column": 87
},
"end": {
- "line": 154,
- "column": 23
+ "line": 153,
+ "column": 88
}
}
},
{
"type": {
- "label": ",",
- "beforeExpr": true,
+ "label": "const",
+ "keyword": "const",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -24496,16 +20252,17 @@
"binop": null,
"updateContext": null
},
- "start": 7367,
- "end": 7368,
+ "value": "const",
+ "start": 7304,
+ "end": 7309,
"loc": {
"start": {
"line": 154,
- "column": 23
+ "column": 8
},
"end": {
"line": 154,
- "column": 24
+ "column": 13
}
}
},
@@ -24521,17 +20278,17 @@
"postfix": false,
"binop": null
},
- "value": "pOffset",
- "start": 7369,
- "end": 7376,
+ "value": "cy",
+ "start": 7310,
+ "end": 7312,
"loc": {
"start": {
"line": 154,
- "column": 25
+ "column": 14
},
"end": {
"line": 154,
- "column": 32
+ "column": 16
}
}
},
@@ -24549,23 +20306,23 @@
"updateContext": null
},
"value": "=",
- "start": 7377,
- "end": 7378,
+ "start": 7313,
+ "end": 7314,
"loc": {
"start": {
"line": 154,
- "column": 33
+ "column": 17
},
"end": {
"line": 154,
- "column": 34
+ "column": 18
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
+ "label": "(",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -24574,17 +20331,44 @@
"postfix": false,
"binop": null
},
- "value": "IconPoint",
- "start": 7379,
- "end": 7388,
+ "start": 7315,
+ "end": 7316,
"loc": {
"start": {
"line": 154,
- "column": 35
+ "column": 19
},
"end": {
"line": 154,
- "column": 44
+ "column": 20
+ }
+ }
+ },
+ {
+ "type": {
+ "label": "this",
+ "keyword": "this",
+ "beforeExpr": false,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": false,
+ "postfix": false,
+ "binop": null,
+ "updateContext": null
+ },
+ "value": "this",
+ "start": 7316,
+ "end": 7320,
+ "loc": {
+ "start": {
+ "line": 154,
+ "column": 20
+ },
+ "end": {
+ "line": 154,
+ "column": 24
}
}
},
@@ -24601,16 +20385,16 @@
"binop": null,
"updateContext": null
},
- "start": 7388,
- "end": 7389,
+ "start": 7320,
+ "end": 7321,
"loc": {
"start": {
"line": 154,
- "column": 44
+ "column": 24
},
"end": {
"line": 154,
- "column": 45
+ "column": 25
}
}
},
@@ -24626,24 +20410,24 @@
"postfix": false,
"binop": null
},
- "value": "defaultOffset",
- "start": 7389,
- "end": 7402,
+ "value": "positionalPoint",
+ "start": 7321,
+ "end": 7336,
"loc": {
"start": {
"line": 154,
- "column": 45
+ "column": 25
},
"end": {
"line": 154,
- "column": 58
+ "column": 40
}
}
},
{
"type": {
- "label": ",",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -24653,16 +20437,16 @@
"binop": null,
"updateContext": null
},
- "start": 7402,
- "end": 7403,
+ "start": 7336,
+ "end": 7337,
"loc": {
"start": {
"line": 154,
- "column": 58
+ "column": 40
},
"end": {
"line": 154,
- "column": 59
+ "column": 41
}
}
},
@@ -24678,44 +20462,44 @@
"postfix": false,
"binop": null
},
- "value": "pAnchor",
- "start": 7404,
- "end": 7411,
+ "value": "y",
+ "start": 7337,
+ "end": 7338,
"loc": {
"start": {
"line": 154,
- "column": 60
+ "column": 41
},
"end": {
"line": 154,
- "column": 67
+ "column": 42
}
}
},
{
"type": {
- "label": "=",
+ "label": "+/-",
"beforeExpr": true,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
- "prefix": false,
+ "isAssign": false,
+ "prefix": true,
"postfix": false,
- "binop": null,
+ "binop": 9,
"updateContext": null
},
- "value": "=",
- "start": 7412,
- "end": 7413,
+ "value": "+",
+ "start": 7339,
+ "end": 7340,
"loc": {
"start": {
"line": 154,
- "column": 68
+ "column": 43
},
"end": {
"line": 154,
- "column": 69
+ "column": 44
}
}
},
@@ -24731,17 +20515,17 @@
"postfix": false,
"binop": null
},
- "value": "IconPoint",
- "start": 7414,
- "end": 7423,
+ "value": "pOffset",
+ "start": 7341,
+ "end": 7348,
"loc": {
"start": {
"line": 154,
- "column": 70
+ "column": 45
},
"end": {
"line": 154,
- "column": 79
+ "column": 52
}
}
},
@@ -24758,16 +20542,16 @@
"binop": null,
"updateContext": null
},
- "start": 7423,
- "end": 7424,
+ "start": 7348,
+ "end": 7349,
"loc": {
"start": {
"line": 154,
- "column": 79
+ "column": 52
},
"end": {
"line": 154,
- "column": 80
+ "column": 53
}
}
},
@@ -24783,17 +20567,17 @@
"postfix": false,
"binop": null
},
- "value": "defaultAnchor",
- "start": 7424,
- "end": 7437,
+ "value": "y",
+ "start": 7349,
+ "end": 7350,
"loc": {
"start": {
"line": 154,
- "column": 80
+ "column": 53
},
"end": {
"line": 154,
- "column": 93
+ "column": 54
}
}
},
@@ -24809,48 +20593,77 @@
"postfix": false,
"binop": null
},
- "start": 7437,
- "end": 7438,
+ "start": 7350,
+ "end": 7351,
"loc": {
"start": {
"line": 154,
- "column": 93
+ "column": 54
},
"end": {
"line": 154,
- "column": 94
+ "column": 55
}
}
},
{
"type": {
- "label": "{",
+ "label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
+ "prefix": true,
+ "postfix": false,
+ "binop": 9,
+ "updateContext": null
+ },
+ "value": "+",
+ "start": 7352,
+ "end": 7353,
+ "loc": {
+ "start": {
+ "line": 154,
+ "column": 56
+ },
+ "end": {
+ "line": 154,
+ "column": 57
+ }
+ }
+ },
+ {
+ "type": {
+ "label": "this",
+ "keyword": "this",
+ "beforeExpr": false,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 7439,
- "end": 7440,
+ "value": "this",
+ "start": 7354,
+ "end": 7358,
"loc": {
"start": {
"line": 154,
- "column": 95
+ "column": 58
},
"end": {
"line": 154,
- "column": 96
+ "column": 62
}
}
},
{
"type": {
- "label": "if",
- "keyword": "if",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -24861,24 +20674,23 @@
"binop": null,
"updateContext": null
},
- "value": "if",
- "start": 7449,
- "end": 7451,
+ "start": 7358,
+ "end": 7359,
"loc": {
"start": {
- "line": 155,
- "column": 8
+ "line": 154,
+ "column": 62
},
"end": {
- "line": 155,
- "column": 10
+ "line": 154,
+ "column": 63
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -24887,50 +20699,49 @@
"postfix": false,
"binop": null
},
- "start": 7452,
- "end": 7453,
+ "value": "bounds",
+ "start": 7359,
+ "end": 7365,
"loc": {
"start": {
- "line": 155,
- "column": 11
+ "line": 154,
+ "column": 63
},
"end": {
- "line": 155,
- "column": 12
+ "line": 154,
+ "column": 69
}
}
},
{
"type": {
- "label": "prefix",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ".",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "!",
- "start": 7453,
- "end": 7454,
+ "start": 7365,
+ "end": 7366,
"loc": {
"start": {
- "line": 155,
- "column": 12
+ "line": 154,
+ "column": 69
},
"end": {
- "line": 155,
- "column": 13
+ "line": 154,
+ "column": 70
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -24938,46 +20749,46 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 7454,
- "end": 7458,
+ "value": "height",
+ "start": 7366,
+ "end": 7372,
"loc": {
"start": {
- "line": 155,
- "column": 13
+ "line": 154,
+ "column": 70
},
"end": {
- "line": 155,
- "column": 17
+ "line": 154,
+ "column": 76
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": "*",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
+ "binop": 10,
"updateContext": null
},
- "start": 7458,
- "end": 7459,
+ "value": "*",
+ "start": 7373,
+ "end": 7374,
"loc": {
"start": {
- "line": 155,
- "column": 17
+ "line": 154,
+ "column": 77
},
"end": {
- "line": 155,
- "column": 18
+ "line": 154,
+ "column": 78
}
}
},
@@ -24993,23 +20804,23 @@
"postfix": false,
"binop": null
},
- "value": "positionalPoint",
- "start": 7459,
- "end": 7474,
+ "value": "pAnchor",
+ "start": 7375,
+ "end": 7382,
"loc": {
"start": {
- "line": 155,
- "column": 18
+ "line": 154,
+ "column": 79
},
"end": {
- "line": 155,
- "column": 33
+ "line": 154,
+ "column": 86
}
}
},
{
"type": {
- "label": ")",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -25017,46 +20828,45 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 7474,
- "end": 7475,
+ "start": 7382,
+ "end": 7383,
"loc": {
"start": {
- "line": 155,
- "column": 33
+ "line": 154,
+ "column": 86
},
"end": {
- "line": 155,
- "column": 34
+ "line": 154,
+ "column": 87
}
}
},
{
"type": {
- "label": "return",
- "keyword": "return",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "return",
- "start": 7488,
- "end": 7494,
+ "value": "y",
+ "start": 7383,
+ "end": 7384,
"loc": {
"start": {
- "line": 156,
- "column": 12
+ "line": 154,
+ "column": 87
},
"end": {
- "line": 156,
- "column": 18
+ "line": 154,
+ "column": 88
}
}
},
@@ -25073,64 +20883,48 @@
"binop": null,
"updateContext": null
},
- "start": 7494,
- "end": 7495,
- "loc": {
- "start": {
- "line": 156,
- "column": 18
- },
- "end": {
- "line": 156,
- "column": 19
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " cx, cy - center of square coordinates ",
- "start": 7504,
- "end": 7545,
+ "start": 7384,
+ "end": 7385,
"loc": {
"start": {
- "line": 157,
- "column": 8
+ "line": 154,
+ "column": 88
},
"end": {
- "line": 157,
- "column": 49
+ "line": 154,
+ "column": 89
}
}
},
{
"type": "CommentLine",
- "value": " x, y - coordinates of a corner point of the square",
- "start": 7554,
- "end": 7607,
+ "value": " We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle",
+ "start": 7394,
+ "end": 7525,
"loc": {
"start": {
- "line": 158,
+ "line": 155,
"column": 8
},
"end": {
- "line": 158,
- "column": 61
+ "line": 155,
+ "column": 139
}
}
},
{
"type": "CommentLine",
- "value": " angle is the angle of rotation",
- "start": 7616,
- "end": 7649,
+ "value": " Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates",
+ "start": 7534,
+ "end": 7616,
"loc": {
"start": {
- "line": 159,
+ "line": 156,
"column": 8
},
"end": {
- "line": 159,
- "column": 41
+ "line": 156,
+ "column": 90
}
}
},
@@ -25149,15 +20943,15 @@
"updateContext": null
},
"value": "const",
- "start": 7658,
- "end": 7663,
+ "start": 7625,
+ "end": 7630,
"loc": {
"start": {
- "line": 160,
+ "line": 157,
"column": 8
},
"end": {
- "line": 160,
+ "line": 157,
"column": 13
}
}
@@ -25174,17 +20968,17 @@
"postfix": false,
"binop": null
},
- "value": "cx",
- "start": 7664,
- "end": 7666,
+ "value": "pointX",
+ "start": 7631,
+ "end": 7637,
"loc": {
"start": {
- "line": 160,
+ "line": 157,
"column": 14
},
"end": {
- "line": 160,
- "column": 16
+ "line": 157,
+ "column": 20
}
}
},
@@ -25202,16 +20996,16 @@
"updateContext": null
},
"value": "=",
- "start": 7667,
- "end": 7668,
+ "start": 7638,
+ "end": 7639,
"loc": {
"start": {
- "line": 160,
- "column": 17
+ "line": 157,
+ "column": 21
},
"end": {
- "line": 160,
- "column": 18
+ "line": 157,
+ "column": 22
}
}
},
@@ -25227,16 +21021,16 @@
"postfix": false,
"binop": null
},
- "start": 7669,
- "end": 7670,
+ "start": 7640,
+ "end": 7641,
"loc": {
"start": {
- "line": 160,
- "column": 19
+ "line": 157,
+ "column": 23
},
"end": {
- "line": 160,
- "column": 20
+ "line": 157,
+ "column": 24
}
}
},
@@ -25255,16 +21049,16 @@
"updateContext": null
},
"value": "this",
- "start": 7670,
- "end": 7674,
+ "start": 7641,
+ "end": 7645,
"loc": {
"start": {
- "line": 160,
- "column": 20
+ "line": 157,
+ "column": 24
},
"end": {
- "line": 160,
- "column": 24
+ "line": 157,
+ "column": 28
}
}
},
@@ -25281,16 +21075,16 @@
"binop": null,
"updateContext": null
},
- "start": 7674,
- "end": 7675,
+ "start": 7645,
+ "end": 7646,
"loc": {
"start": {
- "line": 160,
- "column": 24
+ "line": 157,
+ "column": 28
},
"end": {
- "line": 160,
- "column": 25
+ "line": 157,
+ "column": 29
}
}
},
@@ -25307,16 +21101,16 @@
"binop": null
},
"value": "positionalPoint",
- "start": 7675,
- "end": 7690,
+ "start": 7646,
+ "end": 7661,
"loc": {
"start": {
- "line": 160,
- "column": 25
+ "line": 157,
+ "column": 29
},
"end": {
- "line": 160,
- "column": 40
+ "line": 157,
+ "column": 44
}
}
},
@@ -25333,16 +21127,16 @@
"binop": null,
"updateContext": null
},
- "start": 7690,
- "end": 7691,
+ "start": 7661,
+ "end": 7662,
"loc": {
"start": {
- "line": 160,
- "column": 40
+ "line": 157,
+ "column": 44
},
"end": {
- "line": 160,
- "column": 41
+ "line": 157,
+ "column": 45
}
}
},
@@ -25359,16 +21153,16 @@
"binop": null
},
"value": "x",
- "start": 7691,
- "end": 7692,
+ "start": 7662,
+ "end": 7663,
"loc": {
"start": {
- "line": 160,
- "column": 41
+ "line": 157,
+ "column": 45
},
"end": {
- "line": 160,
- "column": 42
+ "line": 157,
+ "column": 46
}
}
},
@@ -25386,16 +21180,16 @@
"updateContext": null
},
"value": "+",
- "start": 7693,
- "end": 7694,
+ "start": 7664,
+ "end": 7665,
"loc": {
"start": {
- "line": 160,
- "column": 43
+ "line": 157,
+ "column": 47
},
"end": {
- "line": 160,
- "column": 44
+ "line": 157,
+ "column": 48
}
}
},
@@ -25412,16 +21206,16 @@
"binop": null
},
"value": "pOffset",
- "start": 7695,
- "end": 7702,
+ "start": 7666,
+ "end": 7673,
"loc": {
"start": {
- "line": 160,
- "column": 45
+ "line": 157,
+ "column": 49
},
"end": {
- "line": 160,
- "column": 52
+ "line": 157,
+ "column": 56
}
}
},
@@ -25438,16 +21232,16 @@
"binop": null,
"updateContext": null
},
- "start": 7702,
- "end": 7703,
+ "start": 7673,
+ "end": 7674,
"loc": {
"start": {
- "line": 160,
- "column": 52
+ "line": 157,
+ "column": 56
},
"end": {
- "line": 160,
- "column": 53
+ "line": 157,
+ "column": 57
}
}
},
@@ -25464,41 +21258,16 @@
"binop": null
},
"value": "x",
- "start": 7703,
- "end": 7704,
- "loc": {
- "start": {
- "line": 160,
- "column": 53
- },
- "end": {
- "line": 160,
- "column": 54
- }
- }
- },
- {
- "type": {
- "label": ")",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "start": 7704,
- "end": 7705,
+ "start": 7674,
+ "end": 7675,
"loc": {
"start": {
- "line": 160,
- "column": 54
+ "line": 157,
+ "column": 57
},
"end": {
- "line": 160,
- "column": 55
+ "line": 157,
+ "column": 58
}
}
},
@@ -25515,24 +21284,23 @@
"binop": 9,
"updateContext": null
},
- "value": "+",
- "start": 7706,
- "end": 7707,
+ "value": "-",
+ "start": 7676,
+ "end": 7677,
"loc": {
"start": {
- "line": 160,
- "column": 56
+ "line": 157,
+ "column": 59
},
"end": {
- "line": 160,
- "column": 57
+ "line": 157,
+ "column": 60
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "num",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -25543,51 +21311,25 @@
"binop": null,
"updateContext": null
},
- "value": "this",
- "start": 7708,
- "end": 7712,
- "loc": {
- "start": {
- "line": 160,
- "column": 58
- },
- "end": {
- "line": 160,
- "column": 62
- }
- }
- },
- {
- "type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 7712,
- "end": 7713,
+ "value": 1,
+ "start": 7678,
+ "end": 7679,
"loc": {
"start": {
- "line": 160,
- "column": 62
+ "line": 157,
+ "column": 61
},
"end": {
- "line": 160,
- "column": 63
+ "line": 157,
+ "column": 62
}
}
},
{
"type": {
- "label": "name",
+ "label": ")",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -25595,49 +21337,50 @@
"postfix": false,
"binop": null
},
- "value": "bounds",
- "start": 7713,
- "end": 7719,
+ "start": 7679,
+ "end": 7680,
"loc": {
"start": {
- "line": 160,
- "column": 63
+ "line": 157,
+ "column": 62
},
"end": {
- "line": 160,
- "column": 69
+ "line": 157,
+ "column": 63
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "+/-",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": false,
+ "prefix": true,
"postfix": false,
- "binop": null,
+ "binop": 9,
"updateContext": null
},
- "start": 7719,
- "end": 7720,
+ "value": "+",
+ "start": 7681,
+ "end": 7682,
"loc": {
"start": {
- "line": 160,
- "column": 69
+ "line": 157,
+ "column": 64
},
"end": {
- "line": 160,
- "column": 70
+ "line": 157,
+ "column": 65
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -25645,46 +21388,46 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "width",
- "start": 7720,
- "end": 7725,
+ "value": "this",
+ "start": 7683,
+ "end": 7687,
"loc": {
"start": {
- "line": 160,
- "column": 70
+ "line": 157,
+ "column": 66
},
"end": {
- "line": 160,
- "column": 75
+ "line": 157,
+ "column": 70
}
}
},
{
"type": {
- "label": "*",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 10,
+ "binop": null,
"updateContext": null
},
- "value": "*",
- "start": 7726,
- "end": 7727,
+ "start": 7687,
+ "end": 7688,
"loc": {
"start": {
- "line": 160,
- "column": 76
+ "line": 157,
+ "column": 70
},
"end": {
- "line": 160,
- "column": 77
+ "line": 157,
+ "column": 71
}
}
},
@@ -25700,17 +21443,17 @@
"postfix": false,
"binop": null
},
- "value": "pAnchor",
- "start": 7728,
- "end": 7735,
+ "value": "iconPoint",
+ "start": 7688,
+ "end": 7697,
"loc": {
"start": {
- "line": 160,
- "column": 78
+ "line": 157,
+ "column": 71
},
"end": {
- "line": 160,
- "column": 85
+ "line": 157,
+ "column": 80
}
}
},
@@ -25727,16 +21470,16 @@
"binop": null,
"updateContext": null
},
- "start": 7735,
- "end": 7736,
+ "start": 7697,
+ "end": 7698,
"loc": {
"start": {
- "line": 160,
- "column": 85
+ "line": 157,
+ "column": 80
},
"end": {
- "line": 160,
- "column": 86
+ "line": 157,
+ "column": 81
}
}
},
@@ -25753,16 +21496,16 @@
"binop": null
},
"value": "x",
- "start": 7736,
- "end": 7737,
+ "start": 7698,
+ "end": 7699,
"loc": {
"start": {
- "line": 160,
- "column": 86
+ "line": 157,
+ "column": 81
},
"end": {
- "line": 160,
- "column": 87
+ "line": 157,
+ "column": 82
}
}
},
@@ -25779,16 +21522,16 @@
"binop": null,
"updateContext": null
},
- "start": 7737,
- "end": 7738,
+ "start": 7699,
+ "end": 7700,
"loc": {
"start": {
- "line": 160,
- "column": 87
+ "line": 157,
+ "column": 82
},
"end": {
- "line": 160,
- "column": 88
+ "line": 157,
+ "column": 83
}
}
},
@@ -25807,15 +21550,15 @@
"updateContext": null
},
"value": "const",
- "start": 7747,
- "end": 7752,
+ "start": 7709,
+ "end": 7714,
"loc": {
"start": {
- "line": 161,
+ "line": 158,
"column": 8
},
"end": {
- "line": 161,
+ "line": 158,
"column": 13
}
}
@@ -25832,17 +21575,17 @@
"postfix": false,
"binop": null
},
- "value": "cy",
- "start": 7753,
- "end": 7755,
+ "value": "pointY",
+ "start": 7715,
+ "end": 7721,
"loc": {
"start": {
- "line": 161,
+ "line": 158,
"column": 14
},
"end": {
- "line": 161,
- "column": 16
+ "line": 158,
+ "column": 20
}
}
},
@@ -25860,16 +21603,16 @@
"updateContext": null
},
"value": "=",
- "start": 7756,
- "end": 7757,
+ "start": 7722,
+ "end": 7723,
"loc": {
"start": {
- "line": 161,
- "column": 17
+ "line": 158,
+ "column": 21
},
"end": {
- "line": 161,
- "column": 18
+ "line": 158,
+ "column": 22
}
}
},
@@ -25885,16 +21628,16 @@
"postfix": false,
"binop": null
},
- "start": 7758,
- "end": 7759,
+ "start": 7724,
+ "end": 7725,
"loc": {
"start": {
- "line": 161,
- "column": 19
+ "line": 158,
+ "column": 23
},
"end": {
- "line": 161,
- "column": 20
+ "line": 158,
+ "column": 24
}
}
},
@@ -25913,16 +21656,16 @@
"updateContext": null
},
"value": "this",
- "start": 7759,
- "end": 7763,
+ "start": 7725,
+ "end": 7729,
"loc": {
"start": {
- "line": 161,
- "column": 20
+ "line": 158,
+ "column": 24
},
"end": {
- "line": 161,
- "column": 24
+ "line": 158,
+ "column": 28
}
}
},
@@ -25939,16 +21682,16 @@
"binop": null,
"updateContext": null
},
- "start": 7763,
- "end": 7764,
+ "start": 7729,
+ "end": 7730,
"loc": {
"start": {
- "line": 161,
- "column": 24
+ "line": 158,
+ "column": 28
},
"end": {
- "line": 161,
- "column": 25
+ "line": 158,
+ "column": 29
}
}
},
@@ -25965,16 +21708,16 @@
"binop": null
},
"value": "positionalPoint",
- "start": 7764,
- "end": 7779,
+ "start": 7730,
+ "end": 7745,
"loc": {
"start": {
- "line": 161,
- "column": 25
+ "line": 158,
+ "column": 29
},
"end": {
- "line": 161,
- "column": 40
+ "line": 158,
+ "column": 44
}
}
},
@@ -25991,16 +21734,16 @@
"binop": null,
"updateContext": null
},
- "start": 7779,
- "end": 7780,
+ "start": 7745,
+ "end": 7746,
"loc": {
"start": {
- "line": 161,
- "column": 40
+ "line": 158,
+ "column": 44
},
"end": {
- "line": 161,
- "column": 41
+ "line": 158,
+ "column": 45
}
}
},
@@ -26017,16 +21760,16 @@
"binop": null
},
"value": "y",
- "start": 7780,
- "end": 7781,
+ "start": 7746,
+ "end": 7747,
"loc": {
"start": {
- "line": 161,
- "column": 41
+ "line": 158,
+ "column": 45
},
"end": {
- "line": 161,
- "column": 42
+ "line": 158,
+ "column": 46
}
}
},
@@ -26044,16 +21787,16 @@
"updateContext": null
},
"value": "+",
- "start": 7782,
- "end": 7783,
+ "start": 7748,
+ "end": 7749,
"loc": {
"start": {
- "line": 161,
- "column": 43
+ "line": 158,
+ "column": 47
},
"end": {
- "line": 161,
- "column": 44
+ "line": 158,
+ "column": 48
}
}
},
@@ -26070,16 +21813,16 @@
"binop": null
},
"value": "pOffset",
- "start": 7784,
- "end": 7791,
+ "start": 7750,
+ "end": 7757,
"loc": {
"start": {
- "line": 161,
- "column": 45
+ "line": 158,
+ "column": 49
},
"end": {
- "line": 161,
- "column": 52
+ "line": 158,
+ "column": 56
}
}
},
@@ -26096,16 +21839,16 @@
"binop": null,
"updateContext": null
},
- "start": 7791,
- "end": 7792,
+ "start": 7757,
+ "end": 7758,
"loc": {
"start": {
- "line": 161,
- "column": 52
+ "line": 158,
+ "column": 56
},
"end": {
- "line": 161,
- "column": 53
+ "line": 158,
+ "column": 57
}
}
},
@@ -26122,16 +21865,70 @@
"binop": null
},
"value": "y",
- "start": 7792,
- "end": 7793,
+ "start": 7758,
+ "end": 7759,
"loc": {
"start": {
- "line": 161,
- "column": 53
+ "line": 158,
+ "column": 57
+ },
+ "end": {
+ "line": 158,
+ "column": 58
+ }
+ }
+ },
+ {
+ "type": {
+ "label": "+/-",
+ "beforeExpr": true,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": true,
+ "postfix": false,
+ "binop": 9,
+ "updateContext": null
+ },
+ "value": "-",
+ "start": 7760,
+ "end": 7761,
+ "loc": {
+ "start": {
+ "line": 158,
+ "column": 59
+ },
+ "end": {
+ "line": 158,
+ "column": 60
+ }
+ }
+ },
+ {
+ "type": {
+ "label": "num",
+ "beforeExpr": false,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": false,
+ "postfix": false,
+ "binop": null,
+ "updateContext": null
+ },
+ "value": 1,
+ "start": 7762,
+ "end": 7763,
+ "loc": {
+ "start": {
+ "line": 158,
+ "column": 61
},
"end": {
- "line": 161,
- "column": 54
+ "line": 158,
+ "column": 62
}
}
},
@@ -26147,16 +21944,16 @@
"postfix": false,
"binop": null
},
- "start": 7793,
- "end": 7794,
+ "start": 7763,
+ "end": 7764,
"loc": {
"start": {
- "line": 161,
- "column": 54
+ "line": 158,
+ "column": 62
},
"end": {
- "line": 161,
- "column": 55
+ "line": 158,
+ "column": 63
}
}
},
@@ -26174,16 +21971,16 @@
"updateContext": null
},
"value": "+",
- "start": 7795,
- "end": 7796,
+ "start": 7765,
+ "end": 7766,
"loc": {
"start": {
- "line": 161,
- "column": 56
+ "line": 158,
+ "column": 64
},
"end": {
- "line": 161,
- "column": 57
+ "line": 158,
+ "column": 65
}
}
},
@@ -26202,16 +21999,16 @@
"updateContext": null
},
"value": "this",
- "start": 7797,
- "end": 7801,
+ "start": 7767,
+ "end": 7771,
"loc": {
"start": {
- "line": 161,
- "column": 58
+ "line": 158,
+ "column": 66
},
"end": {
- "line": 161,
- "column": 62
+ "line": 158,
+ "column": 70
}
}
},
@@ -26228,16 +22025,16 @@
"binop": null,
"updateContext": null
},
- "start": 7801,
- "end": 7802,
+ "start": 7771,
+ "end": 7772,
"loc": {
"start": {
- "line": 161,
- "column": 62
+ "line": 158,
+ "column": 70
},
"end": {
- "line": 161,
- "column": 63
+ "line": 158,
+ "column": 71
}
}
},
@@ -26253,17 +22050,17 @@
"postfix": false,
"binop": null
},
- "value": "bounds",
- "start": 7802,
- "end": 7808,
+ "value": "iconPoint",
+ "start": 7772,
+ "end": 7781,
"loc": {
"start": {
- "line": 161,
- "column": 63
+ "line": 158,
+ "column": 71
},
"end": {
- "line": 161,
- "column": 69
+ "line": 158,
+ "column": 80
}
}
},
@@ -26280,16 +22077,16 @@
"binop": null,
"updateContext": null
},
- "start": 7808,
- "end": 7809,
+ "start": 7781,
+ "end": 7782,
"loc": {
"start": {
- "line": 161,
- "column": 69
+ "line": 158,
+ "column": 80
},
"end": {
- "line": 161,
- "column": 70
+ "line": 158,
+ "column": 81
}
}
},
@@ -26305,23 +22102,23 @@
"postfix": false,
"binop": null
},
- "value": "height",
- "start": 7809,
- "end": 7815,
+ "value": "y",
+ "start": 7782,
+ "end": 7783,
"loc": {
"start": {
- "line": 161,
- "column": 70
+ "line": 158,
+ "column": 81
},
"end": {
- "line": 161,
- "column": 76
+ "line": 158,
+ "column": 82
}
}
},
{
"type": {
- "label": "*",
+ "label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -26329,52 +22126,42 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 10,
+ "binop": null,
"updateContext": null
},
- "value": "*",
- "start": 7816,
- "end": 7817,
+ "start": 7783,
+ "end": 7784,
"loc": {
"start": {
- "line": 161,
- "column": 77
+ "line": 158,
+ "column": 82
},
"end": {
- "line": 161,
- "column": 78
+ "line": 158,
+ "column": 83
}
}
},
{
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "pAnchor",
- "start": 7818,
- "end": 7825,
+ "type": "CommentLine",
+ "value": " translate point to origin",
+ "start": 7793,
+ "end": 7821,
"loc": {
"start": {
- "line": 161,
- "column": 79
+ "line": 159,
+ "column": 8
},
"end": {
- "line": 161,
- "column": 86
+ "line": 159,
+ "column": 36
}
}
},
{
"type": {
- "label": ".",
+ "label": "const",
+ "keyword": "const",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -26385,16 +22172,17 @@
"binop": null,
"updateContext": null
},
- "start": 7825,
- "end": 7826,
+ "value": "const",
+ "start": 7830,
+ "end": 7835,
"loc": {
"start": {
- "line": 161,
- "column": 86
+ "line": 160,
+ "column": 8
},
"end": {
- "line": 161,
- "column": 87
+ "line": 160,
+ "column": 13
}
}
},
@@ -26410,103 +22198,44 @@
"postfix": false,
"binop": null
},
- "value": "y",
- "start": 7826,
- "end": 7827,
+ "value": "tempX",
+ "start": 7836,
+ "end": 7841,
"loc": {
"start": {
- "line": 161,
- "column": 87
+ "line": 160,
+ "column": 14
},
"end": {
- "line": 161,
- "column": 88
+ "line": 160,
+ "column": 19
}
}
},
{
"type": {
- "label": ";",
+ "label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 7827,
- "end": 7828,
- "loc": {
- "start": {
- "line": 161,
- "column": 88
- },
- "end": {
- "line": 161,
- "column": 89
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle",
- "start": 7837,
- "end": 7968,
- "loc": {
- "start": {
- "line": 162,
- "column": 8
- },
- "end": {
- "line": 162,
- "column": 139
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates",
- "start": 7977,
- "end": 8059,
- "loc": {
- "start": {
- "line": 163,
- "column": 8
- },
- "end": {
- "line": 163,
- "column": 90
- }
- }
- },
- {
- "type": {
- "label": "const",
- "keyword": "const",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "const",
- "start": 8068,
- "end": 8073,
+ "value": "=",
+ "start": 7842,
+ "end": 7843,
"loc": {
"start": {
- "line": 164,
- "column": 8
+ "line": 160,
+ "column": 20
},
"end": {
- "line": 164,
- "column": 13
+ "line": 160,
+ "column": 21
}
}
},
@@ -26523,50 +22252,50 @@
"binop": null
},
"value": "pointX",
- "start": 8074,
- "end": 8080,
+ "start": 7844,
+ "end": 7850,
"loc": {
"start": {
- "line": 164,
- "column": 14
+ "line": 160,
+ "column": 22
},
"end": {
- "line": 164,
- "column": 20
+ "line": 160,
+ "column": 28
}
}
},
{
"type": {
- "label": "=",
+ "label": "+/-",
"beforeExpr": true,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
- "prefix": false,
+ "isAssign": false,
+ "prefix": true,
"postfix": false,
- "binop": null,
+ "binop": 9,
"updateContext": null
},
- "value": "=",
- "start": 8081,
- "end": 8082,
+ "value": "-",
+ "start": 7851,
+ "end": 7852,
"loc": {
"start": {
- "line": 164,
- "column": 21
+ "line": 160,
+ "column": 29
},
"end": {
- "line": 164,
- "column": 22
+ "line": 160,
+ "column": 30
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -26575,25 +22304,25 @@
"postfix": false,
"binop": null
},
- "start": 8083,
- "end": 8084,
+ "value": "cx",
+ "start": 7853,
+ "end": 7855,
"loc": {
"start": {
- "line": 164,
- "column": 23
+ "line": 160,
+ "column": 31
},
"end": {
- "line": 164,
- "column": 24
+ "line": 160,
+ "column": 33
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": ";",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -26602,23 +22331,23 @@
"binop": null,
"updateContext": null
},
- "value": "this",
- "start": 8084,
- "end": 8088,
+ "start": 7855,
+ "end": 7856,
"loc": {
"start": {
- "line": 164,
- "column": 24
+ "line": 160,
+ "column": 33
},
"end": {
- "line": 164,
- "column": 28
+ "line": 160,
+ "column": 34
}
}
},
{
"type": {
- "label": ".",
+ "label": "const",
+ "keyword": "const",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -26629,16 +22358,17 @@
"binop": null,
"updateContext": null
},
- "start": 8088,
- "end": 8089,
+ "value": "const",
+ "start": 7865,
+ "end": 7870,
"loc": {
"start": {
- "line": 164,
- "column": 28
+ "line": 161,
+ "column": 8
},
"end": {
- "line": 164,
- "column": 29
+ "line": 161,
+ "column": 13
}
}
},
@@ -26654,43 +22384,44 @@
"postfix": false,
"binop": null
},
- "value": "positionalPoint",
- "start": 8089,
- "end": 8104,
+ "value": "tempY",
+ "start": 7871,
+ "end": 7876,
"loc": {
"start": {
- "line": 164,
- "column": 29
+ "line": 161,
+ "column": 14
},
"end": {
- "line": 164,
- "column": 44
+ "line": 161,
+ "column": 19
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": "=",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "start": 8104,
- "end": 8105,
+ "value": "=",
+ "start": 7877,
+ "end": 7878,
"loc": {
"start": {
- "line": 164,
- "column": 44
+ "line": 161,
+ "column": 20
},
"end": {
- "line": 164,
- "column": 45
+ "line": 161,
+ "column": 21
}
}
},
@@ -26706,17 +22437,17 @@
"postfix": false,
"binop": null
},
- "value": "x",
- "start": 8105,
- "end": 8106,
+ "value": "pointY",
+ "start": 7879,
+ "end": 7885,
"loc": {
"start": {
- "line": 164,
- "column": 45
+ "line": 161,
+ "column": 22
},
"end": {
- "line": 164,
- "column": 46
+ "line": 161,
+ "column": 28
}
}
},
@@ -26733,17 +22464,17 @@
"binop": 9,
"updateContext": null
},
- "value": "+",
- "start": 8107,
- "end": 8108,
+ "value": "-",
+ "start": 7886,
+ "end": 7887,
"loc": {
"start": {
- "line": 164,
- "column": 47
+ "line": 161,
+ "column": 29
},
"end": {
- "line": 164,
- "column": 48
+ "line": 161,
+ "column": 30
}
}
},
@@ -26759,24 +22490,24 @@
"postfix": false,
"binop": null
},
- "value": "pOffset",
- "start": 8109,
- "end": 8116,
+ "value": "cy",
+ "start": 7888,
+ "end": 7890,
"loc": {
"start": {
- "line": 164,
- "column": 49
+ "line": 161,
+ "column": 31
},
"end": {
- "line": 164,
- "column": 56
+ "line": 161,
+ "column": 33
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -26786,104 +22517,121 @@
"binop": null,
"updateContext": null
},
- "start": 8116,
- "end": 8117,
+ "start": 7890,
+ "end": 7891,
"loc": {
"start": {
- "line": 164,
- "column": 56
+ "line": 161,
+ "column": 33
},
"end": {
- "line": 164,
- "column": 57
+ "line": 161,
+ "column": 34
+ }
+ }
+ },
+ {
+ "type": "CommentLine",
+ "value": " now apply rotation",
+ "start": 7900,
+ "end": 7921,
+ "loc": {
+ "start": {
+ "line": 162,
+ "column": 8
+ },
+ "end": {
+ "line": 162,
+ "column": 29
}
}
},
{
"type": {
- "label": "name",
+ "label": "const",
+ "keyword": "const",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "x",
- "start": 8117,
- "end": 8118,
+ "value": "const",
+ "start": 7930,
+ "end": 7935,
"loc": {
"start": {
- "line": 164,
- "column": 57
+ "line": 163,
+ "column": 8
},
"end": {
- "line": 164,
- "column": 58
+ "line": 163,
+ "column": 13
}
}
},
{
"type": {
- "label": "+/-",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
- "updateContext": null
+ "binop": null
},
- "value": "-",
- "start": 8119,
- "end": 8120,
+ "value": "rotatedX",
+ "start": 7936,
+ "end": 7944,
"loc": {
"start": {
- "line": 164,
- "column": 59
+ "line": 163,
+ "column": 14
},
"end": {
- "line": 164,
- "column": 60
+ "line": 163,
+ "column": 22
}
}
},
{
"type": {
- "label": "num",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": "=",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": 1,
- "start": 8121,
- "end": 8122,
+ "value": "=",
+ "start": 7945,
+ "end": 7946,
"loc": {
"start": {
- "line": 164,
- "column": 61
+ "line": 163,
+ "column": 23
},
"end": {
- "line": 164,
- "column": 62
+ "line": 163,
+ "column": 24
}
}
},
{
"type": {
- "label": ")",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -26891,50 +22639,50 @@
"postfix": false,
"binop": null
},
- "start": 8122,
- "end": 8123,
+ "value": "tempX",
+ "start": 7947,
+ "end": 7952,
"loc": {
"start": {
- "line": 164,
- "column": 62
+ "line": 163,
+ "column": 25
},
"end": {
- "line": 164,
- "column": 63
+ "line": 163,
+ "column": 30
}
}
},
{
"type": {
- "label": "+/-",
+ "label": "*",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
+ "binop": 10,
"updateContext": null
},
- "value": "+",
- "start": 8124,
- "end": 8125,
+ "value": "*",
+ "start": 7953,
+ "end": 7954,
"loc": {
"start": {
- "line": 164,
- "column": 64
+ "line": 163,
+ "column": 31
},
"end": {
- "line": 164,
- "column": 65
+ "line": 163,
+ "column": 32
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -26942,20 +22690,19 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 8126,
- "end": 8130,
+ "value": "Math",
+ "start": 7955,
+ "end": 7959,
"loc": {
"start": {
- "line": 164,
- "column": 66
+ "line": 163,
+ "column": 33
},
"end": {
- "line": 164,
- "column": 70
+ "line": 163,
+ "column": 37
}
}
},
@@ -26972,16 +22719,16 @@
"binop": null,
"updateContext": null
},
- "start": 8130,
- "end": 8131,
+ "start": 7959,
+ "end": 7960,
"loc": {
"start": {
- "line": 164,
- "column": 70
+ "line": 163,
+ "column": 37
},
"end": {
- "line": 164,
- "column": 71
+ "line": 163,
+ "column": 38
}
}
},
@@ -26997,43 +22744,42 @@
"postfix": false,
"binop": null
},
- "value": "rawPixelsPoint",
- "start": 8131,
- "end": 8145,
+ "value": "cos",
+ "start": 7960,
+ "end": 7963,
"loc": {
"start": {
- "line": 164,
- "column": 71
+ "line": 163,
+ "column": 38
},
"end": {
- "line": 164,
- "column": 85
+ "line": 163,
+ "column": 41
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "(",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 8145,
- "end": 8146,
+ "start": 7963,
+ "end": 7964,
"loc": {
"start": {
- "line": 164,
- "column": 85
+ "line": 163,
+ "column": 41
},
"end": {
- "line": 164,
- "column": 86
+ "line": 163,
+ "column": 42
}
}
},
@@ -27049,71 +22795,69 @@
"postfix": false,
"binop": null
},
- "value": "x",
- "start": 8146,
- "end": 8147,
+ "value": "pAngle",
+ "start": 7964,
+ "end": 7970,
"loc": {
"start": {
- "line": 164,
- "column": 86
+ "line": 163,
+ "column": 42
},
"end": {
- "line": 164,
- "column": 87
+ "line": 163,
+ "column": 48
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
+ "label": ")",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 8147,
- "end": 8148,
+ "start": 7970,
+ "end": 7971,
"loc": {
"start": {
- "line": 164,
- "column": 87
+ "line": 163,
+ "column": 48
},
"end": {
- "line": 164,
- "column": 88
+ "line": 163,
+ "column": 49
}
}
},
{
"type": {
- "label": "const",
- "keyword": "const",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "+/-",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": false,
+ "prefix": true,
"postfix": false,
- "binop": null,
+ "binop": 9,
"updateContext": null
},
- "value": "const",
- "start": 8157,
- "end": 8162,
+ "value": "-",
+ "start": 7972,
+ "end": 7973,
"loc": {
"start": {
- "line": 165,
- "column": 8
+ "line": 163,
+ "column": 50
},
"end": {
- "line": 165,
- "column": 13
+ "line": 163,
+ "column": 51
}
}
},
@@ -27129,76 +22873,77 @@
"postfix": false,
"binop": null
},
- "value": "pointY",
- "start": 8163,
- "end": 8169,
+ "value": "tempY",
+ "start": 7974,
+ "end": 7979,
"loc": {
"start": {
- "line": 165,
- "column": 14
+ "line": 163,
+ "column": 52
},
"end": {
- "line": 165,
- "column": 20
+ "line": 163,
+ "column": 57
}
}
},
{
"type": {
- "label": "=",
+ "label": "*",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
+ "binop": 10,
"updateContext": null
},
- "value": "=",
- "start": 8170,
- "end": 8171,
+ "value": "*",
+ "start": 7980,
+ "end": 7981,
"loc": {
"start": {
- "line": 165,
- "column": 21
+ "line": 163,
+ "column": 58
},
"end": {
- "line": 165,
- "column": 22
+ "line": 163,
+ "column": 59
}
}
},
{
"type": {
- "label": "(",
+ "label": "+/-",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": false,
+ "prefix": true,
"postfix": false,
- "binop": null
+ "binop": 9,
+ "updateContext": null
},
- "start": 8172,
- "end": 8173,
+ "value": "-",
+ "start": 7982,
+ "end": 7983,
"loc": {
"start": {
- "line": 165,
- "column": 23
+ "line": 163,
+ "column": 60
},
"end": {
- "line": 165,
- "column": 24
+ "line": 163,
+ "column": 61
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -27206,20 +22951,19 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 8173,
- "end": 8177,
+ "value": "Math",
+ "start": 7983,
+ "end": 7987,
"loc": {
"start": {
- "line": 165,
- "column": 24
+ "line": 163,
+ "column": 61
},
"end": {
- "line": 165,
- "column": 28
+ "line": 163,
+ "column": 65
}
}
},
@@ -27236,16 +22980,16 @@
"binop": null,
"updateContext": null
},
- "start": 8177,
- "end": 8178,
+ "start": 7987,
+ "end": 7988,
"loc": {
"start": {
- "line": 165,
- "column": 28
+ "line": 163,
+ "column": 65
},
"end": {
- "line": 165,
- "column": 29
+ "line": 163,
+ "column": 66
}
}
},
@@ -27261,43 +23005,42 @@
"postfix": false,
"binop": null
},
- "value": "positionalPoint",
- "start": 8178,
- "end": 8193,
+ "value": "sin",
+ "start": 7988,
+ "end": 7991,
"loc": {
"start": {
- "line": 165,
- "column": 29
+ "line": 163,
+ "column": 66
},
"end": {
- "line": 165,
- "column": 44
+ "line": 163,
+ "column": 69
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "(",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 8193,
- "end": 8194,
+ "start": 7991,
+ "end": 7992,
"loc": {
"start": {
- "line": 165,
- "column": 44
+ "line": 163,
+ "column": 69
},
"end": {
- "line": 165,
- "column": 45
+ "line": 163,
+ "column": 70
}
}
},
@@ -27313,76 +23056,75 @@
"postfix": false,
"binop": null
},
- "value": "y",
- "start": 8194,
- "end": 8195,
+ "value": "pAngle",
+ "start": 7992,
+ "end": 7998,
"loc": {
"start": {
- "line": 165,
- "column": 45
+ "line": 163,
+ "column": 70
},
"end": {
- "line": 165,
- "column": 46
+ "line": 163,
+ "column": 76
}
}
},
{
"type": {
- "label": "+/-",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ")",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
- "updateContext": null
+ "binop": null
},
- "value": "+",
- "start": 8196,
- "end": 8197,
+ "start": 7998,
+ "end": 7999,
"loc": {
"start": {
- "line": 165,
- "column": 47
+ "line": 163,
+ "column": 76
},
"end": {
- "line": 165,
- "column": 48
+ "line": 163,
+ "column": 77
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": ";",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "pOffset",
- "start": 8198,
- "end": 8205,
+ "start": 7999,
+ "end": 8000,
"loc": {
"start": {
- "line": 165,
- "column": 49
+ "line": 163,
+ "column": 77
},
"end": {
- "line": 165,
- "column": 56
+ "line": 163,
+ "column": 78
}
}
},
{
"type": {
- "label": ".",
+ "label": "const",
+ "keyword": "const",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -27393,16 +23135,17 @@
"binop": null,
"updateContext": null
},
- "start": 8205,
- "end": 8206,
+ "value": "const",
+ "start": 8009,
+ "end": 8014,
"loc": {
"start": {
- "line": 165,
- "column": 56
+ "line": 164,
+ "column": 8
},
"end": {
- "line": 165,
- "column": 57
+ "line": 164,
+ "column": 13
}
}
},
@@ -27418,50 +23161,50 @@
"postfix": false,
"binop": null
},
- "value": "y",
- "start": 8206,
- "end": 8207,
+ "value": "rotatedY",
+ "start": 8015,
+ "end": 8023,
"loc": {
"start": {
- "line": 165,
- "column": 57
+ "line": 164,
+ "column": 14
},
"end": {
- "line": 165,
- "column": 58
+ "line": 164,
+ "column": 22
}
}
},
{
"type": {
- "label": "+/-",
+ "label": "=",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
- "prefix": true,
+ "isAssign": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
+ "binop": null,
"updateContext": null
},
- "value": "-",
- "start": 8208,
- "end": 8209,
+ "value": "=",
+ "start": 8024,
+ "end": 8025,
"loc": {
"start": {
- "line": 165,
- "column": 59
+ "line": 164,
+ "column": 23
},
"end": {
- "line": 165,
- "column": 60
+ "line": 164,
+ "column": 24
}
}
},
{
"type": {
- "label": "num",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -27469,45 +23212,46 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": 1,
- "start": 8210,
- "end": 8211,
+ "value": "tempX",
+ "start": 8026,
+ "end": 8031,
"loc": {
"start": {
- "line": 165,
- "column": 61
+ "line": 164,
+ "column": 25
},
"end": {
- "line": 165,
- "column": 62
+ "line": 164,
+ "column": 30
}
}
},
{
"type": {
- "label": ")",
- "beforeExpr": false,
+ "label": "*",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": 10,
+ "updateContext": null
},
- "start": 8211,
- "end": 8212,
+ "value": "*",
+ "start": 8032,
+ "end": 8033,
"loc": {
"start": {
- "line": 165,
- "column": 62
+ "line": 164,
+ "column": 31
},
"end": {
- "line": 165,
- "column": 63
+ "line": 164,
+ "column": 32
}
}
},
@@ -27524,24 +23268,23 @@
"binop": 9,
"updateContext": null
},
- "value": "+",
- "start": 8213,
- "end": 8214,
+ "value": "-",
+ "start": 8034,
+ "end": 8035,
"loc": {
"start": {
- "line": 165,
- "column": 64
+ "line": 164,
+ "column": 33
},
"end": {
- "line": 165,
- "column": 65
+ "line": 164,
+ "column": 34
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -27549,20 +23292,19 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 8215,
- "end": 8219,
+ "value": "Math",
+ "start": 8035,
+ "end": 8039,
"loc": {
"start": {
- "line": 165,
- "column": 66
+ "line": 164,
+ "column": 34
},
"end": {
- "line": 165,
- "column": 70
+ "line": 164,
+ "column": 38
}
}
},
@@ -27579,16 +23321,16 @@
"binop": null,
"updateContext": null
},
- "start": 8219,
- "end": 8220,
+ "start": 8039,
+ "end": 8040,
"loc": {
"start": {
- "line": 165,
- "column": 70
+ "line": 164,
+ "column": 38
},
"end": {
- "line": 165,
- "column": 71
+ "line": 164,
+ "column": 39
}
}
},
@@ -27604,43 +23346,42 @@
"postfix": false,
"binop": null
},
- "value": "rawPixelsPoint",
- "start": 8220,
- "end": 8234,
+ "value": "sin",
+ "start": 8040,
+ "end": 8043,
"loc": {
"start": {
- "line": 165,
- "column": 71
+ "line": 164,
+ "column": 39
},
"end": {
- "line": 165,
- "column": 85
+ "line": 164,
+ "column": 42
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "(",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 8234,
- "end": 8235,
+ "start": 8043,
+ "end": 8044,
"loc": {
"start": {
- "line": 165,
- "column": 85
+ "line": 164,
+ "column": 42
},
"end": {
- "line": 165,
- "column": 86
+ "line": 164,
+ "column": 43
}
}
},
@@ -27656,87 +23397,122 @@
"postfix": false,
"binop": null
},
- "value": "y",
- "start": 8235,
- "end": 8236,
+ "value": "pAngle",
+ "start": 8044,
+ "end": 8050,
"loc": {
"start": {
- "line": 165,
- "column": 86
+ "line": 164,
+ "column": 43
},
"end": {
- "line": 165,
- "column": 87
+ "line": 164,
+ "column": 49
}
}
},
{
"type": {
- "label": ";",
- "beforeExpr": true,
+ "label": ")",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 8236,
- "end": 8237,
+ "start": 8050,
+ "end": 8051,
"loc": {
"start": {
- "line": 165,
- "column": 87
+ "line": 164,
+ "column": 49
},
"end": {
- "line": 165,
- "column": 88
+ "line": 164,
+ "column": 50
}
}
},
{
- "type": "CommentLine",
- "value": " translate point to origin",
- "start": 8246,
- "end": 8274,
+ "type": {
+ "label": "+/-",
+ "beforeExpr": true,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": true,
+ "postfix": false,
+ "binop": 9,
+ "updateContext": null
+ },
+ "value": "+",
+ "start": 8052,
+ "end": 8053,
"loc": {
"start": {
- "line": 166,
- "column": 8
+ "line": 164,
+ "column": 51
},
"end": {
- "line": 166,
- "column": 36
+ "line": 164,
+ "column": 52
}
}
},
{
"type": {
- "label": "const",
- "keyword": "const",
+ "label": "name",
"beforeExpr": false,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": false,
+ "postfix": false,
+ "binop": null
+ },
+ "value": "tempY",
+ "start": 8054,
+ "end": 8059,
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 53
+ },
+ "end": {
+ "line": 164,
+ "column": 58
+ }
+ }
+ },
+ {
+ "type": {
+ "label": "*",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
+ "binop": 10,
"updateContext": null
},
- "value": "const",
- "start": 8283,
- "end": 8288,
+ "value": "*",
+ "start": 8060,
+ "end": 8061,
"loc": {
"start": {
- "line": 167,
- "column": 8
+ "line": 164,
+ "column": 59
},
"end": {
- "line": 167,
- "column": 13
+ "line": 164,
+ "column": 60
}
}
},
@@ -27752,44 +23528,43 @@
"postfix": false,
"binop": null
},
- "value": "tempX",
- "start": 8289,
- "end": 8294,
+ "value": "Math",
+ "start": 8062,
+ "end": 8066,
"loc": {
"start": {
- "line": 167,
- "column": 14
+ "line": 164,
+ "column": 61
},
"end": {
- "line": 167,
- "column": 19
+ "line": 164,
+ "column": 65
}
}
},
{
"type": {
- "label": "=",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "=",
- "start": 8295,
- "end": 8296,
+ "start": 8066,
+ "end": 8067,
"loc": {
"start": {
- "line": 167,
- "column": 20
+ "line": 164,
+ "column": 65
},
"end": {
- "line": 167,
- "column": 21
+ "line": 164,
+ "column": 66
}
}
},
@@ -27805,44 +23580,42 @@
"postfix": false,
"binop": null
},
- "value": "pointX",
- "start": 8297,
- "end": 8303,
+ "value": "cos",
+ "start": 8067,
+ "end": 8070,
"loc": {
"start": {
- "line": 167,
- "column": 22
+ "line": 164,
+ "column": 66
},
"end": {
- "line": 167,
- "column": 28
+ "line": 164,
+ "column": 69
}
}
},
{
"type": {
- "label": "+/-",
+ "label": "(",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
- "updateContext": null
+ "binop": null
},
- "value": "-",
- "start": 8304,
- "end": 8305,
+ "start": 8070,
+ "end": 8071,
"loc": {
"start": {
- "line": 167,
- "column": 29
+ "line": 164,
+ "column": 69
},
"end": {
- "line": 167,
- "column": 30
+ "line": 164,
+ "column": 70
}
}
},
@@ -27858,17 +23631,42 @@
"postfix": false,
"binop": null
},
- "value": "cx",
- "start": 8306,
- "end": 8308,
+ "value": "pAngle",
+ "start": 8071,
+ "end": 8077,
"loc": {
"start": {
- "line": 167,
- "column": 31
+ "line": 164,
+ "column": 70
},
"end": {
- "line": 167,
- "column": 33
+ "line": 164,
+ "column": 76
+ }
+ }
+ },
+ {
+ "type": {
+ "label": ")",
+ "beforeExpr": false,
+ "startsExpr": false,
+ "rightAssociative": false,
+ "isLoop": false,
+ "isAssign": false,
+ "prefix": false,
+ "postfix": false,
+ "binop": null
+ },
+ "start": 8077,
+ "end": 8078,
+ "loc": {
+ "start": {
+ "line": 164,
+ "column": 76
+ },
+ "end": {
+ "line": 164,
+ "column": 77
}
}
},
@@ -27885,16 +23683,32 @@
"binop": null,
"updateContext": null
},
- "start": 8308,
- "end": 8309,
+ "start": 8078,
+ "end": 8079,
"loc": {
"start": {
- "line": 167,
- "column": 33
+ "line": 164,
+ "column": 77
},
"end": {
- "line": 167,
- "column": 34
+ "line": 164,
+ "column": 78
+ }
+ }
+ },
+ {
+ "type": "CommentLine",
+ "value": " translate back",
+ "start": 8088,
+ "end": 8105,
+ "loc": {
+ "start": {
+ "line": 165,
+ "column": 8
+ },
+ "end": {
+ "line": 165,
+ "column": 25
}
}
},
@@ -27913,15 +23727,15 @@
"updateContext": null
},
"value": "const",
- "start": 8318,
- "end": 8323,
+ "start": 8114,
+ "end": 8119,
"loc": {
"start": {
- "line": 168,
+ "line": 166,
"column": 8
},
"end": {
- "line": 168,
+ "line": 166,
"column": 13
}
}
@@ -27938,17 +23752,17 @@
"postfix": false,
"binop": null
},
- "value": "tempY",
- "start": 8324,
- "end": 8329,
+ "value": "x",
+ "start": 8120,
+ "end": 8121,
"loc": {
"start": {
- "line": 168,
+ "line": 166,
"column": 14
},
"end": {
- "line": 168,
- "column": 19
+ "line": 166,
+ "column": 15
}
}
},
@@ -27966,16 +23780,16 @@
"updateContext": null
},
"value": "=",
- "start": 8330,
- "end": 8331,
+ "start": 8122,
+ "end": 8123,
"loc": {
"start": {
- "line": 168,
- "column": 20
+ "line": 166,
+ "column": 16
},
"end": {
- "line": 168,
- "column": 21
+ "line": 166,
+ "column": 17
}
}
},
@@ -27991,17 +23805,17 @@
"postfix": false,
"binop": null
},
- "value": "pointY",
- "start": 8332,
- "end": 8338,
+ "value": "rotatedX",
+ "start": 8124,
+ "end": 8132,
"loc": {
"start": {
- "line": 168,
- "column": 22
+ "line": 166,
+ "column": 18
},
"end": {
- "line": 168,
- "column": 28
+ "line": 166,
+ "column": 26
}
}
},
@@ -28018,17 +23832,17 @@
"binop": 9,
"updateContext": null
},
- "value": "-",
- "start": 8339,
- "end": 8340,
+ "value": "+",
+ "start": 8133,
+ "end": 8134,
"loc": {
"start": {
- "line": 168,
- "column": 29
+ "line": 166,
+ "column": 27
},
"end": {
- "line": 168,
- "column": 30
+ "line": 166,
+ "column": 28
}
}
},
@@ -28044,17 +23858,17 @@
"postfix": false,
"binop": null
},
- "value": "cy",
- "start": 8341,
- "end": 8343,
+ "value": "cx",
+ "start": 8135,
+ "end": 8137,
"loc": {
"start": {
- "line": 168,
- "column": 31
+ "line": 166,
+ "column": 29
},
"end": {
- "line": 168,
- "column": 33
+ "line": 166,
+ "column": 31
}
}
},
@@ -28071,32 +23885,16 @@
"binop": null,
"updateContext": null
},
- "start": 8343,
- "end": 8344,
- "loc": {
- "start": {
- "line": 168,
- "column": 33
- },
- "end": {
- "line": 168,
- "column": 34
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " now apply rotation",
- "start": 8353,
- "end": 8374,
+ "start": 8137,
+ "end": 8138,
"loc": {
"start": {
- "line": 169,
- "column": 8
+ "line": 166,
+ "column": 31
},
"end": {
- "line": 169,
- "column": 29
+ "line": 166,
+ "column": 32
}
}
},
@@ -28115,15 +23913,15 @@
"updateContext": null
},
"value": "const",
- "start": 8383,
- "end": 8388,
+ "start": 8147,
+ "end": 8152,
"loc": {
"start": {
- "line": 170,
+ "line": 167,
"column": 8
},
"end": {
- "line": 170,
+ "line": 167,
"column": 13
}
}
@@ -28140,17 +23938,17 @@
"postfix": false,
"binop": null
},
- "value": "rotatedX",
- "start": 8389,
- "end": 8397,
+ "value": "y",
+ "start": 8153,
+ "end": 8154,
"loc": {
"start": {
- "line": 170,
+ "line": 167,
"column": 14
},
"end": {
- "line": 170,
- "column": 22
+ "line": 167,
+ "column": 15
}
}
},
@@ -28168,16 +23966,16 @@
"updateContext": null
},
"value": "=",
- "start": 8398,
- "end": 8399,
+ "start": 8155,
+ "end": 8156,
"loc": {
"start": {
- "line": 170,
- "column": 23
+ "line": 167,
+ "column": 16
},
"end": {
- "line": 170,
- "column": 24
+ "line": 167,
+ "column": 17
}
}
},
@@ -28193,44 +23991,44 @@
"postfix": false,
"binop": null
},
- "value": "tempX",
- "start": 8400,
- "end": 8405,
+ "value": "rotatedY",
+ "start": 8157,
+ "end": 8165,
"loc": {
"start": {
- "line": 170,
- "column": 25
+ "line": 167,
+ "column": 18
},
"end": {
- "line": 170,
- "column": 30
+ "line": 167,
+ "column": 26
}
}
},
{
"type": {
- "label": "*",
+ "label": "+/-",
"beforeExpr": true,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": false,
+ "prefix": true,
"postfix": false,
- "binop": 10,
+ "binop": 9,
"updateContext": null
},
- "value": "*",
- "start": 8406,
- "end": 8407,
+ "value": "+",
+ "start": 8166,
+ "end": 8167,
"loc": {
"start": {
- "line": 170,
- "column": 31
+ "line": 167,
+ "column": 27
},
"end": {
- "line": 170,
- "column": 32
+ "line": 167,
+ "column": 28
}
}
},
@@ -28246,24 +24044,24 @@
"postfix": false,
"binop": null
},
- "value": "Math",
- "start": 8408,
- "end": 8412,
+ "value": "cy",
+ "start": 8168,
+ "end": 8170,
"loc": {
"start": {
- "line": 170,
- "column": 33
+ "line": 167,
+ "column": 29
},
"end": {
- "line": 170,
- "column": 37
+ "line": 167,
+ "column": 31
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -28273,22 +24071,23 @@
"binop": null,
"updateContext": null
},
- "start": 8412,
- "end": 8413,
+ "start": 8170,
+ "end": 8171,
"loc": {
"start": {
- "line": 170,
- "column": 37
+ "line": 167,
+ "column": 31
},
"end": {
- "line": 170,
- "column": 38
+ "line": 167,
+ "column": 32
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -28296,44 +24095,46 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "cos",
- "start": 8413,
- "end": 8416,
+ "value": "this",
+ "start": 8180,
+ "end": 8184,
"loc": {
"start": {
- "line": 170,
- "column": 38
+ "line": 168,
+ "column": 8
},
"end": {
- "line": 170,
- "column": 41
+ "line": 168,
+ "column": 12
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ".",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 8416,
- "end": 8417,
+ "start": 8184,
+ "end": 8185,
"loc": {
"start": {
- "line": 170,
- "column": 41
+ "line": 168,
+ "column": 12
},
"end": {
- "line": 170,
- "column": 42
+ "line": 168,
+ "column": 13
}
}
},
@@ -28349,23 +24150,23 @@
"postfix": false,
"binop": null
},
- "value": "pAngle",
- "start": 8417,
- "end": 8423,
+ "value": "point",
+ "start": 8185,
+ "end": 8190,
"loc": {
"start": {
- "line": 170,
- "column": 42
+ "line": 168,
+ "column": 13
},
"end": {
- "line": 170,
- "column": 48
+ "line": 168,
+ "column": 18
}
}
},
{
"type": {
- "label": ")",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -28373,131 +24174,131 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 8423,
- "end": 8424,
+ "start": 8190,
+ "end": 8191,
"loc": {
"start": {
- "line": 170,
- "column": 48
+ "line": 168,
+ "column": 18
},
"end": {
- "line": 170,
- "column": 49
+ "line": 168,
+ "column": 19
}
}
},
{
"type": {
- "label": "+/-",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
- "updateContext": null
+ "binop": null
},
- "value": "-",
- "start": 8425,
- "end": 8426,
+ "value": "x",
+ "start": 8191,
+ "end": 8192,
"loc": {
"start": {
- "line": 170,
- "column": 50
+ "line": 168,
+ "column": 19
},
"end": {
- "line": 170,
- "column": 51
+ "line": 168,
+ "column": 20
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": "=",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "tempY",
- "start": 8427,
- "end": 8432,
+ "value": "=",
+ "start": 8193,
+ "end": 8194,
"loc": {
"start": {
- "line": 170,
- "column": 52
+ "line": 168,
+ "column": 21
},
"end": {
- "line": 170,
- "column": 57
+ "line": 168,
+ "column": 22
}
}
},
{
"type": {
- "label": "*",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 10,
- "updateContext": null
+ "binop": null
},
- "value": "*",
- "start": 8433,
- "end": 8434,
+ "value": "x",
+ "start": 8195,
+ "end": 8196,
"loc": {
"start": {
- "line": 170,
- "column": 58
+ "line": 168,
+ "column": 23
},
"end": {
- "line": 170,
- "column": 59
+ "line": 168,
+ "column": 24
}
}
},
{
"type": {
- "label": "+/-",
+ "label": ";",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
+ "binop": null,
"updateContext": null
},
- "value": "-",
- "start": 8435,
- "end": 8436,
+ "start": 8196,
+ "end": 8197,
"loc": {
"start": {
- "line": 170,
- "column": 60
+ "line": 168,
+ "column": 24
},
"end": {
- "line": 170,
- "column": 61
+ "line": 168,
+ "column": 25
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -28505,19 +24306,20 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "Math",
- "start": 8436,
- "end": 8440,
+ "value": "this",
+ "start": 8206,
+ "end": 8210,
"loc": {
"start": {
- "line": 170,
- "column": 61
+ "line": 169,
+ "column": 8
},
"end": {
- "line": 170,
- "column": 65
+ "line": 169,
+ "column": 12
}
}
},
@@ -28534,16 +24336,16 @@
"binop": null,
"updateContext": null
},
- "start": 8440,
- "end": 8441,
+ "start": 8210,
+ "end": 8211,
"loc": {
"start": {
- "line": 170,
- "column": 65
+ "line": 169,
+ "column": 12
},
"end": {
- "line": 170,
- "column": 66
+ "line": 169,
+ "column": 13
}
}
},
@@ -28559,42 +24361,43 @@
"postfix": false,
"binop": null
},
- "value": "sin",
- "start": 8441,
- "end": 8444,
+ "value": "point",
+ "start": 8211,
+ "end": 8216,
"loc": {
"start": {
- "line": 170,
- "column": 66
+ "line": 169,
+ "column": 13
},
"end": {
- "line": 170,
- "column": 69
+ "line": 169,
+ "column": 18
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ".",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 8444,
- "end": 8445,
+ "start": 8216,
+ "end": 8217,
"loc": {
"start": {
- "line": 170,
- "column": 69
+ "line": 169,
+ "column": 18
},
"end": {
- "line": 170,
- "column": 70
+ "line": 169,
+ "column": 19
}
}
},
@@ -28610,42 +24413,70 @@
"postfix": false,
"binop": null
},
- "value": "pAngle",
- "start": 8445,
- "end": 8451,
+ "value": "y",
+ "start": 8217,
+ "end": 8218,
"loc": {
"start": {
- "line": 170,
- "column": 70
+ "line": 169,
+ "column": 19
},
"end": {
- "line": 170,
- "column": 76
+ "line": 169,
+ "column": 20
}
}
},
{
"type": {
- "label": ")",
- "beforeExpr": false,
+ "label": "=",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
+ "isAssign": true,
+ "prefix": false,
+ "postfix": false,
+ "binop": null,
+ "updateContext": null
+ },
+ "value": "=",
+ "start": 8219,
+ "end": 8220,
+ "loc": {
+ "start": {
+ "line": 169,
+ "column": 21
+ },
+ "end": {
+ "line": 169,
+ "column": 22
+ }
+ }
+ },
+ {
+ "type": {
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
+ "rightAssociative": false,
+ "isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null
},
- "start": 8451,
- "end": 8452,
+ "value": "y",
+ "start": 8221,
+ "end": 8222,
"loc": {
"start": {
- "line": 170,
- "column": 76
+ "line": 169,
+ "column": 23
},
"end": {
- "line": 170,
- "column": 77
+ "line": 169,
+ "column": 24
}
}
},
@@ -28662,24 +24493,24 @@
"binop": null,
"updateContext": null
},
- "start": 8452,
- "end": 8453,
+ "start": 8222,
+ "end": 8223,
"loc": {
"start": {
- "line": 170,
- "column": 77
+ "line": 169,
+ "column": 24
},
"end": {
- "line": 170,
- "column": 78
+ "line": 169,
+ "column": 25
}
}
},
{
"type": {
- "label": "const",
- "keyword": "const",
- "beforeExpr": false,
+ "label": "return",
+ "keyword": "return",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -28689,23 +24520,24 @@
"binop": null,
"updateContext": null
},
- "value": "const",
- "start": 8462,
- "end": 8467,
+ "value": "return",
+ "start": 8232,
+ "end": 8238,
"loc": {
"start": {
- "line": 171,
+ "line": 170,
"column": 8
},
"end": {
- "line": 171,
- "column": 13
+ "line": 170,
+ "column": 14
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -28713,46 +24545,46 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "rotatedY",
- "start": 8468,
- "end": 8476,
+ "value": "this",
+ "start": 8239,
+ "end": 8243,
"loc": {
"start": {
- "line": 171,
- "column": 14
+ "line": 170,
+ "column": 15
},
"end": {
- "line": 171,
- "column": 22
+ "line": 170,
+ "column": 19
}
}
},
{
"type": {
- "label": "=",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "=",
- "start": 8477,
- "end": 8478,
+ "start": 8243,
+ "end": 8244,
"loc": {
"start": {
- "line": 171,
- "column": 23
+ "line": 170,
+ "column": 19
},
"end": {
- "line": 171,
- "column": 24
+ "line": 170,
+ "column": 20
}
}
},
@@ -28768,23 +24600,23 @@
"postfix": false,
"binop": null
},
- "value": "tempX",
- "start": 8479,
- "end": 8484,
+ "value": "point",
+ "start": 8244,
+ "end": 8249,
"loc": {
"start": {
- "line": 171,
- "column": 25
+ "line": 170,
+ "column": 20
},
"end": {
- "line": 171,
- "column": 30
+ "line": 170,
+ "column": 25
}
}
},
{
"type": {
- "label": "*",
+ "label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -28792,55 +24624,27 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 10,
- "updateContext": null
- },
- "value": "*",
- "start": 8485,
- "end": 8486,
- "loc": {
- "start": {
- "line": 171,
- "column": 31
- },
- "end": {
- "line": 171,
- "column": 32
- }
- }
- },
- {
- "type": {
- "label": "+/-",
- "beforeExpr": true,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": true,
- "postfix": false,
- "binop": 9,
+ "binop": null,
"updateContext": null
},
- "value": "-",
- "start": 8487,
- "end": 8488,
+ "start": 8249,
+ "end": 8250,
"loc": {
"start": {
- "line": 171,
- "column": 33
+ "line": 170,
+ "column": 25
},
"end": {
- "line": 171,
- "column": 34
+ "line": 170,
+ "column": 26
}
}
},
{
"type": {
- "label": "name",
+ "label": "}",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -28848,43 +24652,32 @@
"postfix": false,
"binop": null
},
- "value": "Math",
- "start": 8488,
- "end": 8492,
+ "start": 8255,
+ "end": 8256,
"loc": {
"start": {
"line": 171,
- "column": 34
+ "column": 4
},
"end": {
"line": 171,
- "column": 38
+ "column": 5
}
}
},
{
- "type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 8492,
- "end": 8493,
+ "type": "CommentBlock",
+ "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 8261,
+ "end": 8712,
"loc": {
"start": {
- "line": 171,
- "column": 38
+ "line": 172,
+ "column": 4
},
"end": {
- "line": 171,
- "column": 39
+ "line": 179,
+ "column": 7
}
}
},
@@ -28900,17 +24693,17 @@
"postfix": false,
"binop": null
},
- "value": "sin",
- "start": 8493,
- "end": 8496,
+ "value": "setPoint",
+ "start": 8717,
+ "end": 8725,
"loc": {
"start": {
- "line": 171,
- "column": 39
+ "line": 180,
+ "column": 4
},
"end": {
- "line": 171,
- "column": 42
+ "line": 180,
+ "column": 12
}
}
},
@@ -28926,16 +24719,16 @@
"postfix": false,
"binop": null
},
- "start": 8496,
- "end": 8497,
+ "start": 8725,
+ "end": 8726,
"loc": {
"start": {
- "line": 171,
- "column": 42
+ "line": 180,
+ "column": 12
},
"end": {
- "line": 171,
- "column": 43
+ "line": 180,
+ "column": 13
}
}
},
@@ -28951,17 +24744,17 @@
"postfix": false,
"binop": null
},
- "value": "pAngle",
- "start": 8497,
- "end": 8503,
+ "value": "pPoint",
+ "start": 8726,
+ "end": 8732,
"loc": {
"start": {
- "line": 171,
- "column": 43
+ "line": 180,
+ "column": 13
},
"end": {
- "line": 171,
- "column": 49
+ "line": 180,
+ "column": 19
}
}
},
@@ -28977,96 +24770,94 @@
"postfix": false,
"binop": null
},
- "start": 8503,
- "end": 8504,
+ "start": 8732,
+ "end": 8733,
"loc": {
"start": {
- "line": 171,
- "column": 49
+ "line": 180,
+ "column": 19
},
"end": {
- "line": 171,
- "column": 50
+ "line": 180,
+ "column": 20
}
}
},
{
"type": {
- "label": "+/-",
+ "label": "{",
"beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
- "updateContext": null
+ "binop": null
},
- "value": "+",
- "start": 8505,
- "end": 8506,
+ "start": 8734,
+ "end": 8735,
"loc": {
"start": {
- "line": 171,
- "column": 51
+ "line": 180,
+ "column": 21
},
"end": {
- "line": 171,
- "column": 52
+ "line": 180,
+ "column": 22
}
}
},
{
"type": {
- "label": "name",
+ "label": "const",
+ "keyword": "const",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "tempY",
- "start": 8507,
- "end": 8512,
+ "value": "const",
+ "start": 8744,
+ "end": 8749,
"loc": {
"start": {
- "line": 171,
- "column": 53
+ "line": 181,
+ "column": 8
},
"end": {
- "line": 171,
- "column": 58
+ "line": 181,
+ "column": 13
}
}
},
{
"type": {
- "label": "*",
+ "label": "{",
"beforeExpr": true,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 10,
- "updateContext": null
+ "binop": null
},
- "value": "*",
- "start": 8513,
- "end": 8514,
+ "start": 8750,
+ "end": 8751,
"loc": {
"start": {
- "line": 171,
- "column": 59
+ "line": 181,
+ "column": 14
},
"end": {
- "line": 171,
- "column": 60
+ "line": 181,
+ "column": 15
}
}
},
@@ -29082,24 +24873,24 @@
"postfix": false,
"binop": null
},
- "value": "Math",
- "start": 8515,
- "end": 8519,
+ "value": "x",
+ "start": 8752,
+ "end": 8753,
"loc": {
"start": {
- "line": 171,
- "column": 61
+ "line": 181,
+ "column": 16
},
"end": {
- "line": 171,
- "column": 65
+ "line": 181,
+ "column": 17
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ",",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -29109,16 +24900,16 @@
"binop": null,
"updateContext": null
},
- "start": 8519,
- "end": 8520,
+ "start": 8753,
+ "end": 8754,
"loc": {
"start": {
- "line": 171,
- "column": 65
+ "line": 181,
+ "column": 17
},
"end": {
- "line": 171,
- "column": 66
+ "line": 181,
+ "column": 18
}
}
},
@@ -29134,42 +24925,43 @@
"postfix": false,
"binop": null
},
- "value": "cos",
- "start": 8520,
- "end": 8523,
+ "value": "y",
+ "start": 8755,
+ "end": 8756,
"loc": {
"start": {
- "line": 171,
- "column": 66
+ "line": 181,
+ "column": 19
},
"end": {
- "line": 171,
- "column": 69
+ "line": 181,
+ "column": 20
}
}
},
{
"type": {
- "label": "(",
+ "label": ",",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 8523,
- "end": 8524,
+ "start": 8756,
+ "end": 8757,
"loc": {
"start": {
- "line": 171,
- "column": 69
+ "line": 181,
+ "column": 20
},
"end": {
- "line": 171,
- "column": 70
+ "line": 181,
+ "column": 21
}
}
},
@@ -29185,23 +24977,23 @@
"postfix": false,
"binop": null
},
- "value": "pAngle",
- "start": 8524,
- "end": 8530,
+ "value": "isNormalized",
+ "start": 8758,
+ "end": 8770,
"loc": {
"start": {
- "line": 171,
- "column": 70
+ "line": 181,
+ "column": 22
},
"end": {
- "line": 171,
- "column": 76
+ "line": 181,
+ "column": 34
}
}
},
{
"type": {
- "label": ")",
+ "label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -29211,86 +25003,43 @@
"postfix": false,
"binop": null
},
- "start": 8530,
- "end": 8531,
+ "start": 8771,
+ "end": 8772,
"loc": {
"start": {
- "line": 171,
- "column": 76
+ "line": 181,
+ "column": 35
},
"end": {
- "line": 171,
- "column": 77
+ "line": 181,
+ "column": 36
}
}
},
{
"type": {
- "label": ";",
+ "label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 8531,
- "end": 8532,
- "loc": {
- "start": {
- "line": 171,
- "column": 77
- },
- "end": {
- "line": 171,
- "column": 78
- }
- }
- },
- {
- "type": "CommentLine",
- "value": " translate back",
- "start": 8541,
- "end": 8558,
- "loc": {
- "start": {
- "line": 172,
- "column": 8
- },
- "end": {
- "line": 172,
- "column": 25
- }
- }
- },
- {
- "type": {
- "label": "const",
- "keyword": "const",
- "beforeExpr": false,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "const",
- "start": 8567,
- "end": 8572,
+ "value": "=",
+ "start": 8773,
+ "end": 8774,
"loc": {
"start": {
- "line": 173,
- "column": 8
+ "line": 181,
+ "column": 37
},
"end": {
- "line": 173,
- "column": 13
+ "line": 181,
+ "column": 38
}
}
},
@@ -29306,50 +25055,50 @@
"postfix": false,
"binop": null
},
- "value": "x",
- "start": 8573,
- "end": 8574,
+ "value": "pPoint",
+ "start": 8775,
+ "end": 8781,
"loc": {
"start": {
- "line": 173,
- "column": 14
+ "line": 181,
+ "column": 39
},
"end": {
- "line": 173,
- "column": 15
+ "line": 181,
+ "column": 45
}
}
},
{
"type": {
- "label": "=",
+ "label": ";",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "=",
- "start": 8575,
- "end": 8576,
+ "start": 8781,
+ "end": 8782,
"loc": {
"start": {
- "line": 173,
- "column": 16
+ "line": 181,
+ "column": 45
},
"end": {
- "line": 173,
- "column": 17
+ "line": 181,
+ "column": 46
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -29357,46 +25106,46 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "rotatedX",
- "start": 8577,
- "end": 8585,
+ "value": "this",
+ "start": 8791,
+ "end": 8795,
"loc": {
"start": {
- "line": 173,
- "column": 18
+ "line": 182,
+ "column": 8
},
"end": {
- "line": 173,
- "column": 26
+ "line": 182,
+ "column": 12
}
}
},
{
"type": {
- "label": "+/-",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ".",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
+ "binop": null,
"updateContext": null
},
- "value": "+",
- "start": 8586,
- "end": 8587,
+ "start": 8795,
+ "end": 8796,
"loc": {
"start": {
- "line": 173,
- "column": 27
+ "line": 182,
+ "column": 12
},
"end": {
- "line": 173,
- "column": 28
+ "line": 182,
+ "column": 13
}
}
},
@@ -29412,50 +25161,23 @@
"postfix": false,
"binop": null
},
- "value": "cx",
- "start": 8588,
- "end": 8590,
- "loc": {
- "start": {
- "line": 173,
- "column": 29
- },
- "end": {
- "line": 173,
- "column": 31
- }
- }
- },
- {
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 8590,
- "end": 8591,
+ "value": "iconPoint",
+ "start": 8796,
+ "end": 8805,
"loc": {
"start": {
- "line": 173,
- "column": 31
+ "line": 182,
+ "column": 13
},
"end": {
- "line": 173,
- "column": 32
+ "line": 182,
+ "column": 22
}
}
},
{
"type": {
- "label": "const",
- "keyword": "const",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -29466,17 +25188,16 @@
"binop": null,
"updateContext": null
},
- "value": "const",
- "start": 8600,
- "end": 8605,
+ "start": 8805,
+ "end": 8806,
"loc": {
"start": {
- "line": 174,
- "column": 8
+ "line": 182,
+ "column": 22
},
"end": {
- "line": 174,
- "column": 13
+ "line": 182,
+ "column": 23
}
}
},
@@ -29492,17 +25213,17 @@
"postfix": false,
"binop": null
},
- "value": "y",
- "start": 8606,
- "end": 8607,
+ "value": "x",
+ "start": 8806,
+ "end": 8807,
"loc": {
"start": {
- "line": 174,
- "column": 14
+ "line": 182,
+ "column": 23
},
"end": {
- "line": 174,
- "column": 15
+ "line": 182,
+ "column": 24
}
}
},
@@ -29520,16 +25241,16 @@
"updateContext": null
},
"value": "=",
- "start": 8608,
- "end": 8609,
+ "start": 8808,
+ "end": 8809,
"loc": {
"start": {
- "line": 174,
- "column": 16
+ "line": 182,
+ "column": 25
},
"end": {
- "line": 174,
- "column": 17
+ "line": 182,
+ "column": 26
}
}
},
@@ -29545,44 +25266,43 @@
"postfix": false,
"binop": null
},
- "value": "rotatedY",
- "start": 8610,
- "end": 8618,
+ "value": "isNormalized",
+ "start": 8810,
+ "end": 8822,
"loc": {
"start": {
- "line": 174,
- "column": 18
+ "line": 182,
+ "column": 27
},
"end": {
- "line": 174,
- "column": 26
+ "line": 182,
+ "column": 39
}
}
},
{
"type": {
- "label": "+/-",
+ "label": "?",
"beforeExpr": true,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
- "prefix": true,
+ "prefix": false,
"postfix": false,
- "binop": 9,
+ "binop": null,
"updateContext": null
},
- "value": "+",
- "start": 8619,
- "end": 8620,
+ "start": 8823,
+ "end": 8824,
"loc": {
"start": {
- "line": 174,
- "column": 27
+ "line": 182,
+ "column": 40
},
"end": {
- "line": 174,
- "column": 28
+ "line": 182,
+ "column": 41
}
}
},
@@ -29598,23 +25318,23 @@
"postfix": false,
"binop": null
},
- "value": "cy",
- "start": 8621,
- "end": 8623,
+ "value": "x",
+ "start": 8825,
+ "end": 8826,
"loc": {
"start": {
- "line": 174,
- "column": 29
+ "line": 182,
+ "column": 42
},
"end": {
- "line": 174,
- "column": 31
+ "line": 182,
+ "column": 43
}
}
},
{
"type": {
- "label": ";",
+ "label": "*",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -29622,19 +25342,20 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
+ "binop": 10,
"updateContext": null
},
- "start": 8623,
- "end": 8624,
+ "value": "*",
+ "start": 8827,
+ "end": 8828,
"loc": {
"start": {
- "line": 174,
- "column": 31
+ "line": 182,
+ "column": 44
},
"end": {
- "line": 174,
- "column": 32
+ "line": 182,
+ "column": 45
}
}
},
@@ -29653,16 +25374,16 @@
"updateContext": null
},
"value": "this",
- "start": 8633,
- "end": 8637,
+ "start": 8829,
+ "end": 8833,
"loc": {
"start": {
- "line": 175,
- "column": 8
+ "line": 182,
+ "column": 46
},
"end": {
- "line": 175,
- "column": 12
+ "line": 182,
+ "column": 50
}
}
},
@@ -29679,16 +25400,16 @@
"binop": null,
"updateContext": null
},
- "start": 8637,
- "end": 8638,
+ "start": 8833,
+ "end": 8834,
"loc": {
"start": {
- "line": 175,
- "column": 12
+ "line": 182,
+ "column": 50
},
"end": {
- "line": 175,
- "column": 13
+ "line": 182,
+ "column": 51
}
}
},
@@ -29704,17 +25425,17 @@
"postfix": false,
"binop": null
},
- "value": "point",
- "start": 8638,
- "end": 8643,
+ "value": "bounds",
+ "start": 8834,
+ "end": 8840,
"loc": {
"start": {
- "line": 175,
- "column": 13
+ "line": 182,
+ "column": 51
},
"end": {
- "line": 175,
- "column": 18
+ "line": 182,
+ "column": 57
}
}
},
@@ -29731,16 +25452,16 @@
"binop": null,
"updateContext": null
},
- "start": 8643,
- "end": 8644,
+ "start": 8840,
+ "end": 8841,
"loc": {
"start": {
- "line": 175,
- "column": 18
+ "line": 182,
+ "column": 57
},
"end": {
- "line": 175,
- "column": 19
+ "line": 182,
+ "column": 58
}
}
},
@@ -29756,44 +25477,43 @@
"postfix": false,
"binop": null
},
- "value": "x",
- "start": 8644,
- "end": 8645,
+ "value": "width",
+ "start": 8841,
+ "end": 8846,
"loc": {
"start": {
- "line": 175,
- "column": 19
+ "line": 182,
+ "column": 58
},
"end": {
- "line": 175,
- "column": 20
+ "line": 182,
+ "column": 63
}
}
},
{
"type": {
- "label": "=",
+ "label": ":",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "value": "=",
- "start": 8646,
- "end": 8647,
+ "start": 8847,
+ "end": 8848,
"loc": {
"start": {
- "line": 175,
- "column": 21
+ "line": 182,
+ "column": 64
},
"end": {
- "line": 175,
- "column": 22
+ "line": 182,
+ "column": 65
}
}
},
@@ -29810,16 +25530,16 @@
"binop": null
},
"value": "x",
- "start": 8648,
- "end": 8649,
+ "start": 8849,
+ "end": 8850,
"loc": {
"start": {
- "line": 175,
- "column": 23
+ "line": 182,
+ "column": 66
},
"end": {
- "line": 175,
- "column": 24
+ "line": 182,
+ "column": 67
}
}
},
@@ -29836,16 +25556,16 @@
"binop": null,
"updateContext": null
},
- "start": 8649,
- "end": 8650,
+ "start": 8850,
+ "end": 8851,
"loc": {
"start": {
- "line": 175,
- "column": 24
+ "line": 182,
+ "column": 67
},
"end": {
- "line": 175,
- "column": 25
+ "line": 182,
+ "column": 68
}
}
},
@@ -29864,15 +25584,15 @@
"updateContext": null
},
"value": "this",
- "start": 8659,
- "end": 8663,
+ "start": 8860,
+ "end": 8864,
"loc": {
"start": {
- "line": 176,
+ "line": 183,
"column": 8
},
"end": {
- "line": 176,
+ "line": 183,
"column": 12
}
}
@@ -29890,15 +25610,15 @@
"binop": null,
"updateContext": null
},
- "start": 8663,
- "end": 8664,
+ "start": 8864,
+ "end": 8865,
"loc": {
"start": {
- "line": 176,
+ "line": 183,
"column": 12
},
"end": {
- "line": 176,
+ "line": 183,
"column": 13
}
}
@@ -29915,17 +25635,17 @@
"postfix": false,
"binop": null
},
- "value": "point",
- "start": 8664,
- "end": 8669,
+ "value": "iconPoint",
+ "start": 8865,
+ "end": 8874,
"loc": {
"start": {
- "line": 176,
+ "line": 183,
"column": 13
},
"end": {
- "line": 176,
- "column": 18
+ "line": 183,
+ "column": 22
}
}
},
@@ -29942,16 +25662,16 @@
"binop": null,
"updateContext": null
},
- "start": 8669,
- "end": 8670,
+ "start": 8874,
+ "end": 8875,
"loc": {
"start": {
- "line": 176,
- "column": 18
+ "line": 183,
+ "column": 22
},
"end": {
- "line": 176,
- "column": 19
+ "line": 183,
+ "column": 23
}
}
},
@@ -29968,16 +25688,16 @@
"binop": null
},
"value": "y",
- "start": 8670,
- "end": 8671,
+ "start": 8875,
+ "end": 8876,
"loc": {
"start": {
- "line": 176,
- "column": 19
+ "line": 183,
+ "column": 23
},
"end": {
- "line": 176,
- "column": 20
+ "line": 183,
+ "column": 24
}
}
},
@@ -29995,16 +25715,16 @@
"updateContext": null
},
"value": "=",
- "start": 8672,
- "end": 8673,
+ "start": 8877,
+ "end": 8878,
"loc": {
"start": {
- "line": 176,
- "column": 21
+ "line": 183,
+ "column": 25
},
"end": {
- "line": 176,
- "column": 22
+ "line": 183,
+ "column": 26
}
}
},
@@ -30020,50 +25740,23 @@
"postfix": false,
"binop": null
},
- "value": "y",
- "start": 8674,
- "end": 8675,
- "loc": {
- "start": {
- "line": 176,
- "column": 23
- },
- "end": {
- "line": 176,
- "column": 24
- }
- }
- },
- {
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 8675,
- "end": 8676,
+ "value": "isNormalized",
+ "start": 8879,
+ "end": 8891,
"loc": {
"start": {
- "line": 176,
- "column": 24
+ "line": 183,
+ "column": 27
},
"end": {
- "line": 176,
- "column": 25
+ "line": 183,
+ "column": 39
}
}
},
{
"type": {
- "label": "return",
- "keyword": "return",
+ "label": "?",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
@@ -30074,24 +25767,22 @@
"binop": null,
"updateContext": null
},
- "value": "return",
- "start": 8685,
- "end": 8691,
+ "start": 8892,
+ "end": 8893,
"loc": {
"start": {
- "line": 177,
- "column": 8
+ "line": 183,
+ "column": 40
},
"end": {
- "line": 177,
- "column": 14
+ "line": 183,
+ "column": 41
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -30099,52 +25790,53 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 8692,
- "end": 8696,
+ "value": "y",
+ "start": 8894,
+ "end": 8895,
"loc": {
"start": {
- "line": 177,
- "column": 15
+ "line": 183,
+ "column": 42
},
"end": {
- "line": 177,
- "column": 19
+ "line": 183,
+ "column": 43
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": "*",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
+ "binop": 10,
"updateContext": null
},
- "start": 8696,
- "end": 8697,
+ "value": "*",
+ "start": 8896,
+ "end": 8897,
"loc": {
"start": {
- "line": 177,
- "column": 19
+ "line": 183,
+ "column": 44
},
"end": {
- "line": 177,
- "column": 20
+ "line": 183,
+ "column": 45
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -30152,51 +25844,26 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
- },
- "value": "point",
- "start": 8697,
- "end": 8702,
- "loc": {
- "start": {
- "line": 177,
- "column": 20
- },
- "end": {
- "line": 177,
- "column": 25
- }
- }
- },
- {
- "type": {
- "label": ";",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
"binop": null,
"updateContext": null
},
- "start": 8702,
- "end": 8703,
+ "value": "this",
+ "start": 8898,
+ "end": 8902,
"loc": {
"start": {
- "line": 177,
- "column": 25
+ "line": 183,
+ "column": 46
},
"end": {
- "line": 177,
- "column": 26
+ "line": 183,
+ "column": 50
}
}
},
{
"type": {
- "label": "}",
+ "label": ".",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -30204,34 +25871,19 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 8708,
- "end": 8709,
- "loc": {
- "start": {
- "line": 178,
- "column": 4
- },
- "end": {
- "line": 178,
- "column": 5
- }
- }
- },
- {
- "type": "CommentBlock",
- "value": "*\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle\n ",
- "start": 8714,
- "end": 9079,
+ "start": 8902,
+ "end": 8903,
"loc": {
"start": {
- "line": 179,
- "column": 4
+ "line": 183,
+ "column": 50
},
"end": {
- "line": 185,
- "column": 7
+ "line": 183,
+ "column": 51
}
}
},
@@ -30247,42 +25899,43 @@
"postfix": false,
"binop": null
},
- "value": "setPoint",
- "start": 9084,
- "end": 9092,
+ "value": "bounds",
+ "start": 8903,
+ "end": 8909,
"loc": {
"start": {
- "line": 186,
- "column": 4
+ "line": 183,
+ "column": 51
},
"end": {
- "line": 186,
- "column": 12
+ "line": 183,
+ "column": 57
}
}
},
{
"type": {
- "label": "(",
- "beforeExpr": true,
- "startsExpr": true,
+ "label": ".",
+ "beforeExpr": false,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 9092,
- "end": 9093,
+ "start": 8909,
+ "end": 8910,
"loc": {
"start": {
- "line": 186,
- "column": 12
+ "line": 183,
+ "column": 57
},
"end": {
- "line": 186,
- "column": 13
+ "line": 183,
+ "column": 58
}
}
},
@@ -30298,49 +25951,50 @@
"postfix": false,
"binop": null
},
- "value": "pPoint",
- "start": 9093,
- "end": 9099,
+ "value": "height",
+ "start": 8910,
+ "end": 8916,
"loc": {
"start": {
- "line": 186,
- "column": 13
+ "line": 183,
+ "column": 58
},
"end": {
- "line": 186,
- "column": 19
+ "line": 183,
+ "column": 64
}
}
},
{
"type": {
- "label": ")",
- "beforeExpr": false,
+ "label": ":",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "start": 9099,
- "end": 9100,
+ "start": 8917,
+ "end": 8918,
"loc": {
"start": {
- "line": 186,
- "column": 19
+ "line": 183,
+ "column": 65
},
"end": {
- "line": 186,
- "column": 20
+ "line": 183,
+ "column": 66
}
}
},
{
"type": {
- "label": "{",
- "beforeExpr": true,
+ "label": "name",
+ "beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -30349,25 +26003,25 @@
"postfix": false,
"binop": null
},
- "start": 9101,
- "end": 9102,
+ "value": "y",
+ "start": 8919,
+ "end": 8920,
"loc": {
"start": {
- "line": 186,
- "column": 21
+ "line": 183,
+ "column": 67
},
"end": {
- "line": 186,
- "column": 22
+ "line": 183,
+ "column": 68
}
}
},
{
- "type": {
- "label": "this",
- "keyword": "this",
- "beforeExpr": false,
- "startsExpr": true,
+ "type": {
+ "label": ";",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -30376,23 +26030,22 @@
"binop": null,
"updateContext": null
},
- "value": "this",
- "start": 9111,
- "end": 9115,
+ "start": 8920,
+ "end": 8921,
"loc": {
"start": {
- "line": 187,
- "column": 8
+ "line": 183,
+ "column": 68
},
"end": {
- "line": 187,
- "column": 12
+ "line": 183,
+ "column": 69
}
}
},
{
"type": {
- "label": ".",
+ "label": "}",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -30400,19 +26053,34 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 9115,
- "end": 9116,
+ "start": 8926,
+ "end": 8927,
"loc": {
"start": {
- "line": 187,
- "column": 12
+ "line": 184,
+ "column": 4
},
"end": {
- "line": 187,
- "column": 13
+ "line": 184,
+ "column": 5
+ }
+ }
+ },
+ {
+ "type": "CommentBlock",
+ "value": "*\n * Updates the bounds of the rectangle this icon point exists inside/outside of.\n * @param pBounds - The bounds to update the rectangle with.\n * @prop {number} pBounds.width - The width of the new rectangle.\n * @prop {number} pBounds.height - The height of the new rectangle.\n ",
+ "start": 8932,
+ "end": 9235,
+ "loc": {
+ "start": {
+ "line": 185,
+ "column": 4
+ },
+ "end": {
+ "line": 190,
+ "column": 7
}
}
},
@@ -30428,43 +26096,42 @@
"postfix": false,
"binop": null
},
- "value": "rawPixelsPoint",
- "start": 9116,
- "end": 9130,
+ "value": "updateBounds",
+ "start": 9240,
+ "end": 9252,
"loc": {
"start": {
- "line": 187,
- "column": 13
+ "line": 191,
+ "column": 4
},
"end": {
- "line": 187,
- "column": 27
+ "line": 191,
+ "column": 16
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "(",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 9130,
- "end": 9131,
+ "start": 9252,
+ "end": 9253,
"loc": {
"start": {
- "line": 187,
- "column": 27
+ "line": 191,
+ "column": 16
},
"end": {
- "line": 187,
- "column": 28
+ "line": 191,
+ "column": 17
}
}
},
@@ -30480,51 +26147,49 @@
"postfix": false,
"binop": null
},
- "value": "x",
- "start": 9131,
- "end": 9132,
+ "value": "pBounds",
+ "start": 9253,
+ "end": 9260,
"loc": {
"start": {
- "line": 187,
- "column": 28
+ "line": 191,
+ "column": 17
},
"end": {
- "line": 187,
- "column": 29
+ "line": 191,
+ "column": 24
}
}
},
{
"type": {
- "label": "=",
- "beforeExpr": true,
+ "label": ")",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": true,
+ "isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "=",
- "start": 9133,
- "end": 9134,
+ "start": 9260,
+ "end": 9261,
"loc": {
"start": {
- "line": 187,
- "column": 30
+ "line": 191,
+ "column": 24
},
"end": {
- "line": 187,
- "column": 31
+ "line": 191,
+ "column": 25
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
+ "label": "{",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -30533,23 +26198,23 @@
"postfix": false,
"binop": null
},
- "value": "pPoint",
- "start": 9135,
- "end": 9141,
+ "start": 9262,
+ "end": 9263,
"loc": {
"start": {
- "line": 187,
- "column": 32
+ "line": 191,
+ "column": 26
},
"end": {
- "line": 187,
- "column": 38
+ "line": 191,
+ "column": 27
}
}
},
{
"type": {
- "label": ".",
+ "label": "const",
+ "keyword": "const",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -30560,23 +26225,24 @@
"binop": null,
"updateContext": null
},
- "start": 9141,
- "end": 9142,
+ "value": "const",
+ "start": 9272,
+ "end": 9277,
"loc": {
"start": {
- "line": 187,
- "column": 38
+ "line": 192,
+ "column": 8
},
"end": {
- "line": 187,
- "column": 39
+ "line": 192,
+ "column": 13
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
+ "label": "{",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -30585,103 +26251,102 @@
"postfix": false,
"binop": null
},
- "value": "useRawPixels",
- "start": 9142,
- "end": 9154,
+ "start": 9278,
+ "end": 9279,
"loc": {
"start": {
- "line": 187,
- "column": 39
+ "line": 192,
+ "column": 14
},
"end": {
- "line": 187,
- "column": 51
+ "line": 192,
+ "column": 15
}
}
},
{
"type": {
- "label": "?",
- "beforeExpr": true,
- "startsExpr": false,
+ "label": "name",
+ "beforeExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 9155,
- "end": 9156,
+ "value": "width",
+ "start": 9280,
+ "end": 9285,
"loc": {
"start": {
- "line": 187,
- "column": 52
+ "line": 192,
+ "column": 16
},
"end": {
- "line": 187,
- "column": 53
+ "line": 192,
+ "column": 21
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
+ "label": ",",
+ "beforeExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "pPoint",
- "start": 9157,
- "end": 9163,
+ "start": 9285,
+ "end": 9286,
"loc": {
"start": {
- "line": 187,
- "column": 54
+ "line": 192,
+ "column": 21
},
"end": {
- "line": 187,
- "column": 60
+ "line": 192,
+ "column": 22
}
}
},
{
"type": {
- "label": ".",
+ "label": "name",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 9163,
- "end": 9164,
+ "value": "height",
+ "start": 9287,
+ "end": 9293,
"loc": {
"start": {
- "line": 187,
- "column": 60
+ "line": 192,
+ "column": 23
},
"end": {
- "line": 187,
- "column": 61
+ "line": 192,
+ "column": 29
}
}
},
{
"type": {
- "label": "name",
+ "label": "}",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -30689,43 +26354,43 @@
"postfix": false,
"binop": null
},
- "value": "x",
- "start": 9164,
- "end": 9165,
+ "start": 9294,
+ "end": 9295,
"loc": {
"start": {
- "line": 187,
- "column": 61
+ "line": 192,
+ "column": 30
},
"end": {
- "line": 187,
- "column": 62
+ "line": 192,
+ "column": 31
}
}
},
{
"type": {
- "label": ":",
+ "label": "=",
"beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "start": 9166,
- "end": 9167,
+ "value": "=",
+ "start": 9296,
+ "end": 9297,
"loc": {
"start": {
- "line": 187,
- "column": 63
+ "line": 192,
+ "column": 32
},
"end": {
- "line": 187,
- "column": 64
+ "line": 192,
+ "column": 33
}
}
},
@@ -30741,24 +26406,24 @@
"postfix": false,
"binop": null
},
- "value": "pPoint",
- "start": 9168,
- "end": 9174,
+ "value": "pBounds",
+ "start": 9298,
+ "end": 9305,
"loc": {
"start": {
- "line": 187,
- "column": 65
+ "line": 192,
+ "column": 34
},
"end": {
- "line": 187,
- "column": 71
+ "line": 192,
+ "column": 41
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -30768,22 +26433,23 @@
"binop": null,
"updateContext": null
},
- "start": 9174,
- "end": 9175,
+ "start": 9305,
+ "end": 9306,
"loc": {
"start": {
- "line": 187,
- "column": 71
+ "line": 192,
+ "column": 41
},
"end": {
- "line": 187,
- "column": 72
+ "line": 192,
+ "column": 42
}
}
},
{
"type": {
- "label": "name",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -30791,53 +26457,52 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null
+ "binop": null,
+ "updateContext": null
},
- "value": "x",
- "start": 9175,
- "end": 9176,
+ "value": "this",
+ "start": 9315,
+ "end": 9319,
"loc": {
"start": {
- "line": 187,
- "column": 72
+ "line": 193,
+ "column": 8
},
"end": {
- "line": 187,
- "column": 73
+ "line": 193,
+ "column": 12
}
}
},
{
"type": {
- "label": "*",
- "beforeExpr": true,
+ "label": ".",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 10,
+ "binop": null,
"updateContext": null
},
- "value": "*",
- "start": 9177,
- "end": 9178,
+ "start": 9319,
+ "end": 9320,
"loc": {
"start": {
- "line": 187,
- "column": 74
+ "line": 193,
+ "column": 12
},
"end": {
- "line": 187,
- "column": 75
+ "line": 193,
+ "column": 13
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -30845,20 +26510,19 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 9179,
- "end": 9183,
+ "value": "bounds",
+ "start": 9320,
+ "end": 9326,
"loc": {
"start": {
- "line": 187,
- "column": 76
+ "line": 193,
+ "column": 13
},
"end": {
- "line": 187,
- "column": 80
+ "line": 193,
+ "column": 19
}
}
},
@@ -30875,16 +26539,16 @@
"binop": null,
"updateContext": null
},
- "start": 9183,
- "end": 9184,
+ "start": 9326,
+ "end": 9327,
"loc": {
"start": {
- "line": 187,
- "column": 80
+ "line": 193,
+ "column": 19
},
"end": {
- "line": 187,
- "column": 81
+ "line": 193,
+ "column": 20
}
}
},
@@ -30900,43 +26564,44 @@
"postfix": false,
"binop": null
},
- "value": "bounds",
- "start": 9184,
- "end": 9190,
+ "value": "width",
+ "start": 9327,
+ "end": 9332,
"loc": {
"start": {
- "line": 187,
- "column": 81
+ "line": 193,
+ "column": 20
},
"end": {
- "line": 187,
- "column": 87
+ "line": 193,
+ "column": 25
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": "=",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
- "isAssign": false,
+ "isAssign": true,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
- "start": 9190,
- "end": 9191,
+ "value": "=",
+ "start": 9333,
+ "end": 9334,
"loc": {
"start": {
- "line": 187,
- "column": 87
+ "line": 193,
+ "column": 26
},
"end": {
- "line": 187,
- "column": 88
+ "line": 193,
+ "column": 27
}
}
},
@@ -30953,16 +26618,16 @@
"binop": null
},
"value": "width",
- "start": 9191,
- "end": 9196,
+ "start": 9335,
+ "end": 9340,
"loc": {
"start": {
- "line": 187,
- "column": 88
+ "line": 193,
+ "column": 28
},
"end": {
- "line": 187,
- "column": 93
+ "line": 193,
+ "column": 33
}
}
},
@@ -30979,16 +26644,16 @@
"binop": null,
"updateContext": null
},
- "start": 9196,
- "end": 9197,
+ "start": 9340,
+ "end": 9341,
"loc": {
"start": {
- "line": 187,
- "column": 93
+ "line": 193,
+ "column": 33
},
"end": {
- "line": 187,
- "column": 94
+ "line": 193,
+ "column": 34
}
}
},
@@ -31007,15 +26672,15 @@
"updateContext": null
},
"value": "this",
- "start": 9206,
- "end": 9210,
+ "start": 9350,
+ "end": 9354,
"loc": {
"start": {
- "line": 188,
+ "line": 194,
"column": 8
},
"end": {
- "line": 188,
+ "line": 194,
"column": 12
}
}
@@ -31033,15 +26698,15 @@
"binop": null,
"updateContext": null
},
- "start": 9210,
- "end": 9211,
+ "start": 9354,
+ "end": 9355,
"loc": {
"start": {
- "line": 188,
+ "line": 194,
"column": 12
},
"end": {
- "line": 188,
+ "line": 194,
"column": 13
}
}
@@ -31058,17 +26723,17 @@
"postfix": false,
"binop": null
},
- "value": "rawPixelsPoint",
- "start": 9211,
- "end": 9225,
+ "value": "bounds",
+ "start": 9355,
+ "end": 9361,
"loc": {
"start": {
- "line": 188,
+ "line": 194,
"column": 13
},
"end": {
- "line": 188,
- "column": 27
+ "line": 194,
+ "column": 19
}
}
},
@@ -31085,16 +26750,16 @@
"binop": null,
"updateContext": null
},
- "start": 9225,
- "end": 9226,
+ "start": 9361,
+ "end": 9362,
"loc": {
"start": {
- "line": 188,
- "column": 27
+ "line": 194,
+ "column": 19
},
"end": {
- "line": 188,
- "column": 28
+ "line": 194,
+ "column": 20
}
}
},
@@ -31110,17 +26775,17 @@
"postfix": false,
"binop": null
},
- "value": "y",
- "start": 9226,
- "end": 9227,
+ "value": "height",
+ "start": 9362,
+ "end": 9368,
"loc": {
"start": {
- "line": 188,
- "column": 28
+ "line": 194,
+ "column": 20
},
"end": {
- "line": 188,
- "column": 29
+ "line": 194,
+ "column": 26
}
}
},
@@ -31138,16 +26803,16 @@
"updateContext": null
},
"value": "=",
- "start": 9228,
- "end": 9229,
+ "start": 9369,
+ "end": 9370,
"loc": {
"start": {
- "line": 188,
- "column": 30
+ "line": 194,
+ "column": 27
},
"end": {
- "line": 188,
- "column": 31
+ "line": 194,
+ "column": 28
}
}
},
@@ -31163,24 +26828,24 @@
"postfix": false,
"binop": null
},
- "value": "pPoint",
- "start": 9230,
- "end": 9236,
+ "value": "height",
+ "start": 9371,
+ "end": 9377,
"loc": {
"start": {
- "line": 188,
- "column": 32
+ "line": 194,
+ "column": 29
},
"end": {
- "line": 188,
- "column": 38
+ "line": 194,
+ "column": 35
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
+ "label": ";",
+ "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
@@ -31190,24 +26855,24 @@
"binop": null,
"updateContext": null
},
- "start": 9236,
- "end": 9237,
+ "start": 9377,
+ "end": 9378,
"loc": {
"start": {
- "line": 188,
- "column": 38
+ "line": 194,
+ "column": 35
},
"end": {
- "line": 188,
- "column": 39
+ "line": 194,
+ "column": 36
}
}
},
{
"type": {
- "label": "name",
+ "label": "}",
"beforeExpr": false,
- "startsExpr": true,
+ "startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -31215,43 +26880,32 @@
"postfix": false,
"binop": null
},
- "value": "useRawPixels",
- "start": 9237,
- "end": 9249,
+ "start": 9383,
+ "end": 9384,
"loc": {
"start": {
- "line": 188,
- "column": 39
+ "line": 195,
+ "column": 4
},
"end": {
- "line": 188,
- "column": 51
+ "line": 195,
+ "column": 5
}
}
},
{
- "type": {
- "label": "?",
- "beforeExpr": true,
- "startsExpr": false,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 9250,
- "end": 9251,
+ "type": "CommentBlock",
+ "value": "*\n * Changes the icon point position.\n * @param pPoint - The point to update this icon point with.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n ",
+ "start": 9389,
+ "end": 9774,
"loc": {
"start": {
- "line": 188,
- "column": 52
+ "line": 196,
+ "column": 4
},
"end": {
- "line": 188,
- "column": 53
+ "line": 202,
+ "column": 7
}
}
},
@@ -31267,43 +26921,42 @@
"postfix": false,
"binop": null
},
- "value": "pPoint",
- "start": 9252,
- "end": 9258,
+ "value": "updatePoint",
+ "start": 9779,
+ "end": 9790,
"loc": {
"start": {
- "line": 188,
- "column": 54
+ "line": 203,
+ "column": 4
},
"end": {
- "line": 188,
- "column": 60
+ "line": 203,
+ "column": 15
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "(",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 9258,
- "end": 9259,
+ "start": 9790,
+ "end": 9791,
"loc": {
"start": {
- "line": 188,
- "column": 60
+ "line": 203,
+ "column": 15
},
"end": {
- "line": 188,
- "column": 61
+ "line": 203,
+ "column": 16
}
}
},
@@ -31319,50 +26972,49 @@
"postfix": false,
"binop": null
},
- "value": "y",
- "start": 9259,
- "end": 9260,
+ "value": "pPoint",
+ "start": 9791,
+ "end": 9797,
"loc": {
"start": {
- "line": 188,
- "column": 61
+ "line": 203,
+ "column": 16
},
"end": {
- "line": 188,
- "column": 62
+ "line": 203,
+ "column": 22
}
}
},
{
"type": {
- "label": ":",
- "beforeExpr": true,
+ "label": ")",
+ "beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 9261,
- "end": 9262,
+ "start": 9797,
+ "end": 9798,
"loc": {
"start": {
- "line": 188,
- "column": 63
+ "line": 203,
+ "column": 22
},
"end": {
- "line": 188,
- "column": 64
+ "line": 203,
+ "column": 23
}
}
},
{
"type": {
- "label": "name",
- "beforeExpr": false,
+ "label": "{",
+ "beforeExpr": true,
"startsExpr": true,
"rightAssociative": false,
"isLoop": false,
@@ -31371,25 +27023,25 @@
"postfix": false,
"binop": null
},
- "value": "pPoint",
- "start": 9263,
- "end": 9269,
+ "start": 9799,
+ "end": 9800,
"loc": {
"start": {
- "line": 188,
- "column": 65
+ "line": 203,
+ "column": 24
},
"end": {
- "line": 188,
- "column": 71
+ "line": 203,
+ "column": 25
}
}
},
{
"type": {
- "label": ".",
+ "label": "this",
+ "keyword": "this",
"beforeExpr": false,
- "startsExpr": false,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
@@ -31398,76 +27050,49 @@
"binop": null,
"updateContext": null
},
- "start": 9269,
- "end": 9270,
+ "value": "this",
+ "start": 9809,
+ "end": 9813,
"loc": {
"start": {
- "line": 188,
- "column": 71
+ "line": 204,
+ "column": 8
},
"end": {
- "line": 188,
- "column": 72
+ "line": 204,
+ "column": 12
}
}
},
{
"type": {
- "label": "name",
+ "label": ".",
"beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
- "binop": null
- },
- "value": "y",
- "start": 9270,
- "end": 9271,
- "loc": {
- "start": {
- "line": 188,
- "column": 72
- },
- "end": {
- "line": 188,
- "column": 73
- }
- }
- },
- {
- "type": {
- "label": "*",
- "beforeExpr": true,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": 10,
+ "binop": null,
"updateContext": null
},
- "value": "*",
- "start": 9272,
- "end": 9273,
+ "start": 9813,
+ "end": 9814,
"loc": {
"start": {
- "line": 188,
- "column": 74
+ "line": 204,
+ "column": 12
},
"end": {
- "line": 188,
- "column": 75
+ "line": 204,
+ "column": 13
}
}
},
{
"type": {
- "label": "this",
- "keyword": "this",
+ "label": "name",
"beforeExpr": false,
"startsExpr": true,
"rightAssociative": false,
@@ -31475,46 +27100,44 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "value": "this",
- "start": 9274,
- "end": 9278,
+ "value": "setPoint",
+ "start": 9814,
+ "end": 9822,
"loc": {
"start": {
- "line": 188,
- "column": 76
+ "line": 204,
+ "column": 13
},
"end": {
- "line": 188,
- "column": 80
+ "line": 204,
+ "column": 21
}
}
},
{
"type": {
- "label": ".",
- "beforeExpr": false,
- "startsExpr": false,
+ "label": "(",
+ "beforeExpr": true,
+ "startsExpr": true,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
+ "binop": null
},
- "start": 9278,
- "end": 9279,
+ "start": 9822,
+ "end": 9823,
"loc": {
"start": {
- "line": 188,
- "column": 80
+ "line": 204,
+ "column": 21
},
"end": {
- "line": 188,
- "column": 81
+ "line": 204,
+ "column": 22
}
}
},
@@ -31530,23 +27153,23 @@
"postfix": false,
"binop": null
},
- "value": "bounds",
- "start": 9279,
- "end": 9285,
+ "value": "pPoint",
+ "start": 9823,
+ "end": 9829,
"loc": {
"start": {
- "line": 188,
- "column": 81
+ "line": 204,
+ "column": 22
},
"end": {
- "line": 188,
- "column": 87
+ "line": 204,
+ "column": 28
}
}
},
{
"type": {
- "label": ".",
+ "label": ")",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
@@ -31554,45 +27177,18 @@
"isAssign": false,
"prefix": false,
"postfix": false,
- "binop": null,
- "updateContext": null
- },
- "start": 9285,
- "end": 9286,
- "loc": {
- "start": {
- "line": 188,
- "column": 87
- },
- "end": {
- "line": 188,
- "column": 88
- }
- }
- },
- {
- "type": {
- "label": "name",
- "beforeExpr": false,
- "startsExpr": true,
- "rightAssociative": false,
- "isLoop": false,
- "isAssign": false,
- "prefix": false,
- "postfix": false,
"binop": null
},
- "value": "height",
- "start": 9286,
- "end": 9292,
+ "start": 9829,
+ "end": 9830,
"loc": {
"start": {
- "line": 188,
- "column": 88
+ "line": 204,
+ "column": 28
},
"end": {
- "line": 188,
- "column": 94
+ "line": 204,
+ "column": 29
}
}
},
@@ -31609,16 +27205,16 @@
"binop": null,
"updateContext": null
},
- "start": 9292,
- "end": 9293,
+ "start": 9830,
+ "end": 9831,
"loc": {
"start": {
- "line": 188,
- "column": 94
+ "line": 204,
+ "column": 29
},
"end": {
- "line": 188,
- "column": 95
+ "line": 204,
+ "column": 30
}
}
},
@@ -31634,15 +27230,15 @@
"postfix": false,
"binop": null
},
- "start": 9298,
- "end": 9299,
+ "start": 9836,
+ "end": 9837,
"loc": {
"start": {
- "line": 189,
+ "line": 205,
"column": 4
},
"end": {
- "line": 189,
+ "line": 205,
"column": 5
}
}
@@ -31659,15 +27255,15 @@
"postfix": false,
"binop": null
},
- "start": 9300,
- "end": 9301,
+ "start": 9838,
+ "end": 9839,
"loc": {
"start": {
- "line": 190,
+ "line": 206,
"column": 0
},
"end": {
- "line": 190,
+ "line": 206,
"column": 1
}
}
@@ -31687,15 +27283,15 @@
"updateContext": null
},
"value": "export",
- "start": 9303,
- "end": 9309,
+ "start": 9841,
+ "end": 9847,
"loc": {
"start": {
- "line": 192,
+ "line": 208,
"column": 0
},
"end": {
- "line": 192,
+ "line": 208,
"column": 6
}
}
@@ -31712,15 +27308,15 @@
"postfix": false,
"binop": null
},
- "start": 9310,
- "end": 9311,
+ "start": 9848,
+ "end": 9849,
"loc": {
"start": {
- "line": 192,
+ "line": 208,
"column": 7
},
"end": {
- "line": 192,
+ "line": 208,
"column": 8
}
}
@@ -31738,15 +27334,15 @@
"binop": null
},
"value": "IconPoint",
- "start": 9312,
- "end": 9321,
+ "start": 9850,
+ "end": 9859,
"loc": {
"start": {
- "line": 192,
+ "line": 208,
"column": 9
},
"end": {
- "line": 192,
+ "line": 208,
"column": 18
}
}
@@ -31763,15 +27359,15 @@
"postfix": false,
"binop": null
},
- "start": 9322,
- "end": 9323,
+ "start": 9860,
+ "end": 9861,
"loc": {
"start": {
- "line": 192,
+ "line": 208,
"column": 19
},
"end": {
- "line": 192,
+ "line": 208,
"column": 20
}
}
@@ -31789,15 +27385,15 @@
"binop": null,
"updateContext": null
},
- "start": 9323,
- "end": 9324,
+ "start": 9861,
+ "end": 9862,
"loc": {
"start": {
- "line": 192,
+ "line": 208,
"column": 20
},
"end": {
- "line": 192,
+ "line": 208,
"column": 21
}
}
@@ -31805,15 +27401,15 @@
{
"type": "CommentLine",
"value": "# sourceMappingURL=icon-point.mjs.map",
- "start": 9325,
- "end": 9364,
+ "start": 9863,
+ "end": 9902,
"loc": {
"start": {
- "line": 193,
+ "line": 209,
"column": 0
},
"end": {
- "line": 193,
+ "line": 209,
"column": 39
}
}
@@ -31831,15 +27427,15 @@
"binop": null,
"updateContext": null
},
- "start": 9365,
- "end": 9365,
+ "start": 9903,
+ "end": 9903,
"loc": {
"start": {
- "line": 194,
+ "line": 210,
"column": 0
},
"end": {
- "line": 194,
+ "line": 210,
"column": 0
}
}
diff --git a/docs/class/es/icon-point.mjs~IconPoint.html b/docs/class/es/icon-point.mjs~IconPoint.html
index 1180ccd..bba5a9f 100644
--- a/docs/class/es/icon-point.mjs~IconPoint.html
+++ b/docs/class/es/icon-point.mjs~IconPoint.html
@@ -35,13 +35,13 @@
@@ -78,7 +78,7 @@
Example:
// Make the dimensions of the rectangle 100x50
const bounds = { width: 100, height: 50 };
// Create a point at the top left corner of the rectangle
-const point = { x: 1, y: 1, useRawPixels: true };
+const point = { x: 1, y: 1 };
// Create an icon point that will track the point on this rectangle when it moves/rotates
const tlPoint = new IconPoint(rectangle, bounds, point);
@@ -173,7 +173,7 @@
Example:
-
constructor(pPoint: PositionalPoint, pBounds: Bounds, pIconPoint: PositionalPoint)
+
constructor(pPoint: Point, pBounds: Bounds, pIconPoint: PositionalPoint)
-
The logger module this module uses to log errors / logs
+
An object storing the position of the point that was set.
@@ -301,13 +301,13 @@
Example:
-
point: PositionalPoint
+
logger: Logger
-
An object storing the point's position with rotation taken into account.
+
The logger module this module uses to log errors / logs
@@ -330,13 +330,13 @@
Example:
-
positionalPoint: PositionalPoint
+
point: Point
-
An object storing the position of the rectangle
+
An object storing the point's position with rotation taken into account.
@@ -359,13 +359,13 @@
Example:
-
rawPixelsPoint: PositionalPoint
+
positionalPoint: Point
-
An object storing the raw pixel position
+
An object storing the position of the rectangle.
@@ -395,13 +395,71 @@
Example:
-
getPoint(pAngle: number, pOffset: Offset): object
+
getPoint(pAngle: number, pOffset: Offset, pAnchor: Anchor): object
+
+
+
+
+
+
Gets the new point's position inside a rectangle after taking pAngle into account.
+
+
+
+
+
+
+ |
+
+
+
+ public
+
+
+
+
+ |
+
+
+
+
+
+ Updates the bounds of the rectangle this icon point exists inside/outside of.
+
+
+ |
+
+
+
+ |
+
+
+
+ public
+
+
+
+
+ |
+
+
- Gets the new point's position inside a rectangle after taking pAngle into account
+ Changes the icon point position.
|
@@ -465,7 +523,7 @@
@@ -509,7 +567,7 @@
@@ -553,11 +611,11 @@
- constructor(pPoint: PositionalPoint, pBounds: Bounds, pIconPoint: PositionalPoint)
+ constructor(pPoint: Point, pBounds: Bounds, pIconPoint: PositionalPoint)
- source
+ source
@@ -578,23 +636,23 @@ Params:
pPoint |
- PositionalPoint |
+ Point |
|
- The rectangle this icon point exists inside/outside of
+ | The rectangle this icon point exists inside/outside of.
|
pBounds |
Bounds |
|
- The size of the rectangle
+ | The size of the rectangle.
|
pIconPoint |
PositionalPoint |
|
- The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle
+ | The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.
|
@@ -634,7 +692,7 @@
@@ -680,7 +738,7 @@
@@ -713,25 +771,31 @@
-
+
private
- logger: Logger
+ iconPoint: Point
- source
+ source
- The logger module this module uses to log errors / logs
+
An object storing the position of the point that was set. This is the point on the rectangle.
+It can be changed at runtime.
+
+
| |
+ | x |
+ | |
+ |___|
@@ -757,25 +821,25 @@
-
+
private
- point: PositionalPoint
+ logger: Logger
- source
+ source
- An object storing the point's position with rotation taken into account.
+
The logger module this module uses to log errors / logs
@@ -801,25 +865,25 @@
-
+
private
- positionalPoint: PositionalPoint
+ point: Point
- source
+ source
- An object storing the position of the rectangle
+
An object storing the point's position with rotation taken into account.
@@ -845,25 +909,25 @@
-
+
private
- rawPixelsPoint: PositionalPoint
+ positionalPoint: Point
- source
+ source
- An object storing the raw pixel position
+
An object storing the position of the rectangle.
@@ -899,18 +963,18 @@
- getPoint(pAngle: number, pOffset: Offset): object
+ getPoint(pAngle: number, pOffset: Offset, pAnchor: Anchor): object
- source
+ source
-
Gets the new point's position inside a rectangle after taking pAngle into account
+
Gets the new point's position inside a rectangle after taking pAngle into account.
@@ -928,7 +992,7 @@
Params:
number |
|
-
Rotation of the rectangle this point exists inside/outside of in radians
+ | Rotation of the rectangle this point exists inside/outside of in radians.
|
@@ -936,7 +1000,15 @@ Params:
Offset |
- optional
- default: { x: 0, y: 0 }
|
- The offset of the rectangle
+ | The offset of the rectangle.
+ |
+
+
+ pAnchor |
+ Anchor |
+ - optional
+- default: { x: 0.5, y: 0.5}
|
+ The anchor origin of the rectangle.
|
@@ -977,7 +1049,7 @@
Example:
// Make the dimensions of the rectangle 100x50
const bounds = { width: 100, height: 50 };
// Create a point at the top left corner of the rectangle
-const point = { x: 1, y: 1, useRawPixels: true };
+const point = { x: 1, y: 1 };
// Create an icon point that will track the point on this rectangle when it moves/rotates
const tlPoint = new IconPoint(rectangle, bounds, point);
@@ -1005,6 +1077,128 @@
Example:
+
+
+
+ public
+
+
+
+
+
+ updateBounds(pBounds: *)
+
+
+
+ source
+
+
+
+
+
+
+
Updates the bounds of the rectangle this icon point exists inside/outside of.
+
+
+
+
+
+
Params:
+
+
+ Name | Type | Attribute | Description |
+
+
+
+
+ pBounds |
+ * |
+ |
+ The bounds to update the rectangle with.
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ public
+
+
+
+
+
+ updatePoint(pPoint: *)
+
+
+
+ source
+
+
+
+
+
+
+
Changes the icon point position.
+
+
+
+
+
+
Params:
+
+
+ Name | Type | Attribute | Description |
+
+
+
+
+ pPoint |
+ * |
+ |
+ The point to update this icon point with.
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Private Methods
@@ -1020,7 +1214,7 @@
@@ -1044,7 +1238,7 @@
Params:
pPoint |
PositionalPoint |
|
-
The point that exists inside/outside the rectangle
+ | The point that exists inside/outside the rectangle.
|
diff --git a/docs/class/es/icon-point.mjs~e.html b/docs/class/es/icon-point.mjs~e.html
index 85d9b6b..d4f7834 100644
--- a/docs/class/es/icon-point.mjs~e.html
+++ b/docs/class/es/icon-point.mjs~e.html
@@ -32,6 +32,7 @@
CIconPoint
Ce
Vi
+
Vt
@@ -43,7 +44,7 @@
- | source
+ | source
@@ -817,7 +818,7 @@
@@ -863,7 +864,7 @@
@@ -906,7 +907,7 @@
@@ -952,7 +953,7 @@
@@ -1011,7 +1012,7 @@
@@ -1054,7 +1055,7 @@
@@ -1113,7 +1114,7 @@
@@ -1172,7 +1173,7 @@
@@ -1231,7 +1232,7 @@
@@ -1290,7 +1291,7 @@
@@ -1349,7 +1350,7 @@
@@ -1408,7 +1409,7 @@
@@ -1451,7 +1452,7 @@
@@ -1510,7 +1511,7 @@
@@ -1569,7 +1570,7 @@
@@ -1635,7 +1636,7 @@
@@ -1706,7 +1707,7 @@
@@ -1771,7 +1772,7 @@
@@ -1830,7 +1831,7 @@
@@ -1895,7 +1896,7 @@
@@ -1954,7 +1955,7 @@
@@ -2013,7 +2014,7 @@
@@ -2072,7 +2073,7 @@
@@ -2131,7 +2132,7 @@
@@ -2190,7 +2191,7 @@
diff --git a/docs/file/es/icon-point.mjs.html b/docs/file/es/icon-point.mjs.html
index 6709e08..f08eb2d 100644
--- a/docs/file/es/icon-point.mjs.html
+++ b/docs/file/es/icon-point.mjs.html
@@ -37,7 +37,7 @@
es/icon-point.mjs
/*!
* icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint
- * Compiled Sun, 17 Nov 2024 16:33:36 UTC
+ * Compiled Mon, 18 Nov 2024 12:34:38 UTC
*
* icon-point is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
@@ -50,7 +50,6 @@
*
* Copyright 2024, Evitca Studio, All Rights Reserved
*/
-
/**
* The IconPoint class
* A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.
@@ -60,7 +59,7 @@
* // Make the dimensions of the rectangle 100x50
* const bounds = { width: 100, height: 50 };
* // Create a point at the top left corner of the rectangle
- * const point = { x: 1, y: 1, useRawPixels: true };
+ * const point = { x: 1, y: 1 };
* // Create an icon point that will track the point on this rectangle when it moves/rotates
* const tlPoint = new IconPoint(rectangle, bounds, point);
*/
@@ -83,88 +82,84 @@
*/
logger;
/**
- * An object storing the raw pixel position
+ * An object storing the position of the point that was set. This is the point on the rectangle.
+ * It can be changed at runtime.
+ * ________
+ * | |
+ * | x |
+ * | |
+ * |_______|
* @private
- * @type {PositionalPoint}
+ * @type {Point}
* @prop {number} x - The raw x pixel position of this point
* @prop {number} y - The raw y pixel position of this point
*/
- rawPixelsPoint = { x: 0, y: 0 };
+ iconPoint = { x: 0, y: 0 };
/**
- * An object storing the position of the rectangle
+ * An object storing the position of the rectangle.
* @private
- * @type {PositionalPoint}
- * @prop {number} x - The x position of the rectangle
- * @prop {number} y - The y position of the rectangle
+ * @type {Point}
+ * @prop {number} x - The x position of the rectangle.
+ * @prop {number} y - The y position of the rectangle.
*/
- positionalPoint = null;
+ positionalPoint;
/**
* An object storing the point's position with rotation taken into account.
* @private
- * @type {PositionalPoint}
- * @prop {number} x - The x position of the rectangle
- * @prop {number} y - The y position of the rectangle
+ * @type {Point}
+ * @prop {number} x - The x position of the point after rotation is applied.
+ * @prop {number} y - The y position of the point after rotation is applied.
*/
point = { x: 0, y: 0 };
/**
* An object storing the rectangle's size.
* @private
* @type {Bounds}
- * @prop {number} width - The width of the rectangle
- * @prop {number} height - The height of the rectangle
+ * @prop {number} width - The width of the rectangle.
+ * @prop {number} height - The height of the rectangle.
*/
bounds = { width: 32, height: 32 };
/**
- * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of
- * @prop {number} pPoint.x - The x coordinate of the rectangle
- * @prop {number} pPoint.y - The y coordinate of the rectangle
- * @param {Bounds} pBounds - The size of the rectangle
- * @prop {number} pBounds.width - The width of the rectangle
- * @prop {number} pBounds.height - The height of the rectangle
- * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle
- * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle
- * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle
- * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range
+ * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.
+ * @prop {number} pPoint.x - The x coordinate of the rectangle.
+ * @prop {number} pPoint.y - The y coordinate of the rectangle.
+ * @param {Bounds} pBounds - The size of the rectangle.
+ * @prop {number} pBounds.width - The width of the rectangle.
+ * @prop {number} pBounds.height - The height of the rectangle.
+ * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.
+ * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.
+ * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.
+ * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.
+ *
+ * ## Normalized
+ If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`
+ The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.
*/
constructor(pPoint, pBounds, pIconPoint) {
- // Check if the rectangle is a valid type
- if (typeof pPoint === 'object' && typeof pBounds === 'object' && pBounds.constructor === Object) {
- // Check if the rectangle has valid properties (x,y,width,height)
- if (typeof pPoint.x === 'number' && typeof pPoint.y === 'number' && typeof pBounds.width === 'number' && typeof pBounds.height === 'number') {
- this.positionalPoint = pPoint;
- this.bounds.width = pBounds.width;
- this.bounds.height = pBounds.height;
- }
- else {
- this.logger.prefix('Icon-Point-Module').error('Invalid properties on pPoint or pBounds!');
- }
- }
- // Check if the point is a valid type
- if (typeof pIconPoint === 'object' && pIconPoint.constructor === Object) {
- // Check if the point has valid properties
- if (typeof pIconPoint.x === 'number' && typeof pIconPoint.y === 'number') {
- this.setPoint(pIconPoint);
- }
- else {
- this.logger.prefix('Icon-Point-Module').error('Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!');
- }
- }
+ const { width, height } = pBounds;
+ this.bounds.width = width;
+ this.bounds.height = height;
+ this.positionalPoint = pPoint;
+ this.setPoint(pIconPoint);
this.logger = new i();
this.logger.registerType('Icon-Point-Module', '#ff6600');
}
/**
- * Gets the new point's position inside a rectangle after taking pAngle into account
- * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians
- * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle
- * @prop {number} pOffset.x - The x offset of the rectangle
- * @prop {number} pOffset.y - The y offset of the rectangle
+ * Gets the new point's position inside a rectangle after taking pAngle into account.
+ * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.
+ * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.
+ * @prop {number} pOffset.x - The x offset of the rectangle.
+ * @prop {number} pOffset.y - The y offset of the rectangle.
+ * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.
+ * @prop {number} pAnchor.x - The x anchor of the rectangle.
+ * @prop {number} pAnchor.y - The y anchor of the rectangle.
* @example <caption>Example usage of this method</caption>
* // Create a rectangle at the position of (0,0)
* const rectangle = { x: 0, y: 0 };
* // Make the dimensions of the rectangle 100x50
* const bounds = { width: 100, height: 50 };
* // Create a point at the top left corner of the rectangle
- * const point = { x: 1, y: 1, useRawPixels: true };
+ * const point = { x: 1, y: 1 };
* // Create an icon point that will track the point on this rectangle when it moves/rotates
* const tlPoint = new IconPoint(rectangle, bounds, point);
*
@@ -189,8 +184,6 @@
* @returns {object} The point inside/outside of the rectangle after rotating.
*/
getPoint(pAngle = 0, pOffset = IconPoint.defaultOffset, pAnchor = IconPoint.defaultAnchor) {
- if (!this.positionalPoint)
- return;
// cx, cy - center of square coordinates
// x, y - coordinates of a corner point of the square
// angle is the angle of rotation
@@ -198,8 +191,8 @@
const cy = (this.positionalPoint.y + pOffset.y) + this.bounds.height * pAnchor.y;
// We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle
// Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates
- const pointX = (this.positionalPoint.x + pOffset.x - 1) + this.rawPixelsPoint.x;
- const pointY = (this.positionalPoint.y + pOffset.y - 1) + this.rawPixelsPoint.y;
+ const pointX = (this.positionalPoint.x + pOffset.x - 1) + this.iconPoint.x;
+ const pointY = (this.positionalPoint.y + pOffset.y - 1) + this.iconPoint.y;
// translate point to origin
const tempX = pointX - cx;
const tempY = pointY - cy;
@@ -216,13 +209,36 @@
/**
* Sets the static point and defines the raw pixels value
* @private
- * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle
- * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle
- * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle
+ * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.
+ * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.
+ * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.
+ * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.
*/
setPoint(pPoint) {
- this.rawPixelsPoint.x = pPoint.useRawPixels ? pPoint.x : pPoint.x * this.bounds.width;
- this.rawPixelsPoint.y = pPoint.useRawPixels ? pPoint.y : pPoint.y * this.bounds.height;
+ const { x, y, isNormalized } = pPoint;
+ this.iconPoint.x = isNormalized ? x * this.bounds.width : x;
+ this.iconPoint.y = isNormalized ? y * this.bounds.height : y;
+ }
+ /**
+ * Updates the bounds of the rectangle this icon point exists inside/outside of.
+ * @param pBounds - The bounds to update the rectangle with.
+ * @prop {number} pBounds.width - The width of the new rectangle.
+ * @prop {number} pBounds.height - The height of the new rectangle.
+ */
+ updateBounds(pBounds) {
+ const { width, height } = pBounds;
+ this.bounds.width = width;
+ this.bounds.height = height;
+ }
+ /**
+ * Changes the icon point position.
+ * @param pPoint - The point to update this icon point with.
+ * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.
+ * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.
+ * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.
+ */
+ updatePoint(pPoint) {
+ this.setPoint(pPoint);
}
}
diff --git a/docs/index.json b/docs/index.json
index d2f74ff..f2bdc14 100644
--- a/docs/index.json
+++ b/docs/index.json
@@ -567,7 +567,7 @@
"__docId__": 48,
"kind": "file",
"name": "es/icon-point.mjs",
- "content": "/*!\n * icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint\n * Compiled Sun, 17 Nov 2024 16:33:36 UTC\n *\n * icon-point is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\n/**\n * logger@1.0.0 git+https://github.com/EvitcaStudio/Logger\n * Compiled 1/9/2024, 7:19:18 AM UTC\n * \n * logger is licensed under a MIT styled License. See LICENSE.md for more info.\n * \n * Copyright 2024, Evitca Studio, All Rights Reserved\n */\n\n/**\n * The IconPoint class\n * A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.\n * @example Example usage of this class\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n */\nclass IconPoint {\n /**\n * Static offset to use when none is passed.\n */\n static defaultOffset = { x: 0, y: 0 };\n /**\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n */\n static defaultAnchor = { x: 0.5, y: 0.5 };\n /**\n * The version of the module.\n */\n version = \"1.0.0\";\n /** The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n */\n logger;\n /**\n * An object storing the raw pixel position\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n */\n rawPixelsPoint = { x: 0, y: 0 };\n /**\n * An object storing the position of the rectangle\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n */\n positionalPoint = null;\n /**\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {PositionalPoint}\n * @prop {number} x - The x position of the rectangle\n * @prop {number} y - The y position of the rectangle\n */\n point = { x: 0, y: 0 };\n /**\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle\n * @prop {number} height - The height of the rectangle\n */\n bounds = { width: 32, height: 32 };\n /**\n * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of\n * @prop {number} pPoint.x - The x coordinate of the rectangle\n * @prop {number} pPoint.y - The y coordinate of the rectangle\n * @param {Bounds} pBounds - The size of the rectangle\n * @prop {number} pBounds.width - The width of the rectangle\n * @prop {number} pBounds.height - The height of the rectangle\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle\n * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range\n */\n constructor(pPoint, pBounds, pIconPoint) {\n // Check if the rectangle is a valid type\n if (typeof pPoint === 'object' && typeof pBounds === 'object' && pBounds.constructor === Object) {\n // Check if the rectangle has valid properties (x,y,width,height)\n if (typeof pPoint.x === 'number' && typeof pPoint.y === 'number' && typeof pBounds.width === 'number' && typeof pBounds.height === 'number') {\n this.positionalPoint = pPoint;\n this.bounds.width = pBounds.width;\n this.bounds.height = pBounds.height;\n }\n else {\n this.logger.prefix('Icon-Point-Module').error('Invalid properties on pPoint or pBounds!');\n }\n }\n // Check if the point is a valid type\n if (typeof pIconPoint === 'object' && pIconPoint.constructor === Object) {\n // Check if the point has valid properties\n if (typeof pIconPoint.x === 'number' && typeof pIconPoint.y === 'number') {\n this.setPoint(pIconPoint);\n }\n else {\n this.logger.prefix('Icon-Point-Module').error('Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!');\n }\n }\n this.logger = new i();\n this.logger.registerType('Icon-Point-Module', '#ff6600');\n }\n /**\n * Gets the new point's position inside a rectangle after taking pAngle into account\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle\n * @prop {number} pOffset.x - The x offset of the rectangle\n * @prop {number} pOffset.y - The y offset of the rectangle\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1, useRawPixels: true };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n */\n getPoint(pAngle = 0, pOffset = IconPoint.defaultOffset, pAnchor = IconPoint.defaultAnchor) {\n if (!this.positionalPoint)\n return;\n // cx, cy - center of square coordinates \n // x, y - coordinates of a corner point of the square\n // angle is the angle of rotation\n const cx = (this.positionalPoint.x + pOffset.x) + this.bounds.width * pAnchor.x;\n const cy = (this.positionalPoint.y + pOffset.y) + this.bounds.height * pAnchor.y;\n // We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle\n // Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates\n const pointX = (this.positionalPoint.x + pOffset.x - 1) + this.rawPixelsPoint.x;\n const pointY = (this.positionalPoint.y + pOffset.y - 1) + this.rawPixelsPoint.y;\n // translate point to origin\n const tempX = pointX - cx;\n const tempY = pointY - cy;\n // now apply rotation\n const rotatedX = tempX * Math.cos(pAngle) - tempY * -Math.sin(pAngle);\n const rotatedY = tempX * -Math.sin(pAngle) + tempY * Math.cos(pAngle);\n // translate back\n const x = rotatedX + cx;\n const y = rotatedY + cy;\n this.point.x = x;\n this.point.y = y;\n return this.point;\n }\n /**\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle\n */\n setPoint(pPoint) {\n this.rawPixelsPoint.x = pPoint.useRawPixels ? pPoint.x : pPoint.x * this.bounds.width;\n this.rawPixelsPoint.y = pPoint.useRawPixels ? pPoint.y : pPoint.y * this.bounds.height;\n }\n}\n\nexport { IconPoint };\n//# sourceMappingURL=icon-point.mjs.map\n",
+ "content": "/*!\n * icon-point@1.0.0 https://github.com/EvitcaStudio/IconPoint\n * Compiled Mon, 18 Nov 2024 12:34:38 UTC\n *\n * icon-point is licensed under the MIT License.\n * http://www.opensource.org/licenses/mit-license\n */\n/**\n * logger@1.0.0 git+https://github.com/EvitcaStudio/Logger\n * Compiled 1/9/2024, 7:19:18 AM UTC\n * \n * logger is licensed under a MIT styled License. See LICENSE.md for more info.\n * \n * Copyright 2024, Evitca Studio, All Rights Reserved\n */\n/**\n * The IconPoint class\n * A point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.\n * @example Example usage of this class\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n */\nclass IconPoint {\n /**\n * Static offset to use when none is passed.\n */\n static defaultOffset = { x: 0, y: 0 };\n /**\n * Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.\n */\n static defaultAnchor = { x: 0.5, y: 0.5 };\n /**\n * The version of the module.\n */\n version = \"1.0.0\";\n /** The logger module this module uses to log errors / logs\n * @private\n * @type {Logger}\n */\n logger;\n /**\n * An object storing the position of the point that was set. This is the point on the rectangle.\n * It can be changed at runtime.\n * ________\n * | |\n * | x |\n * | |\n * |_______|\n * @private\n * @type {Point}\n * @prop {number} x - The raw x pixel position of this point\n * @prop {number} y - The raw y pixel position of this point\n */\n iconPoint = { x: 0, y: 0 };\n /**\n * An object storing the position of the rectangle.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the rectangle.\n * @prop {number} y - The y position of the rectangle.\n */\n positionalPoint;\n /**\n * An object storing the point's position with rotation taken into account.\n * @private\n * @type {Point}\n * @prop {number} x - The x position of the point after rotation is applied.\n * @prop {number} y - The y position of the point after rotation is applied.\n */\n point = { x: 0, y: 0 };\n /**\n * An object storing the rectangle's size.\n * @private\n * @type {Bounds}\n * @prop {number} width - The width of the rectangle.\n * @prop {number} height - The height of the rectangle.\n */\n bounds = { width: 32, height: 32 };\n /**\n * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.\n * @prop {number} pPoint.x - The x coordinate of the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the rectangle.\n * @param {Bounds} pBounds - The size of the rectangle.\n * @prop {number} pBounds.width - The width of the rectangle.\n * @prop {number} pBounds.height - The height of the rectangle.\n * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.\n * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.\n *\n * ## Normalized\n If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`\n The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.\n */\n constructor(pPoint, pBounds, pIconPoint) {\n const { width, height } = pBounds;\n this.bounds.width = width;\n this.bounds.height = height;\n this.positionalPoint = pPoint;\n this.setPoint(pIconPoint);\n this.logger = new i();\n this.logger.registerType('Icon-Point-Module', '#ff6600');\n }\n /**\n * Gets the new point's position inside a rectangle after taking pAngle into account.\n * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.\n * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.\n * @prop {number} pOffset.x - The x offset of the rectangle.\n * @prop {number} pOffset.y - The y offset of the rectangle.\n * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.\n * @prop {number} pAnchor.x - The x anchor of the rectangle.\n * @prop {number} pAnchor.y - The y anchor of the rectangle.\n * @example Example usage of this method\n * // Create a rectangle at the position of (0,0)\n * const rectangle = { x: 0, y: 0 };\n * // Make the dimensions of the rectangle 100x50\n * const bounds = { width: 100, height: 50 };\n * // Create a point at the top left corner of the rectangle\n * const point = { x: 1, y: 1 };\n * // Create an icon point that will track the point on this rectangle when it moves/rotates\n * const tlPoint = new IconPoint(rectangle, bounds, point);\n *\n * // Verify the point is where it should be\n * console.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n *\n * // Changing the position of the rectangle\n * rectangle.x += 100;\n * // Verify the point is where it should be after the rectangle changes positions\n * console.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n *\n * // Applying some offsets to the rectangle\n * const rectangleOffsets = { x: 25, y: 25 };\n * // Verify the point is where it should be after offsets have been applied to the rectangle\n * console.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n *\n * // Applying some rotation to the rectangle\n * const angle = Math.PI;\n * // Verify the point is where it should be after rotating the rectangle by `angle`\n * console.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`.\n *\n * @returns {object} The point inside/outside of the rectangle after rotating.\n */\n getPoint(pAngle = 0, pOffset = IconPoint.defaultOffset, pAnchor = IconPoint.defaultAnchor) {\n // cx, cy - center of square coordinates \n // x, y - coordinates of a corner point of the square\n // angle is the angle of rotation\n const cx = (this.positionalPoint.x + pOffset.x) + this.bounds.width * pAnchor.x;\n const cy = (this.positionalPoint.y + pOffset.y) + this.bounds.height * pAnchor.y;\n // We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle\n // Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates\n const pointX = (this.positionalPoint.x + pOffset.x - 1) + this.iconPoint.x;\n const pointY = (this.positionalPoint.y + pOffset.y - 1) + this.iconPoint.y;\n // translate point to origin\n const tempX = pointX - cx;\n const tempY = pointY - cy;\n // now apply rotation\n const rotatedX = tempX * Math.cos(pAngle) - tempY * -Math.sin(pAngle);\n const rotatedY = tempX * -Math.sin(pAngle) + tempY * Math.cos(pAngle);\n // translate back\n const x = rotatedX + cx;\n const y = rotatedY + cy;\n this.point.x = x;\n this.point.y = y;\n return this.point;\n }\n /**\n * Sets the static point and defines the raw pixels value\n * @private\n * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n */\n setPoint(pPoint) {\n const { x, y, isNormalized } = pPoint;\n this.iconPoint.x = isNormalized ? x * this.bounds.width : x;\n this.iconPoint.y = isNormalized ? y * this.bounds.height : y;\n }\n /**\n * Updates the bounds of the rectangle this icon point exists inside/outside of.\n * @param pBounds - The bounds to update the rectangle with.\n * @prop {number} pBounds.width - The width of the new rectangle.\n * @prop {number} pBounds.height - The height of the new rectangle.\n */\n updateBounds(pBounds) {\n const { width, height } = pBounds;\n this.bounds.width = width;\n this.bounds.height = height;\n }\n /**\n * Changes the icon point position.\n * @param pPoint - The point to update this icon point with.\n * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.\n * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.\n * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.\n */\n updatePoint(pPoint) {\n this.setPoint(pPoint);\n }\n}\n\nexport { IconPoint };\n//# sourceMappingURL=icon-point.mjs.map\n",
"static": true,
"longname": "C:/Users/jared/Documents/Github/Icon Point/dist/es/icon-point.mjs",
"access": "public",
@@ -587,9 +587,9 @@
"importStyle": "{IconPoint}",
"description": "The IconPoint class\nA point that exists inside/outside a virtual rectangle. The point's position inside/outside of the rectangle is maintained when the rectangle is rotated.",
"examples": [
- "Example usage of this class\n// Create a rectangle at the position of (0,0)\nconst rectangle = { x: 0, y: 0 };\n// Make the dimensions of the rectangle 100x50\nconst bounds = { width: 100, height: 50 };\n// Create a point at the top left corner of the rectangle\nconst point = { x: 1, y: 1, useRawPixels: true };\n// Create an icon point that will track the point on this rectangle when it moves/rotates\nconst tlPoint = new IconPoint(rectangle, bounds, point);"
+ "Example usage of this class\n// Create a rectangle at the position of (0,0)\nconst rectangle = { x: 0, y: 0 };\n// Make the dimensions of the rectangle 100x50\nconst bounds = { width: 100, height: 50 };\n// Create a point at the top left corner of the rectangle\nconst point = { x: 1, y: 1 };\n// Create an icon point that will track the point on this rectangle when it moves/rotates\nconst tlPoint = new IconPoint(rectangle, bounds, point);"
],
- "lineNumber": 30,
+ "lineNumber": 29,
"interface": false
},
{
@@ -601,7 +601,7 @@
"longname": "es/icon-point.mjs~IconPoint.defaultOffset",
"access": "public",
"description": "Static offset to use when none is passed.",
- "lineNumber": 34,
+ "lineNumber": 33,
"type": {
"types": [
"*"
@@ -617,7 +617,7 @@
"longname": "es/icon-point.mjs~IconPoint.defaultAnchor",
"access": "public",
"description": "Static anchor to use when none is passed. Default value of 0.5 signifies the anchor stars in the middle.",
- "lineNumber": 38,
+ "lineNumber": 37,
"type": {
"types": [
"*"
@@ -633,7 +633,7 @@
"longname": "es/icon-point.mjs~IconPoint#version",
"access": "public",
"description": "The version of the module.",
- "lineNumber": 42,
+ "lineNumber": 41,
"type": {
"types": [
"*"
@@ -649,7 +649,7 @@
"longname": "es/icon-point.mjs~IconPoint#logger",
"access": "private",
"description": "The logger module this module uses to log errors / logs",
- "lineNumber": 47,
+ "lineNumber": 46,
"type": {
"nullable": null,
"types": [
@@ -662,13 +662,13 @@
{
"__docId__": 54,
"kind": "member",
- "name": "rawPixelsPoint",
+ "name": "iconPoint",
"memberof": "es/icon-point.mjs~IconPoint",
"static": false,
- "longname": "es/icon-point.mjs~IconPoint#rawPixelsPoint",
+ "longname": "es/icon-point.mjs~IconPoint#iconPoint",
"access": "private",
- "description": "An object storing the raw pixel position",
- "lineNumber": 55,
+ "description": "An object storing the position of the point that was set. This is the point on the rectangle.\nIt can be changed at runtime.\n ________\n | |\n | x |\n | |\n |_______|",
+ "lineNumber": 60,
"unknown": [
{
"tagName": "@prop",
@@ -682,7 +682,7 @@
"type": {
"nullable": null,
"types": [
- "PositionalPoint"
+ "Point"
],
"spread": false,
"description": null
@@ -696,22 +696,22 @@
"static": false,
"longname": "es/icon-point.mjs~IconPoint#positionalPoint",
"access": "private",
- "description": "An object storing the position of the rectangle",
- "lineNumber": 63,
+ "description": "An object storing the position of the rectangle.",
+ "lineNumber": 68,
"unknown": [
{
"tagName": "@prop",
- "tagValue": "{number} x - The x position of the rectangle"
+ "tagValue": "{number} x - The x position of the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} y - The y position of the rectangle"
+ "tagValue": "{number} y - The y position of the rectangle."
}
],
"type": {
"nullable": null,
"types": [
- "PositionalPoint"
+ "Point"
],
"spread": false,
"description": null
@@ -726,21 +726,21 @@
"longname": "es/icon-point.mjs~IconPoint#point",
"access": "private",
"description": "An object storing the point's position with rotation taken into account.",
- "lineNumber": 71,
+ "lineNumber": 76,
"unknown": [
{
"tagName": "@prop",
- "tagValue": "{number} x - The x position of the rectangle"
+ "tagValue": "{number} x - The x position of the point after rotation is applied."
},
{
"tagName": "@prop",
- "tagValue": "{number} y - The y position of the rectangle"
+ "tagValue": "{number} y - The y position of the point after rotation is applied."
}
],
"type": {
"nullable": null,
"types": [
- "PositionalPoint"
+ "Point"
],
"spread": false,
"description": null
@@ -755,15 +755,15 @@
"longname": "es/icon-point.mjs~IconPoint#bounds",
"access": "private",
"description": "An object storing the rectangle's size.",
- "lineNumber": 79,
+ "lineNumber": 84,
"unknown": [
{
"tagName": "@prop",
- "tagValue": "{number} width - The width of the rectangle"
+ "tagValue": "{number} width - The width of the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} height - The height of the rectangle"
+ "tagValue": "{number} height - The height of the rectangle."
}
],
"type": {
@@ -786,47 +786,47 @@
"longname": "es/icon-point.mjs~IconPoint#constructor",
"access": "public",
"description": "",
- "lineNumber": 92,
+ "lineNumber": 101,
"unknown": [
{
"tagName": "@prop",
- "tagValue": "{number} pPoint.x - The x coordinate of the rectangle"
+ "tagValue": "{number} pPoint.x - The x coordinate of the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} pPoint.y - The y coordinate of the rectangle"
+ "tagValue": "{number} pPoint.y - The y coordinate of the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} pBounds.width - The width of the rectangle"
+ "tagValue": "{number} pBounds.width - The width of the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} pBounds.height - The height of the rectangle"
+ "tagValue": "{number} pBounds.height - The height of the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle"
+ "tagValue": "{number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle"
+ "tagValue": "{number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range"
+ "tagValue": "{boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.\n\n## Normalized\nIf you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`\nThe calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values."
}
],
"params": [
{
"nullable": null,
"types": [
- "PositionalPoint"
+ "Point"
],
"spread": false,
"optional": false,
"name": "pPoint",
- "description": "The rectangle this icon point exists inside/outside of"
+ "description": "The rectangle this icon point exists inside/outside of."
},
{
"nullable": null,
@@ -836,7 +836,7 @@
"spread": false,
"optional": false,
"name": "pBounds",
- "description": "The size of the rectangle"
+ "description": "The size of the rectangle."
},
{
"nullable": null,
@@ -846,7 +846,7 @@
"spread": false,
"optional": false,
"name": "pIconPoint",
- "description": "The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle"
+ "description": "The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle."
}
]
},
@@ -860,19 +860,27 @@
"static": false,
"longname": "es/icon-point.mjs~IconPoint#getPoint",
"access": "public",
- "description": "Gets the new point's position inside a rectangle after taking pAngle into account",
+ "description": "Gets the new point's position inside a rectangle after taking pAngle into account.",
"examples": [
- "Example usage of this method\n// Create a rectangle at the position of (0,0)\nconst rectangle = { x: 0, y: 0 };\n// Make the dimensions of the rectangle 100x50\nconst bounds = { width: 100, height: 50 };\n// Create a point at the top left corner of the rectangle\nconst point = { x: 1, y: 1, useRawPixels: true };\n// Create an icon point that will track the point on this rectangle when it moves/rotates\nconst tlPoint = new IconPoint(rectangle, bounds, point);\n\n// Verify the point is where it should be\nconsole.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n\n// Changing the position of the rectangle\nrectangle.x += 100;\n// Verify the point is where it should be after the rectangle changes positions\nconsole.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n\n// Applying some offsets to the rectangle\nconst rectangleOffsets = { x: 25, y: 25 };\n// Verify the point is where it should be after offsets have been applied to the rectangle\nconsole.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n\n// Applying some rotation to the rectangle\nconst angle = Math.PI;\n// Verify the point is where it should be after rotating the rectangle by `angle`\nconsole.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`."
+ "Example usage of this method\n// Create a rectangle at the position of (0,0)\nconst rectangle = { x: 0, y: 0 };\n// Make the dimensions of the rectangle 100x50\nconst bounds = { width: 100, height: 50 };\n// Create a point at the top left corner of the rectangle\nconst point = { x: 1, y: 1 };\n// Create an icon point that will track the point on this rectangle when it moves/rotates\nconst tlPoint = new IconPoint(rectangle, bounds, point);\n\n// Verify the point is where it should be\nconsole.log(tlPoint.getPoint()) // { x: 0, y: 0 } This shows that the point is at the position (0,0) which is the top left position of the rectangle\n\n// Changing the position of the rectangle\nrectangle.x += 100;\n// Verify the point is where it should be after the rectangle changes positions\nconsole.log(tlPoint.getPoint()) // { x: 100, y: 0 } This shows that the point has moved to the updated position of the rectangle\n\n// Applying some offsets to the rectangle\nconst rectangleOffsets = { x: 25, y: 25 };\n// Verify the point is where it should be after offsets have been applied to the rectangle\nconsole.log(tlPoint.getPoint(undefined, rectangleOffsets)) // { x: 125, y: 25 } This shows that the point has moved to the updated position based on the offsets of the rectangle\n\n// Applying some rotation to the rectangle\nconst angle = Math.PI;\n// Verify the point is where it should be after rotating the rectangle by `angle`\nconsole.log(tlPoint.getPoint(angle)) // {x: 200, y: 50.00000000000001} This shows that the point has moved to the updated position after the rectangle had been rotated by `angle`."
],
- "lineNumber": 154,
+ "lineNumber": 149,
"unknown": [
{
"tagName": "@prop",
- "tagValue": "{number} pOffset.x - The x offset of the rectangle"
+ "tagValue": "{number} pOffset.x - The x offset of the rectangle."
+ },
+ {
+ "tagName": "@prop",
+ "tagValue": "{number} pOffset.y - The y offset of the rectangle."
+ },
+ {
+ "tagName": "@prop",
+ "tagValue": "{number} pAnchor.x - The x anchor of the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} pOffset.y - The y offset of the rectangle"
+ "tagValue": "{number} pAnchor.y - The y anchor of the rectangle."
},
{
"tagName": "@returns",
@@ -890,7 +898,7 @@
"defaultValue": "0",
"defaultRaw": 0,
"name": "pAngle",
- "description": "Rotation of the rectangle this point exists inside/outside of in radians"
+ "description": "Rotation of the rectangle this point exists inside/outside of in radians."
},
{
"nullable": null,
@@ -902,7 +910,19 @@
"defaultValue": "{ x: 0, y: 0 }",
"defaultRaw": "{ x: 0, y: 0 }",
"name": "pOffset",
- "description": "The offset of the rectangle"
+ "description": "The offset of the rectangle."
+ },
+ {
+ "nullable": null,
+ "types": [
+ "Anchor"
+ ],
+ "spread": false,
+ "optional": true,
+ "defaultValue": "{ x: 0.5, y: 0.5}",
+ "defaultRaw": "{ x: 0.5, y: 0.5}",
+ "name": "pAnchor",
+ "description": "The anchor origin of the rectangle."
}
],
"return": {
@@ -925,15 +945,19 @@
"longname": "es/icon-point.mjs~IconPoint#setPoint",
"access": "private",
"description": "Sets the static point and defines the raw pixels value",
- "lineNumber": 186,
+ "lineNumber": 180,
"unknown": [
{
"tagName": "@prop",
- "tagValue": "{number} pPoint.x - The x coordinate of the point inside/outside the rectangle"
+ "tagValue": "{number} pPoint.x - The x coordinate of the point inside/outside the rectangle."
},
{
"tagName": "@prop",
- "tagValue": "{number} pPoint.y - The y coordinate of the point inside/outside the rectangle"
+ "tagValue": "{number} pPoint.y - The y coordinate of the point inside/outside the rectangle."
+ },
+ {
+ "tagName": "@prop",
+ "tagValue": "{boolean} [pPoint.isNormalized] - If the point's value is normalized."
}
],
"params": [
@@ -945,7 +969,83 @@
"spread": false,
"optional": false,
"name": "pPoint",
- "description": "The point that exists inside/outside the rectangle"
+ "description": "The point that exists inside/outside the rectangle."
+ }
+ ],
+ "return": null
+ },
+ {
+ "__docId__": 63,
+ "kind": "method",
+ "name": "updateBounds",
+ "memberof": "es/icon-point.mjs~IconPoint",
+ "generator": false,
+ "async": false,
+ "static": false,
+ "longname": "es/icon-point.mjs~IconPoint#updateBounds",
+ "access": "public",
+ "description": "Updates the bounds of the rectangle this icon point exists inside/outside of.",
+ "lineNumber": 191,
+ "unknown": [
+ {
+ "tagName": "@prop",
+ "tagValue": "{number} pBounds.width - The width of the new rectangle."
+ },
+ {
+ "tagName": "@prop",
+ "tagValue": "{number} pBounds.height - The height of the new rectangle."
+ }
+ ],
+ "params": [
+ {
+ "nullable": null,
+ "types": [
+ "*"
+ ],
+ "spread": false,
+ "optional": false,
+ "name": "pBounds",
+ "description": "The bounds to update the rectangle with."
+ }
+ ],
+ "return": null
+ },
+ {
+ "__docId__": 64,
+ "kind": "method",
+ "name": "updatePoint",
+ "memberof": "es/icon-point.mjs~IconPoint",
+ "generator": false,
+ "async": false,
+ "static": false,
+ "longname": "es/icon-point.mjs~IconPoint#updatePoint",
+ "access": "public",
+ "description": "Changes the icon point position.",
+ "lineNumber": 203,
+ "unknown": [
+ {
+ "tagName": "@prop",
+ "tagValue": "{number} pPoint.x - The x coordinate of the point inside/outside the rectangle."
+ },
+ {
+ "tagName": "@prop",
+ "tagValue": "{number} pPoint.y - The y coordinate of the point inside/outside the rectangle."
+ },
+ {
+ "tagName": "@prop",
+ "tagValue": "{boolean} [pPoint.isNormalized] - If the point's value is normalized."
+ }
+ ],
+ "params": [
+ {
+ "nullable": null,
+ "types": [
+ "*"
+ ],
+ "spread": false,
+ "optional": false,
+ "name": "pPoint",
+ "description": "The point to update this icon point with."
}
],
"return": null
diff --git a/docs/script/search_index.js b/docs/script/search_index.js
index eef7c03..ad78a60 100644
--- a/docs/script/search_index.js
+++ b/docs/script/search_index.js
@@ -311,6 +311,12 @@ window.esdocSearchIndex = [
"es/icon-point.mjs~IconPoint#getPoint",
"method"
],
+ [
+ "es/icon-point.mjs~iconpoint#iconpoint",
+ "class/es/icon-point.mjs~IconPoint.html#instance-member-iconPoint",
+ "es/icon-point.mjs~IconPoint#iconPoint",
+ "member"
+ ],
[
"es/icon-point.mjs~iconpoint#logger",
"class/es/icon-point.mjs~IconPoint.html#instance-member-logger",
@@ -329,18 +335,24 @@ window.esdocSearchIndex = [
"es/icon-point.mjs~IconPoint#positionalPoint",
"member"
],
- [
- "es/icon-point.mjs~iconpoint#rawpixelspoint",
- "class/es/icon-point.mjs~IconPoint.html#instance-member-rawPixelsPoint",
- "es/icon-point.mjs~IconPoint#rawPixelsPoint",
- "member"
- ],
[
"es/icon-point.mjs~iconpoint#setpoint",
"class/es/icon-point.mjs~IconPoint.html#instance-method-setPoint",
"es/icon-point.mjs~IconPoint#setPoint",
"method"
],
+ [
+ "es/icon-point.mjs~iconpoint#updatebounds",
+ "class/es/icon-point.mjs~IconPoint.html#instance-method-updateBounds",
+ "es/icon-point.mjs~IconPoint#updateBounds",
+ "method"
+ ],
+ [
+ "es/icon-point.mjs~iconpoint#updatepoint",
+ "class/es/icon-point.mjs~IconPoint.html#instance-method-updatePoint",
+ "es/icon-point.mjs~IconPoint#updatePoint",
+ "method"
+ ],
[
"es/icon-point.mjs~iconpoint#version",
"class/es/icon-point.mjs~IconPoint.html#instance-member-version",
diff --git a/docs/source.html b/docs/source.html
index 54581e9..2c259d3 100644
--- a/docs/source.html
+++ b/docs/source.html
@@ -53,9 +53,9 @@
es/icon-point.mjs |
IconPoint |
- |
- 9365 byte |
- 193 |
- 2024-11-01 16:38:41 (UTC) |
+ 9903 byte |
+ 209 |
+ 2024-11-02 12:34:48 (UTC) |
diff --git a/docs/variable/index.html b/docs/variable/index.html
index 9cf2310..e1f908a 100644
--- a/docs/variable/index.html
+++ b/docs/variable/index.html
@@ -32,6 +32,7 @@
CIconPoint
Ce
Vi
+Vt
@@ -67,6 +68,36 @@
+ |
+
+
+
+ public
+
+
+
+
+ |
+
+
+
+
+
+
+ t: {"d": *, "o": *}
+
+
+
+ |
+
+
+
|
@@ -86,7 +117,7 @@
@@ -116,6 +147,53 @@
+
+
+
+ public
+
+
+
+
+
+ t: {"d": *, "o": *}
+
+
+
+ source
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/package.json b/package.json
index 8655011..4f0bbec 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "icon-point",
- "version": "1.0.0",
+ "version": "1.1.0",
"author": "https://github.com/doubleactii",
"repository": {
"type": "git",
diff --git a/src/icon-point.ts b/src/icon-point.ts
index 4b13409..34cc322 100644
--- a/src/icon-point.ts
+++ b/src/icon-point.ts
@@ -1,9 +1,14 @@
import { Logger } from './vendor/logger.min.mjs';
+interface Point {
+ x: number;
+ y: number;
+}
+
interface PositionalPoint {
x: number;
y: number;
- useRawPixels?: boolean;
+ isNormalized?: boolean;
}
interface Offset {
@@ -30,7 +35,7 @@ interface Anchor {
* // Make the dimensions of the rectangle 100x50
* const bounds = { width: 100, height: 50 };
* // Create a point at the top left corner of the rectangle
- * const point = { x: 1, y: 1, useRawPixels: true };
+ * const point = { x: 1, y: 1 };
* // Create an icon point that will track the point on this rectangle when it moves/rotates
* const tlPoint = new IconPoint(rectangle, bounds, point);
*/
@@ -53,87 +58,87 @@ export class IconPoint {
*/
private logger: typeof Logger;
/**
- * An object storing the raw pixel position
+ * An object storing the position of the point that was set. This is the point on the rectangle.
+ * It can be changed at runtime.
+ * ________
+ * | |
+ * | x |
+ * | |
+ * |_______|
* @private
- * @type {PositionalPoint}
+ * @type {Point}
* @prop {number} x - The raw x pixel position of this point
* @prop {number} y - The raw y pixel position of this point
*/
- rawPixelsPoint: PositionalPoint = { x: 0, y: 0 };
+ iconPoint: Point = { x: 0, y: 0 };
/**
- * An object storing the position of the rectangle
+ * An object storing the position of the rectangle.
* @private
- * @type {PositionalPoint}
- * @prop {number} x - The x position of the rectangle
- * @prop {number} y - The y position of the rectangle
+ * @type {Point}
+ * @prop {number} x - The x position of the rectangle.
+ * @prop {number} y - The y position of the rectangle.
*/
- positionalPoint: PositionalPoint | null = null;
+ positionalPoint: Point;
/**
* An object storing the point's position with rotation taken into account.
* @private
- * @type {PositionalPoint}
- * @prop {number} x - The x position of the rectangle
- * @prop {number} y - The y position of the rectangle
+ * @type {Point}
+ * @prop {number} x - The x position of the point after rotation is applied.
+ * @prop {number} y - The y position of the point after rotation is applied.
*/
- point: PositionalPoint = { x: 0, y: 0 };
+ point: Point = { x: 0, y: 0 };
/**
* An object storing the rectangle's size.
* @private
* @type {Bounds}
- * @prop {number} width - The width of the rectangle
- * @prop {number} height - The height of the rectangle
+ * @prop {number} width - The width of the rectangle.
+ * @prop {number} height - The height of the rectangle.
*/
bounds: Bounds = { width: 32, height: 32 };
/**
- * @param {PositionalPoint} pPoint - The rectangle this icon point exists inside/outside of
- * @prop {number} pPoint.x - The x coordinate of the rectangle
- * @prop {number} pPoint.y - The y coordinate of the rectangle
- * @param {Bounds} pBounds - The size of the rectangle
- * @prop {number} pBounds.width - The width of the rectangle
- * @prop {number} pBounds.height - The height of the rectangle
- * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle
- * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle
- * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle
- * @prop {boolean} [pIconPoint.useRawPixels=false] - Whether or not this point is defined in raw pixels or in a normalized 0-1 range
+ * @param {Point} pPoint - The rectangle this icon point exists inside/outside of.
+ * @prop {number} pPoint.x - The x coordinate of the rectangle.
+ * @prop {number} pPoint.y - The y coordinate of the rectangle.
+ * @param {Bounds} pBounds - The size of the rectangle.
+ * @prop {number} pBounds.width - The width of the rectangle.
+ * @prop {number} pBounds.height - The height of the rectangle.
+ * @param {PositionalPoint} pIconPoint - The point that exists inside/outside the rectangle. This is in relative positioning to the rectangle.
+ * @prop {number} pIconPoint.x - The x coordinate of the point inside/outside the rectangle.
+ * @prop {number} pIconPoint.y - The y coordinate of the point inside/outside the rectangle.
+ * @prop {boolean} [pIconPoint.isNormalized=false] - Whether or not this point is normalized in a 0-1 range.
+ *
+ * ## Normalized
+ If you want to specify the point `(50, 50)` in a rectangle that is `100x100` using normalized values you would use `0.5`
+ The calculation will be `0.5 * 100` in both axis, which resolves to `(50, 50)`. This is just an easier way to assign the values.
*/
- constructor(pPoint: PositionalPoint, pBounds: Bounds, pIconPoint: PositionalPoint) {
- // Check if the rectangle is a valid type
- if (typeof pPoint === 'object' && typeof pBounds === 'object' && pBounds.constructor === Object) {
- // Check if the rectangle has valid properties (x,y,width,height)
- if (typeof pPoint.x === 'number' && typeof pPoint.y === 'number' && typeof pBounds.width === 'number' && typeof pBounds.height === 'number') {
- this.positionalPoint = pPoint;
- this.bounds.width = pBounds.width;
- this.bounds.height = pBounds.height;
- } else {
- this.logger.prefix('Icon-Point-Module').error('Invalid properties on pPoint or pBounds!');
- }
- }
- // Check if the point is a valid type
- if (typeof pIconPoint === 'object' && pIconPoint.constructor === Object) {
- // Check if the point has valid properties
- if (typeof pIconPoint.x === 'number' && typeof pIconPoint.y === 'number') {
- this.setPoint(pIconPoint);
- } else {
- this.logger.prefix('Icon-Point-Module').error('Parameter of wrong type: pPoint.point.x or pPoint.point.y is not a number!');
- }
- }
+ constructor(pPoint: Point, pBounds: Bounds, pIconPoint: PositionalPoint) {
+ const { width, height } = pBounds;
+ this.bounds.width = width;
+ this.bounds.height = height;
+
+ this.positionalPoint = pPoint;
+
+ this.setPoint(pIconPoint);
this.logger = new Logger();
this.logger.registerType('Icon-Point-Module', '#ff6600');
}
/**
- * Gets the new point's position inside a rectangle after taking pAngle into account
- * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians
- * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle
- * @prop {number} pOffset.x - The x offset of the rectangle
- * @prop {number} pOffset.y - The y offset of the rectangle
+ * Gets the new point's position inside a rectangle after taking pAngle into account.
+ * @param {number} [pAngle=0] - Rotation of the rectangle this point exists inside/outside of in radians.
+ * @param {Offset} [pOffset={ x: 0, y: 0 }] - The offset of the rectangle.
+ * @prop {number} pOffset.x - The x offset of the rectangle.
+ * @prop {number} pOffset.y - The y offset of the rectangle.
+ * @param {Anchor} [pAnchor={ x: 0.5, y: 0.5}] - The anchor origin of the rectangle.
+ * @prop {number} pAnchor.x - The x anchor of the rectangle.
+ * @prop {number} pAnchor.y - The y anchor of the rectangle.
* @example Example usage of this method
* // Create a rectangle at the position of (0,0)
* const rectangle = { x: 0, y: 0 };
* // Make the dimensions of the rectangle 100x50
* const bounds = { width: 100, height: 50 };
* // Create a point at the top left corner of the rectangle
- * const point = { x: 1, y: 1, useRawPixels: true };
+ * const point = { x: 1, y: 1 };
* // Create an icon point that will track the point on this rectangle when it moves/rotates
* const tlPoint = new IconPoint(rectangle, bounds, point);
*
@@ -157,8 +162,7 @@ export class IconPoint {
*
* @returns {object} The point inside/outside of the rectangle after rotating.
*/
- getPoint(pAngle: number=0, pOffset: Offset = IconPoint.defaultOffset, pAnchor: Anchor = IconPoint.defaultAnchor): PositionalPoint | void {
- if (!this.positionalPoint) return;
+ getPoint(pAngle: number=0, pOffset: Offset = IconPoint.defaultOffset, pAnchor: Anchor = IconPoint.defaultAnchor): Point | void {
// cx, cy - center of square coordinates
// x, y - coordinates of a corner point of the square
// angle is the angle of rotation
@@ -166,8 +170,8 @@ export class IconPoint {
const cy = (this.positionalPoint.y + pOffset.y) + this.bounds.height * pAnchor.y;
// We take away 1 from the position of the rectangle because we don't want to point to start inside the boundaries of the rectangle
// Otherwise we would have to use 0 to (rectangle.xy-1) for the points coordinates
- const pointX = (this.positionalPoint.x + pOffset.x - 1) + this.rawPixelsPoint.x;
- const pointY = (this.positionalPoint.y + pOffset.y - 1) + this.rawPixelsPoint.y;
+ const pointX = (this.positionalPoint.x + pOffset.x - 1) + this.iconPoint.x;
+ const pointY = (this.positionalPoint.y + pOffset.y - 1) + this.iconPoint.y;
// translate point to origin
const tempX = pointX - cx;
const tempY = pointY - cy;
@@ -184,12 +188,35 @@ export class IconPoint {
/**
* Sets the static point and defines the raw pixels value
* @private
- * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle
- * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle
- * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle
+ * @param {PositionalPoint} pPoint - The point that exists inside/outside the rectangle.
+ * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.
+ * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.
+ * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.
+ */
+ setPoint(pPoint: PositionalPoint): void {
+ const { x, y, isNormalized } = pPoint;
+ this.iconPoint.x = isNormalized ? x * this.bounds.width : x;
+ this.iconPoint.y = isNormalized ? y * this.bounds.height : y;
+ }
+ /**
+ * Updates the bounds of the rectangle this icon point exists inside/outside of.
+ * @param pBounds - The bounds to update the rectangle with.
+ * @prop {number} pBounds.width - The width of the new rectangle.
+ * @prop {number} pBounds.height - The height of the new rectangle.
+ */
+ updateBounds(pBounds: Bounds): void {
+ const { width, height } = pBounds;
+ this.bounds.width = width;
+ this.bounds.height = height;
+ }
+ /**
+ * Changes the icon point position.
+ * @param pPoint - The point to update this icon point with.
+ * @prop {number} pPoint.x - The x coordinate of the point inside/outside the rectangle.
+ * @prop {number} pPoint.y - The y coordinate of the point inside/outside the rectangle.
+ * @prop {boolean} [pPoint.isNormalized] - If the point's value is normalized.
*/
- setPoint(pPoint: PositionalPoint) {
- this.rawPixelsPoint.x = pPoint.useRawPixels ? pPoint.x : pPoint.x * this.bounds.width;
- this.rawPixelsPoint.y = pPoint.useRawPixels ? pPoint.y : pPoint.y * this.bounds.height;
+ updatePoint(pPoint: PositionalPoint): void {
+ this.setPoint(pPoint);
}
}
\ No newline at end of file