@shapediver/viewer.viewport 3.9.0 → 3.9.1
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 +8 -6
- package/dist/implementation/PostProcessingApi.d.ts +4 -4
- package/dist/implementation/PostProcessingApi.d.ts.map +1 -1
- package/dist/implementation/PostProcessingApi.js +37 -29
- package/dist/implementation/PostProcessingApi.js.map +1 -1
- package/dist/implementation/ViewportApi.d.ts +13 -13
- package/dist/implementation/ViewportApi.d.ts.map +1 -1
- package/dist/implementation/ViewportApi.js +268 -253
- package/dist/implementation/ViewportApi.js.map +1 -1
- package/dist/implementation/camera/AbstractCameraApi.d.ts +5 -5
- package/dist/implementation/camera/AbstractCameraApi.d.ts.map +1 -1
- package/dist/implementation/camera/AbstractCameraApi.js +110 -110
- package/dist/implementation/camera/AbstractCameraApi.js.map +1 -1
- package/dist/implementation/camera/OrthographicCameraApi.d.ts +4 -4
- package/dist/implementation/camera/OrthographicCameraApi.d.ts.map +1 -1
- package/dist/implementation/camera/OrthographicCameraApi.js +5 -5
- package/dist/implementation/camera/OrthographicCameraApi.js.map +1 -1
- package/dist/implementation/camera/PerspectiveCameraApi.d.ts +4 -4
- package/dist/implementation/camera/PerspectiveCameraApi.d.ts.map +1 -1
- package/dist/implementation/camera/PerspectiveCameraApi.js +4 -4
- package/dist/implementation/camera/PerspectiveCameraApi.js.map +1 -1
- package/dist/implementation/lights/AbstractLightApi.d.ts +4 -4
- package/dist/implementation/lights/AbstractLightApi.d.ts.map +1 -1
- package/dist/implementation/lights/AbstractLightApi.js +9 -9
- package/dist/implementation/lights/AbstractLightApi.js.map +1 -1
- package/dist/implementation/lights/LightSceneApi.d.ts +12 -12
- package/dist/implementation/lights/LightSceneApi.d.ts.map +1 -1
- package/dist/implementation/lights/LightSceneApi.js +48 -48
- package/dist/implementation/lights/LightSceneApi.js.map +1 -1
- package/dist/implementation/lights/types/AmbientLightApi.d.ts +4 -4
- package/dist/implementation/lights/types/AmbientLightApi.d.ts.map +1 -1
- package/dist/implementation/lights/types/AmbientLightApi.js +1 -1
- package/dist/implementation/lights/types/AmbientLightApi.js.map +1 -1
- package/dist/implementation/lights/types/DirectionalLightApi.d.ts +5 -5
- package/dist/implementation/lights/types/DirectionalLightApi.d.ts.map +1 -1
- package/dist/implementation/lights/types/DirectionalLightApi.js +10 -10
- package/dist/implementation/lights/types/DirectionalLightApi.js.map +1 -1
- package/dist/implementation/lights/types/HemisphereLightApi.d.ts +5 -5
- package/dist/implementation/lights/types/HemisphereLightApi.d.ts.map +1 -1
- package/dist/implementation/lights/types/HemisphereLightApi.js +4 -4
- package/dist/implementation/lights/types/HemisphereLightApi.js.map +1 -1
- package/dist/implementation/lights/types/PointLightApi.d.ts +5 -5
- package/dist/implementation/lights/types/PointLightApi.d.ts.map +1 -1
- package/dist/implementation/lights/types/PointLightApi.js +8 -8
- package/dist/implementation/lights/types/PointLightApi.js.map +1 -1
- package/dist/implementation/lights/types/SpotLightApi.d.ts +5 -5
- package/dist/implementation/lights/types/SpotLightApi.d.ts.map +1 -1
- package/dist/implementation/lights/types/SpotLightApi.js +14 -14
- package/dist/implementation/lights/types/SpotLightApi.js.map +1 -1
- package/dist/index.d.ts +39 -39
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +70 -68
- package/dist/index.js.map +1 -1
- package/dist/interfaces/IPostProcessingApi.d.ts +2 -2
- package/dist/interfaces/IPostProcessingApi.d.ts.map +1 -1
- package/dist/interfaces/IViewportApi.d.ts +13 -13
- package/dist/interfaces/IViewportApi.d.ts.map +1 -1
- package/dist/interfaces/camera/ICameraApi.d.ts +3 -3
- package/dist/interfaces/camera/ICameraApi.d.ts.map +1 -1
- package/dist/interfaces/camera/IOrthographicCameraApi.d.ts +2 -2
- package/dist/interfaces/camera/IOrthographicCameraApi.d.ts.map +1 -1
- package/dist/interfaces/camera/IPerspectiveCameraApi.d.ts +1 -1
- package/dist/interfaces/camera/IPerspectiveCameraApi.d.ts.map +1 -1
- package/dist/interfaces/lights/ILightApi.d.ts +2 -2
- package/dist/interfaces/lights/ILightApi.d.ts.map +1 -1
- package/dist/interfaces/lights/ILightSceneApi.d.ts +9 -9
- package/dist/interfaces/lights/ILightSceneApi.d.ts.map +1 -1
- package/dist/interfaces/lights/types/IAmbientLightApi.d.ts +1 -1
- package/dist/interfaces/lights/types/IAmbientLightApi.d.ts.map +1 -1
- package/dist/interfaces/lights/types/IDirectionalLightApi.d.ts +2 -2
- package/dist/interfaces/lights/types/IDirectionalLightApi.d.ts.map +1 -1
- package/dist/interfaces/lights/types/IHemisphereLightApi.d.ts +2 -2
- package/dist/interfaces/lights/types/IHemisphereLightApi.d.ts.map +1 -1
- package/dist/interfaces/lights/types/IPointLightApi.d.ts +2 -2
- package/dist/interfaces/lights/types/IPointLightApi.d.ts.map +1 -1
- package/dist/interfaces/lights/types/ISpotLightApi.d.ts +2 -2
- package/dist/interfaces/lights/types/ISpotLightApi.d.ts.map +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +23 -19
- package/dist/main.js.map +1 -1
- package/package.json +75 -75
|
@@ -45,22 +45,22 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
45
45
|
var _ViewportApi_animationEngine, _ViewportApi_cameras, _ViewportApi_creationControlCenterViewport, _ViewportApi_gltfConverter, _ViewportApi_inputValidator, _ViewportApi_lightScenes, _ViewportApi_logger, _ViewportApi_postProcessing, _ViewportApi_renderingEngine, _ViewportApi_stateEngine, _ViewportApi_systemInfo;
|
|
46
46
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
47
|
exports.ViewportApi = void 0;
|
|
48
|
-
const
|
|
49
|
-
const
|
|
50
|
-
const viewer_shared_build_data_1 = require("@shapediver/viewer.shared.build-data");
|
|
51
|
-
const viewer_rendering_engine_camera_engine_1 = require("@shapediver/viewer.rendering-engine.camera-engine");
|
|
52
|
-
const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
|
|
53
|
-
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
48
|
+
const sdk_geometry_api_sdk_v2_1 = require("@shapediver/sdk.geometry-api-sdk-v2");
|
|
49
|
+
const viewer_api_general_1 = require("@shapediver/viewer.api.general");
|
|
54
50
|
const viewer_creation_control_center_viewport_1 = require("@shapediver/viewer.creation-control-center.viewport");
|
|
55
51
|
const viewer_data_engine_gltf_converter_1 = require("@shapediver/viewer.data-engine.gltf-converter");
|
|
52
|
+
const viewer_rendering_engine_animation_engine_1 = require("@shapediver/viewer.rendering-engine.animation-engine");
|
|
53
|
+
const viewer_rendering_engine_camera_engine_1 = require("@shapediver/viewer.rendering-engine.camera-engine");
|
|
54
|
+
const viewer_shared_build_data_1 = require("@shapediver/viewer.shared.build-data");
|
|
56
55
|
const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
|
|
57
|
-
const
|
|
56
|
+
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
57
|
+
const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
|
|
58
58
|
const gl_matrix_1 = require("gl-matrix");
|
|
59
|
+
const QRCode = __importStar(require("qrcode"));
|
|
59
60
|
const OrthographicCameraApi_1 = require("./camera/OrthographicCameraApi");
|
|
60
61
|
const PerspectiveCameraApi_1 = require("./camera/PerspectiveCameraApi");
|
|
62
|
+
const LightSceneApi_1 = require("./lights/LightSceneApi");
|
|
61
63
|
const PostProcessingApi_1 = require("./PostProcessingApi");
|
|
62
|
-
const viewer_api_general_1 = require("@shapediver/viewer.api.general");
|
|
63
|
-
const sdk_geometry_api_sdk_v2_1 = require("@shapediver/sdk.geometry-api-sdk-v2");
|
|
64
64
|
class ViewportApi {
|
|
65
65
|
// #endregion Properties (11)
|
|
66
66
|
// #region Constructors (1)
|
|
@@ -82,11 +82,12 @@ class ViewportApi {
|
|
|
82
82
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.update = () => {
|
|
83
83
|
for (const c in __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.cameras) {
|
|
84
84
|
if (!__classPrivateFieldGet(this, _ViewportApi_cameras, "f")[c]) {
|
|
85
|
-
if (__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.cameras[c].type ===
|
|
86
|
-
|
|
85
|
+
if (__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.cameras[c].type ===
|
|
86
|
+
viewer_rendering_engine_camera_engine_1.CAMERA_TYPE.PERSPECTIVE) {
|
|
87
|
+
__classPrivateFieldGet(this, _ViewportApi_cameras, "f")[c] = new PerspectiveCameraApi_1.PerspectiveCameraApi(this, (__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.cameras[c]));
|
|
87
88
|
}
|
|
88
89
|
else {
|
|
89
|
-
__classPrivateFieldGet(this, _ViewportApi_cameras, "f")[c] = new OrthographicCameraApi_1.OrthographicCameraApi(this, __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.cameras[c]);
|
|
90
|
+
__classPrivateFieldGet(this, _ViewportApi_cameras, "f")[c] = new OrthographicCameraApi_1.OrthographicCameraApi(this, (__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.cameras[c]));
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
}
|
|
@@ -125,71 +126,71 @@ class ViewportApi {
|
|
|
125
126
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").arRotation;
|
|
126
127
|
}
|
|
127
128
|
set arRotation(value) {
|
|
128
|
-
const scope =
|
|
129
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
129
|
+
const scope = "arRotation";
|
|
130
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "vec3");
|
|
130
131
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").arRotation = value;
|
|
131
132
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
132
|
-
this.update(
|
|
133
|
+
this.update("arRotation");
|
|
133
134
|
}
|
|
134
135
|
get arScale() {
|
|
135
136
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").arScale;
|
|
136
137
|
}
|
|
137
138
|
set arScale(value) {
|
|
138
|
-
const scope =
|
|
139
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
139
|
+
const scope = "arScale";
|
|
140
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "vec3");
|
|
140
141
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").arScale = gl_matrix_1.vec3.max(gl_matrix_1.vec3.create(), value, gl_matrix_1.vec3.fromValues(0.001, 0.001, 0.001));
|
|
141
142
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
142
|
-
this.update(
|
|
143
|
+
this.update("arScale");
|
|
143
144
|
}
|
|
144
145
|
get arTranslation() {
|
|
145
146
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").arTranslation;
|
|
146
147
|
}
|
|
147
148
|
set arTranslation(value) {
|
|
148
|
-
const scope =
|
|
149
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
149
|
+
const scope = "arTranslation";
|
|
150
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "vec3");
|
|
150
151
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").arTranslation = value;
|
|
151
152
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
152
|
-
this.update(
|
|
153
|
+
this.update("arTranslation");
|
|
153
154
|
}
|
|
154
155
|
get automaticColorAdjustment() {
|
|
155
156
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").automaticColorAdjustment;
|
|
156
157
|
}
|
|
157
158
|
set automaticColorAdjustment(value) {
|
|
158
|
-
const scope =
|
|
159
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
159
|
+
const scope = "automaticColorAdjustment";
|
|
160
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
160
161
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").automaticColorAdjustment = value;
|
|
161
162
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
162
|
-
this.update(
|
|
163
|
+
this.update("automaticColorAdjustment");
|
|
163
164
|
}
|
|
164
165
|
get automaticResizing() {
|
|
165
166
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").automaticResizing;
|
|
166
167
|
}
|
|
167
168
|
set automaticResizing(value) {
|
|
168
|
-
const scope =
|
|
169
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
169
|
+
const scope = "automaticResizing";
|
|
170
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
170
171
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").automaticResizing = value;
|
|
171
172
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
172
|
-
this.update(
|
|
173
|
+
this.update("automaticResizing");
|
|
173
174
|
}
|
|
174
175
|
get beautyRenderBlendingDuration() {
|
|
175
176
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").beautyRenderBlendingDuration;
|
|
176
177
|
}
|
|
177
178
|
set beautyRenderBlendingDuration(value) {
|
|
178
|
-
const scope =
|
|
179
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
179
|
+
const scope = "beautyRenderBlendingDuration";
|
|
180
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
180
181
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").beautyRenderBlendingDuration = value;
|
|
181
182
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
182
|
-
this.update(
|
|
183
|
+
this.update("beautyRenderBlendingDuration");
|
|
183
184
|
}
|
|
184
185
|
get beautyRenderDelay() {
|
|
185
186
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").beautyRenderDelay;
|
|
186
187
|
}
|
|
187
188
|
set beautyRenderDelay(value) {
|
|
188
|
-
const scope =
|
|
189
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
189
|
+
const scope = "beautyRenderDelay";
|
|
190
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
190
191
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").beautyRenderDelay = value;
|
|
191
192
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
192
|
-
this.update(
|
|
193
|
+
this.update("beautyRenderDelay");
|
|
193
194
|
}
|
|
194
195
|
get camera() {
|
|
195
196
|
if (!__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.camera)
|
|
@@ -206,71 +207,71 @@ class ViewportApi {
|
|
|
206
207
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").clearAlpha;
|
|
207
208
|
}
|
|
208
209
|
set clearAlpha(value) {
|
|
209
|
-
const scope =
|
|
210
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
210
|
+
const scope = "clearAlpha";
|
|
211
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
211
212
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").clearAlpha = value;
|
|
212
213
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
213
|
-
this.update(
|
|
214
|
+
this.update("clearAlpha");
|
|
214
215
|
}
|
|
215
216
|
get clearColor() {
|
|
216
217
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").clearColor;
|
|
217
218
|
}
|
|
218
219
|
set clearColor(value) {
|
|
219
|
-
const scope =
|
|
220
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
220
|
+
const scope = "clearColor";
|
|
221
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "color");
|
|
221
222
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").clearColor = value;
|
|
222
223
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
223
|
-
this.update(
|
|
224
|
+
this.update("clearColor");
|
|
224
225
|
}
|
|
225
226
|
get contactShadowBlur() {
|
|
226
227
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowBlur;
|
|
227
228
|
}
|
|
228
229
|
set contactShadowBlur(value) {
|
|
229
|
-
const scope =
|
|
230
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
230
|
+
const scope = "contactShadowBlur";
|
|
231
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
231
232
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowBlur = value;
|
|
232
233
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
233
|
-
this.update(
|
|
234
|
+
this.update("contactShadowBlur");
|
|
234
235
|
}
|
|
235
236
|
get contactShadowDarkness() {
|
|
236
237
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowDarkness;
|
|
237
238
|
}
|
|
238
239
|
set contactShadowDarkness(value) {
|
|
239
|
-
const scope =
|
|
240
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
240
|
+
const scope = "contactShadowDarkness";
|
|
241
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
241
242
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowDarkness = value;
|
|
242
243
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
243
|
-
this.update(
|
|
244
|
+
this.update("contactShadowDarkness");
|
|
244
245
|
}
|
|
245
246
|
get contactShadowHeight() {
|
|
246
247
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowHeight;
|
|
247
248
|
}
|
|
248
249
|
set contactShadowHeight(value) {
|
|
249
|
-
const scope =
|
|
250
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
250
|
+
const scope = "contactShadowHeight";
|
|
251
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
251
252
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowHeight = value;
|
|
252
253
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
253
|
-
this.update(
|
|
254
|
+
this.update("contactShadowHeight");
|
|
254
255
|
}
|
|
255
256
|
get contactShadowOpacity() {
|
|
256
257
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowOpacity;
|
|
257
258
|
}
|
|
258
259
|
set contactShadowOpacity(value) {
|
|
259
|
-
const scope =
|
|
260
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
260
|
+
const scope = "contactShadowOpacity";
|
|
261
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
261
262
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowOpacity = value;
|
|
262
263
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
263
|
-
this.update(
|
|
264
|
+
this.update("contactShadowOpacity");
|
|
264
265
|
}
|
|
265
266
|
get contactShadowVisibility() {
|
|
266
267
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowVisibility;
|
|
267
268
|
}
|
|
268
269
|
set contactShadowVisibility(value) {
|
|
269
|
-
const scope =
|
|
270
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
270
|
+
const scope = "contactShadowVisibility";
|
|
271
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
271
272
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").contactShadowVisibility = value;
|
|
272
273
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
273
|
-
this.update(
|
|
274
|
+
this.update("contactShadowVisibility");
|
|
274
275
|
}
|
|
275
276
|
get defaultLineMaterial() {
|
|
276
277
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").defaultLineMaterial;
|
|
@@ -282,11 +283,11 @@ class ViewportApi {
|
|
|
282
283
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").defaultMaterialColor;
|
|
283
284
|
}
|
|
284
285
|
set defaultMaterialColor(value) {
|
|
285
|
-
const scope =
|
|
286
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
286
|
+
const scope = "defaultMaterialColor";
|
|
287
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "color");
|
|
287
288
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").defaultMaterialColor = value;
|
|
288
289
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
289
|
-
this.update(
|
|
290
|
+
this.update("defaultMaterialColor");
|
|
290
291
|
}
|
|
291
292
|
get defaultPointMaterial() {
|
|
292
293
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").defaultPointMaterial;
|
|
@@ -295,141 +296,141 @@ class ViewportApi {
|
|
|
295
296
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").enableAR;
|
|
296
297
|
}
|
|
297
298
|
set enableAR(value) {
|
|
298
|
-
const scope =
|
|
299
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
299
|
+
const scope = "enableAR";
|
|
300
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
300
301
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").enableAR = value;
|
|
301
302
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
302
|
-
this.update(
|
|
303
|
+
this.update("enableAR");
|
|
303
304
|
}
|
|
304
305
|
get environmentMap() {
|
|
305
306
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMap;
|
|
306
307
|
}
|
|
307
308
|
set environmentMap(value) {
|
|
308
|
-
const scope =
|
|
309
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
309
|
+
const scope = "environmentMap";
|
|
310
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "cubeMap");
|
|
310
311
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMap = value;
|
|
311
312
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
312
|
-
this.update(
|
|
313
|
+
this.update("environmentMap");
|
|
313
314
|
}
|
|
314
315
|
get environmentMapAsBackground() {
|
|
315
316
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapAsBackground;
|
|
316
317
|
}
|
|
317
318
|
set environmentMapAsBackground(value) {
|
|
318
|
-
const scope =
|
|
319
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
319
|
+
const scope = "environmentMapAsBackground";
|
|
320
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
320
321
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapAsBackground = value;
|
|
321
322
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
322
|
-
this.update(
|
|
323
|
+
this.update("environmentMapAsBackground");
|
|
323
324
|
}
|
|
324
325
|
get environmentMapBlurriness() {
|
|
325
326
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapBlurriness;
|
|
326
327
|
}
|
|
327
328
|
set environmentMapBlurriness(value) {
|
|
328
|
-
const scope =
|
|
329
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
329
|
+
const scope = "environmentMapBlurriness";
|
|
330
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
330
331
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapBlurriness = value;
|
|
331
332
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
332
|
-
this.update(
|
|
333
|
+
this.update("environmentMapBlurriness");
|
|
333
334
|
}
|
|
334
335
|
get environmentMapForUnlitMaterials() {
|
|
335
336
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapForUnlitMaterials;
|
|
336
337
|
}
|
|
337
338
|
set environmentMapForUnlitMaterials(value) {
|
|
338
|
-
const scope =
|
|
339
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
339
|
+
const scope = "environmentMapForUnlitMaterials";
|
|
340
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
340
341
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapForUnlitMaterials = value;
|
|
341
342
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
342
|
-
this.update(
|
|
343
|
+
this.update("environmentMapForUnlitMaterials");
|
|
343
344
|
}
|
|
344
345
|
get environmentMapIntensity() {
|
|
345
346
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapIntensity;
|
|
346
347
|
}
|
|
347
348
|
set environmentMapIntensity(value) {
|
|
348
|
-
const scope =
|
|
349
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
349
|
+
const scope = "environmentMapIntensity";
|
|
350
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
350
351
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapIntensity = value;
|
|
351
352
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
352
|
-
this.update(
|
|
353
|
+
this.update("environmentMapIntensity");
|
|
353
354
|
}
|
|
354
355
|
get environmentMapResolution() {
|
|
355
356
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapResolution;
|
|
356
357
|
}
|
|
357
358
|
set environmentMapResolution(value) {
|
|
358
|
-
const scope =
|
|
359
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
359
|
+
const scope = "environmentMapResolution";
|
|
360
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "string");
|
|
360
361
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapResolution = value;
|
|
361
362
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
362
|
-
this.update(
|
|
363
|
+
this.update("environmentMapResolution");
|
|
363
364
|
}
|
|
364
365
|
get environmentMapRotation() {
|
|
365
366
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapRotation;
|
|
366
367
|
}
|
|
367
368
|
set environmentMapRotation(value) {
|
|
368
|
-
const scope =
|
|
369
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
369
|
+
const scope = "environmentMapRotation";
|
|
370
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "quat");
|
|
370
371
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").environmentMapRotation = value;
|
|
371
372
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
372
|
-
this.update(
|
|
373
|
+
this.update("environmentMapRotation");
|
|
373
374
|
}
|
|
374
375
|
get gridColor() {
|
|
375
376
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").gridColor;
|
|
376
377
|
}
|
|
377
378
|
set gridColor(value) {
|
|
378
|
-
const scope =
|
|
379
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
379
|
+
const scope = "gridColor";
|
|
380
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "color");
|
|
380
381
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").gridColor = value;
|
|
381
382
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
382
|
-
this.update(
|
|
383
|
+
this.update("gridColor");
|
|
383
384
|
}
|
|
384
385
|
get gridVisibility() {
|
|
385
386
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").gridVisibility;
|
|
386
387
|
}
|
|
387
388
|
set gridVisibility(value) {
|
|
388
|
-
const scope =
|
|
389
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
389
|
+
const scope = "gridVisibility";
|
|
390
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
390
391
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").gridVisibility = value;
|
|
391
392
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
392
|
-
this.update(
|
|
393
|
+
this.update("gridVisibility");
|
|
393
394
|
}
|
|
394
395
|
get groundPlaneColor() {
|
|
395
396
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").groundPlaneColor;
|
|
396
397
|
}
|
|
397
398
|
set groundPlaneColor(value) {
|
|
398
|
-
const scope =
|
|
399
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
399
|
+
const scope = "groundPlaneColor";
|
|
400
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "color");
|
|
400
401
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").groundPlaneColor = value;
|
|
401
402
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
402
|
-
this.update(
|
|
403
|
+
this.update("groundPlaneColor");
|
|
403
404
|
}
|
|
404
405
|
get groundPlaneShadowColor() {
|
|
405
406
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").groundPlaneShadowColor;
|
|
406
407
|
}
|
|
407
408
|
set groundPlaneShadowColor(value) {
|
|
408
|
-
const scope =
|
|
409
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
409
|
+
const scope = "groundPlaneShadowColor";
|
|
410
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "color");
|
|
410
411
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").groundPlaneShadowColor = value;
|
|
411
412
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
412
|
-
this.update(
|
|
413
|
+
this.update("groundPlaneShadowColor");
|
|
413
414
|
}
|
|
414
415
|
get groundPlaneShadowVisibility() {
|
|
415
416
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").groundPlaneShadowVisibility;
|
|
416
417
|
}
|
|
417
418
|
set groundPlaneShadowVisibility(value) {
|
|
418
|
-
const scope =
|
|
419
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
419
|
+
const scope = "groundPlaneShadowVisibility";
|
|
420
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
420
421
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").groundPlaneShadowVisibility = value;
|
|
421
422
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
422
|
-
this.update(
|
|
423
|
+
this.update("groundPlaneShadowVisibility");
|
|
423
424
|
}
|
|
424
425
|
get groundPlaneVisibility() {
|
|
425
426
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").groundPlaneVisibility;
|
|
426
427
|
}
|
|
427
428
|
set groundPlaneVisibility(value) {
|
|
428
|
-
const scope =
|
|
429
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
429
|
+
const scope = "groundPlaneVisibility";
|
|
430
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
430
431
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").groundPlaneVisibility = value;
|
|
431
432
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
432
|
-
this.update(
|
|
433
|
+
this.update("groundPlaneVisibility");
|
|
433
434
|
}
|
|
434
435
|
get id() {
|
|
435
436
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").id;
|
|
@@ -446,63 +447,63 @@ class ViewportApi {
|
|
|
446
447
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").lights;
|
|
447
448
|
}
|
|
448
449
|
set lights(value) {
|
|
449
|
-
const scope =
|
|
450
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
450
|
+
const scope = "lights";
|
|
451
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
451
452
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").lights = value;
|
|
452
453
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
453
|
-
this.update(
|
|
454
|
+
this.update("lights");
|
|
454
455
|
}
|
|
455
456
|
get materialOverrideType() {
|
|
456
457
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").materialOverrideType;
|
|
457
458
|
}
|
|
458
459
|
set materialOverrideType(value) {
|
|
459
|
-
const scope =
|
|
460
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
460
|
+
const scope = "materialOverrideType";
|
|
461
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "enum", false, Object.values(viewer_shared_types_1.MATERIAL_TYPE));
|
|
461
462
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").materialOverrideType = value;
|
|
462
463
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
463
|
-
this.update(
|
|
464
|
+
this.update("materialOverrideType");
|
|
464
465
|
}
|
|
465
466
|
get maximumRenderingSize() {
|
|
466
467
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").maximumRenderingSize;
|
|
467
468
|
}
|
|
468
469
|
set maximumRenderingSize(value) {
|
|
469
|
-
const scope =
|
|
470
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, value,
|
|
471
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, value.width,
|
|
472
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, value.height,
|
|
470
|
+
const scope = "maximumRenderingSize";
|
|
471
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, value, "object");
|
|
472
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, value.width, "number");
|
|
473
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, value.height, "number");
|
|
473
474
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").maximumRenderingSize = value;
|
|
474
475
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
475
|
-
this.update(
|
|
476
|
+
this.update("maximumRenderingSize");
|
|
476
477
|
}
|
|
477
478
|
get outputEncoding() {
|
|
478
479
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").outputEncoding;
|
|
479
480
|
}
|
|
480
481
|
set outputEncoding(value) {
|
|
481
|
-
const scope =
|
|
482
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
482
|
+
const scope = "outputEncoding";
|
|
483
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "enum", true, Object.values(viewer_shared_types_1.TEXTURE_ENCODING));
|
|
483
484
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").outputEncoding = value;
|
|
484
485
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
485
|
-
this.update(
|
|
486
|
+
this.update("outputEncoding");
|
|
486
487
|
}
|
|
487
488
|
get physicallyCorrectLights() {
|
|
488
489
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").physicallyCorrectLights;
|
|
489
490
|
}
|
|
490
491
|
set physicallyCorrectLights(value) {
|
|
491
|
-
const scope =
|
|
492
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
492
|
+
const scope = "physicallyCorrectLights";
|
|
493
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
493
494
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").physicallyCorrectLights = value;
|
|
494
495
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
495
|
-
this.update(
|
|
496
|
+
this.update("physicallyCorrectLights");
|
|
496
497
|
}
|
|
497
498
|
get pointSize() {
|
|
498
499
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").pointSize;
|
|
499
500
|
}
|
|
500
501
|
set pointSize(value) {
|
|
501
|
-
const scope =
|
|
502
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
502
|
+
const scope = "pointSize";
|
|
503
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
503
504
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").pointSize = value;
|
|
504
505
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
505
|
-
this.update(
|
|
506
|
+
this.update("pointSize");
|
|
506
507
|
}
|
|
507
508
|
get postProcessing() {
|
|
508
509
|
return __classPrivateFieldGet(this, _ViewportApi_postProcessing, "f");
|
|
@@ -511,21 +512,21 @@ class ViewportApi {
|
|
|
511
512
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").postRenderingCallback;
|
|
512
513
|
}
|
|
513
514
|
set postRenderingCallback(value) {
|
|
514
|
-
const scope =
|
|
515
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
515
|
+
const scope = "postRenderingCallback";
|
|
516
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "function", false);
|
|
516
517
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").postRenderingCallback = value;
|
|
517
518
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
518
|
-
this.update(
|
|
519
|
+
this.update("postRenderingCallback");
|
|
519
520
|
}
|
|
520
521
|
get preRenderingCallback() {
|
|
521
522
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").preRenderingCallback;
|
|
522
523
|
}
|
|
523
524
|
set preRenderingCallback(value) {
|
|
524
|
-
const scope =
|
|
525
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
525
|
+
const scope = "preRenderingCallback";
|
|
526
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "function", false);
|
|
526
527
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").preRenderingCallback = value;
|
|
527
528
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
528
|
-
this.update(
|
|
529
|
+
this.update("preRenderingCallback");
|
|
529
530
|
}
|
|
530
531
|
get sessionSettingsId() {
|
|
531
532
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").sessionSettingsId;
|
|
@@ -537,95 +538,95 @@ class ViewportApi {
|
|
|
537
538
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").shadows;
|
|
538
539
|
}
|
|
539
540
|
set shadows(value) {
|
|
540
|
-
const scope =
|
|
541
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
541
|
+
const scope = "shadows";
|
|
542
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
542
543
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").shadows = value;
|
|
543
544
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
544
|
-
this.update(
|
|
545
|
+
this.update("shadows");
|
|
545
546
|
}
|
|
546
547
|
get show() {
|
|
547
548
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").show;
|
|
548
549
|
}
|
|
549
550
|
set show(value) {
|
|
550
|
-
const scope =
|
|
551
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
551
|
+
const scope = "show";
|
|
552
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
552
553
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").show = value;
|
|
553
554
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
554
|
-
this.update(
|
|
555
|
+
this.update("show");
|
|
555
556
|
}
|
|
556
557
|
get showStatistics() {
|
|
557
558
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").showStatistics;
|
|
558
559
|
}
|
|
559
560
|
set showStatistics(value) {
|
|
560
|
-
const scope =
|
|
561
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
561
|
+
const scope = "showStatistics";
|
|
562
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
562
563
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").showStatistics = value;
|
|
563
564
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
564
|
-
this.update(
|
|
565
|
+
this.update("showStatistics");
|
|
565
566
|
}
|
|
566
567
|
get softShadows() {
|
|
567
568
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").softShadows;
|
|
568
569
|
}
|
|
569
570
|
set softShadows(value) {
|
|
570
|
-
const scope =
|
|
571
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
571
|
+
const scope = "softShadows";
|
|
572
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "boolean");
|
|
572
573
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").softShadows = value;
|
|
573
574
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
574
|
-
this.update(
|
|
575
|
+
this.update("softShadows");
|
|
575
576
|
}
|
|
576
577
|
get textureEncoding() {
|
|
577
578
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").textureEncoding;
|
|
578
579
|
}
|
|
579
580
|
set textureEncoding(value) {
|
|
580
|
-
const scope =
|
|
581
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
581
|
+
const scope = "textureEncoding";
|
|
582
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "enum", true, Object.values(viewer_shared_types_1.TEXTURE_ENCODING));
|
|
582
583
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").textureEncoding = value;
|
|
583
584
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
584
|
-
this.update(
|
|
585
|
+
this.update("textureEncoding");
|
|
585
586
|
}
|
|
586
587
|
get threeJsCoreObjects() {
|
|
587
588
|
return {
|
|
588
589
|
scene: __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").sceneTreeManager.scene,
|
|
589
590
|
renderer: __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").renderer,
|
|
590
|
-
camera: __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraManager.camera
|
|
591
|
+
camera: __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraManager.camera,
|
|
591
592
|
};
|
|
592
593
|
}
|
|
593
594
|
get toneMapping() {
|
|
594
595
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").toneMapping;
|
|
595
596
|
}
|
|
596
597
|
set toneMapping(value) {
|
|
597
|
-
const scope =
|
|
598
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
598
|
+
const scope = "toneMapping";
|
|
599
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "enum", true, Object.values(viewer_shared_types_1.TONE_MAPPING));
|
|
599
600
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").toneMapping = value;
|
|
600
601
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
601
|
-
this.update(
|
|
602
|
+
this.update("toneMapping");
|
|
602
603
|
}
|
|
603
604
|
get toneMappingExposure() {
|
|
604
605
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").toneMappingExposure;
|
|
605
606
|
}
|
|
606
607
|
set toneMappingExposure(value) {
|
|
607
|
-
const scope =
|
|
608
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
608
|
+
const scope = "toneMappingExposure";
|
|
609
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "number");
|
|
609
610
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").toneMappingExposure = value;
|
|
610
611
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
611
|
-
this.update(
|
|
612
|
+
this.update("toneMappingExposure");
|
|
612
613
|
}
|
|
613
614
|
get type() {
|
|
614
615
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").type;
|
|
615
616
|
}
|
|
616
617
|
set type(value) {
|
|
617
|
-
const scope =
|
|
618
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
618
|
+
const scope = "type";
|
|
619
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "enum", true, Object.values(viewer_shared_types_1.RENDERER_TYPE));
|
|
619
620
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").type = value;
|
|
620
621
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
621
|
-
this.update(
|
|
622
|
+
this.update("type");
|
|
622
623
|
}
|
|
623
624
|
get visualizeAttributes() {
|
|
624
625
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").visualizeAttributes;
|
|
625
626
|
}
|
|
626
627
|
set visualizeAttributes(value) {
|
|
627
|
-
const scope =
|
|
628
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
628
|
+
const scope = "visualizeAttributes";
|
|
629
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "function", false);
|
|
629
630
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").visualizeAttributes = value;
|
|
630
631
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
631
632
|
this.render();
|
|
@@ -633,13 +634,13 @@ class ViewportApi {
|
|
|
633
634
|
// #endregion Public Getters And Setters (106)
|
|
634
635
|
// #region Public Methods (41)
|
|
635
636
|
addCanvasEventListener(listener) {
|
|
636
|
-
const scope =
|
|
637
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, listener,
|
|
637
|
+
const scope = "addCanvasEventListener";
|
|
638
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, listener, "object");
|
|
638
639
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").domEventEngine.addDomEventListener(listener);
|
|
639
640
|
}
|
|
640
641
|
addFlag(flag) {
|
|
641
|
-
const scope =
|
|
642
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, flag,
|
|
642
|
+
const scope = "addFlag";
|
|
643
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, flag, "enum", true, Object.values(viewer_shared_types_1.FLAG_TYPE));
|
|
643
644
|
const token = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").addFlag(flag);
|
|
644
645
|
return token;
|
|
645
646
|
}
|
|
@@ -647,23 +648,23 @@ class ViewportApi {
|
|
|
647
648
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").domEventEngine.addRestrictedListenerToken(token);
|
|
648
649
|
}
|
|
649
650
|
applyViewportSettings(settings, sections) {
|
|
650
|
-
const scope =
|
|
651
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, settings,
|
|
652
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, sections,
|
|
651
|
+
const scope = "applyViewportSettings";
|
|
652
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, settings, "object");
|
|
653
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`SessionApi.${scope}`, sections, "object", false);
|
|
653
654
|
return __classPrivateFieldGet(this, _ViewportApi_creationControlCenterViewport, "f").applyViewportSettings(this.id, settings, sections);
|
|
654
655
|
}
|
|
655
656
|
assignCamera(id) {
|
|
656
|
-
const scope =
|
|
657
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id,
|
|
657
|
+
const scope = "assignCamera";
|
|
658
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id, "string");
|
|
658
659
|
const check = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.assignCamera(id);
|
|
659
|
-
this.update(
|
|
660
|
+
this.update("assignCamera");
|
|
660
661
|
return check;
|
|
661
662
|
}
|
|
662
663
|
assignLightScene(id) {
|
|
663
|
-
const scope =
|
|
664
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id,
|
|
664
|
+
const scope = "assignLightScene";
|
|
665
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id, "string");
|
|
665
666
|
const check = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").lightEngine.assignLightScene(id);
|
|
666
|
-
this.update(
|
|
667
|
+
this.update("assignLightScene");
|
|
667
668
|
return check;
|
|
668
669
|
}
|
|
669
670
|
close() {
|
|
@@ -675,27 +676,27 @@ class ViewportApi {
|
|
|
675
676
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").continueRendering();
|
|
676
677
|
}
|
|
677
678
|
convert3Dto2D(p) {
|
|
678
|
-
const scope =
|
|
679
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, p,
|
|
679
|
+
const scope = "convert3Dto2D";
|
|
680
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, p, "vec3");
|
|
680
681
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").convert3Dto2D(p);
|
|
681
682
|
}
|
|
682
683
|
convertToGlTF(node = viewer_api_general_1.sceneTree.root, convertForAr = false) {
|
|
683
684
|
return __awaiter(this, void 0, void 0, function* () {
|
|
684
|
-
const scope =
|
|
685
|
+
const scope = "convertToGlTF";
|
|
685
686
|
if (!(node instanceof viewer_shared_node_tree_1.TreeNode))
|
|
686
|
-
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node,
|
|
687
|
-
this.update(
|
|
687
|
+
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node, "node");
|
|
688
|
+
this.update("convertToGlTF.start");
|
|
688
689
|
const result = yield __classPrivateFieldGet(this, _ViewportApi_gltfConverter, "f").convert(node, convertForAr, this.id);
|
|
689
|
-
this.update(
|
|
690
|
-
return new Blob([result], { type:
|
|
690
|
+
this.update("convertToGlTF.end");
|
|
691
|
+
return new Blob([result], { type: "application/octet-stream" });
|
|
691
692
|
});
|
|
692
693
|
}
|
|
693
694
|
createArSessionLink(node, qrCode = true, fallbackUrl) {
|
|
694
695
|
var _a, _b;
|
|
695
696
|
return __awaiter(this, void 0, void 0, function* () {
|
|
696
|
-
const scope =
|
|
697
|
+
const scope = "createArSessionLink";
|
|
697
698
|
if (node && !(node instanceof viewer_shared_node_tree_1.TreeNode))
|
|
698
|
-
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node,
|
|
699
|
+
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node, "node");
|
|
699
700
|
let sessionEngineId = undefined;
|
|
700
701
|
for (const s in __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines) {
|
|
701
702
|
const state = __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines[s];
|
|
@@ -705,39 +706,48 @@ class ViewportApi {
|
|
|
705
706
|
}
|
|
706
707
|
}
|
|
707
708
|
if (!sessionEngineId)
|
|
708
|
-
throw new viewer_shared_services_1.ShapeDiverViewerArError(
|
|
709
|
+
throw new viewer_shared_services_1.ShapeDiverViewerArError("ViewportApi.createArSessionLink: None of the sessions that are registered are capable of using the AR feature.");
|
|
709
710
|
const targetNode = node || viewer_api_general_1.sceneTree.root;
|
|
710
711
|
const scalingMatrix = gl_matrix_1.mat4.fromScaling(gl_matrix_1.mat4.create(), this.arScale);
|
|
711
712
|
// add scaling matrix to scene tree node
|
|
712
|
-
targetNode.transformations.push({
|
|
713
|
+
targetNode.transformations.push({
|
|
714
|
+
id: "ar_scaling",
|
|
715
|
+
matrix: scalingMatrix,
|
|
716
|
+
});
|
|
713
717
|
// create the gltf
|
|
714
|
-
this.update(
|
|
718
|
+
this.update("createArSessionLink.start");
|
|
715
719
|
const blob = yield __classPrivateFieldGet(this, _ViewportApi_gltfConverter, "f").convert(targetNode, true, this.id);
|
|
716
720
|
// remove scaling the matrix
|
|
717
721
|
for (let i = 0; i < targetNode.transformations.length; i++)
|
|
718
|
-
if (targetNode.transformations[i].id ===
|
|
722
|
+
if (targetNode.transformations[i].id === "ar_scaling")
|
|
719
723
|
targetNode.transformations.splice(i, 1);
|
|
720
|
-
this.update(
|
|
721
|
-
const response = yield ((_a = __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines[sessionEngineId]) === null || _a === void 0 ? void 0 : _a.uploadGLTF(new Blob([blob], { type:
|
|
724
|
+
this.update("createArSessionLink.end");
|
|
725
|
+
const response = yield ((_a = __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines[sessionEngineId]) === null || _a === void 0 ? void 0 : _a.uploadGLTF(new Blob([blob], { type: "application/octet-stream" }), sdk_geometry_api_sdk_v2_1.ShapeDiverRequestGltfUploadQueryConversion.SCENE));
|
|
722
726
|
const backends = {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
727
|
+
sddev3: "https://sddev3.eu-central-1.shapediver.com",
|
|
728
|
+
sddev2: "https://sddev2.eu-central-1.shapediver.com",
|
|
729
|
+
sddev: "https://sddev.eu-central-1.shapediver.com",
|
|
730
|
+
sdtest: "https://sdtest.us-east-1.shapediver.com",
|
|
731
|
+
sdeuc1: "https://sdeuc1.eu-central-1.shapediver.com",
|
|
732
|
+
sdr7euc1: "https://sdr7euc1.eu-central-1.shapediver.com",
|
|
733
|
+
sduse1: "https://model-view.shapediver.com",
|
|
730
734
|
};
|
|
731
|
-
let backendIdentifier = Object.keys(backends).find((key) => {
|
|
735
|
+
let backendIdentifier = Object.keys(backends).find((key) => {
|
|
736
|
+
var _a;
|
|
737
|
+
return backends[key] ===
|
|
738
|
+
((_a = __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines[sessionEngineId]) === null || _a === void 0 ? void 0 : _a.modelViewUrl);
|
|
739
|
+
});
|
|
732
740
|
if (!backendIdentifier) {
|
|
733
741
|
const modelViewUrl = (_b = __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines[sessionEngineId]) === null || _b === void 0 ? void 0 : _b.modelViewUrl;
|
|
734
|
-
backendIdentifier = modelViewUrl === null || modelViewUrl === void 0 ? void 0 : modelViewUrl.replace(
|
|
742
|
+
backendIdentifier = modelViewUrl === null || modelViewUrl === void 0 ? void 0 : modelViewUrl.replace("https://", "").replace(".shapediver.com", "");
|
|
735
743
|
}
|
|
736
|
-
const fallbackQueryParameter = fallbackUrl
|
|
744
|
+
const fallbackQueryParameter = fallbackUrl
|
|
745
|
+
? `fb=${encodeURIComponent(fallbackUrl)}&`
|
|
746
|
+
: "";
|
|
737
747
|
if (!response || !response.gltf || !response.gltf.sceneId)
|
|
738
|
-
throw new viewer_shared_services_1.ShapeDiverViewerArError(
|
|
748
|
+
throw new viewer_shared_services_1.ShapeDiverViewerArError("ViewportApi.createArSessionLink: There was an unexpected error with the ar scene response. Please contact us if this happens again.");
|
|
739
749
|
const sceneId = response.gltf.sceneId;
|
|
740
|
-
const link = `https://viewer.shapediver.com/v3/${viewer_shared_build_data_1.build_data.build_version.replace(
|
|
750
|
+
const link = `https://viewer.shapediver.com/v3/${viewer_shared_build_data_1.build_data.build_version.replace("3.", "")}/ar.html?${fallbackQueryParameter}b=${encodeURIComponent(backendIdentifier)}&id=${encodeURIComponent(sceneId)}`;
|
|
741
751
|
if (qrCode === false) {
|
|
742
752
|
return link;
|
|
743
753
|
}
|
|
@@ -757,50 +767,50 @@ class ViewportApi {
|
|
|
757
767
|
});
|
|
758
768
|
}
|
|
759
769
|
createLightScene(properties) {
|
|
760
|
-
const scope =
|
|
761
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, properties,
|
|
770
|
+
const scope = "createLightScene";
|
|
771
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, properties, "object", false);
|
|
762
772
|
const prop = Object.assign({}, properties);
|
|
763
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, prop.name,
|
|
764
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, prop.standard,
|
|
773
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, prop.name, "string", false);
|
|
774
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, prop.standard, "boolean", false);
|
|
765
775
|
const lightScene = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").lightEngine.createLightScene(properties || {});
|
|
766
|
-
this.update(
|
|
776
|
+
this.update("createLightScene");
|
|
767
777
|
return __classPrivateFieldGet(this, _ViewportApi_lightScenes, "f")[lightScene.id];
|
|
768
778
|
}
|
|
769
779
|
createOrthographicCamera(id) {
|
|
770
|
-
const scope =
|
|
771
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id,
|
|
780
|
+
const scope = "createOrthographicCamera";
|
|
781
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id, "string", false);
|
|
772
782
|
const camera = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.createCamera(viewer_rendering_engine_camera_engine_1.CAMERA_TYPE.ORTHOGRAPHIC, id);
|
|
773
|
-
this.update(
|
|
783
|
+
this.update("createOrthographicCamera");
|
|
774
784
|
return __classPrivateFieldGet(this, _ViewportApi_cameras, "f")[camera.id];
|
|
775
785
|
}
|
|
776
786
|
createPerspectiveCamera(id) {
|
|
777
|
-
const scope =
|
|
778
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id,
|
|
787
|
+
const scope = "createPerspectiveCamera";
|
|
788
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id, "string", false);
|
|
779
789
|
const camera = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.createCamera(viewer_rendering_engine_camera_engine_1.CAMERA_TYPE.PERSPECTIVE, id);
|
|
780
|
-
this.update(
|
|
790
|
+
this.update("createPerspectiveCamera");
|
|
781
791
|
return __classPrivateFieldGet(this, _ViewportApi_cameras, "f")[camera.id];
|
|
782
792
|
}
|
|
783
793
|
createSDTFOverview(node) {
|
|
784
|
-
const scope =
|
|
794
|
+
const scope = "createSDTFOverview";
|
|
785
795
|
if (!(node instanceof viewer_shared_node_tree_1.TreeNode))
|
|
786
|
-
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node,
|
|
787
|
-
this.update(
|
|
796
|
+
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node, "node");
|
|
797
|
+
this.update("createSDTFOverview");
|
|
788
798
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").createSDTFOverview(node);
|
|
789
799
|
}
|
|
790
800
|
displayErrorMessage(message) {
|
|
791
|
-
const scope =
|
|
792
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, message,
|
|
801
|
+
const scope = "displayErrorMessage";
|
|
802
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, message, "string");
|
|
793
803
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").displayErrorMessage(message);
|
|
794
|
-
this.update(
|
|
804
|
+
this.update("displayErrorMessage");
|
|
795
805
|
}
|
|
796
806
|
getEnvironmentMapImageUrl() {
|
|
797
807
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").getEnvironmentMapImageUrl();
|
|
798
808
|
}
|
|
799
809
|
getScreenshot(type, quality) {
|
|
800
|
-
const scope =
|
|
801
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, type,
|
|
802
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, quality,
|
|
803
|
-
this.update(
|
|
810
|
+
const scope = "getScreenshot";
|
|
811
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, type, "string", false);
|
|
812
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, quality, "number", false);
|
|
813
|
+
this.update("getScreenshot");
|
|
804
814
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").getScreenshot(type, quality);
|
|
805
815
|
}
|
|
806
816
|
getViewportSettings() {
|
|
@@ -816,35 +826,35 @@ class ViewportApi {
|
|
|
816
826
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").pointerEventToRay(event);
|
|
817
827
|
}
|
|
818
828
|
raytraceScene(origin, direction, filterCriteria) {
|
|
819
|
-
const scope =
|
|
820
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, origin,
|
|
821
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, direction,
|
|
829
|
+
const scope = "raytraceScene";
|
|
830
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, origin, "vec3");
|
|
831
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, direction, "vec3");
|
|
822
832
|
return __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").raytraceScene(origin, direction, filterCriteria);
|
|
823
833
|
}
|
|
824
834
|
removeCamera(id) {
|
|
825
|
-
const scope =
|
|
826
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id,
|
|
835
|
+
const scope = "removeCamera";
|
|
836
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id, "string");
|
|
827
837
|
const check = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.removeCamera(id);
|
|
828
|
-
this.update(
|
|
838
|
+
this.update("removeCamera");
|
|
829
839
|
return check;
|
|
830
840
|
}
|
|
831
841
|
removeCanvasEventListener(token) {
|
|
832
|
-
const scope =
|
|
833
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, token,
|
|
842
|
+
const scope = "removeCanvasEventListener";
|
|
843
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, token, "string");
|
|
834
844
|
const check = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").domEventEngine.removeDomEventListener(token);
|
|
835
845
|
return check;
|
|
836
846
|
}
|
|
837
847
|
removeFlag(token) {
|
|
838
|
-
const scope =
|
|
839
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, token,
|
|
848
|
+
const scope = "removeFlag";
|
|
849
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, token, "string");
|
|
840
850
|
const check = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").removeFlag(token);
|
|
841
851
|
return check;
|
|
842
852
|
}
|
|
843
853
|
removeLightScene(id) {
|
|
844
|
-
const scope =
|
|
845
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id,
|
|
854
|
+
const scope = "removeLightScene";
|
|
855
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, id, "string");
|
|
846
856
|
const check = __classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").lightEngine.removeLightScene(id);
|
|
847
|
-
this.update(
|
|
857
|
+
this.update("removeLightScene");
|
|
848
858
|
return check;
|
|
849
859
|
}
|
|
850
860
|
removeRestrictedCanvasListenerToken(token) {
|
|
@@ -857,63 +867,63 @@ class ViewportApi {
|
|
|
857
867
|
for (const c in this.cameras)
|
|
858
868
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.removeCamera(c);
|
|
859
869
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").cameraEngine.createDefaultCameras();
|
|
860
|
-
this.update(
|
|
870
|
+
this.update("resetToDefaultCameras");
|
|
861
871
|
}
|
|
862
872
|
resize(width, height) {
|
|
863
|
-
const scope =
|
|
864
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, width,
|
|
865
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, height,
|
|
873
|
+
const scope = "resize";
|
|
874
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, width, "number");
|
|
875
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, height, "number");
|
|
866
876
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").resize(width, height);
|
|
867
|
-
this.update(
|
|
877
|
+
this.update("resize");
|
|
868
878
|
}
|
|
869
879
|
restrictEventListeners(allowedListeners) {
|
|
870
880
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").domEventEngine.allowEventListeners(allowedListeners);
|
|
871
881
|
}
|
|
872
882
|
update(id) {
|
|
873
|
-
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").update(id ||
|
|
883
|
+
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").update(id || "ViewportApi");
|
|
874
884
|
}
|
|
875
885
|
updateDefaultLineMaterial(value) {
|
|
876
|
-
const scope =
|
|
877
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
886
|
+
const scope = "updateDefaultLineMaterial";
|
|
887
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "object");
|
|
878
888
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").defaultLineMaterial = value;
|
|
879
889
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
880
|
-
this.update(
|
|
890
|
+
this.update("updateDefaultLineMaterial");
|
|
881
891
|
}
|
|
882
892
|
updateDefaultMaterial(value) {
|
|
883
|
-
const scope =
|
|
884
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
893
|
+
const scope = "updateDefaultMaterial";
|
|
894
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "object");
|
|
885
895
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").defaultMaterial = value;
|
|
886
896
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
887
|
-
this.update(
|
|
897
|
+
this.update("updateDefaultMaterial");
|
|
888
898
|
}
|
|
889
899
|
updateDefaultPointMaterial(value) {
|
|
890
|
-
const scope =
|
|
891
|
-
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value,
|
|
900
|
+
const scope = "updateDefaultPointMaterial";
|
|
901
|
+
__classPrivateFieldGet(this, _ViewportApi_inputValidator, "f").validateAndError(`ViewportApi.${scope}`, value, "object");
|
|
892
902
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").defaultPointMaterial = value;
|
|
893
903
|
__classPrivateFieldGet(this, _ViewportApi_logger, "f").debug(`ViewportApi.${scope}: ${scope} was set to: ${value}`);
|
|
894
|
-
this.update(
|
|
904
|
+
this.update("updateDefaultPointMaterial");
|
|
895
905
|
}
|
|
896
906
|
updateEnvironmentGeometry() {
|
|
897
907
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").updateEnvironmentGeometry();
|
|
898
908
|
}
|
|
899
909
|
updateNode(node) {
|
|
900
|
-
const scope =
|
|
910
|
+
const scope = "updateNode";
|
|
901
911
|
if (!(node instanceof viewer_shared_node_tree_1.TreeNode))
|
|
902
|
-
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node,
|
|
912
|
+
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node, "node");
|
|
903
913
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").sceneTreeManager.updateNode(node, node.convertedObject[this.id]);
|
|
904
914
|
}
|
|
905
915
|
updateNodeTransformation(node) {
|
|
906
|
-
const scope =
|
|
916
|
+
const scope = "updateNodeTransformation";
|
|
907
917
|
if (!(node instanceof viewer_shared_node_tree_1.TreeNode))
|
|
908
|
-
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node,
|
|
918
|
+
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node, "node");
|
|
909
919
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").sceneTreeManager.updateNode(node, node.convertedObject[this.id], { transformationOnly: true });
|
|
910
920
|
}
|
|
911
921
|
viewInAR(node) {
|
|
912
922
|
var _a, _b;
|
|
913
923
|
return __awaiter(this, void 0, void 0, function* () {
|
|
914
|
-
const scope =
|
|
924
|
+
const scope = "viewInAR";
|
|
915
925
|
if (node && !(node instanceof viewer_shared_node_tree_1.TreeNode))
|
|
916
|
-
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node,
|
|
926
|
+
throw new viewer_shared_services_1.ShapeDiverViewerValidationError(`${scope}: Input could not be validated. ${node} is not of type node.`, node, "node");
|
|
917
927
|
let sessionEngineId = undefined;
|
|
918
928
|
for (const s in __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines) {
|
|
919
929
|
const state = __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines[s];
|
|
@@ -923,20 +933,25 @@ class ViewportApi {
|
|
|
923
933
|
}
|
|
924
934
|
}
|
|
925
935
|
if (!sessionEngineId)
|
|
926
|
-
throw new viewer_shared_services_1.ShapeDiverViewerArError(
|
|
936
|
+
throw new viewer_shared_services_1.ShapeDiverViewerArError("Api.viewInAR: None of the sessions that are registered are capable of using the AR feature.");
|
|
927
937
|
const targetNode = node || viewer_api_general_1.sceneTree.root;
|
|
928
938
|
const scalingMatrix = gl_matrix_1.mat4.fromScaling(gl_matrix_1.mat4.create(), this.arScale);
|
|
929
939
|
// add scaling matrix to scene tree node
|
|
930
|
-
targetNode.transformations.push({
|
|
940
|
+
targetNode.transformations.push({
|
|
941
|
+
id: "ar_scaling",
|
|
942
|
+
matrix: scalingMatrix,
|
|
943
|
+
});
|
|
931
944
|
// create the gltf
|
|
932
|
-
this.update(
|
|
945
|
+
this.update("viewInAR.start");
|
|
933
946
|
const blob = yield __classPrivateFieldGet(this, _ViewportApi_gltfConverter, "f").convert(targetNode, true, this.id);
|
|
934
947
|
// remove scaling the matrix
|
|
935
948
|
for (let i = 0; i < targetNode.transformations.length; i++)
|
|
936
|
-
if (targetNode.transformations[i].id ===
|
|
949
|
+
if (targetNode.transformations[i].id === "ar_scaling")
|
|
937
950
|
targetNode.transformations.splice(i, 1);
|
|
938
|
-
this.update(
|
|
939
|
-
const response = yield ((_a = __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines[sessionEngineId]) === null || _a === void 0 ? void 0 : _a.uploadGLTF(new Blob([blob], { type:
|
|
951
|
+
this.update("viewInAR.end");
|
|
952
|
+
const response = yield ((_a = __classPrivateFieldGet(this, _ViewportApi_stateEngine, "f").sessionEngines[sessionEngineId]) === null || _a === void 0 ? void 0 : _a.uploadGLTF(new Blob([blob], { type: "application/octet-stream" }), __classPrivateFieldGet(this, _ViewportApi_systemInfo, "f").isIOS
|
|
953
|
+
? sdk_geometry_api_sdk_v2_1.ShapeDiverRequestGltfUploadQueryConversion.USDZ
|
|
954
|
+
: sdk_geometry_api_sdk_v2_1.ShapeDiverRequestGltfUploadQueryConversion.NONE));
|
|
940
955
|
const href = (_b = response === null || response === void 0 ? void 0 : response.gltf) === null || _b === void 0 ? void 0 : _b.href;
|
|
941
956
|
if (href)
|
|
942
957
|
__classPrivateFieldGet(this, _ViewportApi_renderingEngine, "f").viewInAR(href);
|