@combeenation/3d-viewer 7.1.0 → 7.1.2
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 -2
- package/dist/lib-cjs/api/classes/dottedPath.d.ts +79 -79
- package/dist/lib-cjs/api/classes/dottedPath.js +166 -166
- package/dist/lib-cjs/api/classes/element.d.ts +153 -153
- package/dist/lib-cjs/api/classes/element.js +672 -670
- package/dist/lib-cjs/api/classes/element.js.map +1 -1
- package/dist/lib-cjs/api/classes/event.d.ts +401 -396
- package/dist/lib-cjs/api/classes/event.js +424 -419
- 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 -49
- package/dist/lib-cjs/api/classes/fuzzyMap.d.ts +7 -7
- package/dist/lib-cjs/api/classes/fuzzyMap.js +21 -21
- package/dist/lib-cjs/api/classes/parameter.d.ts +351 -351
- package/dist/lib-cjs/api/classes/parameter.js +524 -517
- 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 +72 -72
- package/dist/lib-cjs/api/classes/parameterizable.d.ts +15 -15
- package/dist/lib-cjs/api/classes/parameterizable.js +102 -102
- package/dist/lib-cjs/api/classes/placementAnimation.d.ts +45 -45
- package/dist/lib-cjs/api/classes/placementAnimation.js +176 -176
- package/dist/lib-cjs/api/classes/variant.d.ts +253 -253
- package/dist/lib-cjs/api/classes/variant.js +858 -843
- package/dist/lib-cjs/api/classes/variant.js.map +1 -1
- package/dist/lib-cjs/api/classes/variantInstance.d.ts +53 -53
- package/dist/lib-cjs/api/classes/variantInstance.js +125 -125
- package/dist/lib-cjs/api/classes/variantParameterizable.d.ts +17 -17
- package/dist/lib-cjs/api/classes/variantParameterizable.js +86 -88
- package/dist/lib-cjs/api/classes/variantParameterizable.js.map +1 -1
- package/dist/lib-cjs/api/classes/viewer.d.ts +204 -199
- package/dist/lib-cjs/api/classes/viewer.js +682 -670
- package/dist/lib-cjs/api/classes/viewer.js.map +1 -1
- package/dist/lib-cjs/api/classes/viewerError.d.ts +43 -0
- package/dist/lib-cjs/api/classes/viewerError.js +56 -0
- package/dist/lib-cjs/api/classes/viewerError.js.map +1 -0
- package/dist/lib-cjs/api/classes/viewerLight.d.ts +66 -66
- package/dist/lib-cjs/api/classes/viewerLight.js +348 -348
- package/dist/lib-cjs/api/internal/lensRendering.d.ts +8 -8
- package/dist/lib-cjs/api/internal/lensRendering.js +11 -11
- package/dist/lib-cjs/api/internal/sceneSetup.d.ts +13 -13
- package/dist/lib-cjs/api/internal/sceneSetup.js +226 -226
- package/dist/lib-cjs/api/manager/animationManager.d.ts +30 -30
- package/dist/lib-cjs/api/manager/animationManager.js +126 -126
- package/dist/lib-cjs/api/manager/gltfExportManager.d.ts +79 -78
- package/dist/lib-cjs/api/manager/gltfExportManager.js +242 -241
- package/dist/lib-cjs/api/manager/gltfExportManager.js.map +1 -1
- package/dist/lib-cjs/api/manager/sceneManager.d.ts +33 -33
- package/dist/lib-cjs/api/manager/sceneManager.js +128 -130
- package/dist/lib-cjs/api/manager/sceneManager.js.map +1 -1
- package/dist/lib-cjs/api/manager/tagManager.d.ts +116 -108
- package/dist/lib-cjs/api/manager/tagManager.js +444 -419
- package/dist/lib-cjs/api/manager/tagManager.js.map +1 -1
- package/dist/lib-cjs/api/manager/textureLoadManager.d.ts +22 -22
- package/dist/lib-cjs/api/manager/textureLoadManager.js +97 -97
- package/dist/lib-cjs/api/manager/variantInstanceManager.d.ts +106 -102
- package/dist/lib-cjs/api/manager/variantInstanceManager.js +292 -284
- package/dist/lib-cjs/api/manager/variantInstanceManager.js.map +1 -1
- package/dist/lib-cjs/api/store/specStorage.d.ts +32 -32
- package/dist/lib-cjs/api/store/specStorage.js +65 -65
- package/dist/lib-cjs/api/util/babylonHelper.d.ts +235 -235
- package/dist/lib-cjs/api/util/babylonHelper.js +753 -753
- package/dist/lib-cjs/api/util/globalTypes.d.ts +441 -436
- 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 +203 -203
- package/dist/lib-cjs/api/util/sceneLoaderHelper.d.ts +44 -44
- package/dist/lib-cjs/api/util/sceneLoaderHelper.js +175 -175
- package/dist/lib-cjs/api/util/stringHelper.d.ts +13 -13
- package/dist/lib-cjs/api/util/stringHelper.js +32 -32
- package/dist/lib-cjs/api/util/structureHelper.d.ts +9 -9
- package/dist/lib-cjs/api/util/structureHelper.js +57 -48
- package/dist/lib-cjs/api/util/structureHelper.js.map +1 -1
- package/dist/lib-cjs/buildinfo.json +3 -3
- package/dist/lib-cjs/commonjs.tsconfig.tsbuildinfo +1 -1
- package/dist/lib-cjs/index.d.ts +54 -53
- package/dist/lib-cjs/index.js +117 -114
- package/dist/lib-cjs/index.js.map +1 -1
- package/package.json +81 -81
- package/src/api/classes/animationInterface.ts +10 -10
- package/src/api/classes/dottedPath.ts +181 -181
- package/src/api/classes/element.ts +733 -731
- package/src/api/classes/event.ts +457 -452
- package/src/api/classes/eventBroadcaster.ts +52 -52
- package/src/api/classes/fuzzyMap.ts +21 -21
- package/src/api/classes/parameter.ts +561 -554
- package/src/api/classes/parameterObservable.ts +73 -73
- package/src/api/classes/parameterizable.ts +87 -87
- package/src/api/classes/placementAnimation.ts +162 -162
- package/src/api/classes/variant.ts +949 -933
- package/src/api/classes/variantInstance.ts +123 -123
- package/src/api/classes/variantParameterizable.ts +83 -85
- package/src/api/classes/viewer.ts +760 -743
- package/src/api/classes/viewerError.ts +63 -0
- package/src/api/classes/viewerLight.ts +339 -339
- package/src/api/internal/debugViewer.ts +90 -90
- package/src/api/internal/lensRendering.ts +9 -9
- package/src/api/internal/sceneSetup.ts +205 -205
- package/src/api/manager/animationManager.ts +143 -143
- package/src/api/manager/gltfExportManager.ts +237 -236
- package/src/api/manager/sceneManager.ts +134 -136
- package/src/api/manager/tagManager.ts +477 -451
- package/src/api/manager/textureLoadManager.ts +95 -95
- package/src/api/manager/variantInstanceManager.ts +309 -297
- package/src/api/store/specStorage.ts +68 -68
- package/src/api/util/babylonHelper.ts +823 -823
- package/src/api/util/globalTypes.ts +508 -503
- package/src/api/util/resourceHelper.ts +191 -191
- package/src/api/util/sceneLoaderHelper.ts +170 -170
- package/src/api/util/stringHelper.ts +30 -30
- package/src/api/util/structureHelper.ts +58 -49
- package/src/buildinfo.json +3 -3
- package/src/dev.ts +62 -62
- package/src/index.ts +103 -100
- package/src/types.d.ts +38 -38
package/src/index.ts
CHANGED
|
@@ -1,100 +1,103 @@
|
|
|
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 {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
import
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
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 { ViewerError, ViewerErrorIds } from './api/classes/viewerError';
|
|
17
|
+
import { ViewerLight } from './api/classes/viewerLight';
|
|
18
|
+
import { AnimationManager } from './api/manager/animationManager';
|
|
19
|
+
import { GltfExportManager } from './api/manager/gltfExportManager';
|
|
20
|
+
import { SceneManager } from './api/manager/sceneManager';
|
|
21
|
+
import { TagManager } from './api/manager/tagManager';
|
|
22
|
+
import { VariantInstanceManager } from './api/manager/variantInstanceManager';
|
|
23
|
+
import { SpecStorage } from './api/store/specStorage';
|
|
24
|
+
import * as BabylonHelper from './api/util/babylonHelper';
|
|
25
|
+
import { Animation as BabylonAnimation } from '@babylonjs/core/Animations/animation';
|
|
26
|
+
import { ArcRotateCamera } from '@babylonjs/core/Cameras/arcRotateCamera';
|
|
27
|
+
import { Engine } from '@babylonjs/core/Engines/engine';
|
|
28
|
+
import { DirectionalLight } from '@babylonjs/core/Lights/directionalLight';
|
|
29
|
+
import { HemisphericLight } from '@babylonjs/core/Lights/hemisphericLight';
|
|
30
|
+
import { PBRMaterial } from '@babylonjs/core/Materials/PBR/pbrMaterial';
|
|
31
|
+
import { CubeTexture } from '@babylonjs/core/Materials/Textures/cubeTexture';
|
|
32
|
+
import { DynamicTexture } from '@babylonjs/core/Materials/Textures/dynamicTexture';
|
|
33
|
+
import { Texture } from '@babylonjs/core/Materials/Textures/texture';
|
|
34
|
+
import { Material } from '@babylonjs/core/Materials/material';
|
|
35
|
+
import { StandardMaterial } from '@babylonjs/core/Materials/standardMaterial';
|
|
36
|
+
import { Color3, Color4 } from '@babylonjs/core/Maths/math.color';
|
|
37
|
+
import { Vector3 } from '@babylonjs/core/Maths/math.vector';
|
|
38
|
+
import { AbstractMesh } from '@babylonjs/core/Meshes/abstractMesh';
|
|
39
|
+
import { InstancedMesh } from '@babylonjs/core/Meshes/instancedMesh';
|
|
40
|
+
import { Mesh } from '@babylonjs/core/Meshes/mesh';
|
|
41
|
+
import { MeshBuilder } from '@babylonjs/core/Meshes/meshBuilder';
|
|
42
|
+
import { TransformNode } from '@babylonjs/core/Meshes/transformNode';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Without explicitly importing the "BoundingBoxRenderer", we're getting "scene.getBoundingBoxRenderer is undefined"
|
|
46
|
+
* errors when creating HighlightLayer instances. Not sure why but those errors only happen when using the built
|
|
47
|
+
* version of the viewer (e.g. when pulling it from NPM etc.)...
|
|
48
|
+
*/
|
|
49
|
+
import '@babylonjs/core/Rendering/boundingBoxRenderer';
|
|
50
|
+
import { Node } from '@babylonjs/core/node';
|
|
51
|
+
import { Scene } from '@babylonjs/core/scene';
|
|
52
|
+
import { EventEmitter } from 'eventemitter3';
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Expose some frequently used babylon modules by our consumers.
|
|
56
|
+
*/
|
|
57
|
+
export {
|
|
58
|
+
AnimationManager,
|
|
59
|
+
AnimationInterface,
|
|
60
|
+
Variant,
|
|
61
|
+
VariantInstanceManager,
|
|
62
|
+
Viewer,
|
|
63
|
+
ParameterObservable,
|
|
64
|
+
Parameterizable,
|
|
65
|
+
VariantParameterizable,
|
|
66
|
+
ViewerLight,
|
|
67
|
+
emitter as Emitter,
|
|
68
|
+
EventEmitter,
|
|
69
|
+
Event,
|
|
70
|
+
Parameter,
|
|
71
|
+
VariantInstance,
|
|
72
|
+
Color3,
|
|
73
|
+
Color4,
|
|
74
|
+
Vector3,
|
|
75
|
+
AbstractMesh,
|
|
76
|
+
InstancedMesh,
|
|
77
|
+
Mesh,
|
|
78
|
+
TransformNode,
|
|
79
|
+
Node,
|
|
80
|
+
Material,
|
|
81
|
+
PBRMaterial,
|
|
82
|
+
StandardMaterial,
|
|
83
|
+
Scene,
|
|
84
|
+
Engine,
|
|
85
|
+
ArcRotateCamera,
|
|
86
|
+
DynamicTexture,
|
|
87
|
+
CubeTexture,
|
|
88
|
+
MeshBuilder,
|
|
89
|
+
Texture,
|
|
90
|
+
BabylonAnimation,
|
|
91
|
+
HemisphericLight,
|
|
92
|
+
DirectionalLight,
|
|
93
|
+
Element,
|
|
94
|
+
EventBroadcaster,
|
|
95
|
+
SceneManager,
|
|
96
|
+
PlacementAnimation,
|
|
97
|
+
BabylonHelper,
|
|
98
|
+
GltfExportManager,
|
|
99
|
+
SpecStorage,
|
|
100
|
+
TagManager,
|
|
101
|
+
ViewerError,
|
|
102
|
+
ViewerErrorIds,
|
|
103
|
+
};
|
package/src/types.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
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
|
-
* Implementation depends on the Combeenation environment the viewer is used in
|
|
13
|
-
* - Configurator: Access pre-fetched material JSON objects from Cbn client => synchronous
|
|
14
|
-
* - Asset Editor: Load content from material asset on demand => asynchronous!
|
|
15
|
-
*
|
|
16
|
-
* @param materialId
|
|
17
|
-
*
|
|
18
|
-
* @return Undefined if no definition for the given material name exists, otherwise an "JSON object" which can
|
|
19
|
-
* be passed to `BABYLON.Material.Parse` to create a runtime material object.
|
|
20
|
-
*/
|
|
21
|
-
getMaterial(materialId: string): Promise<object | undefined>;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Checks if a definition for a given material name exists in the configurator and issues a warning if not.
|
|
25
|
-
*
|
|
26
|
-
* @param materialId
|
|
27
|
-
*/
|
|
28
|
-
assertMaterialExists(materialId: string): boolean;
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Warns user about duplicate nodeNames on scene.
|
|
32
|
-
*
|
|
33
|
-
* @param nodeNameOrArrayOfNodeNames
|
|
34
|
-
*/
|
|
35
|
-
reportDuplicateNodeName(nodeNameOrArrayOfNodeNames: string | string[]): void;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
}
|
|
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
|
+
* Implementation depends on the Combeenation environment the viewer is used in
|
|
13
|
+
* - Configurator: Access pre-fetched material JSON objects from Cbn client => synchronous
|
|
14
|
+
* - Asset Editor: Load content from material asset on demand => asynchronous!
|
|
15
|
+
*
|
|
16
|
+
* @param materialId
|
|
17
|
+
*
|
|
18
|
+
* @return Undefined if no definition for the given material name exists, otherwise an "JSON object" which can
|
|
19
|
+
* be passed to `BABYLON.Material.Parse` to create a runtime material object.
|
|
20
|
+
*/
|
|
21
|
+
getMaterial(materialId: string): Promise<object | undefined>;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Checks if a definition for a given material name exists in the configurator and issues a warning if not.
|
|
25
|
+
*
|
|
26
|
+
* @param materialId
|
|
27
|
+
*/
|
|
28
|
+
assertMaterialExists(materialId: string): boolean;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Warns user about duplicate nodeNames on scene.
|
|
32
|
+
*
|
|
33
|
+
* @param nodeNameOrArrayOfNodeNames
|
|
34
|
+
*/
|
|
35
|
+
reportDuplicateNodeName(nodeNameOrArrayOfNodeNames: string | string[]): void;
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
}
|