UNPKG

awv3

Version:
1,301 lines (1,300 loc) 521 kB
{ "type": "File", "start": 0, "end": 2121, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 53, "column": 0 } }, "program": { "type": "Program", "start": 0, "end": 2121, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 53, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 31, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 31 } }, "specifiers": [ { "type": "ImportNamespaceSpecifier", "start": 7, "end": 17, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 17 } }, "local": { "type": "Identifier", "start": 12, "end": 17, "loc": { "start": { "line": 1, "column": 12 }, "end": { "line": 1, "column": 17 }, "identifierName": "THREE" }, "name": "THREE" } } ], "source": { "type": "StringLiteral", "start": 23, "end": 30, "loc": { "start": { "line": 1, "column": 23 }, "end": { "line": 1, "column": 30 } }, "extra": { "rawValue": "three", "raw": "'three'" }, "value": "three" } }, { "type": "ExportDefaultDeclaration", "start": 33, "end": 2120, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 52, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 48, "end": 2120, "loc": { "start": { "line": 3, "column": 15 }, "end": { "line": 52, "column": 1 } }, "id": { "type": "Identifier", "start": 54, "end": 63, "loc": { "start": { "line": 3, "column": 21 }, "end": { "line": 3, "column": 30 }, "identifierName": "Workplane" }, "name": "Workplane" }, "superClass": { "type": "MemberExpression", "start": 72, "end": 86, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 53 } }, "object": { "type": "Identifier", "start": 72, "end": 77, "loc": { "start": { "line": 3, "column": 39 }, "end": { "line": 3, "column": 44 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 78, "end": 86, "loc": { "start": { "line": 3, "column": 45 }, "end": { "line": 3, "column": 53 }, "identifierName": "Object3D" }, "name": "Object3D" }, "computed": false }, "body": { "type": "ClassBody", "start": 87, "end": 2120, "loc": { "start": { "line": 3, "column": 54 }, "end": { "line": 52, "column": 1 } }, "body": [ { "type": "ClassMethod", "start": 93, "end": 1249, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 34, "column": 5 } }, "computed": false, "key": { "type": "Identifier", "start": 93, "end": 104, "loc": { "start": { "line": 4, "column": 4 }, "end": { "line": 4, "column": 15 }, "identifierName": "constructor" }, "name": "constructor" }, "static": false, "kind": "constructor", "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 107, "end": 1249, "loc": { "start": { "line": 4, "column": 18 }, "end": { "line": 34, "column": 5 } }, "body": [ { "type": "ExpressionStatement", "start": 117, "end": 125, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 16 } }, "expression": { "type": "CallExpression", "start": 117, "end": 124, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 15 } }, "callee": { "type": "Super", "start": 117, "end": 122, "loc": { "start": { "line": 5, "column": 8 }, "end": { "line": 5, "column": 13 } } }, "arguments": [] } }, { "type": "VariableDeclaration", "start": 135, "end": 188, "loc": { "start": { "line": 7, "column": 8 }, "end": { "line": 7, "column": 61 } }, "declarations": [ { "type": "VariableDeclarator", "start": 141, "end": 187, "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 60 } }, "id": { "type": "Identifier", "start": 141, "end": 149, "loc": { "start": { "line": 7, "column": 14 }, "end": { "line": 7, "column": 22 }, "identifierName": "geometry" }, "name": "geometry" }, "init": { "type": "NewExpression", "start": 152, "end": 187, "loc": { "start": { "line": 7, "column": 25 }, "end": { "line": 7, "column": 60 } }, "callee": { "type": "MemberExpression", "start": 156, "end": 181, "loc": { "start": { "line": 7, "column": 29 }, "end": { "line": 7, "column": 54 } }, "object": { "type": "Identifier", "start": 156, "end": 161, "loc": { "start": { "line": 7, "column": 29 }, "end": { "line": 7, "column": 34 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 162, "end": 181, "loc": { "start": { "line": 7, "column": 35 }, "end": { "line": 7, "column": 54 }, "identifierName": "PlaneBufferGeometry" }, "name": "PlaneBufferGeometry" }, "computed": false }, "arguments": [ { "type": "NumericLiteral", "start": 182, "end": 183, "loc": { "start": { "line": 7, "column": 55 }, "end": { "line": 7, "column": 56 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 }, { "type": "NumericLiteral", "start": 185, "end": 186, "loc": { "start": { "line": 7, "column": 58 }, "end": { "line": 7, "column": 59 } }, "extra": { "rawValue": 1, "raw": "1" }, "value": 1 } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 197, "end": 377, "loc": { "start": { "line": 8, "column": 8 }, "end": { "line": 13, "column": 11 } }, "declarations": [ { "type": "VariableDeclarator", "start": 203, "end": 376, "loc": { "start": { "line": 8, "column": 14 }, "end": { "line": 13, "column": 10 } }, "id": { "type": "Identifier", "start": 203, "end": 211, "loc": { "start": { "line": 8, "column": 14 }, "end": { "line": 8, "column": 22 }, "identifierName": "material" }, "name": "material" }, "init": { "type": "NewExpression", "start": 214, "end": 376, "loc": { "start": { "line": 8, "column": 25 }, "end": { "line": 13, "column": 10 } }, "callee": { "type": "MemberExpression", "start": 218, "end": 241, "loc": { "start": { "line": 8, "column": 29 }, "end": { "line": 8, "column": 52 } }, "object": { "type": "Identifier", "start": 218, "end": 223, "loc": { "start": { "line": 8, "column": 29 }, "end": { "line": 8, "column": 34 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 224, "end": 241, "loc": { "start": { "line": 8, "column": 35 }, "end": { "line": 8, "column": 52 }, "identifierName": "MeshBasicMaterial" }, "name": "MeshBasicMaterial" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 242, "end": 375, "loc": { "start": { "line": 8, "column": 53 }, "end": { "line": 13, "column": 9 } }, "properties": [ { "type": "ObjectProperty", "start": 256, "end": 271, "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 27 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 256, "end": 261, "loc": { "start": { "line": 9, "column": 12 }, "end": { "line": 9, "column": 17 }, "identifierName": "color" }, "name": "color" }, "value": { "type": "NumericLiteral", "start": 263, "end": 271, "loc": { "start": { "line": 9, "column": 19 }, "end": { "line": 9, "column": 27 } }, "extra": { "rawValue": 8421504, "raw": "0x808080" }, "value": 8421504 } }, { "type": "ObjectProperty", "start": 285, "end": 307, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 34 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 285, "end": 289, "loc": { "start": { "line": 10, "column": 12 }, "end": { "line": 10, "column": 16 }, "identifierName": "side" }, "name": "side" }, "value": { "type": "MemberExpression", "start": 291, "end": 307, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 10, "column": 34 } }, "object": { "type": "Identifier", "start": 291, "end": 296, "loc": { "start": { "line": 10, "column": 18 }, "end": { "line": 10, "column": 23 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 297, "end": 307, "loc": { "start": { "line": 10, "column": 24 }, "end": { "line": 10, "column": 34 }, "identifierName": "DoubleSide" }, "name": "DoubleSide" }, "computed": false } }, { "type": "ObjectProperty", "start": 321, "end": 338, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 29 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 321, "end": 332, "loc": { "start": { "line": 11, "column": 12 }, "end": { "line": 11, "column": 23 }, "identifierName": "transparent" }, "name": "transparent" }, "value": { "type": "BooleanLiteral", "start": 334, "end": 338, "loc": { "start": { "line": 11, "column": 25 }, "end": { "line": 11, "column": 29 } }, "value": true } }, { "type": "ObjectProperty", "start": 352, "end": 364, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 24 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 352, "end": 359, "loc": { "start": { "line": 12, "column": 12 }, "end": { "line": 12, "column": 19 }, "identifierName": "opacity" }, "name": "opacity" }, "value": { "type": "NumericLiteral", "start": 361, "end": 364, "loc": { "start": { "line": 12, "column": 21 }, "end": { "line": 12, "column": 24 } }, "extra": { "rawValue": 0.1, "raw": "0.1" }, "value": 0.1 } } ] } ] } } ], "kind": "const" }, { "type": "VariableDeclaration", "start": 387, "end": 436, "loc": { "start": { "line": 15, "column": 8 }, "end": { "line": 15, "column": 57 } }, "declarations": [ { "type": "VariableDeclarator", "start": 393, "end": 435, "loc": { "start": { "line": 15, "column": 14 }, "end": { "line": 15, "column": 56 } }, "id": { "type": "Identifier", "start": 393, "end": 398, "loc": { "start": { "line": 15, "column": 14 }, "end": { "line": 15, "column": 19 }, "identifierName": "plane" }, "name": "plane" }, "init": { "type": "NewExpression", "start": 401, "end": 435, "loc": { "start": { "line": 15, "column": 22 }, "end": { "line": 15, "column": 56 } }, "callee": { "type": "MemberExpression", "start": 405, "end": 415, "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 36 } }, "object": { "type": "Identifier", "start": 405, "end": 410, "loc": { "start": { "line": 15, "column": 26 }, "end": { "line": 15, "column": 31 }, "identifierName": "THREE" }, "name": "THREE" }, "property": { "type": "Identifier", "start": 411, "end": 415, "loc": { "start": { "line": 15, "column": 32 }, "end": { "line": 15, "column": 36 }, "identifierName": "Mesh" }, "name": "Mesh" }, "computed": false }, "arguments": [ { "type": "Identifier", "start": 416, "end": 424, "loc": { "start": { "line": 15, "column": 37 }, "end": { "line": 15, "column": 45 }, "identifierName": "geometry" }, "name": "geometry" }, { "type": "Identifier", "start": 426, "end": 434, "loc": { "start": { "line": 15, "column": 47 }, "end": { "line": 15, "column": 55 }, "identifierName": "material" }, "name": "material" } ] } } ], "kind": "const" }, { "type": "ExpressionStatement", "start": 445, "end": 470, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 445, "end": 469, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 445, "end": 455, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 18 } }, "object": { "type": "Identifier", "start": 445, "end": 450, "loc": { "start": { "line": 16, "column": 8 }, "end": { "line": 16, "column": 13 }, "identifierName": "plane" }, "name": "plane" }, "property": { "type": "Identifier", "start": 451, "end": 455, "loc": { "start": { "line": 16, "column": 14 }, "end": { "line": 16, "column": 18 }, "identifierName": "type" }, "name": "type" }, "computed": false }, "right": { "type": "StringLiteral", "start": 458, "end": 469, "loc": { "start": { "line": 16, "column": 21 }, "end": { "line": 16, "column": 32 } }, "extra": { "rawValue": "Workplane", "raw": "'Workplane'" }, "value": "Workplane" } } }, { "type": "ExpressionStatement", "start": 479, "end": 504, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 479, "end": 503, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 479, "end": 498, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 27 } }, "object": { "type": "MemberExpression", "start": 479, "end": 493, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 22 } }, "object": { "type": "Identifier", "start": 479, "end": 484, "loc": { "start": { "line": 17, "column": 8 }, "end": { "line": 17, "column": 13 }, "identifierName": "plane" }, "name": "plane" }, "property": { "type": "Identifier", "start": 485, "end": 493, "loc": { "start": { "line": 17, "column": 14 }, "end": { "line": 17, "column": 22 }, "identifierName": "userData" }, "name": "userData" }, "computed": false }, "property": { "type": "Identifier", "start": 494, "end": 498, "loc": { "start": { "line": 17, "column": 23 }, "end": { "line": 17, "column": 27 }, "identifierName": "meta" }, "name": "meta" }, "computed": false }, "right": { "type": "ObjectExpression", "start": 501, "end": 503, "loc": { "start": { "line": 17, "column": 30 }, "end": { "line": 17, "column": 32 } }, "properties": [] } } }, { "type": "ExpressionStatement", "start": 513, "end": 538, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 33 } }, "expression": { "type": "AssignmentExpression", "start": 513, "end": 537, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 32 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 513, "end": 530, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 25 } }, "object": { "type": "Identifier", "start": 513, "end": 518, "loc": { "start": { "line": 18, "column": 8 }, "end": { "line": 18, "column": 13 }, "identifierName": "plane" }, "name": "plane" }, "property": { "type": "Identifier", "start": 519, "end": 530, "loc": { "start": { "line": 18, "column": 14 }, "end": { "line": 18, "column": 25