1. A concise explanation of the problem you’re experiencing.
I’m attempting to switch the central body of the view to something other than the earth. I’m running into two problems but I can’t figure out how to overcome them. The first problem is that planetoids that are smaller than the earth are blacked out unless you get close enough to them. At that point they light up. I thought that disabling lighting and shadow mapping would stop that but I can’t seem to get that to happen. A second problem I’m having is that I can’t seem to set the far distance so when looking at the sun, for example, it quickly blinks out even when it occupies a large part of the screen. I’d like to get a view that is the entire solar system with planetary orbit paths at the end of this.
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
This is the state fo my trial and error code for trying to achieve this:
var ellipsoid = new Cesium.Ellipsoid(planetoid.x, planetoid.y, planetoid.z); var globe = new Cesium.Globe(ellipsoid); var newGeographicProjection = new Cesium.GeographicProjection(ellipsoid); viewer.scene.globe = globe; viewer.scene.camera.projection = newGeographicProjection; viewer.scene.globe.baseColor = planetoid.baseColor; viewer.scene.fog.enabled = false; viewer.scene.moon.show = false; viewer.scene.sun.show = false; viewer.scene.shadowMap.enabled = false; viewer.scene.logarithmicDepthBuffer = true; viewer.scene.enableLighting = false; viewer.scene.showGroundAtmosphere = false; viewer.camera.far = 1e12;
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I’m trying to create a solar system viewer where ultimately I’d like to be able to jump from one planet/moon/minor planet to another.
4. The Cesium version you’re using, your operating system and browser.
Whatever the current version in webpack is which I think is 1.64.0