bruce-models 0.8.6 → 0.8.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -52,5 +52,73 @@ var Cartes;
52
52
  return true;
53
53
  }
54
54
  Cartes.IsEqualCartes3 = IsEqualCartes3;
55
+ /**
56
+ * Returns true if the given ring is closed.
57
+ * A ring is closed if the first and last point are equal.
58
+ * A ring with less than 2 points is not closed.
59
+ * @param points
60
+ * @returns
61
+ */
62
+ function IsRing2Closed(points) {
63
+ if (points.length < 2) {
64
+ return false;
65
+ }
66
+ else if (!IsEqualCartes2(points[0], points[points.length - 1])) {
67
+ return false;
68
+ }
69
+ return true;
70
+ }
71
+ Cartes.IsRing2Closed = IsRing2Closed;
72
+ /**
73
+ * Returns true if the given ring is closed.
74
+ * A ring is closed if the first and last point are equal.
75
+ * A ring with less than 2 points is not closed.
76
+ * @param points
77
+ * @returns
78
+ */
79
+ function IsRing3Closed(points) {
80
+ if (points.length < 2) {
81
+ return false;
82
+ }
83
+ else if (!IsEqualCartes3(points[0], points[points.length - 1])) {
84
+ return false;
85
+ }
86
+ return true;
87
+ }
88
+ Cartes.IsRing3Closed = IsRing3Closed;
89
+ /**
90
+ * Closes given ring by adding the first point to the end of the array.
91
+ * This will mutate the given array.
92
+ * Will not do anything if the ring is already closed.
93
+ * @param points
94
+ * @returns
95
+ */
96
+ function CloseRing2(points) {
97
+ if (points.length < 2) {
98
+ return;
99
+ }
100
+ else if (IsRing2Closed(points)) {
101
+ return;
102
+ }
103
+ points.push(points[0]);
104
+ }
105
+ Cartes.CloseRing2 = CloseRing2;
106
+ /**
107
+ * Closes given ring by adding the first point to the end of the array.
108
+ * This will mutate the given array.
109
+ * Will not do anything if the ring is already closed.
110
+ * @param points
111
+ * @returns
112
+ */
113
+ function CloseRing3(points) {
114
+ if (points.length < 2) {
115
+ return;
116
+ }
117
+ else if (IsRing3Closed(points)) {
118
+ return;
119
+ }
120
+ points.push(points[0]);
121
+ }
122
+ Cartes.CloseRing3 = CloseRing3;
55
123
  })(Cartes = exports.Cartes || (exports.Cartes = {}));
56
124
  //# sourceMappingURL=cartes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cartes.js","sourceRoot":"","sources":["../../../src/common/cartes.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,IAAiB,MAAM,CAoDtB;AApDD,WAAiB,MAAM;IAUnB,SAAgB,eAAe,CAAC,MAAgB;QAC5C,IAAI,CAAC,MAAM,EAAE;YACT,OAAO,KAAK,CAAC;SAChB;aACI,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE;YACjC,OAAO,KAAK,CAAC;SAChB;aACI,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE;YACjC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IAXe,sBAAe,kBAW9B,CAAA;IAED,SAAgB,eAAe,CAAC,MAAgB;QAC5C,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE;YAC1B,OAAO,KAAK,CAAC;SAChB;aACI,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,IAAI,CAAC,EAAE;YACjC,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IARe,sBAAe,kBAQ9B,CAAA;IAED,SAAgB,cAAc,CAAC,CAAW,EAAE,CAAW;QACnD,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;YACZ,OAAO,KAAK,CAAC;SAChB;aACI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;YACjB,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IAChB,CAAC;IARe,qBAAc,iBAQ7B,CAAA;IAED,SAAgB,cAAc,CAAC,CAAW,EAAE,CAAW;QACnD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CAAC,MAAM,CAAC,EAAE;YAC5B,OAAO;SACV;QACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IARe,iBAAU,aAQzB,CAAA;IAED;;;;;;OAMG;IACH,SAAgB,UAAU,CAAC,MAAkB;QACzC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,OAAO;SACV;aACI,IAAI,aAAa,CAAC,MAAM,CAAC,EAAE;YAC5B,OAAO;SACV;QACD,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IARe,iBAAU,aAQzB,CAAA;AACL,CAAC,EAxHgB,MAAM,GAAN,cAAM,KAAN,cAAM,QAwHtB"}
@@ -6,146 +6,174 @@ exports.Markup = void 0;
6
6
  */
7
7
  var Markup;
8
8
  (function (Markup) {
9
- var Element;
10
- (function (Element) {
11
- var Div;
12
- (function (Div) {
13
- // Types of div that can be created.
9
+ var Div;
10
+ (function (Div) {
11
+ // Types of div that can be created.
12
+ var EType;
13
+ (function (EType) {
14
+ // Default, no special handling.
15
+ EType["Default"] = "default";
16
+ // Callout, assumes it will be positioned in 3d space.
17
+ // Assumes existence of line that is used to anchor it.
18
+ EType["Callout"] = "callout";
19
+ })(EType = Div.EType || (Div.EType = {}));
20
+ // Describes expected content of a row cell.
21
+ var EItemType;
22
+ (function (EItemType) {
23
+ // Default, no special handling.
24
+ EItemType["Default"] = "DEFAULT";
25
+ // Embed, assume content is html.
26
+ // Make it take over the whole cell instead of padding it and such.
27
+ EItemType["Embed"] = "EMBED";
28
+ })(EItemType = Div.EItemType || (Div.EItemType = {}));
29
+ var ItemAction;
30
+ (function (ItemAction) {
31
+ // Types of actions that can be performed when a cell is clicked.
32
+ // Null = "NONE".
14
33
  var EType;
15
34
  (function (EType) {
16
- // Default, no special handling.
17
- EType["Default"] = "default";
18
- // Callout, assumes it will be positioned in 3d space.
19
- // Assumes existence of line that is used to anchor it.
20
- EType["Callout"] = "callout";
21
- })(EType = Div.EType || (Div.EType = {}));
22
- // Describes expected content of a row cell.
23
- var EItemType;
24
- (function (EItemType) {
25
- // Default, no special handling.
26
- EItemType["Default"] = "DEFAULT";
27
- // Embed, assume content is html.
28
- // Make it take over the whole cell instead of padding it and such.
29
- EItemType["Embed"] = "EMBED";
30
- })(EItemType = Div.EItemType || (Div.EItemType = {}));
31
- var ItemAction;
32
- (function (ItemAction) {
33
- // Types of actions that can be performed when a cell is clicked.
34
- // Null = "NONE".
35
- var EType;
36
- (function (EType) {
37
- EType["None"] = "NONE";
38
- // Open a link specified in params.
39
- EType["OpenLink"] = "LINK";
40
- // Open the markup's entity's details panel.
41
- EType["OpenInfoView"] = "INFOVIEW";
42
- // Open the markup's entity's gallery popup.
43
- EType["OpenEntityGallery"] = "GALLERY";
44
- // Toggle visibility of the markup's entity's relationships.
45
- EType["ToggleRelationships"] = "RELATIONSHIPS";
46
- // Dictates this cell can be used to drag the div around.
47
- EType["Draggable"] = "DRAGABBLE";
48
- // Closes the markup.
49
- EType["Close"] = "CLOSE";
50
- // Opens a bookmark specified in params.
51
- EType["OpenBookmark"] = "BOOKMARK";
52
- })(EType = ItemAction.EType || (ItemAction.EType = {}));
53
- })(ItemAction = Div.ItemAction || (Div.ItemAction = {}));
54
- })(Div = Element.Div || (Element.Div = {}));
55
- var Drawing;
56
- (function (Drawing) {
57
- var Line;
58
- (function (Line) {
59
- // Dictates where on a DIV an anchor should snap to.
60
- var EAnchorDivSide;
61
- (function (EAnchorDivSide) {
62
- EAnchorDivSide[EAnchorDivSide["TopLeft"] = 0] = "TopLeft";
63
- EAnchorDivSide[EAnchorDivSide["TopRight"] = 1] = "TopRight";
64
- EAnchorDivSide[EAnchorDivSide["BottomLeft"] = 2] = "BottomLeft";
65
- EAnchorDivSide[EAnchorDivSide["BottomRight"] = 3] = "BottomRight";
66
- EAnchorDivSide[EAnchorDivSide["Center"] = 4] = "Center";
67
- EAnchorDivSide[EAnchorDivSide["CenterLeft"] = 5] = "CenterLeft";
68
- EAnchorDivSide[EAnchorDivSide["CenterRight"] = 6] = "CenterRight";
69
- EAnchorDivSide[EAnchorDivSide["CenterTop"] = 7] = "CenterTop";
70
- EAnchorDivSide[EAnchorDivSide["CenterBottom"] = 8] = "CenterBottom";
71
- })(EAnchorDivSide = Line.EAnchorDivSide || (Line.EAnchorDivSide = {}));
72
- // Dictates what end of the line an anchor should render on.
73
- var EAnchorLineSide;
74
- (function (EAnchorLineSide) {
75
- EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
76
- EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
77
- })(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
78
- // Types of anchor heads when anchor is used in context of a line.
79
- // None means the anchor is transparent.
80
- var EAnchorHeadStyle;
81
- (function (EAnchorHeadStyle) {
82
- EAnchorHeadStyle["None"] = "NONE";
83
- EAnchorHeadStyle["Circle"] = "CIRCLE";
84
- EAnchorHeadStyle["Arrow"] = "ARROW";
85
- })(EAnchorHeadStyle = Line.EAnchorHeadStyle || (Line.EAnchorHeadStyle = {}));
86
- Line.DEFAULT = {
87
- brushColor: "rgba(255, 255, 255, 1)",
88
- brushSize: 4,
89
- path: null,
90
- pathType: "LINE",
91
- transform: null,
92
- snaps: null
93
- };
94
- })(Line = Drawing.Line || (Drawing.Line = {}));
95
- var FreePaint;
96
- (function (FreePaint) {
97
- FreePaint.DEFAULT = {
98
- brushColor: "rgba(255, 255, 255, 1)",
99
- brushSize: 4,
100
- path: null,
101
- pathType: "PLAIN",
102
- transform: null
103
- };
104
- })(FreePaint = Drawing.FreePaint || (Drawing.FreePaint = {}));
105
- })(Drawing = Element.Drawing || (Element.Drawing = {}));
106
- var Entity3d;
107
- (function (Entity3d) {
108
- var Polygon;
109
- (function (Polygon) {
110
- // Determines if terrain and 3d models should be overlapped or not.
111
- var EClassificationType;
112
- (function (EClassificationType) {
113
- // 3d models and terrain are overlapped.
114
- EClassificationType["Both"] = "BOTH";
115
- // Only terrain is overlapped.
116
- EClassificationType["Terrain"] = "TERRAIN";
117
- })(EClassificationType = Polygon.EClassificationType || (Polygon.EClassificationType = {}));
118
- Polygon.DEFAULT = {
119
- id: null,
120
- positions: null,
121
- color: "rgba(254, 234, 57, 0.54)",
122
- outlineColor: "rgba(215, 215, 215, 0)",
123
- outlineWidth: 2,
124
- extrudedHeight: 0,
125
- classificationType: EClassificationType.Both,
126
- smoothen: 0
127
- };
128
- })(Polygon = Entity3d.Polygon || (Entity3d.Polygon = {}));
129
- var Polyline;
130
- (function (Polyline) {
131
- Polyline.DEFAULT = {
132
- id: null,
133
- positions: null,
134
- color: "rgba(254, 234, 57, 0.54)",
135
- outlineWidth: 4,
136
- smoothen: 0
137
- };
138
- })(Polyline = Entity3d.Polyline || (Entity3d.Polyline = {}));
139
- var Circle;
140
- (function (Circle) {
141
- Circle.DEFAULT = {
142
- id: null,
143
- position: null,
144
- radius: 50,
145
- color: "rgba(254, 234, 57, 0.54)"
146
- };
147
- })(Circle = Entity3d.Circle || (Entity3d.Circle = {}));
148
- })(Entity3d = Element.Entity3d || (Element.Entity3d = {}));
149
- })(Element = Markup.Element || (Markup.Element = {}));
35
+ EType["None"] = "NONE";
36
+ // Open a link specified in params.
37
+ EType["OpenLink"] = "LINK";
38
+ // Open the markup's entity's details panel.
39
+ EType["OpenInfoView"] = "INFOVIEW";
40
+ // Open the markup's entity's gallery popup.
41
+ EType["OpenEntityGallery"] = "GALLERY";
42
+ // Toggle visibility of the markup's entity's relationships.
43
+ EType["ToggleRelationships"] = "RELATIONSHIPS";
44
+ // Dictates this cell can be used to drag the div around.
45
+ EType["Draggable"] = "DRAGABBLE";
46
+ // Closes the markup.
47
+ EType["Close"] = "CLOSE";
48
+ // Opens a bookmark specified in params.
49
+ EType["OpenBookmark"] = "BOOKMARK";
50
+ })(EType = ItemAction.EType || (ItemAction.EType = {}));
51
+ })(ItemAction = Div.ItemAction || (Div.ItemAction = {}));
52
+ Div.DEFAULT = {
53
+ contentRows: [
54
+ {
55
+ height: 100,
56
+ items: [
57
+ {
58
+ contentType: EItemType.Default,
59
+ text: "Type here...",
60
+ width: 100,
61
+ backgroundColor: "white",
62
+ fontColor: "black",
63
+ textAlign: "center",
64
+ verticalAlign: "center",
65
+ fontSize: 15
66
+ }
67
+ ]
68
+ }
69
+ ],
70
+ height: null,
71
+ width: null,
72
+ id: null,
73
+ x: null,
74
+ y: null,
75
+ borderColor: "black",
76
+ borderWidth: 1,
77
+ borderUsingPercent: false,
78
+ borderRadius: 8,
79
+ type: EType.Default
80
+ };
81
+ })(Div = Markup.Div || (Markup.Div = {}));
82
+ var Drawing;
83
+ (function (Drawing) {
84
+ // Describes a line end's head.
85
+ var EHeadStyle;
86
+ (function (EHeadStyle) {
87
+ EHeadStyle["None"] = "NONE";
88
+ EHeadStyle["Circle"] = "CIRCLE";
89
+ EHeadStyle["Arrow"] = "ARROW";
90
+ })(EHeadStyle = Drawing.EHeadStyle || (Drawing.EHeadStyle = {}));
91
+ var Line;
92
+ (function (Line) {
93
+ // Dictates where on a DIV an anchor should snap to.
94
+ var EAnchorDivSide;
95
+ (function (EAnchorDivSide) {
96
+ EAnchorDivSide[EAnchorDivSide["TopLeft"] = 0] = "TopLeft";
97
+ EAnchorDivSide[EAnchorDivSide["TopRight"] = 1] = "TopRight";
98
+ EAnchorDivSide[EAnchorDivSide["BottomLeft"] = 2] = "BottomLeft";
99
+ EAnchorDivSide[EAnchorDivSide["BottomRight"] = 3] = "BottomRight";
100
+ EAnchorDivSide[EAnchorDivSide["Center"] = 4] = "Center";
101
+ EAnchorDivSide[EAnchorDivSide["CenterLeft"] = 5] = "CenterLeft";
102
+ EAnchorDivSide[EAnchorDivSide["CenterRight"] = 6] = "CenterRight";
103
+ EAnchorDivSide[EAnchorDivSide["CenterTop"] = 7] = "CenterTop";
104
+ EAnchorDivSide[EAnchorDivSide["CenterBottom"] = 8] = "CenterBottom";
105
+ })(EAnchorDivSide = Line.EAnchorDivSide || (Line.EAnchorDivSide = {}));
106
+ // Dictates what end of the line an anchor should render on.
107
+ var EAnchorLineSide;
108
+ (function (EAnchorLineSide) {
109
+ EAnchorLineSide[EAnchorLineSide["Start"] = 0] = "Start";
110
+ EAnchorLineSide[EAnchorLineSide["End"] = 1] = "End";
111
+ })(EAnchorLineSide = Line.EAnchorLineSide || (Line.EAnchorLineSide = {}));
112
+ Line.DEFAULT = {
113
+ brushColor: "rgba(255, 255, 255, 1)",
114
+ brushSize: 4,
115
+ path: null,
116
+ pathType: "LINE",
117
+ transform: null,
118
+ snaps: null
119
+ };
120
+ })(Line = Drawing.Line || (Drawing.Line = {}));
121
+ var FreePaint;
122
+ (function (FreePaint) {
123
+ FreePaint.DEFAULT = {
124
+ brushColor: "rgba(255, 255, 255, 1)",
125
+ brushSize: 4,
126
+ path: null,
127
+ pathType: "PLAIN",
128
+ transform: null
129
+ };
130
+ })(FreePaint = Drawing.FreePaint || (Drawing.FreePaint = {}));
131
+ })(Drawing = Markup.Drawing || (Markup.Drawing = {}));
132
+ var Entity3d;
133
+ (function (Entity3d) {
134
+ var Polygon;
135
+ (function (Polygon) {
136
+ // Determines if terrain and 3d models should be overlapped or not.
137
+ var EClassificationType;
138
+ (function (EClassificationType) {
139
+ // 3d models and terrain are overlapped.
140
+ EClassificationType["Both"] = "BOTH";
141
+ // Only terrain is overlapped.
142
+ EClassificationType["Terrain"] = "TERRAIN";
143
+ })(EClassificationType = Polygon.EClassificationType || (Polygon.EClassificationType = {}));
144
+ Polygon.DEFAULT = {
145
+ type: "POLYGON",
146
+ id: null,
147
+ positions: null,
148
+ color: "rgba(254, 234, 57, 0.54)",
149
+ outlineColor: "rgba(215, 215, 215, 0)",
150
+ outlineWidth: 2,
151
+ extrudedHeight: 0,
152
+ classificationType: EClassificationType.Both,
153
+ smoothen: 0
154
+ };
155
+ })(Polygon = Entity3d.Polygon || (Entity3d.Polygon = {}));
156
+ var Polyline;
157
+ (function (Polyline) {
158
+ Polyline.DEFAULT = {
159
+ type: "POLYLINE",
160
+ id: null,
161
+ positions: null,
162
+ color: "rgba(254, 234, 57, 0.54)",
163
+ outlineWidth: 4,
164
+ smoothen: 0
165
+ };
166
+ })(Polyline = Entity3d.Polyline || (Entity3d.Polyline = {}));
167
+ var Circle;
168
+ (function (Circle) {
169
+ Circle.DEFAULT = {
170
+ type: "CIRCLE",
171
+ id: null,
172
+ position: null,
173
+ radius: 50,
174
+ color: "rgba(254, 234, 57, 0.54)"
175
+ };
176
+ })(Circle = Entity3d.Circle || (Entity3d.Circle = {}));
177
+ })(Entity3d = Markup.Entity3d || (Markup.Entity3d = {}));
150
178
  })(Markup = exports.Markup || (exports.Markup = {}));
151
179
  //# sourceMappingURL=markup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"markup.js","sourceRoot":"","sources":["../../../src/markup/markup.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACH,IAAiB,MAAM,CAkZtB;AAlZD,WAAiB,MAAM;IAUnB,IAAiB,OAAO,CAuYvB;IAvYD,WAAiB,OAAO;QACpB,IAAiB,GAAG,CAqKnB;QArKD,WAAiB,GAAG;YAChB,oCAAoC;YACpC,IAAY,KAMX;YAND,WAAY,KAAK;gBACb,gCAAgC;gBAChC,4BAAmB,CAAA;gBACnB,sDAAsD;gBACtD,uDAAuD;gBACvD,4BAAmB,CAAA;YACvB,CAAC,EANW,KAAK,GAAL,SAAK,KAAL,SAAK,QAMhB;YA+CD,4CAA4C;YAC5C,IAAY,SAMX;YAND,WAAY,SAAS;gBACjB,gCAAgC;gBAChC,gCAAmB,CAAA;gBACnB,iCAAiC;gBACjC,mEAAmE;gBACnE,4BAAe,CAAA;YACnB,CAAC,EANW,SAAS,GAAT,aAAS,KAAT,aAAS,QAMpB;YAgDD,IAAiB,UAAU,CAsD1B;YAtDD,WAAiB,UAAU;gBAmCvB,iEAAiE;gBACjE,iBAAiB;gBACjB,IAAY,KAgBX;gBAhBD,WAAY,KAAK;oBACb,sBAAa,CAAA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Cartes {
16
16
  function ValidateCartes3(cartes: ICartes3): boolean;
17
17
  function IsEqualCartes2(a: ICartes2, b: ICartes2): boolean;
18
18
  function IsEqualCartes3(a: ICartes3, b: ICartes3): boolean;
19
+ /**
20
+ * Returns true if the given ring is closed.
21
+ * A ring is closed if the first and last point are equal.
22
+ * A ring with less than 2 points is not closed.
23
+ * @param points
24
+ * @returns
25
+ */
26
+ function IsRing2Closed(points: ICartes2[]): boolean;
27
+ /**
28
+ * Returns true if the given ring is closed.
29
+ * A ring is closed if the first and last point are equal.
30
+ * A ring with less than 2 points is not closed.
31
+ * @param points
32
+ * @returns
33
+ */
34
+ function IsRing3Closed(points: ICartes3[]): boolean;
35
+ /**
36
+ * Closes given ring by adding the first point to the end of the array.
37
+ * This will mutate the given array.
38
+ * Will not do anything if the ring is already closed.
39
+ * @param points
40
+ * @returns
41
+ */
42
+ function CloseRing2(points: ICartes2[]): void;
43
+ /**
44
+ * Closes given ring by adding the first point to the end of the array.
45
+ * This will mutate the given array.
46
+ * Will not do anything if the ring is already closed.
47
+ * @param points
48
+ * @returns
49
+ */
50
+ function CloseRing3(points: ICartes3[]): void;
19
51
  }