@roomle/web-sdk 2.68.0 → 2.69.0
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/lib/{configurator-08346d05.nomodule.js → configurator-65da998a.nomodule.js} +2 -2
- package/lib/configurator-65da998a.nomodule.js.map +1 -0
- package/lib/{configurator-3922f173.js → configurator-666e8c65.js} +2 -2
- package/lib/configurator-666e8c65.js.map +1 -0
- package/lib/{configurator-main-21b35509.js → configurator-main-76aa9a2b.js} +2 -2
- package/lib/configurator-main-76aa9a2b.js.map +1 -0
- package/lib/configurator-main.nomodule.js +1 -1
- package/lib/{default-light-setting-878cb035.nomodule.js → default-light-setting-1793d4c0.nomodule.js} +2 -2
- package/lib/default-light-setting-1793d4c0.nomodule.js.map +1 -0
- package/lib/{default-light-setting-31e78403.js → default-light-setting-d8fe9af7.js} +2 -2
- package/lib/default-light-setting-d8fe9af7.js.map +1 -0
- package/lib/{glb-viewer-290757c7.js → glb-viewer-5d3baff6.js} +2 -2
- package/lib/{glb-viewer-290757c7.js.map → glb-viewer-5d3baff6.js.map} +1 -1
- package/lib/{glb-viewer-1f6be73b.nomodule.js → glb-viewer-933e235f.nomodule.js} +2 -2
- package/lib/{glb-viewer-1f6be73b.nomodule.js.map → glb-viewer-933e235f.nomodule.js.map} +1 -1
- package/lib/glb-viewer-main-43deb727.js +2 -0
- package/lib/glb-viewer-main-43deb727.js.map +1 -0
- package/lib/glb-viewer-main.nomodule.js +1 -1
- package/lib/legacy/{configurator-37993ad1.legacy.js → configurator-5962e900.legacy.js} +2 -2
- package/lib/legacy/configurator-5962e900.legacy.js.map +1 -0
- package/lib/legacy/configurator-main.legacy.js +1 -1
- package/lib/legacy/{default-light-setting-5644c18e.legacy.js → default-light-setting-eb0fe46a.legacy.js} +2 -2
- package/lib/legacy/default-light-setting-eb0fe46a.legacy.js.map +1 -0
- package/lib/legacy/{glb-viewer-c3aa17ef.legacy.js → glb-viewer-0341188a.legacy.js} +2 -2
- package/lib/legacy/{glb-viewer-c3aa17ef.legacy.js.map → glb-viewer-0341188a.legacy.js.map} +1 -1
- package/lib/legacy/glb-viewer-main.legacy.js +1 -1
- package/lib/legacy/{material-viewer-85899665.legacy.js → material-viewer-4498e854.legacy.js} +2 -2
- package/lib/legacy/material-viewer-4498e854.legacy.js.map +1 -0
- package/lib/legacy/material-viewer-main.legacy.js +1 -1
- package/lib/legacy/{planner-e30dc49a.legacy.js → planner-f91ae5b0.legacy.js} +2 -2
- package/lib/legacy/{planner-e30dc49a.legacy.js.map → planner-f91ae5b0.legacy.js.map} +1 -1
- package/lib/legacy/planner-main.legacy.js +1 -1
- package/lib/legacy/{roomle-configurator-7f741003.legacy.js → roomle-configurator-f95108ad.legacy.js} +2 -2
- package/lib/legacy/roomle-configurator-f95108ad.legacy.js.map +1 -0
- package/lib/legacy/roomle-sdk.legacy.js +1 -1
- package/lib/legacy/scene-manager-767189c5.legacy.js +2 -0
- package/lib/legacy/{scene-manager-3c0cc676.legacy.js.map → scene-manager-767189c5.legacy.js.map} +1 -1
- package/lib/{material-viewer-05119752.js → material-viewer-2ed7b3bc.js} +2 -2
- package/lib/material-viewer-2ed7b3bc.js.map +1 -0
- package/lib/{material-viewer-c839854a.nomodule.js → material-viewer-de60ddd4.nomodule.js} +2 -2
- package/lib/material-viewer-de60ddd4.nomodule.js.map +1 -0
- package/lib/material-viewer-main-1fbbe523.js +2 -0
- package/lib/material-viewer-main-1fbbe523.js.map +1 -0
- package/lib/material-viewer-main.nomodule.js +1 -1
- package/lib/{planner-8b61d530.js → planner-4faac98d.js} +2 -2
- package/lib/{planner-8b61d530.js.map → planner-4faac98d.js.map} +1 -1
- package/lib/{planner-4079b46e.nomodule.js → planner-eabbeff8.nomodule.js} +2 -2
- package/lib/{planner-4079b46e.nomodule.js.map → planner-eabbeff8.nomodule.js.map} +1 -1
- package/lib/{planner-main-4ea3855f.js → planner-main-245fcc70.js} +2 -2
- package/lib/planner-main-245fcc70.js.map +1 -0
- package/lib/planner-main.nomodule.js +1 -1
- package/lib/{roomle-configurator-074b69cf.nomodule.js → roomle-configurator-75dbbdbd.nomodule.js} +2 -2
- package/lib/roomle-configurator-75dbbdbd.nomodule.js.map +1 -0
- package/lib/{roomle-configurator-6dd905c3.js → roomle-configurator-d068c7b4.js} +2 -2
- package/lib/roomle-configurator-d068c7b4.js.map +1 -0
- package/lib/{roomle-sdk-455f20bf.js → roomle-sdk-b1e484f0.js} +2 -2
- package/lib/roomle-sdk-b1e484f0.js.map +1 -0
- package/lib/roomle-sdk.nomodule.js +1 -1
- package/lib/scene-manager-17273ebe.js +2 -0
- package/lib/{scene-manager-155c0eb1.js.map → scene-manager-17273ebe.js.map} +1 -1
- package/lib/scene-manager-867ed8ea.nomodule.js +2 -0
- package/lib/{scene-manager-50ad8aa4.nomodule.js.map → scene-manager-867ed8ea.nomodule.js.map} +1 -1
- package/package.json +2 -2
- package/lib/configurator-08346d05.nomodule.js.map +0 -1
- package/lib/configurator-3922f173.js.map +0 -1
- package/lib/configurator-main-21b35509.js.map +0 -1
- package/lib/default-light-setting-31e78403.js.map +0 -1
- package/lib/default-light-setting-878cb035.nomodule.js.map +0 -1
- package/lib/glb-viewer-main-fcdc76bd.js +0 -2
- package/lib/glb-viewer-main-fcdc76bd.js.map +0 -1
- package/lib/legacy/configurator-37993ad1.legacy.js.map +0 -1
- package/lib/legacy/default-light-setting-5644c18e.legacy.js.map +0 -1
- package/lib/legacy/material-viewer-85899665.legacy.js.map +0 -1
- package/lib/legacy/roomle-configurator-7f741003.legacy.js.map +0 -1
- package/lib/legacy/scene-manager-3c0cc676.legacy.js +0 -2
- package/lib/material-viewer-05119752.js.map +0 -1
- package/lib/material-viewer-c839854a.nomodule.js.map +0 -1
- package/lib/material-viewer-main-92206612.js +0 -2
- package/lib/material-viewer-main-92206612.js.map +0 -1
- package/lib/planner-main-4ea3855f.js.map +0 -1
- package/lib/roomle-configurator-074b69cf.nomodule.js.map +0 -1
- package/lib/roomle-configurator-6dd905c3.js.map +0 -1
- package/lib/roomle-sdk-455f20bf.js.map +0 -1
- package/lib/scene-manager-155c0eb1.js +0 -2
- package/lib/scene-manager-50ad8aa4.nomodule.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-c03cdfaf.nomodule.js","./roomle-dependency-injection-348f3aac.nomodule.js","./scene-manager-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
System.register(["./script-loader-c03cdfaf.nomodule.js","./roomle-dependency-injection-348f3aac.nomodule.js","./scene-manager-867ed8ea.nomodule.js","./component-raycast-helper-f14761c4.nomodule.js","./roomle-configurator-75dbbdbd.nomodule.js","./query-params-helper-519cb51c.nomodule.js","./main-thread-to-worker-38d48e06.nomodule.js","./default-light-setting-1793d4c0.nomodule.js"],(function(e){var n,o,t,r,c,a,i,s,l,u,d,p,f,g;return{setters:[function(e){n=e.S,o=e.M},function(e){t=e.D,r=e.L,c=e.R,a=e.a,i=e.C,s=e.b,l=e.A},function(e){u=e.C,d=e.a},function(e){p=e.default},function(e){f=e.C,g=e.R},function(){},function(){},function(){}],execute:function(){const m=[new t("logger",r),new t("rapi-access",c),new t("script-loader",n),new t("camera-control-3d",u),new t("camera-control",d),new t("data-syncer",a),new t("configurator-scene-manager",f,1),new t("configurator-view-model",i,1),new t("component-raycast-helper",p,0)];e("Configurator",class extends o{setupDependencies(){s.setup(m),this.lookup("planner-kernel-access",this._context).init(1),this.lookup("rapi-access",this._context),this.lookup("script-loader",this._context),this.lookup("logger",this._context)}cleanUpGlobals(){delete window.RoomleConfigurator}cleanUpDependencies(){const e=this.lookup("script-loader"),n=this.lookup("rapi-access");this.lookup("dom-helper");const o=this.lookup("configurator-scene-manager");e&&e.cleanUp(),n&&n.cleanUp(),o&&o.cleanUp()}setupGlobals(e){const{kernelInstance:n,kernelContainer:o,planObjectId:t}=e||{};l.init({kernelInstance:n,kernelContainer:o,planObjectId:t})}getApi(){return this._configurator}bootFinished(){this._configurator=new g(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}})}}}));
|
|
2
|
+
//# sourceMappingURL=configurator-65da998a.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-65da998a.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as ScriptLoader,M as Main}from"./script-loader-ea706d37.js";import{D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,a as DataSyncer,C as ConfiguratorViewModel,b as RoomleDependencyInjection,A as AppContext}from"./roomle-dependency-injection-6cc5f1dd.js";import{C as CameraControl3D,a as CameraControl}from"./scene-manager-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
import{S as ScriptLoader,M as Main}from"./script-loader-ea706d37.js";import{D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,a as DataSyncer,C as ConfiguratorViewModel,b as RoomleDependencyInjection,A as AppContext}from"./roomle-dependency-injection-6cc5f1dd.js";import{C as CameraControl3D,a as CameraControl}from"./scene-manager-17273ebe.js";import ComponentRaycastHelper from"./component-raycast-helper-a45b9dfa.js";import{C as ConfiguratorSceneManager,R as RoomleConfigurator}from"./roomle-configurator-d068c7b4.js";import"./query-params-helper-b54bbbb4.js";import"./main-thread-to-worker-307e6096.js";import"./default-light-setting-d8fe9af7.js";const INJECTABLES=[new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("rapi-access",RapiAccess),new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("camera-control-3d",CameraControl3D),new DependencyInjectionAssignment("camera-control",CameraControl),new DependencyInjectionAssignment("data-syncer",DataSyncer),new DependencyInjectionAssignment("configurator-scene-manager",ConfiguratorSceneManager,1),new DependencyInjectionAssignment("configurator-view-model",ConfiguratorViewModel,1),new DependencyInjectionAssignment("component-raycast-helper",ComponentRaycastHelper,0)];class Configurator extends Main{setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("planner-kernel-access",this._context).init(1),this.lookup("rapi-access",this._context),this.lookup("script-loader",this._context),this.lookup("logger",this._context)}cleanUpGlobals(){delete window.RoomleConfigurator}cleanUpDependencies(){const e=this.lookup("script-loader"),n=this.lookup("rapi-access");this.lookup("dom-helper");const o=this.lookup("configurator-scene-manager");e&&e.cleanUp(),n&&n.cleanUp(),o&&o.cleanUp()}setupGlobals(e){const{kernelInstance:n,kernelContainer:o,planObjectId:t}=e||{};AppContext.init({kernelInstance:n,kernelContainer:o,planObjectId:t})}getApi(){return this._configurator}bootFinished(){this._configurator=new RoomleConfigurator(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}}export{Configurator};
|
|
2
|
+
//# sourceMappingURL=configurator-666e8c65.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-666e8c65.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Configurator}from"./configurator-
|
|
2
|
-
//# sourceMappingURL=configurator-main-
|
|
1
|
+
import{Configurator}from"./configurator-666e8c65.js";import"./script-loader-ea706d37.js";import"./query-params-helper-b54bbbb4.js";import"./main-thread-to-worker-307e6096.js";import"./roomle-dependency-injection-6cc5f1dd.js";import"./scene-manager-17273ebe.js";import"./component-raycast-helper-a45b9dfa.js";import"./roomle-configurator-d068c7b4.js";import"./default-light-setting-d8fe9af7.js";(new Configurator).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let o=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-o))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)});
|
|
2
|
+
//# sourceMappingURL=configurator-main-76aa9a2b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-main-76aa9a2b.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./configurator-
|
|
1
|
+
System.register(["./configurator-65da998a.nomodule.js","./script-loader-c03cdfaf.nomodule.js","./query-params-helper-519cb51c.nomodule.js","./main-thread-to-worker-38d48e06.nomodule.js","./roomle-dependency-injection-348f3aac.nomodule.js","./scene-manager-867ed8ea.nomodule.js","./component-raycast-helper-f14761c4.nomodule.js","./roomle-configurator-75dbbdbd.nomodule.js","./default-light-setting-1793d4c0.nomodule.js"],(function(){var e;return{setters:[function(n){e=n.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let n=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
|
|
2
2
|
//# sourceMappingURL=configurator-main.nomodule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./scene-manager-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
System.register(["./scene-manager-867ed8ea.nomodule.js","./roomle-dependency-injection-348f3aac.nomodule.js","./main-thread-to-worker-38d48e06.nomodule.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.O},function(i){e=i.D,n=i.C,o=i.V,s=i.a,h=i.A}],execute:function(){i("D",class extends t{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new e(new n(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new o(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new s(0,0,0)),this._secondDirectionalLight=new e(new n(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new o(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new s(0,0,0)),this._ambientLight=new h(new n(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new s),a=Math.max(Math.max(t.x,t.y),t.z)+1,e=a/2;this._mainDirectionalLight.shadow.camera.top=e,this._mainDirectionalLight.shadow.camera.bottom=-e,this._mainDirectionalLight.shadow.camera.left=-e,this._mainDirectionalLight.shadow.camera.right=e,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=e,this._secondDirectionalLight.shadow.camera.bottom=-e,this._secondDirectionalLight.shadow.camera.left=-e,this._secondDirectionalLight.shadow.camera.right=e,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=a();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new n(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}}}})}}}));
|
|
2
|
+
//# sourceMappingURL=default-light-setting-1793d4c0.nomodule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-1793d4c0.nomodule.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{L as LightSetting}from"./scene-manager-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
import{L as LightSetting}from"./scene-manager-17273ebe.js";import{O as getGUI}from"./roomle-dependency-injection-6cc5f1dd.js";import{D as DirectionalLight,C as Color,V as Vector2,a as Vector3,A as AmbientLight}from"./main-thread-to-worker-307e6096.js";class DefaultLightSetting extends LightSetting{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new DirectionalLight(new Color(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new Vector2(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new Vector3(0,0,0)),this._secondDirectionalLight=new DirectionalLight(new Color(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new Vector2(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new Vector3(0,0,0)),this._ambientLight=new AmbientLight(new Color(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new Vector3),a=Math.max(Math.max(t.x,t.y),t.z)+1,e=a/2;this._mainDirectionalLight.shadow.camera.top=e,this._mainDirectionalLight.shadow.camera.bottom=-e,this._mainDirectionalLight.shadow.camera.left=-e,this._mainDirectionalLight.shadow.camera.right=e,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=e,this._secondDirectionalLight.shadow.camera.bottom=-e,this._secondDirectionalLight.shadow.camera.left=-e,this._secondDirectionalLight.shadow.camera.right=e,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=getGUI();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new Color(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new Color(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new Color(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new Vector3(0,0,0)))}}}}export{DefaultLightSetting as D};
|
|
2
|
+
//# sourceMappingURL=default-light-setting-d8fe9af7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-d8fe9af7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{S as ScriptLoader,M as Main}from"./script-loader-ea706d37.js";import{ao as InputManager,D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,O as getGUI,_ as __decorate,i as inject,e as CANVAS_ID,j as DynamicLightSettingLoader,k as PREDEFINED_LIGHTSETTING,n as dispose,b as RoomleDependencyInjection}from"./roomle-dependency-injection-6cc5f1dd.js";import{C as CameraControl3D,L as LightSetting,S as SceneManager,T as TWEEN_FILE_NAME}from"./scene-manager-155c0eb1.js";import{a as Vector3,ad as Box3,ag as Euler,Q as Quaternion,A as AmbientLight,C as Color,aE as CAMERA_TYPE,aO as getGlbUrl,bw as WebGLRenderer,i as SRGBColorSpace,bk as BasicShadowMap,N as PerspectiveCamera,bM as download}from"./main-thread-to-worker-307e6096.js";import{D as DefaultLightSetting}from"./default-light-setting-31e78403.js";import"./query-params-helper-b54bbbb4.js";const INJECTABLES=[new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("glb-input-manager",class extends InputManager{},1),new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("rapi-access",RapiAccess)];class AdjustableCameraControl3D extends CameraControl3D{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,i,n){let s=new Vector3(-e.x/2,0,-e.z/2),a=new Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new Box3(s,a);let o=new Euler(-Math.PI/2+i,r,0,"ZYX"),c=(new Quaternion).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(c),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class GLBViewerLightSetting extends LightSetting{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new AmbientLight(new Color(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=getGUI();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new Color(e)})}}}class GLBViewerSceneManager extends SceneManager{constructor(e,t){super(e,t,CANVAS_ID.GLB,CAMERA_TYPE.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(DynamicLightSettingLoader.createDynamicLightSettingSource(null,PREDEFINED_LIGHTSETTING.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new GLBViewerLightSetting(this._scene)))}createCameraControl(e,t){this._cameraControl=new AdjustableCameraControl3D(this._creator_,this._getInputManager(),new Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const i=getGlbUrl(r);return i?this.loadGLB(i,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new Vector3(1,1,1),i){return this.clearScene(),new Promise((n,s)=>{this._loadGLB(e,new Vector3(0,0,0),0,void 0,r,void 0,void 0,i).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new Box3).setFromObject(this._currentGLB);if(t){let e=r.getCenter(new Vector3);this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.updateToBounds(r,!1,!0,e),this._cameraControl.reset(r,e,-15,0))}this._updateBounds(r,!0),n()},s)})}preparePerspectiveImage(e,t,r){return new Promise(i=>{t||(t=1e3),r||(r=1e3),e||((e=new WebGLRenderer({antialias:!0})).setSize(t,r),e.outputColorSpace=SRGBColorSpace,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=BasicShadowMap);let n=this._cameraControl.getCamera().clone();n instanceof PerspectiveCamera&&(n.aspect=t/r,n.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new DefaultLightSetting(this._scene);e.render(this._scene,n);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{i({image:a,width:t,height:r,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,r,i){if(this._cameraControl instanceof AdjustableCameraControl3D){let n=(new Box3).setFromObject(this._scene).getSize(new Vector3);this._cameraControl.adjust(n,e,t,r,i),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),dispose(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new Box3).setFromObject(this._currentGLB):null}}__decorate([inject],GLBViewerSceneManager.prototype,"_glbInputManager",void 0),__decorate([inject],GLBViewerSceneManager.prototype,"_rapiAccess",void 0);class GLBRenderWorker{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=SRGBColorSpace}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new Vector3(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class RoomleGLBViewer{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"})]).then(()=>{this._sceneManager=new GLBViewerSceneManager(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new Vector3(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let i=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new GLBRenderWorker(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(i.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{download("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}setEnvironmentMap(e){const{url:t,intensity:r,rotation:i,maxLightSources:n}=e;this._sceneManager.setEnvironmentMap(t,r,i,n)}}__decorate([inject],RoomleGLBViewer.prototype,"_rapiAccess",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_domHelper",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_scriptLoader",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_lifeCycleManager",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_initData",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_globalInitData",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_unitFormatter",void 0);class GlbViewer extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new RoomleGLBViewer(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}}export{GlbViewer};
|
|
2
|
-
//# sourceMappingURL=glb-viewer-
|
|
1
|
+
import{S as ScriptLoader,M as Main}from"./script-loader-ea706d37.js";import{ao as InputManager,D as DependencyInjectionAssignment,L as Logger,R as RapiAccess,O as getGUI,_ as __decorate,i as inject,e as CANVAS_ID,j as DynamicLightSettingLoader,k as PREDEFINED_LIGHTSETTING,n as dispose,b as RoomleDependencyInjection}from"./roomle-dependency-injection-6cc5f1dd.js";import{C as CameraControl3D,L as LightSetting,S as SceneManager,T as TWEEN_FILE_NAME}from"./scene-manager-17273ebe.js";import{a as Vector3,ad as Box3,ag as Euler,Q as Quaternion,A as AmbientLight,C as Color,aE as CAMERA_TYPE,aO as getGlbUrl,bw as WebGLRenderer,i as SRGBColorSpace,bk as BasicShadowMap,N as PerspectiveCamera,bM as download}from"./main-thread-to-worker-307e6096.js";import{D as DefaultLightSetting}from"./default-light-setting-d8fe9af7.js";import"./query-params-helper-b54bbbb4.js";const INJECTABLES=[new DependencyInjectionAssignment("script-loader",ScriptLoader),new DependencyInjectionAssignment("glb-input-manager",class extends InputManager{},1),new DependencyInjectionAssignment("logger",Logger),new DependencyInjectionAssignment("rapi-access",RapiAccess)];class AdjustableCameraControl3D extends CameraControl3D{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,r,i,n){let s=new Vector3(-e.x/2,0,-e.z/2),a=new Vector3(e.x/2,e.y,e.z/2);this._boundingBox=new Box3(s,a);let o=new Euler(-Math.PI/2+i,r,0,"ZYX"),c=(new Quaternion).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(c),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class GLBViewerLightSetting extends LightSetting{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new AmbientLight(new Color(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=getGUI();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new Color(e)})}}}class GLBViewerSceneManager extends SceneManager{constructor(e,t){super(e,t,CANVAS_ID.GLB,CAMERA_TYPE.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(DynamicLightSettingLoader.createDynamicLightSettingSource(null,PREDEFINED_LIGHTSETTING.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new GLBViewerLightSetting(this._scene)))}createCameraControl(e,t){this._cameraControl=new AdjustableCameraControl3D(this._creator_,this._getInputManager(),new Vector3(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const r=await this._rapiAccess.getItem(e);if(r.configuration)return Promise.reject();const i=getGlbUrl(r);return i?this.loadGLB(i,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,r=new Vector3(1,1,1),i){return this.clearScene(),new Promise((n,s)=>{this._loadGLB(e,new Vector3(0,0,0),0,void 0,r,void 0,void 0,i).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let r=(new Box3).setFromObject(this._currentGLB);if(t){let e=r.getCenter(new Vector3);this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.updateToBounds(r,!1,!0,e),this._cameraControl.reset(r,e,-15,0))}this._updateBounds(r,!0),n()},s)})}preparePerspectiveImage(e,t,r){return new Promise(i=>{t||(t=1e3),r||(r=1e3),e||((e=new WebGLRenderer({antialias:!0})).setSize(t,r),e.outputColorSpace=SRGBColorSpace,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=BasicShadowMap);let n=this._cameraControl.getCamera().clone();n instanceof PerspectiveCamera&&(n.aspect=t/r,n.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new DefaultLightSetting(this._scene);e.render(this._scene,n);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{i({image:a,width:t,height:r,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,r,i){if(this._cameraControl instanceof AdjustableCameraControl3D){let n=(new Box3).setFromObject(this._scene).getSize(new Vector3);this._cameraControl.adjust(n,e,t,r,i),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof AdjustableCameraControl3D&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),dispose(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new Box3).setFromObject(this._currentGLB):null}}__decorate([inject],GLBViewerSceneManager.prototype,"_glbInputManager",void 0),__decorate([inject],GLBViewerSceneManager.prototype,"_rapiAccess",void 0);class GLBRenderWorker{constructor(e,t,r){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new WebGLRenderer({antialias:!0,alpha:!0}),this._width=t,this._height=r,this._renderer.setSize(t,r),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=SRGBColorSpace}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new Vector3(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let r=this._entries.indexOf(e);r>-1&&this._entries.splice(r,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class RoomleGLBViewer{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(TWEEN_FILE_NAME,{id:"tween-js"})]).then(()=>{this._sceneManager=new GLBViewerSceneManager(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,r){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new Vector3(t,t,t),r)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,r=320){let i=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new GLBRenderWorker(this._sceneManager,t,r);e.addListener(this._sceneManager),e.start(i.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{download("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}setEnvironmentMap(e){const{url:t,intensity:r,rotation:i,maxLightSources:n}=e;this._sceneManager.setEnvironmentMap(t,r,i,n)}}__decorate([inject],RoomleGLBViewer.prototype,"_rapiAccess",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_domHelper",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_scriptLoader",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_lifeCycleManager",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_initData",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_globalInitData",void 0),__decorate([inject],RoomleGLBViewer.prototype,"_unitFormatter",void 0);class GlbViewer extends Main{setupGlobals(){}setupDependencies(){RoomleDependencyInjection.setup(INJECTABLES),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new RoomleGLBViewer(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}}export{GlbViewer};
|
|
2
|
+
//# sourceMappingURL=glb-viewer-5d3baff6.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glb-viewer-
|
|
1
|
+
{"version":3,"file":"glb-viewer-5d3baff6.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"qkQAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-c03cdfaf.nomodule.js","./roomle-dependency-injection-348f3aac.nomodule.js","./scene-manager-
|
|
2
|
-
//# sourceMappingURL=glb-viewer-
|
|
1
|
+
System.register(["./script-loader-c03cdfaf.nomodule.js","./roomle-dependency-injection-348f3aac.nomodule.js","./scene-manager-867ed8ea.nomodule.js","./main-thread-to-worker-38d48e06.nomodule.js","./default-light-setting-1793d4c0.nomodule.js","./query-params-helper-519cb51c.nomodule.js"],(function(e){var t,i,r,n,s,a,o,h,c,d,l,_,m,u,p,g,w,f,b,S,v,C,L,M,y,I,B,x,j,G,E,O;return{setters:[function(e){t=e.S,i=e.M},function(e){r=e.ao,n=e.D,s=e.L,a=e.R,o=e.O,h=e._,c=e.i,d=e.e,l=e.j,_=e.k,m=e.n,u=e.b},function(e){p=e.C,g=e.L,w=e.S,f=e.T},function(e){b=e.a,S=e.ad,v=e.ag,C=e.Q,L=e.A,M=e.C,y=e.aE,I=e.aO,B=e.bw,x=e.i,j=e.bk,G=e.N,E=e.bM},function(e){O=e.D},function(){}],execute:function(){const F=[new n("script-loader",t),new n("glb-input-manager",class extends r{},1),new n("logger",s),new n("rapi-access",a)];class D extends p{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,i,r,n){let s=new b(-e.x/2,0,-e.z/2),a=new b(e.x/2,e.y,e.z/2);this._boundingBox=new S(s,a);let o=new v(-Math.PI/2+r,i,0,"ZYX"),h=(new C).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class P extends g{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new L(new M(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=o();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new M(e)})}}}class z extends w{constructor(e,t){super(e,t,d.GLB,y.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(l.createDynamicLightSettingSource(null,_.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new P(this._scene)))}createCameraControl(e,t){this._cameraControl=new D(this._creator_,this._getInputManager(),new b(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const i=await this._rapiAccess.getItem(e);if(i.configuration)return Promise.reject();const r=I(i);return r?this.loadGLB(r,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,i=new b(1,1,1),r){return this.clearScene(),new Promise((n,s)=>{this._loadGLB(e,new b(0,0,0),0,void 0,i,void 0,void 0,r).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let i=(new S).setFromObject(this._currentGLB);if(t){let e=i.getCenter(new b);this._cameraControl instanceof D&&(this._cameraControl.updateToBounds(i,!1,!0,e),this._cameraControl.reset(i,e,-15,0))}this._updateBounds(i,!0),n()},s)})}preparePerspectiveImage(e,t,i){return new Promise(r=>{t||(t=1e3),i||(i=1e3),e||((e=new B({antialias:!0})).setSize(t,i),e.outputColorSpace=x,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=j);let n=this._cameraControl.getCamera().clone();n instanceof G&&(n.aspect=t/i,n.updateProjectionMatrix()),this._lightSetting.removeFromScene();let s=new O(this._scene);e.render(this._scene,n);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{r({image:a,width:t,height:i,blob:e})},"image/png"),s.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,i,r){if(this._cameraControl instanceof D){let n=(new S).setFromObject(this._scene).getSize(new b);this._cameraControl.adjust(n,e,t,i,r),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof D&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof D&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),m(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new S).setFromObject(this._currentGLB):null}}h([c],z.prototype,"_glbInputManager",void 0),h([c],z.prototype,"_rapiAccess",void 0);class k{constructor(e,t,i){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new B({antialias:!0,alpha:!0}),this._width=t,this._height=i,this._renderer.setSize(t,i),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=x}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new b(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let i=this._entries.indexOf(e);i>-1&&this._entries.splice(i,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class A{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(f,{id:"tween-js"})]).then(()=>{this._sceneManager=new z(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,i){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new b(t,t,t),i)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,i=320){let r=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new k(this._sceneManager,t,i);e.addListener(this._sceneManager),e.start(r.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{E("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}setEnvironmentMap(e){const{url:t,intensity:i,rotation:r,maxLightSources:n}=e;this._sceneManager.setEnvironmentMap(t,i,r,n)}}h([c],A.prototype,"_rapiAccess",void 0),h([c],A.prototype,"_domHelper",void 0),h([c],A.prototype,"_scriptLoader",void 0),h([c],A.prototype,"_lifeCycleManager",void 0),h([c],A.prototype,"_initData",void 0),h([c],A.prototype,"_globalInitData",void 0),h([c],A.prototype,"_unitFormatter",void 0),e("GlbViewer",class extends i{setupGlobals(){}setupDependencies(){u.setup(F),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new A(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
|
|
2
|
+
//# sourceMappingURL=glb-viewer-933e235f.nomodule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glb-viewer-
|
|
1
|
+
{"version":3,"file":"glb-viewer-933e235f.nomodule.js","sources":["../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"2mOAAe"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{GlbViewer}from"./glb-viewer-5d3baff6.js";import"./script-loader-ea706d37.js";import"./query-params-helper-b54bbbb4.js";import"./main-thread-to-worker-307e6096.js";import"./roomle-dependency-injection-6cc5f1dd.js";import"./scene-manager-17273ebe.js";import"./default-light-setting-d8fe9af7.js";(new GlbViewer).boot();
|
|
2
|
+
//# sourceMappingURL=glb-viewer-main-43deb727.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glb-viewer-main-43deb727.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./glb-viewer-
|
|
1
|
+
System.register(["./glb-viewer-933e235f.nomodule.js","./script-loader-c03cdfaf.nomodule.js","./query-params-helper-519cb51c.nomodule.js","./main-thread-to-worker-38d48e06.nomodule.js","./roomle-dependency-injection-348f3aac.nomodule.js","./scene-manager-867ed8ea.nomodule.js","./default-light-setting-1793d4c0.nomodule.js"],(function(){var e;return{setters:[function(n){e=n.GlbViewer},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
|
|
2
2
|
//# sourceMappingURL=glb-viewer-main.nomodule.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-0733732f.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-
|
|
2
|
-
//# sourceMappingURL=configurator-
|
|
1
|
+
System.register(["./script-loader-0733732f.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-767189c5.legacy.js","./component-raycast-helper-91921851.legacy.js","./roomle-configurator-f95108ad.legacy.js","./query-params-helper-871c582e.legacy.js","./main-thread-to-worker-11930382.legacy.js","./default-light-setting-eb0fe46a.legacy.js"],(function(e){var n,t,o,r,a,c,i,s,l,u,p,g,f,h;return{setters:[function(e){n=e.S,t=e.M},function(e){o=e.D,r=e.L,a=e.R,c=e.a,i=e.C,s=e.b,l=e.A},function(e){u=e.C,p=e.a},function(e){g=e.default},function(e){f=e.C,h=e.R},function(){},function(){},function(){}],execute:function(){const d=[new o("logger",r),new o("rapi-access",a),new o("script-loader",n),new o("camera-control-3d",u),new o("camera-control",p),new o("data-syncer",c),new o("configurator-scene-manager",f,1),new o("configurator-view-model",i,1),new o("component-raycast-helper",g,0)];e("Configurator",class extends t{setupDependencies(){s.setup(d),this.lookup("planner-kernel-access",this._context).init(1),this.lookup("rapi-access",this._context),this.lookup("script-loader",this._context),this.lookup("logger",this._context)}cleanUpGlobals(){delete window.RoomleConfigurator}cleanUpDependencies(){const e=this.lookup("script-loader"),n=this.lookup("rapi-access");this.lookup("dom-helper");const t=this.lookup("configurator-scene-manager");e&&e.cleanUp(),n&&n.cleanUp(),t&&t.cleanUp()}setupGlobals(e){const{kernelInstance:n,kernelContainer:t,planObjectId:o}=e||{};l.init({kernelInstance:n,kernelContainer:t,planObjectId:o})}getApi(){return this._configurator}bootFinished(){this._configurator=new h(this._context),this._configurator.getMain=()=>this,window.RoomleConfigurator||(window.RoomleConfigurator=this._configurator)}getContextName(){return"configurator"}})}}}));
|
|
2
|
+
//# sourceMappingURL=configurator-5962e900.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configurator-5962e900.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./configurator-
|
|
1
|
+
System.register(["./configurator-5962e900.legacy.js","./script-loader-0733732f.legacy.js","./query-params-helper-871c582e.legacy.js","./main-thread-to-worker-11930382.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-767189c5.legacy.js","./component-raycast-helper-91921851.legacy.js","./roomle-configurator-f95108ad.legacy.js","./default-light-setting-eb0fe46a.legacy.js"],(function(){var e;return{setters:[function(n){e=n.Configurator},function(){},function(){},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot(),window.requestIdleCallback||(window.requestIdleCallback=e=>setTimeout(()=>{let n=Date.now();e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},1)),window.cancelIdleCallback||(window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)})}}}));
|
|
2
2
|
//# sourceMappingURL=configurator-main.legacy.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./scene-manager-
|
|
2
|
-
//# sourceMappingURL=default-light-setting-
|
|
1
|
+
System.register(["./scene-manager-767189c5.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./main-thread-to-worker-11930382.legacy.js"],(function(i){var t,a,e,n,o,s,h;return{setters:[function(i){t=i.L},function(i){a=i.O},function(i){e=i.D,n=i.C,o=i.V,s=i.a,h=i.A}],execute:function(){i("D",class extends t{constructor(i,t){super(i,t),this._params={ambientLight:{color:"#ffffff"},mainDirLight:{position:{x:-3,y:4,z:4},color:"#ffffff"},secondDirLight:{position:{x:3,y:4,z:3},color:"#ffffff"}},this._mainDirectionalLight=new e(new n(this._params.mainDirLight.color),.8),this._mainDirectionalLight.position.set(this._params.mainDirLight.position.x,this._params.mainDirLight.position.y,this._params.mainDirLight.position.z),this._mainDirectionalLight.layers.set(1),this._mainDirectionalLight.castShadow=!0,this._mainDirectionalLight.shadow.camera.near=.1,this._mainDirectionalLight.shadow.camera.far=100,this._mainDirectionalLight.shadow.mapSize=new o(1024,1024),this._mainDirectionalLight.visible=!0,this._mainDirectionalLight.lookAt(new s(0,0,0)),this._secondDirectionalLight=new e(new n(this._params.secondDirLight.color),.2),this._secondDirectionalLight.position.set(this._params.secondDirLight.position.x,this._params.secondDirLight.position.y,this._params.secondDirLight.position.z),this._secondDirectionalLight.layers.set(1),this._secondDirectionalLight.castShadow=!1,this._secondDirectionalLight.shadow.camera.near=.1,this._secondDirectionalLight.shadow.camera.far=100,this._secondDirectionalLight.shadow.mapSize=new o(1024,1024),this._secondDirectionalLight.visible=!0,this._secondDirectionalLight.lookAt(new s(0,0,0)),this._ambientLight=new h(new n(this._params.ambientLight.color),.5),this._ambientLight.layers.set(1),this.addToScene()}needsBounds(){return!0}updateBounds(i){const t=i.getSize(new s),a=Math.max(Math.max(t.x,t.y),t.z)+1,e=a/2;this._mainDirectionalLight.shadow.camera.top=e,this._mainDirectionalLight.shadow.camera.bottom=-e,this._mainDirectionalLight.shadow.camera.left=-e,this._mainDirectionalLight.shadow.camera.right=e,this._mainDirectionalLight.shadow.camera.near=.01,this._mainDirectionalLight.shadow.camera.far=4*a,this._mainDirectionalLight.shadow.camera.updateProjectionMatrix(),this._secondDirectionalLight.shadow.camera.top=e,this._secondDirectionalLight.shadow.camera.bottom=-e,this._secondDirectionalLight.shadow.camera.left=-e,this._secondDirectionalLight.shadow.camera.right=e,this._secondDirectionalLight.shadow.camera.near=.01,this._secondDirectionalLight.shadow.camera.far=4*a,this._secondDirectionalLight.shadow.camera.updateProjectionMatrix()}addToScene(){this._scene.add(this._mainDirectionalLight),this._scene.add(this._secondDirectionalLight),this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._mainDirectionalLight),this._scene.remove(this._secondDirectionalLight),this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let i=a();if(i){if(this._ambientLight){let t=i.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(i=>this._ambientLight.color=new n(i))}if(this._mainDirectionalLight){let t=i.addFolder("Main Directional Light");t.add(this._mainDirectionalLight,"visible"),t.add(this._mainDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._mainDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._mainDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._mainDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}if(this._secondDirectionalLight){let t=i.addFolder("Second Directional Light");t.add(this._secondDirectionalLight,"visible"),t.add(this._secondDirectionalLight,"intensity").min(0).max(10).step(.1),t.add(this._secondDirectionalLight,"castShadow"),t.addColor(this._params.mainDirLight,"color").onChange(i=>this._mainDirectionalLight.color=new n(i)),t.add(this._secondDirectionalLight.position,"x").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"y").min(-10).max(50).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0))),t.add(this._secondDirectionalLight.position,"z").min(-10).max(10).step(.1).onChange(()=>this._mainDirectionalLight.lookAt(new s(0,0,0)))}}}})}}}));
|
|
2
|
+
//# sourceMappingURL=default-light-setting-eb0fe46a.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-light-setting-eb0fe46a.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-0733732f.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-
|
|
2
|
-
//# sourceMappingURL=glb-viewer-
|
|
1
|
+
System.register(["./script-loader-0733732f.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-767189c5.legacy.js","./main-thread-to-worker-11930382.legacy.js","./default-light-setting-eb0fe46a.legacy.js","./query-params-helper-871c582e.legacy.js"],(function(e){var t,i,r,s,n,a,o,h,c,l,d,_,m,u,p,g,w,f,b,S,v,C,L,y,M,I,B,x,G,j,E,O;return{setters:[function(e){t=e.S,i=e.M},function(e){r=e.ao,s=e.D,n=e.L,a=e.R,o=e.O,h=e._,c=e.i,l=e.e,d=e.j,_=e.k,m=e.n,u=e.b},function(e){p=e.C,g=e.L,w=e.S,f=e.T},function(e){b=e.a,S=e.ak,v=e.ap,C=e.Q,L=e.A,y=e.C,M=e.aN,I=e.aY,B=e.bG,x=e.l,G=e.bw,j=e.Y,E=e.bW},function(e){O=e.D},function(){}],execute:function(){const F=[new s("script-loader",t),new s("glb-input-manager",class extends r{},1),new s("logger",n),new s("rapi-access",a)];class D extends p{constructor(){super(...arguments),this.shouldIgnoreStandardBehavior=!1}adjust(e,t,i,r,s){let n=new b(-e.x/2,0,-e.z/2),a=new b(e.x/2,e.y,e.z/2);this._boundingBox=new S(n,a);let o=new v(-Math.PI/2+r,i,0,"ZYX"),h=(new C).setFromEuler(o);this._camera.updateProjectionMatrix(),this._camera.quaternion.copy(h),this._camera.position.copy(t)}_update(e){this.shouldIgnoreStandardBehavior?this._saveYawAndPitch():super._update(e)}animateCamera(e){return!!this.shouldIgnoreStandardBehavior||super.animateCamera(e)}}class P extends g{constructor(e,t){super(e,t),this._params={ambientLight:{color:"#ffffff"}},this._ambientLight=new L(new y(this._params.ambientLight.color),.5),this.addToScene()}addToScene(){this._scene.add(this._ambientLight)}removeFromScene(){this._scene.remove(this._ambientLight)}reload(){this.removeFromScene(),this.addToScene()}showGUI(){let e=o();if(e&&this._ambientLight){let t=e.addFolder("Ambient Light");t.add(this._ambientLight,"visible"),t.add(this._ambientLight,"intensity").min(0).max(5).step(.1),t.addColor(this._params.ambientLight,"color").onChange(e=>{this._ambientLight.color=new y(e)})}}}class z extends w{constructor(e,t){super(e,t,l.GLB,M.CAMERA_3D),this._itemsCount=0,this._standardSceneBackgroundColor=this._scene.background,this._initData.legacyLight&&(this._renderer.capabilities.maxTextures>8?this.loadDynamicLightSetting(d.createDynamicLightSettingSource(null,_.CAMERA)):(console.warn("this device has a maximum of 8 texture units thus we are using a simpler light setting"),this._lightSetting=new P(this._scene)))}createCameraControl(e,t){this._cameraControl=new D(this._creator_,this._getInputManager(),new b(-1,1,1))}_getInputManager(){return this._glbInputManager}async loadStaticItem(e,t){const i=await this._rapiAccess.getItem(e);if(i.configuration)return Promise.reject();const r=I(i);return r?this.loadGLB(r,!0,void 0,t):Promise.reject(new Error("GLB Url not detected"))}loadGLB(e,t=!0,i=new b(1,1,1),r){return this.clearScene(),new Promise((s,n)=>{this._loadGLB(e,new b(0,0,0),0,void 0,i,void 0,void 0,r).then(e=>{this._currentGLB=e,this._scene.add(this._currentGLB);let i=(new S).setFromObject(this._currentGLB);if(t){let e=i.getCenter(new b);this._cameraControl instanceof D&&(this._cameraControl.updateToBounds(i,!1,!0,e),this._cameraControl.reset(i,e,-15,0))}this._updateBounds(i,!0),s()},n)})}preparePerspectiveImage(e,t,i){return new Promise(r=>{t||(t=1e3),i||(i=1e3),e||((e=new B({antialias:!0})).setSize(t,i),e.outputColorSpace=x,e.autoClear=!1,e.shadowMap.enabled=!0,e.shadowMap.type=G);let s=this._cameraControl.getCamera().clone();s instanceof j&&(s.aspect=t/i,s.updateProjectionMatrix()),this._lightSetting.removeFromScene();let n=new O(this._scene);e.render(this._scene,s);let a=e.domElement.toDataURL();e.domElement.toBlob(e=>{r({image:a,width:t,height:i,blob:e})},"image/png"),n.removeFromScene(),this._lightSetting.addToScene()})}adjustCamera(e,t,i,r){if(this._cameraControl instanceof D){let s=(new S).setFromObject(this._scene).getSize(new b);this._cameraControl.adjust(s,e,t,i,r),this._requestRender()}}onStart(e){this._itemsCount=e,this._scene.background=null,this._cameraControl instanceof D&&(this._cameraControl.shouldIgnoreStandardBehavior=!0)}onElementFinished(e){this._itemsCount,Math.round(100/this._itemsCount*e)}onFinished(e){this._scene.background=this._standardSceneBackgroundColor,this._cameraControl instanceof D&&(this._cameraControl.shouldIgnoreStandardBehavior=!1)}clearScene(){this._currentGLB&&(this._scene.remove(this._currentGLB),m(this._currentGLB),this._currentGLB=null),super.clearScene()}enableHD(){super.enableHD()}sceneChanged(){}getBounds(){return this._currentGLB?(new S).setFromObject(this._currentGLB):null}}h([c],z.prototype,"_glbInputManager",void 0),h([c],z.prototype,"_rapiAccess",void 0);class k{constructor(e,t,i){this._prefix="https://furniture.roomle.com/3d/glb/",this._listeners=new Set,this._finishedItems=0,this._sceneManager=e,this._renderer=new B({antialias:!0,alpha:!0}),this._width=t,this._height=i,this._renderer.setSize(t,i),this._renderer.setClearColor(16777215,0),this._renderer.outputColorSpace=x}addListener(e){this._listeners.add(e)}removeListener(e){this._listeners.delete(e)}start(e){return this._entries=[],e.forEach(e=>{this._entries.push(this._transform(e))}),this._finishedItems=0,this._listeners.forEach(e=>e.onStart(this._entries.length)),this._zip=new window.JSZip,this._doNextEntry(),new Promise(e=>{this._resolve=e})}_transform(e){return{name:e.path.replace(".glb",".png"),url:this._prefix+e.path,position:new b(e.camera.position.x,e.camera.position.z,-e.camera.position.y),fov:2*e.camera.fieldOfView,yaw:e.camera.rotation.z,pitch:e.camera.rotation.x}}_doNextEntry(){0===this._entries.length?(this._listeners.forEach(e=>e.onFinished(this._zip)),this._resolve(this._zip)):this._processEntry(this._entries[0])}_processEntry(e){this._sceneManager.loadGLB(e.url,!1,void 0).then(()=>{this._sceneManager.adjustCamera(e.position,e.yaw,e.pitch,e.fov),this._sceneManager.preparePerspectiveImage(this._renderer,this._width,this._height).then(t=>{this._entryFinished(e,t)})})}_entryFinished(e,t){let i=this._entries.indexOf(e);i>-1&&this._entries.splice(i,1),this._finishedItems++,this._listeners.forEach(e=>e.onElementFinished(this._finishedItems)),this._zip.file(e.name,t.blob),this._doNextEntry()}}class A{constructor(e){this._currentIdOrUrl=null,this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e,t){return this.setOverrides(t),this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(f,{id:"tween-js"})]).then(()=>{this._sceneManager=new z(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}clearScene(){this._sceneManager.clearScene()}loadGLB(e,t=1,i){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadGLB(e,!0,new b(t,t,t),i)}loadStaticItem(e,t){return this._currentIdOrUrl=e,this._rapiAccess.trackView(e),this._sceneManager.loadStaticItem(e,t)}getCurrentId(){return this._currentIdOrUrl}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}preparePerspectiveImage(){return this._sceneManager.preparePerspectiveImage()}processRenderList(e,t=320,i=320){let r=JSON.parse(e);this._scriptLoader.fetch("static/jszip.min-c96375d50e72b199.js",{id:"jszip-js"}).then(()=>{let e=new k(this._sceneManager,t,i);e.addListener(this._sceneManager),e.start(r.items).then(t=>{t.generateAsync({type:"blob"}).then(t=>{E("content.zip",URL.createObjectURL(t)),e.removeListener(this._sceneManager)})})})}setOverrides(e){e&&(this._initData.setOverrides(e),this._globalInitData.setOverrides(e))}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}get callbacks(){return{}}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}setEnvironmentMap(e){const{url:t,intensity:i,rotation:r,maxLightSources:s}=e;this._sceneManager.setEnvironmentMap(t,i,r,s)}}h([c],A.prototype,"_rapiAccess",void 0),h([c],A.prototype,"_domHelper",void 0),h([c],A.prototype,"_scriptLoader",void 0),h([c],A.prototype,"_lifeCycleManager",void 0),h([c],A.prototype,"_initData",void 0),h([c],A.prototype,"_globalInitData",void 0),h([c],A.prototype,"_unitFormatter",void 0),e("GlbViewer",class extends i{setupGlobals(){}setupDependencies(){u.setup(F),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new A(this._context),window.RoomleGLBViewer||(window.RoomleGLBViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"glb-viewer"}})}}}));
|
|
2
|
+
//# sourceMappingURL=glb-viewer-0341188a.legacy.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glb-viewer-
|
|
1
|
+
{"version":3,"file":"glb-viewer-0341188a.legacy.js","sources":["../../../node_modules/jszip/dist/jszip.min.js"],"sourcesContent":["export default \"static/jszip.min-c96375d50e72b199.js\""],"names":[],"mappings":"+lOAAe"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./glb-viewer-
|
|
1
|
+
System.register(["./glb-viewer-0341188a.legacy.js","./script-loader-0733732f.legacy.js","./query-params-helper-871c582e.legacy.js","./main-thread-to-worker-11930382.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-767189c5.legacy.js","./default-light-setting-eb0fe46a.legacy.js"],(function(){var e;return{setters:[function(n){e=n.GlbViewer},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
|
|
2
2
|
//# sourceMappingURL=glb-viewer-main.legacy.js.map
|
package/lib/legacy/{material-viewer-85899665.legacy.js → material-viewer-4498e854.legacy.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./script-loader-0733732f.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-
|
|
2
|
-
//# sourceMappingURL=material-viewer-
|
|
1
|
+
System.register(["./script-loader-0733732f.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-767189c5.legacy.js","./main-thread-to-worker-11930382.legacy.js","./query-params-helper-871c582e.legacy.js"],(function(e){var t,a,i,r,s,n,h,l,o,_,m,c,d,g,p,u,M,w,y,C,f,v,S,b,P,x,F,G,I,U,R,T,A,k,D,j;return{setters:[function(e){t=e.S,a=e.M},function(e){i=e._,r=e.i,s=e.e,n=e.j,h=e.k,l=e.M,o=e.aq,_=e.ar,m=e.O,c=e.as,d=e.N,g=e.at,p=e.D,u=e.L,M=e.ao,w=e.au,y=e.R,C=e.b},function(e){f=e.S,v=e.B,S=e.C,b=e.F,P=e.T},function(e){x=e.aN,F=e.aX,G=e.J,I=e.C,U=e.ak,R=e.a,T=e.E,A=e.ac,k=e.b8,D=e.bm,j=e.ag},function(){}],execute:function(){class E extends f{constructor(e,t){super(e,t,s.RMV,x.CAMERA_3D),this._sceneParams={type:"cube"},this._materialParams={color:"#ffffff",metallic:.5,alpha:0,alphaCutoff:0,doubleSided:!1},this._renderer.capabilities.maxTextures>8&&this.loadDynamicLightSetting(n.createDynamicLightSettingSource(null,h.CAMERA)),this._initScene()}_initScene(){const e=new F(1,1,1,100,100,100),t=l.createMeshPhysicalMaterial({color:this._initData.colors.PRIMARY});this._setMaterial(t),this._mesh=new G(e,this._material),this._mesh.castShadow=!0,this._mesh.position.setY(.5),this._scene.add(this._mesh);const{initialFloorMaterial:a}=this._initData;if(a?this.changeFloorMaterialById(a):this._environment=new v(this._scene,null,new I(16777215)),this._cameraControl instanceof S){const e=new U;e.setFromObject(this._mesh),this._cameraControl.updateAndReset(e.getSize(new R),e.getCenter(new R))}this.showGUI()}loadMaterialId(e){return new Promise(t=>{this._configuratorMeshGenerator.loadMaterial(e,1e3,1e3).then(e=>{this._setMaterial(e),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})})}loadMaterial(e){return new Promise(t=>{e.__rapi_path__||(e.__rapi_path__="materials"),this._mesh.material=this._material,this._configuratorMeshGenerator.loadTextures(e,this._material,100,100).then(()=>{this._updateGUI(),this._requestRender()}),t()})}loadMaterialShading(e){return new Promise(t=>{let a={shading:e};this._setMaterial(o(this._material,a)),this._mesh.material=this._material,this._updateGUI(),this._requestRender(),t()})}_setMaterial(e){this._material=e,this._materialParams.alpha=e.opacity,this._materialParams.alphaCutoff=e.alphaTest,this._materialParams.color="#"+e.color.getHexString(),this._materialParams.doubleSided=e.side===T,this._materialParams.metallic=1===e.metalness?1:e.reflectivity}getMaterialShading(e=1){return _(this._material,e)}createCameraControl(e,t){this._cameraControl=new S(this._creator_,this._getInputManager(),new R(-1,1,1))}_getInputManager(){return this._inputManager}sceneChanged(){}getBounds(){return this._mesh?(new U).setFromObject(this._mesh):null}_guiLoaded(){this._updateGUI()}_updateGUI(){let e=m();e&&(this._guiGeometryFolder||(this._guiGeometryFolder=e.addFolder("Geometry"),this._guiGeometryFolder.add(this._sceneParams,"type",{Cube:"cube",Sphere:"sphere",PlaneVertical:"plane_vertical",PlaneHorizontal:"plane_horizontal"}).onChange(e=>{this._setGeometry()})),this._material&&(this._guiMaterialFolder&&e.removeFolder(this._guiMaterialFolder),this._guiMaterialFolder=e.addFolder("Material"),this._guiMaterialFolder.addColor(this._materialParams,"color").onChange(e=>{this._material.color=new I(e),this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"metallic").min(0).max(1).step(.01).onChange(e=>{this._material.metalness=1===e?1:.5,this._material.reflectivity=e||.5,this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"roughness").min(0).max(1).step(.01).onChange(e=>{this._shadingChanged()}),this._guiMaterialFolder.add(this._material,"transmission").min(0).max(1).step(.01).onChange(e=>{this._material.transmission=e,e>0&&(this._material.opacity=1,this._material.alphaTest=.5,this._material.depthWrite=!1,this._material.transparent=!0,this._material.metalness=0),this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alpha").min(0).max(1).step(.01).onChange(e=>{this._material.transparent=e<1,this._material.opacity=e,this._material.depthWrite=e>=1,this._mesh.castShadow=!this._material.transparent,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"alphaCutoff").min(0).max(1).step(.01).onChange(e=>{this._material.alphaTest=e||0,this._shadingChanged()}),this._guiMaterialFolder.add(this._materialParams,"doubleSided").onChange(e=>{this._material.side=e?T:A,this._shadingChanged()})),this._addGUIListener(e))}_shadingChanged(){this._roomleMaterialViewerUiCallback.onMaterialShadingChanged(_(this._material))}setGeometry(e){this._sceneParams.type=e,this._setGeometry()}_setGeometry(){let e;"cube"===this._sceneParams.type&&(e=new F(1,1,1,100,100,100)),"sphere"===this._sceneParams.type&&(e=new k(.5,100,100)),"plane_horizontal"===this._sceneParams.type&&(e=new D(1,1),e.rotateX(-Math.PI/2)),"plane_vertical"===this._sceneParams.type&&(e=new D(1,1)),this._mesh.geometry=e,this._renderEverything()}async changeFloorMaterialById(e){const t=await this._rapiAccess.getMaterial(e);return this._environment&&this._environment instanceof b||(this._environment=new b(this._scene,this._environment,!0)),new Promise((e,a)=>{this._environment.changeFloorMaterial(t,this._maxAnisotropy).then(()=>{this._requestRender(),e()},a)})}async addTexture(e,t){const a=100/(0===e.mmWidth?1:e.mmWidth),i=100/(0===e.mmHeight?1:e.mmHeight);if(t){const r=new Image;r.src=t;const s=new j;s.image=r,r.onload=function(){s.needsUpdate=!0},c(s,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures)}else await d(e.image,e,this._material,this._maxAnisotropy,a,i,this._renderer.capabilities.maxTextures);this._requestRender()}removeTexture(e){"ORM"===e.mapping&&(this._material.aoMap=null,this._material.roughnessMap=null,this._material.metalnessMap=null),"RGB"!==e.mapping&&"RGBA"!==e.mapping||(this._material.map=null),"XYZ"===e.mapping&&(this._material.normalMap=null),this._material.needsUpdate=!0,this._requestRender()}clearCache(){this._configuratorMeshGenerator.clear()}}i([r],E.prototype,"_inputManager",void 0),i([r],E.prototype,"_configuratorMeshGenerator",void 0),i([r],E.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],E.prototype,"_rapiAccess",void 0);class O{constructor(e){this._creator_=e}setCameraOffset(e){this._sceneManager.setCameraOffset(e)}getCameraOffset(){return this._sceneManager.getCameraOffset()}init(e){return this._domHelper.setDomElement(e),this._sceneManager?(this._lifeCycleManager.resume(),Promise.resolve()):new Promise(this._initPromiseCallback.bind(this))}_initPromiseCallback(e,t){Promise.all([this._scriptLoader.fetch(P,{id:"tween-js"})]).then(()=>{this._sceneManager=new E(this._creator_,{left:0,top:1,right:1,bottom:0}),this._sceneManager.enableHD(),e()})}get callbacks(){return this._roomleMaterialViewerUiCallback}set callbacks(e){this._roomleMaterialViewerUiCallback=e}loadMaterialShading(e){return this._sceneManager.loadMaterialShading(e)}loadMaterial(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterial(e)}loadMaterialId(e,t={}){return t.flushCache&&this._clearCaches(),this._sceneManager.loadMaterialId(e)}getMaterialShading(e=1){return this._sceneManager.getMaterialShading(e)}loadSceneSetting(e){return this._sceneManager.loadSceneSettings(e)}setOverrides(e){e&&this._initData.setOverrides(e)}updateSize(){this._sceneManager.updateCamera()}getMain(){}resumeTest(e){this._domHelper.setDomElement(e),this._lifeCycleManager.resume()}pauseTest(){this._lifeCycleManager.pause()}showGUI(){this._sceneManager.showGUI()}async changeFloorMaterialById(e){return this._sceneManager.changeFloorMaterialById(e)}setGeometry(e){this._sceneManager.setGeometry(e)}async addTexture(e,t){return this._sceneManager.addTexture(e,t)}removeTexture(e){return this._sceneManager.removeTexture(e)}_clearCaches(){this._rapiAccess.cleanUp(),this._sceneManager.clearCache()}getScene(){return this._sceneManager.getScene()}updateScene(){this._sceneManager.updateScene()}getUnitFormatter(){return this._unitFormatter}setEnvironmentMap(e){const{url:t,intensity:a,rotation:i,maxLightSources:r}=e;this._sceneManager.setEnvironmentMap(t,a,i,r)}}i([r],O.prototype,"_domHelper",void 0),i([r],O.prototype,"_scriptLoader",void 0),i([r],O.prototype,"_lifeCycleManager",void 0),i([r],O.prototype,"_roomleMaterialViewerUiCallback",void 0),i([r],O.prototype,"_initData",void 0),i([r],O.prototype,"_rapiAccess",void 0),i([r],O.prototype,"_unitFormatter",void 0);const V=[new p("script-loader",t),new p("logger",u),new p("input-manager",M,1),new p("configurator-mesh-generator",w),new p("rapi-access",y),new p("roomle-material-viewer-ui-callback",class extends g{constructor(e){super(e),this.onMaterialShadingChanged=e=>{}}},1)];e("MaterialViewer",class extends a{setupGlobals(){}setupDependencies(){C.setup(V),this.lookup("logger",this._context)}cleanUpGlobals(){throw new Error("Method not implemented.")}cleanUpDependencies(){throw new Error("Method not implemented.")}bootFinished(){this._viewer=new O(this._context),window.RoomleMaterialViewer||(window.RoomleMaterialViewer=this._viewer)}getApi(){return this._viewer}getContextName(){return"material-viewer"}})}}}));
|
|
2
|
+
//# sourceMappingURL=material-viewer-4498e854.legacy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"material-viewer-4498e854.legacy.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./material-viewer-
|
|
1
|
+
System.register(["./material-viewer-4498e854.legacy.js","./script-loader-0733732f.legacy.js","./query-params-helper-871c582e.legacy.js","./main-thread-to-worker-11930382.legacy.js","./roomle-dependency-injection-08bf80a8.legacy.js","./scene-manager-767189c5.legacy.js"],(function(){var e;return{setters:[function(n){e=n.MaterialViewer},function(){},function(){},function(){},function(){},function(){}],execute:function(){(new e).boot()}}}));
|
|
2
2
|
//# sourceMappingURL=material-viewer-main.legacy.js.map
|