当前位置:网站首页>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);},边栏推荐
猜你喜欢
随机推荐
matlab中的常用的类型转换
Pony语言学习(七)——表达式(Expressions)语法(单篇向)
25张炫酷交互图表,一文入门Plotly
WSTP初体验
【写下自用】每次都忘记如何train?记录如何训练自己的yolov5
Chain Reading | The latest and most complete digital collection calendar-07.28
作业实验四
事务、存储引擎
视图【】【】【】【】
IDEA的database使用教程(使用mysql数据库)
win12 修改dns脚本
网络安全5
利用PyQt5制作YOLOv5的GUI界面
基本比例尺标准分幅编号流程
ORACLE系统表空间SYSTEM占满无法扩充表空间问题解决过程
Notes 1
第六次实验
Canal 报错 Could not find first log file name in binary log index file
索引笔记【】【】
深度学习中数据到底要不要归一化?实测数据来说明!









