@configura/babylon-view 2.2.0-alpha.1 → 2.2.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/.eslintrc.json +5 -5
  2. package/LICENSE +201 -201
  3. package/README.md +1 -1
  4. package/dist/animation/AnimatableObject.d.ts +8 -8
  5. package/dist/animation/AnimatableObject.js +3 -3
  6. package/dist/animation/animator/Animator.d.ts +33 -33
  7. package/dist/animation/animator/Animator.js +58 -58
  8. package/dist/animation/animator/AnimatorEasing.d.ts +16 -16
  9. package/dist/animation/animator/AnimatorEasing.js +31 -31
  10. package/dist/animation/animator/AnimatorEasingMatrix.d.ts +14 -14
  11. package/dist/animation/animator/AnimatorEasingMatrix.js +16 -16
  12. package/dist/animation/animator/AnimatorHighlight.d.ts +16 -16
  13. package/dist/animation/animator/AnimatorHighlight.js +32 -32
  14. package/dist/animation/animator/AnimatorPointToPoint.d.ts +8 -8
  15. package/dist/animation/animator/AnimatorPointToPoint.js +14 -14
  16. package/dist/animation/animator/AnimatorQueue.d.ts +13 -13
  17. package/dist/animation/animator/AnimatorQueue.js +57 -57
  18. package/dist/animation/animator/AnimatorScale.d.ts +8 -8
  19. package/dist/animation/animator/AnimatorScale.js +13 -13
  20. package/dist/animation/animator/AnimatorSpin.d.ts +10 -10
  21. package/dist/animation/animator/AnimatorSpin.js +13 -13
  22. package/dist/animation/animator/EasingFunctions.d.ts +35 -35
  23. package/dist/animation/animator/EasingFunctions.js +137 -137
  24. package/dist/animation/coordinator/Coordinator.d.ts +28 -28
  25. package/dist/animation/coordinator/Coordinator.js +53 -53
  26. package/dist/animation/coordinator/CoordinatorDropAndSpin.d.ts +22 -22
  27. package/dist/animation/coordinator/CoordinatorDropAndSpin.js +138 -138
  28. package/dist/animation/coordinator/CoordinatorIdentity.d.ts +11 -11
  29. package/dist/animation/coordinator/CoordinatorIdentity.js +14 -14
  30. package/dist/animation/coordinator/CoordinatorNodeQueues.d.ts +18 -18
  31. package/dist/animation/coordinator/CoordinatorNodeQueues.js +50 -50
  32. package/dist/animation/coordinator/CoordinatorPulse.d.ts +21 -21
  33. package/dist/animation/coordinator/CoordinatorPulse.js +47 -47
  34. package/dist/animation/coordinator/CoordinatorPulseBounce.d.ts +14 -14
  35. package/dist/animation/coordinator/CoordinatorPulseBounce.js +35 -35
  36. package/dist/animation/coordinator/CoordinatorPulseHighlight.d.ts +13 -13
  37. package/dist/animation/coordinator/CoordinatorPulseHighlight.js +29 -29
  38. package/dist/animation/coordinator/CoordinatorPulseInflate.d.ts +14 -14
  39. package/dist/animation/coordinator/CoordinatorPulseInflate.js +23 -23
  40. package/dist/animation/index.d.ts +5 -0
  41. package/dist/animation/index.js +4 -0
  42. package/dist/camera/CameraCreator.d.ts +5 -5
  43. package/dist/camera/CameraCreator.js +4 -4
  44. package/dist/camera/CfgOrbitalCamera.d.ts +76 -76
  45. package/dist/camera/CfgOrbitalCamera.js +277 -277
  46. package/dist/camera/CfgOrbitalCameraControlProps.d.ts +14 -14
  47. package/dist/camera/CfgOrbitalCameraControlProps.js +7 -7
  48. package/dist/camera/GradingApplier.d.ts +3 -3
  49. package/dist/camera/GradingApplier.js +48 -48
  50. package/dist/camera/SSAO2PipelineCreator.d.ts +28 -0
  51. package/dist/camera/SSAO2PipelineCreator.js +23 -0
  52. package/dist/camera/index.d.ts +6 -0
  53. package/dist/camera/index.js +5 -0
  54. package/dist/engine/EngineCreator.d.ts +3 -3
  55. package/dist/engine/EngineCreator.js +10 -10
  56. package/dist/engine/index.d.ts +2 -0
  57. package/dist/engine/index.js +1 -0
  58. package/dist/geometry/CfgGeometry.d.ts +29 -29
  59. package/dist/geometry/CfgGeometry.js +146 -146
  60. package/dist/geometry/CfgMesh.d.ts +10 -10
  61. package/dist/geometry/CfgMesh.js +38 -38
  62. package/dist/geometry/geoSplitter.d.ts +8 -8
  63. package/dist/geometry/geoSplitter.js +192 -192
  64. package/dist/geometry/stretch/CfgMorphTarget.d.ts +15 -15
  65. package/dist/geometry/stretch/CfgMorphTarget.js +65 -65
  66. package/dist/geometry/stretch/CfgStretchData.d.ts +116 -116
  67. package/dist/geometry/stretch/CfgStretchData.js +347 -347
  68. package/dist/geometry/stretch/CfgStretchMorphGeometry.d.ts +16 -16
  69. package/dist/geometry/stretch/CfgStretchMorphGeometry.js +95 -95
  70. package/dist/index.d.ts +8 -16
  71. package/dist/index.js +8 -16
  72. package/dist/io/CfgHistoryToCameraConfConnector.d.ts +31 -31
  73. package/dist/io/CfgHistoryToCameraConfConnector.js +90 -90
  74. package/dist/io/CfgIOCameraConfConnector.d.ts +35 -35
  75. package/dist/io/CfgIOCameraConfConnector.js +81 -81
  76. package/dist/io/CfgObservableStateToCameraConfConnector.d.ts +10 -10
  77. package/dist/io/CfgObservableStateToCameraConfConnector.js +11 -11
  78. package/dist/io/CfgWindowMessageToCameraConfConnector.d.ts +10 -10
  79. package/dist/io/CfgWindowMessageToCameraConfConnector.js +11 -11
  80. package/dist/io/index.d.ts +4 -0
  81. package/dist/io/index.js +3 -0
  82. package/dist/light/CfgDirectionalLight.d.ts +8 -8
  83. package/dist/light/CfgDirectionalLight.js +18 -18
  84. package/dist/light/CfgHemisphericLight.d.ts +7 -7
  85. package/dist/light/CfgHemisphericLight.js +17 -17
  86. package/dist/light/CfgPointLight.d.ts +8 -8
  87. package/dist/light/CfgPointLight.js +18 -18
  88. package/dist/light/DefaultLightRig.d.ts +23 -19
  89. package/dist/light/DefaultLightRig.js +82 -77
  90. package/dist/light/LightRigCreator.d.ts +9 -9
  91. package/dist/light/LightRigCreator.js +3 -3
  92. package/dist/light/index.d.ts +6 -0
  93. package/dist/light/index.js +5 -0
  94. package/dist/material/CfgMaterial.d.ts +68 -68
  95. package/dist/material/CfgMaterial.js +497 -482
  96. package/dist/material/DummyMaterialCreator.d.ts +4 -4
  97. package/dist/material/DummyMaterialCreator.js +15 -15
  98. package/dist/material/material.d.ts +18 -18
  99. package/dist/material/material.js +128 -128
  100. package/dist/material/texture.d.ts +14 -14
  101. package/dist/material/texture.js +316 -306
  102. package/dist/nodes/CfgContentRootNode.d.ts +19 -19
  103. package/dist/nodes/CfgContentRootNode.js +75 -75
  104. package/dist/nodes/CfgDeferredMeshNode.d.ts +55 -55
  105. package/dist/nodes/CfgDeferredMeshNode.js +378 -378
  106. package/dist/nodes/CfgProductNode.d.ts +127 -127
  107. package/dist/nodes/CfgProductNode.js +598 -598
  108. package/dist/nodes/CfgSymNode.d.ts +50 -50
  109. package/dist/nodes/CfgSymNode.js +249 -249
  110. package/dist/nodes/CfgSymRootNode.d.ts +45 -45
  111. package/dist/nodes/CfgSymRootNode.js +240 -240
  112. package/dist/nodes/CfgTransformNode.d.ts +33 -33
  113. package/dist/nodes/CfgTransformNode.js +83 -83
  114. package/dist/scene/SceneCreator.d.ts +6 -6
  115. package/dist/scene/SceneCreator.js +22 -22
  116. package/dist/scene/index.d.ts +2 -0
  117. package/dist/scene/index.js +1 -0
  118. package/dist/utilities/CfgBoundingBox.d.ts +21 -21
  119. package/dist/utilities/CfgBoundingBox.js +81 -81
  120. package/dist/utilities/anchor/anchor.d.ts +50 -50
  121. package/dist/utilities/anchor/anchor.js +133 -133
  122. package/dist/utilities/anchor/anchorMap.d.ts +20 -20
  123. package/dist/utilities/anchor/anchorMap.js +111 -111
  124. package/dist/utilities/index.d.ts +4 -0
  125. package/dist/utilities/index.js +3 -0
  126. package/dist/utilities/utilities3D.d.ts +70 -70
  127. package/dist/utilities/utilities3D.js +259 -259
  128. package/dist/utilities/utilitiesColor.d.ts +18 -18
  129. package/dist/utilities/utilitiesColor.js +50 -50
  130. package/dist/utilities/utilitiesImage.d.ts +6 -6
  131. package/dist/utilities/utilitiesImage.js +107 -107
  132. package/dist/utilities/utilitiesSymRootIdentifier.d.ts +7 -7
  133. package/dist/utilities/utilitiesSymRootIdentifier.js +26 -26
  134. package/dist/view/BaseView.d.ts +80 -78
  135. package/dist/view/BaseView.js +321 -303
  136. package/dist/view/BaseViewConfiguration.d.ts +38 -32
  137. package/dist/view/BaseViewConfiguration.js +10 -10
  138. package/dist/view/RenderEnv.d.ts +45 -43
  139. package/dist/view/RenderEnv.js +7 -7
  140. package/dist/view/SingleProductDefaultCameraView.d.ts +38 -38
  141. package/dist/view/SingleProductDefaultCameraView.js +149 -149
  142. package/dist/view/SingleProductDefaultCameraViewConfiguration.d.ts +44 -44
  143. package/dist/view/SingleProductDefaultCameraViewConfiguration.js +11 -11
  144. package/dist/view/SingleProductView.d.ts +44 -44
  145. package/dist/view/SingleProductView.js +212 -212
  146. package/dist/view/SingleProductViewConfiguration.d.ts +32 -32
  147. package/dist/view/SingleProductViewConfiguration.js +19 -19
  148. package/dist/view/index.d.ts +8 -0
  149. package/dist/view/index.js +7 -0
  150. package/package.json +5 -5
@@ -1,128 +1,128 @@
1
- import { Matrix } from "@babylonjs/core/Maths/math.vector.js";
2
- import { CfgMaterialMapping, CfgMtrlApplication, CfgProduct } from "@configura/web-api";
3
- import { LogObservable, LogProducer } from "@configura/web-utilities";
4
- import { AnimatableObject } from "../animation/AnimatableObject.js";
5
- import { CoordinatorWithMeta } from "../animation/coordinator/Coordinator.js";
6
- import { CfgAnchorableNode, CfgAnchorRef, CfgAnchorTargetNode } from "../utilities/anchor/anchor.js";
7
- import { CfgBoundingBox } from "../utilities/CfgBoundingBox.js";
8
- import { RenderEnv } from "../view/RenderEnv.js";
9
- import { CfgSymRootNode } from "./CfgSymRootNode.js";
10
- import { CfgTransformNode } from "./CfgTransformNode.js";
11
- export declare function isProductNode(value: unknown): value is CfgProductNode;
12
- export declare function isCfgSymRootNode(value: unknown): value is CfgSymRootNode;
13
- export declare function isCfgAnchorableNode(value: unknown): value is CfgAnchorableNode;
14
- export declare class CfgProductNode extends CfgTransformNode implements AnimatableObject, LogProducer {
15
- private readonly _product;
16
- static make(renderEnvironment: RenderEnv, product: CfgProduct): CfgProductNode;
17
- readonly logger: LogObservable;
18
- private _destroyed;
19
- readonly key: string;
20
- _applicationAreas: CfgMtrlApplication[];
21
- private _mtrlApplications;
22
- private _configuration;
23
- private readonly _debugMtrlApplications;
24
- _areasToMaterials: CfgMaterialMapping | undefined;
25
- _scheduledForRemoval: (CfgSymRootNode | CfgProductNode)[];
26
- private _anchoredToAnchors;
27
- private _symRootLoadings;
28
- private _modelMatrix;
29
- private _originalMatrixWithModelTransform;
30
- private _anchorTarget;
31
- private _stretchedAnchorPointMatrix;
32
- anchorRef: CfgAnchorRef | undefined;
33
- private constructor();
34
- get cfgClassName(): string;
35
- destroy(): void;
36
- get product(): CfgProduct;
37
- /**
38
- * We want to be able to animate nodes that are on the way out.
39
- * So we do not immediately remove them from the tree.
40
- */
41
- private scheduleForRemoval;
42
- isDestroyed(): boolean;
43
- private _refreshTransformAndAnchoring;
44
- /**
45
- * The passed function is recursively applied on every descendant CfgProductNode in the tree.
46
- * This node is included. Destroyed products are not included.
47
- */
48
- _applyOnDescendantProductNodes: <T>(fn: (p: CfgProductNode) => T) => T[];
49
- /**
50
- * This function will apply either of tree passed functions on the additional products/ in the
51
- * passed CfgProduct and the additional products in the CfgProductNode.
52
- * It is not applied recursively.
53
- */
54
- private _syncAdditionalProductNodes;
55
- /**
56
- * Application areas are essentially catalogue level material mappings.
57
- * This function is recursively applied on additional products.
58
- */
59
- setApplicationAreas(applicationAreas: CfgMtrlApplication[]): void;
60
- /**
61
- * Start loading the geometry, but do not yet show it.
62
- * This function is recursively applied on additional products.
63
- */
64
- loadGeo(coordinatorWithMeta?: CoordinatorWithMeta): Promise<void>;
65
- private _loadAdditionalProducts;
66
- /**
67
- * Run any animations and then permanently removes the nodes from the tree
68
- * This function is recursively applied on additional products.
69
- */
70
- flushScheduledForRemove(animationCoordinator?: CoordinatorWithMeta): Promise<void>;
71
- /**
72
- * Are all materials currently needed loaded and ready to be applied?
73
- * This function does not take additional products into account.
74
- */
75
- private _isAllMeshMaterialsReady;
76
- /**
77
- * Resolves when all materials currently needed have been loaded and are ready to be applied.
78
- * This function does not take additional products into account.
79
- */
80
- private _awaitAllMeshMaterialsReady;
81
- /**
82
- * Loads the materials needed.
83
- * This function is recursively applied on additional products.
84
- */
85
- loadMaterials(animationCoordinator?: CoordinatorWithMeta): Promise<void>;
86
- /**
87
- * Update the tag (area) to material mapping and gives them to sym children
88
- * This function does not take additional products into account.
89
- */
90
- private _aggregateMaterialsPushToChildrenAndLoad;
91
- /**
92
- * Starts loading the materials on the sym children (but does not apply)
93
- * This function does not take additional products into account.
94
- */
95
- private _pushMaterialToSymRootChildrenAndLoad;
96
- private _getSymRootChildren;
97
- private _getAdditionalProductNodes;
98
- private _getAnchorableNodes;
99
- /**
100
- * Applies and thereby shows the geometry. Finally flushes scheduled for remove.
101
- * This function is recursively applied on additional products.
102
- */
103
- applyGeo(animationCoordinator?: CoordinatorWithMeta): Promise<void>;
104
- /**
105
- * Applies and thereby shows the right materials.
106
- * This function is recursively applied on additional products.
107
- */
108
- applyMaterials(): Promise<void>;
109
- setAnchorTarget(anchorTarget: CfgAnchorTargetNode | undefined): void;
110
- refreshStretch(): void;
111
- get originalMatrix(): Matrix;
112
- protected refreshTransform(): void;
113
- _applyDebugSymRoots(symRootPromises: Promise<CfgSymRootNode | undefined>[]): Promise<void>;
114
- _addDebugMtrlApplication(debugMtrlApplication: CfgMtrlApplication): Promise<void>;
115
- get boundingBox(): CfgBoundingBox;
116
- protected addInspectorProperties(): void;
117
- private get _inspectorLogMaterialMappings();
118
- private set _inspectorLogMaterialMappings(value);
119
- private get _inspectorAddMaterialToMaterialMappingFromFile();
120
- private set _inspectorAddMaterialToMaterialMappingFromFile(value);
121
- private get _inspectorAddMaterialToMaterialMappingFromUrl();
122
- private set _inspectorAddMaterialToMaterialMappingFromUrl(value);
123
- private get _inspectorAddCmSymFile();
124
- private set _inspectorAddCmSymFile(value);
125
- private get _inspectorAddCmSymUrl();
126
- private set _inspectorAddCmSymUrl(value);
127
- }
1
+ import { Matrix } from "@babylonjs/core/Maths/math.vector.js";
2
+ import { CfgMaterialMapping, CfgMtrlApplication, CfgProduct } from "@configura/web-api";
3
+ import { LogObservable, LogProducer } from "@configura/web-utilities";
4
+ import { AnimatableObject } from "../animation/AnimatableObject.js";
5
+ import { CoordinatorWithMeta } from "../animation/coordinator/Coordinator.js";
6
+ import { CfgAnchorableNode, CfgAnchorRef, CfgAnchorTargetNode } from "../utilities/anchor/anchor.js";
7
+ import { CfgBoundingBox } from "../utilities/CfgBoundingBox.js";
8
+ import { RenderEnv } from "../view/RenderEnv.js";
9
+ import { CfgSymRootNode } from "./CfgSymRootNode.js";
10
+ import { CfgTransformNode } from "./CfgTransformNode.js";
11
+ export declare function isProductNode(value: unknown): value is CfgProductNode;
12
+ export declare function isCfgSymRootNode(value: unknown): value is CfgSymRootNode;
13
+ export declare function isCfgAnchorableNode(value: unknown): value is CfgAnchorableNode;
14
+ export declare class CfgProductNode extends CfgTransformNode implements AnimatableObject, LogProducer {
15
+ private readonly _product;
16
+ static make(renderEnvironment: RenderEnv, product: CfgProduct): CfgProductNode;
17
+ readonly logger: LogObservable;
18
+ private _destroyed;
19
+ readonly key: string;
20
+ _applicationAreas: CfgMtrlApplication[];
21
+ private _mtrlApplications;
22
+ private _configuration;
23
+ private readonly _debugMtrlApplications;
24
+ _areasToMaterials: CfgMaterialMapping | undefined;
25
+ _scheduledForRemoval: (CfgSymRootNode | CfgProductNode)[];
26
+ private _anchoredToAnchors;
27
+ private _symRootLoadings;
28
+ private _modelMatrix;
29
+ private _originalMatrixWithModelTransform;
30
+ private _anchorTarget;
31
+ private _stretchedAnchorPointMatrix;
32
+ anchorRef: CfgAnchorRef | undefined;
33
+ private constructor();
34
+ get cfgClassName(): string;
35
+ destroy(): void;
36
+ get product(): CfgProduct;
37
+ /**
38
+ * We want to be able to animate nodes that are on the way out.
39
+ * So we do not immediately remove them from the tree.
40
+ */
41
+ private scheduleForRemoval;
42
+ isDestroyed(): boolean;
43
+ private _refreshTransformAndAnchoring;
44
+ /**
45
+ * The passed function is recursively applied on every descendant CfgProductNode in the tree.
46
+ * This node is included. Destroyed products are not included.
47
+ */
48
+ _applyOnDescendantProductNodes: <T>(fn: (p: CfgProductNode) => T) => T[];
49
+ /**
50
+ * This function will apply either of tree passed functions on the additional products/ in the
51
+ * passed CfgProduct and the additional products in the CfgProductNode.
52
+ * It is not applied recursively.
53
+ */
54
+ private _syncAdditionalProductNodes;
55
+ /**
56
+ * Application areas are essentially catalogue level material mappings.
57
+ * This function is recursively applied on additional products.
58
+ */
59
+ setApplicationAreas(applicationAreas: CfgMtrlApplication[]): void;
60
+ /**
61
+ * Start loading the geometry, but do not yet show it.
62
+ * This function is recursively applied on additional products.
63
+ */
64
+ loadGeo(coordinatorWithMeta?: CoordinatorWithMeta): Promise<void>;
65
+ private _loadAdditionalProducts;
66
+ /**
67
+ * Run any animations and then permanently removes the nodes from the tree
68
+ * This function is recursively applied on additional products.
69
+ */
70
+ flushScheduledForRemove(animationCoordinator?: CoordinatorWithMeta): Promise<void>;
71
+ /**
72
+ * Are all materials currently needed loaded and ready to be applied?
73
+ * This function does not take additional products into account.
74
+ */
75
+ private _isAllMeshMaterialsReady;
76
+ /**
77
+ * Resolves when all materials currently needed have been loaded and are ready to be applied.
78
+ * This function does not take additional products into account.
79
+ */
80
+ private _awaitAllMeshMaterialsReady;
81
+ /**
82
+ * Loads the materials needed.
83
+ * This function is recursively applied on additional products.
84
+ */
85
+ loadMaterials(animationCoordinator?: CoordinatorWithMeta): Promise<void>;
86
+ /**
87
+ * Update the tag (area) to material mapping and gives them to sym children
88
+ * This function does not take additional products into account.
89
+ */
90
+ private _aggregateMaterialsPushToChildrenAndLoad;
91
+ /**
92
+ * Starts loading the materials on the sym children (but does not apply)
93
+ * This function does not take additional products into account.
94
+ */
95
+ private _pushMaterialToSymRootChildrenAndLoad;
96
+ private _getSymRootChildren;
97
+ private _getAdditionalProductNodes;
98
+ private _getAnchorableNodes;
99
+ /**
100
+ * Applies and thereby shows the geometry. Finally flushes scheduled for remove.
101
+ * This function is recursively applied on additional products.
102
+ */
103
+ applyGeo(animationCoordinator?: CoordinatorWithMeta): Promise<void>;
104
+ /**
105
+ * Applies and thereby shows the right materials.
106
+ * This function is recursively applied on additional products.
107
+ */
108
+ applyMaterials(): Promise<void>;
109
+ setAnchorTarget(anchorTarget: CfgAnchorTargetNode | undefined): void;
110
+ refreshStretch(): void;
111
+ get originalMatrix(): Matrix;
112
+ protected refreshTransform(): void;
113
+ _applyDebugSymRoots(symRootPromises: Promise<CfgSymRootNode | undefined>[]): Promise<void>;
114
+ _addDebugMtrlApplication(debugMtrlApplication: CfgMtrlApplication): Promise<void>;
115
+ get boundingBox(): CfgBoundingBox;
116
+ protected addInspectorProperties(): void;
117
+ private get _inspectorLogMaterialMappings();
118
+ private set _inspectorLogMaterialMappings(value);
119
+ private get _inspectorAddMaterialToMaterialMappingFromFile();
120
+ private set _inspectorAddMaterialToMaterialMappingFromFile(value);
121
+ private get _inspectorAddMaterialToMaterialMappingFromUrl();
122
+ private set _inspectorAddMaterialToMaterialMappingFromUrl(value);
123
+ private get _inspectorAddCmSymFile();
124
+ private set _inspectorAddCmSymFile(value);
125
+ private get _inspectorAddCmSymUrl();
126
+ private set _inspectorAddCmSymUrl(value);
127
+ }
128
128
  //# sourceMappingURL=CfgProductNode.d.ts.map