mx3d 0.0.33 → 0.0.36

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.
@@ -82,4 +82,4 @@
82
82
 
83
83
  gl_FragColor = vec4(baseTex.xyz, resAlpha.a);
84
84
  }
85
- `;var a=i.getEngine().createEffectForParticles(t.id+"myParticle",["time","u_emitXMin","u_emitYMin","u_emitXMax","u_emitYMax","emitBox_WorldM"],["boxTexSampler"],"");return t.onAfterWorldMatrixUpdateObservable.add(()=>{a.setMatrix("emitBox_WorldM",t.getWorldMatrix())}),a.onCompileObservable.add(()=>{a.setMatrix("emitBox_WorldM",t.getWorldMatrix()),a.setFloat("u_emitXMin",o.minEmitBox.x),a.setFloat("u_emitYMin",o.minEmitBox.y),a.setFloat("u_emitXMax",o.maxEmitBox.x),a.setFloat("u_emitYMax",o.maxEmitBox.y)}),a.onBind=function(){a.setTexture("boxTexSampler",e)},o&&o.dispose(),o=new BABYLON.ParticleSystem("particles",200,i,a),o.manualEmitCount=o.getCapacity(),o.minEmitBox=n.minimum,o.maxEmitBox=n.maximum,t.onDispose=()=>{o&&o.dispose()},o.onDispose=()=>{r&&r.dispose()},o.particleTexture=r.clone(),o.emitter=t,s&&(o.renderingGroupId=1),o.isLocal=!0,o.color1=new BABYLON.Color4(.8,.8,.8,.1),o.color2=new BABYLON.Color4(.95,.95,.95,.15),o.colorDead=new BABYLON.Color4(.9,.9,.9,.1),o.minSize=.7,o.maxSize=1,o.minLifeTime=Number.MAX_SAFE_INTEGER,o.emitRate=50,o.blendMode=BABYLON.ParticleSystem.BLENDMODE_STANDARD,o.gravity=new BABYLON.Vector3(0,0,0),o.direction1=new BABYLON.Vector3(0,0,0),o.direction2=new BABYLON.Vector3(0,0,0),o.minAngularSpeed=-2,o.maxAngularSpeed=2,o.minEmitPower=.5,o.maxEmitPower=1,o.updateSpeed=.005,o.start(),o}static createTempVlaue(e,t,i,n){let s=new BABYLON.Mesh("temp_"+r.getGUID(12),i);s.position=t;let o=new BABYLON.GUI.TextBlock;return o.isPointerBlocker=!1,o.text="默认提示",o.color="white",o.resizeToFit=!0,o.fontSize="20px",o.text=e,n.addControl(o),o.linkWithMesh(s),o}static createCapacity(e,t,i,n="200px"){let s=new c(e,t);s.anchor.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0,s.mesh=BABYLON.MeshBuilder.CreateBox("RATIO_"+s.anchor.id,{size:1}),s.mesh.position=s.anchor.instance.position.clone(),s.mesh.position.y-=s.mesh.scaling.y/2,s.mesh.scaling=s.anchor.instance.scaling.clone(),s.mesh.scaling.x=.98*s.mesh.scaling.x,s.mesh.scaling.z=.98*s.mesh.scaling.z,s.mesh.rotation=s.anchor.instance.rotation.clone(),s.mesh.alwaysSelectAsActiveMesh=!0,s.mesh.visibility=1;let o=t<.25?BABYLON.Color3.Blue():.25<=t&&t<.5?BABYLON.Color3.Green():.5<=t&&t<.75?BABYLON.Color3.Yellow():BABYLON.Color3.Red();s.color=o.toHexString(),t*=s.mesh.scaling.y;var r=new BABYLON.Vector3(0,-.5,0);s.mesh.setPivotPoint(r);let a=new BABYLON.StandardMaterial(s.mesh.id,s.anchor.instance._scene);return a.diffuseColor=o,s.mesh.material=a,BABYLON.Animation.CreateAndStartAnimation(s.mesh.id,s.mesh,"scaling.y",15,30,.02,t,0,null),s.anchor.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1,i&&(s.textMesh=this.createTextMesh(e,i,t,n,"#fff")),s}static createTextMesh(e,t,i,n="200px",s="white"){e.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0;let o=BABYLON.Mesh.CreatePlane("text_"+e.id,e.instance.scaling.x,e.app.scene,!0,BABYLON.Mesh.DOUBLESIDE);o.alwaysSelectAsActiveMesh=!0,o.position=e.instance.position.clone(),o.position.y=i+.05,o.rotation.y=Math.PI-e.instance.rotation.y,o.rotation.x=-Math.PI/2;let r=new BABYLON.StandardMaterial("text_mat_"+e.id,e.app.scene);r.diffuseColor=BABYLON.Color3.White(),r.emissiveColor=BABYLON.Color3.White();let a=new BABYLON.DynamicTexture("text_tex_"+e.id,{width:1e3*e.instance.scaling.x,height:500*e.instance.scaling.x},e.app.scene,!1);return a.hasAlpha=!0,r.diffuseTexture=a,r.opacityTexture=a,a.drawText(t,1e3*e.instance.scaling.x/4,500*e.instance.scaling.x/2,"bold "+n+" NexaBold",s,"",!0,!0),a.update(),o.material=r,e.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1,o}}class o{}class a{constructor(e,t){this.textDics=new Array,this.id=e,this.scene=t}set background(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this._background&&this._background.dispose(),this._background=new BABYLON.GUI.Image(r.getGUID(12)+"_Image",e),this._background.width=this.size.width+"px",this._background.height=this.size.height+"px",this.rect.addControl(this._background),this.onPointerClick&&(this._background.isPointerBlocker=!1,this._background.onPointerClickObservable.add(()=>{this.onPointerClick()})),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setTexts(i){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.textDics.forEach(e=>e.dispose());for(let t=this.textDics.length=0;t<i.length;t++){let e=new BABYLON.GUI.TextBlock;e.text=i[t].text,e.fontSize=i[t].fontSize||"20px",e.color=i[t].color||"white",e.top=i[t].top||0,e.left=i[t].left||0,this.rect.addControl(e),this.textDics.push(e)}this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}line(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this._line&&this._line.dispose(),this._line=new BABYLON.GUI.Line,this._line.lineWidth=e.width||1.5,this._line.color=e.color||"green",this._line.y2=this.size.height/2,this.container.addControl(this._line),this._line.linkWithMesh(this.pint),this._line.connectedControl=this.rect,this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}dispose(){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.rect&&this.rect.dispose(),this._line&&this._line.dispose(),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}isEnabled(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.rect&&(this.rect.isVisible=e),this._line&&(this._line.isVisible=e),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}class l{constructor(e,t,i,n,s,o){this.id=e,this.scene=o,this.url=i,this.scaling=n,this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance=BABYLON.Mesh.CreatePlane(this.id,n,this.scene,!0,BABYLON.Mesh.DOUBLESIDE),this.instance.alwaysSelectAsActiveMesh=!0,this.instance.position=t.position.clone();t=t.getBoundingInfo();this.instance.position.y+=(t.maximum.y-t.minimum.y)/2+s,this.instance.billboardMode=BABYLON.Mesh.BILLBOARDMODE_Y;let r=new BABYLON.StandardMaterial("Mat_"+this.id,this.scene);r.diffuseColor=BABYLON.Color3.White(),r.emissiveColor=BABYLON.Color3.White(),this.instance.material=r,this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setBackground(){let i=new Image;i.src=this.url,i.onload=()=>{this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.scaling.y=this.scaling/(i.width/i.height)/this.scaling;let e=new BABYLON.DynamicTexture(this.id,{width:i.width,height:i.height},this.scene,!1);e.hasAlpha=!0,this.instance.material.diffuseTexture=e;let t=e.getContext();t.drawImage(i,0,0),e.update(),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}setColor(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.material.diffuseColor=BABYLON.Color3.FromHexString(e),this.instance.material.emissiveColor=BABYLON.Color3.FromHexString(e),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setContents(i){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0;let n=new Image;n.src=this.url,n.onload=()=>{this.instance.scaling.y=this.scaling/(n.width/n.height)/this.scaling;let t=new BABYLON.DynamicTexture(this.id,{width:n.width,height:n.height},this.scene,!1);t.hasAlpha=!0,this.instance.material.diffuseTexture=t;let e=t.getContext();e.drawImage(n,0,0),i.forEach(e=>t.drawText(e.text,e.left,e.top,"bold "+e.fontSize+" monospace",e.color||"#fffffb","",!0,!0)),t.update(),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}dispose(){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.dispose(),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}isEnabled(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.setEnabled(e),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}class h{static create(e){let t=new o;return t.canvas=document.createElement("canvas"),t.canvas.style.cssText="width: 100%;height: 100%;background-color: transparent;outline-width: 0;-webkit-tap-highlight-color:transparent;",e.appendChild(t.canvas),t.engine=new BABYLON.Engine(t.canvas,!0,{premultipliedAlpha:!0,preserveDrawingBuffer:!0,stencil:!0}),t.engine.setHardwareScalingLevel(.5),t.engine.enableOfflineSupport=!1,t.scene=new BABYLON.Scene(t.engine,{useGeometryUniqueIdsMap:!0,useClonedMeshMap:!0,useMaterialMeshMap:!0}),t.scene.useRightHandedSystem=!0,t.scene.getBoundingBoxRenderer().frontColor=BABYLON.Color3.Green(),t.scene.getBoundingBoxRenderer().showBackLines=!1,t}static load(){}}t.default=n}],o={},s.m=n,s.c=o,s.d=function(e,t,i){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(i,n,function(e){return t[e]}.bind(null,n));return i},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=1).default;function s(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}var n,o});
85
+ `;var a=i.getEngine().createEffectForParticles(t.id+"myParticle",["time","u_emitXMin","u_emitYMin","u_emitXMax","u_emitYMax","emitBox_WorldM"],["boxTexSampler"],"");return t.onAfterWorldMatrixUpdateObservable.add(()=>{a.setMatrix("emitBox_WorldM",t.getWorldMatrix())}),a.onCompileObservable.add(()=>{a.setMatrix("emitBox_WorldM",t.getWorldMatrix()),a.setFloat("u_emitXMin",o.minEmitBox.x),a.setFloat("u_emitYMin",o.minEmitBox.y),a.setFloat("u_emitXMax",o.maxEmitBox.x),a.setFloat("u_emitYMax",o.maxEmitBox.y)}),a.onBind=function(){a.setTexture("boxTexSampler",e)},o&&o.dispose(),o=new BABYLON.ParticleSystem("particles",200,i,a),o.manualEmitCount=o.getCapacity(),o.minEmitBox=n.minimum,o.maxEmitBox=n.maximum,t.onDispose=()=>{o&&o.dispose()},o.onDispose=()=>{r&&r.dispose()},o.particleTexture=r.clone(),o.emitter=t,s&&(o.renderingGroupId=1),o.isLocal=!0,o.color1=new BABYLON.Color4(.8,.8,.8,.1),o.color2=new BABYLON.Color4(.95,.95,.95,.15),o.colorDead=new BABYLON.Color4(.9,.9,.9,.1),o.minSize=.7,o.maxSize=1,o.minLifeTime=Number.MAX_SAFE_INTEGER,o.emitRate=50,o.blendMode=BABYLON.ParticleSystem.BLENDMODE_STANDARD,o.gravity=new BABYLON.Vector3(0,0,0),o.direction1=new BABYLON.Vector3(0,0,0),o.direction2=new BABYLON.Vector3(0,0,0),o.minAngularSpeed=-2,o.maxAngularSpeed=2,o.minEmitPower=.5,o.maxEmitPower=1,o.updateSpeed=.005,o.start(),o}static createTempVlaue(e,t,i,n){let s=new BABYLON.Mesh("temp_"+r.getGUID(12),i);s.position=t;let o=new BABYLON.GUI.TextBlock;return o.isPointerBlocker=!1,o.text="默认提示",o.color="white",o.resizeToFit=!0,o.fontSize="20px",o.text=e,n.addControl(o),o.linkWithMesh(s),o}static createCapacity(e,t,i,n="200px"){let s=new c(e,t);s.anchor.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0,s.mesh=BABYLON.MeshBuilder.CreateBox("RATIO_"+s.anchor.id,{size:1}),s.mesh.position=s.anchor.instance.position.clone(),s.mesh.position.y-=s.mesh.scaling.y/2,s.mesh.scaling=s.anchor.instance.scaling.clone(),s.mesh.scaling.x=.98*s.mesh.scaling.x,s.mesh.scaling.z=.98*s.mesh.scaling.z,s.mesh.rotation=s.anchor.instance.rotation.clone(),s.mesh.alwaysSelectAsActiveMesh=!0,s.mesh.visibility=1;let o=t<.25?BABYLON.Color3.Blue():.25<=t&&t<.5?BABYLON.Color3.Green():.5<=t&&t<.75?BABYLON.Color3.Yellow():BABYLON.Color3.Red();s.color=o.toHexString(),t*=s.mesh.scaling.y;var r=new BABYLON.Vector3(0,-.5,0);s.mesh.setPivotPoint(r);let a=new BABYLON.StandardMaterial(s.mesh.id,s.anchor.instance._scene);return a.diffuseColor=o,s.mesh.material=a,BABYLON.Animation.CreateAndStartAnimation(s.mesh.id,s.mesh,"scaling.y",15,30,.02,t,0,null),s.anchor.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1,i&&(s.textMesh=this.createTextMesh(e,i,t,n,"#fff")),s}static createTextMesh(e,t,i,n="200px",s="white"){e.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0;let o=BABYLON.Mesh.CreatePlane("text_"+e.id,e.instance.scaling.x,e.app.scene,!0,BABYLON.Mesh.DOUBLESIDE);o.alwaysSelectAsActiveMesh=!0,o.position=e.instance.position.clone(),o.position.y=i+.05,o.rotation.y=Math.PI-e.instance.rotation.y,o.rotation.x=-Math.PI/2;let r=new BABYLON.StandardMaterial("text_mat_"+e.id,e.app.scene);r.diffuseColor=BABYLON.Color3.White(),r.emissiveColor=BABYLON.Color3.White();let a=new BABYLON.DynamicTexture("text_tex_"+e.id,{width:1e3*e.instance.scaling.x,height:500*e.instance.scaling.x},e.app.scene,!1);return a.hasAlpha=!0,r.diffuseTexture=a,r.opacityTexture=a,a.drawText(t,1e3*e.instance.scaling.x/4,500*e.instance.scaling.x/2,"bold "+n+" NexaBold",s,"",!0,!0),a.update(),o.material=r,e.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1,o}}class o{}class a{constructor(e,t){this.textDics=new Array,this.id=e,this.scene=t}set background(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this._background&&this._background.dispose(),this._background=new BABYLON.GUI.Image(r.getGUID(12)+"_Image",e),this._background.width=this.size.width+"px",this._background.height=this.size.height+"px",this.rect.addControl(this._background),this.onPointerClick&&(this._background.isPointerBlocker=!1,this._background.onPointerClickObservable.add(()=>{this.onPointerClick()})),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setTexts(i){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.textDics.forEach(e=>e.dispose());for(let t=this.textDics.length=0;t<i.length;t++){let e=new BABYLON.GUI.TextBlock;e.text=i[t].text,e.fontSize=i[t].fontSize||"20px",e.color=i[t].color||"white",e.top=i[t].top||0,e.left=i[t].left||0,this.rect.addControl(e),this.textDics.push(e)}this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}line(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this._line&&this._line.dispose(),this._line=new BABYLON.GUI.Line,this._line.lineWidth=e.width||1.5,this._line.color=e.color||"green",this._line.y2=this.size.height/2,this.container.addControl(this._line),this._line.linkWithMesh(this.pint),this._line.connectedControl=this.rect,this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}dispose(){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.rect&&this.rect.dispose(),this._line&&this._line.dispose(),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}isEnabled(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.rect&&(this.rect.isVisible=e),this._line&&(this._line.isVisible=e),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}class l{constructor(e,t,i,n,s,o){this.id=e,this.scene=o,this.url=i,this.scaling=n,this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance=BABYLON.Mesh.CreatePlane(this.id,n,this.scene,!0,BABYLON.Mesh.DOUBLESIDE),this.instance.alwaysSelectAsActiveMesh=!0,this.instance.position=t.clone(),this.instance.position.y+=s,this.instance.billboardMode=BABYLON.Mesh.BILLBOARDMODE_Y;let r=new BABYLON.StandardMaterial("Mat_"+this.id,this.scene);r.diffuseColor=BABYLON.Color3.White(),r.emissiveColor=BABYLON.Color3.White(),this.instance.material=r,this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setBackground(){let i=new Image;i.src=this.url,i.onload=()=>{this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.scaling.y=this.scaling/(i.width/i.height)/this.scaling;let e=new BABYLON.DynamicTexture(this.id,{width:i.width,height:i.height},this.scene,!1);e.hasAlpha=!0,this.instance.material.diffuseTexture=e;let t=e.getContext();t.drawImage(i,0,0),e.update(),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}addEventListener(t){if(this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.actionManager&&this.instance.actionManager.dispose(),this.instance.isPickable=!1,this.instance.enablePointerMoveEvents=!1,t){this.instance.isPickable=!0,this.instance.enablePointerMoveEvents=!0;let e=new BABYLON.ActionManager(this.scene);e.registerAction(new BABYLON.ExecuteCodeAction(BABYLON.ActionManager.OnPickTrigger,e=>t(this.id))),this.instance.actionManager=e}this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setColor(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.material.diffuseColor=BABYLON.Color3.FromHexString(e),this.instance.material.emissiveColor=BABYLON.Color3.FromHexString(e),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setContents(i){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0;let n=new Image;n.src=this.url,n.onload=()=>{this.instance.scaling.y=this.scaling/(n.width/n.height)/this.scaling;let t=new BABYLON.DynamicTexture(this.id,{width:n.width,height:n.height},this.scene,!1);t.hasAlpha=!0,this.instance.material.diffuseTexture=t;let e=t.getContext();e.drawImage(n,0,0),i.forEach(e=>t.drawText(e.text,e.left,e.top,"bold "+e.fontSize+" monospace",e.color||"#fffffb","",!0,!0)),t.update(),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}dispose(){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.dispose(),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}isEnabled(e){this.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.instance.setEnabled(e),this.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}class h{static create(e){let t=new o;return t.canvas=document.createElement("canvas"),t.canvas.style.cssText="width: 100%;height: 100%;background-color: transparent;outline-width: 0;-webkit-tap-highlight-color:transparent;",e.appendChild(t.canvas),t.engine=new BABYLON.Engine(t.canvas,!0,{premultipliedAlpha:!0,preserveDrawingBuffer:!0,stencil:!0}),t.engine.setHardwareScalingLevel(.5),t.engine.enableOfflineSupport=!1,t.scene=new BABYLON.Scene(t.engine,{useGeometryUniqueIdsMap:!0,useClonedMeshMap:!0,useMaterialMeshMap:!0}),t.scene.useRightHandedSystem=!0,t.scene.getBoundingBoxRenderer().frontColor=BABYLON.Color3.Green(),t.scene.getBoundingBoxRenderer().showBackLines=!1,t}static load(){}}t.default=n}],o={},s.m=n,s.c=o,s.d=function(e,t,i){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(t,e){if(1&e&&(t=s(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(s.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var n in t)s.d(i,n,function(e){return t[e]}.bind(null,n));return i},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="",s(s.s=1).default;function s(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,s),t.l=!0,t.exports}var n,o});
package/lib/Camera.d.ts CHANGED
@@ -12,6 +12,7 @@ export default class Camera {
12
12
  perspective(): void;
13
13
  focusingFromProperty(_visualAngle: VisualAngle): void;
14
14
  flyTo(_visualAngle: VisualAngle, _sheep?: number): void;
15
+ translation(_visualAngle: VisualAngle, _sheep?: number): void;
15
16
  computeCameraView(): void;
16
17
  _wheel(p: any): void;
17
18
  }
@@ -1,7 +1,4 @@
1
- import IObject from "./components/IObject";
2
- import Project from "./components/Project";
3
1
  export default class VisualAngle {
4
- object: IObject | Project;
5
2
  alpha: number;
6
3
  focus: BABYLON.Vector3;
7
4
  radius: number;
@@ -10,7 +7,6 @@ export default class VisualAngle {
10
7
  maximumLimit: number;
11
8
  minBeta: number;
12
9
  maxBeta: number;
13
- constructor(_object: IObject | Project);
14
10
  setVisual(_visual: any): void;
15
11
  setLimit(_miniLimit: number, _maxiLimit: number): void;
16
12
  setBeta(_minBeta: number, _maxBeta: number): void;
@@ -1,6 +1,7 @@
1
1
  import DefaultObject from "./DefaultObject";
2
2
  export default class AirFlowObject extends DefaultObject {
3
3
  bind(_m: any): void;
4
+ computeView(): void;
4
5
  setFlash(_level: number): void;
5
6
  setTransparent(_alpha?: number): void;
6
7
  setOpaque(): void;
@@ -3,6 +3,7 @@ export default class ConduitObject extends DefaultObject {
3
3
  alpha: number;
4
4
  color: string;
5
5
  bind(_m: any): void;
6
+ computeView(): void;
6
7
  setFlash(_level?: number): void;
7
8
  setOpaque(): void;
8
9
  setTransparent(alpha?: number): void;
@@ -31,6 +31,7 @@ export default class DefaultObject implements IObject {
31
31
  set showBoundingBox(_value: boolean);
32
32
  get showBoundingBox(): boolean;
33
33
  bind(_m: any): void;
34
+ computeView(): void;
34
35
  optimization(_isOptimization: boolean): void;
35
36
  alwaysActive(): void;
36
37
  addEventListener(type: string, callback: Function): void;
@@ -23,4 +23,5 @@ export default interface IObject extends IBase {
23
23
  stop(): any;
24
24
  flyTo(): any;
25
25
  focus(): any;
26
+ computeView(): any;
26
27
  }
@@ -1,6 +1,7 @@
1
1
  import DefaultObject from "./DefaultObject";
2
2
  export default class LeakWaterObject extends DefaultObject {
3
3
  bind(_l: any): void;
4
+ computeView(): void;
4
5
  addEventListener(type: string, callback: Function): void;
5
6
  removeEventListener(type: string): void;
6
7
  }
@@ -13,6 +13,7 @@ export default class Project {
13
13
  constructor(_app: App);
14
14
  delete(): void;
15
15
  optimization(): void;
16
+ computeView(): void;
16
17
  getChildNodes(_id: string): IObject[];
17
18
  getTrees(): {
18
19
  label: string;
@@ -5,6 +5,8 @@ export default class Region extends DefaultObject {
5
5
  height: number;
6
6
  constructor(app: App, _storey: any);
7
7
  bind(_storey: any, _isOptimized?: boolean): void;
8
+ computeView(): void;
9
+ flyTo(): void;
8
10
  focus(): void;
9
11
  setEnabled(_value: boolean): void;
10
12
  getBounding(): BABYLON.BoundingInfo;