@combeenation/3d-viewer 4.0.0-beta4 → 4.0.0-beta5

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.
Files changed (106) hide show
  1. package/README.md +114 -112
  2. package/dist/lib-cjs/api/classes/animationInterface.d.ts +8 -8
  3. package/dist/lib-cjs/api/classes/animationInterface.js +1 -1
  4. package/dist/lib-cjs/api/classes/dottedPath.d.ts +79 -79
  5. package/dist/lib-cjs/api/classes/dottedPath.js +190 -190
  6. package/dist/lib-cjs/api/classes/element.d.ts +130 -125
  7. package/dist/lib-cjs/api/classes/element.js +743 -682
  8. package/dist/lib-cjs/api/classes/element.js.map +1 -1
  9. package/dist/lib-cjs/api/classes/elementParameterizable.d.ts +14 -14
  10. package/dist/lib-cjs/api/classes/elementParameterizable.js +134 -134
  11. package/dist/lib-cjs/api/classes/event.d.ts +326 -312
  12. package/dist/lib-cjs/api/classes/event.js +371 -357
  13. package/dist/lib-cjs/api/classes/event.js.map +1 -1
  14. package/dist/lib-cjs/api/classes/eventBroadcaster.d.ts +26 -26
  15. package/dist/lib-cjs/api/classes/eventBroadcaster.js +53 -53
  16. package/dist/lib-cjs/api/classes/parameter.d.ts +259 -165
  17. package/dist/lib-cjs/api/classes/parameter.js +387 -267
  18. package/dist/lib-cjs/api/classes/parameter.js.map +1 -1
  19. package/dist/lib-cjs/api/classes/parameterObservable.d.ts +36 -36
  20. package/dist/lib-cjs/api/classes/parameterObservable.js +101 -126
  21. package/dist/lib-cjs/api/classes/parameterObservable.js.map +1 -1
  22. package/dist/lib-cjs/api/classes/parameterizable.d.ts +15 -15
  23. package/dist/lib-cjs/api/classes/parameterizable.js +149 -149
  24. package/dist/lib-cjs/api/classes/placementAnimation.d.ts +38 -38
  25. package/dist/lib-cjs/api/classes/placementAnimation.js +149 -138
  26. package/dist/lib-cjs/api/classes/placementAnimation.js.map +1 -1
  27. package/dist/lib-cjs/api/classes/variant.d.ts +234 -190
  28. package/dist/lib-cjs/api/classes/variant.js +1147 -873
  29. package/dist/lib-cjs/api/classes/variant.js.map +1 -1
  30. package/dist/lib-cjs/api/classes/variantInstance.d.ts +45 -41
  31. package/dist/lib-cjs/api/classes/variantInstance.js +108 -98
  32. package/dist/lib-cjs/api/classes/variantInstance.js.map +1 -1
  33. package/dist/lib-cjs/api/classes/variantParameterizable.d.ts +17 -17
  34. package/dist/lib-cjs/api/classes/variantParameterizable.js +92 -92
  35. package/dist/lib-cjs/api/classes/viewer.d.ts +131 -128
  36. package/dist/lib-cjs/api/classes/viewer.js +560 -486
  37. package/dist/lib-cjs/api/classes/viewer.js.map +1 -1
  38. package/dist/lib-cjs/api/classes/viewerLight.d.ts +66 -65
  39. package/dist/lib-cjs/api/classes/viewerLight.js +389 -322
  40. package/dist/lib-cjs/api/classes/viewerLight.js.map +1 -1
  41. package/dist/lib-cjs/api/internal/debugViewer.d.ts +13 -13
  42. package/dist/lib-cjs/api/internal/debugViewer.js +87 -87
  43. package/dist/lib-cjs/api/internal/lensRendering.d.ts +8 -8
  44. package/dist/lib-cjs/api/internal/lensRendering.js +11 -11
  45. package/dist/lib-cjs/api/internal/sceneSetup.d.ts +10 -6
  46. package/dist/lib-cjs/api/internal/sceneSetup.js +231 -227
  47. package/dist/lib-cjs/api/internal/sceneSetup.js.map +1 -1
  48. package/dist/lib-cjs/api/manager/animationManager.d.ts +29 -29
  49. package/dist/lib-cjs/api/manager/animationManager.js +121 -121
  50. package/dist/lib-cjs/api/manager/sceneManager.d.ts +32 -32
  51. package/dist/lib-cjs/api/manager/sceneManager.js +132 -132
  52. package/dist/lib-cjs/api/manager/variantInstanceManager.d.ts +90 -90
  53. package/dist/lib-cjs/api/manager/variantInstanceManager.js +321 -321
  54. package/dist/lib-cjs/api/store/specStorage.d.ts +24 -24
  55. package/dist/lib-cjs/api/store/specStorage.js +51 -51
  56. package/dist/lib-cjs/api/util/babylonHelper.d.ts +175 -125
  57. package/dist/lib-cjs/api/util/babylonHelper.js +520 -368
  58. package/dist/lib-cjs/api/util/babylonHelper.js.map +1 -1
  59. package/dist/lib-cjs/api/util/globalTypes.d.ts +333 -279
  60. package/dist/lib-cjs/api/util/globalTypes.js +1 -1
  61. package/dist/lib-cjs/api/util/resourceHelper.d.ts +53 -51
  62. package/dist/lib-cjs/api/util/resourceHelper.js +240 -243
  63. package/dist/lib-cjs/api/util/resourceHelper.js.map +1 -1
  64. package/dist/lib-cjs/api/util/stringHelper.d.ts +9 -9
  65. package/dist/lib-cjs/api/util/stringHelper.js +25 -25
  66. package/dist/lib-cjs/buildinfo.json +3 -3
  67. package/dist/lib-cjs/index.d.ts +48 -46
  68. package/dist/lib-cjs/index.js +86 -82
  69. package/dist/lib-cjs/index.js.map +1 -1
  70. package/package.json +83 -83
  71. package/src/api/classes/animationInterface.ts +11 -11
  72. package/src/api/classes/dottedPath.ts +189 -189
  73. package/src/api/classes/element.ts +644 -617
  74. package/src/api/classes/event.ts +370 -355
  75. package/src/api/classes/eventBroadcaster.ts +54 -54
  76. package/src/api/classes/parameter.ts +408 -277
  77. package/src/api/classes/parameterObservable.ts +99 -121
  78. package/src/api/classes/{elementParameterizable.ts → parameterizable.ts} +89 -78
  79. package/src/api/classes/placementAnimation.ts +143 -133
  80. package/src/api/classes/variant.ts +817 -670
  81. package/src/api/classes/variantInstance.ts +88 -81
  82. package/src/api/classes/variantParameterizable.ts +73 -0
  83. package/src/api/classes/viewer.ts +478 -421
  84. package/src/api/classes/viewerLight.ts +330 -0
  85. package/src/api/internal/debugViewer.ts +81 -81
  86. package/src/api/internal/lensRendering.ts +10 -10
  87. package/src/api/internal/sceneSetup.ts +194 -204
  88. package/src/api/manager/animationManager.ts +116 -116
  89. package/src/api/manager/sceneManager.ts +105 -105
  90. package/src/api/manager/variantInstanceManager.ts +236 -236
  91. package/src/api/store/specStorage.ts +53 -53
  92. package/src/api/util/babylonHelper.ts +553 -392
  93. package/src/api/util/globalTypes.ts +380 -319
  94. package/src/api/util/resourceHelper.ts +184 -187
  95. package/src/api/util/stringHelper.ts +26 -0
  96. package/src/buildinfo.json +2 -2
  97. package/src/commonjs.tsconfig.json +13 -13
  98. package/src/declaration.tsconfig.json +10 -10
  99. package/src/dev.ts +42 -46
  100. package/src/es6.tsconfig.json +13 -13
  101. package/src/index.ts +91 -87
  102. package/src/pagesconfig.json +61 -57
  103. package/src/tsconfig.json +43 -43
  104. package/src/tsconfig.types.json +9 -9
  105. package/src/types.d.ts +4 -4
  106. package/dist/webpack-stats.json +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"event.js","sourceRoot":"","sources":["../../../../src/api/classes/event.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAC7C,uCAAqC;AAErC,iBAAiB;AACJ,QAAA,OAAO,GAAG,IAAI,4BAAY,EAAE,CAAC;AAG1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH;IAEC;;OAEG;IACH;IAAuB,CAAC;IAkRxB,sBAAkB,YAAG;QAHrB;;WAEG;aACH;YACC,IAAM,GAAG,GAAa,EAAE,CAAC;YACzB,KAAK,IAAM,OAAK,IAAI,KAAK,EAAG;gBAC3B,IAAM,QAAQ,GAAG,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,OAAK,CAAC,CAAC;gBAC/D,IAAI,OAAK,CAAC,WAAW,EAAE,KAAK,OAAK,IAAI,QAAQ,IAAI,oBAAQ,CAAE,QAAQ,CAAC,KAAK,CAAE,EAAG;oBAC7E,GAAG,CAAC,IAAI,CAAE,QAAQ,CAAC,KAAK,CAAE,CAAC;iBAC3B;aACD;YACD,OAAO,GAAG,CAAC;QACZ,CAAC;;;OAAA;IAKD,sBAAkB,gBAAO;QAHzB;;WAEG;aACH;YACC,OAAO,KAAK,CAAC,GAAG,CAAC,MAAM,CAAE,UAAA,KAAK,IAAI,OAAA,KAAK,CAAC,UAAU,CAAE,SAAS,CAAE,EAA7B,CAA6B,CAAE,CAAC;QACnE,CAAC;;;OAAA;IAKD,sBAAkB,gBAAO;QAHzB;;WAE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OASG;IACoB,0BAAoB,GAAG,oBAAoB,CAAC;IAEnE;;;;;;;;;OASG;IACoB,qBAAe,GAAG,gBAAgB,CAAC;IAC1D;;;;;;;;;OASG;IACoB,uBAAiB,GAAG,kBAAkB,CAAC;IAE9D;;;;;;;;;OASG;IACoB,oBAAc,GAAG,eAAe,CAAC;IAExD;;;;;;;;;OASG;IACoB,oBAAc,GAAG,eAAe,CAAC;IAExD;;;;;;;;;;;;OAYG;IACoB,iCAA2B,GAAG,2BAA2B,CAAC;IAEjF;;;;;;;;;;;;OAYG;IACoB,qCAA+B,GAAG,8BAA8B,CAAC;IAExF;;;;;;;;;OASG;IACoB,8BAAwB,GAAG,wBAAwB,CAAC;IAC3E;;;;;;;;;;OAUG;IACoB,iCAA2B,GAAG,2BAA2B,CAAC;IACjF;;;;;;;;;OASG;IACoB,6BAAuB,GAAG,uBAAuB,CAAC;IACzE;;;;;;;;;OASG;IACoB,gCAA0B,GAAG,0BAA0B,CAAC;IAE/E;;;;;;;;;;;;OAYG;IACoB,iCAA2B,GAAG,2BAA2B,CAAC;IAEjF;;;;;;;;;;;;OAYG;IACoB,sCAAgC,GAAG,+BAA+B,CAAC;IAE1F;;;;;;;;;;;;OAYG;IACoB,+BAAyB,GAAG,yBAAyB,CAAC;IAE7E;;;;;;;;;OASG;IACoB,qBAAe,GAAG,gBAAgB,CAAC;IAE1D;;;;;;;;;;;OAWG;IACoB,iBAAW,GAAG,YAAY,CAAC;IA4CnD,YAAC;CAAA,AA7UD,IA6UC;AA7UY,sBAAK"}
@@ -1,26 +1,26 @@
1
- import * as EventEmitter from 'eventemitter3';
2
- export declare abstract class EventBroadcaster {
3
- readonly eventEmitter: EventEmitter;
4
- protected readonly _eventEmitter: EventEmitter;
5
- protected constructor();
6
- /**
7
- * Adds a listener function for the given event.
8
- */
9
- addEventListener(event: string, fn: EventEmitter.ListenerFn): EventBroadcaster;
10
- /**
11
- * Removes all `eventListeners` for given event.
12
- */
13
- removeEventListener(event: string): EventBroadcaster;
14
- /**
15
- * Broadcasts the given event with given arguments to all listeners and emitters.
16
- */
17
- broadcastEvent(event: string, ...args: any[]): EventBroadcaster;
18
- /**
19
- * Alias for {@link addEventListener}.
20
- */
21
- on(event: string, fn: EventEmitter.ListenerFn): EventBroadcaster;
22
- /**
23
- * Alias for {@link removeEventListener}.
24
- */
25
- off(event: string): EventBroadcaster;
26
- }
1
+ import * as EventEmitter from 'eventemitter3';
2
+ export declare abstract class EventBroadcaster {
3
+ readonly eventEmitter: EventEmitter;
4
+ protected readonly _eventEmitter: EventEmitter;
5
+ protected constructor();
6
+ /**
7
+ * Adds a listener function for the given event.
8
+ */
9
+ addEventListener(event: string, fn: EventEmitter.ListenerFn): EventBroadcaster;
10
+ /**
11
+ * Removes all `eventListeners` for given event.
12
+ */
13
+ removeEventListener(event: string): EventBroadcaster;
14
+ /**
15
+ * Broadcasts the given event with given arguments to all listeners and emitters.
16
+ */
17
+ broadcastEvent(event: string, ...args: any[]): EventBroadcaster;
18
+ /**
19
+ * Alias for {@link addEventListener}.
20
+ */
21
+ on(event: string, fn: EventEmitter.ListenerFn): EventBroadcaster;
22
+ /**
23
+ * Alias for {@link removeEventListener}.
24
+ */
25
+ off(event: string): EventBroadcaster;
26
+ }
@@ -1,54 +1,54 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EventBroadcaster = void 0;
4
- var tslib_1 = require("tslib");
5
- var EventEmitter = require("eventemitter3");
6
- var event_1 = require("./event");
7
- var EventBroadcaster = /** @class */ (function () {
8
- function EventBroadcaster() {
9
- this.eventEmitter = event_1.emitter;
10
- this._eventEmitter = new EventEmitter();
11
- }
12
- /**
13
- * Adds a listener function for the given event.
14
- */
15
- EventBroadcaster.prototype.addEventListener = function (event, fn) {
16
- this._eventEmitter.addListener(event, fn);
17
- return this;
18
- };
19
- /**
20
- * Removes all `eventListeners` for given event.
21
- */
22
- EventBroadcaster.prototype.removeEventListener = function (event) {
23
- this._eventEmitter.removeListener(event);
24
- return this;
25
- };
26
- /**
27
- * Broadcasts the given event with given arguments to all listeners and emitters.
28
- */
29
- EventBroadcaster.prototype.broadcastEvent = function (event) {
30
- var _a, _b;
31
- var args = [];
32
- for (var _i = 1; _i < arguments.length; _i++) {
33
- args[_i - 1] = arguments[_i];
34
- }
35
- (_a = this._eventEmitter).emit.apply(_a, tslib_1.__spreadArrays([event], args));
36
- (_b = this.eventEmitter).emit.apply(_b, tslib_1.__spreadArrays([event], args));
37
- return this;
38
- };
39
- /**
40
- * Alias for {@link addEventListener}.
41
- */
42
- EventBroadcaster.prototype.on = function (event, fn) {
43
- return this.addEventListener(event, fn);
44
- };
45
- /**
46
- * Alias for {@link removeEventListener}.
47
- */
48
- EventBroadcaster.prototype.off = function (event) {
49
- return this.removeEventListener(event);
50
- };
51
- return EventBroadcaster;
52
- }());
53
- exports.EventBroadcaster = EventBroadcaster;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventBroadcaster = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var EventEmitter = require("eventemitter3");
6
+ var event_1 = require("./event");
7
+ var EventBroadcaster = /** @class */ (function () {
8
+ function EventBroadcaster() {
9
+ this.eventEmitter = event_1.emitter;
10
+ this._eventEmitter = new EventEmitter();
11
+ }
12
+ /**
13
+ * Adds a listener function for the given event.
14
+ */
15
+ EventBroadcaster.prototype.addEventListener = function (event, fn) {
16
+ this._eventEmitter.addListener(event, fn);
17
+ return this;
18
+ };
19
+ /**
20
+ * Removes all `eventListeners` for given event.
21
+ */
22
+ EventBroadcaster.prototype.removeEventListener = function (event) {
23
+ this._eventEmitter.removeListener(event);
24
+ return this;
25
+ };
26
+ /**
27
+ * Broadcasts the given event with given arguments to all listeners and emitters.
28
+ */
29
+ EventBroadcaster.prototype.broadcastEvent = function (event) {
30
+ var _a, _b;
31
+ var args = [];
32
+ for (var _i = 1; _i < arguments.length; _i++) {
33
+ args[_i - 1] = arguments[_i];
34
+ }
35
+ (_a = this._eventEmitter).emit.apply(_a, tslib_1.__spreadArrays([event], args));
36
+ (_b = this.eventEmitter).emit.apply(_b, tslib_1.__spreadArrays([event], args));
37
+ return this;
38
+ };
39
+ /**
40
+ * Alias for {@link addEventListener}.
41
+ */
42
+ EventBroadcaster.prototype.on = function (event, fn) {
43
+ return this.addEventListener(event, fn);
44
+ };
45
+ /**
46
+ * Alias for {@link removeEventListener}.
47
+ */
48
+ EventBroadcaster.prototype.off = function (event) {
49
+ return this.removeEventListener(event);
50
+ };
51
+ return EventBroadcaster;
52
+ }());
53
+ exports.EventBroadcaster = EventBroadcaster;
54
54
  //# sourceMappingURL=eventBroadcaster.js.map
@@ -1,165 +1,259 @@
1
- import { Color3 } from '@babylonjs/core/Maths/math.color';
2
- import { Vector3 } from '@babylonjs/core/Maths/math.vector';
3
- /**
4
- * This `Parameter` class defines all parameters that can be consumed and committed by a {@link ParameterObservable}.
5
- * Use {@link ParameterObservable.addParameterObserver} or {@link ParameterObservable.commitParameters} to either add or
6
- * commit parameters on your observable objects.
7
- */
8
- export declare class Parameter {
9
- /**
10
- * Constructor.
11
- */
12
- private constructor();
13
- /**
14
- * Mutates the visibility. Helper methods are {@link ElementParameterizable.show} and
15
- * {@link ElementParameterizable.hide}. Getter and setter is {@link ElementParameterizable.visible}.
16
- *
17
- * Scopes:
18
- * * {@link Element}
19
- * * {@link Variant}
20
- *
21
- * @parser {@link parseBoolean}
22
- */
23
- static readonly VISIBLE = "visible";
24
- /**
25
- * Stretches or compresses some meshes. Getter and setter is {@link ElementParameterizable.scaling}.
26
- *
27
- * Scopes:
28
- * * {@link Element}
29
- * * {@link Variant}
30
- *
31
- * @parser {@link parseScaling}
32
- */
33
- static readonly SCALING = "scaling";
34
- /**
35
- * Mutates the material. Getter and setter is {@link ElementParameterizable.material}. The value of this parameter
36
- * represents the ID of a baked-in glTF or custom created material in the {@link Variant} tree.
37
- *
38
- * Scopes:
39
- * * {@link Element}
40
- * * {@link Variant}
41
- *
42
- * @parser string
43
- */
44
- static readonly MATERIAL = "material";
45
- /**
46
- * Mutates the material color.
47
- *
48
- * Scopes:
49
- * * {@link Element}
50
- * * {@link Variant}
51
- *
52
- * @parser {@link parseColor}
53
- */
54
- static readonly MATERIAL_COLOR = "material.color";
55
- /**
56
- * Mutates the material metallness.
57
- *
58
- * Scopes:
59
- * * {@link Element}
60
- * * {@link Variant}
61
- *
62
- * @parser {@link parseNumber}
63
- */
64
- static readonly MATERIAL_METALLNESS = "material.metallness";
65
- /**
66
- * Mutates the material roughness.
67
- *
68
- * Scopes:
69
- * * {@link Element}
70
- * * {@link Variant}
71
- *
72
- * @parser {@link parseNumber}
73
- */
74
- static readonly MATERIAL_ROUGHNESS = "material.roughness";
75
- /**
76
- * Mutates whether a highlight layer should be enabled.
77
- *
78
- * Scopes:
79
- * * {@link Element}
80
- * * {@link Variant}
81
- *
82
- * @parser {@link parseBoolean}
83
- */
84
- static readonly HIGHLIGHT_ENABLED = "highlight.enabled";
85
- /**
86
- * Changes the highlight color.
87
- *
88
- * Scopes:
89
- * * {@link Element}
90
- * * {@link Variant}
91
- *
92
- * @parser {@link parseColor}
93
- */
94
- static readonly HIGHLIGHT_COLOR = "highlight.color";
95
- /**
96
- * Mutates the highlighted state. Getter and setter is {@link ElementParameterizable.highlighted}.
97
- *
98
- * Scopes:
99
- * * {@link Element}
100
- * * {@link Variant}
101
- *
102
- * @parser {@link parseBoolean}
103
- */
104
- static readonly HIGHLIGHTED = "highlighted";
105
- /**
106
- * Mutates the position relative to its origin position. Getter and setter is {@link ElementParameterizable.position}.
107
- *
108
- * Scopes:
109
- * * {@link Element}
110
- * * {@link Variant}
111
- *
112
- * @parser {@link parseVector}
113
- */
114
- static readonly POSITION = "position";
115
- /**
116
- * Mutates the rotation relative to its origin rotation. Getter and setter is {@link ElementParameterizable.rotation}.
117
- *
118
- * Scopes:
119
- * * {@link Element}
120
- * * {@link Variant}
121
- *
122
- * @parser {@link parseRotation}
123
- */
124
- static readonly ROTATION = "rotation";
125
- /**
126
- * The {@link ParameterDeclarations} for all parameters in this class.
127
- */
128
- static get declarations(): ParameterDeclarations;
129
- /**
130
- * Gets the {@link ParameterDeclaration} for a given {@link Parameter} declared in this class.
131
- */
132
- static getDeclaration(parameter: string): ParameterDeclaration;
133
- /**
134
- * All parameters defined in this class.
135
- */
136
- static get all(): string[];
137
- /**
138
- * Parses a string of format `'(x,y,z)'` to a `Vector3`.
139
- */
140
- static parseVector(value: ParameterValue): Vector3;
141
- /**
142
- * Stringifies a Vector3 to format `(x,y,z)`.
143
- */
144
- static stringifyVector(value: Vector3): string;
145
- /**
146
- * Parses a string of format `'(x,y,z)'` with angular degrees to a `Vector3` with rotation information in radians.
147
- */
148
- static parseRotation(value: ParameterValue): Vector3;
149
- /**
150
- * Parses a string of format `'(x,y,z)'` or a simple `number` to a `Vector3` for scaling.
151
- */
152
- static parseScaling(value: ParameterValue): Vector3;
153
- /**
154
- * Parses a string of format `'#rrggbb'` or `'(r,g,b)'` to a `Color3`.
155
- */
156
- static parseColor(value: ParameterValue): Color3;
157
- /**
158
- * Parses a `boolean` string (`'true'`/`'1'` or `'false'`/`'0'`) or `number` (`1` or `0`) to a `boolean` or `undefined`.
159
- */
160
- static parseBoolean(value: ParameterValue): boolean;
161
- /**
162
- * Parses a number `string` to a `number`.
163
- */
164
- static parseNumber(value: ParameterValue): number;
165
- }
1
+ import { Color3 } from '@babylonjs/core/Maths/math.color';
2
+ import { Vector3 } from '@babylonjs/core/Maths/math.vector';
3
+ /**
4
+ * This `Parameter` class defines all parameters that can be consumed and committed by a {@link ParameterObservable}.
5
+ * Use {@link ParameterObservable.addParameterObserver} or {@link ParameterObservable.commitParameters} to either add or
6
+ * commit parameters on your observable objects.
7
+ */
8
+ export declare class Parameter {
9
+ /**
10
+ * Constructor.
11
+ */
12
+ private constructor();
13
+ /**
14
+ * Mutates the visibility. Helper methods are {@link VariantParameterizable.show} and
15
+ * {@link VariantParameterizable.hide}. Getter and setter is {@link VariantParameterizable.visible}.
16
+ *
17
+ * Scopes:
18
+ * * {@link Element}
19
+ * * {@link Variant}
20
+ * * {@link ViewerLight} Available for all light types
21
+ *
22
+ * @parser {@link parseBoolean}
23
+ */
24
+ static readonly VISIBLE = "visible";
25
+ /**
26
+ * Stretches or compresses some meshes. Getter and setter is {@link VariantParameterizable.scaling}.
27
+ *
28
+ * Scopes:
29
+ * * {@link Element}
30
+ * * {@link Variant}
31
+ *
32
+ * @parser {@link parseScaling}
33
+ */
34
+ static readonly SCALING = "scaling";
35
+ /**
36
+ * Mutates the material. Getter and setter is {@link VariantParameterizable.material}. The value of this parameter
37
+ * represents the ID of a baked-in glTF or custom created material in the {@link Variant} tree.
38
+ *
39
+ * Scopes:
40
+ * * {@link Element}
41
+ * * {@link Variant}
42
+ *
43
+ * @parser string
44
+ */
45
+ static readonly MATERIAL = "material";
46
+ /**
47
+ * Mutates the material color.
48
+ *
49
+ * Scopes:
50
+ * * {@link Element}
51
+ * * {@link Variant}
52
+ *
53
+ * @parser {@link parseColor}
54
+ */
55
+ static readonly MATERIAL_COLOR = "material.color";
56
+ /**
57
+ * Mutates the material metallness.
58
+ *
59
+ * Scopes:
60
+ * * {@link Element}
61
+ * * {@link Variant}
62
+ *
63
+ * @parser {@link parseNumber}
64
+ */
65
+ static readonly MATERIAL_METALLNESS = "material.metallness";
66
+ /**
67
+ * Mutates the material roughness.
68
+ *
69
+ * Scopes:
70
+ * * {@link Element}
71
+ * * {@link Variant}
72
+ *
73
+ * @parser {@link parseNumber}
74
+ */
75
+ static readonly MATERIAL_ROUGHNESS = "material.roughness";
76
+ /**
77
+ * Mutates whether a highlight layer should be enabled.
78
+ *
79
+ * Scopes:
80
+ * * {@link Element}
81
+ * * {@link Variant}
82
+ *
83
+ * @parser {@link parseBoolean}
84
+ */
85
+ static readonly HIGHLIGHT_ENABLED = "highlight.enabled";
86
+ /**
87
+ * Changes the highlight color.
88
+ *
89
+ * Scopes:
90
+ * * {@link Element}
91
+ * * {@link Variant}
92
+ *
93
+ * @parser {@link parseColor}
94
+ */
95
+ static readonly HIGHLIGHT_COLOR = "highlight.color";
96
+ /**
97
+ * Mutates the highlighted state. Getter and setter is {@link VariantParameterizable.highlighted}.
98
+ *
99
+ * Scopes:
100
+ * * {@link Element}
101
+ * * {@link Variant}
102
+ *
103
+ * @parser {@link parseBoolean}
104
+ */
105
+ static readonly HIGHLIGHTED = "highlighted";
106
+ /**
107
+ * Mutates the position relative to its origin position. Getter and setter is {@link VariantParameterizable.position}.
108
+ *
109
+ * Scopes:
110
+ * * {@link Element}
111
+ * * {@link Variant}
112
+ * * {@link ViewerLight} Available for [PointLight](https://doc.babylonjs.com/typedoc/classes/babylon.pointlight#position), [SpotLight](https://doc.babylonjs.com/typedoc/classes/babylon.spotlight#position), [DirectionalLight](https://doc.babylonjs.com/typedoc/classes/babylon.directionallight#position)
113
+ *
114
+ * @parser {@link parseVector}
115
+ */
116
+ static readonly POSITION = "position";
117
+ /**
118
+ * Mutates the rotation relative to its origin rotation. Getter and setter is {@link VariantParameterizable.rotation}.
119
+ *
120
+ * Scopes:
121
+ * * {@link Element}
122
+ * * {@link Variant}
123
+ *
124
+ * @parser {@link parseRotation}
125
+ */
126
+ static readonly ROTATION = "rotation";
127
+ /**
128
+ * Mutates whether a shadow should be casted or not.
129
+ *
130
+ * Scopes:
131
+ * * {@link Element}
132
+ * * {@link Variant}
133
+ *
134
+ * @parser {@link parseBoolean}
135
+ */
136
+ static readonly CAST_SHADOW = "castShadow";
137
+ /**
138
+ * Mutates from which lights a shadow should be casted.
139
+ *
140
+ * Scopes:
141
+ * * {@link Element}
142
+ * * {@link Variant}
143
+ *
144
+ * @parser {@link parseCommaSeparatedList}
145
+ */
146
+ static readonly CAST_SHADOW_FROM_LIGHTS = "castShadow.fromLights";
147
+ /**
148
+ * Mutates whether to receive shadows or not.
149
+ *
150
+ * Scopes:
151
+ * * {@link Element}
152
+ * * {@link Variant}
153
+ *
154
+ * @parser {@link parseBoolean}
155
+ */
156
+ static readonly RECEIVE_SHADOWS = "receiveShadows";
157
+ /**
158
+ * Mutates the intensity of Lights.
159
+ *
160
+ * Scopes:
161
+ * * {@link ViewerLight} Available for [PointLight](https://doc.babylonjs.com/typedoc/classes/babylon.pointlight#intensity), [SpotLight](https://doc.babylonjs.com/typedoc/classes/babylon.spotlight#intensity), [DirectionalLight](https://doc.babylonjs.com/typedoc/classes/babylon.directionallight#intensity), [HemisphericLight](https://doc.babylonjs.com/typedoc/classes/babylon.hemisphericlight#intensity)
162
+ *
163
+ * @parser {@link parseNumber}
164
+ */
165
+ static readonly INTENSITY = "intensity";
166
+ /**
167
+ * Mutates the direction of Lights.
168
+ *
169
+ * Scopes:
170
+ * * {@link ViewerLight} Available for [PointLight](https://doc.babylonjs.com/typedoc/classes/babylon.pointlight#direction), [SpotLight](https://doc.babylonjs.com/typedoc/classes/babylon.spotlight#direction), [DirectionalLight](https://doc.babylonjs.com/typedoc/classes/babylon.directionallight#direction), [HemisphericLight](https://doc.babylonjs.com/typedoc/classes/babylon.hemisphericlight#direction)
171
+ *
172
+ * @parser {@link parseNumber}
173
+ */
174
+ static readonly DIRECTION = "direction";
175
+ /**
176
+ * Mutates the angle of Lights.
177
+ *
178
+ * Scopes:
179
+ * * {@link ViewerLight} Available for [SpotLight](https://doc.babylonjs.com/typedoc/classes/babylon.spotlight#angle)
180
+ *
181
+ * @parser {@link parseNumber}
182
+ */
183
+ static readonly ANGLE = "angle";
184
+ /**
185
+ * Mutates the exponent of Lights.
186
+ *
187
+ * Scopes:
188
+ * * {@link ViewerLight} Available for [SpotLight](https://doc.babylonjs.com/typedoc/classes/babylon.spotlight#exponent)
189
+ *
190
+ * @parser {@link parseNumber}
191
+ */
192
+ static readonly EXPONENT = "exponent";
193
+ /**
194
+ * Mutates the diffuse color of Lights.
195
+ *
196
+ * Scopes:
197
+ * * {@link ViewerLight} Available for [PointLight](https://doc.babylonjs.com/typedoc/classes/babylon.pointlight#diffuse), [SpotLight](https://doc.babylonjs.com/typedoc/classes/babylon.spotlight#diffuse), [DirectionalLight](https://doc.babylonjs.com/typedoc/classes/babylon.directionallight#diffuse), [HemisphericLight](https://doc.babylonjs.com/typedoc/classes/babylon.hemisphericlight#diffuse)
198
+ *
199
+ * @parser {@link parseNumber}
200
+ */
201
+ static readonly DIFFUSE = "diffuse";
202
+ /**
203
+ * Mutates the specular color of Lights.
204
+ *
205
+ * Scopes:
206
+ * * {@link ViewerLight} Available for [PointLight](https://doc.babylonjs.com/typedoc/classes/babylon.pointlight#specular), [SpotLight](https://doc.babylonjs.com/typedoc/classes/babylon.spotlight#specular), [DirectionalLight](https://doc.babylonjs.com/typedoc/classes/babylon.directionallight#specular), [HemisphericLight](https://doc.babylonjs.com/typedoc/classes/babylon.hemisphericlight#specular)
207
+ *
208
+ * @parser {@link parseNumber}
209
+ */
210
+ static readonly SPECULAR = "specular";
211
+ /**
212
+ * The {@link ParameterDeclarations} for all parameters in this class.
213
+ */
214
+ static get declarations(): ParameterDeclarations;
215
+ /**
216
+ * Gets the {@link ParameterDeclaration} for a given {@link Parameter} declared in this class.
217
+ */
218
+ static getDeclaration(parameter: string): ParameterDeclaration;
219
+ /**
220
+ * All parameters defined in this class.
221
+ */
222
+ static get all(): string[];
223
+ /**
224
+ * Parses given {@link ParameterBag} with given {@link ParameterDeclarations}.
225
+ */
226
+ static parseFromDeclarations(declarations: ParameterDeclarations, parameterBag: ParameterBag): ParsedParameterBag;
227
+ /**
228
+ * Parses a string of format `'(x,y,z)'` to a `Vector3`.
229
+ */
230
+ static parseVector(value: ParameterValue): Vector3;
231
+ /**
232
+ * Stringifies a Vector3 to format `(x,y,z)`.
233
+ */
234
+ static stringifyVector(value: Vector3): string;
235
+ /**
236
+ * Parses a string of format `'(x,y,z)'` with angular degrees to a `Vector3` with rotation information in radians.
237
+ */
238
+ static parseRotation(value: ParameterValue): Vector3;
239
+ /**
240
+ * Parses a string of format `'(x,y,z)'` or a simple `number` to a `Vector3` for scaling.
241
+ */
242
+ static parseScaling(value: ParameterValue): Vector3;
243
+ /**
244
+ * Parses a string of format `'#rrggbb'` or `'(r,g,b)'` to a `Color3`.
245
+ */
246
+ static parseColor(value: ParameterValue): Color3;
247
+ /**
248
+ * Parses a `boolean` string (`'true'`/`'1'` or `'false'`/`'0'`) or `number` (`1` or `0`) to a `boolean` or `undefined`.
249
+ */
250
+ static parseBoolean(value: ParameterValue): boolean;
251
+ /**
252
+ * Parses a number `string` to a `number`.
253
+ */
254
+ static parseNumber(value: ParameterValue): number;
255
+ /**
256
+ * Parses a string with comma separated values to a list of strings.
257
+ */
258
+ static parseCommaSeparatedList(value: ParameterValue): string[];
259
+ }