@combeenation/3d-viewer 5.1.2 → 5.2.0-alpha1
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/buildinfo.json +3 -3
- package/dist/lib-cjs/commonjs.tsconfig.tsbuildinfo +1 -0
- package/dist/lib-cjs/{api → src/api}/classes/animationInterface.d.ts +8 -8
- package/dist/lib-cjs/src/api/classes/animationInterface.js +3 -0
- package/dist/lib-cjs/src/api/classes/animationInterface.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/classes/dottedPath.d.ts +79 -79
- package/dist/lib-cjs/src/api/classes/dottedPath.js +167 -0
- package/dist/lib-cjs/src/api/classes/dottedPath.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/classes/element.d.ts +149 -149
- package/dist/lib-cjs/src/api/classes/element.js +669 -0
- package/dist/lib-cjs/src/api/classes/element.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/classes/event.d.ts +326 -326
- package/dist/lib-cjs/src/api/classes/event.js +350 -0
- package/dist/lib-cjs/src/api/classes/event.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/classes/eventBroadcaster.d.ts +26 -26
- package/dist/lib-cjs/src/api/classes/eventBroadcaster.js +50 -0
- package/dist/lib-cjs/src/api/classes/eventBroadcaster.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/classes/parameter.d.ts +336 -336
- package/dist/lib-cjs/src/api/classes/parameter.js +462 -0
- package/dist/lib-cjs/src/api/classes/parameter.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/classes/parameterObservable.d.ts +36 -36
- package/dist/lib-cjs/src/api/classes/parameterObservable.js +98 -0
- package/dist/lib-cjs/src/api/classes/parameterObservable.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/classes/parameterizable.d.ts +15 -15
- package/dist/lib-cjs/src/api/classes/parameterizable.js +103 -0
- package/dist/lib-cjs/src/api/classes/parameterizable.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/classes/placementAnimation.d.ts +45 -44
- package/dist/lib-cjs/{api → src/api}/classes/placementAnimation.js +175 -163
- package/dist/lib-cjs/src/api/classes/placementAnimation.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/classes/variant.d.ts +234 -234
- package/dist/lib-cjs/src/api/classes/variant.js +837 -0
- package/dist/lib-cjs/src/api/classes/variant.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/classes/variantInstance.d.ts +45 -45
- package/dist/lib-cjs/src/api/classes/variantInstance.js +102 -0
- package/dist/lib-cjs/src/api/classes/variantInstance.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/classes/variantParameterizable.d.ts +17 -17
- package/dist/lib-cjs/src/api/classes/variantParameterizable.js +89 -0
- package/dist/lib-cjs/src/api/classes/variantParameterizable.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/classes/viewer.d.ts +187 -184
- package/dist/lib-cjs/src/api/classes/viewer.js +594 -0
- package/dist/lib-cjs/src/api/classes/viewer.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/classes/viewerLight.d.ts +66 -66
- package/dist/lib-cjs/src/api/classes/viewerLight.js +344 -0
- package/dist/lib-cjs/src/api/classes/viewerLight.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/internal/lensRendering.d.ts +8 -8
- package/dist/lib-cjs/{api → src/api}/internal/lensRendering.js +11 -11
- package/dist/lib-cjs/src/api/internal/lensRendering.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/internal/sceneSetup.d.ts +13 -13
- package/dist/lib-cjs/src/api/internal/sceneSetup.js +226 -0
- package/dist/lib-cjs/src/api/internal/sceneSetup.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/manager/animationManager.d.ts +30 -29
- package/dist/lib-cjs/src/api/manager/animationManager.js +127 -0
- package/dist/lib-cjs/src/api/manager/animationManager.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/manager/gltfExportManager.d.ts +65 -65
- package/dist/lib-cjs/src/api/manager/gltfExportManager.js +197 -0
- package/dist/lib-cjs/src/api/manager/gltfExportManager.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/manager/sceneManager.d.ts +31 -31
- package/dist/lib-cjs/src/api/manager/sceneManager.js +128 -0
- package/dist/lib-cjs/src/api/manager/sceneManager.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/manager/variantInstanceManager.d.ts +92 -92
- package/dist/lib-cjs/src/api/manager/variantInstanceManager.js +261 -0
- package/dist/lib-cjs/src/api/manager/variantInstanceManager.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/store/specStorage.d.ts +24 -24
- package/dist/lib-cjs/{api → src/api}/store/specStorage.js +50 -51
- package/dist/lib-cjs/src/api/store/specStorage.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/util/babylonHelper.d.ts +174 -174
- package/dist/lib-cjs/{api → src/api}/util/babylonHelper.js +591 -611
- package/dist/lib-cjs/src/api/util/babylonHelper.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/util/globalTypes.d.ts +366 -366
- package/dist/lib-cjs/src/api/util/globalTypes.js +2 -0
- package/dist/lib-cjs/src/api/util/globalTypes.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/util/resourceHelper.d.ts +58 -58
- package/dist/lib-cjs/src/api/util/resourceHelper.js +202 -0
- package/dist/lib-cjs/src/api/util/resourceHelper.js.map +1 -0
- package/dist/lib-cjs/{api → src/api}/util/sceneLoaderHelper.d.ts +35 -35
- package/dist/lib-cjs/{api → src/api}/util/sceneLoaderHelper.js +141 -140
- package/dist/lib-cjs/src/api/util/sceneLoaderHelper.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/util/stringHelper.d.ts +9 -9
- package/dist/lib-cjs/{api → src/api}/util/stringHelper.js +23 -25
- package/dist/lib-cjs/src/api/util/stringHelper.js.map +1 -0
- package/dist/{lib-es6 → lib-cjs/src}/api/util/structureHelper.d.ts +9 -9
- package/dist/lib-cjs/{api → src/api}/util/structureHelper.js +48 -48
- package/dist/lib-cjs/src/api/util/structureHelper.js.map +1 -0
- package/dist/lib-cjs/{index.d.ts → src/index.d.ts} +51 -49
- package/dist/lib-cjs/{index.js → src/index.js} +110 -89
- package/dist/lib-cjs/src/index.js.map +1 -0
- package/dist/lib-es6/buildinfo.json +3 -3
- package/dist/lib-es6/es6.tsconfig.tsbuildinfo +1 -0
- package/dist/lib-es6/{api → src/api}/classes/animationInterface.d.ts +8 -8
- package/dist/lib-es6/src/api/classes/animationInterface.js +2 -0
- package/dist/lib-es6/src/api/classes/animationInterface.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/classes/dottedPath.d.ts +79 -79
- package/dist/lib-es6/src/api/classes/dottedPath.js +163 -0
- package/dist/lib-es6/src/api/classes/dottedPath.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/classes/element.d.ts +149 -149
- package/dist/lib-es6/src/api/classes/element.js +665 -0
- package/dist/lib-es6/src/api/classes/element.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/classes/event.d.ts +326 -326
- package/dist/lib-es6/src/api/classes/event.js +346 -0
- package/dist/lib-es6/src/api/classes/event.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/classes/eventBroadcaster.d.ts +26 -26
- package/dist/lib-es6/src/api/classes/eventBroadcaster.js +43 -0
- package/dist/lib-es6/src/api/classes/eventBroadcaster.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/classes/parameter.d.ts +336 -336
- package/dist/lib-es6/src/api/classes/parameter.js +458 -0
- package/dist/lib-es6/src/api/classes/parameter.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/classes/parameterObservable.d.ts +36 -36
- package/dist/lib-es6/src/api/classes/parameterObservable.js +94 -0
- package/dist/lib-es6/src/api/classes/parameterObservable.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/classes/parameterizable.d.ts +15 -15
- package/dist/lib-es6/src/api/classes/parameterizable.js +99 -0
- package/dist/lib-es6/src/api/classes/parameterizable.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/classes/placementAnimation.d.ts +45 -44
- package/dist/lib-es6/{api → src/api}/classes/placementAnimation.js +171 -160
- package/dist/lib-es6/src/api/classes/placementAnimation.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/classes/variant.d.ts +234 -234
- package/dist/lib-es6/src/api/classes/variant.js +833 -0
- package/dist/lib-es6/src/api/classes/variant.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/classes/variantInstance.d.ts +45 -45
- package/dist/lib-es6/src/api/classes/variantInstance.js +98 -0
- package/dist/lib-es6/src/api/classes/variantInstance.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/classes/variantParameterizable.d.ts +17 -17
- package/dist/lib-es6/src/api/classes/variantParameterizable.js +85 -0
- package/dist/lib-es6/src/api/classes/variantParameterizable.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/classes/viewer.d.ts +187 -184
- package/dist/lib-es6/src/api/classes/viewer.js +587 -0
- package/dist/lib-es6/src/api/classes/viewer.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/classes/viewerLight.d.ts +66 -66
- package/dist/lib-es6/src/api/classes/viewerLight.js +317 -0
- package/dist/lib-es6/src/api/classes/viewerLight.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/internal/lensRendering.d.ts +8 -8
- package/dist/lib-es6/{api → src/api}/internal/lensRendering.js +8 -8
- package/dist/lib-es6/src/api/internal/lensRendering.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/internal/sceneSetup.d.ts +13 -13
- package/dist/lib-es6/src/api/internal/sceneSetup.js +198 -0
- package/dist/lib-es6/src/api/internal/sceneSetup.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/manager/animationManager.d.ts +30 -29
- package/dist/lib-es6/src/api/manager/animationManager.js +123 -0
- package/dist/lib-es6/src/api/manager/animationManager.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/manager/gltfExportManager.d.ts +65 -65
- package/dist/lib-es6/{api → src/api}/manager/gltfExportManager.js +192 -220
- package/dist/lib-es6/src/api/manager/gltfExportManager.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/manager/sceneManager.d.ts +31 -31
- package/dist/lib-es6/src/api/manager/sceneManager.js +124 -0
- package/dist/lib-es6/src/api/manager/sceneManager.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/manager/variantInstanceManager.d.ts +92 -92
- package/dist/lib-es6/src/api/manager/variantInstanceManager.js +257 -0
- package/dist/lib-es6/src/api/manager/variantInstanceManager.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/store/specStorage.d.ts +24 -24
- package/dist/lib-es6/{api → src/api}/store/specStorage.js +46 -48
- package/dist/lib-es6/src/api/store/specStorage.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/util/babylonHelper.d.ts +174 -174
- package/dist/lib-es6/{api → src/api}/util/babylonHelper.js +561 -581
- package/dist/lib-es6/src/api/util/babylonHelper.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/util/globalTypes.d.ts +366 -366
- package/dist/lib-es6/src/api/util/globalTypes.js +2 -0
- package/dist/lib-es6/src/api/util/globalTypes.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/util/resourceHelper.d.ts +58 -58
- package/dist/lib-es6/src/api/util/resourceHelper.js +192 -0
- package/dist/lib-es6/src/api/util/resourceHelper.js.map +1 -0
- package/dist/lib-es6/{api → src/api}/util/sceneLoaderHelper.d.ts +35 -35
- package/dist/lib-es6/{api → src/api}/util/sceneLoaderHelper.js +131 -133
- package/dist/lib-es6/src/api/util/sceneLoaderHelper.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/util/stringHelper.d.ts +9 -9
- package/dist/lib-es6/{api → src/api}/util/stringHelper.js +19 -21
- package/dist/lib-es6/src/api/util/stringHelper.js.map +1 -0
- package/dist/{lib-cjs → lib-es6/src}/api/util/structureHelper.d.ts +9 -9
- package/dist/lib-es6/{api → src/api}/util/structureHelper.js +45 -45
- package/dist/lib-es6/src/api/util/structureHelper.js.map +1 -0
- package/dist/lib-es6/{index.js → src/index.d.ts} +51 -51
- package/dist/lib-es6/{index.d.ts → src/index.js} +49 -49
- package/dist/lib-es6/src/index.js.map +1 -0
- 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/dev.ts +61 -64
- package/src/index.ts +96 -94
- package/src/types.d.ts +28 -28
- package/dist/lib-cjs/api/classes/animationInterface.js +0 -2
- package/dist/lib-cjs/api/classes/animationInterface.js.map +0 -1
- package/dist/lib-cjs/api/classes/dottedPath.js +0 -188
- package/dist/lib-cjs/api/classes/dottedPath.js.map +0 -1
- package/dist/lib-cjs/api/classes/element.js +0 -824
- package/dist/lib-cjs/api/classes/element.js.map +0 -1
- 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/classes/event.js +0 -372
- package/dist/lib-cjs/api/classes/event.js.map +0 -1
- package/dist/lib-cjs/api/classes/eventBroadcaster.js +0 -54
- package/dist/lib-cjs/api/classes/eventBroadcaster.js.map +0 -1
- package/dist/lib-cjs/api/classes/parameter.js +0 -472
- package/dist/lib-cjs/api/classes/parameter.js.map +0 -1
- package/dist/lib-cjs/api/classes/parameterObservable.js +0 -102
- package/dist/lib-cjs/api/classes/parameterObservable.js.map +0 -1
- package/dist/lib-cjs/api/classes/parameterizable.js +0 -150
- package/dist/lib-cjs/api/classes/parameterizable.js.map +0 -1
- package/dist/lib-cjs/api/classes/placementAnimation.js.map +0 -1
- package/dist/lib-cjs/api/classes/variant.js +0 -1204
- package/dist/lib-cjs/api/classes/variant.js.map +0 -1
- package/dist/lib-cjs/api/classes/variantInstance.js +0 -109
- package/dist/lib-cjs/api/classes/variantInstance.js.map +0 -1
- package/dist/lib-cjs/api/classes/variantParameterizable.js +0 -100
- package/dist/lib-cjs/api/classes/variantParameterizable.js.map +0 -1
- package/dist/lib-cjs/api/classes/viewer.js +0 -732
- package/dist/lib-cjs/api/classes/viewer.js.map +0 -1
- package/dist/lib-cjs/api/classes/viewerLight.js +0 -393
- package/dist/lib-cjs/api/classes/viewerLight.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-cjs/api/internal/lensRendering.js.map +0 -1
- package/dist/lib-cjs/api/internal/sceneSetup.js +0 -239
- package/dist/lib-cjs/api/internal/sceneSetup.js.map +0 -1
- package/dist/lib-cjs/api/manager/animationManager.js +0 -131
- package/dist/lib-cjs/api/manager/animationManager.js.map +0 -1
- package/dist/lib-cjs/api/manager/gltfExportManager.js +0 -224
- package/dist/lib-cjs/api/manager/gltfExportManager.js.map +0 -1
- package/dist/lib-cjs/api/manager/sceneManager.js +0 -153
- package/dist/lib-cjs/api/manager/sceneManager.js.map +0 -1
- package/dist/lib-cjs/api/manager/variantInstanceManager.js +0 -336
- package/dist/lib-cjs/api/manager/variantInstanceManager.js.map +0 -1
- package/dist/lib-cjs/api/store/specStorage.js.map +0 -1
- package/dist/lib-cjs/api/util/babylonHelper.js.map +0 -1
- package/dist/lib-cjs/api/util/globalTypes.js +0 -2
- package/dist/lib-cjs/api/util/globalTypes.js.map +0 -1
- package/dist/lib-cjs/api/util/resourceHelper.js +0 -258
- package/dist/lib-cjs/api/util/resourceHelper.js.map +0 -1
- package/dist/lib-cjs/api/util/sceneLoaderHelper.js.map +0 -1
- package/dist/lib-cjs/api/util/stringHelper.js.map +0 -1
- package/dist/lib-cjs/api/util/structureHelper.js.map +0 -1
- package/dist/lib-cjs/index.js.map +0 -1
- package/dist/lib-es6/api/classes/animationInterface.js +0 -2
- package/dist/lib-es6/api/classes/animationInterface.js.map +0 -1
- package/dist/lib-es6/api/classes/dottedPath.js +0 -185
- package/dist/lib-es6/api/classes/dottedPath.js.map +0 -1
- package/dist/lib-es6/api/classes/element.js +0 -821
- package/dist/lib-es6/api/classes/element.js.map +0 -1
- package/dist/lib-es6/api/classes/event.js +0 -369
- package/dist/lib-es6/api/classes/event.js.map +0 -1
- package/dist/lib-es6/api/classes/eventBroadcaster.js +0 -51
- package/dist/lib-es6/api/classes/eventBroadcaster.js.map +0 -1
- package/dist/lib-es6/api/classes/parameter.js +0 -469
- package/dist/lib-es6/api/classes/parameter.js.map +0 -1
- package/dist/lib-es6/api/classes/parameterObservable.js +0 -99
- package/dist/lib-es6/api/classes/parameterObservable.js.map +0 -1
- package/dist/lib-es6/api/classes/parameterizable.js +0 -147
- package/dist/lib-es6/api/classes/parameterizable.js.map +0 -1
- package/dist/lib-es6/api/classes/placementAnimation.js.map +0 -1
- package/dist/lib-es6/api/classes/variant.js +0 -1199
- package/dist/lib-es6/api/classes/variant.js.map +0 -1
- package/dist/lib-es6/api/classes/variantInstance.js +0 -106
- package/dist/lib-es6/api/classes/variantInstance.js.map +0 -1
- package/dist/lib-es6/api/classes/variantParameterizable.js +0 -97
- package/dist/lib-es6/api/classes/variantParameterizable.js.map +0 -1
- package/dist/lib-es6/api/classes/viewer.js +0 -729
- package/dist/lib-es6/api/classes/viewer.js.map +0 -1
- package/dist/lib-es6/api/classes/viewerLight.js +0 -390
- package/dist/lib-es6/api/classes/viewerLight.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/lib-es6/api/internal/lensRendering.js.map +0 -1
- package/dist/lib-es6/api/internal/sceneSetup.js +0 -234
- package/dist/lib-es6/api/internal/sceneSetup.js.map +0 -1
- package/dist/lib-es6/api/manager/animationManager.js +0 -128
- package/dist/lib-es6/api/manager/animationManager.js.map +0 -1
- package/dist/lib-es6/api/manager/gltfExportManager.js.map +0 -1
- package/dist/lib-es6/api/manager/sceneManager.js +0 -150
- package/dist/lib-es6/api/manager/sceneManager.js.map +0 -1
- package/dist/lib-es6/api/manager/variantInstanceManager.js +0 -333
- package/dist/lib-es6/api/manager/variantInstanceManager.js.map +0 -1
- package/dist/lib-es6/api/store/specStorage.js.map +0 -1
- package/dist/lib-es6/api/util/babylonHelper.js.map +0 -1
- package/dist/lib-es6/api/util/globalTypes.js +0 -2
- package/dist/lib-es6/api/util/globalTypes.js.map +0 -1
- package/dist/lib-es6/api/util/resourceHelper.js +0 -248
- package/dist/lib-es6/api/util/resourceHelper.js.map +0 -1
- package/dist/lib-es6/api/util/sceneLoaderHelper.js.map +0 -1
- package/dist/lib-es6/api/util/stringHelper.js.map +0 -1
- package/dist/lib-es6/api/util/structureHelper.js.map +0 -1
- package/dist/lib-es6/index.js.map +0 -1
- package/dist/webpack-stats.json +0 -0
- package/src/buildinfo.json +0 -3
- 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
|
@@ -1,821 +0,0 @@
|
|
|
1
|
-
import { __awaiter, __extends, __generator, __spreadArrays } from "tslib";
|
|
2
|
-
import { PBRMaterial } from '@babylonjs/core/Materials/PBR/pbrMaterial';
|
|
3
|
-
import { HighlightLayer } from '@babylonjs/core/Layers/highlightLayer';
|
|
4
|
-
import { Material } from '@babylonjs/core/Materials/material';
|
|
5
|
-
import { DynamicTexture } from '@babylonjs/core/Materials/Textures/dynamicTexture';
|
|
6
|
-
import { Color3 } from '@babylonjs/core/Maths/math.color';
|
|
7
|
-
import { AbstractMesh } from '@babylonjs/core/Meshes/abstractMesh';
|
|
8
|
-
import { InstancedMesh } from '@babylonjs/core/Meshes/instancedMesh';
|
|
9
|
-
import { Mesh } from '@babylonjs/core/Meshes/mesh';
|
|
10
|
-
import { TransformNode } from '@babylonjs/core/Meshes/transformNode';
|
|
11
|
-
import { has, isArray, isNumber, isPlainObject, merge, union } from 'lodash-es';
|
|
12
|
-
import { activateTransformNode as activate, addToHighlightLayer, addToShadowGenerator, assertTransformNode, cloneTransformNode, cloneTransformNodeMaterial, deactivateTransformNode as deactivate, getClientRectFromMesh, injectNodeMetadata, mapToDottedNodes, removeFromHighlightLayer, removeFromShadowGenerator, setMaterial, setMaterialColor, setMaterialMetallness, setMaterialRoughness, setMaterialTexture, setReceiveShadows, transformTransformNode, } from '../util/babylonHelper';
|
|
13
|
-
import { createImageFromImgSrc, createImageFromSvg } from '../util/resourceHelper';
|
|
14
|
-
import { VariantParameterizable } from './../classes/variantParameterizable';
|
|
15
|
-
import { DottedPath } from './dottedPath';
|
|
16
|
-
import { Parameter } from './parameter';
|
|
17
|
-
import { addMissingMaterialObserver } from '../util/sceneLoaderHelper';
|
|
18
|
-
/**
|
|
19
|
-
* An {@link Element} of a {@link Variant}. Acts as a container for diverse definitions. Lives only in the context of a
|
|
20
|
-
* {@link Variant}.
|
|
21
|
-
*
|
|
22
|
-
* When used in typings, refer to via its alias {@link VariantElement} to prevent name clashes with the web APIs
|
|
23
|
-
* [Element](https://developer.mozilla.org/en-US/docs/Web/API/Element) class
|
|
24
|
-
*/
|
|
25
|
-
var Element = /** @class */ (function (_super) {
|
|
26
|
-
__extends(Element, _super);
|
|
27
|
-
/**
|
|
28
|
-
* Constructor.
|
|
29
|
-
*/
|
|
30
|
-
function Element(variant, name) {
|
|
31
|
-
var _a;
|
|
32
|
-
var _this = _super.call(this, variant, name) || this;
|
|
33
|
-
_this.variant = variant;
|
|
34
|
-
_this.name = name;
|
|
35
|
-
_this.nodes = [];
|
|
36
|
-
_this._dottedNodes = new Map();
|
|
37
|
-
if ((_a = process.env.NODE_ENV) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('dev')) {
|
|
38
|
-
_this.assertPathDefinitions();
|
|
39
|
-
}
|
|
40
|
-
var nodes = _this.variant.inheritedNodes.map(function (node) { return cloneTransformNode(node, _this.filterNode.bind(_this)); });
|
|
41
|
-
_this.nodes = nodes.filter(function (node) { return !!node; });
|
|
42
|
-
_this._dottedNodes = mapToDottedNodes(_this.nodes, function (node) { return node instanceof TransformNode; });
|
|
43
|
-
_this.addMissingMaterialObservers();
|
|
44
|
-
_this.addParameterObservers();
|
|
45
|
-
return _this;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Creates an {@link Element} with given name.
|
|
49
|
-
*/
|
|
50
|
-
Element.create = function (variant, name) {
|
|
51
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
return [2 /*return*/, new Element(variant, name)];
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
};
|
|
57
|
-
Object.defineProperty(Element.prototype, "dottedPath", {
|
|
58
|
-
/**
|
|
59
|
-
* The {@link DottedPath} in the built tree of {@link Element}s.
|
|
60
|
-
* E.g. "_.top-1.sub-2.sub-sub-3.el-1"
|
|
61
|
-
*/
|
|
62
|
-
get: function () {
|
|
63
|
-
return DottedPath.create(this.variant.dottedPath).addPart(this.name);
|
|
64
|
-
},
|
|
65
|
-
enumerable: false,
|
|
66
|
-
configurable: true
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(Element.prototype, "id", {
|
|
69
|
-
/**
|
|
70
|
-
* The id representing a {@link DottedPath}.
|
|
71
|
-
*/
|
|
72
|
-
get: function () {
|
|
73
|
-
var dottedPath = DottedPath.create(this.dottedPath);
|
|
74
|
-
dottedPath.shiftPart(); // remove root
|
|
75
|
-
return dottedPath.path;
|
|
76
|
-
},
|
|
77
|
-
enumerable: false,
|
|
78
|
-
configurable: true
|
|
79
|
-
});
|
|
80
|
-
Object.defineProperty(Element.prototype, "definition", {
|
|
81
|
-
/**
|
|
82
|
-
* The {@link ElementDefinition} of the {@link Element}.
|
|
83
|
-
*/
|
|
84
|
-
get: function () {
|
|
85
|
-
var definition = this.variant.structureJson.elements[this.name];
|
|
86
|
-
if (isArray(definition)) {
|
|
87
|
-
return {
|
|
88
|
-
paths: {
|
|
89
|
-
include: definition,
|
|
90
|
-
},
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
return definition;
|
|
94
|
-
},
|
|
95
|
-
enumerable: false,
|
|
96
|
-
configurable: true
|
|
97
|
-
});
|
|
98
|
-
Object.defineProperty(Element.prototype, "pathDefinitions", {
|
|
99
|
-
/**
|
|
100
|
-
* The {@link PathDefinitions} of the {@link Element}.
|
|
101
|
-
*/
|
|
102
|
-
get: function () {
|
|
103
|
-
return this.definition.paths;
|
|
104
|
-
},
|
|
105
|
-
enumerable: false,
|
|
106
|
-
configurable: true
|
|
107
|
-
});
|
|
108
|
-
Object.defineProperty(Element.prototype, "traceableDefinitions", {
|
|
109
|
-
/**
|
|
110
|
-
* The {@link TraceableDefinitions} of the {@link Element}.
|
|
111
|
-
*/
|
|
112
|
-
get: function () {
|
|
113
|
-
return this.definition.traceables || {};
|
|
114
|
-
},
|
|
115
|
-
enumerable: false,
|
|
116
|
-
configurable: true
|
|
117
|
-
});
|
|
118
|
-
Object.defineProperty(Element.prototype, "paintableDefinitions", {
|
|
119
|
-
/**
|
|
120
|
-
* The {@link PaintableDefinition} of the {@link Element}.
|
|
121
|
-
*/
|
|
122
|
-
get: function () {
|
|
123
|
-
return this.definition.paintables || {};
|
|
124
|
-
},
|
|
125
|
-
enumerable: false,
|
|
126
|
-
configurable: true
|
|
127
|
-
});
|
|
128
|
-
Object.defineProperty(Element.prototype, "inheritedParameters", {
|
|
129
|
-
/**
|
|
130
|
-
* The inherited {@link ParameterBag}.
|
|
131
|
-
* Merges the {@link Variant}'s parameters and those from the {@link Element}.
|
|
132
|
-
*/
|
|
133
|
-
get: function () {
|
|
134
|
-
return merge({}, this.variant.inheritedParameters, this.parameters);
|
|
135
|
-
},
|
|
136
|
-
enumerable: false,
|
|
137
|
-
configurable: true
|
|
138
|
-
});
|
|
139
|
-
Object.defineProperty(Element.prototype, "meshesFlat", {
|
|
140
|
-
/**
|
|
141
|
-
* The actual {@link Mesh}es that make up this {@link Element}.
|
|
142
|
-
* Handy for e.g. creating a bounding box around an entire element.
|
|
143
|
-
*/
|
|
144
|
-
get: function () {
|
|
145
|
-
var flatMeshes = this.nodes.reduce(function (accFlatMeshes, curNode) {
|
|
146
|
-
var currMeshes = curNode.getChildMeshes(false, function (n) { return n instanceof Mesh; });
|
|
147
|
-
return __spreadArrays(accFlatMeshes, currMeshes);
|
|
148
|
-
}, []);
|
|
149
|
-
return flatMeshes;
|
|
150
|
-
},
|
|
151
|
-
enumerable: false,
|
|
152
|
-
configurable: true
|
|
153
|
-
});
|
|
154
|
-
Object.defineProperty(Element.prototype, "abstractMeshesFlat", {
|
|
155
|
-
/**
|
|
156
|
-
* The actual {@link AbstractMesh}es that make up this {@link Element}.
|
|
157
|
-
* I.e. (real) Meshes as well as InstancedMeshes.
|
|
158
|
-
*/
|
|
159
|
-
get: function () {
|
|
160
|
-
var allAbstractMeshes = this.nodes.reduce(function (acc, currNode) {
|
|
161
|
-
var currAbstractMeshes = currNode.getChildMeshes(false, function (n) { return n instanceof AbstractMesh; });
|
|
162
|
-
if (currNode instanceof AbstractMesh) {
|
|
163
|
-
currAbstractMeshes.unshift(currNode);
|
|
164
|
-
}
|
|
165
|
-
return __spreadArrays(acc, currAbstractMeshes);
|
|
166
|
-
}, []); // initial accumulator value
|
|
167
|
-
return allAbstractMeshes;
|
|
168
|
-
},
|
|
169
|
-
enumerable: false,
|
|
170
|
-
configurable: true
|
|
171
|
-
});
|
|
172
|
-
Object.defineProperty(Element.prototype, "meshes", {
|
|
173
|
-
/**
|
|
174
|
-
* The meshes of this {@link Element}.
|
|
175
|
-
*/
|
|
176
|
-
get: function () {
|
|
177
|
-
return this.nodes.filter(function (node) { return node instanceof Mesh; });
|
|
178
|
-
},
|
|
179
|
-
enumerable: false,
|
|
180
|
-
configurable: true
|
|
181
|
-
});
|
|
182
|
-
Object.defineProperty(Element.prototype, "highlightLayer", {
|
|
183
|
-
get: function () {
|
|
184
|
-
return this._highlightLayer;
|
|
185
|
-
},
|
|
186
|
-
/**
|
|
187
|
-
* @protected
|
|
188
|
-
*/
|
|
189
|
-
set: function (layer) {
|
|
190
|
-
this._highlightLayer = layer;
|
|
191
|
-
},
|
|
192
|
-
enumerable: false,
|
|
193
|
-
configurable: true
|
|
194
|
-
});
|
|
195
|
-
/**
|
|
196
|
-
* Destroys this {@link Element} and dispose all nodes.
|
|
197
|
-
*/
|
|
198
|
-
Element.prototype.destroy = function () {
|
|
199
|
-
this.nodes.forEach(function (node) {
|
|
200
|
-
node.dispose();
|
|
201
|
-
});
|
|
202
|
-
return this;
|
|
203
|
-
};
|
|
204
|
-
/**
|
|
205
|
-
* Gets a node by its {@link DottedPath}.
|
|
206
|
-
*/
|
|
207
|
-
Element.prototype.getNode = function (dottedPath) {
|
|
208
|
-
var _dottedPath = DottedPath.create(dottedPath);
|
|
209
|
-
var keys = Array.from(this._dottedNodes.keys()).map(function (dp) { return dp.path; });
|
|
210
|
-
var values = Array.from(this._dottedNodes.values());
|
|
211
|
-
var node = values[keys.indexOf(_dottedPath.path)];
|
|
212
|
-
if (!node) {
|
|
213
|
-
throw new Error("Node with path \"" + _dottedPath.path + "\" does not exist for element \"" + this.id + "\".");
|
|
214
|
-
}
|
|
215
|
-
return node;
|
|
216
|
-
};
|
|
217
|
-
/**
|
|
218
|
-
* Gets a mesh by its {@link DottedPath}.
|
|
219
|
-
*/
|
|
220
|
-
Element.prototype.getMesh = function (dottedPath) {
|
|
221
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
222
|
-
var node;
|
|
223
|
-
return __generator(this, function (_a) {
|
|
224
|
-
switch (_a.label) {
|
|
225
|
-
case 0: return [4 /*yield*/, this.getNode(dottedPath)];
|
|
226
|
-
case 1:
|
|
227
|
-
node = _a.sent();
|
|
228
|
-
if (node instanceof Mesh) {
|
|
229
|
-
return [2 /*return*/, node];
|
|
230
|
-
}
|
|
231
|
-
return [2 /*return*/, null];
|
|
232
|
-
}
|
|
233
|
-
});
|
|
234
|
-
});
|
|
235
|
-
};
|
|
236
|
-
/**
|
|
237
|
-
* Gets a {@link PaintableDefinition} by its name.
|
|
238
|
-
*/
|
|
239
|
-
Element.prototype.getPaintableDefinition = function (name) {
|
|
240
|
-
if (!this.paintableDefinitions || !this.paintableDefinitions[name]) {
|
|
241
|
-
throw new Error("No paintable \"" + name + "\" defined for element \"" + this.id + "\".");
|
|
242
|
-
}
|
|
243
|
-
return this.paintableDefinitions[name];
|
|
244
|
-
};
|
|
245
|
-
/**
|
|
246
|
-
* Gets a {@link TraceableDefinition} by its name.
|
|
247
|
-
*/
|
|
248
|
-
Element.prototype.getTraceableDefinition = function (name) {
|
|
249
|
-
if (!this.traceableDefinitions || !this.traceableDefinitions[name]) {
|
|
250
|
-
throw new Error("No traceable \"" + name + "\" defined to add observer in element \"" + this.id + "\".");
|
|
251
|
-
}
|
|
252
|
-
return this.traceableDefinitions[name];
|
|
253
|
-
};
|
|
254
|
-
/**
|
|
255
|
-
* Gets the paintable Node by its name.
|
|
256
|
-
*/
|
|
257
|
-
Element.prototype.getPaintableNode = function (name) {
|
|
258
|
-
return this.getNode(this.getPaintableDefinition(name).path);
|
|
259
|
-
};
|
|
260
|
-
/**
|
|
261
|
-
* Gets the traceable Node by its name.
|
|
262
|
-
*/
|
|
263
|
-
Element.prototype.getTraceableNode = function (name) {
|
|
264
|
-
return this.getNode(this.getTraceableDefinition(name).path);
|
|
265
|
-
};
|
|
266
|
-
/**
|
|
267
|
-
* @see {@link VariantParameterizable.commitParameters}
|
|
268
|
-
* @emit {@link Event.ELEMENT_PARAMETER_COMMITTED}
|
|
269
|
-
*/
|
|
270
|
-
Element.prototype.commitParameters = function (parameters) {
|
|
271
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
272
|
-
return __generator(this, function (_a) {
|
|
273
|
-
return [2 /*return*/, _super.prototype.commitParameters.call(this, parameters)];
|
|
274
|
-
});
|
|
275
|
-
});
|
|
276
|
-
};
|
|
277
|
-
/**
|
|
278
|
-
* Adds an observer function for camera matrix changes.
|
|
279
|
-
* The `observer` gets 2 parameters: the `AbstractMesh` and a `ClientRect` object.
|
|
280
|
-
*/
|
|
281
|
-
Element.prototype.addTraceableObserver = function (traceable, observer, payload) {
|
|
282
|
-
var _this = this;
|
|
283
|
-
if (payload && !(payload instanceof HTMLElement)) {
|
|
284
|
-
throw new Error("Payload for camera observer must be an instance of \"HTMLElement\" in element \"" + this.id + "\".");
|
|
285
|
-
}
|
|
286
|
-
if (!this.traceableDefinitions || !this.traceableDefinitions[traceable]) {
|
|
287
|
-
throw new Error("No traceable \"" + traceable + "\" defined to add observer in element \"" + this.id + "\".");
|
|
288
|
-
}
|
|
289
|
-
var node = this.getTraceableNode(traceable);
|
|
290
|
-
if (!(node instanceof AbstractMesh)) {
|
|
291
|
-
throw new Error("The path must be an instance of \"AbstractMesh\" for camera observer in element \"" + this.id + "\".");
|
|
292
|
-
}
|
|
293
|
-
this.variant.viewer.sceneManager.activeCamera.onViewMatrixChangedObservable.add(function (eventData, eventState) {
|
|
294
|
-
var position = getClientRectFromMesh(node, _this.variant.viewer.scene, _this.variant.viewer.canvas);
|
|
295
|
-
if (payload) {
|
|
296
|
-
payload.style.top = position.top + "px";
|
|
297
|
-
payload.style.left = position.left + "px";
|
|
298
|
-
}
|
|
299
|
-
observer(node, position);
|
|
300
|
-
});
|
|
301
|
-
return this;
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* Draws a `ImageBitmap` or `OffscreenCanvas` onto a `paintable` defined via {@link PaintableDefinition}.
|
|
305
|
-
*/
|
|
306
|
-
Element.prototype.drawPaintable = function (paintable, imageSource) {
|
|
307
|
-
// node and material checks and preperation
|
|
308
|
-
var node = this.getPaintableNode(paintable);
|
|
309
|
-
if (!(node instanceof AbstractMesh)) {
|
|
310
|
-
throw new Error("The path must be an instance of \"AbstractMesh\" for paintable \"" + paintable + "\" " + ("in element \"" + this.id + "\"."));
|
|
311
|
-
}
|
|
312
|
-
if (node.material && this.variant.viewer.cloneMaterialsOnMutation) {
|
|
313
|
-
if (node.material && !has(node.metadata, 'dirty.material')) {
|
|
314
|
-
cloneTransformNodeMaterial(node);
|
|
315
|
-
}
|
|
316
|
-
if (!has(node.metadata, 'dirty.material.texture')) {
|
|
317
|
-
// inject initial value and mark as dirty
|
|
318
|
-
injectNodeMetadata(node, { dirty: { material: { texture: true } } });
|
|
319
|
-
}
|
|
320
|
-
}
|
|
321
|
-
else if (!node.material) {
|
|
322
|
-
// paintables should also work if no material is assigned to the node per default
|
|
323
|
-
// in this case a certain fallback material with fitting default values is defined
|
|
324
|
-
var pbrMat = new PBRMaterial(this.id + "." + paintable + ".material", this.variant.viewer.scene);
|
|
325
|
-
pbrMat.roughness = 1.0;
|
|
326
|
-
pbrMat.metallic = 1.0;
|
|
327
|
-
node.material = pbrMat;
|
|
328
|
-
}
|
|
329
|
-
// TODO: Not sure if this really should be overwritten every time the paintable is redrawn.
|
|
330
|
-
// Maybe the 3D artist had something in mind when setting a certain transparency mode, which would get overwritten in this case.
|
|
331
|
-
// Applying it as a default if no material is set is fine though (see roughness/metallic some lines above).
|
|
332
|
-
// Removing this line will most likely break existing configurators, so be cautios!
|
|
333
|
-
node.material.transparencyMode = Material.MATERIAL_ALPHATESTANDBLEND;
|
|
334
|
-
// consider width and height of the paintable
|
|
335
|
-
var widthAndHeight = {
|
|
336
|
-
width: imageSource.width,
|
|
337
|
-
height: imageSource.height,
|
|
338
|
-
};
|
|
339
|
-
var paintableDefinition = this.getPaintableDefinition(paintable);
|
|
340
|
-
if (isNumber(paintableDefinition.textureOptions)) {
|
|
341
|
-
widthAndHeight.width = paintableDefinition.textureOptions;
|
|
342
|
-
widthAndHeight.height = paintableDefinition.textureOptions;
|
|
343
|
-
}
|
|
344
|
-
else if (isPlainObject(paintableDefinition.textureOptions)) {
|
|
345
|
-
widthAndHeight.width = paintableDefinition.textureOptions.width;
|
|
346
|
-
widthAndHeight.height = paintableDefinition.textureOptions.height;
|
|
347
|
-
}
|
|
348
|
-
// create dynamic texture on which the image can be drawn
|
|
349
|
-
var texture = new DynamicTexture(this.id + "." + paintable + ".texture", widthAndHeight, this.variant.viewer.scene, false);
|
|
350
|
-
// draw image on texture
|
|
351
|
-
var ctx = texture.getContext();
|
|
352
|
-
ctx.drawImage(imageSource, 0, 0);
|
|
353
|
-
texture.update(false);
|
|
354
|
-
// finally apply the texture on the desired node material
|
|
355
|
-
setMaterialTexture(node, texture, false);
|
|
356
|
-
return this;
|
|
357
|
-
};
|
|
358
|
-
/**
|
|
359
|
-
* Draws a SVG string onto a `paintable` defined via {@link PaintableDefinition}.
|
|
360
|
-
*/
|
|
361
|
-
Element.prototype.drawPaintableFromSvg = function (paintable, svgSource) {
|
|
362
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
363
|
-
var image;
|
|
364
|
-
return __generator(this, function (_a) {
|
|
365
|
-
switch (_a.label) {
|
|
366
|
-
case 0: return [4 /*yield*/, createImageFromSvg(svgSource)];
|
|
367
|
-
case 1:
|
|
368
|
-
image = _a.sent();
|
|
369
|
-
return [2 /*return*/, this.drawPaintable(paintable, image)];
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
});
|
|
373
|
-
};
|
|
374
|
-
/**
|
|
375
|
-
* Draws an Image from source (URL/URI) onto a `paintable` defined via {@link PaintableDefinition}.
|
|
376
|
-
*/
|
|
377
|
-
Element.prototype.drawPaintableFromImgSrc = function (paintable, imgSource) {
|
|
378
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
379
|
-
var image;
|
|
380
|
-
return __generator(this, function (_a) {
|
|
381
|
-
switch (_a.label) {
|
|
382
|
-
case 0: return [4 /*yield*/, createImageFromImgSrc(imgSource)];
|
|
383
|
-
case 1:
|
|
384
|
-
image = _a.sent();
|
|
385
|
-
return [2 /*return*/, this.drawPaintable(paintable, image)];
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
});
|
|
389
|
-
};
|
|
390
|
-
/**
|
|
391
|
-
* Adds observers for loading missing materials where needed
|
|
392
|
-
*/
|
|
393
|
-
Element.prototype.addMissingMaterialObservers = function () {
|
|
394
|
-
for (var _i = 0, _a = this.abstractMeshesFlat; _i < _a.length; _i++) {
|
|
395
|
-
var abstractMesh = _a[_i];
|
|
396
|
-
addMissingMaterialObserver(abstractMesh);
|
|
397
|
-
}
|
|
398
|
-
};
|
|
399
|
-
/**
|
|
400
|
-
* Adds the default {@link ParameterObserver}s which are called every time {@link commitParameters} is called.
|
|
401
|
-
*/
|
|
402
|
-
Element.prototype.addParameterObservers = function () {
|
|
403
|
-
var _this = this;
|
|
404
|
-
this._parameterObservers.set(Parameter.VISIBLE, [
|
|
405
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
406
|
-
var visible;
|
|
407
|
-
return __generator(this, function (_a) {
|
|
408
|
-
try {
|
|
409
|
-
visible = Parameter.parseBoolean(newValue);
|
|
410
|
-
}
|
|
411
|
-
catch (e) {
|
|
412
|
-
return [2 /*return*/];
|
|
413
|
-
}
|
|
414
|
-
if (visible === true) {
|
|
415
|
-
element.nodes.forEach(function (node) {
|
|
416
|
-
injectNodeMetadata(node, { visibility: node.isEnabled() });
|
|
417
|
-
activate(node);
|
|
418
|
-
});
|
|
419
|
-
}
|
|
420
|
-
else if (visible === false) {
|
|
421
|
-
element.nodes.forEach(function (node) {
|
|
422
|
-
injectNodeMetadata(node, { visibility: node.isEnabled() });
|
|
423
|
-
deactivate(node);
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
return [2 /*return*/];
|
|
427
|
-
});
|
|
428
|
-
}); },
|
|
429
|
-
]);
|
|
430
|
-
this._parameterObservers.set(Parameter.SCALING, [
|
|
431
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
432
|
-
return __generator(this, function (_a) {
|
|
433
|
-
// we have to deal just with root nodes here due to relative impacts in a node tree
|
|
434
|
-
element.nodes.forEach(function (node) {
|
|
435
|
-
return transformTransformNode(node, {
|
|
436
|
-
scaling: Parameter.parseVector(newValue),
|
|
437
|
-
position: Parameter.parseVector(element.inheritedParameters[Parameter.POSITION] || '(0, 0, 0)'),
|
|
438
|
-
rotation: Parameter.parseRotation(element.inheritedParameters[Parameter.ROTATION] || '(0, 0, 0)'),
|
|
439
|
-
});
|
|
440
|
-
});
|
|
441
|
-
return [2 /*return*/];
|
|
442
|
-
});
|
|
443
|
-
}); },
|
|
444
|
-
]);
|
|
445
|
-
this._parameterObservers.set(Parameter.POSITION, [
|
|
446
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
447
|
-
return __generator(this, function (_a) {
|
|
448
|
-
// we have to deal just with root nodes here due to relative impacts in a node tree
|
|
449
|
-
element.nodes.forEach(function (node) {
|
|
450
|
-
return transformTransformNode(node, {
|
|
451
|
-
scaling: Parameter.parseVector(element.inheritedParameters[Parameter.SCALING] || '(1, 1, 1)'),
|
|
452
|
-
position: Parameter.parseVector(newValue),
|
|
453
|
-
rotation: Parameter.parseRotation(element.inheritedParameters[Parameter.ROTATION] || '(0, 0, 0)'),
|
|
454
|
-
});
|
|
455
|
-
});
|
|
456
|
-
return [2 /*return*/];
|
|
457
|
-
});
|
|
458
|
-
}); },
|
|
459
|
-
]);
|
|
460
|
-
this._parameterObservers.set(Parameter.ROTATION, [
|
|
461
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
462
|
-
return __generator(this, function (_a) {
|
|
463
|
-
// we have to deal just with root nodes here due to relative impacts in a node tree
|
|
464
|
-
element.nodes.forEach(function (node) {
|
|
465
|
-
return transformTransformNode(node, {
|
|
466
|
-
scaling: Parameter.parseVector(element.inheritedParameters[Parameter.SCALING] || '(1, 1, 1)'),
|
|
467
|
-
position: Parameter.parseVector(element.inheritedParameters[Parameter.POSITION] || '(0, 0, 0)'),
|
|
468
|
-
rotation: Parameter.parseRotation(newValue),
|
|
469
|
-
});
|
|
470
|
-
});
|
|
471
|
-
return [2 /*return*/];
|
|
472
|
-
});
|
|
473
|
-
}); },
|
|
474
|
-
]);
|
|
475
|
-
this._parameterObservers.set(Parameter.MATERIAL, [
|
|
476
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
477
|
-
var materialName;
|
|
478
|
-
return __generator(this, function (_a) {
|
|
479
|
-
materialName = newValue.toString();
|
|
480
|
-
element.nodes.forEach(function (node) {
|
|
481
|
-
assertTransformNode(node, function (node) {
|
|
482
|
-
if (node instanceof InstancedMesh) {
|
|
483
|
-
throw new Error("Changing parameter \"" + Parameter.MATERIAL + "\" " +
|
|
484
|
-
"of an InstancedMesh is not supported. " +
|
|
485
|
-
("Tried to change node \"" + node.id + "\" on element \"" + element.id + "\"."));
|
|
486
|
-
}
|
|
487
|
-
});
|
|
488
|
-
setMaterial(element.variant, node, materialName);
|
|
489
|
-
});
|
|
490
|
-
return [2 /*return*/];
|
|
491
|
-
});
|
|
492
|
-
}); },
|
|
493
|
-
]);
|
|
494
|
-
this._parameterObservers.set(Parameter.MATERIAL_COLOR, [
|
|
495
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
496
|
-
var color;
|
|
497
|
-
var _this = this;
|
|
498
|
-
return __generator(this, function (_a) {
|
|
499
|
-
color = Parameter.parseColor(newValue);
|
|
500
|
-
element.nodes.forEach(function (node) {
|
|
501
|
-
assertTransformNode(node, function (node) {
|
|
502
|
-
if (node instanceof InstancedMesh) {
|
|
503
|
-
throw new Error("Changing parameter \"" + Parameter.MATERIAL_COLOR + "\" " +
|
|
504
|
-
"of an InstancedMesh is not supported. " +
|
|
505
|
-
("Tried to change node \"" + node.id + "\" on element \"" + element.id + "\"."));
|
|
506
|
-
}
|
|
507
|
-
});
|
|
508
|
-
if (_this.variant.viewer.cloneMaterialsOnMutation) {
|
|
509
|
-
if (!has(node.metadata, 'dirty.material')) {
|
|
510
|
-
cloneTransformNodeMaterial(node);
|
|
511
|
-
}
|
|
512
|
-
if (!has(node.metadata, 'dirty.material.color')) {
|
|
513
|
-
// inject initial value and mark as dirty
|
|
514
|
-
injectNodeMetadata(node, { dirty: { material: { color: oldValue } } });
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
setMaterialColor(node, color);
|
|
518
|
-
});
|
|
519
|
-
return [2 /*return*/];
|
|
520
|
-
});
|
|
521
|
-
}); },
|
|
522
|
-
]);
|
|
523
|
-
this._parameterObservers.set(Parameter.MATERIAL_METALLNESS, [
|
|
524
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
525
|
-
var metallness;
|
|
526
|
-
var _this = this;
|
|
527
|
-
return __generator(this, function (_a) {
|
|
528
|
-
metallness = Parameter.parseNumber(newValue);
|
|
529
|
-
element.nodes.forEach(function (node) {
|
|
530
|
-
assertTransformNode(node, function (node) {
|
|
531
|
-
if (node instanceof InstancedMesh) {
|
|
532
|
-
throw new Error("Changing parameter \"" + Parameter.MATERIAL_METALLNESS + "\" " +
|
|
533
|
-
"of an InstancedMesh is not supported. " +
|
|
534
|
-
("Tried to change node \"" + node.id + "\" on element \"" + element.id + "\"."));
|
|
535
|
-
}
|
|
536
|
-
});
|
|
537
|
-
if (_this.variant.viewer.cloneMaterialsOnMutation) {
|
|
538
|
-
if (!has(node.metadata, 'dirty.material')) {
|
|
539
|
-
cloneTransformNodeMaterial(node);
|
|
540
|
-
}
|
|
541
|
-
if (!has(node.metadata, 'dirty.material.metallness')) {
|
|
542
|
-
// inject initial value and mark as dirty
|
|
543
|
-
injectNodeMetadata(node, { dirty: { material: { metallness: oldValue } } });
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
setMaterialMetallness(node, metallness);
|
|
547
|
-
});
|
|
548
|
-
return [2 /*return*/];
|
|
549
|
-
});
|
|
550
|
-
}); },
|
|
551
|
-
]);
|
|
552
|
-
this._parameterObservers.set(Parameter.MATERIAL_ROUGHNESS, [
|
|
553
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
554
|
-
var roughness;
|
|
555
|
-
var _this = this;
|
|
556
|
-
return __generator(this, function (_a) {
|
|
557
|
-
roughness = Parameter.parseNumber(newValue);
|
|
558
|
-
element.nodes.forEach(function (node) {
|
|
559
|
-
assertTransformNode(node, function (node) {
|
|
560
|
-
if (node instanceof InstancedMesh) {
|
|
561
|
-
throw new Error("Changing parameter \"" + Parameter.MATERIAL_ROUGHNESS + "\" " +
|
|
562
|
-
"of an InstancedMesh is not supported. " +
|
|
563
|
-
("Tried to change node \"" + node.id + "\" on element \"" + element.id + "\"."));
|
|
564
|
-
}
|
|
565
|
-
});
|
|
566
|
-
if (_this.variant.viewer.cloneMaterialsOnMutation) {
|
|
567
|
-
if (!has(node.metadata, 'dirty.material')) {
|
|
568
|
-
cloneTransformNodeMaterial(node);
|
|
569
|
-
}
|
|
570
|
-
if (!has(node.metadata, 'dirty.material.roughness')) {
|
|
571
|
-
// inject initial value and mark as dirty
|
|
572
|
-
injectNodeMetadata(node, { dirty: { material: { roughness: oldValue } } });
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
setMaterialRoughness(node, roughness);
|
|
576
|
-
});
|
|
577
|
-
return [2 /*return*/];
|
|
578
|
-
});
|
|
579
|
-
}); },
|
|
580
|
-
]);
|
|
581
|
-
this._parameterObservers.set(Parameter.HIGHLIGHT_COLOR, [
|
|
582
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
583
|
-
var _a;
|
|
584
|
-
return __generator(this, function (_b) {
|
|
585
|
-
// trigger Parameter.HIGHLIGHTED observers
|
|
586
|
-
(_a = this._parameterObservers.get(Parameter.HIGHLIGHTED)) === null || _a === void 0 ? void 0 : _a.forEach(function (observer) {
|
|
587
|
-
observer(element, !!element.highlighted, !!element.highlighted);
|
|
588
|
-
});
|
|
589
|
-
return [2 /*return*/];
|
|
590
|
-
});
|
|
591
|
-
}); },
|
|
592
|
-
]);
|
|
593
|
-
this._parameterObservers.set(Parameter.HIGHLIGHT_ENABLED, [
|
|
594
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
595
|
-
var curr;
|
|
596
|
-
var _a;
|
|
597
|
-
return __generator(this, function (_b) {
|
|
598
|
-
try {
|
|
599
|
-
curr = Parameter.parseBoolean(newValue);
|
|
600
|
-
}
|
|
601
|
-
catch (e) {
|
|
602
|
-
return [2 /*return*/];
|
|
603
|
-
}
|
|
604
|
-
switch (curr) {
|
|
605
|
-
case true:
|
|
606
|
-
if (element._highlightLayer) {
|
|
607
|
-
break;
|
|
608
|
-
}
|
|
609
|
-
element.highlightLayer = new HighlightLayer(DottedPath.create(element.id).addPart('highlight').path, element.variant.viewer.scene);
|
|
610
|
-
break;
|
|
611
|
-
case false:
|
|
612
|
-
(_a = element.highlightLayer) === null || _a === void 0 ? void 0 : _a.dispose();
|
|
613
|
-
break;
|
|
614
|
-
}
|
|
615
|
-
return [2 /*return*/];
|
|
616
|
-
});
|
|
617
|
-
}); },
|
|
618
|
-
]);
|
|
619
|
-
this._parameterObservers.set(Parameter.HIGHLIGHTED, [
|
|
620
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
621
|
-
var highlighted;
|
|
622
|
-
var _this = this;
|
|
623
|
-
var _a;
|
|
624
|
-
return __generator(this, function (_b) {
|
|
625
|
-
if (!element.inheritedParameters[Parameter.HIGHLIGHT_ENABLED]) {
|
|
626
|
-
return [2 /*return*/];
|
|
627
|
-
}
|
|
628
|
-
// trigger Parameter.HIGHLIGHT_ENABLED observers to ensure HighlightLayer
|
|
629
|
-
(_a = this._parameterObservers.get(Parameter.HIGHLIGHT_ENABLED)) === null || _a === void 0 ? void 0 : _a.forEach(function (observer) {
|
|
630
|
-
observer(element, _this.parameters[Parameter.HIGHLIGHT_ENABLED], true);
|
|
631
|
-
});
|
|
632
|
-
try {
|
|
633
|
-
highlighted = Parameter.parseBoolean(newValue);
|
|
634
|
-
}
|
|
635
|
-
catch (e) {
|
|
636
|
-
return [2 /*return*/];
|
|
637
|
-
}
|
|
638
|
-
// Add/Remove meshes to previously created highlight layers.
|
|
639
|
-
if (highlighted === true) {
|
|
640
|
-
element.nodes.forEach(function (node) {
|
|
641
|
-
assertTransformNode(node, function (node) {
|
|
642
|
-
if (node instanceof InstancedMesh) {
|
|
643
|
-
throw new Error("Changing parameter \"" + Parameter.HIGHLIGHTED + "\" " +
|
|
644
|
-
"of an InstancedMesh is not supported. " +
|
|
645
|
-
("Tried to change node \"" + node.id + "\" on element \"" + element.id + "\"."));
|
|
646
|
-
}
|
|
647
|
-
});
|
|
648
|
-
var color = Color3.Green();
|
|
649
|
-
if (element.inheritedParameters[Parameter.HIGHLIGHT_COLOR]) {
|
|
650
|
-
color = Parameter.parseColor(element.inheritedParameters[Parameter.HIGHLIGHT_COLOR]);
|
|
651
|
-
}
|
|
652
|
-
if (typeof element._highlightLayer !== 'undefined') {
|
|
653
|
-
addToHighlightLayer(element._highlightLayer, color, node);
|
|
654
|
-
}
|
|
655
|
-
});
|
|
656
|
-
}
|
|
657
|
-
else if (highlighted === false) {
|
|
658
|
-
element.nodes.forEach(function (node) {
|
|
659
|
-
if (typeof element._highlightLayer !== 'undefined') {
|
|
660
|
-
removeFromHighlightLayer(element._highlightLayer, node);
|
|
661
|
-
}
|
|
662
|
-
});
|
|
663
|
-
}
|
|
664
|
-
return [2 /*return*/];
|
|
665
|
-
});
|
|
666
|
-
}); },
|
|
667
|
-
]);
|
|
668
|
-
this._parameterObservers.set(Parameter.CAST_SHADOW, [
|
|
669
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
670
|
-
var castShadow, lightCsl;
|
|
671
|
-
return __generator(this, function (_a) {
|
|
672
|
-
switch (_a.label) {
|
|
673
|
-
case 0:
|
|
674
|
-
try {
|
|
675
|
-
castShadow = Parameter.parseBoolean(newValue);
|
|
676
|
-
}
|
|
677
|
-
catch (e) {
|
|
678
|
-
return [2 /*return*/];
|
|
679
|
-
}
|
|
680
|
-
lightCsl = element.inheritedParameters[Parameter.CAST_SHADOW_FROM_LIGHTS];
|
|
681
|
-
if (!lightCsl) {
|
|
682
|
-
lightCsl = element.variant.inheritedViewerLights.map(function (l) { return l.name; }).join(',');
|
|
683
|
-
}
|
|
684
|
-
if (!(castShadow === true)) return [3 /*break*/, 2];
|
|
685
|
-
return [4 /*yield*/, this.castShadowValueHandler(lightCsl, addToShadowGenerator)];
|
|
686
|
-
case 1:
|
|
687
|
-
_a.sent();
|
|
688
|
-
_a.label = 2;
|
|
689
|
-
case 2:
|
|
690
|
-
if (!(castShadow === false)) return [3 /*break*/, 4];
|
|
691
|
-
return [4 /*yield*/, this.castShadowValueHandler(lightCsl, removeFromShadowGenerator)];
|
|
692
|
-
case 3:
|
|
693
|
-
_a.sent();
|
|
694
|
-
_a.label = 4;
|
|
695
|
-
case 4: return [2 /*return*/];
|
|
696
|
-
}
|
|
697
|
-
});
|
|
698
|
-
}); },
|
|
699
|
-
]);
|
|
700
|
-
this._parameterObservers.set(Parameter.CAST_SHADOW_FROM_LIGHTS, [
|
|
701
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
702
|
-
var lightCsl;
|
|
703
|
-
return __generator(this, function (_a) {
|
|
704
|
-
switch (_a.label) {
|
|
705
|
-
case 0:
|
|
706
|
-
lightCsl = element.variant.inheritedViewerLights.map(function (l) { return l.name; }).join(',');
|
|
707
|
-
// cleanup all shadow generators
|
|
708
|
-
return [4 /*yield*/, this.castShadowValueHandler(lightCsl, removeFromShadowGenerator)];
|
|
709
|
-
case 1:
|
|
710
|
-
// cleanup all shadow generators
|
|
711
|
-
_a.sent();
|
|
712
|
-
if (!(element.castShadow === true)) return [3 /*break*/, 3];
|
|
713
|
-
// if newValue is undefined or '' then set newValue to lightCsl (use all lights)
|
|
714
|
-
if (!newValue) {
|
|
715
|
-
newValue = lightCsl;
|
|
716
|
-
}
|
|
717
|
-
return [4 /*yield*/, this.castShadowValueHandler(newValue, addToShadowGenerator)];
|
|
718
|
-
case 2:
|
|
719
|
-
_a.sent();
|
|
720
|
-
_a.label = 3;
|
|
721
|
-
case 3: return [2 /*return*/];
|
|
722
|
-
}
|
|
723
|
-
});
|
|
724
|
-
}); },
|
|
725
|
-
]);
|
|
726
|
-
this._parameterObservers.set(Parameter.RECEIVE_SHADOWS, [
|
|
727
|
-
function (element, oldValue, newValue) { return __awaiter(_this, void 0, void 0, function () {
|
|
728
|
-
return __generator(this, function (_a) {
|
|
729
|
-
element.nodes.forEach(function (node) { return setReceiveShadows(node, Parameter.parseBoolean(newValue)); });
|
|
730
|
-
return [2 /*return*/];
|
|
731
|
-
});
|
|
732
|
-
}); },
|
|
733
|
-
]);
|
|
734
|
-
return this;
|
|
735
|
-
};
|
|
736
|
-
/**
|
|
737
|
-
* Filter for nodes that are not defined or excluded in the `pathDefinitions`.
|
|
738
|
-
*/
|
|
739
|
-
Element.prototype.filterNode = function (node) {
|
|
740
|
-
var _this = this;
|
|
741
|
-
var includeTokens = [];
|
|
742
|
-
this.pathDefinitions.include.forEach(function (dottedPath) {
|
|
743
|
-
includeTokens = union(includeTokens, DottedPath.create(dottedPath).leafTokens);
|
|
744
|
-
});
|
|
745
|
-
var shallKeep = function (dp) {
|
|
746
|
-
var isDirectlyIncluded = !!includeTokens.find(function (_dp) { return _dp === dp.path; });
|
|
747
|
-
var isSubOfIncluded = !!_this.pathDefinitions.include.find(function (_dp) {
|
|
748
|
-
return dp.path.startsWith("" + _dp + DottedPath.DELIMITER);
|
|
749
|
-
});
|
|
750
|
-
return isDirectlyIncluded || isSubOfIncluded;
|
|
751
|
-
};
|
|
752
|
-
var shallExclude = function (dp) {
|
|
753
|
-
if (!_this.pathDefinitions.exclude) {
|
|
754
|
-
return false;
|
|
755
|
-
}
|
|
756
|
-
return !!_this.pathDefinitions.exclude.find(function (_dp) { return dp.path === _dp; });
|
|
757
|
-
};
|
|
758
|
-
return shallKeep(node.metadata.dottedPath) && !shallExclude(node.metadata.dottedPath);
|
|
759
|
-
};
|
|
760
|
-
/**
|
|
761
|
-
* Asserts whether all {@link pathDefinitions} link to a valid `Node` path.
|
|
762
|
-
* @protected
|
|
763
|
-
*/
|
|
764
|
-
Element.prototype.assertPathDefinitions = function () {
|
|
765
|
-
var _this = this;
|
|
766
|
-
var _a;
|
|
767
|
-
var dottedNodes = this.variant.inheritedDottedNodes;
|
|
768
|
-
if (dottedNodes.size === 0) {
|
|
769
|
-
throw new Error("There are no mapped nodes for element \"" + this.id + "\".");
|
|
770
|
-
}
|
|
771
|
-
var include = this.pathDefinitions.include.map(function (path) { return DottedPath.create(path).path; });
|
|
772
|
-
var exclude = (_a = this.pathDefinitions.exclude) === null || _a === void 0 ? void 0 : _a.map(function (path) { return DottedPath.create(path).path; });
|
|
773
|
-
var keys = Array.from(dottedNodes.keys()).map(function (dottedPath) { return dottedPath.path; });
|
|
774
|
-
union(include, exclude).forEach(function (path) {
|
|
775
|
-
if (keys.indexOf(path) === -1) {
|
|
776
|
-
throw new Error("Node with path \"" + path + "\" does not exist for element \"" + _this.id + "\".");
|
|
777
|
-
}
|
|
778
|
-
});
|
|
779
|
-
};
|
|
780
|
-
/**
|
|
781
|
-
* Handles callback for given light parameter.
|
|
782
|
-
*/
|
|
783
|
-
Element.prototype.castShadowValueHandler = function (lightCsl, mutator) {
|
|
784
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
785
|
-
var lights, _i, _a, lightName, viewerLight, shadowGenerators;
|
|
786
|
-
var _this = this;
|
|
787
|
-
return __generator(this, function (_b) {
|
|
788
|
-
switch (_b.label) {
|
|
789
|
-
case 0:
|
|
790
|
-
lights = [];
|
|
791
|
-
_i = 0, _a = Parameter.parseCommaSeparatedList(lightCsl);
|
|
792
|
-
_b.label = 1;
|
|
793
|
-
case 1:
|
|
794
|
-
if (!(_i < _a.length)) return [3 /*break*/, 4];
|
|
795
|
-
lightName = _a[_i];
|
|
796
|
-
return [4 /*yield*/, this.variant.getViewerLight(lightName)];
|
|
797
|
-
case 2:
|
|
798
|
-
viewerLight = _b.sent();
|
|
799
|
-
if (viewerLight) {
|
|
800
|
-
lights.push(viewerLight.light);
|
|
801
|
-
}
|
|
802
|
-
_b.label = 3;
|
|
803
|
-
case 3:
|
|
804
|
-
_i++;
|
|
805
|
-
return [3 /*break*/, 1];
|
|
806
|
-
case 4:
|
|
807
|
-
shadowGenerators = lights.map(function (light) { return light === null || light === void 0 ? void 0 : light.getShadowGenerator(); }).filter(Boolean);
|
|
808
|
-
shadowGenerators.forEach(function (generator) {
|
|
809
|
-
_this.nodes.forEach(function (node) {
|
|
810
|
-
mutator(generator, node);
|
|
811
|
-
});
|
|
812
|
-
});
|
|
813
|
-
return [2 /*return*/];
|
|
814
|
-
}
|
|
815
|
-
});
|
|
816
|
-
});
|
|
817
|
-
};
|
|
818
|
-
return Element;
|
|
819
|
-
}(VariantParameterizable));
|
|
820
|
-
export { Element };
|
|
821
|
-
//# sourceMappingURL=element.js.map
|