Skip to content

Instantly share code, notes, and snippets.

@RalucaNicola
Created August 16, 2019 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RalucaNicola/c4b030021f248fa841885e60c0d2e23c to your computer and use it in GitHub Desktop.
Save RalucaNicola/c4b030021f248fa841885e60c0d2e23c to your computer and use it in GitHub Desktop.
const radius = 6358137; // approximate Earth radius in meters
const origin = new Point({
x: 0, y: 0, z: -(2 * radius)
});
const oceanSurface = new Graphic({
geometry: origin,
symbol: {
type: "point-3d",
symbolLayers: [
{
type: "object",
resource: {
href: "./sphere/scene.gltf"
},
width: 2 * radius
}
]
}
});
view.graphics.add(oceanSurface);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment