bruce-models 0.7.1 → 0.7.2
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.
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account.js +244 -244
- package/dist/lib/ann-document/ann-document.js +116 -116
- package/dist/lib/api/abstract-api.js +267 -267
- package/dist/lib/api/api.js +85 -85
- package/dist/lib/api/bruce-api.js +202 -202
- package/dist/lib/api/cam-api.js +132 -132
- package/dist/lib/api/global-api.js +131 -131
- package/dist/lib/api/idm-api.js +132 -132
- package/dist/lib/bruce-models.js +83 -83
- package/dist/lib/calculator/calculator.js +158 -158
- package/dist/lib/client-file/client-file.js +188 -188
- package/dist/lib/common/bounds.js +2 -2
- package/dist/lib/common/bruce-event.js +48 -48
- package/dist/lib/common/bruce-variable.js +54 -54
- package/dist/lib/common/cache.js +86 -86
- package/dist/lib/common/camera.js +11 -11
- package/dist/lib/common/cartes.js +55 -55
- package/dist/lib/common/carto.js +60 -60
- package/dist/lib/common/color.js +86 -86
- package/dist/lib/common/delay-queue.js +60 -60
- package/dist/lib/common/dictionary.js +2 -2
- package/dist/lib/common/geometry.js +120 -120
- package/dist/lib/common/transform.js +2 -2
- package/dist/lib/common/utc.js +39 -39
- package/dist/lib/custom-form/custom-form.js +136 -136
- package/dist/lib/data-lab/data-lab.js +90 -90
- package/dist/lib/entity/entity-attachment-type.js +132 -132
- package/dist/lib/entity/entity-attachment.js +208 -208
- package/dist/lib/entity/entity-comment.js +132 -132
- package/dist/lib/entity/entity-link.js +132 -132
- package/dist/lib/entity/entity-lod.js +189 -189
- package/dist/lib/entity/entity-relation-type.js +150 -150
- package/dist/lib/entity/entity-relation.js +189 -189
- package/dist/lib/entity/entity-source.js +176 -176
- package/dist/lib/entity/entity-tag.js +229 -229
- package/dist/lib/entity/entity-type.js +163 -163
- package/dist/lib/entity/entity-type.js.map +1 -1
- package/dist/lib/entity/entity.js +349 -349
- package/dist/lib/entity/getters/batched-data-getter.js +91 -91
- package/dist/lib/entity/getters/entity-filter-getter.js +344 -344
- package/dist/lib/entity/getters/entity-globe.js +135 -135
- package/dist/lib/entity/getters/view-monitor.js +2 -2
- package/dist/lib/import/import-cad.js +82 -82
- package/dist/lib/import/import-csv.js +51 -51
- package/dist/lib/import/import-json.js +51 -51
- package/dist/lib/import/import-kml.js +51 -51
- package/dist/lib/import/imported-file.js +121 -121
- package/dist/lib/markup/markup.js +40 -40
- package/dist/lib/program-key/program-key.js +152 -152
- package/dist/lib/project/menu-item.js +115 -115
- package/dist/lib/project/project-view-bookmark.js +172 -172
- package/dist/lib/project/project-view-tile-source.js +115 -115
- package/dist/lib/project/project-view.js +166 -166
- package/dist/lib/project/zoom-control.js +17 -17
- package/dist/lib/server/pending-action.js +106 -106
- package/dist/lib/server/task.js +113 -113
- package/dist/lib/style/style.js +152 -152
- package/dist/lib/tileset/tileset-cad.js +2 -2
- package/dist/lib/tileset/tileset-entities-map-tiles.js +18 -18
- package/dist/lib/tileset/tileset-entities.js +2 -2
- package/dist/lib/tileset/tileset-ext-map-tiles.js +17 -17
- package/dist/lib/tileset/tileset-ext-terrain-tiles.js +2 -2
- package/dist/lib/tileset/tileset-map-tiles.js +2 -2
- package/dist/lib/tileset/tileset-pointcloud.js +2 -2
- package/dist/lib/tileset/tileset-terrain-tiles.js +2 -2
- package/dist/lib/tileset/tileset.js +403 -403
- package/dist/lib/ucs/ucs.js +135 -135
- package/dist/lib/user/permission.js +20 -20
- package/dist/lib/user/session.js +160 -160
- package/dist/lib/user/user-group.js +139 -139
- package/dist/lib/user/user.js +451 -451
- package/dist/lib/util/encrypt-utils.js +20 -20
- package/dist/lib/util/math-utils.js +41 -41
- package/dist/lib/util/object-utils.js +17 -17
- package/dist/lib/util/path-utils.js +61 -61
- package/dist/lib/util/url-utils.js +107 -107
- package/dist/types/entity/entity-type.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BatchedDataGetter = void 0;
|
|
4
|
-
var bruce_event_1 = require("../../common/bruce-event");
|
|
5
|
-
var MAX_AREA_IN_DEGREES = 90;
|
|
6
|
-
var GETTER_DELAY = 50;
|
|
7
|
-
/**
|
|
8
|
-
* This is a batched "arbitrary data" getter.
|
|
9
|
-
* You feed it an array of data, then it will emit that data in batches when the view changes.
|
|
10
|
-
*/
|
|
11
|
-
var BatchedDataGetter;
|
|
12
|
-
(function (BatchedDataGetter) {
|
|
13
|
-
var Getter = /** @class */ (function () {
|
|
14
|
-
function Getter(data, viewPort, batchSize) {
|
|
15
|
-
this.viewPortRemoval = null;
|
|
16
|
-
this.viewRect = null;
|
|
17
|
-
this.viewCenter = null;
|
|
18
|
-
this.onUpdate = null;
|
|
19
|
-
this.data = data;
|
|
20
|
-
this.viewPort = viewPort;
|
|
21
|
-
this.batchSize = batchSize;
|
|
22
|
-
}
|
|
23
|
-
Object.defineProperty(Getter.prototype, "OnUpdate", {
|
|
24
|
-
get: function () {
|
|
25
|
-
if (!this.onUpdate) {
|
|
26
|
-
this.onUpdate = new bruce_event_1.BruceEvent();
|
|
27
|
-
}
|
|
28
|
-
return this.onUpdate;
|
|
29
|
-
},
|
|
30
|
-
enumerable: false,
|
|
31
|
-
configurable: true
|
|
32
|
-
});
|
|
33
|
-
Getter.prototype.Start = function () {
|
|
34
|
-
var _this = this;
|
|
35
|
-
this.viewPortRemoval = this.viewPort.Updated().Subscribe(function () {
|
|
36
|
-
_this.updateViewport();
|
|
37
|
-
});
|
|
38
|
-
this.updateViewport();
|
|
39
|
-
};
|
|
40
|
-
Getter.prototype.Dispose = function () {
|
|
41
|
-
var _a;
|
|
42
|
-
(_a = this.viewPortRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
43
|
-
};
|
|
44
|
-
Getter.prototype.updateViewport = function () {
|
|
45
|
-
this.updateBounds();
|
|
46
|
-
this.startGetterLoop();
|
|
47
|
-
};
|
|
48
|
-
Getter.prototype.updateBounds = function () {
|
|
49
|
-
var viewRect = this.viewPort.GetBounds();
|
|
50
|
-
var poi = this.viewPort.GetTarget();
|
|
51
|
-
if (viewRect && poi) {
|
|
52
|
-
if (Math.abs(viewRect.west - viewRect.east) > MAX_AREA_IN_DEGREES) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
if (Math.abs(viewRect.south - viewRect.north) > MAX_AREA_IN_DEGREES) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
this.viewRect = viewRect;
|
|
59
|
-
this.viewCenter = poi;
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
Getter.prototype.startGetterLoop = function () {
|
|
63
|
-
var _this = this;
|
|
64
|
-
clearInterval(this.getterInterval);
|
|
65
|
-
if (!this.viewRect || !this.viewCenter) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
var index = 0;
|
|
69
|
-
var onTick = function () {
|
|
70
|
-
_this.processBatch(_this.data.slice(index, index + _this.batchSize));
|
|
71
|
-
index += _this.batchSize;
|
|
72
|
-
return index >= _this.data.length;
|
|
73
|
-
};
|
|
74
|
-
if (!onTick()) {
|
|
75
|
-
this.getterInterval = setInterval(function () {
|
|
76
|
-
if (onTick()) {
|
|
77
|
-
clearInterval(_this.getterInterval);
|
|
78
|
-
}
|
|
79
|
-
}, GETTER_DELAY);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
Getter.prototype.processBatch = function (batch) {
|
|
83
|
-
var _a;
|
|
84
|
-
if (batch.length > 0) {
|
|
85
|
-
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(batch);
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
|
-
return Getter;
|
|
89
|
-
}());
|
|
90
|
-
BatchedDataGetter.Getter = Getter;
|
|
91
|
-
})(BatchedDataGetter = exports.BatchedDataGetter || (exports.BatchedDataGetter = {}));
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BatchedDataGetter = void 0;
|
|
4
|
+
var bruce_event_1 = require("../../common/bruce-event");
|
|
5
|
+
var MAX_AREA_IN_DEGREES = 90;
|
|
6
|
+
var GETTER_DELAY = 50;
|
|
7
|
+
/**
|
|
8
|
+
* This is a batched "arbitrary data" getter.
|
|
9
|
+
* You feed it an array of data, then it will emit that data in batches when the view changes.
|
|
10
|
+
*/
|
|
11
|
+
var BatchedDataGetter;
|
|
12
|
+
(function (BatchedDataGetter) {
|
|
13
|
+
var Getter = /** @class */ (function () {
|
|
14
|
+
function Getter(data, viewPort, batchSize) {
|
|
15
|
+
this.viewPortRemoval = null;
|
|
16
|
+
this.viewRect = null;
|
|
17
|
+
this.viewCenter = null;
|
|
18
|
+
this.onUpdate = null;
|
|
19
|
+
this.data = data;
|
|
20
|
+
this.viewPort = viewPort;
|
|
21
|
+
this.batchSize = batchSize;
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(Getter.prototype, "OnUpdate", {
|
|
24
|
+
get: function () {
|
|
25
|
+
if (!this.onUpdate) {
|
|
26
|
+
this.onUpdate = new bruce_event_1.BruceEvent();
|
|
27
|
+
}
|
|
28
|
+
return this.onUpdate;
|
|
29
|
+
},
|
|
30
|
+
enumerable: false,
|
|
31
|
+
configurable: true
|
|
32
|
+
});
|
|
33
|
+
Getter.prototype.Start = function () {
|
|
34
|
+
var _this = this;
|
|
35
|
+
this.viewPortRemoval = this.viewPort.Updated().Subscribe(function () {
|
|
36
|
+
_this.updateViewport();
|
|
37
|
+
});
|
|
38
|
+
this.updateViewport();
|
|
39
|
+
};
|
|
40
|
+
Getter.prototype.Dispose = function () {
|
|
41
|
+
var _a;
|
|
42
|
+
(_a = this.viewPortRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
43
|
+
};
|
|
44
|
+
Getter.prototype.updateViewport = function () {
|
|
45
|
+
this.updateBounds();
|
|
46
|
+
this.startGetterLoop();
|
|
47
|
+
};
|
|
48
|
+
Getter.prototype.updateBounds = function () {
|
|
49
|
+
var viewRect = this.viewPort.GetBounds();
|
|
50
|
+
var poi = this.viewPort.GetTarget();
|
|
51
|
+
if (viewRect && poi) {
|
|
52
|
+
if (Math.abs(viewRect.west - viewRect.east) > MAX_AREA_IN_DEGREES) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (Math.abs(viewRect.south - viewRect.north) > MAX_AREA_IN_DEGREES) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
this.viewRect = viewRect;
|
|
59
|
+
this.viewCenter = poi;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
Getter.prototype.startGetterLoop = function () {
|
|
63
|
+
var _this = this;
|
|
64
|
+
clearInterval(this.getterInterval);
|
|
65
|
+
if (!this.viewRect || !this.viewCenter) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
var index = 0;
|
|
69
|
+
var onTick = function () {
|
|
70
|
+
_this.processBatch(_this.data.slice(index, index + _this.batchSize));
|
|
71
|
+
index += _this.batchSize;
|
|
72
|
+
return index >= _this.data.length;
|
|
73
|
+
};
|
|
74
|
+
if (!onTick()) {
|
|
75
|
+
this.getterInterval = setInterval(function () {
|
|
76
|
+
if (onTick()) {
|
|
77
|
+
clearInterval(_this.getterInterval);
|
|
78
|
+
}
|
|
79
|
+
}, GETTER_DELAY);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
Getter.prototype.processBatch = function (batch) {
|
|
83
|
+
var _a;
|
|
84
|
+
if (batch.length > 0) {
|
|
85
|
+
(_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(batch);
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
return Getter;
|
|
89
|
+
}());
|
|
90
|
+
BatchedDataGetter.Getter = Getter;
|
|
91
|
+
})(BatchedDataGetter = exports.BatchedDataGetter || (exports.BatchedDataGetter = {}));
|
|
92
92
|
//# sourceMappingURL=batched-data-getter.js.map
|