mx3d 0.0.25 → 0.0.26

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.
Files changed (3) hide show
  1. package/mx3d.js +1 -1
  2. package/mx3d.min.js +1 -1
  3. package/package.json +1 -1
package/mx3d.js CHANGED
@@ -7814,7 +7814,7 @@ class Project_Project {
7814
7814
  let _object = this.app.project.objectDatas.find(_id);
7815
7815
  if (!_object.isMonitor || _object.parentId != id)
7816
7816
  continue;
7817
- target.push({ label: _object.name, id: _object.id, type: this.root.objectType, children: [] });
7817
+ target.push({ label: _object.name, id: _object.id, type: _object.objectType, children: [] });
7818
7818
  infinite(_object.id, target[target.length - 1].children);
7819
7819
  }
7820
7820
  };
package/mx3d.min.js CHANGED
@@ -2,7 +2,7 @@
2
2
        #ifdef FOG
3
3
          vFogDistance=(worldPos).xyz;
4
4
        #endif
5
-     `}set fogDistance(e){this.app.scene.fogDensity=1/e}set color(e){this._color=new BABYLON.Color4(e.r,e.g,e.b,e.a),this.app.scene.clearColor=this._color,this.app.scene.fogColor=new BABYLON.Color3(...this._color.asArray())}reflex(e,t){e=new BABYLON.CubeTexture(e,this.app.scene);this.app.scene.environmentTexture=e,this.app.scene.environmentIntensity=t}setBackground(e){this.background&&this.background.dispose(),this.background=new BABYLON.Layer("background",e,this.app.scene),this.background.isBackground=!0}setReflexEnabled(e){this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.reflexEnabled=e,this.app.scene.environmentIntensity=this.reflexEnabled?this.reflexIntensity:0,this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setFlexIntensity(e){this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.reflexIntensity=e,this.app.scene.environmentIntensity=this.reflexIntensity,this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1}defaultLights(){let e=new h(this.app);e.id=r.getGUID(12),e.lightType="Hemispheric",e.name="半球光_"+this.lights.count(),e.direction=new BABYLON.Vector3(1,1,0),e.color="#FFFFFF",e.intensity=1,this.lights.add(e.id,e);let t=new h(this.app);t.id=r.getGUID(12),t.lightType="Hemispheric",t.name="半球光_"+this.lights.count(),t.direction=new BABYLON.Vector3(-1,1,0),t.color="#FFFFFF",t.intensity=.7,this.lights.add(t.id,t)}offAllLight(){for(const e in this.lights.map)this.lights.find(e).light&&(this.lights.find(e).light.intensity=0,this.app.scene.removeLight(this.lights.find(e).light),this.lights.find(e).light.dispose()),this.lights.find(e).light=null}openAllLight(){for(const e in this.lights.map)this.lights.find(e).load()}loadLight(i){for(let t=0;t<i.length;t++){var s=i[t];let e;s.lightType==n.Hemispheric?(e=new h(this.app),e.id=s.id,e.lightType=s.lightType,e.name=s.name,e.direction=u.ToVector3(s.direction),e.color=s.color,e.intensity=s.intensity):s.lightType==n.Directional?(e=new c(this.app),e.id=s.id,e.lightType=s.lightType,e.name=s.name,e.direction=u.ToVector3(s.direction),e.position=u.ToVector3(s.position),e.color=s.color,e.intensity=s.intensity):s.lightType==n.Spot?(e=new p(this.app),e.id=s.id,e.lightType=s.lightType,e.name=s.name,e.direction=u.ToVector3(s.direction),e.position=u.ToVector3(s.position),e.angle=s.angle,e.exponent=s.exponent,e.range=s.range,e.color=s.color,e.intensity=s.intensity):s.lightType==n.Point&&(e=new d(this.app),e.id=s.id,e.lightType=s.lightType,e.name=s.name,e.position=u.ToVector3(s.position),e.range=s.range,e.color=s.color,e.intensity=s.intensity),e&&this.lights.add(e.id,e)}this.lights.count()<1&&this.defaultLights(),this.openAllLight()}}var y,g,v,s=i(4),b=i.n(s);class B{static de(e){return b.a.AES.decrypt(b.a.enc.Base64.stringify(b.a.enc.Hex.parse(e.substring(48,e.length))),b.a.enc.Utf8.parse(e.substring(0,32)),{iv:b.a.enc.Utf8.parse(e.substring(32,48)),mode:b.a.mode.CBC,padding:b.a.pad.Pkcs7}).toString(b.a.enc.Utf8).toString()}}class A{constructor(){this.colors={1:BABYLON.Color3.Red(),2:new BABYLON.Color3(1,.5,0),3:BABYLON.Color3.Yellow(),4:new BABYLON.Color3(0,1,1),5:BABYLON.Color3.Green()};let e=new l.a.Tween(this.colors[1]).to({r:1,g:0,b:0},500),t=new l.a.Tween(this.colors[1]).to({r:1,g:.5,b:.5},500);t.chain(e),e.chain(t),e.start();let i=new l.a.Tween(this.colors[2]).to({r:1,g:.55,b:0},500),s=new l.a.Tween(this.colors[2]).to({r:0,g:0,b:0},500);i.chain(s),s.chain(i),i.start();let n=new l.a.Tween(this.colors[3]).to({r:1,g:.84,b:0},500),o=new l.a.Tween(this.colors[3]).to({r:0,g:0,b:0},500);n.chain(o),o.chain(n),n.start();let r=new l.a.Tween(this.colors[4]).to({r:0,g:.75,b:1},500),a=new l.a.Tween(this.colors[4]).to({r:0,g:0,b:0},500);r.chain(a),a.chain(r),r.start();let c=new l.a.Tween(this.colors[5]).to({r:.53,g:.8,b:0},500),h=new l.a.Tween(this.colors[5]).to({r:0,g:0,b:0},500);c.chain(h),h.chain(c),c.start()}}(s=y=y||{}).Campus="Campus",s.Building="Building",s.Scene="Scene",s.Humiture="Humiture",s.Battery="Battery",s.PowerCabinet="PowerCabinet",s.Cabinet="Cabinet",s.AirCondition="AirCondition",s.UPS="UPS",s.Camera="Camera",s.NewWindMachine="NewWindMachine",s.SmokeDetector="SmokeDetector",s.AudibleVisualAlarm="AudibleVisualAlarm",s.LeakWater="LeakWater",s.Wall="Wall",s.Floor="Floor",s.Window="Window",s.Door="Door",s.AirFlow="AirFlow",s.Corner="Corner",s.FireFighting="FireFighting",s.Lighting="Lighting",s.Enclosure="Enclosure",s.ParkingLot="ParkingLot",s.Elevator="Elevator",s.Other="Other",s.InrackAsset="InrackAsset",s.GasDetection="GasDetection",s.Security="Security",s.OutDoorScene="OutDoorScene",s.Infrared="Infrared",s.SkyBox="SkyBox",s.UI3D="UI3D",s.ColdTongDoor="ColdTongDoor",s.VirtualBox="VirtualBox",s.PathPint="PathPint",s.Port="Port",s.Positioner="Positioner",s.AutoAnimation="AutoAnimation",s.MapModel="MapModel",s.radiator="radiator",s.Conduit="Conduit",s.ParkModel="ParkModel",s.Storey="Storey",s.optimizedWall="optimizedWall";class w{constructor(e){this.objectDatas=new m,this.app=e}delete(){this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0;for(const e in this.objectDatas.map)this.objectDatas.find(e).instance&&this.objectDatas.find(e).instance.dispose();this.objectDatas.clear(),this.current=null,this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1}optimization(){this.app.scene.freezeActiveMeshes()}getChildNodes(e){let t=new Array;for(const s in this.objectDatas.map){var i=this.app.project.objectDatas.find(s);i.parentId==e&&i.objectType!=y.Wall&&i.objectType!=y.Corner&&t.push(i)}return t}getTrees(){const n=(e,t)=>{for(const s in this.objectDatas.map){var i=this.app.project.objectDatas.find(s);i.isMonitor&&i.parentId==e&&(t.push({label:i.name,id:i.id,type:this.root.objectType,children:[]}),n(i.id,t[t.length-1].children))}};var e={label:this.root.name,id:this.root.id,type:this.root.objectType,children:[]};return n(this.root.id,e.children),e}find(e){return this.objectDatas.find(e)}findFormObjectType(e,t=!0){let i=new Array;for(const n in this.objectDatas.map){var s=this.app.project.objectDatas.find(n);t&&s.parentId!=this.current.id||s.objectType!=e||i.push(s)}return i}show(){this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0;for(const t in this.app.project.objectDatas.map){let e=this.app.project.objectDatas.find(t);e.setEnabled(!0)}this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}class x{constructor(e){this.resourcePath="http://models.wodashijie.com/",this.walls=new m,this.resources=new m,this.ndoeMats=new m,this.Materials=new m,this.Textures=new m,this.MergeMaterials=new m,this.app=e;e=r.getGUID(12);this.transparentBox=BABYLON.MeshBuilder.CreateBox(e,{size:1},this.app.scene),this.transparentBox.alwaysSelectAsActiveMesh=!0;let t=new BABYLON.StandardMaterial(e,this.app.scene);t.diffuseTexture=new BABYLON.Texture(this.app.rootUrl+"resources/white.jpg",this.app.scene,!0,!1),t.alphaMode=BABYLON.Engine.ALPHA_COMBINE,t.emissiveColor=BABYLON.Color3.Green(),this.transparentBox.material=t,this.transparentBox.setEnabled(!1),this.transparentBox.visibility=.3;e=r.getGUID(12);this.BOX=BABYLON.MeshBuilder.CreateBox(e,{size:1},this.app.scene),this.BOX.edgesColor=BABYLON.Color4.FromHexString("#4ba3fff2"),this.BOX.setEnabled(!1),this.BOX.visibility=0,this.FogTex=new BABYLON.Texture(this.app.rootUrl+"resources/fogtex.png",this.app.scene,!0,!1)}async loadModelMesh(t){let i=this.resources.find(t.modelId);if(!i)try{i=await BABYLON.SceneLoader.LoadAssetContainerAsync(this.resourcePath+"bundle/"+t.modelId+"/",t.modelId+t.extension,this.app.scene),0<i.animationGroups.length&&i.animationGroups[0].stop(),i.addAllToScene(),i.meshes[0].setEnabled(!1),i.meshes[0].getChildMeshes().forEach(e=>{e.metadata&&e.metadata.gltf&&e.metadata.gltf.extras&&(i.isExtras=!0,e.metadata.gltf.extras.U&&BABYLON.Animation.CreateAndStartAnimation("u",e.material.albedoTexture,"uOffset",30*e.metadata.gltf.extras.Uspeed,30,0,1,1),e.metadata.gltf.extras.V&&BABYLON.Animation.CreateAndStartAnimation("v",e.material.albedoTexture,"vOffset",30*e.metadata.gltf.extras.Vspeed,30,0,1,1))}),t.objectType==y.OutDoorScene||i.isExtras||i.meshes[0].getChildMeshes().forEach(e=>{e.registerInstancedBuffer("color",4),e.instancedBuffers.color=new BABYLON.Color4(1,1,1,1)}),this.resources.add(t.modelId,i)}catch(e){console.error("模型下载失败!模型编号:"+t.modelId+";错误信息:"+e)}return i}loadModelMeshAsync(t,i){var e=this.resources.find(t.modelId);e?i(e):BABYLON.SceneLoader.LoadAssetContainerAsync(this.resourcePath+"bundle/"+t.modelId+"/",t.modelId+t.extension,this.app.scene).then(e=>{0<e.animationGroups.length&&e.animationGroups[0].stop(),this.resources.add(t.modelId,e),i(e)}).catch(()=>{console.error("模型下载失败!模型编号:"+t.modelId)})}GetMaterial(e,t){let i=this.Materials.find(e.modelId);var s;return void 0===i&&(s=this.GetTexture(e,t),i=new BABYLON.StandardMaterial(e.modelId,t),i.alphaMode=BABYLON.Engine.ALPHA_COMBINE,i.diffuseTexture=s,this.Materials.add(e.modelId,i)),i}GetTexture(e,t){let i=this.Textures.find(e.modelId);return void 0===i&&(i=new BABYLON.Texture(this.resourcePath+"texture/"+e.modelId+e.extension,t,!1),".png"==e.extension&&(i.hasAlpha=!0),this.Textures.add(e.modelId,i)),i}GetMergeMaterial(t,i){let s=this.MergeMaterials.find(t.modelId);if(void 0===s){s=new BABYLON.CustomMaterial(t.modelId,i),s.alphaMode=2,this.MergeMaterials.add(t.modelId,s),s.AddUniform("textureData","sampler2D",null),s.Vertex_Definitions(`
5
+     `}set fogDistance(e){this.app.scene.fogDensity=1/e}set color(e){this._color=new BABYLON.Color4(e.r,e.g,e.b,e.a),this.app.scene.clearColor=this._color,this.app.scene.fogColor=new BABYLON.Color3(...this._color.asArray())}reflex(e,t){e=new BABYLON.CubeTexture(e,this.app.scene);this.app.scene.environmentTexture=e,this.app.scene.environmentIntensity=t}setBackground(e){this.background&&this.background.dispose(),this.background=new BABYLON.Layer("background",e,this.app.scene),this.background.isBackground=!0}setReflexEnabled(e){this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.reflexEnabled=e,this.app.scene.environmentIntensity=this.reflexEnabled?this.reflexIntensity:0,this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1}setFlexIntensity(e){this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0,this.reflexIntensity=e,this.app.scene.environmentIntensity=this.reflexIntensity,this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1}defaultLights(){let e=new h(this.app);e.id=r.getGUID(12),e.lightType="Hemispheric",e.name="半球光_"+this.lights.count(),e.direction=new BABYLON.Vector3(1,1,0),e.color="#FFFFFF",e.intensity=1,this.lights.add(e.id,e);let t=new h(this.app);t.id=r.getGUID(12),t.lightType="Hemispheric",t.name="半球光_"+this.lights.count(),t.direction=new BABYLON.Vector3(-1,1,0),t.color="#FFFFFF",t.intensity=.7,this.lights.add(t.id,t)}offAllLight(){for(const e in this.lights.map)this.lights.find(e).light&&(this.lights.find(e).light.intensity=0,this.app.scene.removeLight(this.lights.find(e).light),this.lights.find(e).light.dispose()),this.lights.find(e).light=null}openAllLight(){for(const e in this.lights.map)this.lights.find(e).load()}loadLight(i){for(let t=0;t<i.length;t++){var s=i[t];let e;s.lightType==n.Hemispheric?(e=new h(this.app),e.id=s.id,e.lightType=s.lightType,e.name=s.name,e.direction=u.ToVector3(s.direction),e.color=s.color,e.intensity=s.intensity):s.lightType==n.Directional?(e=new c(this.app),e.id=s.id,e.lightType=s.lightType,e.name=s.name,e.direction=u.ToVector3(s.direction),e.position=u.ToVector3(s.position),e.color=s.color,e.intensity=s.intensity):s.lightType==n.Spot?(e=new p(this.app),e.id=s.id,e.lightType=s.lightType,e.name=s.name,e.direction=u.ToVector3(s.direction),e.position=u.ToVector3(s.position),e.angle=s.angle,e.exponent=s.exponent,e.range=s.range,e.color=s.color,e.intensity=s.intensity):s.lightType==n.Point&&(e=new d(this.app),e.id=s.id,e.lightType=s.lightType,e.name=s.name,e.position=u.ToVector3(s.position),e.range=s.range,e.color=s.color,e.intensity=s.intensity),e&&this.lights.add(e.id,e)}this.lights.count()<1&&this.defaultLights(),this.openAllLight()}}var y,g,v,s=i(4),b=i.n(s);class B{static de(e){return b.a.AES.decrypt(b.a.enc.Base64.stringify(b.a.enc.Hex.parse(e.substring(48,e.length))),b.a.enc.Utf8.parse(e.substring(0,32)),{iv:b.a.enc.Utf8.parse(e.substring(32,48)),mode:b.a.mode.CBC,padding:b.a.pad.Pkcs7}).toString(b.a.enc.Utf8).toString()}}class A{constructor(){this.colors={1:BABYLON.Color3.Red(),2:new BABYLON.Color3(1,.5,0),3:BABYLON.Color3.Yellow(),4:new BABYLON.Color3(0,1,1),5:BABYLON.Color3.Green()};let e=new l.a.Tween(this.colors[1]).to({r:1,g:0,b:0},500),t=new l.a.Tween(this.colors[1]).to({r:1,g:.5,b:.5},500);t.chain(e),e.chain(t),e.start();let i=new l.a.Tween(this.colors[2]).to({r:1,g:.55,b:0},500),s=new l.a.Tween(this.colors[2]).to({r:0,g:0,b:0},500);i.chain(s),s.chain(i),i.start();let n=new l.a.Tween(this.colors[3]).to({r:1,g:.84,b:0},500),o=new l.a.Tween(this.colors[3]).to({r:0,g:0,b:0},500);n.chain(o),o.chain(n),n.start();let r=new l.a.Tween(this.colors[4]).to({r:0,g:.75,b:1},500),a=new l.a.Tween(this.colors[4]).to({r:0,g:0,b:0},500);r.chain(a),a.chain(r),r.start();let c=new l.a.Tween(this.colors[5]).to({r:.53,g:.8,b:0},500),h=new l.a.Tween(this.colors[5]).to({r:0,g:0,b:0},500);c.chain(h),h.chain(c),c.start()}}(s=y=y||{}).Campus="Campus",s.Building="Building",s.Scene="Scene",s.Humiture="Humiture",s.Battery="Battery",s.PowerCabinet="PowerCabinet",s.Cabinet="Cabinet",s.AirCondition="AirCondition",s.UPS="UPS",s.Camera="Camera",s.NewWindMachine="NewWindMachine",s.SmokeDetector="SmokeDetector",s.AudibleVisualAlarm="AudibleVisualAlarm",s.LeakWater="LeakWater",s.Wall="Wall",s.Floor="Floor",s.Window="Window",s.Door="Door",s.AirFlow="AirFlow",s.Corner="Corner",s.FireFighting="FireFighting",s.Lighting="Lighting",s.Enclosure="Enclosure",s.ParkingLot="ParkingLot",s.Elevator="Elevator",s.Other="Other",s.InrackAsset="InrackAsset",s.GasDetection="GasDetection",s.Security="Security",s.OutDoorScene="OutDoorScene",s.Infrared="Infrared",s.SkyBox="SkyBox",s.UI3D="UI3D",s.ColdTongDoor="ColdTongDoor",s.VirtualBox="VirtualBox",s.PathPint="PathPint",s.Port="Port",s.Positioner="Positioner",s.AutoAnimation="AutoAnimation",s.MapModel="MapModel",s.radiator="radiator",s.Conduit="Conduit",s.ParkModel="ParkModel",s.Storey="Storey",s.optimizedWall="optimizedWall";class w{constructor(e){this.objectDatas=new m,this.app=e}delete(){this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0;for(const e in this.objectDatas.map)this.objectDatas.find(e).instance&&this.objectDatas.find(e).instance.dispose();this.objectDatas.clear(),this.current=null,this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1}optimization(){this.app.scene.freezeActiveMeshes()}getChildNodes(e){let t=new Array;for(const s in this.objectDatas.map){var i=this.app.project.objectDatas.find(s);i.parentId==e&&i.objectType!=y.Wall&&i.objectType!=y.Corner&&t.push(i)}return t}getTrees(){const n=(e,t)=>{for(const s in this.objectDatas.map){var i=this.app.project.objectDatas.find(s);i.isMonitor&&i.parentId==e&&(t.push({label:i.name,id:i.id,type:i.objectType,children:[]}),n(i.id,t[t.length-1].children))}};var e={label:this.root.name,id:this.root.id,type:this.root.objectType,children:[]};return n(this.root.id,e.children),e}find(e){return this.objectDatas.find(e)}findFormObjectType(e,t=!0){let i=new Array;for(const n in this.objectDatas.map){var s=this.app.project.objectDatas.find(n);t&&s.parentId!=this.current.id||s.objectType!=e||i.push(s)}return i}show(){this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!0;for(const t in this.app.project.objectDatas.map){let e=this.app.project.objectDatas.find(t);e.setEnabled(!0)}this.app.scene.blockfreeActiveMeshesAndRenderingGroups=!1}}class x{constructor(e){this.resourcePath="http://models.wodashijie.com/",this.walls=new m,this.resources=new m,this.ndoeMats=new m,this.Materials=new m,this.Textures=new m,this.MergeMaterials=new m,this.app=e;e=r.getGUID(12);this.transparentBox=BABYLON.MeshBuilder.CreateBox(e,{size:1},this.app.scene),this.transparentBox.alwaysSelectAsActiveMesh=!0;let t=new BABYLON.StandardMaterial(e,this.app.scene);t.diffuseTexture=new BABYLON.Texture(this.app.rootUrl+"resources/white.jpg",this.app.scene,!0,!1),t.alphaMode=BABYLON.Engine.ALPHA_COMBINE,t.emissiveColor=BABYLON.Color3.Green(),this.transparentBox.material=t,this.transparentBox.setEnabled(!1),this.transparentBox.visibility=.3;e=r.getGUID(12);this.BOX=BABYLON.MeshBuilder.CreateBox(e,{size:1},this.app.scene),this.BOX.edgesColor=BABYLON.Color4.FromHexString("#4ba3fff2"),this.BOX.setEnabled(!1),this.BOX.visibility=0,this.FogTex=new BABYLON.Texture(this.app.rootUrl+"resources/fogtex.png",this.app.scene,!0,!1)}async loadModelMesh(t){let i=this.resources.find(t.modelId);if(!i)try{i=await BABYLON.SceneLoader.LoadAssetContainerAsync(this.resourcePath+"bundle/"+t.modelId+"/",t.modelId+t.extension,this.app.scene),0<i.animationGroups.length&&i.animationGroups[0].stop(),i.addAllToScene(),i.meshes[0].setEnabled(!1),i.meshes[0].getChildMeshes().forEach(e=>{e.metadata&&e.metadata.gltf&&e.metadata.gltf.extras&&(i.isExtras=!0,e.metadata.gltf.extras.U&&BABYLON.Animation.CreateAndStartAnimation("u",e.material.albedoTexture,"uOffset",30*e.metadata.gltf.extras.Uspeed,30,0,1,1),e.metadata.gltf.extras.V&&BABYLON.Animation.CreateAndStartAnimation("v",e.material.albedoTexture,"vOffset",30*e.metadata.gltf.extras.Vspeed,30,0,1,1))}),t.objectType==y.OutDoorScene||i.isExtras||i.meshes[0].getChildMeshes().forEach(e=>{e.registerInstancedBuffer("color",4),e.instancedBuffers.color=new BABYLON.Color4(1,1,1,1)}),this.resources.add(t.modelId,i)}catch(e){console.error("模型下载失败!模型编号:"+t.modelId+";错误信息:"+e)}return i}loadModelMeshAsync(t,i){var e=this.resources.find(t.modelId);e?i(e):BABYLON.SceneLoader.LoadAssetContainerAsync(this.resourcePath+"bundle/"+t.modelId+"/",t.modelId+t.extension,this.app.scene).then(e=>{0<e.animationGroups.length&&e.animationGroups[0].stop(),this.resources.add(t.modelId,e),i(e)}).catch(()=>{console.error("模型下载失败!模型编号:"+t.modelId)})}GetMaterial(e,t){let i=this.Materials.find(e.modelId);var s;return void 0===i&&(s=this.GetTexture(e,t),i=new BABYLON.StandardMaterial(e.modelId,t),i.alphaMode=BABYLON.Engine.ALPHA_COMBINE,i.diffuseTexture=s,this.Materials.add(e.modelId,i)),i}GetTexture(e,t){let i=this.Textures.find(e.modelId);return void 0===i&&(i=new BABYLON.Texture(this.resourcePath+"texture/"+e.modelId+e.extension,t,!1),".png"==e.extension&&(i.hasAlpha=!0),this.Textures.add(e.modelId,i)),i}GetMergeMaterial(t,i){let s=this.MergeMaterials.find(t.modelId);if(void 0===s){s=new BABYLON.CustomMaterial(t.modelId,i),s.alphaMode=2,this.MergeMaterials.add(t.modelId,s),s.AddUniform("textureData","sampler2D",null),s.Vertex_Definitions(`
6
6
  varying vec3 localPos ;
7
7
  varying vec3 localNrm ;
8
8
  `),s.Fragment_Definitions(`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mx3d",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "",
5
5
  "main": "mx3d.js",
6
6
  "typings": "./dist/index.d.ts",