iflow-engine-base 3.9.16 → 3.9.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -33
- package/dist/bim-engine-sdk.es.js +30 -21
- package/dist/bim-engine-sdk.umd.js +1288 -1227
- package/dist/chunks/{engine-2d-Dgrlg-TS.js → engine-2d-Di06Ry30.js} +22 -22
- package/dist/chunks/{engine-3d-84WBL9lD.js → engine-3d-Dp-2o5Fl.js} +419 -419
- package/dist/chunks/{engine-720-5BoyE7tx.js → engine-720-Co-3Kqdv.js} +2 -2
- package/dist/chunks/{engine-gaussian-Ciuxglfl.js → engine-gaussian-8fZrDPJR.js} +1 -1
- package/dist/chunks/{engine-gis-CDxGtOzA.js → engine-gis-DlbR-2fG.js} +33719 -32756
- package/dist/chunks/sdk-assets-F7qFhuao.js +84 -0
- package/dist/chunks/{sdk-runtime-DxxL_DiS.js → sdk-runtime-gCd6dMmU.js} +2 -2
- package/dist/index.d.ts +9 -1
- package/dist2d/dwg-preview.es.js +440 -440
- package/dist2d/dwg-preview.umd.js +15 -15
- package/distGaussian/gaussian.es.js +1 -1
- package/distGaussian/gaussian.umd.js +1 -1
- package/package.json +75 -75
- package/dist/chunks/sdk-assets-ChDuFDAw.js +0 -84
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(a,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("three"),require("@mkkellogg/gaussian-splats-3d")):typeof define=="function"&&define.amd?define(["exports","three","@mkkellogg/gaussian-splats-3d"],l):(a=typeof globalThis<"u"?globalThis:a||self,l(a.Gaussian={},a.THREE,a.GaussianSplats3D))})(this,(function(a,l,m){"use strict";function c(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const d=c(l),h=c(m);var o=(r=>(r.LoadStart="gaussian-load-start",r.LoadProgress="gaussian-load-progress",r.Loaded="gaussian-loaded",r.LoadError="gaussian-load-error",r.SceneRemoved="gaussian-scene-removed",r.FpsUpdated="gaussian-fps-updated",r.ViewChanged="gaussian-view-changed",r))(o||{});class f{listeners=new Map;on(e,t){const i=String(e);this.listeners.has(i)||this.listeners.set(i,[]),this.listeners.get(i).push(t)}off(e,t){const i=String(e),n=this.listeners.get(i);if(!n)return;const s=n.indexOf(t);s!==-1&&n.splice(s,1),n.length===0&&this.listeners.delete(i)}trigger(e,t){const i=this.listeners.get(String(e));!i||i.length===0||[...i].forEach(n=>{try{n(t)}catch(s){console.error(`[EventModuleGaussian] event handler failed: ${e}`,s)}})}clear(){this.listeners.clear()}dispose(){this.clear()}}class g{scene;constructor(e){this.scene=new d.Scene,e&&(this.scene.background=new d.Color(e))}getScene(){return this.scene}setBackgroundColor(e){this.scene.background=e==null?null:new d.Color(e)}dispose(){this.scene.clear(),this.scene.background=null,this.scene.environment=null}}class p{camera;container;cameraUp;initialLookAt;constructor(e,t,i,n){this.container=e,this.cameraUp=t,this.initialLookAt=n,this.camera=this.createCamera(i)}createCamera(e){const t=Math.max(this.container.clientWidth,1),i=Math.max(this.container.clientHeight,1),n=new d.PerspectiveCamera(65,t/i,.1,5e3);return n.position.fromArray(e),n.up.fromArray(this.cameraUp).normalize(),n.lookAt(new d.Vector3().fromArray(this.initialLookAt)),n.updateProjectionMatrix(),n}getCamera(){return this.camera}updateAspectRatio(e,t){this.camera.aspect=Math.max(e,1)/Math.max(t,1),this.camera.updateProjectionMatrix()}reset(e,t){e&&this.camera.position.fromArray(e),this.camera.lookAt(new d.Vector3().fromArray(t??this.initialLookAt)),this.camera.updateMatrixWorld(!0)}dispose(){this.camera=null}}class M{renderer;viewer;container;animationId=null;isRenderingPaused=!0;fpsFrameCount=0;fpsLastTime=performance.now();fpsInfo={fps:0,frameTimeMs:0,minFps:0};onBeforeRenderCallback;onAfterRenderCallback;onFpsUpdatedCallback;constructor(e,t,i,n){this.container=e,this.renderer=this.createRenderer(n.antialias),this.viewer=new h.Viewer({selfDrivenMode:!1,renderer:this.renderer,camera:i,threeScene:t,rootElement:e,useBuiltInControls:!0,cameraUp:n.cameraUp,initialCameraPosition:n.initialCameraPosition,initialCameraLookAt:n.initialCameraLookAt,sharedMemoryForWorkers:n.sharedMemoryForWorkers,gpuAcceleratedSort:n.gpuAcceleratedSort,sphericalHarmonicsDegree:n.sphericalHarmonicsDegree,...n.viewerOptions??{}})}createRenderer(e){const t=new d.WebGLRenderer({antialias:e,alpha:!0,preserveDrawingBuffer:!1});return t.setSize(Math.max(this.container.clientWidth,1),Math.max(this.container.clientHeight,1)),t.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.container.appendChild(t.domElement),t}setOnBeforeRender(e){this.onBeforeRenderCallback=e}setOnAfterRender(e){this.onAfterRenderCallback=e}setOnFpsUpdated(e){this.onFpsUpdatedCallback=e}startRenderLoop(){this.animationId===null&&(this.isRenderingPaused=!1,this.animate())}animate(){if(this.isRenderingPaused){this.animationId=null;return}this.animationId=requestAnimationFrame(()=>this.animate()),this.render()}render(){this.onBeforeRenderCallback?.(),this.viewer.update(this.renderer),this.viewer.render(),this.onAfterRenderCallback?.(),this.updateFps()}updateFps(){this.fpsFrameCount++;const e=performance.now(),t=e-this.fpsLastTime;if(t<1e3)return;const i=Math.round(this.fpsFrameCount*1e3/t);this.fpsInfo={fps:i,frameTimeMs:i>0?1e3/i:0,minFps:this.fpsInfo.minFps===0?i:Math.min(this.fpsInfo.minFps,i)},this.fpsFrameCount=0,this.fpsLastTime=e,this.onFpsUpdatedCallback?.({...this.fpsInfo})}resetFpsStats(){this.fpsInfo={fps:0,frameTimeMs:0,minFps:0},this.fpsFrameCount=0,this.fpsLastTime=performance.now()}pauseRendering(){this.isRenderingPaused=!0,this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}resumeRendering(){this.isRenderingPaused&&this.startRenderLoop()}isRenderingPausedState(){return this.isRenderingPaused}resize(e,t){this.renderer.setSize(Math.max(e,1),Math.max(t,1)),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2))}getViewer(){return this.viewer}getRenderer(){return this.renderer}getDomElement(){return this.renderer.domElement}getFpsInfo(){return{...this.fpsInfo}}async dispose(){this.pauseRendering(),await this.viewer.dispose(),this.container.contains(this.renderer.domElement)&&this.container.removeChild(this.renderer.domElement),this.renderer.dispose(),this.renderer.forceContextLoss()}}const w={identity:[0,0,0,1],"x-90":[-.7071068,0,0,.7071068],x90:[.7071068,0,0,.7071068],x180:[1,0,0,0],"y-90":[0,-.7071068,0,.7071068],y90:[0,.7071068,0,.7071068],"z-90":[0,0,-.7071068,.7071068],z90:[0,0,.7071068,.7071068],z180:[0,0,1,0]};class v{orientationPreset;constructor(e="x180"){this.orientationPreset=e}setOrientationPreset(e){this.orientationPreset=e}getOrientationPreset(){return this.orientationPreset}getOrientationRotation(){return[...w[this.orientationPreset]]}active(){}disActive(){}update(){}dispose(){}}function R(r,e){return`${r}#${e}`}class k{viewer;getDefaultRotation;scenes=new Map;constructor(e,t){this.viewer=e,this.getDefaultRotation=t}async loadModel(e,t={}){const i=this.viewer.getSceneCount(),n={showLoadingUI:!0,progressiveLoad:!1,position:[0,0,0],rotation:this.getDefaultRotation(),scale:[1,1,1],...t};await this.viewer.addSplatScene(e,n);const s={id:n.id??R(e,i),name:n.name??e.split(/[\\/]/).pop()??e,url:e,index:i,options:n};return this.scenes.set(s.id,s),s}async loadModels(e){const t=[];for(const i of e)t.push(await this.loadModel(i.url,i.options));return t}async unloadModel(e,t=!0){const i=this.scenes.get(e);i&&(await this.viewer.removeSplatScene(i.index,t),this.scenes.delete(e),this.reindexScenesAfterRemove(i.index))}getModel(e){return this.scenes.get(e)}getAllModels(){return Array.from(this.scenes.values())}getRawSplatScene(e){const t=typeof e=="number"?e:this.scenes.get(e)?.index;return t==null?void 0:this.viewer.getSplatScene(t)}async clear(e=!1){const t=this.getAllModels().map(i=>i.index);t.length>0&&await this.viewer.removeSplatScenes(t,e),this.scenes.clear()}reindexScenesAfterRemove(e){this.scenes.forEach(t=>{t.index>e&&(t.index-=1)})}}const I={version:"3.9.16"}.version;class u{eventModule;sceneModule;cameraModule;renderModule;controlModule;loaderModule;isInitialized=!1;version=I;constructor(e){this.initialize(e)}initialize(e){const t={containerId:e.containerId,cameraUp:e.cameraUp??[0,1,0],initialCameraPosition:e.initialCameraPosition??[0,0,6],initialCameraLookAt:e.initialCameraLookAt??[0,0,0],backgroundColor:e.backgroundColor,antialias:e.antialias??!1,showLoadingUI:e.showLoadingUI??!0,sharedMemoryForWorkers:e.sharedMemoryForWorkers??!1,gpuAcceleratedSort:e.gpuAcceleratedSort??!1,sphericalHarmonicsDegree:e.sphericalHarmonicsDegree??0,orientationPreset:e.orientationPreset??"x180",viewerOptions:e.viewerOptions},i=document.getElementById(t.containerId);if(!i)throw new Error(`Container with id "${t.containerId}" not found`);this.eventModule=new f,this.sceneModule=new g(t.backgroundColor),this.cameraModule=new p(i,t.cameraUp,t.initialCameraPosition,t.initialCameraLookAt),this.controlModule=new v(t.orientationPreset),this.renderModule=new M(i,this.sceneModule.getScene(),this.cameraModule.getCamera(),t),this.loaderModule=new k(this.renderModule.getViewer(),()=>this.controlModule.getOrientationRotation()),this.renderModule.setOnBeforeRender(()=>{this.controlModule.update()}),this.renderModule.setOnFpsUpdated(n=>{this.eventModule.trigger(o.FpsUpdated,n)}),this.renderModule.startRenderLoop(),this.isInitialized=!0}async loadModel(e,t={}){this.checkInitialized(),this.eventModule.trigger(o.LoadStart,{url:e,name:t.name});try{const i=await this.loaderModule.loadModel(e,{showLoadingUI:!0,...t,onProgress:(n,s,C)=>{this.eventModule.trigger(o.LoadProgress,{url:e,name:t.name,progress:n}),t.onProgress?.(n,s,C)}});return this.eventModule.trigger(o.Loaded,{url:e,name:i.name,progress:100}),i}catch(i){throw this.eventModule.trigger(o.LoadError,{url:e,name:t.name,error:i instanceof Error?i:new Error(String(i))}),i}}async unloadModel(e){this.checkInitialized(),await this.loaderModule.unloadModel(e,!1),this.eventModule.trigger(o.SceneRemoved,{id:e})}setOrientationPreset(e){this.checkInitialized(),this.controlModule.setOrientationPreset(e)}getOrientationPreset(){return this.checkInitialized(),this.controlModule.getOrientationPreset()}resize(e,t){this.checkInitialized();const i=this.renderModule.getDomElement(),n=e??i.parentElement?.clientWidth??i.clientWidth,s=t??i.parentElement?.clientHeight??i.clientHeight;this.renderModule.resize(n,s),this.cameraModule.updateAspectRatio(n,s)}pauseRendering(){this.checkInitialized(),this.renderModule.pauseRendering()}resumeRendering(){this.checkInitialized(),this.renderModule.resumeRendering()}resetFpsStats(){this.checkInitialized(),this.renderModule.resetFpsStats()}getFpsInfo(){return this.checkInitialized(),this.renderModule.getFpsInfo()}on(e,t){this.checkInitialized(),this.eventModule.on(e,t)}off(e,t){this.checkInitialized(),this.eventModule.off(e,t)}getVersion(){return this.version}async dispose(){this.isInitialized&&(await this.loaderModule.clear(!1),await this.renderModule.dispose(),this.controlModule.dispose(),this.cameraModule.dispose(),this.sceneModule.dispose(),this.eventModule.dispose(),this.isInitialized=!1)}checkInitialized(){if(!this.isInitialized)throw new Error("EngineKernelGaussian: Not initialized")}}function S(r){return new u(r)}a.GaussianSplats3D=h,a.EngineKernelGaussian=u,a.EventTypeGaussian=o,a.createEngineGaussian=S,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
|
|
1
|
+
(function(a,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("three"),require("@mkkellogg/gaussian-splats-3d")):typeof define=="function"&&define.amd?define(["exports","three","@mkkellogg/gaussian-splats-3d"],l):(a=typeof globalThis<"u"?globalThis:a||self,l(a.Gaussian={},a.THREE,a.GaussianSplats3D))})(this,(function(a,l,m){"use strict";function c(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const i=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,i.get?i:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const d=c(l),h=c(m);var o=(r=>(r.LoadStart="gaussian-load-start",r.LoadProgress="gaussian-load-progress",r.Loaded="gaussian-loaded",r.LoadError="gaussian-load-error",r.SceneRemoved="gaussian-scene-removed",r.FpsUpdated="gaussian-fps-updated",r.ViewChanged="gaussian-view-changed",r))(o||{});class f{listeners=new Map;on(e,t){const i=String(e);this.listeners.has(i)||this.listeners.set(i,[]),this.listeners.get(i).push(t)}off(e,t){const i=String(e),n=this.listeners.get(i);if(!n)return;const s=n.indexOf(t);s!==-1&&n.splice(s,1),n.length===0&&this.listeners.delete(i)}trigger(e,t){const i=this.listeners.get(String(e));!i||i.length===0||[...i].forEach(n=>{try{n(t)}catch(s){console.error(`[EventModuleGaussian] event handler failed: ${e}`,s)}})}clear(){this.listeners.clear()}dispose(){this.clear()}}class g{scene;constructor(e){this.scene=new d.Scene,e&&(this.scene.background=new d.Color(e))}getScene(){return this.scene}setBackgroundColor(e){this.scene.background=e==null?null:new d.Color(e)}dispose(){this.scene.clear(),this.scene.background=null,this.scene.environment=null}}class p{camera;container;cameraUp;initialLookAt;constructor(e,t,i,n){this.container=e,this.cameraUp=t,this.initialLookAt=n,this.camera=this.createCamera(i)}createCamera(e){const t=Math.max(this.container.clientWidth,1),i=Math.max(this.container.clientHeight,1),n=new d.PerspectiveCamera(65,t/i,.1,5e3);return n.position.fromArray(e),n.up.fromArray(this.cameraUp).normalize(),n.lookAt(new d.Vector3().fromArray(this.initialLookAt)),n.updateProjectionMatrix(),n}getCamera(){return this.camera}updateAspectRatio(e,t){this.camera.aspect=Math.max(e,1)/Math.max(t,1),this.camera.updateProjectionMatrix()}reset(e,t){e&&this.camera.position.fromArray(e),this.camera.lookAt(new d.Vector3().fromArray(t??this.initialLookAt)),this.camera.updateMatrixWorld(!0)}dispose(){this.camera=null}}class M{renderer;viewer;container;animationId=null;isRenderingPaused=!0;fpsFrameCount=0;fpsLastTime=performance.now();fpsInfo={fps:0,frameTimeMs:0,minFps:0};onBeforeRenderCallback;onAfterRenderCallback;onFpsUpdatedCallback;constructor(e,t,i,n){this.container=e,this.renderer=this.createRenderer(n.antialias),this.viewer=new h.Viewer({selfDrivenMode:!1,renderer:this.renderer,camera:i,threeScene:t,rootElement:e,useBuiltInControls:!0,cameraUp:n.cameraUp,initialCameraPosition:n.initialCameraPosition,initialCameraLookAt:n.initialCameraLookAt,sharedMemoryForWorkers:n.sharedMemoryForWorkers,gpuAcceleratedSort:n.gpuAcceleratedSort,sphericalHarmonicsDegree:n.sphericalHarmonicsDegree,...n.viewerOptions??{}})}createRenderer(e){const t=new d.WebGLRenderer({antialias:e,alpha:!0,preserveDrawingBuffer:!1});return t.setSize(Math.max(this.container.clientWidth,1),Math.max(this.container.clientHeight,1)),t.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.container.appendChild(t.domElement),t}setOnBeforeRender(e){this.onBeforeRenderCallback=e}setOnAfterRender(e){this.onAfterRenderCallback=e}setOnFpsUpdated(e){this.onFpsUpdatedCallback=e}startRenderLoop(){this.animationId===null&&(this.isRenderingPaused=!1,this.animate())}animate(){if(this.isRenderingPaused){this.animationId=null;return}this.animationId=requestAnimationFrame(()=>this.animate()),this.render()}render(){this.onBeforeRenderCallback?.(),this.viewer.update(this.renderer),this.viewer.render(),this.onAfterRenderCallback?.(),this.updateFps()}updateFps(){this.fpsFrameCount++;const e=performance.now(),t=e-this.fpsLastTime;if(t<1e3)return;const i=Math.round(this.fpsFrameCount*1e3/t);this.fpsInfo={fps:i,frameTimeMs:i>0?1e3/i:0,minFps:this.fpsInfo.minFps===0?i:Math.min(this.fpsInfo.minFps,i)},this.fpsFrameCount=0,this.fpsLastTime=e,this.onFpsUpdatedCallback?.({...this.fpsInfo})}resetFpsStats(){this.fpsInfo={fps:0,frameTimeMs:0,minFps:0},this.fpsFrameCount=0,this.fpsLastTime=performance.now()}pauseRendering(){this.isRenderingPaused=!0,this.animationId!==null&&(cancelAnimationFrame(this.animationId),this.animationId=null)}resumeRendering(){this.isRenderingPaused&&this.startRenderLoop()}isRenderingPausedState(){return this.isRenderingPaused}resize(e,t){this.renderer.setSize(Math.max(e,1),Math.max(t,1)),this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2))}getViewer(){return this.viewer}getRenderer(){return this.renderer}getDomElement(){return this.renderer.domElement}getFpsInfo(){return{...this.fpsInfo}}async dispose(){this.pauseRendering(),await this.viewer.dispose(),this.container.contains(this.renderer.domElement)&&this.container.removeChild(this.renderer.domElement),this.renderer.dispose(),this.renderer.forceContextLoss()}}const w={identity:[0,0,0,1],"x-90":[-.7071068,0,0,.7071068],x90:[.7071068,0,0,.7071068],x180:[1,0,0,0],"y-90":[0,-.7071068,0,.7071068],y90:[0,.7071068,0,.7071068],"z-90":[0,0,-.7071068,.7071068],z90:[0,0,.7071068,.7071068],z180:[0,0,1,0]};class v{orientationPreset;constructor(e="x180"){this.orientationPreset=e}setOrientationPreset(e){this.orientationPreset=e}getOrientationPreset(){return this.orientationPreset}getOrientationRotation(){return[...w[this.orientationPreset]]}active(){}disActive(){}update(){}dispose(){}}function R(r,e){return`${r}#${e}`}class k{viewer;getDefaultRotation;scenes=new Map;constructor(e,t){this.viewer=e,this.getDefaultRotation=t}async loadModel(e,t={}){const i=this.viewer.getSceneCount(),n={showLoadingUI:!0,progressiveLoad:!1,position:[0,0,0],rotation:this.getDefaultRotation(),scale:[1,1,1],...t};await this.viewer.addSplatScene(e,n);const s={id:n.id??R(e,i),name:n.name??e.split(/[\\/]/).pop()??e,url:e,index:i,options:n};return this.scenes.set(s.id,s),s}async loadModels(e){const t=[];for(const i of e)t.push(await this.loadModel(i.url,i.options));return t}async unloadModel(e,t=!0){const i=this.scenes.get(e);i&&(await this.viewer.removeSplatScene(i.index,t),this.scenes.delete(e),this.reindexScenesAfterRemove(i.index))}getModel(e){return this.scenes.get(e)}getAllModels(){return Array.from(this.scenes.values())}getRawSplatScene(e){const t=typeof e=="number"?e:this.scenes.get(e)?.index;return t==null?void 0:this.viewer.getSplatScene(t)}async clear(e=!1){const t=this.getAllModels().map(i=>i.index);t.length>0&&await this.viewer.removeSplatScenes(t,e),this.scenes.clear()}reindexScenesAfterRemove(e){this.scenes.forEach(t=>{t.index>e&&(t.index-=1)})}}const I={version:"3.9.161"}.version;class u{eventModule;sceneModule;cameraModule;renderModule;controlModule;loaderModule;isInitialized=!1;version=I;constructor(e){this.initialize(e)}initialize(e){const t={containerId:e.containerId,cameraUp:e.cameraUp??[0,1,0],initialCameraPosition:e.initialCameraPosition??[0,0,6],initialCameraLookAt:e.initialCameraLookAt??[0,0,0],backgroundColor:e.backgroundColor,antialias:e.antialias??!1,showLoadingUI:e.showLoadingUI??!0,sharedMemoryForWorkers:e.sharedMemoryForWorkers??!1,gpuAcceleratedSort:e.gpuAcceleratedSort??!1,sphericalHarmonicsDegree:e.sphericalHarmonicsDegree??0,orientationPreset:e.orientationPreset??"x180",viewerOptions:e.viewerOptions},i=document.getElementById(t.containerId);if(!i)throw new Error(`Container with id "${t.containerId}" not found`);this.eventModule=new f,this.sceneModule=new g(t.backgroundColor),this.cameraModule=new p(i,t.cameraUp,t.initialCameraPosition,t.initialCameraLookAt),this.controlModule=new v(t.orientationPreset),this.renderModule=new M(i,this.sceneModule.getScene(),this.cameraModule.getCamera(),t),this.loaderModule=new k(this.renderModule.getViewer(),()=>this.controlModule.getOrientationRotation()),this.renderModule.setOnBeforeRender(()=>{this.controlModule.update()}),this.renderModule.setOnFpsUpdated(n=>{this.eventModule.trigger(o.FpsUpdated,n)}),this.renderModule.startRenderLoop(),this.isInitialized=!0}async loadModel(e,t={}){this.checkInitialized(),this.eventModule.trigger(o.LoadStart,{url:e,name:t.name});try{const i=await this.loaderModule.loadModel(e,{showLoadingUI:!0,...t,onProgress:(n,s,C)=>{this.eventModule.trigger(o.LoadProgress,{url:e,name:t.name,progress:n}),t.onProgress?.(n,s,C)}});return this.eventModule.trigger(o.Loaded,{url:e,name:i.name,progress:100}),i}catch(i){throw this.eventModule.trigger(o.LoadError,{url:e,name:t.name,error:i instanceof Error?i:new Error(String(i))}),i}}async unloadModel(e){this.checkInitialized(),await this.loaderModule.unloadModel(e,!1),this.eventModule.trigger(o.SceneRemoved,{id:e})}setOrientationPreset(e){this.checkInitialized(),this.controlModule.setOrientationPreset(e)}getOrientationPreset(){return this.checkInitialized(),this.controlModule.getOrientationPreset()}resize(e,t){this.checkInitialized();const i=this.renderModule.getDomElement(),n=e??i.parentElement?.clientWidth??i.clientWidth,s=t??i.parentElement?.clientHeight??i.clientHeight;this.renderModule.resize(n,s),this.cameraModule.updateAspectRatio(n,s)}pauseRendering(){this.checkInitialized(),this.renderModule.pauseRendering()}resumeRendering(){this.checkInitialized(),this.renderModule.resumeRendering()}resetFpsStats(){this.checkInitialized(),this.renderModule.resetFpsStats()}getFpsInfo(){return this.checkInitialized(),this.renderModule.getFpsInfo()}on(e,t){this.checkInitialized(),this.eventModule.on(e,t)}off(e,t){this.checkInitialized(),this.eventModule.off(e,t)}getVersion(){return this.version}async dispose(){this.isInitialized&&(await this.loaderModule.clear(!1),await this.renderModule.dispose(),this.controlModule.dispose(),this.cameraModule.dispose(),this.sceneModule.dispose(),this.eventModule.dispose(),this.isInitialized=!1)}checkInitialized(){if(!this.isInitialized)throw new Error("EngineKernelGaussian: Not initialized")}}function S(r){return new u(r)}a.GaussianSplats3D=h,a.EngineKernelGaussian=u,a.EventTypeGaussian=o,a.createEngineGaussian=S,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "iflow-engine-base",
|
|
3
|
-
"version": "3.9.
|
|
4
|
-
"description": "BIM Engine SDK for Vue2, Vue3, React and HTML",
|
|
5
|
-
"main": "./dist/bim-engine-sdk.umd.js",
|
|
6
|
-
"module": "./dist/bim-engine-sdk.es.js",
|
|
7
|
-
"types": "./dist/index.d.ts",
|
|
8
|
-
"exports": {
|
|
9
|
-
".": {
|
|
10
|
-
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/bim-engine-sdk.es.js",
|
|
12
|
-
"require": "./dist/bim-engine-sdk.umd.js"
|
|
13
|
-
},
|
|
14
|
-
"./style.css": "./dist/iflow-engine-base.css",
|
|
15
|
-
"./iflow-engine-base.css": "./dist/iflow-engine-base.css",
|
|
16
|
-
"./dwg-preview": {
|
|
17
|
-
"types": "./dist2d/dwg-preview.d.ts",
|
|
18
|
-
"import": "./dist2d/dwg-preview.es.js",
|
|
19
|
-
"require": "./dist2d/dwg-preview.umd.js"
|
|
20
|
-
},
|
|
21
|
-
"./gaussian": {
|
|
22
|
-
"types": "./distGaussian/index.d.ts",
|
|
23
|
-
"import": "./distGaussian/gaussian.es.js",
|
|
24
|
-
"require": "./distGaussian/gaussian.umd.js"
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"sideEffects": [
|
|
28
|
-
"**/*.css"
|
|
29
|
-
],
|
|
30
|
-
"files": [
|
|
31
|
-
"dist",
|
|
32
|
-
"dist2d",
|
|
33
|
-
"distGaussian"
|
|
34
|
-
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"dev": "vite",
|
|
37
|
-
"start": "vite --host --port 5173",
|
|
38
|
-
"build": "vite build && vite build --mode 2d && vite build --mode gaussian",
|
|
39
|
-
"build:full": "vite build",
|
|
40
|
-
"build:dwg-preview": "vite build --mode 2d",
|
|
41
|
-
"build:2d": "vite build --mode 2d",
|
|
42
|
-
"build:gaussian": "vite build --mode gaussian"
|
|
43
|
-
},
|
|
44
|
-
"keywords": [
|
|
45
|
-
"bim",
|
|
46
|
-
"sdk",
|
|
47
|
-
"vue",
|
|
48
|
-
"react"
|
|
49
|
-
],
|
|
50
|
-
"author": "",
|
|
51
|
-
"license": "ISC",
|
|
52
|
-
"devDependencies": {
|
|
53
|
-
"@types/opentype.js": "^1.3.9",
|
|
54
|
-
"@types/stats.js": "^0.17.4",
|
|
55
|
-
"@vitejs/plugin-vue": "^6.0.2",
|
|
56
|
-
"typescript": "^5.9.3",
|
|
57
|
-
"vite": "^7.2.6",
|
|
58
|
-
"vite-plugin-dts": "^4.5.4",
|
|
59
|
-
"vue": "^3.5.25"
|
|
60
|
-
},
|
|
61
|
-
"dependencies": {
|
|
62
|
-
"@mkkellogg/gaussian-splats-3d": "^0.4.7",
|
|
63
|
-
"@noble/ciphers": "^2.2.0",
|
|
64
|
-
"@types/three": "^0.181.0",
|
|
65
|
-
"axios": "^1.13.2",
|
|
66
|
-
"cesium": "^1.141.0",
|
|
67
|
-
"fabric": "^7.3.1",
|
|
68
|
-
"jszip": "^3.10.1",
|
|
69
|
-
"opentype.js": "^1.3.4",
|
|
70
|
-
"shpjs": "^6.2.0",
|
|
71
|
-
"stats.js": "^0.17.0",
|
|
72
|
-
"three": "^0.183.2",
|
|
73
|
-
"three-bvh-csg": "^0.0.17"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "iflow-engine-base",
|
|
3
|
+
"version": "3.9.162",
|
|
4
|
+
"description": "BIM Engine SDK for Vue2, Vue3, React and HTML",
|
|
5
|
+
"main": "./dist/bim-engine-sdk.umd.js",
|
|
6
|
+
"module": "./dist/bim-engine-sdk.es.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/bim-engine-sdk.es.js",
|
|
12
|
+
"require": "./dist/bim-engine-sdk.umd.js"
|
|
13
|
+
},
|
|
14
|
+
"./style.css": "./dist/iflow-engine-base.css",
|
|
15
|
+
"./iflow-engine-base.css": "./dist/iflow-engine-base.css",
|
|
16
|
+
"./dwg-preview": {
|
|
17
|
+
"types": "./dist2d/dwg-preview.d.ts",
|
|
18
|
+
"import": "./dist2d/dwg-preview.es.js",
|
|
19
|
+
"require": "./dist2d/dwg-preview.umd.js"
|
|
20
|
+
},
|
|
21
|
+
"./gaussian": {
|
|
22
|
+
"types": "./distGaussian/index.d.ts",
|
|
23
|
+
"import": "./distGaussian/gaussian.es.js",
|
|
24
|
+
"require": "./distGaussian/gaussian.umd.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"sideEffects": [
|
|
28
|
+
"**/*.css"
|
|
29
|
+
],
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"dist2d",
|
|
33
|
+
"distGaussian"
|
|
34
|
+
],
|
|
35
|
+
"scripts": {
|
|
36
|
+
"dev": "vite",
|
|
37
|
+
"start": "vite --host --port 5173",
|
|
38
|
+
"build": "vite build && vite build --mode 2d && vite build --mode gaussian",
|
|
39
|
+
"build:full": "vite build",
|
|
40
|
+
"build:dwg-preview": "vite build --mode 2d",
|
|
41
|
+
"build:2d": "vite build --mode 2d",
|
|
42
|
+
"build:gaussian": "vite build --mode gaussian"
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"bim",
|
|
46
|
+
"sdk",
|
|
47
|
+
"vue",
|
|
48
|
+
"react"
|
|
49
|
+
],
|
|
50
|
+
"author": "",
|
|
51
|
+
"license": "ISC",
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@types/opentype.js": "^1.3.9",
|
|
54
|
+
"@types/stats.js": "^0.17.4",
|
|
55
|
+
"@vitejs/plugin-vue": "^6.0.2",
|
|
56
|
+
"typescript": "^5.9.3",
|
|
57
|
+
"vite": "^7.2.6",
|
|
58
|
+
"vite-plugin-dts": "^4.5.4",
|
|
59
|
+
"vue": "^3.5.25"
|
|
60
|
+
},
|
|
61
|
+
"dependencies": {
|
|
62
|
+
"@mkkellogg/gaussian-splats-3d": "^0.4.7",
|
|
63
|
+
"@noble/ciphers": "^2.2.0",
|
|
64
|
+
"@types/three": "^0.181.0",
|
|
65
|
+
"axios": "^1.13.2",
|
|
66
|
+
"cesium": "^1.141.0",
|
|
67
|
+
"fabric": "^7.3.1",
|
|
68
|
+
"jszip": "^3.10.1",
|
|
69
|
+
"opentype.js": "^1.3.4",
|
|
70
|
+
"shpjs": "^6.2.0",
|
|
71
|
+
"stats.js": "^0.17.0",
|
|
72
|
+
"three": "^0.183.2",
|
|
73
|
+
"three-bvh-csg": "^0.0.17"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
const c = "__BIM_ENGINE_SDK_ASSET_BASE__";
|
|
2
|
-
function f() {
|
|
3
|
-
return typeof globalThis < "u" ? globalThis : null;
|
|
4
|
-
}
|
|
5
|
-
function u(e) {
|
|
6
|
-
return e.endsWith("/") ? e : `${e}/`;
|
|
7
|
-
}
|
|
8
|
-
function l(e) {
|
|
9
|
-
return /^(?:[a-z][a-z\d+\-.]*:)?\/\//i.test(e) || /^(?:data|blob):/i.test(e);
|
|
10
|
-
}
|
|
11
|
-
function g(e) {
|
|
12
|
-
return e.startsWith("./") || e.startsWith("../");
|
|
13
|
-
}
|
|
14
|
-
function o(e, t) {
|
|
15
|
-
try {
|
|
16
|
-
return t ? new URL(e, t).toString() : new URL(e).toString();
|
|
17
|
-
} catch {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
function a() {
|
|
22
|
-
return typeof document < "u" && document.baseURI ? document.baseURI : typeof location < "u" && location.href ? location.href : null;
|
|
23
|
-
}
|
|
24
|
-
function S(e, t) {
|
|
25
|
-
const n = u(e);
|
|
26
|
-
if (l(n))
|
|
27
|
-
return n;
|
|
28
|
-
const r = s(t) || d() || a();
|
|
29
|
-
return o(n, r || void 0) || n;
|
|
30
|
-
}
|
|
31
|
-
function s(e) {
|
|
32
|
-
if (!e)
|
|
33
|
-
return null;
|
|
34
|
-
try {
|
|
35
|
-
const t = a(), n = o(e, t || void 0) || e, r = new URL(".", n), i = r.pathname.replace(/\\/g, "/");
|
|
36
|
-
return i.endsWith("/chunks/") ? new URL("../", r).toString() : t && /\/src\//.test(i) ? u(t) : r.toString();
|
|
37
|
-
} catch {
|
|
38
|
-
return null;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
function d() {
|
|
42
|
-
if (typeof document > "u")
|
|
43
|
-
return null;
|
|
44
|
-
const e = document.currentScript;
|
|
45
|
-
if (e?.src)
|
|
46
|
-
return s(e.src);
|
|
47
|
-
const t = document.getElementsByTagName("script");
|
|
48
|
-
for (let n = t.length - 1; n >= 0; n -= 1) {
|
|
49
|
-
const r = t[n]?.src;
|
|
50
|
-
if (r && /(?:bim-engine-sdk|iflow-engine-base|dwg-preview|gaussian)\.(?:es|umd)\.js(?:[?#].*)?$/.test(r))
|
|
51
|
-
return s(r);
|
|
52
|
-
}
|
|
53
|
-
return null;
|
|
54
|
-
}
|
|
55
|
-
function B(e) {
|
|
56
|
-
const t = f();
|
|
57
|
-
if (t) {
|
|
58
|
-
if (!e) {
|
|
59
|
-
delete t[c];
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
t[c] = u(e);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
function m(e) {
|
|
66
|
-
const n = f()?.[c];
|
|
67
|
-
return typeof n == "string" && n.length > 0 ? S(n, e) : s(e) || d() || (typeof document < "u" ? u(document.baseURI) : "./");
|
|
68
|
-
}
|
|
69
|
-
function b(e, t) {
|
|
70
|
-
if (t?.includes("@fs") && (t = t.split("@")[0]), console.log("资源路径", e, t), l(e))
|
|
71
|
-
return e;
|
|
72
|
-
if (g(e)) {
|
|
73
|
-
const i = o(e, s(t) || void 0);
|
|
74
|
-
if (i)
|
|
75
|
-
return i;
|
|
76
|
-
}
|
|
77
|
-
const n = e.replace(/^\/+/, ""), r = m(t);
|
|
78
|
-
return o(n, r) || n;
|
|
79
|
-
}
|
|
80
|
-
export {
|
|
81
|
-
m as g,
|
|
82
|
-
b as r,
|
|
83
|
-
B as s
|
|
84
|
-
};
|