Build a body still waiting for its surface with a null map, so three stops warning on each one
Since de34fff paints derived surfaces after the system is built, every body without a photograph
was given map: undefined, and three's Material.setValues warns "parameter 'map' has value of
undefined" for each: eleven warnings every time the Sun's system was entered, one per exoplanet in
any other. The marker now starts with map: null, which three takes without a word and which
the deferred paint replaces as before. In the running app, entering the Sun (38 members) now logs
no console message at all.
Control: undefined again fails "builds a body still waiting for its surface without three warning
of an undefined map".
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -180,7 +180,9 @@ function buildMarker(
|
||||
): THREE.Mesh {
|
||||
const geometry = new THREE.SphereGeometry(bodyMarkerRadiusAu(radiusKm), MARKER_WIDTH_SEGMENTS, MARKER_HEIGHT_SEGMENTS);
|
||||
const photograph = id ? bodyTexturePath(id) : undefined;
|
||||
const map = photograph ? loadCachedTexture(photograph) : undefined;
|
||||
// null, not undefined, where there is none yet: three warns "parameter 'map' has value of
|
||||
// undefined" for every body built so, eleven of them on entering the Sun's system.
|
||||
const map = photograph ? loadCachedTexture(photograph) : null;
|
||||
const material = new THREE.MeshStandardMaterial({
|
||||
map,
|
||||
color: map ? 0xffffff : colorForKind(kind),
|
||||
|
||||
Reference in New Issue
Block a user