当前位置:网站首页>cesium rotate image
cesium rotate image
2022-08-10 05:48:00 【Why can't I get enough to eat?】
The function implementation refers to this big guy:
Main code:
// Add model parameters are longitude, latitude, altitudeaddPic(longitude, latitude, altitude) {var entity = viewer.entities.add({// Cesium.Cartesian3.fromDegrees latitude and longitude converted to world coordinatesposition: Cesium.Cartesian3.fromDegrees(longitude, latitude, altitude),ellipse: {semiMinorAxis: 1000.0,semiMajorAxis: 1000.0,material: Cesium.Color.YELLOW.withAlpha(0.5)}});viewer.zoomTo(viewer.entities);var ellipse = entity.ellipse;ellipse.material = new Cesium.ImageMaterialProperty({//map to imageimage: require("../assets/logo.png"), //Resource addresscolor: Cesium.Color.LIGHTCYAN, //background colorrepeat: new Cesium.Cartesian2(1, 1) //Number of times to repeat in the x,y direction});// rotate effectthis.rotateMaterial(entity.ellipse, 0, 1);}
/*** @description: rotate material* @param {*} instance : entity* @param {*} _stRotation : initial material rotation angle* @param {*} _amount : amount of rotation angle change* @return {*}*/rotateMaterial(instance, _stRotation, _amount) {instance.stRotation = new Cesium.CallbackProperty(function() {_stRotation += _amount;if (_stRotation >= 360 || _stRotation <= -360) {_stRotation = 0;}return Cesium.Math.toRadians(_stRotation);}, false);},
边栏推荐
- sqlplus 显示上一条命令及可用退格键
- latex图片排版技巧总结
- 再肝3天,整理了90个 NumPy 例子,不能不收藏!
- Using sqlplus to operate database in shell script
- 文章复现:超分辨率网络FSRCNN
- Minio分布式存储系统
- pytorch框架学习(3)torch.nn.functional模块和nn.Module模块
- ORACLE system table space SYSTEM is full and cannot expand table space problem solving process
- Linux数据库Oracle客户端安装,用于shell脚本用sqlplus连接数据库
- 关于cfar检测的学习及仿真
猜你喜欢
随机推荐
shell脚本中利用sqlplus操作数据库
el-cascader级联选择器的子菜单双击两次才显示被选中的内容
私有化搭建个人网盘 NextCloud
cesium 旋转图片
【YOLOv5训练错误】权重文件出错?
Tkinter 入门之旅
AWR1843型号毫米波雷达使用
利用 crontab 拷贝大文件
Batch add watermark to pictures batch scale pictures to specified size
win12 修改dns脚本
几种绘制时间线图的方法
链读|最新最全的数字藏品发售日历-08.02
链读好文:Jeff Garzik 推出 Web3 制作公司
redis---非关系型数据库(NoSql)
链读好文:热加密存储与冷加密存储有什么区别?
索引笔记【】【】
使用Tenserboard可视化深度学习训练过程
网络安全7
深度学习中数据到底要不要归一化?实测数据来说明!
Content related to ZigBee network devices