Insert picture description here

SuperMap iClient3D for WebGL tutorial (special effects) – scan line_scene.scaneffect ring scan_supermapsupport’s blog

class=”markdown_views prism-atom-one-dark”> WebGL has many special effects. This article will tell you how to realize the effect of scanning lines. This function can be used when it is necessary to realize the propagation of the scope of accident influence. 1. Turn on special effects The main interface of the scanning line special effect function is new Cesium.ScanEffect(). Before using the scanning line interface, the scanning function of the scene should be enabled first, as follows viewer.scene.scanEffect.show = true; 2. Construct scan lines Then set the center point of the scan and which scan mode to use (circular scan or linear scan) viewer.scene.scanEffect.centerPostion = new Cesium.Cartesian3.fromDegrees(106.50296584992466, 29.51555839072486, 2.0);//Need to use world coordinates viewer.scene.scanEffect.mode =Cesium.ScanEffectMode.CIRCLE;//Cesium.ScanEffectMode.LINE is the line scan mode Third, scan line effect optimization The above code can construct a scanning special effect, but this special effect is a bit monotonous, we can give the scanning line a texture and color to show a more cool effect scene.scanEffect.textureUrl = “./images/scan texture.jpg”; scene.scanEffect.color = Cesium.Color.RED; scene.scanEffect.speed =3 ;//unit: m/s In addition to the above parameters, the line scan mode has a unique scan parameter, namely the line scan direction. The default direction of line scanning is from west to east. If you…

Contact Us

Contact us

181-3619-1160

Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top
首页
微信
电话
搜索