mx3d 0.0.32 → 0.0.35
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/core/mx3d.dazzle.min.js +1 -1
- package/docs/.nojekyll +0 -0
- package/docs/README.md +24 -0
- package/docs/_sidebar.md +18 -0
- package/docs/camera.md +24 -0
- package/docs/css/dark.css +979 -0
- package/docs/css/local.google.fonts.css +295 -0
- package/docs/css/vue.css +1025 -0
- package/docs/fonts/6xK3dSBYKcSV-LCoeQqfX1RYOo3qOK7l.woff2 +0 -0
- package/docs/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3i54rwlxdu.woff2 +0 -0
- package/docs/fonts/6xKydSBYKcSV-LCoeQqfX1RYOo3ik4zwlxdu.woff2 +0 -0
- package/docs/gui/2D.md +53 -0
- package/docs/gui/3D.md +46 -0
- package/docs/gui/test1.png +0 -0
- package/docs/gui/test2.png +0 -0
- package/docs/gui/test3.png +0 -0
- package/docs/heatMap/heatMap.md +115 -0
- package/docs/heatMap/test1.png +0 -0
- package/docs/heatMap/test2.png +0 -0
- package/docs/index.html +50 -0
- package/docs/js/docsify@4.min.js +1 -0
- package/docs/models/modelmgr.md +251 -0
- package/docs/project/projectmgr.md +73 -0
- package/docs/project/scenetree.jpg +0 -0
- package/docs/started/environment.md +42 -0
- package/docs/started/quickstart.md +89 -0
- package/lib/Camera.d.ts +1 -0
- package/lib/VisualAngle.d.ts +0 -4
- package/lib/components/AirFlowObject.d.ts +1 -0
- package/lib/components/ConduitObject.d.ts +1 -0
- package/lib/components/DefaultObject.d.ts +1 -0
- package/lib/components/IObject.d.ts +1 -0
- package/lib/components/LeakWaterObject.d.ts +1 -0
- package/lib/components/Project.d.ts +1 -0
- package/lib/components/Region.d.ts +2 -0
- package/mx3d.js +752 -672
- package/mx3d.min.js +3 -3
- package/package.json +1 -1
package/core/mx3d.dazzle.min.js
CHANGED
|
@@ -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){this.textDics=new Array,this.id=e}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.
|
|
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/docs/.nojekyll
ADDED
|
File without changes
|
package/docs/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## mx3djs
|
|
2
|
+
|
|
3
|
+
> 我搭世界场景操作API集合。
|
|
4
|
+
|
|
5
|
+
## 概述
|
|
6
|
+
|
|
7
|
+
mx3djs 可以快速将我搭世界场景嵌入自定义web程序中。并提供操作场景、模型的js方法,为用户提供简单、高效的二次开发环境。mx3djs 支持以html页面直接引用、nodejs + js、nodejs + typescript等进行开发。
|
|
8
|
+
|
|
9
|
+
查看[快速开始](/started/quickstart.md)了解详情。
|
|
10
|
+
|
|
11
|
+
## 特性
|
|
12
|
+
|
|
13
|
+
- 简单 针对行业话功能化制定 API,只需提供 JSON 数据即可生成对应功能效果
|
|
14
|
+
- 高效 底层采用最高效、高兼容性 WEBGL 引擎,为用户提供流畅、酷炫3D项目
|
|
15
|
+
|
|
16
|
+
## 示例
|
|
17
|
+
|
|
18
|
+
可以查看 [案例广场](http://h5.wodashijie.com/case) 来了解更多在使用 mx3djs 创建的WEB 3D项目。
|
|
19
|
+
|
|
20
|
+
## 相关网站
|
|
21
|
+
|
|
22
|
+
在[我搭世界](http://h5.wodashijie.com)里可以创建3D场景。
|
|
23
|
+
|
|
24
|
+
在[官网](http://gzmaijng.com.com)里可以查看公司信息.
|
package/docs/_sidebar.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
- [说明](/)
|
|
2
|
+
|
|
3
|
+
- [快速开始](/started/quickstart)
|
|
4
|
+
|
|
5
|
+
- [环境](/started/environment.md)
|
|
6
|
+
|
|
7
|
+
- [场景](/project/projectmgr.md)
|
|
8
|
+
|
|
9
|
+
- [相机](/camera.md)
|
|
10
|
+
|
|
11
|
+
- [对象](/models/modelmgr.md)
|
|
12
|
+
|
|
13
|
+
- UI
|
|
14
|
+
|
|
15
|
+
- [2D 跟随 UI](/gui/2D.md)
|
|
16
|
+
- [3D 网格 UI](/gui/3D.md)
|
|
17
|
+
|
|
18
|
+
- [云图](/heatMap/heatMap.md)
|
package/docs/camera.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
## 2d 视角
|
|
2
|
+
|
|
3
|
+
```javascript
|
|
4
|
+
app.Camera.orthographic()
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
## 3d 聚焦
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
app.Camera.perspective()
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## 指定层级聚焦视角
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
children[0].setVisualAngle('{"alpha":2.1038092987808326,"focus":{"x":11.526,"y":1.948,"z":-12.331},"radius":107.58319272047535,"beta":0.9597050684905495}',5,200);
|
|
17
|
+
//第一个参数为视角参数F获取
|
|
18
|
+
//第二个参数为缩放最小限制距离,可为空
|
|
19
|
+
//第三个参数为缩放最大限制距离,可为空
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### 视角获取
|
|
23
|
+
|
|
24
|
+
在鼠标旋转到最佳视角时按键盘 F 键立即弹出视角参数
|