You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
handler.setInputAction(function(movement) {
var cartesian = viewer.scene.pickPosition(movement.position);
console.log(cartesian);
test();
},Cesium.ScreenSpaceEventType.LEFT_CLICK);
The text was updated successfully, but these errors were encountered:
Copy the following code to Sandcastle and run it. Click the same location multiple times to return different results.
const viewer = new Cesium.Viewer("cesiumContainer");
viewer.scene.globe.depthTestAgainstTerrain = true;
function test(){
viewer.scene.globe.translucency.enabled = !viewer.scene.globe.translucency.enabled;
}
let scene = viewer.scene;
let globe = scene.globe;
scene.screenSpaceCameraController.enableCollisionDetection = false;
globe.translucency.frontFaceAlphaByDistance = new Cesium.NearFarScalar(50.0,0.0,100.0,1.0);
globe.translucency.enabled = true;
globe.translucency.frontFaceAlphaByDistance.nearValue = Cesium.Math.clamp(0.3, 0.0, 0.1);
globe.translucency.frontFaceAlphaByDistance.farValue = 1.0;
let handler = new Cesium.ScreenSpaceEventHandler(scene.canvas);
handler.setInputAction(function(movement) {
var cartesian = viewer.scene.pickPosition(movement.position);
console.log(cartesian);
test();
},Cesium.ScreenSpaceEventType.LEFT_CLICK);
The text was updated successfully, but these errors were encountered: