0
0

More than 1 year has passed since last update.

[Cesium]地球の内部を表示する

Last updated at Posted at 2022-12-21

地図の内部を表示するには

地球の内部に埋もれてしまったオブジェクトは隠れて表示されなくなってしまうため、
見つけることができずに「あれ?オブジェクトがどこか行っちゃった?」となることがある。
その場合、地球の内部を見ることができるようにすることで見つけることができて便利。

  • 参考にしたSandcastle[Globe Interior]
    image.png

  • ソースコード

  const viewer = new Cesium.Viewer("cesiumContainer", {
    orderIndependentTranslucency: false,
  });

  const scene = viewer.scene;
  const globe = scene.globe;
  globe.translucency.enabled = true;
  globe.undergroundColor = undefined;
  globe.translucency.frontFaceAlpha = 0.001;
  globe.translucency.rectangle = Cesium.Rectangle.fromDegrees(
    -180.0,
    0.0,
    -30.0,
    45.0
  );
  • 説明
    translucency.enabled : 機能の有効無効を設定する?
    undergroundColor : undefinedにすることで裏側に色がつかない。
    translucency.frontFaceAlpha : 前面の空いている場所の透明度(0だと完全透明)
    translucency.rectangle : 前面の空いている場所の範囲
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0