2 lines
1.3 KiB
JavaScript
2 lines
1.3 KiB
JavaScript
/* 2020-9-24 14:48:24 | 版权所有 军懋国兴 */
|
|
mars3d.widget.bindClass(mars3d.widget.BaseWidget.extend({options:{resources:[],view:{type:"divwindow",url:"view.html",windowOptions:{width:230,height:120}}},create:function(){},winCreateOK:function(){var t=this.viewer;$("#chk_skyAtmosphere").prop("checked",t.scene.skyAtmosphere.show),$("#chk_skyAtmosphere").change(function(){var e=$(this).is(":checked");t.scene.skyAtmosphere.show=e,t.scene.globe.showGroundAtmosphere=e}),$("#chk_lightRender").prop("checked",t.scene.globe.enableLighting),$("#chk_lightRender").change(function(){var e=$(this).is(":checked");t.scene.globe.enableLighting=e,t.shadows=e,t.terrainShadows=e?Cesium.ShadowMode.ENABLED:Cesium.ShadowMode.RECEIVE_ONLY}),$("#chk_testTerrain").prop("checked",t.scene.globe.depthTestAgainstTerrain),$("#chk_testTerrain").change(function(){var e=$(this).is(":checked");(t.scene.globe.depthTestAgainstTerrain=e)&&toastr.info("深度监测打开后,您将无法看到地下或被地形遮挡的对象。")}),$("#chk_firstPerson").change(function(){$(this).is(":checked")?(toastr.info("您可以键盘按A S D W Q E和上下左右键控制方向。<br/>并在漫游中滚轮滚动可以加速减速。"),t.mars.keyboardRoam.bind({moveStep:10,dirStep:25,rotateStep:1,minPitch:.1,maxPitch:.95})):t.mars.keyboardRoam.unbind()})},activate:function(){},disable:function(){}})); |