@combeenation/3d-viewer 5.1.2 → 5.2.0-alpha4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -111
- package/dist/lib-cjs/api/classes/animationInterface.d.ts +8 -8
- package/dist/lib-cjs/api/classes/animationInterface.js +2 -1
- package/dist/lib-cjs/api/classes/dottedPath.d.ts +79 -79
- package/dist/lib-cjs/api/classes/dottedPath.js +166 -187
- package/dist/lib-cjs/api/classes/dottedPath.js.map +1 -1
- package/dist/lib-cjs/api/classes/element.d.ts +149 -149
- package/dist/lib-cjs/api/classes/element.js +668 -823
- package/dist/lib-cjs/api/classes/element.js.map +1 -1
- package/dist/lib-cjs/api/classes/event.d.ts +326 -326
- package/dist/lib-cjs/api/classes/event.js +349 -371
- package/dist/lib-cjs/api/classes/event.js.map +1 -1
- package/dist/lib-cjs/api/classes/eventBroadcaster.d.ts +26 -26
- package/dist/lib-cjs/api/classes/eventBroadcaster.js +49 -53
- package/dist/lib-cjs/api/classes/eventBroadcaster.js.map +1 -1
- package/dist/lib-cjs/api/classes/parameter.d.ts +336 -336
- package/dist/lib-cjs/api/classes/parameter.js +461 -471
- package/dist/lib-cjs/api/classes/parameter.js.map +1 -1
- package/dist/lib-cjs/api/classes/parameterObservable.d.ts +36 -36
- package/dist/lib-cjs/api/classes/parameterObservable.js +97 -101
- package/dist/lib-cjs/api/classes/parameterObservable.js.map +1 -1
- package/dist/lib-cjs/api/classes/parameterizable.d.ts +15 -15
- package/dist/lib-cjs/api/classes/parameterizable.js +102 -149
- package/dist/lib-cjs/api/classes/parameterizable.js.map +1 -1
- package/dist/lib-cjs/api/classes/placementAnimation.d.ts +45 -44
- package/dist/lib-cjs/api/classes/placementAnimation.js +175 -163
- package/dist/lib-cjs/api/classes/placementAnimation.js.map +1 -1
- package/dist/lib-cjs/api/classes/variant.d.ts +234 -234
- package/dist/lib-cjs/api/classes/variant.js +836 -1203
- package/dist/lib-cjs/api/classes/variant.js.map +1 -1
- package/dist/lib-cjs/api/classes/variantInstance.d.ts +45 -45
- package/dist/lib-cjs/api/classes/variantInstance.js +101 -108
- package/dist/lib-cjs/api/classes/variantInstance.js.map +1 -1
- package/dist/lib-cjs/api/classes/variantParameterizable.d.ts +17 -17
- package/dist/lib-cjs/api/classes/variantParameterizable.js +88 -99
- package/dist/lib-cjs/api/classes/variantParameterizable.js.map +1 -1
- package/dist/lib-cjs/api/classes/viewer.d.ts +187 -184
- package/dist/lib-cjs/api/classes/viewer.js +593 -731
- package/dist/lib-cjs/api/classes/viewer.js.map +1 -1
- package/dist/lib-cjs/api/classes/viewerLight.d.ts +66 -66
- package/dist/lib-cjs/api/classes/viewerLight.js +343 -392
- package/dist/lib-cjs/api/classes/viewerLight.js.map +1 -1
- package/dist/lib-cjs/api/internal/lensRendering.d.ts +8 -8
- package/dist/lib-cjs/api/internal/lensRendering.js +11 -11
- package/dist/lib-cjs/api/internal/lensRendering.js.map +1 -1
- package/dist/lib-cjs/api/internal/sceneSetup.d.ts +13 -13
- package/dist/lib-cjs/api/internal/sceneSetup.js +225 -238
- package/dist/lib-cjs/api/internal/sceneSetup.js.map +1 -1
- package/dist/lib-cjs/api/manager/animationManager.d.ts +30 -29
- package/dist/lib-cjs/api/manager/animationManager.js +126 -130
- package/dist/lib-cjs/api/manager/animationManager.js.map +1 -1
- package/dist/lib-cjs/api/manager/gltfExportManager.d.ts +65 -65
- package/dist/lib-cjs/api/manager/gltfExportManager.js +196 -223
- package/dist/lib-cjs/api/manager/gltfExportManager.js.map +1 -1
- package/dist/lib-cjs/api/manager/sceneManager.d.ts +31 -31
- package/dist/lib-cjs/api/manager/sceneManager.js +127 -152
- package/dist/lib-cjs/api/manager/sceneManager.js.map +1 -1
- package/dist/lib-cjs/api/manager/variantInstanceManager.d.ts +92 -92
- package/dist/lib-cjs/api/manager/variantInstanceManager.js +260 -335
- package/dist/lib-cjs/api/manager/variantInstanceManager.js.map +1 -1
- package/dist/lib-cjs/api/store/specStorage.d.ts +24 -24
- package/dist/lib-cjs/api/store/specStorage.js +50 -51
- package/dist/lib-cjs/api/store/specStorage.js.map +1 -1
- package/dist/lib-cjs/api/util/babylonHelper.d.ts +174 -174
- package/dist/lib-cjs/api/util/babylonHelper.js +591 -611
- package/dist/lib-cjs/api/util/babylonHelper.js.map +1 -1
- package/dist/lib-cjs/api/util/globalTypes.d.ts +366 -366
- package/dist/lib-cjs/api/util/globalTypes.js +1 -1
- package/dist/lib-cjs/api/util/resourceHelper.d.ts +58 -58
- package/dist/lib-cjs/api/util/resourceHelper.js +201 -257
- package/dist/lib-cjs/api/util/resourceHelper.js.map +1 -1
- package/dist/lib-cjs/api/util/sceneLoaderHelper.d.ts +35 -35
- package/dist/lib-cjs/api/util/sceneLoaderHelper.js +141 -140
- package/dist/lib-cjs/api/util/sceneLoaderHelper.js.map +1 -1
- package/dist/lib-cjs/api/util/stringHelper.d.ts +9 -9
- package/dist/lib-cjs/api/util/stringHelper.js +23 -25
- package/dist/lib-cjs/api/util/stringHelper.js.map +1 -1
- package/dist/lib-cjs/api/util/structureHelper.d.ts +9 -9
- package/dist/lib-cjs/api/util/structureHelper.js +48 -48
- package/dist/lib-cjs/api/util/structureHelper.js.map +1 -1
- package/dist/lib-cjs/buildinfo.json +3 -3
- package/dist/lib-cjs/index.d.ts +51 -49
- package/dist/lib-cjs/index.js +110 -89
- package/dist/lib-cjs/index.js.map +1 -1
- package/dist/lib-es6/api/classes/animationInterface.d.ts +8 -8
- package/dist/lib-es6/api/classes/animationInterface.js +1 -1
- package/dist/lib-es6/api/classes/dottedPath.d.ts +79 -79
- package/dist/lib-es6/api/classes/dottedPath.js +162 -184
- package/dist/lib-es6/api/classes/dottedPath.js.map +1 -1
- package/dist/lib-es6/api/classes/element.d.ts +149 -149
- package/dist/lib-es6/api/classes/element.js +664 -820
- package/dist/lib-es6/api/classes/element.js.map +1 -1
- package/dist/lib-es6/api/classes/event.d.ts +326 -326
- package/dist/lib-es6/api/classes/event.js +345 -368
- package/dist/lib-es6/api/classes/event.js.map +1 -1
- package/dist/lib-es6/api/classes/eventBroadcaster.d.ts +26 -26
- package/dist/lib-es6/api/classes/eventBroadcaster.js +42 -50
- package/dist/lib-es6/api/classes/eventBroadcaster.js.map +1 -1
- package/dist/lib-es6/api/classes/parameter.d.ts +336 -336
- package/dist/lib-es6/api/classes/parameter.js +457 -468
- package/dist/lib-es6/api/classes/parameter.js.map +1 -1
- package/dist/lib-es6/api/classes/parameterObservable.d.ts +36 -36
- package/dist/lib-es6/api/classes/parameterObservable.js +93 -98
- package/dist/lib-es6/api/classes/parameterObservable.js.map +1 -1
- package/dist/lib-es6/api/classes/parameterizable.d.ts +15 -15
- package/dist/lib-es6/api/classes/parameterizable.js +98 -146
- package/dist/lib-es6/api/classes/parameterizable.js.map +1 -1
- package/dist/lib-es6/api/classes/placementAnimation.d.ts +45 -44
- package/dist/lib-es6/api/classes/placementAnimation.js +171 -160
- package/dist/lib-es6/api/classes/placementAnimation.js.map +1 -1
- package/dist/lib-es6/api/classes/variant.d.ts +234 -234
- package/dist/lib-es6/api/classes/variant.js +832 -1198
- package/dist/lib-es6/api/classes/variant.js.map +1 -1
- package/dist/lib-es6/api/classes/variantInstance.d.ts +45 -45
- package/dist/lib-es6/api/classes/variantInstance.js +97 -105
- package/dist/lib-es6/api/classes/variantInstance.js.map +1 -1
- package/dist/lib-es6/api/classes/variantParameterizable.d.ts +17 -17
- package/dist/lib-es6/api/classes/variantParameterizable.js +84 -96
- package/dist/lib-es6/api/classes/variantParameterizable.js.map +1 -1
- package/dist/lib-es6/api/classes/viewer.d.ts +187 -184
- package/dist/lib-es6/api/classes/viewer.js +586 -728
- package/dist/lib-es6/api/classes/viewer.js.map +1 -1
- package/dist/lib-es6/api/classes/viewerLight.d.ts +66 -66
- package/dist/lib-es6/api/classes/viewerLight.js +316 -389
- package/dist/lib-es6/api/classes/viewerLight.js.map +1 -1
- package/dist/lib-es6/api/internal/lensRendering.d.ts +8 -8
- package/dist/lib-es6/api/internal/lensRendering.js +8 -8
- package/dist/lib-es6/api/internal/lensRendering.js.map +1 -1
- package/dist/lib-es6/api/internal/sceneSetup.d.ts +13 -13
- package/dist/lib-es6/api/internal/sceneSetup.js +197 -233
- package/dist/lib-es6/api/internal/sceneSetup.js.map +1 -1
- package/dist/lib-es6/api/manager/animationManager.d.ts +30 -29
- package/dist/lib-es6/api/manager/animationManager.js +122 -127
- package/dist/lib-es6/api/manager/animationManager.js.map +1 -1
- package/dist/lib-es6/api/manager/gltfExportManager.d.ts +65 -65
- package/dist/lib-es6/api/manager/gltfExportManager.js +192 -220
- package/dist/lib-es6/api/manager/gltfExportManager.js.map +1 -1
- package/dist/lib-es6/api/manager/sceneManager.d.ts +31 -31
- package/dist/lib-es6/api/manager/sceneManager.js +123 -149
- package/dist/lib-es6/api/manager/sceneManager.js.map +1 -1
- package/dist/lib-es6/api/manager/variantInstanceManager.d.ts +92 -92
- package/dist/lib-es6/api/manager/variantInstanceManager.js +256 -332
- package/dist/lib-es6/api/manager/variantInstanceManager.js.map +1 -1
- package/dist/lib-es6/api/store/specStorage.d.ts +24 -24
- package/dist/lib-es6/api/store/specStorage.js +46 -48
- package/dist/lib-es6/api/store/specStorage.js.map +1 -1
- package/dist/lib-es6/api/util/babylonHelper.d.ts +174 -174
- package/dist/lib-es6/api/util/babylonHelper.js +561 -581
- package/dist/lib-es6/api/util/babylonHelper.js.map +1 -1
- package/dist/lib-es6/api/util/globalTypes.d.ts +366 -366
- package/dist/lib-es6/api/util/globalTypes.js +1 -1
- package/dist/lib-es6/api/util/resourceHelper.d.ts +58 -58
- package/dist/lib-es6/api/util/resourceHelper.js +191 -247
- package/dist/lib-es6/api/util/resourceHelper.js.map +1 -1
- package/dist/lib-es6/api/util/sceneLoaderHelper.d.ts +35 -35
- package/dist/lib-es6/api/util/sceneLoaderHelper.js +131 -133
- package/dist/lib-es6/api/util/sceneLoaderHelper.js.map +1 -1
- package/dist/lib-es6/api/util/stringHelper.d.ts +9 -9
- package/dist/lib-es6/api/util/stringHelper.js +19 -21
- package/dist/lib-es6/api/util/stringHelper.js.map +1 -1
- package/dist/lib-es6/api/util/structureHelper.d.ts +9 -9
- package/dist/lib-es6/api/util/structureHelper.js +45 -45
- package/dist/lib-es6/api/util/structureHelper.js.map +1 -1
- package/dist/lib-es6/buildinfo.json +3 -3
- package/dist/lib-es6/index.d.ts +51 -49
- package/dist/lib-es6/index.js +48 -50
- package/dist/lib-es6/index.js.map +1 -1
- package/dist/lib-full/lens-rendering.js +2 -0
- package/dist/lib-full/lens-rendering.js.map +1 -0
- package/dist/lib-full/main.js +3 -0
- package/dist/lib-full/main.js.LICENSE.txt +9 -0
- package/dist/lib-full/main.js.map +1 -0
- package/package.json +76 -88
- package/src/api/classes/animationInterface.ts +10 -10
- package/src/api/classes/dottedPath.ts +181 -181
- package/src/api/classes/element.ts +716 -716
- package/src/api/classes/event.ts +367 -367
- package/src/api/classes/eventBroadcaster.ts +52 -52
- package/src/api/classes/parameter.ts +494 -494
- package/src/api/classes/parameterObservable.ts +100 -100
- package/src/api/classes/parameterizable.ts +87 -87
- package/src/api/classes/placementAnimation.ts +161 -160
- package/src/api/classes/variant.ts +904 -905
- package/src/api/classes/variantInstance.ts +97 -97
- package/src/api/classes/variantParameterizable.ts +85 -85
- package/src/api/classes/viewer.ts +669 -668
- package/src/api/classes/viewerLight.ts +334 -334
- package/src/api/internal/debugViewer.ts +90 -90
- package/src/api/internal/lensRendering.ts +9 -10
- package/src/api/internal/sceneSetup.ts +204 -204
- package/src/api/manager/animationManager.ts +143 -142
- package/src/api/manager/gltfExportManager.ts +191 -191
- package/src/api/manager/sceneManager.ts +127 -127
- package/src/api/manager/variantInstanceManager.ts +265 -265
- package/src/api/store/specStorage.ts +51 -51
- package/src/api/util/babylonHelper.ts +663 -663
- package/src/api/util/globalTypes.ts +413 -413
- package/src/api/util/resourceHelper.ts +189 -189
- package/src/api/util/sceneLoaderHelper.ts +148 -147
- package/src/api/util/stringHelper.ts +23 -23
- package/src/api/util/structureHelper.ts +49 -49
- package/src/buildinfo.json +3 -3
- package/src/dev.ts +61 -64
- package/src/index.ts +96 -94
- package/src/types.d.ts +28 -28
- package/dist/lib-cjs/api/classes/elementParameterizable.d.ts +0 -14
- package/dist/lib-cjs/api/classes/elementParameterizable.js +0 -135
- package/dist/lib-cjs/api/classes/elementParameterizable.js.map +0 -1
- package/dist/lib-cjs/api/internal/debugViewer.d.ts +0 -13
- package/dist/lib-cjs/api/internal/debugViewer.js +0 -87
- package/dist/lib-cjs/api/internal/debugViewer.js.map +0 -1
- package/dist/lib-es6/api/internal/debugViewer.d.ts +0 -13
- package/dist/lib-es6/api/internal/debugViewer.js +0 -84
- package/dist/lib-es6/api/internal/debugViewer.js.map +0 -1
- package/dist/webpack-stats.json +0 -0
- package/src/commonjs.tsconfig.json +0 -10
- package/src/declaration.tsconfig.json +0 -8
- package/src/es6.tsconfig.json +0 -10
- package/src/pagesconfig.json +0 -81
- package/src/tsconfig.json +0 -33
- package/src/tsconfig.types.json +0 -9
package/src/index.ts
CHANGED
|
@@ -1,94 +1,96 @@
|
|
|
1
|
-
/// <reference path="api/util/globalTypes.ts" />
|
|
2
|
-
/// <reference
|
|
3
|
-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
import '@babylonjs/core/
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
import
|
|
47
|
-
import {
|
|
48
|
-
import
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
1
|
+
/// <reference path="api/util/globalTypes.ts" />
|
|
2
|
+
/// <reference path="types.d.ts" />
|
|
3
|
+
/// <reference types="gsap" />
|
|
4
|
+
import { AnimationInterface } from './api/classes/animationInterface';
|
|
5
|
+
import { Element } from './api/classes/element';
|
|
6
|
+
import { Event, emitter } from './api/classes/event';
|
|
7
|
+
import { EventBroadcaster } from './api/classes/eventBroadcaster';
|
|
8
|
+
import { Parameter } from './api/classes/parameter';
|
|
9
|
+
import { ParameterObservable } from './api/classes/parameterObservable';
|
|
10
|
+
import { Parameterizable } from './api/classes/parameterizable';
|
|
11
|
+
import { PlacementAnimation } from './api/classes/placementAnimation';
|
|
12
|
+
import { Variant } from './api/classes/variant';
|
|
13
|
+
import { VariantInstance } from './api/classes/variantInstance';
|
|
14
|
+
import { VariantParameterizable } from './api/classes/variantParameterizable';
|
|
15
|
+
import { Viewer } from './api/classes/viewer';
|
|
16
|
+
import { ViewerLight } from './api/classes/viewerLight';
|
|
17
|
+
import { AnimationManager } from './api/manager/animationManager';
|
|
18
|
+
import { GltfExportManager } from './api/manager/gltfExportManager';
|
|
19
|
+
import { SceneManager } from './api/manager/sceneManager';
|
|
20
|
+
import { VariantInstanceManager } from './api/manager/variantInstanceManager';
|
|
21
|
+
import * as BabylonHelper from './api/util/babylonHelper';
|
|
22
|
+
import { Animation as BabylonAnimation } from '@babylonjs/core/Animations/animation';
|
|
23
|
+
import { ArcRotateCamera } from '@babylonjs/core/Cameras/arcRotateCamera';
|
|
24
|
+
import { Engine } from '@babylonjs/core/Engines/engine';
|
|
25
|
+
import { DirectionalLight } from '@babylonjs/core/Lights/directionalLight';
|
|
26
|
+
import { HemisphericLight } from '@babylonjs/core/Lights/hemisphericLight';
|
|
27
|
+
import { PBRMaterial } from '@babylonjs/core/Materials/PBR/pbrMaterial';
|
|
28
|
+
import { CubeTexture } from '@babylonjs/core/Materials/Textures/cubeTexture';
|
|
29
|
+
import { DynamicTexture } from '@babylonjs/core/Materials/Textures/dynamicTexture';
|
|
30
|
+
import { Texture } from '@babylonjs/core/Materials/Textures/texture';
|
|
31
|
+
import { Material } from '@babylonjs/core/Materials/material';
|
|
32
|
+
import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial';
|
|
33
|
+
import { Color3, Color4 } from '@babylonjs/core/Maths/math.color';
|
|
34
|
+
import { Vector3 } from '@babylonjs/core/Maths/math.vector';
|
|
35
|
+
import { AbstractMesh } from '@babylonjs/core/Meshes/abstractMesh';
|
|
36
|
+
import { InstancedMesh } from '@babylonjs/core/Meshes/instancedMesh';
|
|
37
|
+
import { Mesh } from '@babylonjs/core/Meshes/mesh';
|
|
38
|
+
import { MeshBuilder } from '@babylonjs/core/Meshes/meshBuilder';
|
|
39
|
+
import { TransformNode } from '@babylonjs/core/Meshes/transformNode';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Without explicitly importing the "BoundingBoxRenderer", we're getting "scene.getBoundingBoxRenderer is undefined"
|
|
43
|
+
* errors when creating HighlightLayer instances. Not sure why but those errors only happen when using the built
|
|
44
|
+
* version of the viewer (e.g. when pulling it from NPM etc.)...
|
|
45
|
+
*/
|
|
46
|
+
import '@babylonjs/core/Rendering/boundingBoxRenderer';
|
|
47
|
+
import { Node } from '@babylonjs/core/node';
|
|
48
|
+
import { Scene } from '@babylonjs/core/scene';
|
|
49
|
+
import { EventEmitter } from 'eventemitter3';
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Expose some frequently used babylon modules by our consumers.
|
|
53
|
+
*/
|
|
54
|
+
export {
|
|
55
|
+
AnimationManager,
|
|
56
|
+
AnimationInterface,
|
|
57
|
+
Variant,
|
|
58
|
+
VariantInstanceManager,
|
|
59
|
+
Viewer,
|
|
60
|
+
ParameterObservable,
|
|
61
|
+
Parameterizable,
|
|
62
|
+
VariantParameterizable,
|
|
63
|
+
ViewerLight,
|
|
64
|
+
emitter as Emitter,
|
|
65
|
+
EventEmitter,
|
|
66
|
+
Event,
|
|
67
|
+
Parameter,
|
|
68
|
+
VariantInstance,
|
|
69
|
+
Color3,
|
|
70
|
+
Color4,
|
|
71
|
+
Vector3,
|
|
72
|
+
AbstractMesh,
|
|
73
|
+
InstancedMesh,
|
|
74
|
+
Mesh,
|
|
75
|
+
TransformNode,
|
|
76
|
+
Node,
|
|
77
|
+
Material,
|
|
78
|
+
PBRMaterial,
|
|
79
|
+
StandardMaterial,
|
|
80
|
+
Scene,
|
|
81
|
+
Engine,
|
|
82
|
+
ArcRotateCamera,
|
|
83
|
+
DynamicTexture,
|
|
84
|
+
CubeTexture,
|
|
85
|
+
MeshBuilder,
|
|
86
|
+
Texture,
|
|
87
|
+
BabylonAnimation,
|
|
88
|
+
HemisphericLight,
|
|
89
|
+
DirectionalLight,
|
|
90
|
+
Element,
|
|
91
|
+
EventBroadcaster,
|
|
92
|
+
SceneManager,
|
|
93
|
+
PlacementAnimation,
|
|
94
|
+
BabylonHelper,
|
|
95
|
+
GltfExportManager,
|
|
96
|
+
};
|
package/src/types.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
/** @ignore **/
|
|
2
|
-
declare let IS_PRODUCTION: boolean;
|
|
3
|
-
declare let VERSION_INFORMATION: string;
|
|
4
|
-
|
|
5
|
-
interface Window {
|
|
6
|
-
Cbn:
|
|
7
|
-
| undefined /* window.Cbn is only available when viewer runs inside Combeenation configurator */
|
|
8
|
-
| {
|
|
9
|
-
Assets: {
|
|
10
|
-
/**
|
|
11
|
-
* Retrieve material definition from configurator
|
|
12
|
-
*
|
|
13
|
-
* @param materialId
|
|
14
|
-
*
|
|
15
|
-
* @return Undefined if no definition for the given material name exists, otherwise an "JSON object" which can
|
|
16
|
-
* be passed to `BABYLON.Material.Parse` to create a runtime material object.
|
|
17
|
-
*/
|
|
18
|
-
getMaterial(materialId: string): object | undefined;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Checks if a definition for a given material name exists in the configurator and issues a warning if not.
|
|
22
|
-
*
|
|
23
|
-
* @param materialId
|
|
24
|
-
*/
|
|
25
|
-
assertMaterialExists(materialId: string): boolean;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
}
|
|
1
|
+
/** @ignore **/
|
|
2
|
+
declare let IS_PRODUCTION: boolean;
|
|
3
|
+
declare let VERSION_INFORMATION: string;
|
|
4
|
+
|
|
5
|
+
interface Window {
|
|
6
|
+
Cbn:
|
|
7
|
+
| undefined /* window.Cbn is only available when viewer runs inside Combeenation configurator */
|
|
8
|
+
| {
|
|
9
|
+
Assets: {
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve material definition from configurator
|
|
12
|
+
*
|
|
13
|
+
* @param materialId
|
|
14
|
+
*
|
|
15
|
+
* @return Undefined if no definition for the given material name exists, otherwise an "JSON object" which can
|
|
16
|
+
* be passed to `BABYLON.Material.Parse` to create a runtime material object.
|
|
17
|
+
*/
|
|
18
|
+
getMaterial(materialId: string): object | undefined;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Checks if a definition for a given material name exists in the configurator and issues a warning if not.
|
|
22
|
+
*
|
|
23
|
+
* @param materialId
|
|
24
|
+
*/
|
|
25
|
+
assertMaterialExists(materialId: string): boolean;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ParameterObservable } from './parameterObservable';
|
|
2
|
-
export declare abstract class ElementParameterizable extends ParameterObservable {
|
|
3
|
-
protected parameterDeclaration: ParameterDeclarations;
|
|
4
|
-
get visible(): boolean | undefined;
|
|
5
|
-
get highlighted(): boolean | undefined;
|
|
6
|
-
get material(): string | undefined;
|
|
7
|
-
get scaling(): string | undefined;
|
|
8
|
-
get position(): string | undefined;
|
|
9
|
-
get rotation(): string | undefined;
|
|
10
|
-
show(): Promise<ParameterObservable>;
|
|
11
|
-
hide(): Promise<ParameterObservable>;
|
|
12
|
-
toggle(): Promise<ParameterObservable>;
|
|
13
|
-
toggleHighlight(): Promise<ParameterObservable>;
|
|
14
|
-
}
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ElementParameterizable = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var parameter_1 = require("./parameter");
|
|
6
|
-
var parameterObservable_1 = require("./parameterObservable");
|
|
7
|
-
var ElementParameterizable = /** @class */ (function (_super) {
|
|
8
|
-
tslib_1.__extends(ElementParameterizable, _super);
|
|
9
|
-
function ElementParameterizable() {
|
|
10
|
-
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
11
|
-
_this.parameterDeclaration = parameter_1.Parameter.declarations;
|
|
12
|
-
return _this;
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(ElementParameterizable.prototype, "visible", {
|
|
15
|
-
get: function () {
|
|
16
|
-
if (!(parameter_1.Parameter.VISIBLE in this.parameters)) {
|
|
17
|
-
return undefined;
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
return parameter_1.Parameter.parseBoolean(this.parameters[parameter_1.Parameter.VISIBLE]);
|
|
21
|
-
}
|
|
22
|
-
catch (e) {
|
|
23
|
-
return undefined;
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
enumerable: false,
|
|
27
|
-
configurable: true
|
|
28
|
-
});
|
|
29
|
-
Object.defineProperty(ElementParameterizable.prototype, "highlighted", {
|
|
30
|
-
get: function () {
|
|
31
|
-
if (!(parameter_1.Parameter.HIGHLIGHTED in this.parameters)) {
|
|
32
|
-
return undefined;
|
|
33
|
-
}
|
|
34
|
-
try {
|
|
35
|
-
return parameter_1.Parameter.parseBoolean(this.parameters[parameter_1.Parameter.HIGHLIGHTED]);
|
|
36
|
-
}
|
|
37
|
-
catch (e) {
|
|
38
|
-
return undefined;
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
enumerable: false,
|
|
42
|
-
configurable: true
|
|
43
|
-
});
|
|
44
|
-
Object.defineProperty(ElementParameterizable.prototype, "material", {
|
|
45
|
-
get: function () {
|
|
46
|
-
if (!(parameter_1.Parameter.MATERIAL in this.parameters)) {
|
|
47
|
-
return undefined;
|
|
48
|
-
}
|
|
49
|
-
return this.parameters[parameter_1.Parameter.MATERIAL].toString();
|
|
50
|
-
},
|
|
51
|
-
enumerable: false,
|
|
52
|
-
configurable: true
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(ElementParameterizable.prototype, "scaling", {
|
|
55
|
-
get: function () {
|
|
56
|
-
if (!(parameter_1.Parameter.SCALING in this.parameters)) {
|
|
57
|
-
return undefined;
|
|
58
|
-
}
|
|
59
|
-
return this.parameters[parameter_1.Parameter.SCALING].toString();
|
|
60
|
-
},
|
|
61
|
-
enumerable: false,
|
|
62
|
-
configurable: true
|
|
63
|
-
});
|
|
64
|
-
Object.defineProperty(ElementParameterizable.prototype, "position", {
|
|
65
|
-
get: function () {
|
|
66
|
-
if (!(parameter_1.Parameter.POSITION in this.parameters)) {
|
|
67
|
-
return undefined;
|
|
68
|
-
}
|
|
69
|
-
return this.parameters[parameter_1.Parameter.POSITION].toString();
|
|
70
|
-
},
|
|
71
|
-
enumerable: false,
|
|
72
|
-
configurable: true
|
|
73
|
-
});
|
|
74
|
-
Object.defineProperty(ElementParameterizable.prototype, "rotation", {
|
|
75
|
-
get: function () {
|
|
76
|
-
if (!(parameter_1.Parameter.ROTATION in this.parameters)) {
|
|
77
|
-
return undefined;
|
|
78
|
-
}
|
|
79
|
-
return this.parameters[parameter_1.Parameter.ROTATION].toString();
|
|
80
|
-
},
|
|
81
|
-
enumerable: false,
|
|
82
|
-
configurable: true
|
|
83
|
-
});
|
|
84
|
-
ElementParameterizable.prototype.show = function () {
|
|
85
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
86
|
-
return tslib_1.__generator(this, function (_a) {
|
|
87
|
-
switch (_a.label) {
|
|
88
|
-
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, true)];
|
|
89
|
-
case 1:
|
|
90
|
-
_a.sent();
|
|
91
|
-
return [2 /*return*/, this];
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
};
|
|
96
|
-
ElementParameterizable.prototype.hide = function () {
|
|
97
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
98
|
-
return tslib_1.__generator(this, function (_a) {
|
|
99
|
-
switch (_a.label) {
|
|
100
|
-
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, false)];
|
|
101
|
-
case 1:
|
|
102
|
-
_a.sent();
|
|
103
|
-
return [2 /*return*/, this];
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
ElementParameterizable.prototype.toggle = function () {
|
|
109
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
110
|
-
return tslib_1.__generator(this, function (_a) {
|
|
111
|
-
switch (_a.label) {
|
|
112
|
-
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.VISIBLE, !this.visible)];
|
|
113
|
-
case 1:
|
|
114
|
-
_a.sent();
|
|
115
|
-
return [2 /*return*/, this];
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
ElementParameterizable.prototype.toggleHighlight = function () {
|
|
121
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
122
|
-
return tslib_1.__generator(this, function (_a) {
|
|
123
|
-
switch (_a.label) {
|
|
124
|
-
case 0: return [4 /*yield*/, this.commitParameter(parameter_1.Parameter.HIGHLIGHTED, !this.highlighted)];
|
|
125
|
-
case 1:
|
|
126
|
-
_a.sent();
|
|
127
|
-
return [2 /*return*/, this];
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
});
|
|
131
|
-
};
|
|
132
|
-
return ElementParameterizable;
|
|
133
|
-
}(parameterObservable_1.ParameterObservable));
|
|
134
|
-
exports.ElementParameterizable = ElementParameterizable;
|
|
135
|
-
//# sourceMappingURL=elementParameterizable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"elementParameterizable.js","sourceRoot":"","sources":["../../../../src/api/classes/elementParameterizable.ts"],"names":[],"mappings":";;;;AAAA,yCAAwC;AACxC,6DAA4D;AAE5D;IAAqD,kDAAmB;IAAxE;QAAA,qEA0EC;QAxEU,0BAAoB,GAA0B,qBAAS,CAAC,YAAY,CAAC;;IAwEhF,CAAC;IAtEA,sBAAI,2CAAO;aAAX;YACC,IAAI,CAAC,CAAC,qBAAS,CAAC,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,EAAG;gBAC7C,OAAO,SAAS,CAAC;aACjB;YACD,IAAI;gBACH,OAAO,qBAAS,CAAC,YAAY,CAAE,IAAI,CAAC,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C,CAAC,qBAAS,CAAC,QAAQ,IAAI,IAAI,CAAC,UAAU,CAAC,EAAG;gBAC9C,OAAO,SAAS,CAAC;aACjB;YACD,OAAO,IAAI,CAAC,UAAU,CAAC,qBAAS,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;QACvD,CAAC;;;OAAA;IAEY,qCAAI,GAAjB;;;;4BACC,qBAAM,IAAI,CAAC,eAAe,CAAE,qBAAS,CAAC,OAAO,EAAE,IAAI,CAAE,EAAA;;wBAArD,SAAqD,CAAC;wBACtD,sBAAO,IAAI,EAAC;;;;KACZ;IAEY,qCAAI,GAAjB;;;;4BACC,qBAAM,IAAI,CAAC,eAAe,CAAE,qBAAS,CAAC,OAAO,EAAE,KAAK,CAAE,EAAA;;wBAAtD,SAAsD,CAAC;wBACvD,sBAAO,IAAI,EAAC;;;;KACZ;IAEY,uCAAM,GAAnB;;;;4BACC,qBAAM,IAAI,CAAC,eAAe,CAAE,qBAAS,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,OAAO,CAAE,EAAA;;wBAA9D,SAA8D,CAAC;wBAC/D,sBAAO,IAAI,EAAC;;;;KACZ;IAEY,gDAAe,GAA5B;;;;4BACC,qBAAM,IAAI,CAAC,eAAe,CAAE,qBAAS,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,WAAW,CAAE,EAAA;;wBAAtE,SAAsE,CAAC;wBACvE,sBAAO,IAAI,EAAC;;;;KACZ;IAEF,6BAAC;AAAD,CAAC,AA1ED,CAAqD,yCAAmB,GA0EvE;AA1EqB,wDAAsB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
import { Scene } from '@babylonjs/core/scene';
|
|
5
|
-
import { VariantInstance } from '../classes/variantInstance';
|
|
6
|
-
import { Viewer } from '../classes/viewer';
|
|
7
|
-
export declare class DebugViewer extends Viewer {
|
|
8
|
-
constructor(canvas: HTMLCanvasElement, data: string | StructureJson);
|
|
9
|
-
bootstrap(): Promise<Viewer>;
|
|
10
|
-
protected initScene(): Promise<Scene>;
|
|
11
|
-
protected instanceDebugger(instance: VariantInstance): void;
|
|
12
|
-
protected fpsDebugger(): void;
|
|
13
|
-
}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DebugViewer = void 0;
|
|
4
|
-
var tslib_1 = require("tslib");
|
|
5
|
-
var viewer_1 = require("../classes/viewer");
|
|
6
|
-
var event_1 = require("../classes/event");
|
|
7
|
-
var DebugViewer = /** @class */ (function (_super) {
|
|
8
|
-
tslib_1.__extends(DebugViewer, _super);
|
|
9
|
-
function DebugViewer(canvas, data) {
|
|
10
|
-
return _super.call(this, canvas, data) || this;
|
|
11
|
-
}
|
|
12
|
-
DebugViewer.prototype.bootstrap = function () {
|
|
13
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
14
|
-
var _loop_1, this_1, _i, _a, event_2, _b, _c, event_3;
|
|
15
|
-
return tslib_1.__generator(this, function (_d) {
|
|
16
|
-
_loop_1 = function (event_2) {
|
|
17
|
-
this_1.eventEmitter.addListener(event_2, function () {
|
|
18
|
-
var args = [];
|
|
19
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
20
|
-
args[_i] = arguments[_i];
|
|
21
|
-
}
|
|
22
|
-
return console.debug.apply(console, tslib_1.__spreadArrays(["Emitting " + event_2], args));
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
this_1 = this;
|
|
26
|
-
for (_i = 0, _a = event_1.Event.all; _i < _a.length; _i++) {
|
|
27
|
-
event_2 = _a[_i];
|
|
28
|
-
_loop_1(event_2);
|
|
29
|
-
}
|
|
30
|
-
for (_b = 0, _c = [
|
|
31
|
-
event_1.Event.VARIANT_INSTANCE_DESTROYED,
|
|
32
|
-
event_1.Event.VARIANT_INSTANCE_CREATED,
|
|
33
|
-
event_1.Event.VARIANT_INSTANCE_CLONED,
|
|
34
|
-
event_1.Event.VARIANT_PARAMETER_COMMITTED,
|
|
35
|
-
]; _b < _c.length; _b++) {
|
|
36
|
-
event_3 = _c[_b];
|
|
37
|
-
this.eventEmitter.addListener(event_3, this.instanceDebugger.bind(this));
|
|
38
|
-
}
|
|
39
|
-
return [2 /*return*/, _super.prototype.bootstrap.call(this)];
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
DebugViewer.prototype.initScene = function () {
|
|
44
|
-
return tslib_1.__awaiter(this, void 0, void 0, function () {
|
|
45
|
-
var scene;
|
|
46
|
-
var _this = this;
|
|
47
|
-
return tslib_1.__generator(this, function (_a) {
|
|
48
|
-
switch (_a.label) {
|
|
49
|
-
case 0: return [4 /*yield*/, _super.prototype.initScene.call(this)];
|
|
50
|
-
case 1:
|
|
51
|
-
scene = _a.sent();
|
|
52
|
-
scene.getEngine().runRenderLoop(function () {
|
|
53
|
-
_this.fpsDebugger();
|
|
54
|
-
});
|
|
55
|
-
return [2 /*return*/, scene];
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
DebugViewer.prototype.instanceDebugger = function (instance) {
|
|
61
|
-
var instances = [];
|
|
62
|
-
this.variantInstances.all.forEach(function (variantInstance) {
|
|
63
|
-
instances.push("" + variantInstance.name + (variantInstance.variant.visible ? '' : ' [hidden]') + (variantInstance.variant.highlighted ? ' [highlighted]' : ''));
|
|
64
|
-
});
|
|
65
|
-
var debugContainer = document.getElementById('cyledge-combeenation-3d-viewer-instance-debugger');
|
|
66
|
-
if (!debugContainer) {
|
|
67
|
-
debugContainer = document.createElement('pre');
|
|
68
|
-
debugContainer.setAttribute('id', 'cyledge-combeenation-3d-viewer-instance-debugger');
|
|
69
|
-
debugContainer.setAttribute('style', "\n\t\t\t\tbackground: #454545;\n\t\t\t\tcolor: #fff;\n\t\t\t\tposition: absolute;\n\t\t\t\tbottom: 0;\n\t\t\t\tright: 0;\n\t\t\t\tpadding: 10px;\n\t\t\t\tmargin: 0;\n\t\t\t");
|
|
70
|
-
document.body.appendChild(debugContainer);
|
|
71
|
-
}
|
|
72
|
-
debugContainer.innerHTML = JSON.stringify(instances, null, 2);
|
|
73
|
-
};
|
|
74
|
-
DebugViewer.prototype.fpsDebugger = function () {
|
|
75
|
-
var debugContainer = document.getElementById('cyledge-combeenation-3d-viewer-fps-debugger');
|
|
76
|
-
if (!debugContainer) {
|
|
77
|
-
debugContainer = document.createElement('pre');
|
|
78
|
-
debugContainer.setAttribute('id', 'cyledge-combeenation-3d-viewer-fps-debugger');
|
|
79
|
-
debugContainer.setAttribute('style', "\n\t\t\t\tbackground: #454545;\n\t\t\t\tcolor: #fff;\n\t\t\t\tposition: absolute;\n\t\t\t\tbottom: 0;\n\t\t\t\tleft: 0;\n\t\t\t\tpadding: 10px;\n\t\t\t\tmargin: 0;\n\t\t\t");
|
|
80
|
-
document.body.appendChild(debugContainer);
|
|
81
|
-
}
|
|
82
|
-
debugContainer.innerHTML = this.engine.getFps().toFixed(2) + " fps";
|
|
83
|
-
};
|
|
84
|
-
return DebugViewer;
|
|
85
|
-
}(viewer_1.Viewer));
|
|
86
|
-
exports.DebugViewer = DebugViewer;
|
|
87
|
-
//# sourceMappingURL=debugViewer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debugViewer.js","sourceRoot":"","sources":["../../../../src/api/internal/debugViewer.ts"],"names":[],"mappings":";;;;AAKA,4CAA2C;AAC3C,0CAAyC;AAEzC;IAAiC,uCAAM;IACrC,qBAAY,MAAyB,EAAE,IAA4B;eACjE,kBAAM,MAAM,EAAE,IAAI,CAAC;IACrB,CAAC;IAEY,+BAAS,GAAtB;;;;oCACa,OAAK;oBACd,OAAK,YAAY,CAAC,WAAW,CAAC,OAAK,EAAE;wBAAC,cAAO;6BAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;4BAAP,yBAAO;;wBAAK,OAAA,OAAO,C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,kDAAkD,CAAC,CAAC;QACjG,IAAI,CAAC,cAAc,EAAE;YACnB,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC/C,cAAc,CAAC,YAAY,CAAC,IAAI,EAAE,kDAAkD,CAAC,CAAC;YACtF,cAAc,CAAC,YAAY,CACzB,OAAO,EACP,8KAQJ,CACG,CAAC;YACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;SAC3C;QACD,cAAc,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAChE,CAAC;IAES,iCAAW,GAArB;QACE,IAAI,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC,6CAA6C,CAAC,CAAC;QAC5F,IAAI,CAAC,cAAc,EAAE;YACnB,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;YAC/C,cAAc,CAAC,YAAY,CAAC,IAAI,EAAE,6CAA6C,CAAC,CAAC;YACjF,cAAc,CAAC,YAAY,CACzB,OAAO,EACP,6KAQJ,CACG,CAAC;YACF,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;SAC3C;QACD,cAAc,CAAC,SAAS,GAAM,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,SAAM,CAAC;IACtE,CAAC;IACH,kBAAC;AAAD,CAAC,AAjFD,CAAiC,eAAM,GAiFtC;AAjFY,kCAAW"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal
|
|
3
|
-
*/
|
|
4
|
-
import { Scene } from '@babylonjs/core/scene';
|
|
5
|
-
import { VariantInstance } from '../classes/variantInstance';
|
|
6
|
-
import { Viewer } from '../classes/viewer';
|
|
7
|
-
export declare class DebugViewer extends Viewer {
|
|
8
|
-
constructor(canvas: HTMLCanvasElement, data: string | StructureJson);
|
|
9
|
-
bootstrap(): Promise<Viewer>;
|
|
10
|
-
protected initScene(): Promise<Scene>;
|
|
11
|
-
protected instanceDebugger(instance: VariantInstance): void;
|
|
12
|
-
protected fpsDebugger(): void;
|
|
13
|
-
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { __awaiter, __extends, __generator, __spreadArrays } from "tslib";
|
|
2
|
-
import { Viewer } from '../classes/viewer';
|
|
3
|
-
import { Event } from '../classes/event';
|
|
4
|
-
var DebugViewer = /** @class */ (function (_super) {
|
|
5
|
-
__extends(DebugViewer, _super);
|
|
6
|
-
function DebugViewer(canvas, data) {
|
|
7
|
-
return _super.call(this, canvas, data) || this;
|
|
8
|
-
}
|
|
9
|
-
DebugViewer.prototype.bootstrap = function () {
|
|
10
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
11
|
-
var _loop_1, this_1, _i, _a, event_1, _b, _c, event_2;
|
|
12
|
-
return __generator(this, function (_d) {
|
|
13
|
-
_loop_1 = function (event_1) {
|
|
14
|
-
this_1.eventEmitter.addListener(event_1, function () {
|
|
15
|
-
var args = [];
|
|
16
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
17
|
-
args[_i] = arguments[_i];
|
|
18
|
-
}
|
|
19
|
-
return console.debug.apply(console, __spreadArrays(["Emitting " + event_1], args));
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
this_1 = this;
|
|
23
|
-
for (_i = 0, _a = Event.all; _i < _a.length; _i++) {
|
|
24
|
-
event_1 = _a[_i];
|
|
25
|
-
_loop_1(event_1);
|
|
26
|
-
}
|
|
27
|
-
for (_b = 0, _c = [
|
|
28
|
-
Event.VARIANT_INSTANCE_DESTROYED,
|
|
29
|
-
Event.VARIANT_INSTANCE_CREATED,
|
|
30
|
-
Event.VARIANT_INSTANCE_CLONED,
|
|
31
|
-
Event.VARIANT_PARAMETER_COMMITTED,
|
|
32
|
-
]; _b < _c.length; _b++) {
|
|
33
|
-
event_2 = _c[_b];
|
|
34
|
-
this.eventEmitter.addListener(event_2, this.instanceDebugger.bind(this));
|
|
35
|
-
}
|
|
36
|
-
return [2 /*return*/, _super.prototype.bootstrap.call(this)];
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
DebugViewer.prototype.initScene = function () {
|
|
41
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
42
|
-
var scene;
|
|
43
|
-
var _this = this;
|
|
44
|
-
return __generator(this, function (_a) {
|
|
45
|
-
switch (_a.label) {
|
|
46
|
-
case 0: return [4 /*yield*/, _super.prototype.initScene.call(this)];
|
|
47
|
-
case 1:
|
|
48
|
-
scene = _a.sent();
|
|
49
|
-
scene.getEngine().runRenderLoop(function () {
|
|
50
|
-
_this.fpsDebugger();
|
|
51
|
-
});
|
|
52
|
-
return [2 /*return*/, scene];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
DebugViewer.prototype.instanceDebugger = function (instance) {
|
|
58
|
-
var instances = [];
|
|
59
|
-
this.variantInstances.all.forEach(function (variantInstance) {
|
|
60
|
-
instances.push("" + variantInstance.name + (variantInstance.variant.visible ? '' : ' [hidden]') + (variantInstance.variant.highlighted ? ' [highlighted]' : ''));
|
|
61
|
-
});
|
|
62
|
-
var debugContainer = document.getElementById('cyledge-combeenation-3d-viewer-instance-debugger');
|
|
63
|
-
if (!debugContainer) {
|
|
64
|
-
debugContainer = document.createElement('pre');
|
|
65
|
-
debugContainer.setAttribute('id', 'cyledge-combeenation-3d-viewer-instance-debugger');
|
|
66
|
-
debugContainer.setAttribute('style', "\n\t\t\t\tbackground: #454545;\n\t\t\t\tcolor: #fff;\n\t\t\t\tposition: absolute;\n\t\t\t\tbottom: 0;\n\t\t\t\tright: 0;\n\t\t\t\tpadding: 10px;\n\t\t\t\tmargin: 0;\n\t\t\t");
|
|
67
|
-
document.body.appendChild(debugContainer);
|
|
68
|
-
}
|
|
69
|
-
debugContainer.innerHTML = JSON.stringify(instances, null, 2);
|
|
70
|
-
};
|
|
71
|
-
DebugViewer.prototype.fpsDebugger = function () {
|
|
72
|
-
var debugContainer = document.getElementById('cyledge-combeenation-3d-viewer-fps-debugger');
|
|
73
|
-
if (!debugContainer) {
|
|
74
|
-
debugContainer = document.createElement('pre');
|
|
75
|
-
debugContainer.setAttribute('id', 'cyledge-combeenation-3d-viewer-fps-debugger');
|
|
76
|
-
debugContainer.setAttribute('style', "\n\t\t\t\tbackground: #454545;\n\t\t\t\tcolor: #fff;\n\t\t\t\tposition: absolute;\n\t\t\t\tbottom: 0;\n\t\t\t\tleft: 0;\n\t\t\t\tpadding: 10px;\n\t\t\t\tmargin: 0;\n\t\t\t");
|
|
77
|
-
document.body.appendChild(debugContainer);
|
|
78
|
-
}
|
|
79
|
-
debugContainer.innerHTML = this.engine.getFps().toFixed(2) + " fps";
|
|
80
|
-
};
|
|
81
|
-
return DebugViewer;
|
|
82
|
-
}(Viewer));
|
|
83
|
-
export { DebugViewer };
|
|
84
|
-
//# sourceMappingURL=debugViewer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"debugViewer.js","sourceRoot":"","sources":["../../../../src/api/internal/debugViewer.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC;IAAiC,+BAAM;IACrC,qBAAY,MAAyB,EAAE,IAA4B;eACjE,kBAAM,MAAM,EAAE,IAAI,CAAC;IACrB,CAAC;IAEY,+BAAS,GAAtB;;;;oCACa,OAAK;oBACd,OAAK,YAAY,CAAC,WAAW,CAAC,OAAK,EAAE;wBAAC,cAAO;6BAAP,UAAO,EAAP,qBAAO,EAAP,IAAO;4BAAP,yBAAO;;wBAAK,OAAA,OAAO,CAAC,KAAK,OAAb,OAAO,kBAAO,cAAY,OAAO,GAAK,IAAI;oBAA1C,CAA2C,CAAC,CAAC;;;gBADj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