t3d-ez.gl 0.0.5 → 0.0.6

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.
@@ -1 +1 @@
1
- "use strict";var e=require("../../node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.module.cjs.js"),r=require("../../utils/index.cjs.js"),t=require("../Controls/index.cjs.js"),i=require("../Resource/ResourceAide.cjs.js"),s=require("../PostProcessor/index.cjs.js"),n=require("../MarkerHtmlUI/index.cjs.js"),a=require("../Renderer/RendererAide.cjs.js"),o=require("../Cameras/index.cjs.js"),c=require("../../utils/Logger.cjs.js"),d=require("../../node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.core.cjs.js");const h={container:"body",antialias:!0,alpha:!1,backgroundColor:1514278,camera:"Perspective",isPostProcessing:!1};exports.T3dEZEngine=class{container;activeCanvas=null;parameters=h;renderScopes;VERSION="0.0.1";_rendererAide;_cameraAide;CONTROL_TYPE=t.CONTROL_TYPE;resourceAide;_controlsAide;plugins=new Map;isPostProcessing=!1;markerHtmlUI;postProcessor;animateTimer;get activeView(){return this._rendererAide.activeView}set activeView(e){this._rendererAide.activeView=e}get renderer(){return this._rendererAide?.renderer}get sceneGraph(){return this._rendererAide.activeScene}get camera(){return this._rendererAide.activeView?.camera}get controls(){return this._controlsAide.activeControls}constructor(e){c.Logger.info("Hello T3dEZEngine.js!"),this.renderScopes=new Set,this.parameters={...this.parameters,...e};const{container:d}=this.parameters;this.container=r.getContainerElement(d),this.resourceAide=new i.ResourceAide(this),this._controlsAide=new t.ControlsAide(this),this._cameraAide=new o.CameraAide;const h=this._initRenderer(this.parameters,this.container);this.activeCanvas=h.domElement,this.container.appendChild(h.domElement),this._rendererAide=new a.RendererAide(h),this.postProcessor=new s.PostProcessor(this),this.markerHtmlUI=new n.MarkerHtmlUI(this),this.initEngineInfo(this.activeCanvas)}async startApplication(e){const r=e.camera??this._cameraAide.createCamera("Perspective",this.renderer.domElement),t=e.scene??new d.Scene;return this.activeView=this._rendererAide.create(Object.assign(e,{camera:r,scene:t})),this}_initRenderer(r,t=document.body){const{antialias:i,alpha:s}=r,n=new e.WebGLRenderer({antialias:i,alpha:s,powerPreference:"high-performance"}),{clientWidth:a,clientHeight:o}=t,c=1*window.devicePixelRatio;return n.setPixelRatio(c),n.setSize(a||500,o||300),n.outputColorSpace=d.SRGBColorSpace,n.toneMapping=d.ACESFilmicToneMapping,n.toneMappingExposure=1,n}runRenderLoop(e){e&&!this.renderScopes.has(e)&&this.renderScopes.add(e),this.sceneGraph&&this.camera&&this.renderer?(this.isPostProcessing?this.postProcessor?.render():this.renderer.render(this.sceneGraph,this.camera),this.markerHtmlUI&&this.markerHtmlUI.render(),this.renderScopes.forEach(e=>e({sceneGraph:this.sceneGraph,camera:this.camera,renderer:this.renderer})),this.animateTimer=requestAnimationFrame(()=>this.runRenderLoop())):c.Logger.error("PotatoEngine","Scene, Camera, Renderer is not defined")}addRunScope(e){this.renderScopes.has(e)&&c.Logger.warn("PotatoEngine","RunScope is already added"),this.renderScopes.add(e)}attachControl(e){if(this.camera&&this.renderer)return this._controlsAide.createControls(e,this.camera,this.renderer.domElement),this.addRunScope(()=>this.controls.update()),this.controls;c.Logger.error("PotatoEngine","Camera, Renderer is not defined")}stopRenderLoop(){this.animateTimer&&(cancelAnimationFrame(this.animateTimer),this.animateTimer=0)}regieterPlugin(e,r){}initEngineInfo(e){"setAttribute"in e&&e.setAttribute("data-engine",`T3d-ez.gl V${this.VERSION}`)}};
1
+ "use strict";var e=require("../../node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.module.cjs.js"),r=require("../../utils/index.cjs.js"),t=require("../Controls/index.cjs.js"),i=require("../Resource/ResourceAide.cjs.js"),s=require("../PostProcessor/index.cjs.js"),n=require("../MarkerHtmlUI/index.cjs.js"),a=require("../Renderer/RendererAide.cjs.js"),o=require("../Cameras/index.cjs.js"),c=require("../../utils/Logger.cjs.js"),d=require("../../node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.core.cjs.js");const h={container:"body",antialias:!0,alpha:!1,backgroundColor:1514278,camera:"Perspective",isPostProcessing:!1};exports.T3dEZEngine=class{container;activeCanvas=null;parameters=h;renderScopes;VERSION="0.0.1";_rendererAide;_cameraAide;CONTROL_TYPE=t.CONTROL_TYPE;resourceAide;_controlsAide;plugins=new Map;isPostProcessing=!1;markerHtmlUI;postProcessor;animateTimer;get activeView(){return this._rendererAide.activeView}set activeView(e){this._rendererAide.activeView=e}get renderer(){return this._rendererAide?.renderer}get sceneGraph(){return this._rendererAide.activeScene}get camera(){return this._rendererAide.activeView?.camera}get controls(){return this._controlsAide.activeControls}set controls(e){this._controlsAide.activeControls=e}constructor(e){c.Logger.info("Hello T3dEZEngine.js!"),this.renderScopes=new Set,this.parameters={...this.parameters,...e};const{container:d}=this.parameters;this.container=r.getContainerElement(d),this.resourceAide=new i.ResourceAide(this),this._controlsAide=new t.ControlsAide(this),this._cameraAide=new o.CameraAide;const h=this._initRenderer(this.parameters,this.container);this.activeCanvas=h.domElement,this.container.appendChild(h.domElement),this._rendererAide=new a.RendererAide(h),this.postProcessor=new s.PostProcessor(this),this.markerHtmlUI=new n.MarkerHtmlUI(this),this.initEngineInfo(this.activeCanvas)}async startApplication(e){const r=e.camera??this._cameraAide.createCamera("Perspective",this.renderer.domElement),t=e.scene??new d.Scene;return this.activeView=this._rendererAide.create(Object.assign(e,{camera:r,scene:t})),this}_initRenderer(r,t=document.body){const{antialias:i,alpha:s}=r,n=new e.WebGLRenderer({antialias:i,alpha:s,powerPreference:"high-performance"}),{clientWidth:a,clientHeight:o}=t,c=1*window.devicePixelRatio;return n.setPixelRatio(c),n.setSize(a||500,o||300),n.outputColorSpace=d.SRGBColorSpace,n.toneMapping=d.ACESFilmicToneMapping,n.toneMappingExposure=1,n}runRenderLoop(e){e&&!this.renderScopes.has(e)&&this.renderScopes.add(e),this.sceneGraph&&this.camera&&this.renderer?(this.isPostProcessing?this.postProcessor?.render():this.renderer.render(this.sceneGraph,this.camera),this.markerHtmlUI&&this.markerHtmlUI.render(),this.renderScopes.forEach(e=>e({sceneGraph:this.sceneGraph,camera:this.camera,renderer:this.renderer})),this.animateTimer=requestAnimationFrame(()=>this.runRenderLoop())):c.Logger.error("PotatoEngine","Scene, Camera, Renderer is not defined")}addRunScope(e){this.renderScopes.has(e)&&c.Logger.warn("PotatoEngine","RunScope is already added"),this.renderScopes.add(e)}attachControl(e){if(this.camera&&this.renderer)return this._controlsAide.createControls(e,this.camera,this.renderer.domElement),this.addRunScope(()=>this.controls.update()),this.controls;c.Logger.error("PotatoEngine","Camera, Renderer is not defined")}stopRenderLoop(){this.animateTimer&&(cancelAnimationFrame(this.animateTimer),this.animateTimer=0)}regieterPlugin(e,r){}initEngineInfo(e){"setAttribute"in e&&e.setAttribute("data-engine",`T3d-ez.gl V${this.VERSION}`)}};
@@ -1 +1 @@
1
- import{WebGLRenderer as e}from"../../node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.module.esm.js";import{getContainerElement as r}from"../../utils/index.esm.js";import{CONTROL_TYPE as t,ControlsAide as i}from"../Controls/index.esm.js";import{ResourceAide as s}from"../Resource/ResourceAide.esm.js";import{PostProcessor as n}from"../PostProcessor/index.esm.js";import{MarkerHtmlUI as a}from"../MarkerHtmlUI/index.esm.js";import{RendererAide as o}from"../Renderer/RendererAide.esm.js";import{CameraAide as d}from"../Cameras/index.esm.js";import{Logger as c}from"../../utils/Logger.esm.js";import{Scene as m,SRGBColorSpace as h,ACESFilmicToneMapping as p}from"../../node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.core.esm.js";const l={container:"body",antialias:!0,alpha:!1,backgroundColor:1514278,camera:"Perspective",isPostProcessing:!1};class u{container;activeCanvas=null;parameters=l;renderScopes;VERSION="0.0.1";_rendererAide;_cameraAide;CONTROL_TYPE=t;resourceAide;_controlsAide;plugins=new Map;isPostProcessing=!1;markerHtmlUI;postProcessor;animateTimer;get activeView(){return this._rendererAide.activeView}set activeView(e){this._rendererAide.activeView=e}get renderer(){return this._rendererAide?.renderer}get sceneGraph(){return this._rendererAide.activeScene}get camera(){return this._rendererAide.activeView?.camera}get controls(){return this._controlsAide.activeControls}constructor(e){c.info("Hello T3dEZEngine.js!"),this.renderScopes=new Set,this.parameters={...this.parameters,...e};const{container:t}=this.parameters;this.container=r(t),this.resourceAide=new s(this),this._controlsAide=new i(this),this._cameraAide=new d;const m=this._initRenderer(this.parameters,this.container);this.activeCanvas=m.domElement,this.container.appendChild(m.domElement),this._rendererAide=new o(m),this.postProcessor=new n(this),this.markerHtmlUI=new a(this),this.initEngineInfo(this.activeCanvas)}async startApplication(e){const r=e.camera??this._cameraAide.createCamera("Perspective",this.renderer.domElement),t=e.scene??new m;return this.activeView=this._rendererAide.create(Object.assign(e,{camera:r,scene:t})),this}_initRenderer(r,t=document.body){const{antialias:i,alpha:s}=r,n=new e({antialias:i,alpha:s,powerPreference:"high-performance"}),{clientWidth:a,clientHeight:o}=t,d=1*window.devicePixelRatio;return n.setPixelRatio(d),n.setSize(a||500,o||300),n.outputColorSpace=h,n.toneMapping=p,n.toneMappingExposure=1,n}runRenderLoop(e){e&&!this.renderScopes.has(e)&&this.renderScopes.add(e),this.sceneGraph&&this.camera&&this.renderer?(this.isPostProcessing?this.postProcessor?.render():this.renderer.render(this.sceneGraph,this.camera),this.markerHtmlUI&&this.markerHtmlUI.render(),this.renderScopes.forEach(e=>e({sceneGraph:this.sceneGraph,camera:this.camera,renderer:this.renderer})),this.animateTimer=requestAnimationFrame(()=>this.runRenderLoop())):c.error("PotatoEngine","Scene, Camera, Renderer is not defined")}addRunScope(e){this.renderScopes.has(e)&&c.warn("PotatoEngine","RunScope is already added"),this.renderScopes.add(e)}attachControl(e){if(this.camera&&this.renderer)return this._controlsAide.createControls(e,this.camera,this.renderer.domElement),this.addRunScope(()=>this.controls.update()),this.controls;c.error("PotatoEngine","Camera, Renderer is not defined")}stopRenderLoop(){this.animateTimer&&(cancelAnimationFrame(this.animateTimer),this.animateTimer=0)}regieterPlugin(e,r){}initEngineInfo(e){"setAttribute"in e&&e.setAttribute("data-engine",`T3d-ez.gl V${this.VERSION}`)}}export{u as T3dEZEngine};
1
+ import{WebGLRenderer as e}from"../../node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.module.esm.js";import{getContainerElement as r}from"../../utils/index.esm.js";import{CONTROL_TYPE as t,ControlsAide as i}from"../Controls/index.esm.js";import{ResourceAide as s}from"../Resource/ResourceAide.esm.js";import{PostProcessor as n}from"../PostProcessor/index.esm.js";import{MarkerHtmlUI as o}from"../MarkerHtmlUI/index.esm.js";import{RendererAide as a}from"../Renderer/RendererAide.esm.js";import{CameraAide as d}from"../Cameras/index.esm.js";import{Logger as c}from"../../utils/Logger.esm.js";import{Scene as m,SRGBColorSpace as h,ACESFilmicToneMapping as p}from"../../node_modules/.pnpm/three@0.182.0/node_modules/three/build/three.core.esm.js";const l={container:"body",antialias:!0,alpha:!1,backgroundColor:1514278,camera:"Perspective",isPostProcessing:!1};class u{container;activeCanvas=null;parameters=l;renderScopes;VERSION="0.0.1";_rendererAide;_cameraAide;CONTROL_TYPE=t;resourceAide;_controlsAide;plugins=new Map;isPostProcessing=!1;markerHtmlUI;postProcessor;animateTimer;get activeView(){return this._rendererAide.activeView}set activeView(e){this._rendererAide.activeView=e}get renderer(){return this._rendererAide?.renderer}get sceneGraph(){return this._rendererAide.activeScene}get camera(){return this._rendererAide.activeView?.camera}get controls(){return this._controlsAide.activeControls}set controls(e){this._controlsAide.activeControls=e}constructor(e){c.info("Hello T3dEZEngine.js!"),this.renderScopes=new Set,this.parameters={...this.parameters,...e};const{container:t}=this.parameters;this.container=r(t),this.resourceAide=new s(this),this._controlsAide=new i(this),this._cameraAide=new d;const m=this._initRenderer(this.parameters,this.container);this.activeCanvas=m.domElement,this.container.appendChild(m.domElement),this._rendererAide=new a(m),this.postProcessor=new n(this),this.markerHtmlUI=new o(this),this.initEngineInfo(this.activeCanvas)}async startApplication(e){const r=e.camera??this._cameraAide.createCamera("Perspective",this.renderer.domElement),t=e.scene??new m;return this.activeView=this._rendererAide.create(Object.assign(e,{camera:r,scene:t})),this}_initRenderer(r,t=document.body){const{antialias:i,alpha:s}=r,n=new e({antialias:i,alpha:s,powerPreference:"high-performance"}),{clientWidth:o,clientHeight:a}=t,d=1*window.devicePixelRatio;return n.setPixelRatio(d),n.setSize(o||500,a||300),n.outputColorSpace=h,n.toneMapping=p,n.toneMappingExposure=1,n}runRenderLoop(e){e&&!this.renderScopes.has(e)&&this.renderScopes.add(e),this.sceneGraph&&this.camera&&this.renderer?(this.isPostProcessing?this.postProcessor?.render():this.renderer.render(this.sceneGraph,this.camera),this.markerHtmlUI&&this.markerHtmlUI.render(),this.renderScopes.forEach(e=>e({sceneGraph:this.sceneGraph,camera:this.camera,renderer:this.renderer})),this.animateTimer=requestAnimationFrame(()=>this.runRenderLoop())):c.error("PotatoEngine","Scene, Camera, Renderer is not defined")}addRunScope(e){this.renderScopes.has(e)&&c.warn("PotatoEngine","RunScope is already added"),this.renderScopes.add(e)}attachControl(e){if(this.camera&&this.renderer)return this._controlsAide.createControls(e,this.camera,this.renderer.domElement),this.addRunScope(()=>this.controls.update()),this.controls;c.error("PotatoEngine","Camera, Renderer is not defined")}stopRenderLoop(){this.animateTimer&&(cancelAnimationFrame(this.animateTimer),this.animateTimer=0)}regieterPlugin(e,r){}initEngineInfo(e){"setAttribute"in e&&e.setAttribute("data-engine",`T3d-ez.gl V${this.VERSION}`)}}export{u as T3dEZEngine};
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "t3d-ez.gl",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "main": "./dist/t3d-ez.gl.cjs.js",
6
6
  "module": "./dist/t3d-ez.gl.esm.js",
@@ -34,6 +34,7 @@ declare class T3dEZEngine implements IT3dEZEngine {
34
34
  get sceneGraph(): Scene;
35
35
  get camera(): Camera;
36
36
  get controls(): OrbitControls;
37
+ set controls(controls: OrbitControls);
37
38
  constructor(parameters?: IT3dEZEngineParameters);
38
39
  startApplication(viewParams: IViewInstancePrametersWithDefaults): Promise<this>;
39
40
  private _initRenderer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "t3d-ez.gl",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "",
5
5
  "main": "./dist/t3d-ez.gl.cjs.js",
6
6
  "module": "./dist/t3d-ez.gl.esm.js",