@colijnit/homedecorator 255.1.2 → 255.1.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.
- package/app/core/model/homedecorator-settings-options.d.ts +1 -0
- package/app/core/service/homedecorator-connector-adapter.service.d.ts +1 -1
- package/app/core/service/utils.service.d.ts +1 -0
- package/app/plugins/core3d/components/ar-gui/ar-gui-root/ar-gui-elements/ar-gui-buttons/ar-gui-buttons.component.scss +2 -4
- package/app/plugins/core3d/items/floor-plane-item.d.ts +8 -1
- package/app/plugins/core3d/items/metadata.d.ts +2 -0
- package/app/plugins/core3d/service/ar.service.d.ts +1 -0
- package/app/plugins/core3d/service/floor-pattern.service.d.ts +26 -0
- package/app/plugins/core3d/service/floor-tile-intersection.service.d.ts +25 -0
- package/app/plugins/core3d/service/outline.service.d.ts +1 -2
- package/app/plugins/core3d/service/post-processing.service.d.ts +6 -0
- package/app/plugins/core3d/service/scene.service.d.ts +4 -1
- package/app/plugins/core3d/service/ssr.service.d.ts +18 -0
- package/app/plugins/model-uploader/model-previewer/model-preview.component.d.ts +40 -3
- package/app/plugins/render/service/new-render.service.d.ts +1 -0
- package/app/plugins/threedselector/threedselector/service/build-furniture.service.d.ts +10 -1
- package/app/plugins/threedselector/threedselector/threedselector.component.d.ts +1 -0
- package/app/plugins/toolbar/toolbar.module.d.ts +2 -1
- package/app/shared/pdf-export/pdf-export.component.d.ts +20 -0
- package/app/shared/pdf-export/pdf-export.component.scss +19 -0
- package/app/shared/pdf-export/pdf-export.module.d.ts +11 -0
- package/assets/icons/pen-ruler.svg +1 -0
- package/assets/icons/xmark_regular.svg +1 -0
- package/bundles/colijnit-homedecorator.umd.js +1195 -174
- package/bundles/colijnit-homedecorator.umd.js.map +1 -1
- package/colijnit-homedecorator-255.1.2.tgz +0 -0
- package/esm2015/app/app.version.js +4 -4
- package/esm2015/app/core/model/homedecorator-settings-options.js +2 -1
- package/esm2015/app/core/model/light-preset.js +11 -7
- package/esm2015/app/core/service/homedecorator-connector-adapter.service.js +4 -6
- package/esm2015/app/core/service/homedecorator-connector.service.js +3 -1
- package/esm2015/app/core/service/utils.service.js +16 -1
- package/esm2015/app/plugins/core3d/components/ar-gui/ar-gui-root/ar-gui-elements/ar-gui-buttons/ar-gui-buttons.component.js +2 -2
- package/esm2015/app/plugins/core3d/items/floor-plane-item.js +25 -2
- package/esm2015/app/plugins/core3d/items/metadata.js +1 -1
- package/esm2015/app/plugins/core3d/service/ar.service.js +14 -1
- package/esm2015/app/plugins/core3d/service/floor-pattern.service.js +156 -0
- package/esm2015/app/plugins/core3d/service/floor-tile-intersection.service.js +122 -0
- package/esm2015/app/plugins/core3d/service/floor.service.js +5 -2
- package/esm2015/app/plugins/core3d/service/outline.service.js +9 -8
- package/esm2015/app/plugins/core3d/service/post-processing.service.js +77 -22
- package/esm2015/app/plugins/core3d/service/scene.service.js +30 -13
- package/esm2015/app/plugins/core3d/service/ssr.service.js +53 -0
- package/esm2015/app/plugins/lite-selector/lite-selector/component/selections-summary/selections-summary.component.js +3 -3
- package/esm2015/app/plugins/model-uploader/model-previewer/model-preview.component.js +335 -79
- package/esm2015/app/plugins/model-uploader/model-uploader/model-uploader.component.js +3 -2
- package/esm2015/app/plugins/product-catalog/product-catalog/product-catalog.component.js +3 -2
- package/esm2015/app/plugins/render/service/new-render.service.js +37 -13
- package/esm2015/app/plugins/threedselector/threedselector/service/build-furniture.service.js +135 -5
- package/esm2015/app/plugins/threedselector/threedselector/threedselector.component.js +34 -8
- package/esm2015/app/plugins/toolbar/toolbar/toolbar.component.js +9 -25
- package/esm2015/app/plugins/toolbar/toolbar.module.js +8 -4
- package/esm2015/app/shared/pdf-export/pdf-export.component.js +86 -0
- package/esm2015/app/shared/pdf-export/pdf-export.module.js +38 -0
- package/fesm2015/colijnit-homedecorator.js +1156 -181
- package/fesm2015/colijnit-homedecorator.js.map +1 -1
- package/package.json +2 -2
- package/assets/hdri/ground_MASK.jpg +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@colijnit/configuratorapi/build/enum/node-type.enum'), require('@colijnit/configuratorapi/build/model/configurator-statistics-environment'), require('@colijnit/ioneconnector/build/model/options'), require('@colijnit/ioneconnector/build/model/data-service-response-data'), require('@colijnit/configuratorapi/build/model/frozen-article'), require('@colijnit/configuratorapi/build/model/selection'), require('@colijnit/configuratorapi/build/model/answer-price'), require('@colijnit/configuratorapi/build/model/article'), require('@colijnit/configuratorapi/build/model/deco-node'), require('@colijnit/configuratorapi/build/model/skip-button-info'), require('@colijnit/configuratorapi'), require('@colijnit/mainapi'), require('@colijnit/articleapi/build/articles'), require('@colijnit/configuratorapi/build/model/article-text.bo'), require('@colijnit/ioneconnector/build/service/business-object-factory'), require('@colijnit/ioneconnector/build/utils/image-utils'), require('@colijnit/articleapi/build/model/external-catalog-startup-info'), require('@colijnit/articleapi/build/model/catalog-definition.bo'), require('@colijnit/articleapi/build/model/external-source.bo'), require('@colijnit/articleapi/build/model/article-full-object'), require('@colijnit/configuratorapi/build/model/article-category'), require('@colijnit/articleapi/build/model/article-flat.bo'), require('@colijnit/mainapi/build/enum/internal-param.enum'), require('@colijnit/ioneconnector/build/utils/string-utils'), require('@colijnit/configuratorapi/build/utils/image-utils'), require('@angular/common/http'), require('axios'), require('textdiff-patch'), require('three'), require('@tweenjs/tween.js'), require('polygon-tools'), require('three-gpu-pathtracer'), require('three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js'), require('three/examples/jsm/geometries/TextGeometry'), require('three/examples/jsm/loaders/FontLoader'), require('three/examples/jsm/webxr/XRControllerModelFactory'), require('@colijnit/configuratorapi/build/enum/hdeco-positioning.enum'), require('three/examples/jsm/postprocessing/OutlinePass'), require('three/examples/jsm/postprocessing/EffectComposer'), require('three/examples/jsm/postprocessing/RenderPass'), require('three/examples/jsm/postprocessing/ShaderPass'), require('three/examples/jsm/shaders/FXAAShader'), require('three/examples/jsm/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@colijnit/homedecorator', ['exports', '@angular/core', 'rxjs', '@colijnit/configuratorapi/build/enum/node-type.enum', '@colijnit/configuratorapi/build/model/configurator-statistics-environment', '@colijnit/ioneconnector/build/model/options', '@colijnit/ioneconnector/build/model/data-service-response-data', '@colijnit/configuratorapi/build/model/frozen-article', '@colijnit/configuratorapi/build/model/selection', '@colijnit/configuratorapi/build/model/answer-price', '@colijnit/configuratorapi/build/model/article', '@colijnit/configuratorapi/build/model/deco-node', '@colijnit/configuratorapi/build/model/skip-button-info', '@colijnit/configuratorapi', '@colijnit/mainapi', '@colijnit/articleapi/build/articles', '@colijnit/configuratorapi/build/model/article-text.bo', '@colijnit/ioneconnector/build/service/business-object-factory', '@colijnit/ioneconnector/build/utils/image-utils', '@colijnit/articleapi/build/model/external-catalog-startup-info', '@colijnit/articleapi/build/model/catalog-definition.bo', '@colijnit/articleapi/build/model/external-source.bo', '@colijnit/articleapi/build/model/article-full-object', '@colijnit/configuratorapi/build/model/article-category', '@colijnit/articleapi/build/model/article-flat.bo', '@colijnit/mainapi/build/enum/internal-param.enum', '@colijnit/ioneconnector/build/utils/string-utils', '@colijnit/configuratorapi/build/utils/image-utils', '@angular/common/http', 'axios', 'textdiff-patch', 'three', '@tweenjs/tween.js', 'polygon-tools', 'three-gpu-pathtracer', 'three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js', 'three/examples/jsm/geometries/TextGeometry', 'three/examples/jsm/loaders/FontLoader', 'three/examples/jsm/webxr/XRControllerModelFactory', '@colijnit/configuratorapi/build/enum/hdeco-positioning.enum', 'three/examples/jsm/postprocessing/OutlinePass', 'three/examples/jsm/postprocessing/EffectComposer', 'three/examples/jsm/postprocessing/RenderPass', 'three/examples/jsm/postprocessing/ShaderPass', 'three/examples/jsm/shaders/FXAAShader', 'three/examples/jsm/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.homedecorator = {}), global.ng.core, global.rxjs, global.nodeType_enum, global.configuratorStatisticsEnvironment, global.options, global.dataServiceResponseData, global.frozenArticle, global.selection, global.answerPrice, global.article, global.decoNode, global.skipButtonInfo, global.configuratorapi, global.mainapi, global.articles, global.articleText_bo, global.businessObjectFactory, global.imageUtils, global.externalCatalogStartupInfo, global.catalogDefinition_bo, global.externalSource_bo, global.articleFullObject, global.articleCategory, global.articleFlat_bo, global.internalParam_enum, global.stringUtils, global.imageUtils$1, global.ng.common.http, global.axios, global.applyPatch, global.THREE, global.TWEEN, global.PolygonTools, global.threeGpuPathtracer, global.ParallelMeshBVHWorker_js, global.TextGeometry, global.FontLoader, global.XRControllerModelFactory, global.hdecoPositioning_enum, global.OutlinePass, global.EffectComposer, global.RenderPass, global.ShaderPass, global.FXAAShader, global.
|
|
5
|
-
})(this, (function (exports, i0, rxjs, nodeType_enum, configuratorStatisticsEnvironment, options, dataServiceResponseData, frozenArticle, selection, answerPrice, article, decoNode, skipButtonInfo, configuratorapi, mainapi, articles, articleText_bo, businessObjectFactory, imageUtils, externalCatalogStartupInfo, catalogDefinition_bo, externalSource_bo, articleFullObject, articleCategory, articleFlat_bo, internalParam_enum, stringUtils, imageUtils$1, i2, axios, applyPatch, THREE, TWEEN, PolygonTools, threeGpuPathtracer, ParallelMeshBVHWorker_js, TextGeometry, FontLoader, XRControllerModelFactory, hdecoPositioning_enum, OutlinePass, EffectComposer, RenderPass, ShaderPass, FXAAShader,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@colijnit/configuratorapi/build/enum/node-type.enum'), require('@colijnit/configuratorapi/build/model/configurator-statistics-environment'), require('@colijnit/ioneconnector/build/model/options'), require('@colijnit/ioneconnector/build/model/data-service-response-data'), require('@colijnit/configuratorapi/build/model/frozen-article'), require('@colijnit/configuratorapi/build/model/selection'), require('@colijnit/configuratorapi/build/model/answer-price'), require('@colijnit/configuratorapi/build/model/article'), require('@colijnit/configuratorapi/build/model/deco-node'), require('@colijnit/configuratorapi/build/model/skip-button-info'), require('@colijnit/configuratorapi'), require('@colijnit/mainapi'), require('@colijnit/articleapi/build/articles'), require('@colijnit/configuratorapi/build/model/article-text.bo'), require('@colijnit/ioneconnector/build/service/business-object-factory'), require('@colijnit/ioneconnector/build/utils/image-utils'), require('@colijnit/articleapi/build/model/external-catalog-startup-info'), require('@colijnit/articleapi/build/model/catalog-definition.bo'), require('@colijnit/articleapi/build/model/external-source.bo'), require('@colijnit/articleapi/build/model/article-full-object'), require('@colijnit/configuratorapi/build/model/article-category'), require('@colijnit/articleapi/build/model/article-flat.bo'), require('@colijnit/mainapi/build/enum/internal-param.enum'), require('@colijnit/ioneconnector/build/utils/string-utils'), require('@colijnit/configuratorapi/build/utils/image-utils'), require('@angular/common/http'), require('axios'), require('textdiff-patch'), require('three'), require('@tweenjs/tween.js'), require('polygon-tools'), require('three-gpu-pathtracer'), require('three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js'), require('three/examples/jsm/geometries/TextGeometry'), require('three/examples/jsm/loaders/FontLoader'), require('three/examples/jsm/webxr/XRControllerModelFactory'), require('@colijnit/configuratorapi/build/enum/hdeco-positioning.enum'), require('three/examples/jsm/postprocessing/OutlinePass'), require('three/examples/jsm/postprocessing/EffectComposer'), require('three/examples/jsm/postprocessing/RenderPass'), require('three/examples/jsm/postprocessing/ShaderPass'), require('three/examples/jsm/shaders/FXAAShader'), require('three/examples/jsm/postprocessing/OutputPass'), require('md5'), require('three/examples/jsm/libs/lil-gui.module.min'), require('n8ao'), require('three/examples/jsm/postprocessing/TAARenderPass'), require('@angular/platform-browser'), require('ngx-device-detector'), require('@angular/material/icon'), require('@angular/animations'), require('@angular/common'), require('@angular/material/dialog'), require('three/examples/jsm/loaders/RGBELoader'), require('@colijnit/configuratorapi/build/enum/hdeco-placement.enum'), require('rxjs/internal/observable/fromEvent'), require('rxjs/operators'), require('rxjs/internal/observable/of'), require('three/examples/jsm/utils/BufferGeometryUtils.js'), require('three/examples/jsm/loaders/OBJLoader'), require('three/examples/jsm/loaders/MTLLoader'), require('three/examples/jsm/loaders/GLTFLoader'), require('three/examples/jsm/exporters/GLTFExporter'), require('three/examples/jsm/loaders/DRACOLoader'), require('three/examples/jsm/loaders/KTX2Loader'), require('three/examples/jsm/exporters/USDZExporter'), require('@angular/material/list'), require('@angular/material/core'), require('@colijnit/configuratorapi/build/enum/deco-node-type.enum'), require('jszip'), require('@colijnit/configuratorapi/build/enum/deco-node-kind.enum'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/forms'), require('three/examples/jsm/utils/BufferGeometryUtils'), require('three-mesh-bvh'), require('three/src/constants'), require('@colijnit/corecomponents'), require('@angular/material/form-field'), require('@angular/material/select'), require('@angular/material/tooltip'), require('@colijnit/corecomponents_v12'), require('@angular/material/slider'), require('@angular/material/input'), require('dat.gui'), require('@migenius/realityserver-client'), require('@angular/material/grid-list'), require('@angular/material/progress-spinner'), require('@angular/flex-layout/flex'), require('@angular/material/progress-bar'), require('three/examples/jsm/geometries/DecalGeometry'), require('fabric'), require('@angular/material/button-toggle'), require('@angular/material/snack-bar'), require('@angular/material/slide-toggle'), require('@angular/material/divider'), require('browser-image-compression'), require('@angular/material/tabs'), require('@angular/flex-layout/extended'), require('ngx-color/chrome'), require('@angular/router'), require('delaunator'), require('three/examples/jsm/helpers/VertexNormalsHelper'), require('@angular/cdk/portal'), require('file-saver'), require('ng2-pdf-viewer'), require('html2canvas'), require('three/examples/jsm/controls/OrbitControls'), require('three/examples/jsm/loaders/FBXLoader'), require('three/examples/jsm/loaders/TDSLoader'), require('three/examples/jsm/loaders/STLLoader'), require('@angular/material/radio'), require('@angular/material/toolbar'), require('@angular/material/menu'), require('@angular/material/card'), require('@angular/material/sidenav'), require('@angular/material/badge'), require('@colijnit/articleapi/build/model/external-catalog-startup-info-request'), require('@colijnit/catalog'), require('ngx-lightbox'), require('@angular/flex-layout'), require('@angular/cdk/drag-drop'), require('jspdf'), require('jspdf-autotable')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@colijnit/homedecorator', ['exports', '@angular/core', 'rxjs', '@colijnit/configuratorapi/build/enum/node-type.enum', '@colijnit/configuratorapi/build/model/configurator-statistics-environment', '@colijnit/ioneconnector/build/model/options', '@colijnit/ioneconnector/build/model/data-service-response-data', '@colijnit/configuratorapi/build/model/frozen-article', '@colijnit/configuratorapi/build/model/selection', '@colijnit/configuratorapi/build/model/answer-price', '@colijnit/configuratorapi/build/model/article', '@colijnit/configuratorapi/build/model/deco-node', '@colijnit/configuratorapi/build/model/skip-button-info', '@colijnit/configuratorapi', '@colijnit/mainapi', '@colijnit/articleapi/build/articles', '@colijnit/configuratorapi/build/model/article-text.bo', '@colijnit/ioneconnector/build/service/business-object-factory', '@colijnit/ioneconnector/build/utils/image-utils', '@colijnit/articleapi/build/model/external-catalog-startup-info', '@colijnit/articleapi/build/model/catalog-definition.bo', '@colijnit/articleapi/build/model/external-source.bo', '@colijnit/articleapi/build/model/article-full-object', '@colijnit/configuratorapi/build/model/article-category', '@colijnit/articleapi/build/model/article-flat.bo', '@colijnit/mainapi/build/enum/internal-param.enum', '@colijnit/ioneconnector/build/utils/string-utils', '@colijnit/configuratorapi/build/utils/image-utils', '@angular/common/http', 'axios', 'textdiff-patch', 'three', '@tweenjs/tween.js', 'polygon-tools', 'three-gpu-pathtracer', 'three-mesh-bvh/src/workers/ParallelMeshBVHWorker.js', 'three/examples/jsm/geometries/TextGeometry', 'three/examples/jsm/loaders/FontLoader', 'three/examples/jsm/webxr/XRControllerModelFactory', '@colijnit/configuratorapi/build/enum/hdeco-positioning.enum', 'three/examples/jsm/postprocessing/OutlinePass', 'three/examples/jsm/postprocessing/EffectComposer', 'three/examples/jsm/postprocessing/RenderPass', 'three/examples/jsm/postprocessing/ShaderPass', 'three/examples/jsm/shaders/FXAAShader', 'three/examples/jsm/postprocessing/OutputPass', 'md5', 'three/examples/jsm/libs/lil-gui.module.min', 'n8ao', 'three/examples/jsm/postprocessing/TAARenderPass', '@angular/platform-browser', 'ngx-device-detector', '@angular/material/icon', '@angular/animations', '@angular/common', '@angular/material/dialog', 'three/examples/jsm/loaders/RGBELoader', '@colijnit/configuratorapi/build/enum/hdeco-placement.enum', 'rxjs/internal/observable/fromEvent', 'rxjs/operators', 'rxjs/internal/observable/of', 'three/examples/jsm/utils/BufferGeometryUtils.js', 'three/examples/jsm/loaders/OBJLoader', 'three/examples/jsm/loaders/MTLLoader', 'three/examples/jsm/loaders/GLTFLoader', 'three/examples/jsm/exporters/GLTFExporter', 'three/examples/jsm/loaders/DRACOLoader', 'three/examples/jsm/loaders/KTX2Loader', 'three/examples/jsm/exporters/USDZExporter', '@angular/material/list', '@angular/material/core', '@colijnit/configuratorapi/build/enum/deco-node-type.enum', 'jszip', '@colijnit/configuratorapi/build/enum/deco-node-kind.enum', '@angular/material/checkbox', '@angular/material/button', '@angular/forms', 'three/examples/jsm/utils/BufferGeometryUtils', 'three-mesh-bvh', 'three/src/constants', '@colijnit/corecomponents', '@angular/material/form-field', '@angular/material/select', '@angular/material/tooltip', '@colijnit/corecomponents_v12', '@angular/material/slider', '@angular/material/input', 'dat.gui', '@migenius/realityserver-client', '@angular/material/grid-list', '@angular/material/progress-spinner', '@angular/flex-layout/flex', '@angular/material/progress-bar', 'three/examples/jsm/geometries/DecalGeometry', 'fabric', '@angular/material/button-toggle', '@angular/material/snack-bar', '@angular/material/slide-toggle', '@angular/material/divider', 'browser-image-compression', '@angular/material/tabs', '@angular/flex-layout/extended', 'ngx-color/chrome', '@angular/router', 'delaunator', 'three/examples/jsm/helpers/VertexNormalsHelper', '@angular/cdk/portal', 'file-saver', 'ng2-pdf-viewer', 'html2canvas', 'three/examples/jsm/controls/OrbitControls', 'three/examples/jsm/loaders/FBXLoader', 'three/examples/jsm/loaders/TDSLoader', 'three/examples/jsm/loaders/STLLoader', '@angular/material/radio', '@angular/material/toolbar', '@angular/material/menu', '@angular/material/card', '@angular/material/sidenav', '@angular/material/badge', '@colijnit/articleapi/build/model/external-catalog-startup-info-request', '@colijnit/catalog', 'ngx-lightbox', '@angular/flex-layout', '@angular/cdk/drag-drop', 'jspdf', 'jspdf-autotable'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.colijnit = global.colijnit || {}, global.colijnit.homedecorator = {}), global.ng.core, global.rxjs, global.nodeType_enum, global.configuratorStatisticsEnvironment, global.options, global.dataServiceResponseData, global.frozenArticle, global.selection, global.answerPrice, global.article, global.decoNode, global.skipButtonInfo, global.configuratorapi, global.mainapi, global.articles, global.articleText_bo, global.businessObjectFactory, global.imageUtils, global.externalCatalogStartupInfo, global.catalogDefinition_bo, global.externalSource_bo, global.articleFullObject, global.articleCategory, global.articleFlat_bo, global.internalParam_enum, global.stringUtils, global.imageUtils$1, global.ng.common.http, global.axios, global.applyPatch, global.THREE, global.TWEEN, global.PolygonTools, global.threeGpuPathtracer, global.ParallelMeshBVHWorker_js, global.TextGeometry, global.FontLoader, global.XRControllerModelFactory, global.hdecoPositioning_enum, global.OutlinePass, global.EffectComposer, global.RenderPass, global.ShaderPass, global.FXAAShader, global.OutputPass, global.md5, global.GUI, global.n8ao, global.TAARenderPass, global.ng.platformBrowser, global.i2$1, global.ng.material.icon, global.ng.animations, global.ng.common, global.ng.material.dialog, global.RGBELoader, global.hdecoPlacement_enum, global.rxjs["internal/observable/fromEvent"], global.rxjs.operators, global.rxjs["internal/observable/of"], global.BufferGeometryUtils, global.OBJLoader, global.MTLLoader, global.GLTFLoader, global.GLTFExporter, global.DRACOLoader, global.KTX2Loader, global.USDZExporter, global.ng.material.list, global.ng.material.core, global.decoNodeType_enum, global.JSZip, global.decoNodeKind_enum, global.ng.material.checkbox, global.ng.material.button, global.ng.forms, global.BufferGeometryUtils$1, global.threeMeshBvh, global.constants, global.i4, global.ng.material.formField, global.ng.material.select, global.ng.material.tooltip, global.i4$1, global.ng.material.slider, global.ng.material.input, global.dat, global.realityserverClient, global.ng.material.gridList, global.ng.material.progressSpinner, global.ng.flexLayout.flex, global.ng.material.progressBar, global.DecalGeometry, global.fabric, global.ng.material.buttonToggle, global.ng.material.snackBar, global.ng.material.slideToggle, global.ng.material.divider, global.imageCompression, global.ng.material.tabs, global.ng.flexLayout.extended, global.i1$3, global.ng.router, global.Delaunator, global.VertexNormalsHelper, global.ng.cdk.portal, global.fileSaver, global.i6$2, global.html2canvas, global.OrbitControls, global.FBXLoader, global.TDSLoader, global.STLLoader, global.ng.material.radio, global.ng.material.toolbar, global.ng.material.menu, global.ng.material.card, global.ng.material.sidenav, global.ng.material.badge, global.externalCatalogStartupInfoRequest, global.i7$3, global.i1$5, global.ng.flexLayout, global.ng.cdk.dragDrop, global.jspdf, global.autoTable));
|
|
5
|
+
})(this, (function (exports, i0, rxjs, nodeType_enum, configuratorStatisticsEnvironment, options, dataServiceResponseData, frozenArticle, selection, answerPrice, article, decoNode, skipButtonInfo, configuratorapi, mainapi, articles, articleText_bo, businessObjectFactory, imageUtils, externalCatalogStartupInfo, catalogDefinition_bo, externalSource_bo, articleFullObject, articleCategory, articleFlat_bo, internalParam_enum, stringUtils, imageUtils$1, i2, axios, applyPatch, THREE, TWEEN, PolygonTools, threeGpuPathtracer, ParallelMeshBVHWorker_js, TextGeometry, FontLoader, XRControllerModelFactory, hdecoPositioning_enum, OutlinePass, EffectComposer, RenderPass, ShaderPass, FXAAShader, OutputPass, md5, GUI, n8ao, TAARenderPass, i1, i2$1, i5$1, animations, i5, i1$1, RGBELoader, hdecoPlacement_enum, fromEvent, operators, of, BufferGeometryUtils, OBJLoader, MTLLoader, GLTFLoader, GLTFExporter, DRACOLoader, KTX2Loader, USDZExporter, i2$2, i3, decoNodeType_enum, JSZip, decoNodeKind_enum, i1$2, i3$1, i8, BufferGeometryUtils$1, threeMeshBvh, constants, i4, i7, i9, i10, i4$1, i7$1, i19, dat, realityserverClient, i3$2, i15, i3$3, i2$3, DecalGeometry, fabric, i7$2, i2$4, i10$1, i6, imageCompression, i1$4, i6$1, i1$3, i5$2, Delaunator, VertexNormalsHelper, i28, fileSaver, i6$2, html2canvas, OrbitControls, FBXLoader, TDSLoader, STLLoader, i9$1, i19$1, i22, i23, i26, i30, externalCatalogStartupInfoRequest, i7$3, i1$5, flexLayout, i10$2, jspdf, autoTable) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
var i28__namespace = /*#__PURE__*/_interopNamespace(i28);
|
|
72
72
|
var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
|
|
73
73
|
var html2canvas__default = /*#__PURE__*/_interopDefaultLegacy(html2canvas);
|
|
74
|
-
var
|
|
74
|
+
var i9__namespace$1 = /*#__PURE__*/_interopNamespace(i9$1);
|
|
75
75
|
var i19__namespace$1 = /*#__PURE__*/_interopNamespace(i19$1);
|
|
76
76
|
var i22__namespace = /*#__PURE__*/_interopNamespace(i22);
|
|
77
77
|
var i23__namespace = /*#__PURE__*/_interopNamespace(i23);
|
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
var i7__namespace$3 = /*#__PURE__*/_interopNamespace(i7$3);
|
|
81
81
|
var i1__namespace$5 = /*#__PURE__*/_interopNamespace(i1$5);
|
|
82
82
|
var i10__namespace$2 = /*#__PURE__*/_interopNamespace(i10$2);
|
|
83
|
+
var autoTable__default = /*#__PURE__*/_interopDefaultLegacy(autoTable);
|
|
83
84
|
|
|
84
85
|
/******************************************************************************
|
|
85
86
|
Copyright (c) Microsoft Corporation.
|
|
@@ -1226,12 +1227,10 @@
|
|
|
1226
1227
|
};
|
|
1227
1228
|
HomedecoratorConnectorAdapterService.prototype.store3DModelCDN = function (filename, fileContents) {
|
|
1228
1229
|
return __awaiter$1m(this, void 0, void 0, function () {
|
|
1229
|
-
var
|
|
1230
|
+
var response;
|
|
1230
1231
|
return __generator(this, function (_a) {
|
|
1231
1232
|
switch (_a.label) {
|
|
1232
|
-
case 0:
|
|
1233
|
-
int8Array = new Int8Array(fileContents);
|
|
1234
|
-
return [4 /*yield*/, this.mainApi.uploadModelToCDN(filename, int8Array)];
|
|
1233
|
+
case 0: return [4 /*yield*/, this.mainApi.uploadModelToCDN(filename, fileContents)];
|
|
1235
1234
|
case 1:
|
|
1236
1235
|
response = _a.sent();
|
|
1237
1236
|
if (response && response.validationResult && response.validationResult.success) {
|
|
@@ -1250,7 +1249,7 @@
|
|
|
1250
1249
|
var response;
|
|
1251
1250
|
return __generator(this, function (_a) {
|
|
1252
1251
|
switch (_a.label) {
|
|
1253
|
-
case 0: return [4 /*yield*/, this.
|
|
1252
|
+
case 0: return [4 /*yield*/, this.articleApi.getCatalogDefinitions().catch(function (e) {
|
|
1254
1253
|
return new dataServiceResponseData.DataServiceResponseData();
|
|
1255
1254
|
})];
|
|
1256
1255
|
case 1:
|
|
@@ -1275,7 +1274,7 @@
|
|
|
1275
1274
|
if (!externalSourceId) {
|
|
1276
1275
|
return [2 /*return*/, null];
|
|
1277
1276
|
}
|
|
1278
|
-
return [4 /*yield*/, this.
|
|
1277
|
+
return [4 /*yield*/, this.articleApi.getExternalSource(externalSourceId)];
|
|
1279
1278
|
case 1:
|
|
1280
1279
|
response = _a.sent();
|
|
1281
1280
|
if (response && response.validationResult && response.validationResult.success) {
|
|
@@ -1512,6 +1511,7 @@
|
|
|
1512
1511
|
this.useRenderWebsocket = false;
|
|
1513
1512
|
this.productRenderSceneAssetId = 'scene_studio_eevee';
|
|
1514
1513
|
this.pathTracer = false;
|
|
1514
|
+
this.ssrEnabled = false;
|
|
1515
1515
|
this.maxRenderSamples = 100;
|
|
1516
1516
|
}
|
|
1517
1517
|
return HomedecoratorSettingsOptions;
|
|
@@ -2556,10 +2556,13 @@
|
|
|
2556
2556
|
var article;
|
|
2557
2557
|
return __generator(this, function (_a) {
|
|
2558
2558
|
switch (_a.label) {
|
|
2559
|
-
case 0:
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2559
|
+
case 0:
|
|
2560
|
+
this.selections = [];
|
|
2561
|
+
this._decoNodes = [];
|
|
2562
|
+
return [4 /*yield*/, this._connector.getArticle(sku, branch)
|
|
2563
|
+
.catch(function (e) {
|
|
2564
|
+
return Promise.reject(e);
|
|
2565
|
+
})];
|
|
2563
2566
|
case 1:
|
|
2564
2567
|
article = _a.sent();
|
|
2565
2568
|
this.articleReceived.next(article);
|
|
@@ -7218,7 +7221,6 @@
|
|
|
7218
7221
|
this._hideOutlineTimeout = 10000;
|
|
7219
7222
|
this._animationDuration = 5000;
|
|
7220
7223
|
this._outlinePassAsError = false;
|
|
7221
|
-
this._useMSAA = false;
|
|
7222
7224
|
this._initializing = false;
|
|
7223
7225
|
this._subs = [];
|
|
7224
7226
|
this.needsRender = false;
|
|
@@ -7241,16 +7243,18 @@
|
|
|
7241
7243
|
this._composer = new EffectComposer.EffectComposer(this._renderer, this._renderTarget);
|
|
7242
7244
|
this._composer.setPixelRatio(window.devicePixelRatio);
|
|
7243
7245
|
var renderPass = new RenderPass.RenderPass(this._scene, this._camera);
|
|
7244
|
-
this.
|
|
7246
|
+
this._outputPass = new OutputPass.OutputPass();
|
|
7245
7247
|
this._outlinePass = new OutlinePass.OutlinePass(new THREE.Vector2(width, height), this._scene, this._camera);
|
|
7246
|
-
this._composer.addPass(this._outlinePass);
|
|
7247
7248
|
this._fxaaPass = new ShaderPass.ShaderPass(FXAAShader.FXAAShader);
|
|
7248
7249
|
this._fxaaPass.material.uniforms['resolution'].value.set(1 / width, 1 / height);
|
|
7249
|
-
this._composer.addPass(this._fxaaPass);
|
|
7250
7250
|
// needed for the sRGBEncoding to work
|
|
7251
7251
|
// https://stackoverflow.com/questions/72936071/srgbencoding-in-not-working-in-three-effectcomposer
|
|
7252
|
-
|
|
7253
|
-
this._composer.addPass(
|
|
7252
|
+
// const gammaCorrectionPass = new ShaderPass(GammaCorrectionShader);
|
|
7253
|
+
this._composer.addPass(renderPass);
|
|
7254
|
+
this._composer.addPass(this._outlinePass);
|
|
7255
|
+
this._composer.addPass(this._fxaaPass);
|
|
7256
|
+
// this._composer.addPass(gammaCorrectionPass);
|
|
7257
|
+
this._composer.addPass(this._outputPass);
|
|
7254
7258
|
this._setSelectionGlowSettings();
|
|
7255
7259
|
this._composer.setSize(width, height);
|
|
7256
7260
|
};
|
|
@@ -8861,6 +8865,23 @@
|
|
|
8861
8865
|
ArService.prototype.endSessionEvent = function () {
|
|
8862
8866
|
this._session.end();
|
|
8863
8867
|
};
|
|
8868
|
+
ArService.prototype.arIOSSupported = function () {
|
|
8869
|
+
return __awaiter$13(this, void 0, void 0, function () {
|
|
8870
|
+
var isIOS, anchor;
|
|
8871
|
+
return __generator(this, function (_a) {
|
|
8872
|
+
isIOS = /iPad|iPhone|iPod/.test(navigator.platform) ||
|
|
8873
|
+
(navigator.userAgent.includes('Mac') && 'ontouchend' in document);
|
|
8874
|
+
if (isIOS) {
|
|
8875
|
+
anchor = document.createElement('a');
|
|
8876
|
+
return [2 /*return*/, anchor.relList.supports('ar')];
|
|
8877
|
+
}
|
|
8878
|
+
else {
|
|
8879
|
+
return [2 /*return*/, false];
|
|
8880
|
+
}
|
|
8881
|
+
return [2 /*return*/];
|
|
8882
|
+
});
|
|
8883
|
+
});
|
|
8884
|
+
};
|
|
8864
8885
|
ArService.prototype.arSupported = function () {
|
|
8865
8886
|
return __awaiter$13(this, void 0, void 0, function () {
|
|
8866
8887
|
return __generator(this, function (_a) {
|
|
@@ -9717,25 +9738,6 @@
|
|
|
9717
9738
|
function PostProcessingService(_configurationService) {
|
|
9718
9739
|
var _this = this;
|
|
9719
9740
|
this._configurationService = _configurationService;
|
|
9720
|
-
this._subs = [];
|
|
9721
|
-
this._subs.push(this._configurationService.onChange.subscribe(function (changed) {
|
|
9722
|
-
if (ConfigurationKey.ShowPostProcessingSettings in changed) {
|
|
9723
|
-
_this._showHideGui(changed[ConfigurationKey.ShowPostProcessingSettings]);
|
|
9724
|
-
}
|
|
9725
|
-
}));
|
|
9726
|
-
}
|
|
9727
|
-
PostProcessingService.prototype.ngOnDestroy = function () {
|
|
9728
|
-
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
9729
|
-
};
|
|
9730
|
-
PostProcessingService.prototype.init = function (renderer, scene, camera, width, height) {
|
|
9731
|
-
this._renderer = renderer;
|
|
9732
|
-
this._scene = scene;
|
|
9733
|
-
this._camera = camera;
|
|
9734
|
-
this._composer = new EffectComposer.EffectComposer(renderer);
|
|
9735
|
-
this._n8aoPass = new n8ao.N8AOPass(scene, camera, width, height);
|
|
9736
|
-
var smaaPass = new SMAAPass.SMAAPass(width, height);
|
|
9737
|
-
this._composer.addPass(this._n8aoPass);
|
|
9738
|
-
this._composer.addPass(smaaPass);
|
|
9739
9741
|
this._effectController = {
|
|
9740
9742
|
aoSamples: 32.0,
|
|
9741
9743
|
denoiseSamples: 8.0,
|
|
@@ -9753,7 +9755,51 @@
|
|
|
9753
9755
|
stencil: true,
|
|
9754
9756
|
accumulate: false
|
|
9755
9757
|
};
|
|
9758
|
+
this._subs = [];
|
|
9759
|
+
this._subs.push(this._configurationService.onChange.subscribe(function (changed) {
|
|
9760
|
+
if (ConfigurationKey.ShowPostProcessingSettings in changed) {
|
|
9761
|
+
_this._showHideGui(changed[ConfigurationKey.ShowPostProcessingSettings]);
|
|
9762
|
+
}
|
|
9763
|
+
}));
|
|
9764
|
+
}
|
|
9765
|
+
PostProcessingService.prototype.ngOnDestroy = function () {
|
|
9766
|
+
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
9767
|
+
};
|
|
9768
|
+
PostProcessingService.prototype.init = function (renderer, scene, camera, width, height) {
|
|
9769
|
+
this._renderer = renderer;
|
|
9770
|
+
this._scene = scene;
|
|
9771
|
+
this._camera = camera;
|
|
9772
|
+
this._renderTarget = new THREE.WebGLRenderTarget(width, height, {
|
|
9773
|
+
minFilter: THREE.NearestFilter,
|
|
9774
|
+
magFilter: THREE.NearestFilter,
|
|
9775
|
+
format: THREE.RGBAFormat,
|
|
9776
|
+
colorSpace: THREE.SRGBColorSpace
|
|
9777
|
+
});
|
|
9778
|
+
this._renderTarget.samples = 4;
|
|
9779
|
+
this._renderTarget.depthTexture = new THREE.DepthTexture(width, height, THREE.UnsignedIntType);
|
|
9780
|
+
this._renderTarget.depthTexture.format = THREE.DepthFormat;
|
|
9781
|
+
this._composer = new EffectComposer.EffectComposer(this._renderer, this._renderTarget);
|
|
9782
|
+
this._n8aoPass = new n8ao.N8AOPass(scene, camera, width, height);
|
|
9783
|
+
this._n8aoPass.configuration.gammaCorrection = false;
|
|
9784
|
+
this._n8aoPass.debugMode = true;
|
|
9785
|
+
// const smaaPass = new SMAAPass(width, height);
|
|
9786
|
+
// this._composer.addPass(smaaPass);
|
|
9787
|
+
// const fxaaPass = new ShaderPass(FXAAShader);
|
|
9788
|
+
// const pixelRatio = this._renderer.getPixelRatio();
|
|
9789
|
+
// fxaaPass.material.uniforms[ 'resolution' ].value.x = 1 / (width * pixelRatio);
|
|
9790
|
+
// fxaaPass.material.uniforms[ 'resolution' ].value.y = 1 / (height * pixelRatio);
|
|
9791
|
+
this._outputPass = new OutputPass.OutputPass();
|
|
9792
|
+
this._taaRenderPass = new TAARenderPass.TAARenderPass(this._scene, this._camera, 0x000000, 0);
|
|
9793
|
+
this._taaRenderPass.unbiased = false;
|
|
9794
|
+
this._taaRenderPass.sampleLevel = 4;
|
|
9795
|
+
this._renderPass = new RenderPass.RenderPass(this._scene, this._camera);
|
|
9796
|
+
// this._renderPass.enabled = false;
|
|
9797
|
+
this._composer.addPass(this._renderPass);
|
|
9798
|
+
this._composer.addPass(this._taaRenderPass);
|
|
9799
|
+
this._composer.addPass(this._n8aoPass);
|
|
9800
|
+
this._composer.addPass(this._outputPass);
|
|
9756
9801
|
this._createGui();
|
|
9802
|
+
this._createGuiTaaPass();
|
|
9757
9803
|
};
|
|
9758
9804
|
PostProcessingService.prototype._updatePass = function () {
|
|
9759
9805
|
this._n8aoPass.configuration.aoRadius = this._effectController.aoRadius;
|
|
@@ -9773,6 +9819,35 @@
|
|
|
9773
9819
|
this._n8aoPass.configuration.accumulate = this._effectController.accumulate;
|
|
9774
9820
|
this.render();
|
|
9775
9821
|
};
|
|
9822
|
+
PostProcessingService.prototype._createGuiTaaPass = function () {
|
|
9823
|
+
var _this = this;
|
|
9824
|
+
this._taaPassGui = new GUI__default["default"]();
|
|
9825
|
+
this._taaPassGui.hide();
|
|
9826
|
+
var param = { TAAEnabled: '1', TAASampleLevel: 0 };
|
|
9827
|
+
this._taaPassGui.add(param, 'TAAEnabled', {
|
|
9828
|
+
'Disabled': '0',
|
|
9829
|
+
'Enabled': '1'
|
|
9830
|
+
}).onFinishChange(function () {
|
|
9831
|
+
if (_this._taaRenderPass) {
|
|
9832
|
+
_this._taaRenderPass.enabled = (param.TAAEnabled === '1');
|
|
9833
|
+
}
|
|
9834
|
+
_this.render();
|
|
9835
|
+
});
|
|
9836
|
+
this._taaPassGui.add(param, 'TAASampleLevel', {
|
|
9837
|
+
'Level 0: 1 Sample': 0,
|
|
9838
|
+
'Level 1: 2 Samples': 1,
|
|
9839
|
+
'Level 2: 4 Samples': 2,
|
|
9840
|
+
'Level 3: 8 Samples': 3,
|
|
9841
|
+
'Level 4: 16 Samples': 4,
|
|
9842
|
+
'Level 5: 32 Samples': 5
|
|
9843
|
+
}).onFinishChange(function () {
|
|
9844
|
+
if (_this._taaRenderPass) {
|
|
9845
|
+
_this._taaRenderPass.sampleLevel = param.TAASampleLevel;
|
|
9846
|
+
}
|
|
9847
|
+
_this.render();
|
|
9848
|
+
});
|
|
9849
|
+
this._taaPassGui.open();
|
|
9850
|
+
};
|
|
9776
9851
|
PostProcessingService.prototype.setSize = function (width, height) {
|
|
9777
9852
|
this._composer.setSize(width, height);
|
|
9778
9853
|
};
|
|
@@ -9839,6 +9914,61 @@
|
|
|
9839
9914
|
}]
|
|
9840
9915
|
}], ctorParameters: function () { return [{ type: ConfigurationService }]; } });
|
|
9841
9916
|
|
|
9917
|
+
var SsrService = /** @class */ (function () {
|
|
9918
|
+
function SsrService(_settingsService) {
|
|
9919
|
+
this._settingsService = _settingsService;
|
|
9920
|
+
this._enabled = false;
|
|
9921
|
+
this._subs = [];
|
|
9922
|
+
}
|
|
9923
|
+
Object.defineProperty(SsrService.prototype, "enabled", {
|
|
9924
|
+
get: function () {
|
|
9925
|
+
return this._enabled;
|
|
9926
|
+
},
|
|
9927
|
+
set: function (value) {
|
|
9928
|
+
this._enabled = value;
|
|
9929
|
+
if (this._enabled) {
|
|
9930
|
+
this._prepareWebsocket();
|
|
9931
|
+
}
|
|
9932
|
+
},
|
|
9933
|
+
enumerable: false,
|
|
9934
|
+
configurable: true
|
|
9935
|
+
});
|
|
9936
|
+
SsrService.prototype.ngOnDestroy = function () {
|
|
9937
|
+
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
9938
|
+
};
|
|
9939
|
+
SsrService.prototype.sceneChanged = function (scene) {
|
|
9940
|
+
if (this._websocket.readyState === WebSocket.OPEN) {
|
|
9941
|
+
var sceneClone = scene.clone(true);
|
|
9942
|
+
this._websocket.send(JSON.stringify(sceneClone));
|
|
9943
|
+
}
|
|
9944
|
+
};
|
|
9945
|
+
SsrService.prototype._prepareWebsocket = function () {
|
|
9946
|
+
if (!this._settingsService.settings.newRenderParameters.websocket) {
|
|
9947
|
+
return;
|
|
9948
|
+
}
|
|
9949
|
+
var webSocketConnection = this._settingsService.settings.newRenderParameters.websocket;
|
|
9950
|
+
this._websocket = new WebSocket(webSocketConnection);
|
|
9951
|
+
// webSocket.onopen = () => {
|
|
9952
|
+
// webSocket.send(JSON.stringify(data));
|
|
9953
|
+
// };
|
|
9954
|
+
this._websocket.onmessage = function (event) {
|
|
9955
|
+
var result = JSON.parse(event.data);
|
|
9956
|
+
if (result) {
|
|
9957
|
+
console.log(result);
|
|
9958
|
+
}
|
|
9959
|
+
};
|
|
9960
|
+
};
|
|
9961
|
+
return SsrService;
|
|
9962
|
+
}());
|
|
9963
|
+
SsrService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SsrService, deps: [{ token: HomedecoratorSettingsService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
9964
|
+
SsrService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SsrService, providedIn: 'root' });
|
|
9965
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SsrService, decorators: [{
|
|
9966
|
+
type: i0.Injectable,
|
|
9967
|
+
args: [{
|
|
9968
|
+
providedIn: 'root'
|
|
9969
|
+
}]
|
|
9970
|
+
}], ctorParameters: function () { return [{ type: HomedecoratorSettingsService }]; } });
|
|
9971
|
+
|
|
9842
9972
|
var __awaiter$12 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
9843
9973
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9844
9974
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9859,7 +9989,7 @@
|
|
|
9859
9989
|
});
|
|
9860
9990
|
};
|
|
9861
9991
|
var SceneService = /** @class */ (function () {
|
|
9862
|
-
function SceneService(_cameraService, _configurationService, _xrService, _vrService, _arService, _messageBusService, _viewModeService, _outlineService, _settingsService, _postProcessing) {
|
|
9992
|
+
function SceneService(_cameraService, _configurationService, _xrService, _vrService, _arService, _messageBusService, _viewModeService, _outlineService, _settingsService, _postProcessing, _ssrService) {
|
|
9863
9993
|
var _this = this;
|
|
9864
9994
|
this._cameraService = _cameraService;
|
|
9865
9995
|
this._configurationService = _configurationService;
|
|
@@ -9871,6 +10001,7 @@
|
|
|
9871
10001
|
this._outlineService = _outlineService;
|
|
9872
10002
|
this._settingsService = _settingsService;
|
|
9873
10003
|
this._postProcessing = _postProcessing;
|
|
10004
|
+
this._ssrService = _ssrService;
|
|
9874
10005
|
this.onBeforeRender = new rxjs.Subject();
|
|
9875
10006
|
this.onAfterRender = new rxjs.Subject();
|
|
9876
10007
|
this.sceneInitialized = new rxjs.BehaviorSubject(false);
|
|
@@ -9957,6 +10088,7 @@
|
|
|
9957
10088
|
if (loaded) {
|
|
9958
10089
|
_this._initPathTracer();
|
|
9959
10090
|
_this._maxRenderSamples = _this._settingsService.settings.options.maxRenderSamples;
|
|
10091
|
+
_this._ssrService.enabled = _this._settingsService.settings.options.ssrEnabled;
|
|
9960
10092
|
}
|
|
9961
10093
|
})
|
|
9962
10094
|
// this._xrService.sessionStarted.subscribe((mode: XrMode) => {
|
|
@@ -10021,6 +10153,20 @@
|
|
|
10021
10153
|
});
|
|
10022
10154
|
this.needsRender = true;
|
|
10023
10155
|
};
|
|
10156
|
+
SceneService.prototype.createRenderWithOrthographicCamera = function () {
|
|
10157
|
+
var aspect = window.innerWidth / window.innerHeight;
|
|
10158
|
+
var frustumSize = 10;
|
|
10159
|
+
var orthographicCamera = new THREE.OrthographicCamera(frustumSize * aspect / -2, frustumSize * aspect / 2, frustumSize / 2, frustumSize / -2, 0.1, 100);
|
|
10160
|
+
orthographicCamera.position.set(0, 3, -2);
|
|
10161
|
+
orthographicCamera.lookAt(0, 0, -2);
|
|
10162
|
+
orthographicCamera.name = 'orthographiccamera';
|
|
10163
|
+
this.scene.add(orthographicCamera);
|
|
10164
|
+
this.renderer.render(this.scene, orthographicCamera);
|
|
10165
|
+
var render = this.renderer.domElement.toDataURL('image/jpeg');
|
|
10166
|
+
this.scene.getObjectByName('orthographiccamera').remove();
|
|
10167
|
+
this.renderer.render(this.scene, this._cameraService.camera);
|
|
10168
|
+
return render;
|
|
10169
|
+
};
|
|
10024
10170
|
SceneService.prototype._initScene = function () {
|
|
10025
10171
|
this.scene = new THREE.Scene();
|
|
10026
10172
|
this._setSceneBackground();
|
|
@@ -10078,13 +10224,13 @@
|
|
|
10078
10224
|
// logarithmicDepthBuffer: true*/
|
|
10079
10225
|
// });
|
|
10080
10226
|
// this.renderer = new WebGLRenderer({alpha: true, antialias: false, preserveDrawingBuffer: true, premultipliedAlpha: true});
|
|
10081
|
-
this.renderer = new THREE.WebGLRenderer({
|
|
10082
|
-
|
|
10083
|
-
|
|
10084
|
-
|
|
10085
|
-
|
|
10086
|
-
|
|
10087
|
-
});
|
|
10227
|
+
this.renderer = new THREE.WebGLRenderer( /*{
|
|
10228
|
+
precision: 'highp',
|
|
10229
|
+
powerPreference: 'high-performance',
|
|
10230
|
+
antialias: true,
|
|
10231
|
+
stencil: false,
|
|
10232
|
+
depth: false
|
|
10233
|
+
}*/);
|
|
10088
10234
|
this.renderer.outputColorSpace = THREE.SRGBColorSpace;
|
|
10089
10235
|
this.renderer.autoClear = false;
|
|
10090
10236
|
this.renderer.setPixelRatio(window.devicePixelRatio);
|
|
@@ -10150,8 +10296,8 @@
|
|
|
10150
10296
|
this.renderer.render(this.scene, this._cameraService.camera);
|
|
10151
10297
|
}
|
|
10152
10298
|
else {
|
|
10153
|
-
// this._outlineService.render();
|
|
10154
10299
|
this._postProcessing.render();
|
|
10300
|
+
this._outlineService.render();
|
|
10155
10301
|
}
|
|
10156
10302
|
// this.renderer.render(this.scene, this._cameraService.camera);
|
|
10157
10303
|
}
|
|
@@ -10201,14 +10347,14 @@
|
|
|
10201
10347
|
};
|
|
10202
10348
|
return SceneService;
|
|
10203
10349
|
}());
|
|
10204
|
-
SceneService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneService, deps: [{ token: CameraService }, { token: ConfigurationService }, { token: XrService }, { token: VrService }, { token: ArService }, { token: MessageBusService }, { token: ViewModeService }, { token: OutlineService }, { token: HomedecoratorSettingsService }, { token: PostProcessingService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
10350
|
+
SceneService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneService, deps: [{ token: CameraService }, { token: ConfigurationService }, { token: XrService }, { token: VrService }, { token: ArService }, { token: MessageBusService }, { token: ViewModeService }, { token: OutlineService }, { token: HomedecoratorSettingsService }, { token: PostProcessingService }, { token: SsrService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
10205
10351
|
SceneService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneService, providedIn: 'root' });
|
|
10206
10352
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SceneService, decorators: [{
|
|
10207
10353
|
type: i0.Injectable,
|
|
10208
10354
|
args: [{
|
|
10209
10355
|
providedIn: 'root'
|
|
10210
10356
|
}]
|
|
10211
|
-
}], ctorParameters: function () { return [{ type: CameraService }, { type: ConfigurationService }, { type: XrService }, { type: VrService }, { type: ArService }, { type: MessageBusService }, { type: ViewModeService }, { type: OutlineService }, { type: HomedecoratorSettingsService }, { type: PostProcessingService }]; } });
|
|
10357
|
+
}], ctorParameters: function () { return [{ type: CameraService }, { type: ConfigurationService }, { type: XrService }, { type: VrService }, { type: ArService }, { type: MessageBusService }, { type: ViewModeService }, { type: OutlineService }, { type: HomedecoratorSettingsService }, { type: PostProcessingService }, { type: SsrService }]; } });
|
|
10212
10358
|
|
|
10213
10359
|
var __awaiter$11 = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
10214
10360
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -14034,12 +14180,16 @@
|
|
|
14034
14180
|
model.standalone = modelInterface.standalone;
|
|
14035
14181
|
model.group = modelInterface.group;
|
|
14036
14182
|
model.navigatorType = modelInterface.navigatorType;
|
|
14037
|
-
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
|
|
14042
|
-
|
|
14183
|
+
if (Array.from(shadowMapTypesMap.entries()).find(function (key, value) { return key[1] === modelInterface.shadowMapType; })) {
|
|
14184
|
+
model.shadowMapType = modelInterface.shadowMapType ?
|
|
14185
|
+
Array.from(shadowMapTypesMap.entries()).find(function (key, value) { return key[1] === modelInterface.shadowMapType; })[0] :
|
|
14186
|
+
ShadowMapLocalType.PCFSoftShadowMap;
|
|
14187
|
+
}
|
|
14188
|
+
if (Array.from(outputEncodingMap.entries()).find(function (key, value) { return key[1] === modelInterface.outputEncoding; })) {
|
|
14189
|
+
model.outputEncoding = modelInterface.outputEncoding ?
|
|
14190
|
+
Array.from(outputEncodingMap.entries()).find(function (key, value) { return key[1] === modelInterface.outputEncoding; })[0] :
|
|
14191
|
+
OutputEncoding.SRGBColorSpace;
|
|
14192
|
+
}
|
|
14043
14193
|
model.shadowRadius = modelInterface.shadowRadius;
|
|
14044
14194
|
model.toneMappingExposure = modelInterface.toneMappingExposure ? modelInterface.toneMappingExposure : 1;
|
|
14045
14195
|
model.physicallyCorrectLights = modelInterface.physicallyCorrectLights ? modelInterface.physicallyCorrectLights : false;
|
|
@@ -14073,9 +14223,9 @@
|
|
|
14073
14223
|
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT!
|
|
14074
14224
|
/* tslint:disable */
|
|
14075
14225
|
var VersionInfo = {
|
|
14076
|
-
|
|
14077
|
-
|
|
14078
|
-
|
|
14226
|
+
application: "Homedecorator",
|
|
14227
|
+
appVersion: "255.1.2",
|
|
14228
|
+
revision: "111614"
|
|
14079
14229
|
};
|
|
14080
14230
|
/* tslint:enable */
|
|
14081
14231
|
|
|
@@ -14530,11 +14680,23 @@
|
|
|
14530
14680
|
_this.floorTexture = texture;
|
|
14531
14681
|
if (object && object instanceof THREE.Mesh) {
|
|
14532
14682
|
_this._originalFloorMaterial = object.material;
|
|
14683
|
+
_this.floorMesh = object;
|
|
14684
|
+
_this._volume = new THREE.Box3();
|
|
14685
|
+
_this._volume.setFromObject(object);
|
|
14533
14686
|
_this._originalUvs = object.geometry.attributes.uv.array;
|
|
14534
14687
|
_this._originalGeometry = object.geometry;
|
|
14535
14688
|
}
|
|
14536
14689
|
return _this;
|
|
14537
14690
|
}
|
|
14691
|
+
Object.defineProperty(FloorPlaneItem.prototype, "size", {
|
|
14692
|
+
get: function () {
|
|
14693
|
+
var size = new THREE.Vector3();
|
|
14694
|
+
this._volume.getSize(size);
|
|
14695
|
+
return size;
|
|
14696
|
+
},
|
|
14697
|
+
enumerable: false,
|
|
14698
|
+
configurable: true
|
|
14699
|
+
});
|
|
14538
14700
|
Object.defineProperty(FloorPlaneItem.prototype, "floorMaterial", {
|
|
14539
14701
|
set: function (mat) {
|
|
14540
14702
|
this.children.forEach(function (c) {
|
|
@@ -14548,6 +14710,24 @@
|
|
|
14548
14710
|
enumerable: false,
|
|
14549
14711
|
configurable: true
|
|
14550
14712
|
});
|
|
14713
|
+
Object.defineProperty(FloorPlaneItem.prototype, "floorObject", {
|
|
14714
|
+
set: function (object) {
|
|
14715
|
+
this.children.forEach(function (c) { return c.visible = false; });
|
|
14716
|
+
this._restoreObjects = this.children;
|
|
14717
|
+
this._configurableFloor = object;
|
|
14718
|
+
this.add(object);
|
|
14719
|
+
},
|
|
14720
|
+
enumerable: false,
|
|
14721
|
+
configurable: true
|
|
14722
|
+
});
|
|
14723
|
+
FloorPlaneItem.prototype.restoreFloorObject = function () {
|
|
14724
|
+
if (!this._configurableFloor) {
|
|
14725
|
+
return;
|
|
14726
|
+
}
|
|
14727
|
+
this.remove(this._configurableFloor);
|
|
14728
|
+
this._configurableFloor.children.forEach(function (child) { return child.dispose(); });
|
|
14729
|
+
this._restoreObjects.forEach(function (c) { return c.visible = true; });
|
|
14730
|
+
};
|
|
14551
14731
|
FloorPlaneItem.prototype.getTexture = function () {
|
|
14552
14732
|
return this.floorTexture;
|
|
14553
14733
|
};
|
|
@@ -14559,6 +14739,7 @@
|
|
|
14559
14739
|
};
|
|
14560
14740
|
FloorPlaneItem.prototype.removed = function () {
|
|
14561
14741
|
var _this = this;
|
|
14742
|
+
this.restoreFloorObject();
|
|
14562
14743
|
if (this._originalFloorMaterial) {
|
|
14563
14744
|
this.configurable = false;
|
|
14564
14745
|
this.metadata.ione = false;
|
|
@@ -15447,13 +15628,16 @@
|
|
|
15447
15628
|
else {
|
|
15448
15629
|
geometry = new THREE.ShapeGeometry(shape).center();
|
|
15449
15630
|
}
|
|
15631
|
+
this._sceneService.needsRender = true;
|
|
15632
|
+
// floorMaterial.metalness = 0;
|
|
15633
|
+
geometry.rotateX(Math.PI / 2);
|
|
15450
15634
|
return [4 /*yield*/, this._createFloorMaterial(color, texture)];
|
|
15451
15635
|
case 1:
|
|
15452
15636
|
floorMaterial = _a.sent();
|
|
15453
15637
|
floorMesh = new ThreeMesh(geometry, floorMaterial);
|
|
15454
15638
|
floorPlane = new FloorPlaneItem({ itemType: ItemType.FloorDecoration }, floorMesh);
|
|
15455
15639
|
floorPlane.name = 'floor-plane';
|
|
15456
|
-
floorPlane.rotation.set(Math.PI / 2, 0, 0);
|
|
15640
|
+
// floorPlane.rotation.set(Math.PI / 2, 0, 0);
|
|
15457
15641
|
floorPlane.receiveShadow = true;
|
|
15458
15642
|
floorPlane.castShadow = false;
|
|
15459
15643
|
floorCenter = corners ? this._getFloorCenter(corners) : new THREE.Vector3(0, 0, 0);
|
|
@@ -20058,6 +20242,30 @@
|
|
|
20058
20242
|
this._ktx2Loader.detectSupport(this._sceneService.renderer);
|
|
20059
20243
|
return this._ktx2Loader;
|
|
20060
20244
|
};
|
|
20245
|
+
UtilsService.prototype.downloadUSDZforARIOS = function (object) {
|
|
20246
|
+
return __awaiter$R(this, void 0, void 0, function () {
|
|
20247
|
+
var exporter, arraybuffer, blob, url, element;
|
|
20248
|
+
return __generator(this, function (_a) {
|
|
20249
|
+
switch (_a.label) {
|
|
20250
|
+
case 0:
|
|
20251
|
+
exporter = new USDZExporter.USDZExporter();
|
|
20252
|
+
return [4 /*yield*/, exporter.parseAsync(object)];
|
|
20253
|
+
case 1:
|
|
20254
|
+
arraybuffer = _a.sent();
|
|
20255
|
+
blob = new Blob([arraybuffer], { type: 'model/vnd.usdz+zip' });
|
|
20256
|
+
url = URL.createObjectURL(blob);
|
|
20257
|
+
element = document.createElement('a');
|
|
20258
|
+
element.style.display = 'none';
|
|
20259
|
+
element.href = url;
|
|
20260
|
+
document.body.appendChild(element);
|
|
20261
|
+
element.click();
|
|
20262
|
+
document.body.removeChild(element);
|
|
20263
|
+
URL.revokeObjectURL(url);
|
|
20264
|
+
return [2 /*return*/];
|
|
20265
|
+
}
|
|
20266
|
+
});
|
|
20267
|
+
});
|
|
20268
|
+
};
|
|
20061
20269
|
UtilsService.prototype._download3DModelAsGLB = function (object) {
|
|
20062
20270
|
var _this = this;
|
|
20063
20271
|
var options = {
|
|
@@ -23983,6 +24191,163 @@
|
|
|
23983
24191
|
}] }];
|
|
23984
24192
|
} });
|
|
23985
24193
|
|
|
24194
|
+
var FloorPattern;
|
|
24195
|
+
(function (FloorPattern) {
|
|
24196
|
+
FloorPattern[FloorPattern["NORMAL"] = 0] = "NORMAL";
|
|
24197
|
+
FloorPattern[FloorPattern["HERRINGBONE"] = 1] = "HERRINGBONE";
|
|
24198
|
+
FloorPattern[FloorPattern["HON60"] = 2] = "HON60";
|
|
24199
|
+
FloorPattern[FloorPattern["HON45"] = 3] = "HON45";
|
|
24200
|
+
})(FloorPattern || (FloorPattern = {}));
|
|
24201
|
+
var FloorPatternDirection;
|
|
24202
|
+
(function (FloorPatternDirection) {
|
|
24203
|
+
FloorPatternDirection[FloorPatternDirection["STANDING"] = 0] = "STANDING";
|
|
24204
|
+
FloorPatternDirection[FloorPatternDirection["LYING"] = 1] = "LYING";
|
|
24205
|
+
})(FloorPatternDirection || (FloorPatternDirection = {}));
|
|
24206
|
+
var FloorPatternService = /** @class */ (function () {
|
|
24207
|
+
function FloorPatternService() {
|
|
24208
|
+
}
|
|
24209
|
+
FloorPatternService.prototype.generatePattern = function (floorPattern, plankSize, floorSize, direction) {
|
|
24210
|
+
if (direction === void 0) { direction = FloorPatternDirection.LYING; }
|
|
24211
|
+
var floorRotation = direction === FloorPatternDirection.STANDING ? 90 : 0;
|
|
24212
|
+
var floorWidth = floorSize.x;
|
|
24213
|
+
var floorLength = floorSize.z;
|
|
24214
|
+
if (direction === FloorPatternDirection.STANDING) {
|
|
24215
|
+
floorWidth = floorSize.z;
|
|
24216
|
+
floorLength = floorSize.x;
|
|
24217
|
+
}
|
|
24218
|
+
switch (floorPattern) {
|
|
24219
|
+
case FloorPattern.NORMAL:
|
|
24220
|
+
return this._normalPattern(plankSize, floorWidth, floorLength, floorRotation);
|
|
24221
|
+
case FloorPattern.HERRINGBONE:
|
|
24222
|
+
return this._herringBone(plankSize, floorWidth, floorLength, floorRotation);
|
|
24223
|
+
case FloorPattern.HON45:
|
|
24224
|
+
return this._hon(plankSize, floorWidth, floorLength, floorRotation, 45);
|
|
24225
|
+
case FloorPattern.HON60:
|
|
24226
|
+
return this._hon(plankSize, floorWidth, floorLength, floorRotation, 60);
|
|
24227
|
+
}
|
|
24228
|
+
};
|
|
24229
|
+
FloorPatternService.prototype._rotatePatternOnZAxis = function (items, floorRotation) {
|
|
24230
|
+
if (floorRotation % 360 > 0) {
|
|
24231
|
+
items.forEach(function (item) {
|
|
24232
|
+
var radians = THREE.MathUtils.degToRad(floorRotation);
|
|
24233
|
+
var x = item.position.x;
|
|
24234
|
+
var z = item.position.z;
|
|
24235
|
+
item.position.x = x * Math.cos(radians) - z * Math.sin(radians);
|
|
24236
|
+
item.position.z = x * Math.sin(radians) + z * Math.cos(radians);
|
|
24237
|
+
});
|
|
24238
|
+
}
|
|
24239
|
+
};
|
|
24240
|
+
FloorPatternService.prototype._normalPattern = function (plankSize, floorWidth, floorLength, floorRotation) {
|
|
24241
|
+
var items = [];
|
|
24242
|
+
var stepOffsetAmount = .4;
|
|
24243
|
+
var plankWidth = plankSize.x;
|
|
24244
|
+
var plankLength = plankSize.z;
|
|
24245
|
+
var offsetSteps = plankWidth / stepOffsetAmount;
|
|
24246
|
+
var rows = Math.ceil(floorLength / plankLength);
|
|
24247
|
+
var columns = Math.ceil(floorWidth / plankWidth);
|
|
24248
|
+
var centerOffsetX = (floorWidth / 2 * -1) + (plankWidth / 2);
|
|
24249
|
+
var centerOffsetZ = (floorLength / 2 * -1) + (plankLength / 2);
|
|
24250
|
+
var currentOffsetStep = 0;
|
|
24251
|
+
for (var row = 0; row < rows; row++) {
|
|
24252
|
+
if (currentOffsetStep > offsetSteps) {
|
|
24253
|
+
currentOffsetStep = 0;
|
|
24254
|
+
}
|
|
24255
|
+
var plankPosZ = (plankLength * row);
|
|
24256
|
+
var currentOffsetAmount = stepOffsetAmount * currentOffsetStep;
|
|
24257
|
+
var planks = currentOffsetStep > 0 ? columns + 1 : columns;
|
|
24258
|
+
for (var col = 0; col < planks; col++) {
|
|
24259
|
+
var plankPosX = (plankWidth * col) - currentOffsetAmount;
|
|
24260
|
+
items.push({
|
|
24261
|
+
position: new THREE.Vector3(plankPosX + centerOffsetX, 0, plankPosZ + centerOffsetZ),
|
|
24262
|
+
rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad(floorRotation), 0),
|
|
24263
|
+
isLeft: true
|
|
24264
|
+
});
|
|
24265
|
+
}
|
|
24266
|
+
currentOffsetStep++;
|
|
24267
|
+
}
|
|
24268
|
+
this._rotatePatternOnZAxis(items, floorRotation);
|
|
24269
|
+
return items;
|
|
24270
|
+
};
|
|
24271
|
+
FloorPatternService.prototype._herringBone = function (plankSize, floorWidth, floorLength, floorRotation) {
|
|
24272
|
+
var items = [];
|
|
24273
|
+
var herringBoneAngle = 45;
|
|
24274
|
+
var sqrt2 = Math.sqrt(2);
|
|
24275
|
+
var plankWidth = plankSize.x;
|
|
24276
|
+
var plankLength = plankSize.z;
|
|
24277
|
+
var offsetPlankPosX = plankWidth * sqrt2;
|
|
24278
|
+
var offsetPlankPosZ = plankLength * sqrt2;
|
|
24279
|
+
var columns = Math.ceil(floorWidth / (plankWidth * sqrt2));
|
|
24280
|
+
var rows = Math.ceil(floorLength / (plankLength * sqrt2) +
|
|
24281
|
+
// add extra rows so that there isn't a gap
|
|
24282
|
+
offsetPlankPosX * 2);
|
|
24283
|
+
var centerOffsetX = floorWidth / 2 * -1 + offsetPlankPosX / 4 - offsetPlankPosZ / 4;
|
|
24284
|
+
var centerOffsetZ = floorLength / 2 * -1 - offsetPlankPosX / 4;
|
|
24285
|
+
for (var column = 0; column < columns; column++) {
|
|
24286
|
+
var plankPosX = offsetPlankPosX * column;
|
|
24287
|
+
for (var row = 0; row < rows; row++) {
|
|
24288
|
+
var plankPosZ = offsetPlankPosZ * row;
|
|
24289
|
+
var plankLeft = {
|
|
24290
|
+
position: new THREE.Vector3(plankPosX + centerOffsetX, 0, plankPosZ + centerOffsetZ),
|
|
24291
|
+
rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad(floorRotation + herringBoneAngle), 0),
|
|
24292
|
+
isLeft: true
|
|
24293
|
+
};
|
|
24294
|
+
var plankRight = {
|
|
24295
|
+
position: new THREE.Vector3(plankPosX + offsetPlankPosX / 2 + centerOffsetX, 0, plankPosZ + offsetPlankPosZ / 2 + centerOffsetZ),
|
|
24296
|
+
rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad(floorRotation - herringBoneAngle), 0),
|
|
24297
|
+
isLeft: false
|
|
24298
|
+
};
|
|
24299
|
+
items.push(plankLeft, plankRight);
|
|
24300
|
+
}
|
|
24301
|
+
}
|
|
24302
|
+
this._rotatePatternOnZAxis(items, floorRotation);
|
|
24303
|
+
return items;
|
|
24304
|
+
};
|
|
24305
|
+
FloorPatternService.prototype._hon = function (plankSize, floorWidth, floorLength, floorRotation, patternAngle) {
|
|
24306
|
+
var items = [];
|
|
24307
|
+
var patternAngleRad = THREE.MathUtils.degToRad(patternAngle);
|
|
24308
|
+
var plankWidth = plankSize.x;
|
|
24309
|
+
var plankLength = plankSize.z;
|
|
24310
|
+
var sin = Math.sin(patternAngleRad);
|
|
24311
|
+
var cos = Math.cos(patternAngleRad);
|
|
24312
|
+
var overlapValue = plankLength * cos;
|
|
24313
|
+
var rowExtendValue = plankWidth * cos;
|
|
24314
|
+
var offsetZ = plankLength * cos * 2;
|
|
24315
|
+
var offsetX = plankWidth * sin;
|
|
24316
|
+
var centerOffsetX = (floorWidth - offsetX) / 2 + overlapValue;
|
|
24317
|
+
var centerOffsetZ = (floorLength + rowExtendValue) / 2;
|
|
24318
|
+
var columns = Math.ceil(floorWidth / ((offsetX - overlapValue) * 2));
|
|
24319
|
+
var rows = Math.ceil((floorLength + rowExtendValue) / offsetZ);
|
|
24320
|
+
for (var column = 0; column < columns; column++) {
|
|
24321
|
+
var plankPosX = column * (offsetX - overlapValue) * 2;
|
|
24322
|
+
for (var row = 0; row < rows; row++) {
|
|
24323
|
+
var plankPosZ = row * offsetZ;
|
|
24324
|
+
var plankLeft = {
|
|
24325
|
+
position: new THREE.Vector3(plankPosX - centerOffsetX, 0, plankPosZ - centerOffsetZ),
|
|
24326
|
+
rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad((90 - patternAngle) + floorRotation), 0),
|
|
24327
|
+
isLeft: true
|
|
24328
|
+
};
|
|
24329
|
+
var plankRight = {
|
|
24330
|
+
position: new THREE.Vector3(plankPosX + offsetX - overlapValue - centerOffsetX, 0, plankPosZ - centerOffsetZ),
|
|
24331
|
+
rotation: new THREE.Vector3(0, THREE.MathUtils.degToRad((90 + patternAngle) + floorRotation), 0),
|
|
24332
|
+
isLeft: false
|
|
24333
|
+
};
|
|
24334
|
+
items.push(plankLeft, plankRight);
|
|
24335
|
+
}
|
|
24336
|
+
}
|
|
24337
|
+
this._rotatePatternOnZAxis(items, floorRotation);
|
|
24338
|
+
return items;
|
|
24339
|
+
};
|
|
24340
|
+
return FloorPatternService;
|
|
24341
|
+
}());
|
|
24342
|
+
FloorPatternService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorPatternService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
24343
|
+
FloorPatternService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorPatternService, providedIn: 'root' });
|
|
24344
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorPatternService, decorators: [{
|
|
24345
|
+
type: i0.Injectable,
|
|
24346
|
+
args: [{
|
|
24347
|
+
providedIn: 'root'
|
|
24348
|
+
}]
|
|
24349
|
+
}] });
|
|
24350
|
+
|
|
23986
24351
|
var __awaiter$H = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
23987
24352
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
23988
24353
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -24476,6 +24841,157 @@
|
|
|
24476
24841
|
}]
|
|
24477
24842
|
}], ctorParameters: function () { return [{ type: SceneService }]; } });
|
|
24478
24843
|
|
|
24844
|
+
var FloorTileIntersectionService = /** @class */ (function () {
|
|
24845
|
+
function FloorTileIntersectionService(_sceneService) {
|
|
24846
|
+
this._sceneService = _sceneService;
|
|
24847
|
+
this._debug = false;
|
|
24848
|
+
this._edgeCollisionMargin = 0.05;
|
|
24849
|
+
}
|
|
24850
|
+
FloorTileIntersectionService.prototype.toggleDebug = function () {
|
|
24851
|
+
this._debug = !this._debug;
|
|
24852
|
+
};
|
|
24853
|
+
FloorTileIntersectionService.prototype.countTiles = function (floorMesh, floorPattern, geometry) {
|
|
24854
|
+
var e_1, _a;
|
|
24855
|
+
var result = {
|
|
24856
|
+
left: 0,
|
|
24857
|
+
right: 0,
|
|
24858
|
+
edge: 0,
|
|
24859
|
+
total: 0,
|
|
24860
|
+
};
|
|
24861
|
+
console.log(floorMesh.position);
|
|
24862
|
+
var _b = this._checkIntersection2(floorMesh, floorPattern, geometry), floorHits = _b.floorHits, edgeHits = _b.edgeHits;
|
|
24863
|
+
try {
|
|
24864
|
+
for (var floorHits_1 = __values(floorHits), floorHits_1_1 = floorHits_1.next(); !floorHits_1_1.done; floorHits_1_1 = floorHits_1.next()) {
|
|
24865
|
+
var floorHit = floorHits_1_1.value;
|
|
24866
|
+
if (floorHit.isLeft) {
|
|
24867
|
+
result.left += 1;
|
|
24868
|
+
}
|
|
24869
|
+
else {
|
|
24870
|
+
result.right += 1;
|
|
24871
|
+
}
|
|
24872
|
+
}
|
|
24873
|
+
}
|
|
24874
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
24875
|
+
finally {
|
|
24876
|
+
try {
|
|
24877
|
+
if (floorHits_1_1 && !floorHits_1_1.done && (_a = floorHits_1.return)) _a.call(floorHits_1);
|
|
24878
|
+
}
|
|
24879
|
+
finally { if (e_1) throw e_1.error; }
|
|
24880
|
+
}
|
|
24881
|
+
result.edge = edgeHits.length;
|
|
24882
|
+
result.total = floorHits.length;
|
|
24883
|
+
return result;
|
|
24884
|
+
};
|
|
24885
|
+
FloorTileIntersectionService.prototype._checkIntersection2 = function (floorMesh, floorPattern, geometry) {
|
|
24886
|
+
var e_2, _a;
|
|
24887
|
+
// const edgeColliders = this._generateEdgeColliders(floorMesh.geometry);
|
|
24888
|
+
var result = {
|
|
24889
|
+
floorHits: new Array(),
|
|
24890
|
+
edgeHits: new Array()
|
|
24891
|
+
};
|
|
24892
|
+
var bvh = new threeMeshBvh.MeshBVH(geometry);
|
|
24893
|
+
var positionReference = new THREE.Object3D();
|
|
24894
|
+
try {
|
|
24895
|
+
for (var floorPattern_1 = __values(floorPattern), floorPattern_1_1 = floorPattern_1.next(); !floorPattern_1_1.done; floorPattern_1_1 = floorPattern_1.next()) {
|
|
24896
|
+
var floorItem = floorPattern_1_1.value;
|
|
24897
|
+
var pos = floorItem.position;
|
|
24898
|
+
positionReference.position.set(pos.x, pos.y, pos.z);
|
|
24899
|
+
positionReference.updateMatrixWorld();
|
|
24900
|
+
var floorWorldToBhv = new THREE.Matrix4()
|
|
24901
|
+
.copy(positionReference.matrixWorld)
|
|
24902
|
+
.invert()
|
|
24903
|
+
.multiply(floorMesh.matrixWorld);
|
|
24904
|
+
if (bvh.intersectsGeometry(floorMesh.geometry, floorWorldToBhv)) {
|
|
24905
|
+
result.floorHits.push(floorItem);
|
|
24906
|
+
// TODO: find solution for edge detection, this should work as it used the same logic as for the floor.
|
|
24907
|
+
// for (const edgeCollider of edgeColliders) {
|
|
24908
|
+
// const edgeWorldToBhv = new Matrix4()
|
|
24909
|
+
// .copy(positionReference.matrixWorld)
|
|
24910
|
+
// .invert()
|
|
24911
|
+
// .multiply(edgeCollider.matrixWorld);
|
|
24912
|
+
// if (bvh.intersectsGeometry(edgeCollider.geometry, edgeWorldToBhv)) {
|
|
24913
|
+
// result.edgeHits.push(floorItem);
|
|
24914
|
+
// }
|
|
24915
|
+
// }
|
|
24916
|
+
}
|
|
24917
|
+
}
|
|
24918
|
+
}
|
|
24919
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
24920
|
+
finally {
|
|
24921
|
+
try {
|
|
24922
|
+
if (floorPattern_1_1 && !floorPattern_1_1.done && (_a = floorPattern_1.return)) _a.call(floorPattern_1);
|
|
24923
|
+
}
|
|
24924
|
+
finally { if (e_2) throw e_2.error; }
|
|
24925
|
+
}
|
|
24926
|
+
return result;
|
|
24927
|
+
};
|
|
24928
|
+
FloorTileIntersectionService.prototype._generateEdgeColliders = function (floorGeom) {
|
|
24929
|
+
var e_3, _a;
|
|
24930
|
+
var edgeLinesGeom = new THREE.EdgesGeometry(floorGeom);
|
|
24931
|
+
var linePositions = edgeLinesGeom.getAttribute('position').array;
|
|
24932
|
+
var edges = new Array();
|
|
24933
|
+
for (var i = 0; i < linePositions.length; i += 6) {
|
|
24934
|
+
// store vector a and b (1 line pair), because we work in 2D we skip the y-axis which should be zero
|
|
24935
|
+
var vectorA = new THREE.Vector2(linePositions[i], linePositions[i + 2]);
|
|
24936
|
+
var vectorB = new THREE.Vector2(linePositions[i + 3], linePositions[i + 5]);
|
|
24937
|
+
// calculate center of line
|
|
24938
|
+
var position = new THREE.Vector2().lerpVectors(vectorA, vectorB, .5);
|
|
24939
|
+
// calculate length
|
|
24940
|
+
var length = vectorA.distanceTo(vectorB);
|
|
24941
|
+
// create normalised orientation
|
|
24942
|
+
var unitVector = new THREE.Vector2().subVectors(vectorB, vectorA).normalize();
|
|
24943
|
+
// rotation in radians
|
|
24944
|
+
var rotation = Math.atan2(unitVector.y, unitVector.x);
|
|
24945
|
+
// create edge line with volume
|
|
24946
|
+
var edgeGeom = new THREE.BoxGeometry(length, 0.1, this._edgeCollisionMargin);
|
|
24947
|
+
var edge = new THREE.Mesh(edgeGeom);
|
|
24948
|
+
// position edge
|
|
24949
|
+
edge.rotation.y = rotation * -1;
|
|
24950
|
+
edge.position.z = position.y;
|
|
24951
|
+
edge.position.x = position.x;
|
|
24952
|
+
// update bounding box value for correct collision
|
|
24953
|
+
edge.updateMatrixWorld();
|
|
24954
|
+
edge.geometry.computeBoundingBox();
|
|
24955
|
+
edge.geometry.boundingBox.applyMatrix4(edge.matrixWorld);
|
|
24956
|
+
// adds meshes to scene
|
|
24957
|
+
edges.push(edge);
|
|
24958
|
+
}
|
|
24959
|
+
if (this._debug) {
|
|
24960
|
+
var scene = this._sceneService.scene;
|
|
24961
|
+
try {
|
|
24962
|
+
for (var edges_1 = __values(edges), edges_1_1 = edges_1.next(); !edges_1_1.done; edges_1_1 = edges_1.next()) {
|
|
24963
|
+
var edge = edges_1_1.value;
|
|
24964
|
+
edge.material = this._randomColMat();
|
|
24965
|
+
scene.add(edge);
|
|
24966
|
+
}
|
|
24967
|
+
}
|
|
24968
|
+
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
24969
|
+
finally {
|
|
24970
|
+
try {
|
|
24971
|
+
if (edges_1_1 && !edges_1_1.done && (_a = edges_1.return)) _a.call(edges_1);
|
|
24972
|
+
}
|
|
24973
|
+
finally { if (e_3) throw e_3.error; }
|
|
24974
|
+
}
|
|
24975
|
+
}
|
|
24976
|
+
return edges;
|
|
24977
|
+
};
|
|
24978
|
+
FloorTileIntersectionService.prototype._randomColMat = function () {
|
|
24979
|
+
var color = new THREE.Color(Math.random(), Math.random(), Math.random());
|
|
24980
|
+
return new THREE.MeshBasicMaterial({ color: color, wireframe: false, side: THREE.DoubleSide });
|
|
24981
|
+
};
|
|
24982
|
+
FloorTileIntersectionService.prototype.ngOnDestroy = function () {
|
|
24983
|
+
};
|
|
24984
|
+
return FloorTileIntersectionService;
|
|
24985
|
+
}());
|
|
24986
|
+
FloorTileIntersectionService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorTileIntersectionService, deps: [{ token: SceneService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
24987
|
+
FloorTileIntersectionService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorTileIntersectionService, providedIn: 'root' });
|
|
24988
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: FloorTileIntersectionService, decorators: [{
|
|
24989
|
+
type: i0.Injectable,
|
|
24990
|
+
args: [{
|
|
24991
|
+
providedIn: 'root'
|
|
24992
|
+
}]
|
|
24993
|
+
}], ctorParameters: function () { return [{ type: SceneService }]; } });
|
|
24994
|
+
|
|
24479
24995
|
var __awaiter$G = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
24480
24996
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
24481
24997
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -24498,7 +25014,7 @@
|
|
|
24498
25014
|
var defaultPosition$1 = new THREE.Vector3(4, 0, 1);
|
|
24499
25015
|
var defaultRotation$1 = new THREE.Euler(0, Math.PI, 0);
|
|
24500
25016
|
var BuildFurnitureService = /** @class */ (function () {
|
|
24501
|
-
function BuildFurnitureService(_dialog, _iOne, _threedSelectorService, _collisionManager, _messageBus, _dictionaryService, _hudService, _sceneService, _cameraService, _sceneEventService, _appEventService, _presetService, _itemService, _elementService, _permanentStoreService, _googleTagManager, _settingsService, _utilsService, _variationService, _appStateService, _errorService, _itemGroupService, _variationCacheService, _resizeService, _viewModeService, _floorService) {
|
|
25017
|
+
function BuildFurnitureService(_dialog, _iOne, _threedSelectorService, _collisionManager, _messageBus, _dictionaryService, _hudService, _sceneService, _cameraService, _sceneEventService, _appEventService, _presetService, _itemService, _elementService, _permanentStoreService, _googleTagManager, _settingsService, _utilsService, _variationService, _appStateService, _errorService, _itemGroupService, _variationCacheService, _resizeService, _viewModeService, _floorService, _floorPatternService, _floorTileIntersectionService) {
|
|
24502
25018
|
var _this = this;
|
|
24503
25019
|
this._dialog = _dialog;
|
|
24504
25020
|
this._iOne = _iOne;
|
|
@@ -24526,6 +25042,8 @@
|
|
|
24526
25042
|
this._resizeService = _resizeService;
|
|
24527
25043
|
this._viewModeService = _viewModeService;
|
|
24528
25044
|
this._floorService = _floorService;
|
|
25045
|
+
this._floorPatternService = _floorPatternService;
|
|
25046
|
+
this._floorTileIntersectionService = _floorTileIntersectionService;
|
|
24529
25047
|
this.toggleSelectedElement = new rxjs.Subject();
|
|
24530
25048
|
this.configureModeChanged = new rxjs.Subject();
|
|
24531
25049
|
this.buildFinished = new rxjs.Subject();
|
|
@@ -24871,6 +25389,10 @@
|
|
|
24871
25389
|
var objectToExport = this._currentCustomFloorGroup ? this._currentCustomFloorGroup : this._itemService.items[0];
|
|
24872
25390
|
this._utilsService.showExportDialog(objectToExport);
|
|
24873
25391
|
};
|
|
25392
|
+
BuildFurnitureService.prototype.downloadUDSZforARIOS = function () {
|
|
25393
|
+
var objectToExport = this._currentCustomFloorGroup ? this._currentCustomFloorGroup : this._itemService.items[0];
|
|
25394
|
+
this._utilsService.downloadUSDZforARIOS(objectToExport);
|
|
25395
|
+
};
|
|
24874
25396
|
BuildFurnitureService.prototype.downloadScene = function () {
|
|
24875
25397
|
var assetPath = this._settingsService.settings.assetPath;
|
|
24876
25398
|
// The ground plane looks odd in renders.
|
|
@@ -24944,6 +25466,7 @@
|
|
|
24944
25466
|
}
|
|
24945
25467
|
this._answerSelected.length = 0;
|
|
24946
25468
|
this._hudService.updateSelectedItemHud();
|
|
25469
|
+
this._generateLayingPattern(item);
|
|
24947
25470
|
this.buildFinished.next(result);
|
|
24948
25471
|
if (result.resultType === ResultType.NoSelections) {
|
|
24949
25472
|
result.resultType = ResultType.ConfigurationFixed;
|
|
@@ -24956,6 +25479,126 @@
|
|
|
24956
25479
|
});
|
|
24957
25480
|
});
|
|
24958
25481
|
};
|
|
25482
|
+
BuildFurnitureService.prototype._generateLayingPattern = function (floor) {
|
|
25483
|
+
var floorPatternInfo = this._generateFloorPatternInfo(floor);
|
|
25484
|
+
floor.restoreFloorObject();
|
|
25485
|
+
var meshLeft = this.full3DObjectToUse.children.find(function (m) { return m.name === floorPatternInfo.meshIdLeft; });
|
|
25486
|
+
this._normalizeMesh(meshLeft);
|
|
25487
|
+
var meshRight = null;
|
|
25488
|
+
if (floorPatternInfo.meshIdRight !== null) {
|
|
25489
|
+
meshRight = this.full3DObjectToUse.children.find(function (m) { return m.name === floorPatternInfo.meshIdRight; });
|
|
25490
|
+
this._normalizeMesh(meshRight);
|
|
25491
|
+
}
|
|
25492
|
+
var floorSize = floor.size;
|
|
25493
|
+
var plankSize = new THREE.Vector3();
|
|
25494
|
+
meshLeft.geometry.boundingBox.getSize(plankSize);
|
|
25495
|
+
var items = this._floorPatternService.generatePattern(floorPatternInfo.floorPattern, plankSize, floorSize, floorPatternInfo.floorPatternDirection);
|
|
25496
|
+
var itemAmount = (meshRight === null) ? items.length : items.length / 2;
|
|
25497
|
+
var material = floor.getMaterial();
|
|
25498
|
+
var planksLeft = new THREE.InstancedMesh(meshLeft.geometry, material, itemAmount);
|
|
25499
|
+
var planksRight;
|
|
25500
|
+
if (meshRight) {
|
|
25501
|
+
planksRight = new THREE.InstancedMesh(meshRight.geometry, material, itemAmount);
|
|
25502
|
+
}
|
|
25503
|
+
// assign transform to each item in instanced mesh
|
|
25504
|
+
var dummy = new THREE.Object3D();
|
|
25505
|
+
var matrixIndex = 0;
|
|
25506
|
+
for (var i = 0; i < items.length; i++) {
|
|
25507
|
+
var item = items[i];
|
|
25508
|
+
var targetPlankMesh = (item.isLeft) ? planksLeft : planksRight;
|
|
25509
|
+
var position = item.position;
|
|
25510
|
+
var rotation = item.rotation;
|
|
25511
|
+
dummy.position.set(position.x, position.y, position.z);
|
|
25512
|
+
dummy.rotation.set(rotation.x, rotation.y, rotation.z);
|
|
25513
|
+
dummy.updateMatrix();
|
|
25514
|
+
targetPlankMesh.setMatrixAt(matrixIndex, dummy.matrix);
|
|
25515
|
+
if (planksRight) {
|
|
25516
|
+
if (i !== 0 && (i % 2 !== 0)) {
|
|
25517
|
+
matrixIndex++;
|
|
25518
|
+
}
|
|
25519
|
+
}
|
|
25520
|
+
else {
|
|
25521
|
+
matrixIndex++;
|
|
25522
|
+
}
|
|
25523
|
+
}
|
|
25524
|
+
var customFloorWrapper = new THREE.Object3D();
|
|
25525
|
+
customFloorWrapper.add(planksLeft);
|
|
25526
|
+
if (planksRight)
|
|
25527
|
+
customFloorWrapper.add(planksRight);
|
|
25528
|
+
floor.floorObject = customFloorWrapper;
|
|
25529
|
+
// this._floorTileIntersectionService.toggleDebug();
|
|
25530
|
+
floor.metadata.floorCountResult = this._floorTileIntersectionService.countTiles(floor.floorMesh, items, meshLeft.geometry);
|
|
25531
|
+
};
|
|
25532
|
+
BuildFurnitureService.prototype._generateFloorPatternInfo = function (item) {
|
|
25533
|
+
this._generateSelectedInMetadata(item);
|
|
25534
|
+
var info = {
|
|
25535
|
+
meshIdLeft: null,
|
|
25536
|
+
meshIdRight: null,
|
|
25537
|
+
floorPattern: FloorPattern.NORMAL,
|
|
25538
|
+
floorPatternDirection: FloorPatternDirection.LYING
|
|
25539
|
+
};
|
|
25540
|
+
var selected = item.metadata.selections;
|
|
25541
|
+
var afmeting = selected.find(function (s) { return s.question.toLowerCase() === 'plank afmeting'; });
|
|
25542
|
+
var afmetingString = afmeting.answer.toLowerCase();
|
|
25543
|
+
afmetingString = afmetingString.substr(afmetingString.lastIndexOf(' ') + 1);
|
|
25544
|
+
var legPatroonAnswer = selected.find(function (s) { return s.question.toLowerCase() === 'leg patroon'; }).answer.toLowerCase();
|
|
25545
|
+
var legPatroonString = '';
|
|
25546
|
+
switch (true) {
|
|
25547
|
+
case legPatroonAnswer.indexOf('recht') !== -1:
|
|
25548
|
+
legPatroonString = '90';
|
|
25549
|
+
info.floorPattern = FloorPattern.NORMAL;
|
|
25550
|
+
break;
|
|
25551
|
+
case legPatroonAnswer.indexOf('graat') !== -1:
|
|
25552
|
+
legPatroonString = '90';
|
|
25553
|
+
info.floorPattern = FloorPattern.HERRINGBONE;
|
|
25554
|
+
break;
|
|
25555
|
+
case legPatroonAnswer.indexOf('60') !== -1:
|
|
25556
|
+
legPatroonString = '60';
|
|
25557
|
+
info.floorPattern = FloorPattern.HON60;
|
|
25558
|
+
break;
|
|
25559
|
+
case legPatroonAnswer.indexOf('45') !== -1:
|
|
25560
|
+
legPatroonString = '45';
|
|
25561
|
+
info.floorPattern = FloorPattern.HON45;
|
|
25562
|
+
break;
|
|
25563
|
+
}
|
|
25564
|
+
info.meshIdLeft = afmetingString + "_" + legPatroonString;
|
|
25565
|
+
if (info.floorPattern === FloorPattern.HON45 || info.floorPattern === FloorPattern.HON60) {
|
|
25566
|
+
info.meshIdRight = "r_" + afmetingString + "_" + legPatroonString;
|
|
25567
|
+
}
|
|
25568
|
+
if (info.floorPattern === FloorPattern.HERRINGBONE) {
|
|
25569
|
+
info.meshIdRight = info.meshIdLeft;
|
|
25570
|
+
}
|
|
25571
|
+
var legRichtingAnswer = selected.find(function (s) { return s.question.toLowerCase() === 'leg richting'; }).answer.toLowerCase();
|
|
25572
|
+
info.floorPatternDirection = (legRichtingAnswer.indexOf('verticaal') !== -1) ? FloorPatternDirection.STANDING : FloorPatternDirection.LYING;
|
|
25573
|
+
return info;
|
|
25574
|
+
};
|
|
25575
|
+
BuildFurnitureService.prototype._generateSelectedInMetadata = function (item) {
|
|
25576
|
+
var cloneSelections = JSON.parse(JSON.stringify(this.selections));
|
|
25577
|
+
cloneSelections.forEach(function (s) {
|
|
25578
|
+
s.imageData = undefined;
|
|
25579
|
+
s.imageDataLastAnswer = undefined;
|
|
25580
|
+
if (s.addables) {
|
|
25581
|
+
s.addables.forEach(function (a) {
|
|
25582
|
+
a.imageData = undefined;
|
|
25583
|
+
});
|
|
25584
|
+
}
|
|
25585
|
+
});
|
|
25586
|
+
item.metadata.decos = Array.from(this._iOne.decoNodes);
|
|
25587
|
+
item.metadata.selections = cloneSelections;
|
|
25588
|
+
};
|
|
25589
|
+
BuildFurnitureService.prototype._normalizeMesh = function (mesh) {
|
|
25590
|
+
var meshSize = new THREE.Vector3();
|
|
25591
|
+
mesh.geometry.computeBoundingBox();
|
|
25592
|
+
mesh.geometry.boundingBox.getSize(meshSize);
|
|
25593
|
+
if (meshSize.z > meshSize.x) {
|
|
25594
|
+
mesh.geometry.rotateY(Math.PI / 2);
|
|
25595
|
+
}
|
|
25596
|
+
mesh.geometry.center();
|
|
25597
|
+
mesh.geometry.computeBoundingBox();
|
|
25598
|
+
var center = new THREE.Vector3();
|
|
25599
|
+
mesh.geometry.boundingBox.getCenter(center);
|
|
25600
|
+
mesh.position.copy(center);
|
|
25601
|
+
};
|
|
24959
25602
|
BuildFurnitureService.prototype._startToBuildFromConfigurator = function (metadata) {
|
|
24960
25603
|
return this.startToBuild(null, metadata);
|
|
24961
25604
|
};
|
|
@@ -25956,14 +26599,14 @@
|
|
|
25956
26599
|
};
|
|
25957
26600
|
return BuildFurnitureService;
|
|
25958
26601
|
}());
|
|
25959
|
-
BuildFurnitureService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BuildFurnitureService, deps: [{ token: i1__namespace$1.MatDialog }, { token: HomedecoratorConnectorService }, { token: ThreedselectorService }, { token: CollisionManagerService }, { token: MessageBusService }, { token: HomedecoratorDictionaryService }, { token: HudService }, { token: SceneService }, { token: CameraService }, { token: SceneEventService }, { token: HomedecoratorAppEventService }, { token: PresetsService }, { token: ItemService }, { token: ElementService }, { token: PermanentStoreService }, { token: GoogleTagManagerService }, { token: HomedecoratorSettingsService }, { token: UtilsService }, { token: VariationService }, { token: AppStateService }, { token: ErrorService }, { token: ItemGroupService }, { token: VariationCacheService }, { token: ResizeService }, { token: ViewModeService }, { token: FloorService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
26602
|
+
BuildFurnitureService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BuildFurnitureService, deps: [{ token: i1__namespace$1.MatDialog }, { token: HomedecoratorConnectorService }, { token: ThreedselectorService }, { token: CollisionManagerService }, { token: MessageBusService }, { token: HomedecoratorDictionaryService }, { token: HudService }, { token: SceneService }, { token: CameraService }, { token: SceneEventService }, { token: HomedecoratorAppEventService }, { token: PresetsService }, { token: ItemService }, { token: ElementService }, { token: PermanentStoreService }, { token: GoogleTagManagerService }, { token: HomedecoratorSettingsService }, { token: UtilsService }, { token: VariationService }, { token: AppStateService }, { token: ErrorService }, { token: ItemGroupService }, { token: VariationCacheService }, { token: ResizeService }, { token: ViewModeService }, { token: FloorService }, { token: FloorPatternService }, { token: FloorTileIntersectionService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
25960
26603
|
BuildFurnitureService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BuildFurnitureService, providedIn: 'root' });
|
|
25961
26604
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: BuildFurnitureService, decorators: [{
|
|
25962
26605
|
type: i0.Injectable,
|
|
25963
26606
|
args: [{
|
|
25964
26607
|
providedIn: 'root'
|
|
25965
26608
|
}]
|
|
25966
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$1.MatDialog }, { type: HomedecoratorConnectorService }, { type: ThreedselectorService }, { type: CollisionManagerService }, { type: MessageBusService }, { type: HomedecoratorDictionaryService }, { type: HudService }, { type: SceneService }, { type: CameraService }, { type: SceneEventService }, { type: HomedecoratorAppEventService }, { type: PresetsService }, { type: ItemService }, { type: ElementService }, { type: PermanentStoreService }, { type: GoogleTagManagerService }, { type: HomedecoratorSettingsService }, { type: UtilsService }, { type: VariationService }, { type: AppStateService }, { type: ErrorService }, { type: ItemGroupService }, { type: VariationCacheService }, { type: ResizeService }, { type: ViewModeService }, { type: FloorService }]; } });
|
|
26609
|
+
}], ctorParameters: function () { return [{ type: i1__namespace$1.MatDialog }, { type: HomedecoratorConnectorService }, { type: ThreedselectorService }, { type: CollisionManagerService }, { type: MessageBusService }, { type: HomedecoratorDictionaryService }, { type: HudService }, { type: SceneService }, { type: CameraService }, { type: SceneEventService }, { type: HomedecoratorAppEventService }, { type: PresetsService }, { type: ItemService }, { type: ElementService }, { type: PermanentStoreService }, { type: GoogleTagManagerService }, { type: HomedecoratorSettingsService }, { type: UtilsService }, { type: VariationService }, { type: AppStateService }, { type: ErrorService }, { type: ItemGroupService }, { type: VariationCacheService }, { type: ResizeService }, { type: ViewModeService }, { type: FloorService }, { type: FloorPatternService }, { type: FloorTileIntersectionService }]; } });
|
|
25967
26610
|
|
|
25968
26611
|
var __awaiter$F = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
25969
26612
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -29873,38 +30516,62 @@
|
|
|
29873
30516
|
NewRenderService.prototype._getNewRenderImage = function (force) {
|
|
29874
30517
|
if (force === void 0) { force = false; }
|
|
29875
30518
|
return __awaiter$x(this, void 0, void 0, function () {
|
|
29876
|
-
var
|
|
30519
|
+
var data, data;
|
|
30520
|
+
return __generator(this, function (_a) {
|
|
30521
|
+
if (this._settingsService.settings.blenderRenderService) {
|
|
30522
|
+
data = this._getDataForRender(force);
|
|
30523
|
+
this._handleAjaxBlenderRender(data);
|
|
30524
|
+
// this.messageService.emit(MessageType.ShowLoadingIndicator, {title: 'Rendering...'});
|
|
30525
|
+
// const renderInput = {
|
|
30526
|
+
// 'height': 800,
|
|
30527
|
+
// 'width': 1200,
|
|
30528
|
+
// 'sceneAssetId': this._settingsService.settings.productRenderSceneAssetId
|
|
30529
|
+
// };
|
|
30530
|
+
// await this._utilsService.prepRoomForRender(true, renderInput);
|
|
30531
|
+
}
|
|
30532
|
+
else {
|
|
30533
|
+
data = this._getDataForRender(force);
|
|
30534
|
+
if (this._settingsService.settings.options.useRenderWebsocket) {
|
|
30535
|
+
this._handleWebSocketRender(data);
|
|
30536
|
+
}
|
|
30537
|
+
else {
|
|
30538
|
+
this._handleAjaxRender(data);
|
|
30539
|
+
}
|
|
30540
|
+
}
|
|
30541
|
+
return [2 /*return*/];
|
|
30542
|
+
});
|
|
30543
|
+
});
|
|
30544
|
+
};
|
|
30545
|
+
NewRenderService.prototype._handleAjaxBlenderRender = function (data) {
|
|
30546
|
+
return __awaiter$x(this, void 0, void 0, function () {
|
|
30547
|
+
var result;
|
|
29877
30548
|
return __generator(this, function (_a) {
|
|
29878
30549
|
switch (_a.label) {
|
|
29879
|
-
case 0:
|
|
29880
|
-
|
|
29881
|
-
|
|
29882
|
-
|
|
29883
|
-
'
|
|
29884
|
-
|
|
29885
|
-
|
|
29886
|
-
|
|
29887
|
-
|
|
30550
|
+
case 0: return [4 /*yield*/, axios__default["default"]({
|
|
30551
|
+
headers: {
|
|
30552
|
+
'Content-Type': 'application/json'
|
|
30553
|
+
},
|
|
30554
|
+
method: 'POST',
|
|
30555
|
+
data: JSON.stringify(data),
|
|
30556
|
+
url: this._settingsService.settings.newRenderParameters.host + ":" + this._settingsService.settings.newRenderParameters.port + "/getBlenderRenderFromData",
|
|
30557
|
+
responseType: 'json'
|
|
30558
|
+
})];
|
|
29888
30559
|
case 1:
|
|
29889
|
-
_a.sent();
|
|
29890
|
-
|
|
29891
|
-
|
|
29892
|
-
|
|
29893
|
-
|
|
29894
|
-
this.
|
|
29895
|
-
}
|
|
29896
|
-
else {
|
|
29897
|
-
this._handleAjaxRender(data);
|
|
30560
|
+
result = _a.sent();
|
|
30561
|
+
if (result.status === 200) {
|
|
30562
|
+
// const image = `data:${result.data.fileType};base64,${result.data.image}`;
|
|
30563
|
+
// this._showPreviewImage(result.data.image);
|
|
30564
|
+
// console.log(image);
|
|
30565
|
+
this.renderImageChanged.next(result.data.image);
|
|
29898
30566
|
}
|
|
29899
|
-
|
|
29900
|
-
case 3: return [2 /*return*/];
|
|
30567
|
+
return [2 /*return*/];
|
|
29901
30568
|
}
|
|
29902
30569
|
});
|
|
29903
30570
|
});
|
|
29904
30571
|
};
|
|
29905
30572
|
NewRenderService.prototype._handleAjaxRender = function (data) {
|
|
29906
30573
|
return __awaiter$x(this, void 0, void 0, function () {
|
|
29907
|
-
var result
|
|
30574
|
+
var result;
|
|
29908
30575
|
return __generator(this, function (_a) {
|
|
29909
30576
|
switch (_a.label) {
|
|
29910
30577
|
case 0: return [4 /*yield*/, axios__default["default"]({
|
|
@@ -29919,10 +30586,10 @@
|
|
|
29919
30586
|
case 1:
|
|
29920
30587
|
result = _a.sent();
|
|
29921
30588
|
if (result.status === 200) {
|
|
29922
|
-
image =
|
|
29923
|
-
// this._showPreviewImage(image);
|
|
30589
|
+
// const image = `data:${result.data.fileType};base64,${result.data.image}`;
|
|
30590
|
+
// this._showPreviewImage(result.data.image);
|
|
29924
30591
|
// console.log(image);
|
|
29925
|
-
this.renderImageChanged.next(image);
|
|
30592
|
+
this.renderImageChanged.next(result.data.image);
|
|
29926
30593
|
}
|
|
29927
30594
|
return [2 /*return*/];
|
|
29928
30595
|
}
|
|
@@ -29982,7 +30649,7 @@
|
|
|
29982
30649
|
img.style.position = 'fixed';
|
|
29983
30650
|
img.style.top = '0';
|
|
29984
30651
|
img.style.left = '0';
|
|
29985
|
-
img.style.width = '800px';
|
|
30652
|
+
// img.style.width = '800px';
|
|
29986
30653
|
img.style.height = '600px';
|
|
29987
30654
|
img.style.zIndex = '10';
|
|
29988
30655
|
}
|
|
@@ -29990,14 +30657,17 @@
|
|
|
29990
30657
|
};
|
|
29991
30658
|
NewRenderService.prototype._getDataForRender = function (force) {
|
|
29992
30659
|
if (force === void 0) { force = false; }
|
|
30660
|
+
this._cameraService.camera.updateMatrixWorld(true);
|
|
30661
|
+
var camMatrix = Array.from(this._cameraService.camera.matrixWorld.elements);
|
|
29993
30662
|
var options = {
|
|
29994
30663
|
force: force,
|
|
29995
30664
|
width: this._settingsService.settings.newRenderParameters.imageWidth,
|
|
29996
30665
|
height: this._settingsService.settings.newRenderParameters.imageHeight,
|
|
30666
|
+
sceneAssetId: this._settingsService.settings.productRenderSceneAssetId,
|
|
29997
30667
|
max_samples: this._settingsService.settings.newRenderParameters.iterations,
|
|
29998
30668
|
cameraOptions: {
|
|
29999
30669
|
fov: this._cameraService.camera.fov,
|
|
30000
|
-
matrix:
|
|
30670
|
+
matrix: camMatrix
|
|
30001
30671
|
},
|
|
30002
30672
|
environmentOptions: {
|
|
30003
30673
|
hdri: this._settingsService.settings.newRenderParameters.hdri,
|
|
@@ -30651,7 +31321,7 @@
|
|
|
30651
31321
|
return ArGuiButtonsComponent;
|
|
30652
31322
|
}());
|
|
30653
31323
|
ArGuiButtonsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ArGuiButtonsComponent, deps: [{ token: HomedecoratorIconCacheService }, { token: ArService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
30654
|
-
ArGuiButtonsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ArGuiButtonsComponent, selector: "ar-gui-buttons", ngImport: i0__namespace, template: "<div class=\"buttons-container\">\r\n <div class=\"button-container\" xmlns=\"http://www.w3.org/1999/html\">\r\n <button mat-mini-fab class=\"button-icon back\" (click)=\"endSession()\">\r\n <co-icon class=\"icon rotated\" [iconData]=\"iconService.getIcon(icon.
|
|
31324
|
+
ArGuiButtonsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ArGuiButtonsComponent, selector: "ar-gui-buttons", ngImport: i0__namespace, template: "<div class=\"buttons-container\">\r\n <div class=\"button-container\" xmlns=\"http://www.w3.org/1999/html\">\r\n <button mat-mini-fab class=\"button-icon back\" (click)=\"endSession()\">\r\n <co-icon class=\"icon rotated\" [iconData]=\"iconService.getIcon(icon.Cross)\"></co-icon>\r\n </button>\r\n </div>\r\n\r\n <!--div class=\"button-container\" xmlns=\"http://www.w3.org/1999/html\">\r\n <button class=\"button-icon\" mat-mini-fab (click)=\"showConfigurator()\">\r\n <co-icon class=\"icon\" [iconData]=\"iconService.getIcon(icon.MagicWand)\"></co-icon>\r\n </button>\r\n </div-->\r\n</div>\r\n", styles: [".buttons-container{position:absolute;display:flex;right:15px;top:15px}.button-container{padding:20px}.button-icon{text-align:-webkit-center}.back{padding-right:3px}.icon{width:65%;height:65%;fill:#fff}.rotated{transform:rotate(90deg)}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i4__namespace$1.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }] });
|
|
30655
31325
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ArGuiButtonsComponent, decorators: [{
|
|
30656
31326
|
type: i0.Component,
|
|
30657
31327
|
args: [{
|
|
@@ -31114,12 +31784,12 @@
|
|
|
31114
31784
|
return SelectionsSummaryComponent;
|
|
31115
31785
|
}());
|
|
31116
31786
|
SelectionsSummaryComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectionsSummaryComponent, deps: [{ token: BuildFurnitureService }, { token: CustomizerService }, { token: HomedecoratorSettingsService }, { token: HomedecoratorConnectorService }, { token: HomedecoratorIconCacheService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
31117
|
-
SelectionsSummaryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SelectionsSummaryComponent, selector: "rp-selections-summary", inputs: { selections: "selections", showLabel: "showLabel", canClose: "canClose", answersTemplate: "answersTemplate", answerToShowFromSelectionText: "answerToShowFromSelectionText", customDimensions: "customDimensions" }, outputs: { closeClick: "closeClick", cancelAnswers: "cancelAnswers", selectSelection: "selectSelection" }, host: { listeners: { "document:mouseup": "handledocumentMouseUp($event)", "document:mousemove": "handleDocumentMouseDown($event)" }, properties: { "class.custom-dimensions": "this.customDimensions", "class.disable-mouse": "this.disableMouse" } }, ngImport: i0__namespace, template: "\n <header *ngIf=\"showLabel || canClose\" class=\"drawer__header\">\n <h2 *ngIf=\"showLabel\" class=\"mat-title\">{{'CONFIGURATION' | localize}}</h2>\n <button *ngIf=\"canClose\" mat-raised-button class=\"close-lite-selector\" (click)=\"closeClick.emit()\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n <div class=\"selections-content small-scrollbar\">\n <ng-container *ngFor=\"let sel of selections; let index = index\">\n <rp-selections-summary-line\n [selection]=\"sel\"\n [answersTemplate]=\"answersTemplate ? answersTemplate : undefined\"\n [answerToShowFromSelectionText]=\"answerToShowFromSelectionText\"\n [valutaSymbol]=\"valutaSymbol\"\n (summaryLineClick)=\"handleClick(sel)\"\n (customizeButtonClicked)=\"toggleElement(sel)\"\n ></rp-selections-summary-line>\n </ng-container>\n\n <div class=\"sum\" *ngIf=\"settingsService.settings.options.showAsConfigured\">\n <label [textContent]=\"'AS_CONFIGURED' | localize\"></label><span class=\"total-price\"></span>\n <div class=\"price\"> {{ iOne.totalPrice | priceDisplay: valutaSymbol }}</div>\n </div>\n </div>\n <co-slideout *ngIf=\"customizerService.showCustomizeSlideout\" [show]=\"customizerService.showCustomizeSlideout\" class=\"customizer-slideout\">\n <div class=\"header\">\n <button mat-raised-button class=\"close-answer\" (click)=\"customizerService.showCustomizeSlideout = false\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <div>\n <rp-customizer [selection]=\"selectionToCustomize\"></rp-customizer>\n </div>\n </co-slideout>\n ", isInline: true, styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host.disable-mouse{pointer-events:none}.selections-content{overflow-y:auto}.rp-selections-summary{display:inline-block;background-color:#fff;overflow-y:auto;position:relative}.rp-selections-summary ::ng-deep co-summary-line br{display:none}:host:not(.custom-dimensions){min-width:400px;max-width:600px;min-height:300px}.drawer__header{height:48px}h2{display:inline-block}button.close-lite-selector{position:absolute;right:0}div.sum{display:flex;align-items:center;height:50px;width:100%;background-color:#deecf3;box-shadow:0 0 2px #484f6040}div.sum>label{width:100%;font-size:11.5px;margin-left:12px}div.sum>div.price{font-weight:bold;font-size:18px;margin-right:3px;white-space:nowrap}co-icon{margin:0 10px}.customizer-slideout{margin-top:65px;width:400px;height:800px!important}.close-answer{position:absolute;top:0;right:0}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: SelectionsSummaryLineComponent, selector: "rp-selections-summary-line", inputs: ["selection", "valutaSymbol", "answersTemplate", "answerToShowFromSelectionText"], outputs: ["customizeButtonClicked", "summaryLineClick"] }, { type: i4__namespace.ɵbr, selector: "co-slideout", inputs: ["show", "resizable"] }, { type: CustomizerComponent, selector: "rp-customizer", inputs: ["selection"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "localize": LocalizePipe, "priceDisplay": i4__namespace.ɵn } });
|
|
31787
|
+
SelectionsSummaryComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: SelectionsSummaryComponent, selector: "rp-selections-summary", inputs: { selections: "selections", showLabel: "showLabel", canClose: "canClose", answersTemplate: "answersTemplate", answerToShowFromSelectionText: "answerToShowFromSelectionText", customDimensions: "customDimensions" }, outputs: { closeClick: "closeClick", cancelAnswers: "cancelAnswers", selectSelection: "selectSelection" }, host: { listeners: { "document:mouseup": "handledocumentMouseUp($event)", "document:mousemove": "handleDocumentMouseDown($event)" }, properties: { "class.custom-dimensions": "this.customDimensions", "class.disable-mouse": "this.disableMouse" } }, ngImport: i0__namespace, template: "\n <header *ngIf=\"showLabel || canClose\" class=\"drawer__header\">\n <h2 *ngIf=\"showLabel\" class=\"mat-title\">{{'CONFIGURATION' | localize}}</h2>\n <button *ngIf=\"canClose\" mat-raised-button class=\"close-lite-selector\" (click)=\"closeClick.emit()\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n <div class=\"selections-content small-scrollbar\" *ngIf=\"selections && selections.length > 0\">\n <ng-container *ngFor=\"let sel of selections; let index = index\">\n <rp-selections-summary-line\n [selection]=\"sel\"\n [answersTemplate]=\"answersTemplate ? answersTemplate : undefined\"\n [answerToShowFromSelectionText]=\"answerToShowFromSelectionText\"\n [valutaSymbol]=\"valutaSymbol\"\n (summaryLineClick)=\"handleClick(sel)\"\n (customizeButtonClicked)=\"toggleElement(sel)\"\n ></rp-selections-summary-line>\n </ng-container>\n\n <div class=\"sum\" *ngIf=\"settingsService.settings.options.showAsConfigured\">\n <label [textContent]=\"'AS_CONFIGURED' | localize\"></label><span class=\"total-price\"></span>\n <div class=\"price\"> {{ iOne.totalPrice | priceDisplay: valutaSymbol }}</div>\n </div>\n </div>\n <co-slideout *ngIf=\"customizerService.showCustomizeSlideout\" [show]=\"customizerService.showCustomizeSlideout\" class=\"customizer-slideout\">\n <div class=\"header\">\n <button mat-raised-button class=\"close-answer\" (click)=\"customizerService.showCustomizeSlideout = false\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <div>\n <rp-customizer [selection]=\"selectionToCustomize\"></rp-customizer>\n </div>\n </co-slideout>\n ", isInline: true, styles: [":host{display:flex;flex-direction:column;overflow:hidden}:host.disable-mouse{pointer-events:none}.selections-content{overflow-y:auto}.rp-selections-summary{display:inline-block;background-color:#fff;overflow-y:auto;position:relative}.rp-selections-summary ::ng-deep co-summary-line br{display:none}:host:not(.custom-dimensions){min-width:400px;max-width:600px;min-height:300px}.drawer__header{height:48px}h2{display:inline-block}button.close-lite-selector{position:absolute;right:0}div.sum{display:flex;align-items:center;height:50px;width:100%;background-color:#deecf3;box-shadow:0 0 2px #484f6040}div.sum>label{width:100%;font-size:11.5px;margin-left:12px}div.sum>div.price{font-weight:bold;font-size:18px;margin-right:3px;white-space:nowrap}co-icon{margin:0 10px}.customizer-slideout{margin-top:65px;width:400px;height:800px!important}.close-answer{position:absolute;top:0;right:0}\n"], components: [{ type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: SelectionsSummaryLineComponent, selector: "rp-selections-summary-line", inputs: ["selection", "valutaSymbol", "answersTemplate", "answerToShowFromSelectionText"], outputs: ["customizeButtonClicked", "summaryLineClick"] }, { type: i4__namespace.ɵbr, selector: "co-slideout", inputs: ["show", "resizable"] }, { type: CustomizerComponent, selector: "rp-customizer", inputs: ["selection"] }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "localize": LocalizePipe, "priceDisplay": i4__namespace.ɵn } });
|
|
31118
31788
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: SelectionsSummaryComponent, decorators: [{
|
|
31119
31789
|
type: i0.Component,
|
|
31120
31790
|
args: [{
|
|
31121
31791
|
selector: 'rp-selections-summary',
|
|
31122
|
-
template: "\n <header *ngIf=\"showLabel || canClose\" class=\"drawer__header\">\n <h2 *ngIf=\"showLabel\" class=\"mat-title\">{{'CONFIGURATION' | localize}}</h2>\n <button *ngIf=\"canClose\" mat-raised-button class=\"close-lite-selector\" (click)=\"closeClick.emit()\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n <div class=\"selections-content small-scrollbar\">\n <ng-container *ngFor=\"let sel of selections; let index = index\">\n <rp-selections-summary-line\n [selection]=\"sel\"\n [answersTemplate]=\"answersTemplate ? answersTemplate : undefined\"\n [answerToShowFromSelectionText]=\"answerToShowFromSelectionText\"\n [valutaSymbol]=\"valutaSymbol\"\n (summaryLineClick)=\"handleClick(sel)\"\n (customizeButtonClicked)=\"toggleElement(sel)\"\n ></rp-selections-summary-line>\n </ng-container>\n\n <div class=\"sum\" *ngIf=\"settingsService.settings.options.showAsConfigured\">\n <label [textContent]=\"'AS_CONFIGURED' | localize\"></label><span class=\"total-price\"></span>\n <div class=\"price\"> {{ iOne.totalPrice | priceDisplay: valutaSymbol }}</div>\n </div>\n </div>\n <co-slideout *ngIf=\"customizerService.showCustomizeSlideout\" [show]=\"customizerService.showCustomizeSlideout\" class=\"customizer-slideout\">\n <div class=\"header\">\n <button mat-raised-button class=\"close-answer\" (click)=\"customizerService.showCustomizeSlideout = false\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <div>\n <rp-customizer [selection]=\"selectionToCustomize\"></rp-customizer>\n </div>\n </co-slideout>\n ",
|
|
31792
|
+
template: "\n <header *ngIf=\"showLabel || canClose\" class=\"drawer__header\">\n <h2 *ngIf=\"showLabel\" class=\"mat-title\">{{'CONFIGURATION' | localize}}</h2>\n <button *ngIf=\"canClose\" mat-raised-button class=\"close-lite-selector\" (click)=\"closeClick.emit()\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </header>\n <div class=\"selections-content small-scrollbar\" *ngIf=\"selections && selections.length > 0\">\n <ng-container *ngFor=\"let sel of selections; let index = index\">\n <rp-selections-summary-line\n [selection]=\"sel\"\n [answersTemplate]=\"answersTemplate ? answersTemplate : undefined\"\n [answerToShowFromSelectionText]=\"answerToShowFromSelectionText\"\n [valutaSymbol]=\"valutaSymbol\"\n (summaryLineClick)=\"handleClick(sel)\"\n (customizeButtonClicked)=\"toggleElement(sel)\"\n ></rp-selections-summary-line>\n </ng-container>\n\n <div class=\"sum\" *ngIf=\"settingsService.settings.options.showAsConfigured\">\n <label [textContent]=\"'AS_CONFIGURED' | localize\"></label><span class=\"total-price\"></span>\n <div class=\"price\"> {{ iOne.totalPrice | priceDisplay: valutaSymbol }}</div>\n </div>\n </div>\n <co-slideout *ngIf=\"customizerService.showCustomizeSlideout\" [show]=\"customizerService.showCustomizeSlideout\" class=\"customizer-slideout\">\n <div class=\"header\">\n <button mat-raised-button class=\"close-answer\" (click)=\"customizerService.showCustomizeSlideout = false\">\n <mat-icon class=\"homedecorator-material-icons\" aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n <div>\n <rp-customizer [selection]=\"selectionToCustomize\"></rp-customizer>\n </div>\n </co-slideout>\n ",
|
|
31123
31793
|
styleUrls: ['./selections-summary.component.scss']
|
|
31124
31794
|
}]
|
|
31125
31795
|
}], ctorParameters: function () { return [{ type: BuildFurnitureService }, { type: CustomizerService }, { type: HomedecoratorSettingsService }, { type: HomedecoratorConnectorService }, { type: HomedecoratorIconCacheService }]; }, propDecorators: { selections: [{
|
|
@@ -41192,12 +41862,12 @@
|
|
|
41192
41862
|
};
|
|
41193
41863
|
ThreedselectorComponent.prototype._handleSkuSet = function (sku) {
|
|
41194
41864
|
return __awaiter$c(this, void 0, void 0, function () {
|
|
41195
|
-
var arButton, _a;
|
|
41865
|
+
var arButton, _a, arIOSButton, _b;
|
|
41196
41866
|
var _this = this;
|
|
41197
|
-
return __generator(this, function (
|
|
41198
|
-
switch (
|
|
41867
|
+
return __generator(this, function (_c) {
|
|
41868
|
+
switch (_c.label) {
|
|
41199
41869
|
case 0:
|
|
41200
|
-
if (!sku) return [3 /*break*/,
|
|
41870
|
+
if (!sku) return [3 /*break*/, 3];
|
|
41201
41871
|
this._subs.push(this._iOne.controllerInitialized.subscribe(function (initialized) { return __awaiter$c(_this, void 0, void 0, function () {
|
|
41202
41872
|
return __generator(this, function (_a) {
|
|
41203
41873
|
if (initialized) {
|
|
@@ -41216,7 +41886,7 @@
|
|
|
41216
41886
|
};
|
|
41217
41887
|
return [4 /*yield*/, this._arService.arSupported()];
|
|
41218
41888
|
case 1:
|
|
41219
|
-
arButton = (_a.show = (
|
|
41889
|
+
arButton = (_a.show = (_c.sent()) &&
|
|
41220
41890
|
this._settingsService.settings.options.showStandaloneARButton &&
|
|
41221
41891
|
this._settingsService.settings.options.arEnabled,
|
|
41222
41892
|
_a.click = function () {
|
|
@@ -41227,9 +41897,25 @@
|
|
|
41227
41897
|
}
|
|
41228
41898
|
},
|
|
41229
41899
|
_a);
|
|
41900
|
+
_b = {
|
|
41901
|
+
id: 3,
|
|
41902
|
+
elementId: 'standalone_ar_session',
|
|
41903
|
+
tooltip: 'START_AR_SESSION',
|
|
41904
|
+
order: 10,
|
|
41905
|
+
image: this._iconCacheService.getIconAsBase64(IconEnum.ArCircle),
|
|
41906
|
+
toggle: false
|
|
41907
|
+
};
|
|
41908
|
+
return [4 /*yield*/, this._arService.arIOSSupported()];
|
|
41909
|
+
case 2:
|
|
41910
|
+
arIOSButton = (_b.show = (_c.sent()) &&
|
|
41911
|
+
this._settingsService.settings.options.showStandaloneARButton &&
|
|
41912
|
+
this._settingsService.settings.options.arEnabled,
|
|
41913
|
+
_b.click = function () { return _this._buildFurnitureService.downloadUDSZforARIOS(); },
|
|
41914
|
+
_b);
|
|
41230
41915
|
this._sceneOptionsService.addSceneOptionButton(arButton);
|
|
41231
|
-
|
|
41232
|
-
|
|
41916
|
+
this._sceneOptionsService.addSceneOptionButton(arIOSButton);
|
|
41917
|
+
_c.label = 3;
|
|
41918
|
+
case 3: return [2 /*return*/];
|
|
41233
41919
|
}
|
|
41234
41920
|
});
|
|
41235
41921
|
});
|
|
@@ -41656,10 +42342,7 @@
|
|
|
41656
42342
|
// }
|
|
41657
42343
|
var len = selection.decoNode ? selection.decoNode.connectors.length : 0;
|
|
41658
42344
|
var _loop_2 = function (i) {
|
|
41659
|
-
var conObject = this_2._selectedElementObject
|
|
41660
|
-
if (!conObject && this_2._selectedElementObject.parent) {
|
|
41661
|
-
conObject = this_2._selectedElementObject.parent.getObjectByName(selection.decoNode.connectors[i].connector);
|
|
41662
|
-
}
|
|
42345
|
+
var conObject = this_2._getConnectorObject(this_2._selectedElementObject, selection.decoNode.connectors[i].connector);
|
|
41663
42346
|
if (conObject && this_2._canShowAddButton(selection.decoNode.connectors[i], conObject)) {
|
|
41664
42347
|
this_2.editAddButtons.push(new CustomButton('', function () {
|
|
41665
42348
|
_this._handleAddButtonClick(selection, selection.decoNode.connectors[i], _this._selectedElementObject);
|
|
@@ -41686,6 +42369,23 @@
|
|
|
41686
42369
|
});
|
|
41687
42370
|
}
|
|
41688
42371
|
};
|
|
42372
|
+
ThreedselectorComponent.prototype._getConnectorObject = function (obj, connector) {
|
|
42373
|
+
if (!obj) {
|
|
42374
|
+
return null;
|
|
42375
|
+
}
|
|
42376
|
+
var objFound = obj.getObjectByName(connector);
|
|
42377
|
+
if (objFound) {
|
|
42378
|
+
return objFound;
|
|
42379
|
+
}
|
|
42380
|
+
else {
|
|
42381
|
+
if (obj.parent) {
|
|
42382
|
+
return this._getConnectorObject(obj.parent, connector);
|
|
42383
|
+
}
|
|
42384
|
+
else {
|
|
42385
|
+
return null;
|
|
42386
|
+
}
|
|
42387
|
+
}
|
|
42388
|
+
};
|
|
41689
42389
|
ThreedselectorComponent.prototype._getOppositeConnectorParts = function (connector) {
|
|
41690
42390
|
var connectorPartsArr = connector.split('_');
|
|
41691
42391
|
connectorPartsArr.pop(); // remove number
|
|
@@ -43644,7 +44344,7 @@
|
|
|
43644
44344
|
});
|
|
43645
44345
|
};
|
|
43646
44346
|
var ModelPreviewComponent = /** @class */ (function () {
|
|
43647
|
-
function ModelPreviewComponent(data, settingsService, _dialogRef, _thirdPartyModelService, _messageService, _dialog, _adapterService) {
|
|
44347
|
+
function ModelPreviewComponent(data, settingsService, _dialogRef, _thirdPartyModelService, _messageService, _dialog, _adapterService, _lightPresetsService, _dictionaryService, _fontService) {
|
|
43648
44348
|
this.data = data;
|
|
43649
44349
|
this.settingsService = settingsService;
|
|
43650
44350
|
this._dialogRef = _dialogRef;
|
|
@@ -43652,8 +44352,21 @@
|
|
|
43652
44352
|
this._messageService = _messageService;
|
|
43653
44353
|
this._dialog = _dialog;
|
|
43654
44354
|
this._adapterService = _adapterService;
|
|
44355
|
+
this._lightPresetsService = _lightPresetsService;
|
|
44356
|
+
this._dictionaryService = _dictionaryService;
|
|
44357
|
+
this._fontService = _fontService;
|
|
43655
44358
|
this.unitsOfMeasurement = 'cm';
|
|
43656
44359
|
this.mathPi = Math.PI;
|
|
44360
|
+
this.showReferenceModel = true;
|
|
44361
|
+
this.floorSizeHeight = 10;
|
|
44362
|
+
this.floorSizeWidth = 10;
|
|
44363
|
+
this.gridSize = 10;
|
|
44364
|
+
this.gridDivision = 10;
|
|
44365
|
+
this.distanceStep = 1;
|
|
44366
|
+
this.stackable = false;
|
|
44367
|
+
this.heightAdjustable = false;
|
|
44368
|
+
this._measurements = [];
|
|
44369
|
+
this.font = this._fontService.hudFont;
|
|
43657
44370
|
}
|
|
43658
44371
|
ModelPreviewComponent.prototype.ngOnInit = function () {
|
|
43659
44372
|
this.initScene();
|
|
@@ -43687,44 +44400,65 @@
|
|
|
43687
44400
|
this.rendererPreview.domElement.setAttribute('id', 'threed');
|
|
43688
44401
|
this.rendererPreview.setSize(window.innerWidth / 2, window.innerHeight / 2, true);
|
|
43689
44402
|
// init camera
|
|
43690
|
-
this.cameraPreview = new THREE.PerspectiveCamera(45, 1, 0.01,
|
|
44403
|
+
this.cameraPreview = new THREE.PerspectiveCamera(45, 1, 0.01, 100000000);
|
|
43691
44404
|
this.cameraPreview.position.set(0, 2, 10);
|
|
43692
44405
|
this.cameraPreview.aspect = window.innerWidth / window.innerHeight;
|
|
43693
44406
|
this.cameraPreview.updateProjectionMatrix();
|
|
43694
44407
|
this.controls = new OrbitControls.OrbitControls(this.cameraPreview, this.rendererPreview.domElement);
|
|
43695
44408
|
this.controls.update();
|
|
43696
|
-
|
|
43697
|
-
|
|
43698
|
-
|
|
43699
|
-
|
|
43700
|
-
|
|
43701
|
-
|
|
43702
|
-
this.
|
|
43703
|
-
|
|
43704
|
-
|
|
44409
|
+
this.loadFloorPlane();
|
|
44410
|
+
this.loadReferenceModel();
|
|
44411
|
+
this.loadLights();
|
|
44412
|
+
var gridHelper = new THREE.GridHelper(this.gridSize, this.gridDivision);
|
|
44413
|
+
gridHelper.name = 'GridHelper';
|
|
44414
|
+
this.scenePreview.add(gridHelper);
|
|
44415
|
+
this._animate();
|
|
44416
|
+
};
|
|
44417
|
+
ModelPreviewComponent.prototype.loadFloorPlane = function () {
|
|
44418
|
+
var planeGeometry = new THREE.PlaneGeometry(this.floorSizeWidth, this.floorSizeHeight);
|
|
44419
|
+
var planeMaterial = new THREE.MeshBasicMaterial({ color: 0x899499, side: THREE__namespace.DoubleSide });
|
|
43705
44420
|
var plane = new THREE.Mesh(planeGeometry, planeMaterial);
|
|
43706
44421
|
plane.rotation.x = -Math.PI / 2;
|
|
43707
44422
|
plane.position.y = 0;
|
|
43708
44423
|
plane.name = 'floor_plane';
|
|
43709
44424
|
this.scenePreview.add(plane);
|
|
43710
|
-
|
|
43711
|
-
|
|
43712
|
-
|
|
43713
|
-
var
|
|
43714
|
-
|
|
43715
|
-
|
|
43716
|
-
|
|
43717
|
-
|
|
43718
|
-
|
|
43719
|
-
|
|
43720
|
-
|
|
43721
|
-
|
|
43722
|
-
|
|
43723
|
-
|
|
43724
|
-
|
|
43725
|
-
|
|
43726
|
-
|
|
43727
|
-
|
|
44425
|
+
};
|
|
44426
|
+
ModelPreviewComponent.prototype.loadLights = function () {
|
|
44427
|
+
var e_1, _a;
|
|
44428
|
+
var listOfLightPresets = this._lightPresetsService.loadedLightPresets;
|
|
44429
|
+
var lightPreset = this._lightPresetsService.activeLightPreset;
|
|
44430
|
+
try {
|
|
44431
|
+
for (var _b = __values(lightPreset.lights), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
44432
|
+
var lightProperties = _c.value;
|
|
44433
|
+
this._createLightFromProperties(lightProperties);
|
|
44434
|
+
}
|
|
44435
|
+
}
|
|
44436
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
44437
|
+
finally {
|
|
44438
|
+
try {
|
|
44439
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
44440
|
+
}
|
|
44441
|
+
finally { if (e_1) throw e_1.error; }
|
|
44442
|
+
}
|
|
44443
|
+
};
|
|
44444
|
+
ModelPreviewComponent.prototype.loadReferenceModel = function () {
|
|
44445
|
+
var _this = this;
|
|
44446
|
+
var referenceModelPath = '';
|
|
44447
|
+
var referenceModel = 'reference_pop.glb';
|
|
44448
|
+
if (this.settingsService.settings.threeDAssetPath) {
|
|
44449
|
+
referenceModelPath = this.settingsService.settings.threeDAssetPath + 'assets/';
|
|
44450
|
+
}
|
|
44451
|
+
var loader = new GLTFLoader.GLTFLoader();
|
|
44452
|
+
loader.load(referenceModelPath + referenceModel, function (gltf) { return __awaiter$4(_this, void 0, void 0, function () {
|
|
44453
|
+
return __generator(this, function (_a) {
|
|
44454
|
+
gltf.scene.position.set(3, 0, 3);
|
|
44455
|
+
gltf.scene.castShadow = true;
|
|
44456
|
+
gltf.scene.receiveShadow = true;
|
|
44457
|
+
gltf.scene.name = 'Reference_model';
|
|
44458
|
+
this.scenePreview.add(gltf.scene);
|
|
44459
|
+
return [2 /*return*/];
|
|
44460
|
+
});
|
|
44461
|
+
}); });
|
|
43728
44462
|
};
|
|
43729
44463
|
ModelPreviewComponent.prototype.loadModel = function (input) {
|
|
43730
44464
|
this.modelName = this._setModelName(input.file.file.name);
|
|
@@ -43741,6 +44475,9 @@
|
|
|
43741
44475
|
else if (fileType === '3ds') {
|
|
43742
44476
|
this._tdsLoader(input);
|
|
43743
44477
|
}
|
|
44478
|
+
else if (fileType === 'stl') {
|
|
44479
|
+
this._stlLoader(input);
|
|
44480
|
+
}
|
|
43744
44481
|
};
|
|
43745
44482
|
ModelPreviewComponent.prototype.loadHDRI = function (path) {
|
|
43746
44483
|
var _this = this;
|
|
@@ -43762,11 +44499,10 @@
|
|
|
43762
44499
|
// add timestamp
|
|
43763
44500
|
var timestamp = new Date().getTime();
|
|
43764
44501
|
var exportFileName = this._setModelName(this.glbExportName.nativeElement.value) + '_' + timestamp;
|
|
43765
|
-
var elementsToRemove = ['Reference_model', 'floor_plane'];
|
|
44502
|
+
var elementsToRemove = ['Reference_model', 'floor_plane', 'GridHelper', 'Ambient', 'Directional front-left', 'spot back (anti-sun)', 'boxHeight', 'boxWidth', 'boxDepth'];
|
|
43766
44503
|
var gltfExporter = new GLTFExporter.GLTFExporter();
|
|
43767
44504
|
var scene;
|
|
43768
44505
|
scene = this.scenePreview.clone();
|
|
43769
|
-
scene.environment.dispose();
|
|
43770
44506
|
scene.children.forEach(function (c) {
|
|
43771
44507
|
if (c instanceof THREE.Light) {
|
|
43772
44508
|
scene.remove(c);
|
|
@@ -43791,7 +44527,8 @@
|
|
|
43791
44527
|
else {
|
|
43792
44528
|
_this._downloadModel(exportFileName + ".glb", file);
|
|
43793
44529
|
}
|
|
43794
|
-
}, function () {
|
|
44530
|
+
}, function (e) {
|
|
44531
|
+
console.log(e);
|
|
43795
44532
|
}, options);
|
|
43796
44533
|
};
|
|
43797
44534
|
ModelPreviewComponent.prototype.scaleArticle = function () {
|
|
@@ -43820,9 +44557,33 @@
|
|
|
43820
44557
|
}
|
|
43821
44558
|
this._getBoundingBox(model);
|
|
43822
44559
|
};
|
|
44560
|
+
ModelPreviewComponent.prototype.moveModel = function (axis, amount) {
|
|
44561
|
+
var model = this.scenePreview.getObjectByName(this.modelName);
|
|
44562
|
+
if (axis === 'x') {
|
|
44563
|
+
model.position.x += amount;
|
|
44564
|
+
}
|
|
44565
|
+
else if (axis === 'y') {
|
|
44566
|
+
model.position.y += amount;
|
|
44567
|
+
}
|
|
44568
|
+
else if (axis === 'z') {
|
|
44569
|
+
model.position.z += amount;
|
|
44570
|
+
}
|
|
44571
|
+
this._getBoundingBox(model);
|
|
44572
|
+
};
|
|
43823
44573
|
ModelPreviewComponent.prototype.setUnit = function (event) {
|
|
43824
44574
|
this.unitsOfMeasurement = event.value;
|
|
43825
44575
|
};
|
|
44576
|
+
ModelPreviewComponent.prototype.toggleShowReferenceModel = function () {
|
|
44577
|
+
var model = this.scenePreview.getObjectByName('Reference_model');
|
|
44578
|
+
model.visible = !this.showReferenceModel;
|
|
44579
|
+
this.showReferenceModel = !this.showReferenceModel;
|
|
44580
|
+
};
|
|
44581
|
+
ModelPreviewComponent.prototype.setStackable = function (event) {
|
|
44582
|
+
this.stackable = event.value;
|
|
44583
|
+
};
|
|
44584
|
+
ModelPreviewComponent.prototype.setHeightAdjustable = function (event) {
|
|
44585
|
+
this.heightAdjustable = event.value;
|
|
44586
|
+
};
|
|
43826
44587
|
ModelPreviewComponent.prototype._animate = function () {
|
|
43827
44588
|
var _this = this;
|
|
43828
44589
|
setTimeout(function () {
|
|
@@ -43849,13 +44610,37 @@
|
|
|
43849
44610
|
};
|
|
43850
44611
|
ModelPreviewComponent.prototype._sendModelToCDN = function (fileName, blob) {
|
|
43851
44612
|
return __awaiter$4(this, void 0, void 0, function () {
|
|
44613
|
+
var reader;
|
|
43852
44614
|
var _this = this;
|
|
43853
44615
|
return __generator(this, function (_a) {
|
|
43854
|
-
|
|
43855
|
-
|
|
43856
|
-
|
|
44616
|
+
reader = new FileReader();
|
|
44617
|
+
reader.readAsDataURL(blob);
|
|
44618
|
+
reader.onloadend = function (event) { return __awaiter$4(_this, void 0, void 0, function () {
|
|
44619
|
+
var fileAsString;
|
|
44620
|
+
var _this = this;
|
|
44621
|
+
return __generator(this, function (_a) {
|
|
44622
|
+
fileAsString = FileUtils.StripMimeStringFromDataUri(event.target.result);
|
|
44623
|
+
this._adapterService.store3DModelCDN(fileName, fileAsString).then(function (filePath) {
|
|
44624
|
+
if (filePath) {
|
|
44625
|
+
_this._blobToArrayBuffer(blob).then(function (file) {
|
|
44626
|
+
var hash = fileName;
|
|
44627
|
+
var modelUrl = filePath; // Set url from the CDN
|
|
44628
|
+
var configurationData = {};
|
|
44629
|
+
var priceData = {};
|
|
44630
|
+
var metaData = _this._thirdPartyModelService.setMetadata(hash, modelUrl, configurationData);
|
|
44631
|
+
metaData.canElevate = _this.heightAdjustable;
|
|
44632
|
+
metaData.thirdPartyModel = true;
|
|
44633
|
+
// We also can set the metadata here and pas it as the last argument for parseModelToGLB.
|
|
44634
|
+
_this._thirdPartyModelService.parseModelToGLB(file, hash, modelUrl, configurationData, priceData, metaData).then(function (result) {
|
|
44635
|
+
_this._dialog.closeAll();
|
|
44636
|
+
_this._messageService.emit(MessageType.HideProductCatalog);
|
|
44637
|
+
});
|
|
44638
|
+
});
|
|
44639
|
+
}
|
|
44640
|
+
});
|
|
44641
|
+
return [2 /*return*/];
|
|
43857
44642
|
});
|
|
43858
|
-
});
|
|
44643
|
+
}); };
|
|
43859
44644
|
return [2 /*return*/];
|
|
43860
44645
|
});
|
|
43861
44646
|
});
|
|
@@ -43869,12 +44654,7 @@
|
|
|
43869
44654
|
var loader = new GLTFLoader.GLTFLoader();
|
|
43870
44655
|
loader.parse(input.file.fileContents, '', function (object) { return __awaiter$4(_this, void 0, void 0, function () {
|
|
43871
44656
|
return __generator(this, function (_a) {
|
|
43872
|
-
object.scene
|
|
43873
|
-
object.scene.position.set(0, 0, 0);
|
|
43874
|
-
object.scene.scale.set(1, 1, 1);
|
|
43875
|
-
this.scenePreview.add(object.scene);
|
|
43876
|
-
this.loadedModel = object.scene;
|
|
43877
|
-
this._getBoundingBox(object.scene);
|
|
44657
|
+
this._prepModelForScene(object.scene);
|
|
43878
44658
|
return [2 /*return*/];
|
|
43879
44659
|
});
|
|
43880
44660
|
}); }, function (error) {
|
|
@@ -43884,12 +44664,7 @@
|
|
|
43884
44664
|
ModelPreviewComponent.prototype._fbxLoader = function (input) {
|
|
43885
44665
|
var fbxLoader = new FBXLoader.FBXLoader();
|
|
43886
44666
|
var object = fbxLoader.parse(input.file.fileContents, '');
|
|
43887
|
-
|
|
43888
|
-
object.position.set(0, 0, 0);
|
|
43889
|
-
object.scale.set(1, 1, 1);
|
|
43890
|
-
this.scenePreview.add(object);
|
|
43891
|
-
this.loadedModel = object;
|
|
43892
|
-
this._getBoundingBox(object);
|
|
44667
|
+
this._prepModelForScene(object);
|
|
43893
44668
|
};
|
|
43894
44669
|
ModelPreviewComponent.prototype._objLoader = function (input) {
|
|
43895
44670
|
var objLoader = new OBJLoader.OBJLoader();
|
|
@@ -43898,26 +44673,112 @@
|
|
|
43898
44673
|
var decoder = new TextDecoder();
|
|
43899
44674
|
var str = decoder.decode(buf);
|
|
43900
44675
|
var object = objLoader.parse(str);
|
|
43901
|
-
|
|
43902
|
-
object.position.set(0, 0, 0);
|
|
43903
|
-
object.scale.set(1, 1, 1);
|
|
43904
|
-
this.scenePreview.add(object);
|
|
43905
|
-
this.loadedModel = object;
|
|
43906
|
-
this._getBoundingBox(object);
|
|
44676
|
+
this._prepModelForScene(object);
|
|
43907
44677
|
};
|
|
43908
44678
|
ModelPreviewComponent.prototype._tdsLoader = function (input) {
|
|
43909
44679
|
var tdsLoader = new TDSLoader.TDSLoader();
|
|
43910
44680
|
var object = tdsLoader.parse(input.file.fileContents, '');
|
|
44681
|
+
object.traverse(function (element) {
|
|
44682
|
+
console.log(element);
|
|
44683
|
+
});
|
|
44684
|
+
this._prepModelForScene(object);
|
|
44685
|
+
};
|
|
44686
|
+
ModelPreviewComponent.prototype._stlLoader = function (input) {
|
|
44687
|
+
var stlLoader = new STLLoader.STLLoader();
|
|
44688
|
+
var object = stlLoader.parse(input.file.fileContents);
|
|
44689
|
+
this._addFromGeometry(object);
|
|
44690
|
+
};
|
|
44691
|
+
ModelPreviewComponent.prototype._addFromGeometry = function (geometry) {
|
|
44692
|
+
var material = new THREE.MeshPhongMaterial({ transparent: true, opacity: geometry.alpha });
|
|
44693
|
+
var model = new THREE.Mesh(geometry, material);
|
|
44694
|
+
this._prepModelForScene(model);
|
|
44695
|
+
};
|
|
44696
|
+
ModelPreviewComponent.prototype._prepModelForScene = function (object) {
|
|
43911
44697
|
object.name = this.modelName;
|
|
43912
44698
|
object.position.set(0, 0, 0);
|
|
43913
44699
|
object.scale.set(1, 1, 1);
|
|
44700
|
+
// Remove lights from the children
|
|
44701
|
+
object.children.forEach(function (c) {
|
|
44702
|
+
if (c instanceof THREE.Light) {
|
|
44703
|
+
object.remove(c);
|
|
44704
|
+
}
|
|
44705
|
+
});
|
|
43914
44706
|
this.scenePreview.add(object);
|
|
43915
44707
|
this.loadedModel = object;
|
|
43916
44708
|
this._getBoundingBox(object);
|
|
43917
44709
|
};
|
|
43918
44710
|
ModelPreviewComponent.prototype._getBoundingBox = function (object) {
|
|
43919
|
-
var boundingBox = new
|
|
44711
|
+
var boundingBox = new THREE.Box3().setFromObject(object);
|
|
43920
44712
|
this.boundingBoxSize = boundingBox.getSize(new THREE.Vector3());
|
|
44713
|
+
this._setMeasurements(this.boundingBoxSize);
|
|
44714
|
+
this._showMeasurements();
|
|
44715
|
+
};
|
|
44716
|
+
ModelPreviewComponent.prototype._showMeasurements = function () {
|
|
44717
|
+
var _this = this;
|
|
44718
|
+
var measurementsMeshes = this._measurements.map(function (value) { return value.textMesh; });
|
|
44719
|
+
measurementsMeshes.forEach(function (object) { return _this.scenePreview.add(object); });
|
|
44720
|
+
};
|
|
44721
|
+
ModelPreviewComponent.prototype._setMeasurements = function (boundingBox) {
|
|
44722
|
+
var setHeight = this._createHeightMeasurement(boundingBox.y);
|
|
44723
|
+
this._measurements.push(setHeight);
|
|
44724
|
+
var setWidth = this._createWidthMeasurement(boundingBox.x);
|
|
44725
|
+
this._measurements.push(setWidth);
|
|
44726
|
+
var setDepth = this._createDepthMeasurement(boundingBox.z);
|
|
44727
|
+
this._measurements.push(setDepth);
|
|
44728
|
+
};
|
|
44729
|
+
ModelPreviewComponent.prototype._createHeightMeasurement = function (heightInput) {
|
|
44730
|
+
var height = new BoxMeasurement();
|
|
44731
|
+
var heightString = MeasurementUtils.makeText(heightInput, this.unitsOfMeasurement, this.distanceStep);
|
|
44732
|
+
var text = this._dictionaryService.get('LABEL_HEIGHT');
|
|
44733
|
+
height.textMesh = makeTextMesh(heightString, this.font, 0xFF00FF, 0.08, false, false, text);
|
|
44734
|
+
height.positions = this._calculateHeightPositions();
|
|
44735
|
+
height.textMesh.name = 'boxHeight';
|
|
44736
|
+
return height;
|
|
44737
|
+
};
|
|
44738
|
+
ModelPreviewComponent.prototype._createWidthMeasurement = function (widthInput) {
|
|
44739
|
+
var width = new BoxMeasurement();
|
|
44740
|
+
var widthString = MeasurementUtils.makeText(widthInput, this.unitsOfMeasurement, this.distanceStep);
|
|
44741
|
+
var text = this._dictionaryService.get('LABEL_WIDTH');
|
|
44742
|
+
width.textMesh = makeTextMesh(widthString, this.font, 0xFF00FF, 0.08, false, false, text);
|
|
44743
|
+
width.positions = this._calculateWidthPositions();
|
|
44744
|
+
width.textMesh.name = 'boxWidth';
|
|
44745
|
+
return width;
|
|
44746
|
+
};
|
|
44747
|
+
ModelPreviewComponent.prototype._createDepthMeasurement = function (depthInput) {
|
|
44748
|
+
var depth = new BoxMeasurement();
|
|
44749
|
+
var depthString = MeasurementUtils.makeText(depthInput, this.unitsOfMeasurement, this.distanceStep);
|
|
44750
|
+
var text = this._dictionaryService.get('LABEL_DEPTH');
|
|
44751
|
+
depth.textMesh = makeTextMesh(depthString, this.font, 0xFF00FF, 0.08, false, false, text);
|
|
44752
|
+
depth.positions = this._calculateDepthPositions();
|
|
44753
|
+
depth.textMesh.name = 'boxDepth';
|
|
44754
|
+
return depth;
|
|
44755
|
+
};
|
|
44756
|
+
ModelPreviewComponent.prototype._calculateHeightPositions = function () {
|
|
44757
|
+
var _this = this;
|
|
44758
|
+
return positioningFactors.map(function (_a) {
|
|
44759
|
+
var _b = __read(_a, 2), j = _b[0], k = _b[1];
|
|
44760
|
+
return new THREE__namespace.Vector3()
|
|
44761
|
+
.addScaledVector(xDirection, j / 2 * _this.boundingBoxSize.x)
|
|
44762
|
+
.addScaledVector(zDirection, k / 2 * _this.boundingBoxSize.z);
|
|
44763
|
+
});
|
|
44764
|
+
};
|
|
44765
|
+
ModelPreviewComponent.prototype._calculateWidthPositions = function () {
|
|
44766
|
+
var _this = this;
|
|
44767
|
+
return positioningFactors.map(function (_a) {
|
|
44768
|
+
var _b = __read(_a, 2), j = _b[0], k = _b[1];
|
|
44769
|
+
return new THREE__namespace.Vector3()
|
|
44770
|
+
.addScaledVector(yDirection, j / 2 * _this.boundingBoxSize.y)
|
|
44771
|
+
.addScaledVector(zDirection, k / 2 * _this.boundingBoxSize.z);
|
|
44772
|
+
});
|
|
44773
|
+
};
|
|
44774
|
+
ModelPreviewComponent.prototype._calculateDepthPositions = function () {
|
|
44775
|
+
var _this = this;
|
|
44776
|
+
return positioningFactors.map(function (_a) {
|
|
44777
|
+
var _b = __read(_a, 2), j = _b[0], k = _b[1];
|
|
44778
|
+
return new THREE__namespace.Vector3()
|
|
44779
|
+
.addScaledVector(yDirection, j / 2 * _this.boundingBoxSize.y)
|
|
44780
|
+
.addScaledVector(xDirection, k / 2 * _this.boundingBoxSize.x);
|
|
44781
|
+
});
|
|
43921
44782
|
};
|
|
43922
44783
|
ModelPreviewComponent.prototype._blobToArrayBuffer = function (blob) {
|
|
43923
44784
|
return new Promise(function (resolve, reject) {
|
|
@@ -43936,22 +44797,61 @@
|
|
|
43936
44797
|
reader.readAsArrayBuffer(blob);
|
|
43937
44798
|
});
|
|
43938
44799
|
};
|
|
44800
|
+
ModelPreviewComponent.prototype._createLightFromProperties = function (lightProperties) {
|
|
44801
|
+
var lightType = lightProperties.type;
|
|
44802
|
+
var getLights = new LightCreateService();
|
|
44803
|
+
var light = getLights.createNewLight(lightType);
|
|
44804
|
+
light.userData.wallOffset = lightProperties.wallOffset;
|
|
44805
|
+
light.userData.rotationOffset = lightProperties.rotationOffset;
|
|
44806
|
+
light.userData.topDownDirectional = lightProperties.topDownDirectional;
|
|
44807
|
+
for (var property in lightProperties) {
|
|
44808
|
+
if (!light.hasOwnProperty(property)) {
|
|
44809
|
+
continue;
|
|
44810
|
+
}
|
|
44811
|
+
if (property === 'position') {
|
|
44812
|
+
light.position.y = lightProperties.position.y;
|
|
44813
|
+
}
|
|
44814
|
+
else if (property === 'color') {
|
|
44815
|
+
light.color = new THREE.Color(lightProperties.color);
|
|
44816
|
+
}
|
|
44817
|
+
else if (property === 'groundColor') {
|
|
44818
|
+
light.groundColor = new THREE.Color(lightProperties.groundColor);
|
|
44819
|
+
}
|
|
44820
|
+
else {
|
|
44821
|
+
this._setObjectProperties(light, property, lightProperties[property]);
|
|
44822
|
+
}
|
|
44823
|
+
}
|
|
44824
|
+
this.scenePreview.add(light);
|
|
44825
|
+
};
|
|
44826
|
+
ModelPreviewComponent.prototype._setObjectProperties = function (object, property, value) {
|
|
44827
|
+
if (property === 'shadow') {
|
|
44828
|
+
for (var prop in value) {
|
|
44829
|
+
if (!object[property].hasOwnProperty(prop)) {
|
|
44830
|
+
continue;
|
|
44831
|
+
}
|
|
44832
|
+
object[property][prop] = value[prop];
|
|
44833
|
+
}
|
|
44834
|
+
}
|
|
44835
|
+
else {
|
|
44836
|
+
object[property] = value;
|
|
44837
|
+
}
|
|
44838
|
+
};
|
|
43939
44839
|
return ModelPreviewComponent;
|
|
43940
44840
|
}());
|
|
43941
|
-
ModelPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelPreviewComponent, deps: [{ token: i1$1.MAT_DIALOG_DATA }, { token: HomedecoratorSettingsService }, { token: i1__namespace$1.MatDialogRef }, { token: ThirdPartyModelService }, { token: MessageBusService }, { token: i1__namespace$1.MatDialog }, { token: HomedecoratorConnectorAdapterService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
43942
|
-
ModelPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ModelPreviewComponent, selector: "rp-model-preview", viewQueries: [{ propertyName: "glbExportName", first: true, predicate: ["fileName"], descendants: true }, { propertyName: "heightArticle", first: true, predicate: ["heightArticle"], descendants: true }], ngImport: i0__namespace, template: "\n <div class=\"model-preview\">\n <div class=\"model-preview-container\" id=\"canvasContainer\">\n </div>\n <div class=\"model-preview-actions\">\n <div class=\"input-height-container\">\n <p>Centimeters of inches</p>\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setUnit($event)\">\n <mat-radio-button [checked]=\"true\" value=\"cm\">Height in cm</mat-radio-button>\n <mat-radio-button value=\"inches\">Height in inches</mat-radio-button>\n </mat-radio-group>\n </div>\n <div>\n <input type=\"text\" id=\"heightArticle\" #heightArticle>\n <button (click)=\"scaleArticle()\">scale</button>\n </div>\n </div>\n\n <div class=\"rotation-button-container\">\n <p>Rotation</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"rotateModel('x', mathPi / 2)\">x-as + 90 graden</button>\n <button (click)=\"rotateModel('x', -mathPi / 2)\">x-as - 90 graden</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"rotateModel('y', mathPi / 2)\">y-as + 90 graden</button>\n <button (click)=\"rotateModel('y', -mathPi / 2)\">y-as - 90 graden</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"rotateModel('z', mathPi / 2)\">z-as + 90 graden</button>\n <button (click)=\"rotateModel('z', -mathPi / 2)\">z-as - 90 graden</button>\n </div>\n </div>\n\n <div class=\"model-preview-info\" *ngIf=\"this.data\">\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Name</label>\n </div>\n <div class=\"model-preview-info-right\">\n <input type=\"text\" id=\"fileName\" #fileName value=\"{{ this.data.file.file.name }}\">\n </div>\n </div>\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>
|
|
44841
|
+
ModelPreviewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelPreviewComponent, deps: [{ token: i1$1.MAT_DIALOG_DATA }, { token: HomedecoratorSettingsService }, { token: i1__namespace$1.MatDialogRef }, { token: ThirdPartyModelService }, { token: MessageBusService }, { token: i1__namespace$1.MatDialog }, { token: HomedecoratorConnectorAdapterService }, { token: LightPresetsService }, { token: HomedecoratorDictionaryService }, { token: FontService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
44842
|
+
ModelPreviewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ModelPreviewComponent, selector: "rp-model-preview", viewQueries: [{ propertyName: "glbExportName", first: true, predicate: ["fileName"], descendants: true }, { propertyName: "heightArticle", first: true, predicate: ["heightArticle"], descendants: true }], ngImport: i0__namespace, template: "\n <div class=\"model-preview\">\n <div class=\"model-preview-container\" id=\"canvasContainer\">\n </div>\n <div class=\"model-preview-actions\">\n <div class=\"input-height-container\">\n <p>Centimeters of inches</p>\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setUnit($event)\">\n <mat-radio-button [checked]=\"true\" value=\"cm\">Height in cm</mat-radio-button>\n <mat-radio-button value=\"inches\">Height in inches</mat-radio-button>\n </mat-radio-group>\n </div>\n <div>\n <input type=\"text\" id=\"heightArticle\" #heightArticle>\n <button (click)=\"scaleArticle()\">scale</button>\n </div>\n </div>\n\n <div>\n <button (click)=\"toggleShowReferenceModel()\">Show Reference model</button>\n </div>\n\n <div class=\"rotation-button-container\">\n <p>Rotation</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"rotateModel('x', mathPi / 2)\">x-as + 90 graden</button>\n <button (click)=\"rotateModel('x', -mathPi / 2)\">x-as - 90 graden</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"rotateModel('y', mathPi / 2)\">y-as + 90 graden</button>\n <button (click)=\"rotateModel('y', -mathPi / 2)\">y-as - 90 graden</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"rotateModel('z', mathPi / 2)\">z-as + 90 graden</button>\n <button (click)=\"rotateModel('z', -mathPi / 2)\">z-as - 90 graden</button>\n </div>\n </div>\n\n\n <div class=\"rotation-button-container\">\n <p>Positie</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"moveModel('x', 0.01)\">x-as + 0.01</button>\n <button (click)=\"moveModel('x', -0.01)\">x-as -0.01</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"moveModel('y', 0.01)\">y-as + 0.01</button>\n <button (click)=\"moveModel('y', -0.01)\">y-as - 0.01</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"moveModel('z', 0.01)\">z-as + 0.01</button>\n <button (click)=\"moveModel('z', -mathPi / 2)\">z-as -0.01</button>\n </div>\n </div>\n\n <div class=\"model-preview-info\" *ngIf=\"this.data\">\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Name</label>\n </div>\n <div class=\"model-preview-info-right\">\n <input type=\"text\" id=\"fileName\" #fileName value=\"{{ this.data.file.file.name }}\">\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Stackable</label>\n </div>\n <div class=\"model-preview-info-right\">\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setStackable($event)\">\n <mat-radio-button [checked]=\"true\" value=\"false\">No</mat-radio-button>\n <mat-radio-button value=\"true\">Yes</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Height adjustable</label>\n </div>\n <div class=\"model-preview-info-right\">\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setHeightAdjustable($event)\">\n <mat-radio-button [checked]=\"true\" value=\"false\">No</mat-radio-button>\n <mat-radio-button value=\"true\">Yes</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Extension</label>\n </div>\n <div class=\"model-preview-info-right\">\n <label>{{ this.data.file.fileType }}</label>\n </div>\n </div>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('upload')\">Upload to CDN and add to scene</button>\n <p></p>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('download')\">Download model</button>\n </div>\n </div>\n </div>\n ", isInline: true, styles: [".model-preview{display:flex;flex-direction:row}.model-preview .model-preview-actions{min-width:240px;box-sizing:border-box;padding:10px 20px;border-left:1px solid #5b6875}.model-preview .model-preview-actions .model-preview-info-container{margin-bottom:10px}.model-preview .model-preview-actions .model-preview-info-container .model-preview-info-left{font-weight:bolder}.model-preview .exportButton{cursor:pointer;color:#fff;background:#dda73f;border:1px solid #dda73f;border-radius:3px;box-sizing:border-box;padding:5px;display:flex;align-items:center}.model-preview .exportButton:hover{background:#dda73f;color:#fff}input{border:1px solid #5b6875;box-sizing:border-box;padding:3px 10px;border-radius:3px}.mat-radio-wrapper{margin:10px 0}mat-radio-group mat-radio-button{display:block}.rotation-button-container div{display:flex;justify-content:space-between;margin-bottom:10px}.rotation-button-container div button{cursor:pointer;color:#fff;background:#dda73f;border:1px solid #dda73f;border-radius:3px;box-sizing:border-box;padding:5px}.rotation-button-container div button:hover{background:#dda73f;color:#fff}\n"], components: [{ type: i9__namespace$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }], directives: [{ type: i9__namespace$1.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
43943
44843
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelPreviewComponent, decorators: [{
|
|
43944
44844
|
type: i0.Component,
|
|
43945
44845
|
args: [{
|
|
43946
44846
|
selector: 'rp-model-preview',
|
|
43947
|
-
template: "\n <div class=\"model-preview\">\n <div class=\"model-preview-container\" id=\"canvasContainer\">\n </div>\n <div class=\"model-preview-actions\">\n <div class=\"input-height-container\">\n <p>Centimeters of inches</p>\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setUnit($event)\">\n <mat-radio-button [checked]=\"true\" value=\"cm\">Height in cm</mat-radio-button>\n <mat-radio-button value=\"inches\">Height in inches</mat-radio-button>\n </mat-radio-group>\n </div>\n <div>\n <input type=\"text\" id=\"heightArticle\" #heightArticle>\n <button (click)=\"scaleArticle()\">scale</button>\n </div>\n </div>\n\n <div class=\"rotation-button-container\">\n <p>Rotation</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"rotateModel('x', mathPi / 2)\">x-as + 90 graden</button>\n <button (click)=\"rotateModel('x', -mathPi / 2)\">x-as - 90 graden</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"rotateModel('y', mathPi / 2)\">y-as + 90 graden</button>\n <button (click)=\"rotateModel('y', -mathPi / 2)\">y-as - 90 graden</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"rotateModel('z', mathPi / 2)\">z-as + 90 graden</button>\n <button (click)=\"rotateModel('z', -mathPi / 2)\">z-as - 90 graden</button>\n </div>\n </div>\n\n <div class=\"model-preview-info\" *ngIf=\"this.data\">\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Name</label>\n </div>\n <div class=\"model-preview-info-right\">\n <input type=\"text\" id=\"fileName\" #fileName value=\"{{ this.data.file.file.name }}\">\n </div>\n </div>\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>
|
|
44847
|
+
template: "\n <div class=\"model-preview\">\n <div class=\"model-preview-container\" id=\"canvasContainer\">\n </div>\n <div class=\"model-preview-actions\">\n <div class=\"input-height-container\">\n <p>Centimeters of inches</p>\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setUnit($event)\">\n <mat-radio-button [checked]=\"true\" value=\"cm\">Height in cm</mat-radio-button>\n <mat-radio-button value=\"inches\">Height in inches</mat-radio-button>\n </mat-radio-group>\n </div>\n <div>\n <input type=\"text\" id=\"heightArticle\" #heightArticle>\n <button (click)=\"scaleArticle()\">scale</button>\n </div>\n </div>\n\n <div>\n <button (click)=\"toggleShowReferenceModel()\">Show Reference model</button>\n </div>\n\n <div class=\"rotation-button-container\">\n <p>Rotation</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"rotateModel('x', mathPi / 2)\">x-as + 90 graden</button>\n <button (click)=\"rotateModel('x', -mathPi / 2)\">x-as - 90 graden</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"rotateModel('y', mathPi / 2)\">y-as + 90 graden</button>\n <button (click)=\"rotateModel('y', -mathPi / 2)\">y-as - 90 graden</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"rotateModel('z', mathPi / 2)\">z-as + 90 graden</button>\n <button (click)=\"rotateModel('z', -mathPi / 2)\">z-as - 90 graden</button>\n </div>\n </div>\n\n\n <div class=\"rotation-button-container\">\n <p>Positie</p>\n <div class=\"rotation-x-buttons\">\n <button (click)=\"moveModel('x', 0.01)\">x-as + 0.01</button>\n <button (click)=\"moveModel('x', -0.01)\">x-as -0.01</button>\n </div>\n <div class=\"rotation-y-buttons\">\n <button (click)=\"moveModel('y', 0.01)\">y-as + 0.01</button>\n <button (click)=\"moveModel('y', -0.01)\">y-as - 0.01</button>\n </div>\n <div class=\"rotation-z-buttons\">\n <button (click)=\"moveModel('z', 0.01)\">z-as + 0.01</button>\n <button (click)=\"moveModel('z', -mathPi / 2)\">z-as -0.01</button>\n </div>\n </div>\n\n <div class=\"model-preview-info\" *ngIf=\"this.data\">\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Name</label>\n </div>\n <div class=\"model-preview-info-right\">\n <input type=\"text\" id=\"fileName\" #fileName value=\"{{ this.data.file.file.name }}\">\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Stackable</label>\n </div>\n <div class=\"model-preview-info-right\">\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setStackable($event)\">\n <mat-radio-button [checked]=\"true\" value=\"false\">No</mat-radio-button>\n <mat-radio-button value=\"true\">Yes</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Height adjustable</label>\n </div>\n <div class=\"model-preview-info-right\">\n <div class=\"mat-radio-wrapper\">\n <mat-radio-group aria-label=\"Select an unit\" (change)=\"setHeightAdjustable($event)\">\n <mat-radio-button [checked]=\"true\" value=\"false\">No</mat-radio-button>\n <mat-radio-button value=\"true\">Yes</mat-radio-button>\n </mat-radio-group>\n </div>\n </div>\n </div>\n\n <div class=\"model-preview-info-container\">\n <div class=\"model-preview-info-left\">\n <label>Extension</label>\n </div>\n <div class=\"model-preview-info-right\">\n <label>{{ this.data.file.fileType }}</label>\n </div>\n </div>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('upload')\">Upload to CDN and add to scene</button>\n <p></p>\n <button class=\"exportButton\" (click)=\"exportSceneAsGLB('download')\">Download model</button>\n </div>\n </div>\n </div>\n ",
|
|
43948
44848
|
styleUrls: ['./model-preview.component.scss']
|
|
43949
44849
|
}]
|
|
43950
44850
|
}], ctorParameters: function () {
|
|
43951
44851
|
return [{ type: undefined, decorators: [{
|
|
43952
44852
|
type: i0.Inject,
|
|
43953
44853
|
args: [i1$1.MAT_DIALOG_DATA]
|
|
43954
|
-
}] }, { type: HomedecoratorSettingsService }, { type: i1__namespace$1.MatDialogRef }, { type: ThirdPartyModelService }, { type: MessageBusService }, { type: i1__namespace$1.MatDialog }, { type: HomedecoratorConnectorAdapterService }];
|
|
44854
|
+
}] }, { type: HomedecoratorSettingsService }, { type: i1__namespace$1.MatDialogRef }, { type: ThirdPartyModelService }, { type: MessageBusService }, { type: i1__namespace$1.MatDialog }, { type: HomedecoratorConnectorAdapterService }, { type: LightPresetsService }, { type: HomedecoratorDictionaryService }, { type: FontService }];
|
|
43955
44855
|
}, propDecorators: { glbExportName: [{
|
|
43956
44856
|
type: i0.ViewChild,
|
|
43957
44857
|
args: ['fileName']
|
|
@@ -44325,7 +45225,7 @@
|
|
|
44325
45225
|
return ToolbarComponent;
|
|
44326
45226
|
}());
|
|
44327
45227
|
ToolbarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ToolbarComponent, deps: [{ token: AppStateService }, { token: PresetsService }, { token: MessageBusService }, { token: HomedecoratorSettingsService }, { token: LocalStorageService }, { token: ScreenSizeAnalysisService }, { token: i1__namespace$1.MatDialog }, { token: ToastService }, { token: HomedecoratorAppService }, { token: PermanentStoreService }, { token: UtilsService }, { token: ThreedselectorService }, { token: ItemService }, { token: FloorplanService }, { token: FloorService }, { token: AnimationService }, { token: DevelopmentService }, { token: NewRenderService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
44328
|
-
ToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ToolbarComponent, selector: "rp-toolbar", host: { listeners: { "document:keydown": "handleKeyDown($event)" } }, viewQueries: [{ propertyName: "leftSidebar", first: true, predicate: ["leftSidebar"], descendants: true, static: true }], ngImport: i0__namespace, template: "\n <!--\n <div class=\"layer layer--toolbar\">\n -->\n <mat-toolbar class=\"toolbar\" color=\"primary\">\n <button *ngIf=\"phoneSizeScreen\" mat-icon-button class=\"menu-icon\" [matMenuTriggerFor]=\"menu\">\n <mat-icon class=\"homedecorator-material-icons\">menu</mat-icon>\n </button>\n <mat-menu #menu>\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\">\n </ng-container>\n </ng-container>\n </mat-menu>\n\n <img src=\"assets/images/logo.svg\" class=\"toolbar-logo\"/>\n <img *ngIf=\"settingsService.settings.secondaryLogo\" [src]=\"settingsService.settings.secondaryLogo\"\n class=\"toolbar-logo secondary-logo\"/>\n <ng-container *ngIf=\"settingsService.settings.options.development\">\n <mat-card class=\"wip-card\">\n <mat-card-content>\n {{ 'WORK_IN_PROGRESS' | localize }}\n </mat-card-content>\n </mat-card>\n <button mat-icon-button (click)=\"loadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">weekend</mat-icon>\n </button>\n <button mat-icon-button (click)=\"loadResizableRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">camera-control</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"settingsService.settings.options.showRoomDownloadButton\">\n <button mat-icon-button (click)=\"downloadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'DOWNLOAD_ROOM_AS_GLB' | localize}}\">cloud_download</mat-icon>\n </button>\n </ng-container>\n\n <!-- <ng-container *ngIf=\"settingsService.settings.options.showRoomRenderButton\">-->\n <!-- <button mat-icon-button (click)=\"apiRoomRender()\">-->\n <!-- <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'RENDER_GLB' | localize}}\">share_windows</mat-icon>-->\n <!-- </button>-->\n <!-- </ng-container>-->\n\n <!-- <ng-container>-->\n <!-- <button mat-icon-button (click)=\"testRender()\">-->\n <!-- TEST-->\n <!-- </button>-->\n <!-- </ng-container>-->\n\n <div class=\"hd-toolbar-spacer\"></div>\n <mat-nav-list class=\"toolbar__nav\" role=\"list\">\n <div matTooltip=\"{{'NEW_ROOM' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"newRoom()\">{{ 'NEW' | localize }}</mat-list-item>\n </div>\n <div matTooltip=\"{{'OPEN_EXISTING_PLAN' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"openOpenDialog()\">{{ 'OPEN' | localize }}</mat-list-item>\n </div>\n <div *ngIf=\"storageService.errorWhenSaving\" class=\"storage-error\"\n [class.blinker]=\"showBlinkError\" matTooltip=\"{{'ERROR_SAVING_LOCALSTORAGE' | localize}}\"\n (mousemove)=\"showBlinkError = false\"\n ><span>!</span></div>\n <div [class.blinker]=\"!showSaveNotification\" matTooltip=\"{{'SAVE_THE_PLAN' | localize}}\">\n <mat-list-item\n matTooltip=\"{{'SAVE_TOOLTIP' | localize}}\"\n [matTooltipDisabled]=\"tooltipDisabled\"\n matTooltipClass=\"tooltip-red\"\n role=\"listitem\"\n (click)=\"openSaveDialog() && stopTimer()\"\n >{{ 'SAVE' | localize }}\n </mat-list-item>\n </div>\n <div\n class=\"badge\"\n matBadge=\"!\"\n matBadgeColor=\"warn\"\n matBadgePosition=\"below before\"\n matBadgeOverlap=\"true\"\n matBadgeSize=\"medium\"\n [matBadgeHidden]=\"badgeDisabled\">\n </div>\n </mat-nav-list>\n <div matTooltip=\"{{'SAVE_IMAGE' | localize}}\">\n <button mat-icon-button (click)=\"onTakeScreenshotClick()\">\n <mat-icon class=\"homedecorator-material-icons\">photo_camera</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'UNDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Undo)\"\n [disabled]=\"presetsService.isLoading || !appState.canUndo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">undo</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'REDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Redo)\"\n [disabled]=\"presetsService.isLoading || !appState.canRedo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">redo</mat-icon>\n </button>\n </div>\n <button mat-icon-button *ngIf=\"!fullscreen\" (click)=\"requestFullscreen()\" matTooltip=\"{{'REQUEST_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen</mat-icon>\n </button>\n <button mat-icon-button *ngIf=\"fullscreen\" (click)=\"exitFullscreen()\" matTooltip=\"{{'EXIT_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen_exit</mat-icon>\n </button>\n </mat-toolbar>\n\n <limited-mode-message\n *ngIf=\"phoneSizeScreen && showLimitedModeMessage\"\n (closeClicked)=\"onCloseLimitedModeMessageClick()\">\n </limited-mode-message>\n\n <div class=\"toast-wrapper\"\n [class.success]=\"toast.type == toastType.Success\"\n [class.warning]=\"toast.type == toastType.Warning\"\n [class.error]=\"toast.type == toastType.Error\"\n *ngIf=\"toast\"\n @showToast\n [textContent]=\"toast.message\">\n </div>\n\n <mat-toolbar-row class=\"toolbar-row\">\n <mat-toolbar class=\"toolbar toolbar--secondary\" *ngIf=\"!phoneSizeScreen\">\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n <span class=\"hd-toolbar-spacer\"></span>\n <ng-container *ngFor=\"let icon of toolbarIconsBottom\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n </mat-toolbar>\n\n <mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"over\" position=\"left\" #leftSidebar>\n <mat-drawer-content class=\"drawer__body\">\n <button class=\"drawer__button\" mat-icon-button (click)=\"clickCloseLeftSidebar()\">\n <mat-icon class=\"homedecorator-material-icons\">clear</mat-icon>\n </button>\n <ng-container [cdkPortalOutlet]=\"leftPortal\"></ng-container>\n </mat-drawer-content>\n </mat-drawer>\n </mat-drawer-container>\n </mat-toolbar-row>\n <!--\n </div>\n -->\n ", isInline: true, styles: [":host{display:flex;flex-direction:column;position:absolute;top:0;z-index:100;height:100%;width:100%;pointer-events:none}:host .hd-toolbar-spacer{display:flex;flex-basis:100%}:host .toast-wrapper{height:auto;position:absolute;top:64px;left:50%;-webkit-user-select:none;user-select:none;pointer-events:none;background:#74B77F;padding:30px;border-radius:0 0 10px 10px;min-width:150px;max-width:90%;color:#fff;text-align:center;transform:translate(-50%,-100%)}:host .toast-wrapper.warning{background:#F17300}:host .toast-wrapper.error{background:#CC2936}:host ::ng-deep .drawer__header{display:flex;align-items:center;min-height:40px;margin-bottom:16px}:host ::ng-deep .drawer__header h2{margin:0 auto 0 0}:host ::ng-deep mat-tab-header,:host ::ng-deep .FileDrop{margin-bottom:16px}:host ::ng-deep .tab--skin ::ng-deep .mat-tab-label{height:52px;min-width:auto}:host ::ng-deep .drawer p{white-space:pre-wrap}:host ::ng-deep .mat-divider{margin:16px 0 24px}:host ::ng-deep .mat-drawer-backdrop{display:none}.storage-error{min-width:30px;height:30px;display:flex;align-items:center;align-self:center;border-radius:50%;justify-content:center;background:white;color:#c00;font-size:25px;font-weight:bold}.layer--toolbar{display:flex;flex-direction:column}.toolbar{z-index:101;box-shadow:0 3px 6px #00000029,0 3px 6px #0000003b}.toolbar .menu-icon{min-width:50px;display:flex;justify-content:center;margin-left:-16px}.toolbar-logo{width:50px}.secondary-logo{margin-left:20px}.toolbar__nav{display:flex;flex-direction:row;padding-top:0}.toolbar__nav .mat-list-item{color:#fff;height:40px}.toolbar-row{flex:auto;display:flex;flex-direction:column;padding:0;pointer-events:none;position:relative;align-items:baseline;height:100%}.toolbar--secondary{width:64px;padding:16px 0;flex-direction:column;background:#fff;height:100%}.toolbar--secondary .drawer{flex:auto;pointer-events:none;background:transparent}.wip-card{margin-left:22px;padding:6px 22px;color:#fff;background-color:#ed912e}.drawer-container{position:static;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d}.drawer{width:420px;padding:16px;display:flex;flex-direction:column;left:65px}.toolbar,.toolbar--secondary>*,.drawer-container>*,.drawer>*{pointer-events:all}.drawer__button{min-width:initial;padding:0;border:none;position:absolute;top:0;right:0;border-radius:50%}.blinker{animation:blinker 1s linear infinite}.mat-badge-content{background-color:#b71c1c;animation:bounce 2s ease-out;animation-iteration-count:infinite;margin-left:5px}.badge{margin-right:20px;margin-bottom:20px}::ng-deep .tooltip-red{background:#b71c1c}@keyframes bounce{0%{transform:scale(1) translateY(0)}10%{transform:scale(1.1,.9) translateY(0)}30%{transform:scale(.9,1.1) translateY(-20px)}50%{transform:scale(1.05,.95) translateY(0)}57%{transform:scale(1) translateY(-7px)}64%{transform:scale(1) translateY(0)}to{transform:scale(1) translateY(0)}}@keyframes blinker{50%{opacity:0}}::ng-deep .mat-menu-panel{width:256px!important}::ng-deep .mat-menu-panel .mat-menu-content{display:flex;flex-direction:column;padding-left:10px;padding-right:10px}::ng-deep mat-drawer-content.mat-drawer-content{display:flex;height:100%;flex-direction:column}\n"], components: [{ type: i19__namespace$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i22__namespace.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i23__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2__namespace$2.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { type: i2__namespace$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: LimitedModeMessageComponent, selector: "limited-mode-message", outputs: ["closeClicked"] }, { type: i26__namespace.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { type: i26__namespace.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { type: i26__namespace.MatDrawerContent, selector: "mat-drawer-content" }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i22__namespace.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i28__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { type: i23__namespace.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i10__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i30__namespace.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i19__namespace$1.MatToolbarRow, selector: "mat-toolbar-row", exportAs: ["matToolbarRow"] }], pipes: { "localize": LocalizePipe }, animations: [
|
|
45228
|
+
ToolbarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ToolbarComponent, selector: "rp-toolbar", host: { listeners: { "document:keydown": "handleKeyDown($event)" } }, viewQueries: [{ propertyName: "leftSidebar", first: true, predicate: ["leftSidebar"], descendants: true, static: true }], ngImport: i0__namespace, template: "\n <!--\n <div class=\"layer layer--toolbar\">\n -->\n <mat-toolbar class=\"toolbar\" color=\"primary\">\n <button *ngIf=\"phoneSizeScreen\" mat-icon-button class=\"menu-icon\" [matMenuTriggerFor]=\"menu\">\n <mat-icon class=\"homedecorator-material-icons\">menu</mat-icon>\n </button>\n <mat-menu #menu>\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\">\n </ng-container>\n </ng-container>\n </mat-menu>\n\n <img src=\"assets/images/logo.svg\" class=\"toolbar-logo\"/>\n <img *ngIf=\"settingsService.settings.secondaryLogo\" [src]=\"settingsService.settings.secondaryLogo\"\n class=\"toolbar-logo secondary-logo\"/>\n <ng-container *ngIf=\"settingsService.settings.options.development\">\n <mat-card class=\"wip-card\">\n <mat-card-content>\n {{ 'WORK_IN_PROGRESS' | localize }}\n </mat-card-content>\n </mat-card>\n <button mat-icon-button (click)=\"loadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">weekend</mat-icon>\n </button>\n <button mat-icon-button (click)=\"loadResizableRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">camera-control</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"settingsService.settings.options.showRoomDownloadButton\">\n <button mat-icon-button (click)=\"downloadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'DOWNLOAD_ROOM_AS_GLB' | localize}}\">cloud_download</mat-icon>\n </button>\n </ng-container>\n <div class=\"hd-toolbar-spacer\"></div>\n\n<!-- <ng-container>-->\n<!-- <rp-pdf-export></rp-pdf-export>-->\n<!-- </ng-container>-->\n\n <mat-nav-list class=\"toolbar__nav\" role=\"list\">\n <div matTooltip=\"{{'NEW_ROOM' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"newRoom()\">{{ 'NEW' | localize }}</mat-list-item>\n </div>\n <div matTooltip=\"{{'OPEN_EXISTING_PLAN' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"openOpenDialog()\">{{ 'OPEN' | localize }}</mat-list-item>\n </div>\n <div *ngIf=\"storageService.errorWhenSaving\" class=\"storage-error\"\n [class.blinker]=\"showBlinkError\" matTooltip=\"{{'ERROR_SAVING_LOCALSTORAGE' | localize}}\"\n (mousemove)=\"showBlinkError = false\"\n ><span>!</span></div>\n <div [class.blinker]=\"!showSaveNotification\" matTooltip=\"{{'SAVE_THE_PLAN' | localize}}\">\n <mat-list-item\n matTooltip=\"{{'SAVE_TOOLTIP' | localize}}\"\n [matTooltipDisabled]=\"tooltipDisabled\"\n matTooltipClass=\"tooltip-red\"\n role=\"listitem\"\n (click)=\"openSaveDialog() && stopTimer()\"\n >{{ 'SAVE' | localize }}\n </mat-list-item>\n </div>\n <div\n class=\"badge\"\n matBadge=\"!\"\n matBadgeColor=\"warn\"\n matBadgePosition=\"below before\"\n matBadgeOverlap=\"true\"\n matBadgeSize=\"medium\"\n [matBadgeHidden]=\"badgeDisabled\">\n </div>\n </mat-nav-list>\n <div matTooltip=\"{{'SAVE_IMAGE' | localize}}\">\n <button mat-icon-button (click)=\"onTakeScreenshotClick()\">\n <mat-icon class=\"homedecorator-material-icons\">photo_camera</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'UNDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Undo)\"\n [disabled]=\"presetsService.isLoading || !appState.canUndo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">undo</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'REDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Redo)\"\n [disabled]=\"presetsService.isLoading || !appState.canRedo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">redo</mat-icon>\n </button>\n </div>\n <button mat-icon-button *ngIf=\"!fullscreen\" (click)=\"requestFullscreen()\" matTooltip=\"{{'REQUEST_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen</mat-icon>\n </button>\n <button mat-icon-button *ngIf=\"fullscreen\" (click)=\"exitFullscreen()\" matTooltip=\"{{'EXIT_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen_exit</mat-icon>\n </button>\n </mat-toolbar>\n\n <limited-mode-message\n *ngIf=\"phoneSizeScreen && showLimitedModeMessage\"\n (closeClicked)=\"onCloseLimitedModeMessageClick()\">\n </limited-mode-message>\n\n <div class=\"toast-wrapper\"\n [class.success]=\"toast.type == toastType.Success\"\n [class.warning]=\"toast.type == toastType.Warning\"\n [class.error]=\"toast.type == toastType.Error\"\n *ngIf=\"toast\"\n @showToast\n [textContent]=\"toast.message\">\n </div>\n\n <mat-toolbar-row class=\"toolbar-row\">\n <mat-toolbar class=\"toolbar toolbar--secondary\" *ngIf=\"!phoneSizeScreen\">\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n <span class=\"hd-toolbar-spacer\"></span>\n <ng-container *ngFor=\"let icon of toolbarIconsBottom\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n </mat-toolbar>\n\n <mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"over\" position=\"left\" #leftSidebar>\n <mat-drawer-content class=\"drawer__body\">\n <button class=\"drawer__button\" mat-icon-button (click)=\"clickCloseLeftSidebar()\">\n <mat-icon class=\"homedecorator-material-icons\">clear</mat-icon>\n </button>\n <ng-container [cdkPortalOutlet]=\"leftPortal\"></ng-container>\n </mat-drawer-content>\n </mat-drawer>\n </mat-drawer-container>\n </mat-toolbar-row>\n <!--\n </div>\n -->\n ", isInline: true, styles: [":host{display:flex;flex-direction:column;position:absolute;top:0;z-index:100;height:100%;width:100%;pointer-events:none}:host .hd-toolbar-spacer{display:flex;flex-basis:100%}:host .toast-wrapper{height:auto;position:absolute;top:64px;left:50%;-webkit-user-select:none;user-select:none;pointer-events:none;background:#74B77F;padding:30px;border-radius:0 0 10px 10px;min-width:150px;max-width:90%;color:#fff;text-align:center;transform:translate(-50%,-100%)}:host .toast-wrapper.warning{background:#F17300}:host .toast-wrapper.error{background:#CC2936}:host ::ng-deep .drawer__header{display:flex;align-items:center;min-height:40px;margin-bottom:16px}:host ::ng-deep .drawer__header h2{margin:0 auto 0 0}:host ::ng-deep mat-tab-header,:host ::ng-deep .FileDrop{margin-bottom:16px}:host ::ng-deep .tab--skin ::ng-deep .mat-tab-label{height:52px;min-width:auto}:host ::ng-deep .drawer p{white-space:pre-wrap}:host ::ng-deep .mat-divider{margin:16px 0 24px}:host ::ng-deep .mat-drawer-backdrop{display:none}.storage-error{min-width:30px;height:30px;display:flex;align-items:center;align-self:center;border-radius:50%;justify-content:center;background:white;color:#c00;font-size:25px;font-weight:bold}.layer--toolbar{display:flex;flex-direction:column}.toolbar{z-index:101;box-shadow:0 3px 6px #00000029,0 3px 6px #0000003b}.toolbar .menu-icon{min-width:50px;display:flex;justify-content:center;margin-left:-16px}.toolbar-logo{width:50px}.secondary-logo{margin-left:20px}.toolbar__nav{display:flex;flex-direction:row;padding-top:0}.toolbar__nav .mat-list-item{color:#fff;height:40px}.toolbar-row{flex:auto;display:flex;flex-direction:column;padding:0;pointer-events:none;position:relative;align-items:baseline;height:100%}.toolbar--secondary{width:64px;padding:16px 0;flex-direction:column;background:#fff;height:100%}.toolbar--secondary .drawer{flex:auto;pointer-events:none;background:transparent}.wip-card{margin-left:22px;padding:6px 22px;color:#fff;background-color:#ed912e}.drawer-container{position:static;box-shadow:0 1px 3px #0000001f,0 1px 2px #0000003d}.drawer{width:420px;padding:16px;display:flex;flex-direction:column;left:65px}.toolbar,.toolbar--secondary>*,.drawer-container>*,.drawer>*{pointer-events:all}.drawer__button{min-width:initial;padding:0;border:none;position:absolute;top:0;right:0;border-radius:50%}.blinker{animation:blinker 1s linear infinite}.mat-badge-content{background-color:#b71c1c;animation:bounce 2s ease-out;animation-iteration-count:infinite;margin-left:5px}.badge{margin-right:20px;margin-bottom:20px}::ng-deep .tooltip-red{background:#b71c1c}@keyframes bounce{0%{transform:scale(1) translateY(0)}10%{transform:scale(1.1,.9) translateY(0)}30%{transform:scale(.9,1.1) translateY(-20px)}50%{transform:scale(1.05,.95) translateY(0)}57%{transform:scale(1) translateY(-7px)}64%{transform:scale(1) translateY(0)}to{transform:scale(1) translateY(0)}}@keyframes blinker{50%{opacity:0}}::ng-deep .mat-menu-panel{width:256px!important}::ng-deep .mat-menu-panel .mat-menu-content{display:flex;flex-direction:column;padding-left:10px;padding-right:10px}::ng-deep mat-drawer-content.mat-drawer-content{display:flex;height:100%;flex-direction:column}\n"], components: [{ type: i19__namespace$1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i3__namespace$1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i22__namespace.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { type: i23__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2__namespace$2.MatNavList, selector: "mat-nav-list", inputs: ["disableRipple", "disabled"], exportAs: ["matNavList"] }, { type: i2__namespace$2.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["disableRipple", "disabled"], exportAs: ["matListItem"] }, { type: LimitedModeMessageComponent, selector: "limited-mode-message", outputs: ["closeClicked"] }, { type: i26__namespace.MatDrawerContainer, selector: "mat-drawer-container", inputs: ["autosize", "hasBackdrop"], outputs: ["backdropClick"], exportAs: ["matDrawerContainer"] }, { type: i26__namespace.MatDrawer, selector: "mat-drawer", inputs: ["position", "mode", "disableClose", "autoFocus", "opened"], outputs: ["openedChange", "opened", "openedStart", "closed", "closedStart", "positionChanged"], exportAs: ["matDrawer"] }, { type: i26__namespace.MatDrawerContent, selector: "mat-drawer-content" }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i22__namespace.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { type: i5__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i28__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { type: i23__namespace.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i10__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i30__namespace.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i19__namespace$1.MatToolbarRow, selector: "mat-toolbar-row", exportAs: ["matToolbarRow"] }], pipes: { "localize": LocalizePipe }, animations: [
|
|
44329
45229
|
animations.trigger('showToast', [
|
|
44330
45230
|
animations.state('void', animations.style({ 'transform-origin': 'top center', transform: 'translate(-50%, -100%)' })),
|
|
44331
45231
|
animations.state('*', animations.style({ 'transform-origin': 'top center', transform: 'translate(-50%, 0)' })),
|
|
@@ -44342,7 +45242,7 @@
|
|
|
44342
45242
|
type: i0.Component,
|
|
44343
45243
|
args: [{
|
|
44344
45244
|
selector: 'rp-toolbar',
|
|
44345
|
-
template: "\n <!--\n <div class=\"layer layer--toolbar\">\n -->\n <mat-toolbar class=\"toolbar\" color=\"primary\">\n <button *ngIf=\"phoneSizeScreen\" mat-icon-button class=\"menu-icon\" [matMenuTriggerFor]=\"menu\">\n <mat-icon class=\"homedecorator-material-icons\">menu</mat-icon>\n </button>\n <mat-menu #menu>\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\">\n </ng-container>\n </ng-container>\n </mat-menu>\n\n <img src=\"assets/images/logo.svg\" class=\"toolbar-logo\"/>\n <img *ngIf=\"settingsService.settings.secondaryLogo\" [src]=\"settingsService.settings.secondaryLogo\"\n class=\"toolbar-logo secondary-logo\"/>\n <ng-container *ngIf=\"settingsService.settings.options.development\">\n <mat-card class=\"wip-card\">\n <mat-card-content>\n {{ 'WORK_IN_PROGRESS' | localize }}\n </mat-card-content>\n </mat-card>\n <button mat-icon-button (click)=\"loadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">weekend</mat-icon>\n </button>\n <button mat-icon-button (click)=\"loadResizableRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">camera-control</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"settingsService.settings.options.showRoomDownloadButton\">\n <button mat-icon-button (click)=\"downloadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'DOWNLOAD_ROOM_AS_GLB' | localize}}\">cloud_download</mat-icon>\n </button>\n </ng-container>\n
|
|
45245
|
+
template: "\n <!--\n <div class=\"layer layer--toolbar\">\n -->\n <mat-toolbar class=\"toolbar\" color=\"primary\">\n <button *ngIf=\"phoneSizeScreen\" mat-icon-button class=\"menu-icon\" [matMenuTriggerFor]=\"menu\">\n <mat-icon class=\"homedecorator-material-icons\">menu</mat-icon>\n </button>\n <mat-menu #menu>\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\">\n </ng-container>\n </ng-container>\n </mat-menu>\n\n <img src=\"assets/images/logo.svg\" class=\"toolbar-logo\"/>\n <img *ngIf=\"settingsService.settings.secondaryLogo\" [src]=\"settingsService.settings.secondaryLogo\"\n class=\"toolbar-logo secondary-logo\"/>\n <ng-container *ngIf=\"settingsService.settings.options.development\">\n <mat-card class=\"wip-card\">\n <mat-card-content>\n {{ 'WORK_IN_PROGRESS' | localize }}\n </mat-card-content>\n </mat-card>\n <button mat-icon-button (click)=\"loadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">weekend</mat-icon>\n </button>\n <button mat-icon-button (click)=\"loadResizableRoom()\">\n <mat-icon class=\"homedecorator-material-icons\">camera-control</mat-icon>\n </button>\n </ng-container>\n <ng-container *ngIf=\"settingsService.settings.options.showRoomDownloadButton\">\n <button mat-icon-button (click)=\"downloadRoom()\">\n <mat-icon class=\"homedecorator-material-icons\" matTooltip=\"{{'DOWNLOAD_ROOM_AS_GLB' | localize}}\">cloud_download</mat-icon>\n </button>\n </ng-container>\n <div class=\"hd-toolbar-spacer\"></div>\n\n<!-- <ng-container>-->\n<!-- <rp-pdf-export></rp-pdf-export>-->\n<!-- </ng-container>-->\n\n <mat-nav-list class=\"toolbar__nav\" role=\"list\">\n <div matTooltip=\"{{'NEW_ROOM' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"newRoom()\">{{ 'NEW' | localize }}</mat-list-item>\n </div>\n <div matTooltip=\"{{'OPEN_EXISTING_PLAN' | localize}}\">\n <mat-list-item role=\"listitem\" (click)=\"openOpenDialog()\">{{ 'OPEN' | localize }}</mat-list-item>\n </div>\n <div *ngIf=\"storageService.errorWhenSaving\" class=\"storage-error\"\n [class.blinker]=\"showBlinkError\" matTooltip=\"{{'ERROR_SAVING_LOCALSTORAGE' | localize}}\"\n (mousemove)=\"showBlinkError = false\"\n ><span>!</span></div>\n <div [class.blinker]=\"!showSaveNotification\" matTooltip=\"{{'SAVE_THE_PLAN' | localize}}\">\n <mat-list-item\n matTooltip=\"{{'SAVE_TOOLTIP' | localize}}\"\n [matTooltipDisabled]=\"tooltipDisabled\"\n matTooltipClass=\"tooltip-red\"\n role=\"listitem\"\n (click)=\"openSaveDialog() && stopTimer()\"\n >{{ 'SAVE' | localize }}\n </mat-list-item>\n </div>\n <div\n class=\"badge\"\n matBadge=\"!\"\n matBadgeColor=\"warn\"\n matBadgePosition=\"below before\"\n matBadgeOverlap=\"true\"\n matBadgeSize=\"medium\"\n [matBadgeHidden]=\"badgeDisabled\">\n </div>\n </mat-nav-list>\n <div matTooltip=\"{{'SAVE_IMAGE' | localize}}\">\n <button mat-icon-button (click)=\"onTakeScreenshotClick()\">\n <mat-icon class=\"homedecorator-material-icons\">photo_camera</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'UNDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Undo)\"\n [disabled]=\"presetsService.isLoading || !appState.canUndo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">undo</mat-icon>\n </button>\n </div>\n <div matTooltip=\"{{'REDO' | localize}}\">\n <button mat-icon-button (click)=\"messageService.emit(messageType.Redo)\"\n [disabled]=\"presetsService.isLoading || !appState.canRedo()\"\n >\n <mat-icon class=\"homedecorator-material-icons\">redo</mat-icon>\n </button>\n </div>\n <button mat-icon-button *ngIf=\"!fullscreen\" (click)=\"requestFullscreen()\" matTooltip=\"{{'REQUEST_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen</mat-icon>\n </button>\n <button mat-icon-button *ngIf=\"fullscreen\" (click)=\"exitFullscreen()\" matTooltip=\"{{'EXIT_FULLSCREEN' | localize}}\">\n <mat-icon class=\"homedecorator-material-icons\">fullscreen_exit</mat-icon>\n </button>\n </mat-toolbar>\n\n <limited-mode-message\n *ngIf=\"phoneSizeScreen && showLimitedModeMessage\"\n (closeClicked)=\"onCloseLimitedModeMessageClick()\">\n </limited-mode-message>\n\n <div class=\"toast-wrapper\"\n [class.success]=\"toast.type == toastType.Success\"\n [class.warning]=\"toast.type == toastType.Warning\"\n [class.error]=\"toast.type == toastType.Error\"\n *ngIf=\"toast\"\n @showToast\n [textContent]=\"toast.message\">\n </div>\n\n <mat-toolbar-row class=\"toolbar-row\">\n <mat-toolbar class=\"toolbar toolbar--secondary\" *ngIf=\"!phoneSizeScreen\">\n <ng-container *ngFor=\"let icon of toolbarIconsTop\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n <span class=\"hd-toolbar-spacer\"></span>\n <ng-container *ngFor=\"let icon of toolbarIconsBottom\">\n <ng-container [cdkPortalOutlet]=\"icon.portal\"></ng-container>\n </ng-container>\n </mat-toolbar>\n\n <mat-drawer-container class=\"drawer-container\">\n <mat-drawer class=\"drawer\" mode=\"over\" position=\"left\" #leftSidebar>\n <mat-drawer-content class=\"drawer__body\">\n <button class=\"drawer__button\" mat-icon-button (click)=\"clickCloseLeftSidebar()\">\n <mat-icon class=\"homedecorator-material-icons\">clear</mat-icon>\n </button>\n <ng-container [cdkPortalOutlet]=\"leftPortal\"></ng-container>\n </mat-drawer-content>\n </mat-drawer>\n </mat-drawer-container>\n </mat-toolbar-row>\n <!--\n </div>\n -->\n ",
|
|
44346
45246
|
styleUrls: ['./toolbar.component.scss'],
|
|
44347
45247
|
animations: [
|
|
44348
45248
|
animations.trigger('showToast', [
|
|
@@ -44480,13 +45380,14 @@
|
|
|
44480
45380
|
this.file = null;
|
|
44481
45381
|
this.fileMaxSize = 30; // file size in mb
|
|
44482
45382
|
this._maxFileSize = this.fileMaxSize * 1024 * 1024; // fileMaxSize to kb
|
|
44483
|
-
this._allowedFiles = ['glb', 'obj', 'fbx', '3ds', 'gltf'];
|
|
45383
|
+
this._allowedFiles = ['glb', 'obj', 'fbx', '3ds', 'gltf', 'stl'];
|
|
44484
45384
|
}
|
|
44485
45385
|
ModelUploaderComponent.prototype.ngOnInit = function () {
|
|
44486
45386
|
};
|
|
44487
45387
|
ModelUploaderComponent.prototype.ngOnDestroy = function () {
|
|
44488
45388
|
};
|
|
44489
45389
|
ModelUploaderComponent.prototype.onChange = function (event) {
|
|
45390
|
+
this.showUploadError = false;
|
|
44490
45391
|
var file = event.target.files[0];
|
|
44491
45392
|
if (file) {
|
|
44492
45393
|
this.file = file;
|
|
@@ -44733,7 +45634,7 @@
|
|
|
44733
45634
|
if (!jsonString) return [3 /*break*/, 4];
|
|
44734
45635
|
jsonObj_1 = JSON.parse(jsonString);
|
|
44735
45636
|
if (!(jsonObj_1['hash'] !== undefined)) return [3 /*break*/, 4];
|
|
44736
|
-
customerName =
|
|
45637
|
+
customerName = this.catalogInfo.username;
|
|
44737
45638
|
modelUrl_1 = this.catalogInfo.externalSource.domain + '/models/' + jsonObj_1['hash'] + '/glb';
|
|
44738
45639
|
configurationUrl = this.catalogInfo.externalSource.domain + '/configurationData/' + jsonObj_1['hash'];
|
|
44739
45640
|
priceDataUrl = this.catalogInfo.externalSource.domain + '/rules/api/' + customerName.toLowerCase() + '/' + jsonObj_1['hash'];
|
|
@@ -47070,6 +47971,123 @@
|
|
|
47070
47971
|
}]
|
|
47071
47972
|
}] });
|
|
47072
47973
|
|
|
47974
|
+
var ExportPdfComponent = /** @class */ (function () {
|
|
47975
|
+
function ExportPdfComponent(_sceneService, _floorService, _messageBusService) {
|
|
47976
|
+
var _this = this;
|
|
47977
|
+
this._sceneService = _sceneService;
|
|
47978
|
+
this._floorService = _floorService;
|
|
47979
|
+
this._messageBusService = _messageBusService;
|
|
47980
|
+
this._subs = [];
|
|
47981
|
+
this._diagramBackground = '';
|
|
47982
|
+
this._subs.push(this._messageBusService.subscribe(MessageType.LoadScaledDiagram, function (input) { return _this.setDiagramBackground(input); }));
|
|
47983
|
+
}
|
|
47984
|
+
ExportPdfComponent.prototype.ngOnDestroy = function () {
|
|
47985
|
+
this._subs.forEach(function (s) { return s.unsubscribe(); });
|
|
47986
|
+
};
|
|
47987
|
+
ExportPdfComponent.prototype.getFloor = function () {
|
|
47988
|
+
var e_1, _a;
|
|
47989
|
+
var activeFloor = this._floorService.floorToConfigure.metadata;
|
|
47990
|
+
var output = [];
|
|
47991
|
+
if (activeFloor) {
|
|
47992
|
+
var floorCountResult = activeFloor.floorCountResult;
|
|
47993
|
+
output.push(['Planken links', floorCountResult.left.toString()]);
|
|
47994
|
+
output.push(['Planken rechts', floorCountResult.right.toString()]);
|
|
47995
|
+
output.push(['Hoek', floorCountResult.edge.toString()]);
|
|
47996
|
+
output.push(['Totaal aantal planken', floorCountResult.total.toString()]);
|
|
47997
|
+
var selectedSelections = activeFloor.selections;
|
|
47998
|
+
try {
|
|
47999
|
+
for (var selectedSelections_1 = __values(selectedSelections), selectedSelections_1_1 = selectedSelections_1.next(); !selectedSelections_1_1.done; selectedSelections_1_1 = selectedSelections_1.next()) {
|
|
48000
|
+
var selectedSelection = selectedSelections_1_1.value;
|
|
48001
|
+
if (selectedSelection.commercialAnswer !== undefined) {
|
|
48002
|
+
output.push([selectedSelection.commercialQuestion, selectedSelection.commercialAnswer]);
|
|
48003
|
+
}
|
|
48004
|
+
}
|
|
48005
|
+
}
|
|
48006
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
48007
|
+
finally {
|
|
48008
|
+
try {
|
|
48009
|
+
if (selectedSelections_1_1 && !selectedSelections_1_1.done && (_a = selectedSelections_1.return)) _a.call(selectedSelections_1);
|
|
48010
|
+
}
|
|
48011
|
+
finally { if (e_1) throw e_1.error; }
|
|
48012
|
+
}
|
|
48013
|
+
console.log(output);
|
|
48014
|
+
}
|
|
48015
|
+
return output;
|
|
48016
|
+
};
|
|
48017
|
+
ExportPdfComponent.prototype.generatePdf = function () {
|
|
48018
|
+
// get all data
|
|
48019
|
+
var sceneImage = this._createSceneScreenshot();
|
|
48020
|
+
var doc = new jspdf.jsPDF();
|
|
48021
|
+
var dataList = this.getFloor();
|
|
48022
|
+
var dataListLength = dataList.length;
|
|
48023
|
+
autoTable__default["default"](doc, {
|
|
48024
|
+
head: [['Header', 'Value']],
|
|
48025
|
+
body: dataList,
|
|
48026
|
+
bodyStyles: { minCellHeight: 10 }
|
|
48027
|
+
});
|
|
48028
|
+
doc.addPage();
|
|
48029
|
+
doc.addImage(sceneImage, 'JPEG', 0, 0, 210, 117); // size is in mm not pixels!
|
|
48030
|
+
if (this._diagramBackground !== '') {
|
|
48031
|
+
doc.addPage();
|
|
48032
|
+
var offsetYImageTwo = 30 + 125 + (dataListLength * 10);
|
|
48033
|
+
doc.addImage(this._diagramBackground, 'JPEG', 0, 0, 210, 117); // size is in mm not pixels!
|
|
48034
|
+
}
|
|
48035
|
+
doc.save('sample.pdf');
|
|
48036
|
+
};
|
|
48037
|
+
ExportPdfComponent.prototype.setDiagramBackground = function (input) {
|
|
48038
|
+
this._diagramBackground = input.background.src;
|
|
48039
|
+
};
|
|
48040
|
+
ExportPdfComponent.prototype._createSceneScreenshot = function () {
|
|
48041
|
+
return this._sceneService.createRenderWithOrthographicCamera();
|
|
48042
|
+
// return this._sceneService.getSceneCanvasImage();
|
|
48043
|
+
};
|
|
48044
|
+
return ExportPdfComponent;
|
|
48045
|
+
}());
|
|
48046
|
+
ExportPdfComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfComponent, deps: [{ token: SceneService }, { token: FloorService }, { token: MessageBusService }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
48047
|
+
ExportPdfComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ExportPdfComponent, selector: "rp-pdf-export", ngImport: i0__namespace, template: "\n <div>\n <button (click)=\"generatePdf()\">Generate PDF</button>\n </div>\n ", isInline: true, styles: [":host .mat-dialog-content{margin:0;padding:0;overflow:hidden}:host .mat-nav-list{display:flex;flex-direction:column}.mat-dialog-actions{margin-bottom:0}.item-description{white-space:inherit!important}\n"] });
|
|
48048
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfComponent, decorators: [{
|
|
48049
|
+
type: i0.Component,
|
|
48050
|
+
args: [{
|
|
48051
|
+
selector: 'rp-pdf-export',
|
|
48052
|
+
template: "\n <div>\n <button (click)=\"generatePdf()\">Generate PDF</button>\n </div>\n ",
|
|
48053
|
+
styleUrls: ['./pdf-export.component.scss']
|
|
48054
|
+
}]
|
|
48055
|
+
}], ctorParameters: function () { return [{ type: SceneService }, { type: FloorService }, { type: MessageBusService }]; } });
|
|
48056
|
+
|
|
48057
|
+
var ExportPdfModule = /** @class */ (function () {
|
|
48058
|
+
function ExportPdfModule() {
|
|
48059
|
+
}
|
|
48060
|
+
return ExportPdfModule;
|
|
48061
|
+
}());
|
|
48062
|
+
ExportPdfModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
48063
|
+
ExportPdfModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfModule, declarations: [ExportPdfComponent], imports: [CoreModule,
|
|
48064
|
+
i5.CommonModule,
|
|
48065
|
+
i1$1.MatDialogModule,
|
|
48066
|
+
i2$2.MatListModule], exports: [ExportPdfComponent] });
|
|
48067
|
+
ExportPdfModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfModule, imports: [[
|
|
48068
|
+
CoreModule,
|
|
48069
|
+
i5.CommonModule,
|
|
48070
|
+
i1$1.MatDialogModule,
|
|
48071
|
+
i2$2.MatListModule
|
|
48072
|
+
]] });
|
|
48073
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ExportPdfModule, decorators: [{
|
|
48074
|
+
type: i0.NgModule,
|
|
48075
|
+
args: [{
|
|
48076
|
+
imports: [
|
|
48077
|
+
CoreModule,
|
|
48078
|
+
i5.CommonModule,
|
|
48079
|
+
i1$1.MatDialogModule,
|
|
48080
|
+
i2$2.MatListModule
|
|
48081
|
+
],
|
|
48082
|
+
exports: [
|
|
48083
|
+
ExportPdfComponent
|
|
48084
|
+
],
|
|
48085
|
+
declarations: [
|
|
48086
|
+
ExportPdfComponent
|
|
48087
|
+
]
|
|
48088
|
+
}]
|
|
48089
|
+
}] });
|
|
48090
|
+
|
|
47073
48091
|
var ToolbarModule = /** @class */ (function () {
|
|
47074
48092
|
function ToolbarModule() {
|
|
47075
48093
|
}
|
|
@@ -47114,7 +48132,8 @@
|
|
|
47114
48132
|
i4.IconModule,
|
|
47115
48133
|
i30.MatBadgeModule,
|
|
47116
48134
|
ThreedInPhotoModule,
|
|
47117
|
-
i6$2.PdfViewerModule
|
|
48135
|
+
i6$2.PdfViewerModule,
|
|
48136
|
+
ExportPdfModule], exports: [ToolbarComponent] });
|
|
47118
48137
|
ToolbarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ToolbarModule, imports: [[
|
|
47119
48138
|
CoreModule,
|
|
47120
48139
|
i5.CommonModule,
|
|
@@ -47143,7 +48162,8 @@
|
|
|
47143
48162
|
i4.IconModule,
|
|
47144
48163
|
i30.MatBadgeModule,
|
|
47145
48164
|
ThreedInPhotoModule,
|
|
47146
|
-
i6$2.PdfViewerModule
|
|
48165
|
+
i6$2.PdfViewerModule,
|
|
48166
|
+
ExportPdfModule
|
|
47147
48167
|
]] });
|
|
47148
48168
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ToolbarModule, decorators: [{
|
|
47149
48169
|
type: i0.NgModule,
|
|
@@ -47176,7 +48196,8 @@
|
|
|
47176
48196
|
i4.IconModule,
|
|
47177
48197
|
i30.MatBadgeModule,
|
|
47178
48198
|
ThreedInPhotoModule,
|
|
47179
|
-
i6$2.PdfViewerModule
|
|
48199
|
+
i6$2.PdfViewerModule,
|
|
48200
|
+
ExportPdfModule
|
|
47180
48201
|
],
|
|
47181
48202
|
entryComponents: [
|
|
47182
48203
|
LoadFromCloudDialogComponent,
|
|
@@ -47256,7 +48277,7 @@
|
|
|
47256
48277
|
i4$1.ImageModule,
|
|
47257
48278
|
i7$3.CatalogExternalSourcesModule,
|
|
47258
48279
|
i7$3.CatalogExternalSourceModule,
|
|
47259
|
-
|
|
48280
|
+
i9$1.MatRadioModule], exports: [ModelUploaderComponent] });
|
|
47260
48281
|
ModelUploaderModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelUploaderModule, imports: [[
|
|
47261
48282
|
i5.CommonModule,
|
|
47262
48283
|
CoreModule,
|
|
@@ -47266,7 +48287,7 @@
|
|
|
47266
48287
|
i4$1.ImageModule,
|
|
47267
48288
|
i7$3.CatalogExternalSourcesModule,
|
|
47268
48289
|
i7$3.CatalogExternalSourceModule,
|
|
47269
|
-
|
|
48290
|
+
i9$1.MatRadioModule,
|
|
47270
48291
|
]] });
|
|
47271
48292
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ModelUploaderModule, decorators: [{
|
|
47272
48293
|
type: i0.NgModule,
|
|
@@ -47280,7 +48301,7 @@
|
|
|
47280
48301
|
i4$1.ImageModule,
|
|
47281
48302
|
i7$3.CatalogExternalSourcesModule,
|
|
47282
48303
|
i7$3.CatalogExternalSourceModule,
|
|
47283
|
-
|
|
48304
|
+
i9$1.MatRadioModule,
|
|
47284
48305
|
],
|
|
47285
48306
|
exports: [
|
|
47286
48307
|
ModelUploaderComponent
|