当前位置:网站首页>Cesium-1.72 learning (earth rotation)
Cesium-1.72 learning (earth rotation)
2022-06-30 17:10:00 【Eternal wolf tooth】

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>earth rotation </title>
<link rel="stylesheet" href="/Cesium-1.72/Build/Cesium/Widgets/widgets.css">
<script src="/Cesium-1.72/Build/Cesium/Cesium.js"></script>
</head>
<div style="width:1500px;height:700px;">
<div id="cesiumContainer" style="width:100%;height:100%;"></div>
</div>
</html>
<script> var viewer = new Cesium.Viewer('cesiumContainer', {
imageryProvider:new Cesium.UrlTemplateImageryProvider({
url:'http://localhost:8099/basemap_0-10/{z}/{y}/{x}.png', // Native map service fileExtension : "png", }), geocoder:false, // A geographic location search tool , Used to display the geographic location accessed by the camera . The default is Microsoft Bing Map . homeButton:true, // Home page location , Click to jump to the default view . sceneModePicker:true, // Switch 2D、3D and Columbus View (CV) Pattern . baseLayerPicker:false, // Select the base map of 3D digital earth (imagery and terrain). navigationHelpButton:true, // Help tips , How to operate digital earth . animation:false,// Control the playback speed of window animation . creditsDisplay:false, // Display trademark copyright and data sources . timeline:false, // Show the current time and allow the user to drag to any specified time on the progress bar . fullscreenButton:true, // Check the full screen button shouldAnimate: true, clock:new Cesium.Clock({
currentTime:Cesium.JulianDate.fromDate(new Date()) }) }); viewer.scene.globe.enableLighting = true;// Enable the earth with the sun as the light source // The earth rotates function icrf() {
if (!viewer || viewer.scene.mode !== Cesium.SceneMode.SCENE3D) {
return; } const icrfToFixed = Cesium.Transforms.computeIcrfToFixedMatrix( viewer.clock.currentTime ); if (Cesium.defined(icrfToFixed)) {
const camera = viewer.camera; const offset = Cesium.Cartesian3.clone(camera.position); const transform = Cesium.Matrix4.fromRotationTranslation(icrfToFixed); camera.lookAtTransform(transform, offset); } } //option You can set some parameters of the clock , For example, the starting time of rotation , The speed of rotation, etc const start = function (cesiumViewer,option={
multiplier:1}) {
viewer = cesiumViewer viewer.scene.postUpdate.addEventListener(icrf); if(viewer.clock){
const keys=Object.keys(option) for(let k of keys){
viewer.clock[k]=option[k] } } } const stop = function () {
if(!viewer){
return } viewer.clock.multiplier=1 viewer.scene.postUpdate.removeEventListener(icrf); viewer = undefined } // In order to see clearly , Set the clockwise speed to 500 times start(viewer,{
multiplier:500}) setTimeout(function () {
alert(" Stop rotation ") stop(); },10000) </script>
Case code :https://github.com/zhangxuhui1992/cesium
边栏推荐
- 数据库系统概论习题册
- simpleITK读取nii遇到ITK only supports orthonormal direction cosines的错误
- Data security compliance has brought new problems to the risk control team
- How to connect the Internet Reading Notes - Summary
- 列表变成向量 列表变向量 list vector
- 9: Chapter 3: e-commerce engineering analysis: 4: [general module]; (to be written...)
- Lambda expression_ Stream stream_ File class
- IO stream_ recursion
- Deep learning - (2) several common loss functions
- Sub chain cross technology source level exploration: an overview of xcvm
猜你喜欢

坚果云-在新电脑上同步移动硬盘的文件
![[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!](/img/cf/6fc5f7cafbdc5e165eb119b9b41cd9.jpg)
[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!

OpenCV中LineTypes各枚举值(LINE_4 、LINE_8 、LINE_AA )的含义

【微信小程序】小程序的宿主环境

面试突击60:什么情况会导致 MySQL 索引失效?

力士乐液控单向阀Z2S10-1-3X/

【微信小程序】常用组件基本使用(view/scroll-view/swiper、text/rich-text、button/image)

Property or method “approval1“ is not defined on the instance but referenced during render
![[Verilog basics] summary of some concepts about clock signals (clock setup/hold, clock tree, clock skew, clock latency, clock transition..)](/img/54/fd7541dae4aad7e4216bcaabbb146b.png)
[Verilog basics] summary of some concepts about clock signals (clock setup/hold, clock tree, clock skew, clock latency, clock transition..)

Etcd教程 — 第八章 Etcd之Compact、Watch和Lease API
随机推荐
leetcode:787. K 站中转内最便宜的航班【k步最短路 + dfs记忆化 + defaultdict(dict)】
面试突击60:什么情况会导致 MySQL 索引失效?
Lambda expression_ Stream stream_ File class
idea必用插件
addmodule_allmerge_ams_im
Undistorted resize using pil
力士乐液控单向阀Z2S10-1-3X/
Property or method “approval1“ is not defined on the instance but referenced during render
“推广+搞笑剧情”,如何碰撞出爆款的火花?
商单视频播放超2000万!农院改造为何屡被催更?
山西化工园区智能化管控平台建设时间表
IO流_递归
Niuke: how many different binary search trees are there
addmodule_ allmerge_ ams_ im
声网自研传输层协议 AUT 的落地实践丨Dev for Dev 专栏
RTP sending PS stream zero copy scheme
Supplementary
Internet R & D efficiency practice qunar core field Devops landing practice
SSH tool pyqt
[Demo] 循环写文件