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

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>3D Model attitude control </title>
<link rel="stylesheet" href="/Cesium-1.72/Build/Cesium/Widgets/widgets.css">
<script src="/Cesium-1.72/Build/Cesium/Cesium.js"></script>
</head>
<body>
<div style="width:1500px;height:700px;">
<div id="toolbar" style="z-index: 999;"></div>
<div id="cesiumContainer" style="width:100%;height:100%;"></div>
</div>
</body>
</html>
<script> var viewer = new Cesium.Viewer('cesiumContainer', {
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 }); viewer.scene.globe.enableLighting = true;// Enable the earth with the sun as the light source var heading = Cesium.Math.toRadians(0);// Position of model head y Axis rotation var pitch = 0;//z Axis rotation var roll = 0;//x Axis rotation var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll); var orientation = Cesium.Transforms.headingPitchRollQuaternion( Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, 5000), hpr ); var entity = new Cesium.Entity({
id:'palne', name:'My plane', position: Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, 5000), orientation:orientation, model:{
uri: "/Cesium-1.72/Apps/SampleData/models/CesiumAir/Cesium_Air.glb", minimumPixelSize: 128, maximumScale: 20000, } }) viewer.entities.add(entity); viewer.zoomTo(entity); var imageryLayers = viewer.imageryLayers; // The viewModel tracks the state of our mini application. var viewModel = {
brightness: 0, contrast: 0, hue: 0, saturation: 0, gamma: 0, }; // Convert the viewModel members into knockout observables. Cesium.knockout.track(viewModel); // Bind the viewModel to the DOM elements of the UI that call for it. var toolbar = document.getElementById("toolbar"); Cesium.knockout.applyBindings(viewModel, toolbar); // Make the active imagery layer a subscriber of the viewModel. function subscribeLayerParameter(name) {
Cesium.knockout .getObservable(viewModel, name) .subscribe(function (newValue) {
if (imageryLayers.length > 0) {
var layer = imageryLayers.get(0); layer[name] = newValue; } }); } subscribeLayerParameter("brightness"); subscribeLayerParameter("contrast"); subscribeLayerParameter("hue"); subscribeLayerParameter("saturation"); subscribeLayerParameter("gamma"); </script>
The adjustment of model attitude is related to the current position of the model
Case code :https://github.com/zhangxuhui1992/cesium
边栏推荐
- 坚果云-在新电脑上同步移动硬盘的文件
- 数据安全合规之后,给风控团队带来了新的问题
- register_ Chrdev and CDEV_ init cdev_ Add usage differences
- 博士毕业去县城工作,如何是你,怎么选?
- IndexSearch
- [activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!
- Pref usage record
- MySQL8 NDB Cluster安装部署
- Raft介绍
- Good partner for cloud skill improvement, senior brother cloud of Amazon officially opened today
猜你喜欢

On July 2, I invited you to TD Hero online conference
![9: Chapter 3: e-commerce engineering analysis: 4: [general module]; (to be written...)](/img/96/cbed98ec69c952f1d231ce2ed25aab.png)
9: Chapter 3: e-commerce engineering analysis: 4: [general module]; (to be written...)

MC Instruction Decoder

Tutoriel etcd - chapitre 8 API compacte, Watch et lease pour etcd

AcWing 第 57 场周赛

Implementation of aut, a self-developed transport layer protocol for sound network -- dev for dev column

数据安全合规之后,给风控团队带来了新的问题

Compile - compile for itop4412 development board makefile

Raft introduction
![Delete duplicates in an ordered array ii[double pointers -- unified in multiple cases]](/img/e2/cadfdbe476a86cb2d72c1ae0160a4a.png)
Delete duplicates in an ordered array ii[double pointers -- unified in multiple cases]
随机推荐
Exercise book of introduction to database system
Several cross end development artifacts
[activity registration] it's your turn to explore the yuan universe! I will be waiting for you in Shenzhen on July 2!
Niuke network: longest continuous subarray with positive product
Drug management system plus database, overnight, plus report
[JVM] takes you to learn about the garbage collection mechanism (GC) in the JVM -- including diagrams
Property or method “approval1“ is not defined on the instance but referenced during render
php7.3 centos7.9安装sqlserver扩展
Halcon knowledge: regional topics [07]
[demo] write file circularly
[200 opencv routines] 215 Drawing approximate ellipse based on polyline
定时任务删除指定时间的的数据
redis淘汰策略
Talk about telecommuting | community essay solicitation
leetcode:787. K 站中转内最便宜的航班【k步最短路 + dfs记忆化 + defaultdict(dict)】
On July 2, I invited you to TD Hero online conference
[Verilog quick start of Niuke online question series] ~ bit splitting and operation
阿里云盘分享压缩包
addmodule_allmerge_ams_im
Etcd tutorial - Chapter 9 etcd implementation of distributed locks