@combeenation/3d-viewer 5.0.1 → 5.0.3-beta2
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/README.md +111 -114
- package/dist/lib-cjs/api/classes/animationInterface.d.ts +8 -8
- package/dist/lib-cjs/api/classes/animationInterface.js +1 -1
- package/dist/lib-cjs/api/classes/dottedPath.d.ts +79 -79
- package/dist/lib-cjs/api/classes/dottedPath.js +187 -187
- package/dist/lib-cjs/api/classes/element.d.ts +139 -139
- package/dist/lib-cjs/api/classes/element.js +794 -794
- package/dist/lib-cjs/api/classes/element.js.map +1 -1
- package/dist/lib-cjs/api/classes/elementParameterizable.d.ts +14 -0
- package/dist/lib-cjs/api/classes/elementParameterizable.js +135 -0
- package/dist/lib-cjs/api/classes/elementParameterizable.js.map +1 -0
- package/dist/lib-cjs/api/classes/event.d.ts +326 -326
- package/dist/lib-cjs/api/classes/event.js +371 -371
- package/dist/lib-cjs/api/classes/eventBroadcaster.d.ts +26 -26
- package/dist/lib-cjs/api/classes/eventBroadcaster.js +53 -53
- package/dist/lib-cjs/api/classes/parameter.d.ts +316 -259
- package/dist/lib-cjs/api/classes/parameter.js +451 -388
- package/dist/lib-cjs/api/classes/parameter.js.map +1 -1
- package/dist/lib-cjs/api/classes/parameterObservable.d.ts +36 -36
- package/dist/lib-cjs/api/classes/parameterObservable.js +101 -101
- package/dist/lib-cjs/api/classes/parameterizable.d.ts +15 -15
- package/dist/lib-cjs/api/classes/parameterizable.js +149 -149
- package/dist/lib-cjs/api/classes/placementAnimation.d.ts +44 -44
- package/dist/lib-cjs/api/classes/placementAnimation.js +163 -163
- package/dist/lib-cjs/api/classes/variant.d.ts +234 -234
- package/dist/lib-cjs/api/classes/variant.js +1154 -1154
- package/dist/lib-cjs/api/classes/variantInstance.d.ts +45 -45
- package/dist/lib-cjs/api/classes/variantInstance.js +108 -108
- package/dist/lib-cjs/api/classes/variantParameterizable.d.ts +17 -17
- package/dist/lib-cjs/api/classes/variantParameterizable.js +99 -99
- package/dist/lib-cjs/api/classes/viewer.d.ts +177 -175
- package/dist/lib-cjs/api/classes/viewer.js +717 -701
- package/dist/lib-cjs/api/classes/viewer.js.map +1 -1
- package/dist/lib-cjs/api/classes/viewerLight.d.ts +66 -66
- package/dist/lib-cjs/api/classes/viewerLight.js +392 -392
- package/dist/lib-cjs/api/internal/debugViewer.d.ts +13 -13
- package/dist/lib-cjs/api/internal/debugViewer.js +86 -86
- package/dist/lib-cjs/api/internal/lensRendering.d.ts +8 -8
- package/dist/lib-cjs/api/internal/lensRendering.js +11 -11
- package/dist/lib-cjs/api/internal/sceneSetup.d.ts +13 -10
- package/dist/lib-cjs/api/internal/sceneSetup.js +238 -234
- package/dist/lib-cjs/api/internal/sceneSetup.js.map +1 -1
- package/dist/lib-cjs/api/manager/animationManager.d.ts +29 -29
- package/dist/lib-cjs/api/manager/animationManager.js +130 -130
- package/dist/lib-cjs/api/manager/gltfExportManager.d.ts +65 -65
- package/dist/lib-cjs/api/manager/gltfExportManager.js +223 -222
- package/dist/lib-cjs/api/manager/gltfExportManager.js.map +1 -1
- package/dist/lib-cjs/api/manager/sceneManager.d.ts +31 -32
- package/dist/lib-cjs/api/manager/sceneManager.js +153 -132
- package/dist/lib-cjs/api/manager/sceneManager.js.map +1 -1
- package/dist/lib-cjs/api/manager/variantInstanceManager.d.ts +92 -92
- package/dist/lib-cjs/api/manager/variantInstanceManager.js +335 -335
- package/dist/lib-cjs/api/store/specStorage.d.ts +24 -24
- package/dist/lib-cjs/api/store/specStorage.js +51 -51
- package/dist/lib-cjs/api/util/babylonHelper.d.ts +174 -166
- package/dist/lib-cjs/api/util/babylonHelper.js +575 -497
- package/dist/lib-cjs/api/util/babylonHelper.js.map +1 -1
- package/dist/lib-cjs/api/util/globalTypes.d.ts +366 -356
- package/dist/lib-cjs/api/util/globalTypes.js +1 -1
- package/dist/lib-cjs/api/util/resourceHelper.d.ts +58 -53
- package/dist/lib-cjs/api/util/resourceHelper.js +257 -242
- package/dist/lib-cjs/api/util/resourceHelper.js.map +1 -1
- package/dist/lib-cjs/api/util/stringHelper.d.ts +9 -9
- package/dist/lib-cjs/api/util/stringHelper.js +25 -25
- package/dist/lib-cjs/api/util/structureHelper.d.ts +9 -9
- package/dist/lib-cjs/api/util/structureHelper.js +48 -44
- package/dist/lib-cjs/api/util/structureHelper.js.map +1 -1
- package/dist/lib-cjs/buildinfo.json +3 -3
- package/dist/lib-cjs/index.d.ts +49 -49
- package/dist/lib-cjs/index.js +89 -89
- package/dist/webpack-stats.json +0 -0
- package/package.json +87 -87
- package/src/api/classes/animationInterface.ts +10 -10
- package/src/api/classes/dottedPath.ts +181 -181
- package/src/api/classes/element.ts +690 -692
- package/src/api/classes/event.ts +367 -367
- package/src/api/classes/eventBroadcaster.ts +52 -52
- package/src/api/classes/parameter.ts +474 -405
- package/src/api/classes/parameterObservable.ts +100 -100
- package/src/api/classes/parameterizable.ts +87 -87
- package/src/api/classes/placementAnimation.ts +160 -160
- package/src/api/classes/variant.ts +845 -845
- package/src/api/classes/variantInstance.ts +97 -97
- package/src/api/classes/variantParameterizable.ts +85 -85
- package/src/api/classes/viewer.ts +650 -624
- package/src/api/classes/viewerLight.ts +334 -334
- package/src/api/internal/debugViewer.ts +90 -90
- package/src/api/internal/lensRendering.ts +10 -10
- package/src/api/internal/sceneSetup.ts +204 -201
- package/src/api/manager/animationManager.ts +142 -142
- package/src/api/manager/gltfExportManager.ts +191 -191
- package/src/api/manager/sceneManager.ts +128 -102
- package/src/api/manager/variantInstanceManager.ts +265 -265
- package/src/api/store/specStorage.ts +51 -51
- package/src/api/util/babylonHelper.ts +628 -538
- package/src/api/util/globalTypes.ts +413 -402
- package/src/api/util/resourceHelper.ts +189 -173
- package/src/api/util/stringHelper.ts +23 -23
- package/src/api/util/structureHelper.ts +49 -43
- package/src/buildinfo.json +3 -3
- package/src/commonjs.tsconfig.json +10 -10
- package/src/declaration.tsconfig.json +8 -8
- package/src/dev.ts +42 -42
- package/src/es6.tsconfig.json +10 -10
- package/src/index.ts +94 -94
- package/src/pagesconfig.json +77 -73
- package/src/tsconfig.json +32 -32
- package/src/tsconfig.types.json +9 -9
- package/src/types.d.ts +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../../src/api/classes/parameter.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAC1D,iEAA4D;AAC5D,uCAA6D;AAE7D;;;;GAIG;AACH;IACE;;OAEG;IACH;IAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"parameter.js","sourceRoot":"","sources":["../../../../src/api/classes/parameter.ts"],"names":[],"mappings":";;;AAAA,+DAA0D;AAC1D,iEAA4D;AAC5D,uCAA6D;AAE7D;;;;GAIG;AACH;IACE;;OAEG;IACH;IAAuB,CAAC;IA8RxB,sBAAkB,yBAAY;QAH9B;;WAEG;aACH;YACE,IAAM,YAAY,GAA0B,EAAE,CAAC;YAC/C,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,YAAY,EAAE,CAAC;YACtF,YAAY,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,WAAW,EAAE,CAAC;YACpF,YAAY,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,WAAW,EAAE,CAAC;YACrF,YAAY,CAAC,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,WAAW,EAAE,CAAC;YACrF,YAAY,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC,YAAY,EAAE,CAAC;YAC1F,YAAY,CAAC,SAAS,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;;;;OAOG;IACoB,2BAAiB,GAAG,mBAAmB,CAAC;IAE/D;;;;;;;OAOG;IACoB,8BAAoB,GAAG,sBAAsB,CAAC;IAErE;;;;;;;OAOG;IACoB,+BAAqB,GAAG,uBAAuB,CAAC;IAEvE;;;;;;;OAOG;IACoB,gCAAsB,GAAG,wBAAwB,CAAC;IAEzE;;;;;;;;;;OAUG;IACoB,gCAAsB,GAAG,wBAAwB,CAAC;IAmL3E,gBAAC;CAAA,AAhdD,IAgdC;AAhdY,8BAAS"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { EventBroadcaster } from './eventBroadcaster';
|
|
2
|
-
export declare abstract class ParameterObservable extends EventBroadcaster {
|
|
3
|
-
readonly uuid: string;
|
|
4
|
-
readonly parameters: ParameterBag;
|
|
5
|
-
protected readonly parameterDeclaration: ParameterDeclarations;
|
|
6
|
-
protected parameterObservers: Map<string, ParameterObserver[]>;
|
|
7
|
-
protected constructor(parameterDeclaration?: ParameterDeclarations, parameters?: ParameterBag);
|
|
8
|
-
/**
|
|
9
|
-
* The uuid (if not overloaded).
|
|
10
|
-
*/
|
|
11
|
-
get id(): string;
|
|
12
|
-
/**
|
|
13
|
-
* Adds an observer function for parameter changes.
|
|
14
|
-
* The {@link ParameterObserver} gets 3 parameters: the {@link ParameterObservable}, the old {@link ParameterValue}
|
|
15
|
-
* and the new {@link ParameterValue}.
|
|
16
|
-
*
|
|
17
|
-
* See {@page Parameters} for an example.
|
|
18
|
-
*/
|
|
19
|
-
addParameterObserver(parameter: string, observer: ParameterObserver): ParameterObservable;
|
|
20
|
-
/**
|
|
21
|
-
* Removes all {@link ParameterObserver}s for given parameter.
|
|
22
|
-
*/
|
|
23
|
-
removeParameterObservers(parameter: string): ParameterObservable;
|
|
24
|
-
/**
|
|
25
|
-
* Invoke parameter observers for given parameter.
|
|
26
|
-
*/
|
|
27
|
-
commitParameter(parameter: string, value: ParameterValue): Promise<ParameterObservable>;
|
|
28
|
-
/**
|
|
29
|
-
* Invoke parameter observers for given parameters.
|
|
30
|
-
*/
|
|
31
|
-
abstract commitParameters(parameters?: ParameterBag): Promise<ParameterObservable>;
|
|
32
|
-
/**
|
|
33
|
-
* Asserts whether given parameter is declared and valid.
|
|
34
|
-
*/
|
|
35
|
-
assertParameter(parameterDeclaration: ParameterDeclarations, parameter: string, value: ParameterValue): void;
|
|
36
|
-
}
|
|
1
|
+
import { EventBroadcaster } from './eventBroadcaster';
|
|
2
|
+
export declare abstract class ParameterObservable extends EventBroadcaster {
|
|
3
|
+
readonly uuid: string;
|
|
4
|
+
readonly parameters: ParameterBag;
|
|
5
|
+
protected readonly parameterDeclaration: ParameterDeclarations;
|
|
6
|
+
protected parameterObservers: Map<string, ParameterObserver[]>;
|
|
7
|
+
protected constructor(parameterDeclaration?: ParameterDeclarations, parameters?: ParameterBag);
|
|
8
|
+
/**
|
|
9
|
+
* The uuid (if not overloaded).
|
|
10
|
+
*/
|
|
11
|
+
get id(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Adds an observer function for parameter changes.
|
|
14
|
+
* The {@link ParameterObserver} gets 3 parameters: the {@link ParameterObservable}, the old {@link ParameterValue}
|
|
15
|
+
* and the new {@link ParameterValue}.
|
|
16
|
+
*
|
|
17
|
+
* See {@page Parameters} for an example.
|
|
18
|
+
*/
|
|
19
|
+
addParameterObserver(parameter: string, observer: ParameterObserver): ParameterObservable;
|
|
20
|
+
/**
|
|
21
|
+
* Removes all {@link ParameterObserver}s for given parameter.
|
|
22
|
+
*/
|
|
23
|
+
removeParameterObservers(parameter: string): ParameterObservable;
|
|
24
|
+
/**
|
|
25
|
+
* Invoke parameter observers for given parameter.
|
|
26
|
+
*/
|
|
27
|
+
commitParameter(parameter: string, value: ParameterValue): Promise<ParameterObservable>;
|
|
28
|
+
/**
|
|
29
|
+
* Invoke parameter observers for given parameters.
|
|
30
|
+
*/
|
|
31
|
+
abstract commitParameters(parameters?: ParameterBag): Promise<ParameterObservable>;
|
|
32
|
+
/**
|
|
33
|
+
* Asserts whether given parameter is declared and valid.
|
|
34
|
+
*/
|
|
35
|
+
assertParameter(parameterDeclaration: ParameterDeclarations, parameter: string, value: ParameterValue): void;
|
|
36
|
+
}
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ParameterObservable = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var lodash_es_1 = require("lodash-es");
|
|
6
|
-
var stringHelper_1 = require("../util/stringHelper");
|
|
7
|
-
var eventBroadcaster_1 = require("./eventBroadcaster");
|
|
8
|
-
var ParameterObservable = /** @class */ (function (_super) {
|
|
9
|
-
tslib_1.__extends(ParameterObservable, _super);
|
|
10
|
-
function ParameterObservable(parameterDeclaration, parameters) {
|
|
11
|
-
if (parameterDeclaration === void 0) { parameterDeclaration = {}; }
|
|
12
|
-
if (parameters === void 0) { parameters = {}; }
|
|
13
|
-
var _this = _super.call(this) || this;
|
|
14
|
-
_this.parameters = {};
|
|
15
|
-
_this.parameterDeclaration = {};
|
|
16
|
-
_this.parameterObservers = new Map();
|
|
17
|
-
_this.uuid = stringHelper_1.uuidv4();
|
|
18
|
-
_this.parameterDeclaration = lodash_es_1.merge(_this.parameterDeclaration, parameterDeclaration);
|
|
19
|
-
_this.parameters = lodash_es_1.merge(_this.parameters, parameters);
|
|
20
|
-
return _this;
|
|
21
|
-
}
|
|
22
|
-
Object.defineProperty(ParameterObservable.prototype, "id", {
|
|
23
|
-
/**
|
|
24
|
-
* The uuid (if not overloaded).
|
|
25
|
-
*/
|
|
26
|
-
get: function () {
|
|
27
|
-
return this.uuid;
|
|
28
|
-
},
|
|
29
|
-
enumerable: false,
|
|
30
|
-
configurable: true
|
|
31
|
-
});
|
|
32
|
-
/**
|
|
33
|
-
* Adds an observer function for parameter changes.
|
|
34
|
-
* The {@link ParameterObserver} gets 3 parameters: the {@link ParameterObservable}, the old {@link ParameterValue}
|
|
35
|
-
* and the new {@link ParameterValue}.
|
|
36
|
-
*
|
|
37
|
-
* See {@page Parameters} for an example.
|
|
38
|
-
*/
|
|
39
|
-
ParameterObservable.prototype.addParameterObserver = function (parameter, observer) {
|
|
40
|
-
if (this.parameterObservers.has(parameter)) {
|
|
41
|
-
this.parameterObservers.get(parameter).push(observer);
|
|
42
|
-
return this;
|
|
43
|
-
}
|
|
44
|
-
this.parameterObservers.set(parameter, [observer]);
|
|
45
|
-
return this;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Removes all {@link ParameterObserver}s for given parameter.
|
|
49
|
-
*/
|
|
50
|
-
ParameterObservable.prototype.removeParameterObservers = function (parameter) {
|
|
51
|
-
this.parameterObservers.delete(parameter);
|
|
52
|
-
return this;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Invoke parameter observers for given parameter.
|
|
56
|
-
*/
|
|
57
|
-
ParameterObservable.prototype.commitParameter = function (parameter, value) {
|
|
58
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
59
|
-
var parameters;
|
|
60
|
-
return tslib_1.__generator(this, function (_a) {
|
|
61
|
-
parameters = {};
|
|
62
|
-
parameters[parameter] = value;
|
|
63
|
-
return [2 /*return*/, this.commitParameters(parameters)];
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
/**
|
|
68
|
-
* Asserts whether given parameter is declared and valid.
|
|
69
|
-
*/
|
|
70
|
-
ParameterObservable.prototype.assertParameter = function (parameterDeclaration, parameter, value) {
|
|
71
|
-
if (!(parameter in parameterDeclaration)) {
|
|
72
|
-
// This is a valid case since we are not able to check parameters that are not declared.
|
|
73
|
-
// We just ignore parameters that are not declared.
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
var declaration = parameterDeclaration[parameter];
|
|
77
|
-
var genericError = "\"" + value + "\" is not a valid value for parameter \"" + parameter + "\" of type. " +
|
|
78
|
-
("\"" + declaration.type + "\" for " + this.constructor.name + " \"" + this.id + "\".");
|
|
79
|
-
if (declaration.parser) {
|
|
80
|
-
try {
|
|
81
|
-
declaration.parser(value);
|
|
82
|
-
}
|
|
83
|
-
catch (e) {
|
|
84
|
-
throw Error(genericError + e.message);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
switch (declaration.type) {
|
|
88
|
-
case 'select':
|
|
89
|
-
if (!declaration.options) {
|
|
90
|
-
throw Error("No options defined for parameter declaration \"" + parameter + "\"" +
|
|
91
|
-
("of type \"" + declaration.type + "\" for " + this.constructor.name + " \"" + this.id + "\"."));
|
|
92
|
-
}
|
|
93
|
-
if (declaration.options.indexOf(value) === -1) {
|
|
94
|
-
throw Error(genericError + (" Valid values are: \"" + declaration.options.join('", "') + "\"."));
|
|
95
|
-
}
|
|
96
|
-
break;
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
return ParameterObservable;
|
|
100
|
-
}(eventBroadcaster_1.EventBroadcaster));
|
|
101
|
-
exports.ParameterObservable = ParameterObservable;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterObservable = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var lodash_es_1 = require("lodash-es");
|
|
6
|
+
var stringHelper_1 = require("../util/stringHelper");
|
|
7
|
+
var eventBroadcaster_1 = require("./eventBroadcaster");
|
|
8
|
+
var ParameterObservable = /** @class */ (function (_super) {
|
|
9
|
+
tslib_1.__extends(ParameterObservable, _super);
|
|
10
|
+
function ParameterObservable(parameterDeclaration, parameters) {
|
|
11
|
+
if (parameterDeclaration === void 0) { parameterDeclaration = {}; }
|
|
12
|
+
if (parameters === void 0) { parameters = {}; }
|
|
13
|
+
var _this = _super.call(this) || this;
|
|
14
|
+
_this.parameters = {};
|
|
15
|
+
_this.parameterDeclaration = {};
|
|
16
|
+
_this.parameterObservers = new Map();
|
|
17
|
+
_this.uuid = stringHelper_1.uuidv4();
|
|
18
|
+
_this.parameterDeclaration = lodash_es_1.merge(_this.parameterDeclaration, parameterDeclaration);
|
|
19
|
+
_this.parameters = lodash_es_1.merge(_this.parameters, parameters);
|
|
20
|
+
return _this;
|
|
21
|
+
}
|
|
22
|
+
Object.defineProperty(ParameterObservable.prototype, "id", {
|
|
23
|
+
/**
|
|
24
|
+
* The uuid (if not overloaded).
|
|
25
|
+
*/
|
|
26
|
+
get: function () {
|
|
27
|
+
return this.uuid;
|
|
28
|
+
},
|
|
29
|
+
enumerable: false,
|
|
30
|
+
configurable: true
|
|
31
|
+
});
|
|
32
|
+
/**
|
|
33
|
+
* Adds an observer function for parameter changes.
|
|
34
|
+
* The {@link ParameterObserver} gets 3 parameters: the {@link ParameterObservable}, the old {@link ParameterValue}
|
|
35
|
+
* and the new {@link ParameterValue}.
|
|
36
|
+
*
|
|
37
|
+
* See {@page Parameters} for an example.
|
|
38
|
+
*/
|
|
39
|
+
ParameterObservable.prototype.addParameterObserver = function (parameter, observer) {
|
|
40
|
+
if (this.parameterObservers.has(parameter)) {
|
|
41
|
+
this.parameterObservers.get(parameter).push(observer);
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
this.parameterObservers.set(parameter, [observer]);
|
|
45
|
+
return this;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Removes all {@link ParameterObserver}s for given parameter.
|
|
49
|
+
*/
|
|
50
|
+
ParameterObservable.prototype.removeParameterObservers = function (parameter) {
|
|
51
|
+
this.parameterObservers.delete(parameter);
|
|
52
|
+
return this;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Invoke parameter observers for given parameter.
|
|
56
|
+
*/
|
|
57
|
+
ParameterObservable.prototype.commitParameter = function (parameter, value) {
|
|
58
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
59
|
+
var parameters;
|
|
60
|
+
return tslib_1.__generator(this, function (_a) {
|
|
61
|
+
parameters = {};
|
|
62
|
+
parameters[parameter] = value;
|
|
63
|
+
return [2 /*return*/, this.commitParameters(parameters)];
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Asserts whether given parameter is declared and valid.
|
|
69
|
+
*/
|
|
70
|
+
ParameterObservable.prototype.assertParameter = function (parameterDeclaration, parameter, value) {
|
|
71
|
+
if (!(parameter in parameterDeclaration)) {
|
|
72
|
+
// This is a valid case since we are not able to check parameters that are not declared.
|
|
73
|
+
// We just ignore parameters that are not declared.
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
var declaration = parameterDeclaration[parameter];
|
|
77
|
+
var genericError = "\"" + value + "\" is not a valid value for parameter \"" + parameter + "\" of type. " +
|
|
78
|
+
("\"" + declaration.type + "\" for " + this.constructor.name + " \"" + this.id + "\".");
|
|
79
|
+
if (declaration.parser) {
|
|
80
|
+
try {
|
|
81
|
+
declaration.parser(value);
|
|
82
|
+
}
|
|
83
|
+
catch (e) {
|
|
84
|
+
throw Error(genericError + e.message);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
switch (declaration.type) {
|
|
88
|
+
case 'select':
|
|
89
|
+
if (!declaration.options) {
|
|
90
|
+
throw Error("No options defined for parameter declaration \"" + parameter + "\"" +
|
|
91
|
+
("of type \"" + declaration.type + "\" for " + this.constructor.name + " \"" + this.id + "\"."));
|
|
92
|
+
}
|
|
93
|
+
if (declaration.options.indexOf(value) === -1) {
|
|
94
|
+
throw Error(genericError + (" Valid values are: \"" + declaration.options.join('", "') + "\"."));
|
|
95
|
+
}
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return ParameterObservable;
|
|
100
|
+
}(eventBroadcaster_1.EventBroadcaster));
|
|
101
|
+
exports.ParameterObservable = ParameterObservable;
|
|
102
102
|
//# sourceMappingURL=parameterObservable.js.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ParameterObservable } from './parameterObservable';
|
|
2
|
-
export declare abstract class Parameterizable extends ParameterObservable {
|
|
3
|
-
protected parameterDeclaration: ParameterDeclarations;
|
|
4
|
-
get visible(): boolean | undefined;
|
|
5
|
-
get highlighted(): boolean | undefined;
|
|
6
|
-
get material(): string | undefined;
|
|
7
|
-
get scaling(): string | undefined;
|
|
8
|
-
get position(): string | undefined;
|
|
9
|
-
get rotation(): string | undefined;
|
|
10
|
-
get castShadow(): boolean | undefined;
|
|
11
|
-
show(): Promise<ParameterObservable>;
|
|
12
|
-
hide(): Promise<ParameterObservable>;
|
|
13
|
-
toggle(): Promise<ParameterObservable>;
|
|
14
|
-
toggleHighlight(): Promise<ParameterObservable>;
|
|
15
|
-
}
|
|
1
|
+
import { ParameterObservable } from './parameterObservable';
|
|
2
|
+
export declare abstract class Parameterizable extends ParameterObservable {
|
|
3
|
+
protected parameterDeclaration: ParameterDeclarations;
|
|
4
|
+
get visible(): boolean | undefined;
|
|
5
|
+
get highlighted(): boolean | undefined;
|
|
6
|
+
get material(): string | undefined;
|
|
7
|
+
get scaling(): string | undefined;
|
|
8
|
+
get position(): string | undefined;
|
|
9
|
+
get rotation(): string | undefined;
|
|
10
|
+
get castShadow(): boolean | undefined;
|
|
11
|
+
show(): Promise<ParameterObservable>;
|
|
12
|
+
hide(): Promise<ParameterObservable>;
|
|
13
|
+
toggle(): Promise<ParameterObservable>;
|
|
14
|
+
toggleHighlight(): Promise<ParameterObservable>;
|
|
15
|
+
}
|
|
@@ -1,150 +1,150 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Parameterizable = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var parameter_1 = require("./parameter");
|
|
6
|
-
var parameterObservable_1 = require("./parameterObservable");
|
|
7
|
-
var Parameterizable = /** @class */ (function (_super) {
|
|
8
|
-
tslib_1.__extends(Parameterizable, _super);
|
|
9
|
-
function Parameterizable() {
|
|
10
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
-
_this.parameterDeclaration = parameter_1.Parameter.declarations;
|
|
12
|
-
return _this;
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(Parameterizable.prototype, "visible", {
|
|
15
|
-
get: function () {
|
|
16
|
-
if (!(parameter_1.Parameter.VISIBLE in this.parameters)) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
return parameter_1.Parameter.parseBoolean(this.parameters[parameter_1.Parameter.VISIBLE]);
|
|
21
|
-
}
|
|
22
|
-
catch (e) {
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
enumerable: false,
|
|
27
|
-
configurable: true
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(Parameterizable.prototype, "highlighted", {
|
|
30
|
-
get: function () {
|
|
31
|
-
if (!(parameter_1.Parameter.HIGHLIGHTED in this.parameters)) {
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
try {
|
|
35
|
-
return parameter_1.Parameter.parseBoolean(this.parameters[parameter_1.Parameter.HIGHLIGHTED]);
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
return undefined;
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
enumerable: false,
|
|
42
|
-
configurable: true
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(Parameterizable.prototype, "material", {
|
|
45
|
-
get: function () {
|
|
46
|
-
if (!(parameter_1.Parameter.MATERIAL in this.parameters)) {
|
|
47
|
-
return undefined;
|
|
48
|
-
}
|
|
49
|
-
return this.parameters[parameter_1.Parameter.MATERIAL].toString();
|
|
50
|
-
},
|
|
51
|
-
enumerable: false,
|
|
52
|
-
configurable: true
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(Parameterizable.prototype, "scaling", {
|
|
55
|
-
get: function () {
|
|
56
|
-
if (!(parameter_1.Parameter.SCALING in this.parameters)) {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
return this.parameters[parameter_1.Parameter.SCALING].toString();
|
|
60
|
-
},
|
|
61
|
-
enumerable: false,
|
|
62
|
-
configurable: true
|
|
63
|
-
});
|
|
64
|
-
Object.defineProperty(Parameterizable.prototype, "position", {
|
|
65
|
-
get: function () {
|
|
66
|
-
if (!(parameter_1.Parameter.POSITION in this.parameters)) {
|
|
67
|
-
return undefined;
|
|
68
|
-
}
|
|
69
|
-
return this.parameters[parameter_1.Parameter.POSITION].toString();
|
|
70
|
-
},
|
|
71
|
-
enumerable: false,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(Parameterizable.prototype, "rotation", {
|
|
75
|
-
get: function () {
|
|
76
|
-
if (!(parameter_1.Parameter.ROTATION in this.parameters)) {
|
|
77
|
-
return undefined;
|
|
78
|
-
}
|
|
79
|
-
return this.parameters[parameter_1.Parameter.ROTATION].toString();
|
|
80
|
-
},
|
|
81
|
-
enumerable: false,
|
|
82
|
-
configurable: true
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(Parameterizable.prototype, "castShadow", {
|
|
85
|
-
get: function () {
|
|
86
|
-
if (!(parameter_1.Parameter.CAST_SHADOW in this.parameters)) {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
try {
|
|
90
|
-
return parameter_1.Parameter.parseBoolean(this.parameters[parameter_1.Parameter.CAST_SHADOW]);
|
|
91
|
-
}
|
|
92
|
-
catch (e) {
|
|
93
|
-
return undefined;
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
enumerable: false,
|
|
97
|
-
configurable: true
|
|
98
|
-
});
|
|
99
|
-
Parameterizable.prototype.show = function () {
|
|
100
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
101
|
-
return tslib_1.__generator(this, function (_a) {
|
|
102
|
-
switch (_a.label) {
|
|
103
|
-
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, true)];
|
|
104
|
-
case 1:
|
|
105
|
-
_a.sent();
|
|
106
|
-
return [2 /*return*/, this];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
Parameterizable.prototype.hide = function () {
|
|
112
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
113
|
-
return tslib_1.__generator(this, function (_a) {
|
|
114
|
-
switch (_a.label) {
|
|
115
|
-
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, false)];
|
|
116
|
-
case 1:
|
|
117
|
-
_a.sent();
|
|
118
|
-
return [2 /*return*/, this];
|
|
119
|
-
}
|
|
120
|
-
});
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
Parameterizable.prototype.toggle = function () {
|
|
124
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
125
|
-
return tslib_1.__generator(this, function (_a) {
|
|
126
|
-
switch (_a.label) {
|
|
127
|
-
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, !this.visible)];
|
|
128
|
-
case 1:
|
|
129
|
-
_a.sent();
|
|
130
|
-
return [2 /*return*/, this];
|
|
131
|
-
}
|
|
132
|
-
});
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
|
-
Parameterizable.prototype.toggleHighlight = function () {
|
|
136
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
137
|
-
return tslib_1.__generator(this, function (_a) {
|
|
138
|
-
switch (_a.label) {
|
|
139
|
-
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.HIGHLIGHTED, !this.highlighted)];
|
|
140
|
-
case 1:
|
|
141
|
-
_a.sent();
|
|
142
|
-
return [2 /*return*/, this];
|
|
143
|
-
}
|
|
144
|
-
});
|
|
145
|
-
});
|
|
146
|
-
};
|
|
147
|
-
return Parameterizable;
|
|
148
|
-
}(parameterObservable_1.ParameterObservable));
|
|
149
|
-
exports.Parameterizable = Parameterizable;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Parameterizable = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var parameter_1 = require("./parameter");
|
|
6
|
+
var parameterObservable_1 = require("./parameterObservable");
|
|
7
|
+
var Parameterizable = /** @class */ (function (_super) {
|
|
8
|
+
tslib_1.__extends(Parameterizable, _super);
|
|
9
|
+
function Parameterizable() {
|
|
10
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
+
_this.parameterDeclaration = parameter_1.Parameter.declarations;
|
|
12
|
+
return _this;
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(Parameterizable.prototype, "visible", {
|
|
15
|
+
get: function () {
|
|
16
|
+
if (!(parameter_1.Parameter.VISIBLE in this.parameters)) {
|
|
17
|
+
return undefined;
|
|
18
|
+
}
|
|
19
|
+
try {
|
|
20
|
+
return parameter_1.Parameter.parseBoolean(this.parameters[parameter_1.Parameter.VISIBLE]);
|
|
21
|
+
}
|
|
22
|
+
catch (e) {
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
enumerable: false,
|
|
27
|
+
configurable: true
|
|
28
|
+
});
|
|
29
|
+
Object.defineProperty(Parameterizable.prototype, "highlighted", {
|
|
30
|
+
get: function () {
|
|
31
|
+
if (!(parameter_1.Parameter.HIGHLIGHTED in this.parameters)) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
try {
|
|
35
|
+
return parameter_1.Parameter.parseBoolean(this.parameters[parameter_1.Parameter.HIGHLIGHTED]);
|
|
36
|
+
}
|
|
37
|
+
catch (e) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
enumerable: false,
|
|
42
|
+
configurable: true
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(Parameterizable.prototype, "material", {
|
|
45
|
+
get: function () {
|
|
46
|
+
if (!(parameter_1.Parameter.MATERIAL in this.parameters)) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
return this.parameters[parameter_1.Parameter.MATERIAL].toString();
|
|
50
|
+
},
|
|
51
|
+
enumerable: false,
|
|
52
|
+
configurable: true
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(Parameterizable.prototype, "scaling", {
|
|
55
|
+
get: function () {
|
|
56
|
+
if (!(parameter_1.Parameter.SCALING in this.parameters)) {
|
|
57
|
+
return undefined;
|
|
58
|
+
}
|
|
59
|
+
return this.parameters[parameter_1.Parameter.SCALING].toString();
|
|
60
|
+
},
|
|
61
|
+
enumerable: false,
|
|
62
|
+
configurable: true
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(Parameterizable.prototype, "position", {
|
|
65
|
+
get: function () {
|
|
66
|
+
if (!(parameter_1.Parameter.POSITION in this.parameters)) {
|
|
67
|
+
return undefined;
|
|
68
|
+
}
|
|
69
|
+
return this.parameters[parameter_1.Parameter.POSITION].toString();
|
|
70
|
+
},
|
|
71
|
+
enumerable: false,
|
|
72
|
+
configurable: true
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(Parameterizable.prototype, "rotation", {
|
|
75
|
+
get: function () {
|
|
76
|
+
if (!(parameter_1.Parameter.ROTATION in this.parameters)) {
|
|
77
|
+
return undefined;
|
|
78
|
+
}
|
|
79
|
+
return this.parameters[parameter_1.Parameter.ROTATION].toString();
|
|
80
|
+
},
|
|
81
|
+
enumerable: false,
|
|
82
|
+
configurable: true
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(Parameterizable.prototype, "castShadow", {
|
|
85
|
+
get: function () {
|
|
86
|
+
if (!(parameter_1.Parameter.CAST_SHADOW in this.parameters)) {
|
|
87
|
+
return undefined;
|
|
88
|
+
}
|
|
89
|
+
try {
|
|
90
|
+
return parameter_1.Parameter.parseBoolean(this.parameters[parameter_1.Parameter.CAST_SHADOW]);
|
|
91
|
+
}
|
|
92
|
+
catch (e) {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
enumerable: false,
|
|
97
|
+
configurable: true
|
|
98
|
+
});
|
|
99
|
+
Parameterizable.prototype.show = function () {
|
|
100
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
101
|
+
return tslib_1.__generator(this, function (_a) {
|
|
102
|
+
switch (_a.label) {
|
|
103
|
+
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, true)];
|
|
104
|
+
case 1:
|
|
105
|
+
_a.sent();
|
|
106
|
+
return [2 /*return*/, this];
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
Parameterizable.prototype.hide = function () {
|
|
112
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
113
|
+
return tslib_1.__generator(this, function (_a) {
|
|
114
|
+
switch (_a.label) {
|
|
115
|
+
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, false)];
|
|
116
|
+
case 1:
|
|
117
|
+
_a.sent();
|
|
118
|
+
return [2 /*return*/, this];
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
Parameterizable.prototype.toggle = function () {
|
|
124
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
125
|
+
return tslib_1.__generator(this, function (_a) {
|
|
126
|
+
switch (_a.label) {
|
|
127
|
+
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, !this.visible)];
|
|
128
|
+
case 1:
|
|
129
|
+
_a.sent();
|
|
130
|
+
return [2 /*return*/, this];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
};
|
|
135
|
+
Parameterizable.prototype.toggleHighlight = function () {
|
|
136
|
+
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
137
|
+
return tslib_1.__generator(this, function (_a) {
|
|
138
|
+
switch (_a.label) {
|
|
139
|
+
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.HIGHLIGHTED, !this.highlighted)];
|
|
140
|
+
case 1:
|
|
141
|
+
_a.sent();
|
|
142
|
+
return [2 /*return*/, this];
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
};
|
|
147
|
+
return Parameterizable;
|
|
148
|
+
}(parameterObservable_1.ParameterObservable));
|
|
149
|
+
exports.Parameterizable = Parameterizable;
|
|
150
150
|
//# sourceMappingURL=parameterizable.js.map
|