cesium-sensoro
v0.1.13
Published
CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin.
Downloads
4
Readme
CesiumJS is a JavaScript library for creating 3D globes and 2D maps in a web browser without a plugin. It uses WebGL for hardware-accelerated graphics, and is cross-platform, cross-browser, and tuned for dynamic-data visualization.
http://cesiumjs.org/
:rocket: Get Started
Visit the Downloads page or use the npm module:
npm install cesium
Have questions? Ask them on the forum.
Interested in contributing? See CONTRIBUTING.md. :heart:
:snowflake: Mission
Our mission is to create the leading 3D globe and map for static and time-dynamic content, with the best possible performance, precision, visual quality, platform support, community, and ease of use.
:green_book: License
Apache 2.0. CesiumJS is free for both commercial and non-commercial use.
:earth_americas: Where Does the 3D Content Come From?
CesiumJS can stream 3D content such as terrain, imagery, and 3D Tiles from the commercial Cesium ion platform and other content sources. You are free to use any combination of content sources with CesiumJS that you please. Using Cesium ion helps support CesiumJS development. :heart:
:clap: Featured Demos
:clap: Demos
======
ScreenSpaceCameraController.js
- 修改默认值
this._zoomFactor = 1; // 调慢缩放速度,原始默认值 5
this._maximumRotateRate = 0.5; // 调慢旋转速度,原始默认值 1.77
fix bug : 缩放抖动
- 变量 movement 鼠标缩放距离, movement.startPosition 恒为
{ x: 0, y: 0}
, movement.endPosition.x 恒为 0, 只有 movement.endPosition.y 代表鼠标缩放距离, 为正值时鼠标动作为‘放大’,为负值时鼠标动作为’缩小‘。 - 变量 beta 为经过一系列计算得到的某个夹角 beta < 0 时 动作为‘缩小’,反之为’放大‘。
- 以下代码作用是:忽略鼠标动作是’放大‘但计算出的 beta 值为’缩小‘的情况。
- 变量 movement 鼠标缩放距离, movement.startPosition 恒为
if(beta < 0){
if (movement.endPosition.y >= 0){ // fix camera jump in and out
return;
}
}
- fix bug : 当 disableDepthTestDistance 设置为 Number.POSITIVE_INFINITY 的 Billboard 位于 canvas 中心位置时 zoom失效(只能zoomOut,不能zoomIn)
var pickedEntity = scene.pick(mousePosition);
if (scene.pickPositionSupported) {
if (pickedEntity && pickedEntity.primitive && pickedEntity.primitive instanceof Billboard && pickedEntity.primitive.disableDepthTestDistance === Number.POSITIVE_INFINITY) {
// 如果 pickedEntity 是 billboard 并且 billboard.disableDepthTestDistance === Number.POSITIVE_INFINITY 则忽略此entity,解决 此种billboard 在canvas中心点缩放失效的问题
} else {
depthIntersection = scene.pickPositionWorldCoordinates(mousePosition, scratchDepthIntersection); // The returned position is in world coordinates.
}
}