bruce-models 0.5.5 → 0.5.7
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 +47 -8
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +47 -8
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/client-file/client-file.js +23 -0
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/entity/entity-lod.js +14 -0
- package/dist/lib/entity/entity-lod.js.map +1 -1
- package/dist/lib/entity/getters/batched-data-getter.js +10 -8
- package/dist/lib/entity/getters/batched-data-getter.js.map +1 -1
- package/dist/types/client-file/client-file.d.ts +12 -0
- package/dist/types/entity/entity-lod.d.ts +6 -0
- package/dist/types/entity/getters/batched-data-getter.d.ts +2 -1
- package/package.json +1 -1
package/dist/bruce-models.es5.js
CHANGED
|
@@ -2570,6 +2570,20 @@ var EntityLod;
|
|
|
2570
2570
|
});
|
|
2571
2571
|
}
|
|
2572
2572
|
EntityLod.GetTypeLods = GetTypeLods;
|
|
2573
|
+
function Update(api, entityId, params) {
|
|
2574
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2575
|
+
return __generator(this, function (_a) {
|
|
2576
|
+
if (!params["ClientFile.ID"] || !params["LODCategory.Key"] || !params.Level) {
|
|
2577
|
+
throw ("ClientFile.ID, LODCategory.Key and Level are required.");
|
|
2578
|
+
}
|
|
2579
|
+
return [2 /*return*/, api.POST("entity/" + entityId + "/lod/" + params["LODCategory.Key"] + "/" + params.Level, {
|
|
2580
|
+
"Level": 0,
|
|
2581
|
+
"ClientFile.ID": params["ClientFile.ID"]
|
|
2582
|
+
}, Api.PrepReqParams())];
|
|
2583
|
+
});
|
|
2584
|
+
});
|
|
2585
|
+
}
|
|
2586
|
+
EntityLod.Update = Update;
|
|
2573
2587
|
})(EntityLod || (EntityLod = {}));
|
|
2574
2588
|
|
|
2575
2589
|
/**
|
|
@@ -3716,7 +3730,6 @@ var BatchedDataGetter;
|
|
|
3716
3730
|
(function (BatchedDataGetter) {
|
|
3717
3731
|
var Getter = /** @class */ (function () {
|
|
3718
3732
|
function Getter(data, viewPort, batchSize) {
|
|
3719
|
-
var _this = this;
|
|
3720
3733
|
this.viewPortRemoval = null;
|
|
3721
3734
|
this.viewRect = null;
|
|
3722
3735
|
this.viewCenter = null;
|
|
@@ -3724,10 +3737,6 @@ var BatchedDataGetter;
|
|
|
3724
3737
|
this.data = data;
|
|
3725
3738
|
this.viewPort = viewPort;
|
|
3726
3739
|
this.batchSize = batchSize;
|
|
3727
|
-
this.viewPortRemoval = this.viewPort.Updated().Subscribe(function () {
|
|
3728
|
-
_this.updateViewport();
|
|
3729
|
-
});
|
|
3730
|
-
this.updateViewport();
|
|
3731
3740
|
}
|
|
3732
3741
|
Object.defineProperty(Getter.prototype, "OnUpdate", {
|
|
3733
3742
|
get: function () {
|
|
@@ -3739,14 +3748,21 @@ var BatchedDataGetter;
|
|
|
3739
3748
|
enumerable: false,
|
|
3740
3749
|
configurable: true
|
|
3741
3750
|
});
|
|
3742
|
-
Getter.prototype.
|
|
3743
|
-
this
|
|
3744
|
-
this.
|
|
3751
|
+
Getter.prototype.Start = function () {
|
|
3752
|
+
var _this = this;
|
|
3753
|
+
this.viewPortRemoval = this.viewPort.Updated().Subscribe(function () {
|
|
3754
|
+
_this.updateViewport();
|
|
3755
|
+
});
|
|
3756
|
+
this.updateViewport();
|
|
3745
3757
|
};
|
|
3746
3758
|
Getter.prototype.Dispose = function () {
|
|
3747
3759
|
var _a;
|
|
3748
3760
|
(_a = this.viewPortRemoval) === null || _a === void 0 ? void 0 : _a.call(this);
|
|
3749
3761
|
};
|
|
3762
|
+
Getter.prototype.updateViewport = function () {
|
|
3763
|
+
this.updateBounds();
|
|
3764
|
+
this.startGetterLoop();
|
|
3765
|
+
};
|
|
3750
3766
|
Getter.prototype.updateBounds = function () {
|
|
3751
3767
|
var viewRect = this.viewPort.GetBounds();
|
|
3752
3768
|
var poi = this.viewPort.GetTarget();
|
|
@@ -3913,6 +3929,29 @@ var ClientFile;
|
|
|
3913
3929
|
})(V1 = Filter.V1 || (Filter.V1 = {}));
|
|
3914
3930
|
// TODO: Helpers for constructing the filter.
|
|
3915
3931
|
})(Filter = ClientFile.Filter || (ClientFile.Filter = {}));
|
|
3932
|
+
var Processor;
|
|
3933
|
+
(function (Processor) {
|
|
3934
|
+
var EConvertExt;
|
|
3935
|
+
(function (EConvertExt) {
|
|
3936
|
+
EConvertExt["GLB"] = ".glb";
|
|
3937
|
+
EConvertExt["SKP"] = ".skp";
|
|
3938
|
+
})(EConvertExt = Processor.EConvertExt || (Processor.EConvertExt = {}));
|
|
3939
|
+
function ConvertFormat(api, clientFileId, ext) {
|
|
3940
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3941
|
+
return __generator(this, function (_a) {
|
|
3942
|
+
if (!clientFileId || !ext) {
|
|
3943
|
+
throw ("Client File ID and extension are required.");
|
|
3944
|
+
}
|
|
3945
|
+
return [2 /*return*/, api.POST("convertFileToFile", {
|
|
3946
|
+
clientFileId: clientFileId,
|
|
3947
|
+
destinationFormat: ext,
|
|
3948
|
+
operations: []
|
|
3949
|
+
}, Api.PrepReqParams())];
|
|
3950
|
+
});
|
|
3951
|
+
});
|
|
3952
|
+
}
|
|
3953
|
+
Processor.ConvertFormat = ConvertFormat;
|
|
3954
|
+
})(Processor = ClientFile.Processor || (ClientFile.Processor = {}));
|
|
3916
3955
|
})(ClientFile || (ClientFile = {}));
|
|
3917
3956
|
|
|
3918
3957
|
/**
|