Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/isamples_globe.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions tools/globe_capture.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,23 @@

const scalar = new Cesium.NearFarScalar(1.5e2, 1.5, 8.0e6, 0.5);

// Issue #280: fade points near the globe limb so they don't appear as raised
// "blisters" at the horizon. At the fixed capture altitude (~22 Mm), nadir
// points are ~22 Mm from the camera and limb points are ~23 Mm away.
// Fading from fully opaque at 20 Mm to 15 % opaque at 24 Mm keeps center
// points vivid while visually dissolving the limb protrusion.
const limbFade = new Cesium.NearFarScalar(20.0e6, 1.0, 24.0e6, 0.15);

for (const d of data) {
const sz = Math.min(2 + Math.log2(d.count + 1) * 1.2, 14);
// Cap pixelSize at 10 px (was 14): smaller sprites protrude less at the
// limb and the size difference is imperceptible at globe-overview zoom.
const sz = Math.min(2 + Math.log2(d.count + 1) * 1.2, 10);
points.add({
position: Cesium.Cartesian3.fromDegrees(d.lon, d.lat),
pixelSize: sz,
color: sourceColors[d.source] || Cesium.Color.WHITE,
scaleByDistance: scalar
scaleByDistance: scalar,
translucencyByDistance: limbFade // issue #280
});
}

Expand Down
Loading