bruce-models 0.0.3 → 0.0.4

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.
@@ -3101,72 +3101,76 @@ var EntityFilterGetter;
3101
3101
 
3102
3102
  var MAX_AREA_IN_DEGREES$1 = 90;
3103
3103
  var GETTER_DELAY = 50;
3104
- var EntityLoadedGetter = /** @class */ (function () {
3105
- function EntityLoadedGetter(entities, viewPort, batchSize) {
3106
- var _this = this;
3107
- this.viewPortRemoval = null;
3108
- this.viewRect = null;
3109
- this.viewCenter = null;
3110
- this.onUpdate = null;
3111
- this.entities = entities;
3112
- this.viewPort = viewPort;
3113
- this.batchSize = batchSize;
3114
- this.viewPortRemoval = this.viewPort.Updated().Subscribe(function () {
3115
- _this.updateBounds();
3116
- _this.startGetterLoop();
3104
+ var EntityLoadedGetter;
3105
+ (function (EntityLoadedGetter) {
3106
+ var Getter = /** @class */ (function () {
3107
+ function Getter(entities, viewPort, batchSize) {
3108
+ var _this = this;
3109
+ this.viewPortRemoval = null;
3110
+ this.viewRect = null;
3111
+ this.viewCenter = null;
3112
+ this.onUpdate = null;
3113
+ this.entities = entities;
3114
+ this.viewPort = viewPort;
3115
+ this.batchSize = batchSize;
3116
+ this.viewPortRemoval = this.viewPort.Updated().Subscribe(function () {
3117
+ _this.updateBounds();
3118
+ _this.startGetterLoop();
3119
+ });
3120
+ }
3121
+ Object.defineProperty(Getter.prototype, "OnUpdate", {
3122
+ get: function () {
3123
+ if (!this.onUpdate) {
3124
+ this.onUpdate = new BruceEvent();
3125
+ }
3126
+ return this.onUpdate;
3127
+ },
3128
+ enumerable: false,
3129
+ configurable: true
3117
3130
  });
3118
- }
3119
- Object.defineProperty(EntityLoadedGetter.prototype, "OnUpdate", {
3120
- get: function () {
3121
- if (!this.onUpdate) {
3122
- this.onUpdate = new BruceEvent();
3123
- }
3124
- return this.onUpdate;
3125
- },
3126
- enumerable: false,
3127
- configurable: true
3128
- });
3129
- EntityLoadedGetter.prototype.Dispose = function () {
3130
- var _a;
3131
- (_a = this.viewPortRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
3132
- };
3133
- EntityLoadedGetter.prototype.updateBounds = function () {
3134
- var viewRect = this.viewPort.GetBounds();
3135
- var poi = this.viewPort.GetTarget();
3136
- if (viewRect && poi) {
3137
- if (Math.abs(viewRect.west - viewRect.east) > MAX_AREA_IN_DEGREES$1) {
3138
- return;
3131
+ Getter.prototype.Dispose = function () {
3132
+ var _a;
3133
+ (_a = this.viewPortRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
3134
+ };
3135
+ Getter.prototype.updateBounds = function () {
3136
+ var viewRect = this.viewPort.GetBounds();
3137
+ var poi = this.viewPort.GetTarget();
3138
+ if (viewRect && poi) {
3139
+ if (Math.abs(viewRect.west - viewRect.east) > MAX_AREA_IN_DEGREES$1) {
3140
+ return;
3141
+ }
3142
+ if (Math.abs(viewRect.south - viewRect.north) > MAX_AREA_IN_DEGREES$1) {
3143
+ return;
3144
+ }
3145
+ this.viewRect = viewRect;
3146
+ this.viewCenter = poi;
3139
3147
  }
3140
- if (Math.abs(viewRect.south - viewRect.north) > MAX_AREA_IN_DEGREES$1) {
3148
+ };
3149
+ Getter.prototype.startGetterLoop = function () {
3150
+ var _this = this;
3151
+ clearInterval(this.getterInterval);
3152
+ if (!this.viewRect || !this.viewCenter) {
3141
3153
  return;
3142
3154
  }
3143
- this.viewRect = viewRect;
3144
- this.viewCenter = poi;
3145
- }
3146
- };
3147
- EntityLoadedGetter.prototype.startGetterLoop = function () {
3148
- var _this = this;
3149
- clearInterval(this.getterInterval);
3150
- if (!this.viewRect || !this.viewCenter) {
3151
- return;
3152
- }
3153
- var index = 0;
3154
- this.getterInterval = setInterval(function () {
3155
- _this.processBatch(_this.entities.slice(index, index + _this.batchSize));
3156
- index += _this.batchSize;
3157
- if (index >= _this.entities.length) {
3158
- clearInterval(_this.getterInterval);
3155
+ var index = 0;
3156
+ this.getterInterval = setInterval(function () {
3157
+ _this.processBatch(_this.entities.slice(index, index + _this.batchSize));
3158
+ index += _this.batchSize;
3159
+ if (index >= _this.entities.length) {
3160
+ clearInterval(_this.getterInterval);
3161
+ }
3162
+ }, GETTER_DELAY);
3163
+ };
3164
+ Getter.prototype.processBatch = function (batch) {
3165
+ var _a;
3166
+ if (batch.length > 0) {
3167
+ (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(batch);
3159
3168
  }
3160
- }, GETTER_DELAY);
3161
- };
3162
- EntityLoadedGetter.prototype.processBatch = function (batch) {
3163
- var _a;
3164
- if (batch.length > 0) {
3165
- (_a = this.onUpdate) === null || _a === void 0 ? void 0 : _a.Trigger(batch);
3166
- }
3167
- };
3168
- return EntityLoadedGetter;
3169
- }());
3169
+ };
3170
+ return Getter;
3171
+ }());
3172
+ EntityLoadedGetter.Getter = Getter;
3173
+ })(EntityLoadedGetter || (EntityLoadedGetter = {}));
3170
3174
 
3171
3175
  var ClientFile;
3172
3176
  (function (ClientFile) {