当前位置:网站首页>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);},边栏推荐
猜你喜欢

Pony语言学习(一):环境配置(续)

Tkinter 入门之旅

链读精选:星巴克着眼于数字收藏品并更好地吸引客户

ORACLE系统表空间SYSTEM占满无法扩充表空间问题解决过程

最新最全的数字藏品发售日历-07.27

国内数字藏品投资价值分析

链读|最新最全的数字藏品发售日历-08.02

.las转.txt 再转.pcd,编译运行中出现的错误

Ten years of sharpening a sword!The digital collection market software, Link Reading APP is officially open for internal testing!

PyTorch 入门之旅
随机推荐
IDEA 项目中设置 Sources Resources 等文件夹
第二次实验
pygame学习计划(1)
Four characteristics of ACID
MySql 约束
CSDN Markdown 之我见代码块 | CSDN编辑器测评
network security firewall
视图【】【】【】【】
cesium 监听地图缩放或放大来控制地图上添加的内容是否展示
来亲自手搭一个ResNet18网络
R语言:修改chart.Correlation()函数绘制相关性图——完美出图
知识蒸馏论文学习
链读好文:热加密存储与冷加密存储有什么区别?
文本元素
小程序wx.request简单Promise封装
【el和template区别】
pytorch框架学习(5)torchvision模块&训练一个简单的自己的CNN (二)
深度学习中的学习率调整策略(1)
微信小程序wx.writeBLECharacteristicValue汉字转buffer问题
Linux database Oracle client installation, used for shell scripts to connect to the database with sqlplus