arcgis-scene-environment
Skill1 starsChanged 6 months agoMITView on GitHub
Control the 3D environment of a SceneView in the ArcGIS Maps SDK for JavaScript 5.1: sun/virtual lighting and shadows (off by default), the sun date and cameraTrackingEnabled (which moves the date when the camera moves), atmosphere and stars, and weather (only available in global scenes at low altitude). Use this skill whenever the user adjusts lighting, shadows, a shadow study at a fixed time, atmosphere, or weather in a 3D scene.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- GeoDaoyu/arcgis-maps-sdk-js-ai-contexttheir own version, first seen Nov 8, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- GeoDaoyu/arcgis-maps-sdk-js-ai-context★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository73 other files it gives its agents.
- skills/arcgis-3d-layers/AGENTS.mdAGENTS.md
- skills/arcgis-advanced-layers/AGENTS.mdAGENTS.md
- skills/arcgis-ai-components/AGENTS.mdAGENTS.md
- skills/arcgis-arcade/AGENTS.mdAGENTS.md
- skills/arcgis-authentication/AGENTS.mdAGENTS.md
- skills/arcgis-charts/AGENTS.mdAGENTS.md
- skills/arcgis-cim-symbols/AGENTS.mdAGENTS.md
- skills/arcgis-coding-components/AGENTS.mdAGENTS.md
- skills/arcgis-coordinates-projection/AGENTS.mdAGENTS.md
- skills/arcgis-core-maps/AGENTS.mdAGENTS.md
- skills/arcgis-core-utilities/AGENTS.mdAGENTS.md
- skills/arcgis-custom-rendering/AGENTS.mdAGENTS.md
- skills/arcgis-editing/AGENTS.mdAGENTS.md
- skills/arcgis-embeddable-maps/AGENTS.mdAGENTS.md
- skills/arcgis-feature-effects/AGENTS.mdAGENTS.md
- skills/arcgis-geometry-operations/AGENTS.mdAGENTS.md
- skills/arcgis-imagery/AGENTS.mdAGENTS.md
- skills/arcgis-interaction/AGENTS.mdAGENTS.md
- skills/arcgis-knowledge-graphs/AGENTS.mdAGENTS.md
- skills/arcgis-layers/AGENTS.mdAGENTS.md
- skills/arcgis-map-tools/AGENTS.mdAGENTS.md
- skills/arcgis-parquet/AGENTS.mdAGENTS.md
- skills/arcgis-performance/AGENTS.mdAGENTS.md
- skills/arcgis-popup-templates/AGENTS.mdAGENTS.md
- skills/arcgis-portal-content/AGENTS.mdAGENTS.md
- skills/arcgis-rest-services/AGENTS.mdAGENTS.md
- skills/arcgis-scene-environment/AGENTS.mdAGENTS.md
- skills/arcgis-smart-mapping/AGENTS.mdAGENTS.md
- skills/arcgis-spatial-analysis/AGENTS.mdAGENTS.md
- skills/arcgis-starter-app/AGENTS.mdAGENTS.md
- skills/arcgis-tables-forms/AGENTS.mdAGENTS.md
- skills/arcgis-time-animation/AGENTS.mdAGENTS.md
- skills/arcgis-utility-networks/AGENTS.mdAGENTS.md
- skills/arcgis-visualization/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-advanced/AGENTS.mdAGENTS.md
- skills/arcgis-widgets-ui/AGENTS.mdAGENTS.md
- skills/hello-world/AGENTS.mdAGENTS.md
- arcgis-3d-layersSkill
- arcgis-advanced-layersSkill
- arcgis-ai-componentsSkill
- arcgis-arcadeSkill
- arcgis-authenticationSkill
- arcgis-chartsSkill
- arcgis-cim-symbolsSkill
- arcgis-coding-componentsSkill
- arcgis-coordinates-projectionSkill
- arcgis-core-mapsSkill
- arcgis-core-utilitiesSkill
- arcgis-custom-renderingSkill
- arcgis-editingSkill
- arcgis-embeddable-mapsSkill
- arcgis-feature-effectsSkill
- arcgis-geometry-operationsSkill
- arcgis-imagerySkill
- arcgis-interactionSkill
- arcgis-knowledge-graphsSkill
- arcgis-layersSkill
- arcgis-map-toolsSkill
- arcgis-parquetSkill
- arcgis-performanceSkill
- The first 60 shown.
The file
Files
Scene Environment
When to use: Activate this skill whenever the user adjusts 3D lighting, shadows, time of day, atmosphere, or weather in a SceneView.
Overview
A SceneView's environment controls lighting, atmosphere, and weather.
- Problem it solves: realistic and analytical 3D rendering (shadows, time of day, weather).
- Who it serves: developers building digital twins, shadow studies and immersive scenes.
- Pattern it teaches: set
environment(lighting/atmosphere/weather);arcgis-daylight/arcgis-weatherfor UI. - What it does NOT cover: 3D layers (see
arcgis-3d-layers) or other widgets (seearcgis-widgets-advanced).
Quick Start
import SceneView from "@arcgis/core/views/SceneView.js";
const view = new SceneView({
map,
environment: {
lighting: {
type: "sun",
date: new Date("2026-06-21T12:00:00-05:00"), // explicit offset: noon in Bogotá
directShadowsEnabled: true, // false by default
cameraTrackingEnabled: false, // keep that instant when the user navigates
},
},
});Decision Tree
- Sun at a fixed instant (shadow study, "how does it look on 21 June at 15:00")?
- Yes →
type: "sun", adatewith an explicit offset,directShadowsEnabled: true,cameraTrackingEnabled: false.
- Yes →
- "Same local time wherever the user looks"?
- Yes → keep
cameraTrackingEnabled: true(the default).
- Yes → keep
- Even, non-directional light?
- Yes →
lighting: { type: "virtual" }(it can still cast shadows).
- Yes →
- Weather (rain/snow/fog/clouds)?
- Yes →
environment.weather = { type: "rainy", … }, in a global scene, and checkenvironment.weatherAvailable.
- Yes →
Default: sun lighting; turn shadows on explicitly; pin the date for anything analytical.
Import Patterns
Direct ESM (recommended for npm/Vite/Webpack)
import SceneView from "@arcgis/core/views/SceneView.js";Dynamic Imports (CDN)
const SceneView = await $arcgis.import("@arcgis/core/views/SceneView.js");Map Components (recommended for new projects)
// Set environment on <arcgis-scene>; arcgis-daylight and arcgis-weather give the UI.
import "@arcgis/map-components/components/arcgis-scene";
import "@arcgis/map-components/components/arcgis-daylight";Key Concepts
Concept 1: Lighting and its defaults
environment.lighting is sun (date-driven) or virtual (even light). Measured defaults in 5.1.27:
type "sun", directShadowsEnabled false, cameraTrackingEnabled true, and a date of 15 March at local
solar noon under the camera (16:56 UTC for a camera over Bogotá), not the current date. Lighting can be swapped
at runtime: view.environment.lighting = { type: "virtual", directShadowsEnabled: true } autocasts.
Concept 2: Atmosphere and stars
atmosphereEnabled and starsEnabled are both true by default (measured).
Concept 3: Weather
environment.weather is sunny (default) / cloudy / rainy / snowy / foggy. Parameters are 0–1 and are
clamped (measured: precipitation: 3 became 1). It only renders where environment.weatherAvailable is true:
global scenes near the ground.
Common Pitfalls (Top 3)
Pitfall 1: Expecting shadows from sun lighting alone
// ❌ Anti-pattern
const sinSombras = { lighting: { type: "sun" } } as const;// ✅ Correct
const conSombras = { lighting: { type: "sun", directShadowsEnabled: true } } as const;Impact: measured: directShadowsEnabled is false by default for both sun and virtual lighting.
Pitfall 2: A shadow study whose hour moves when the user navigates
// ❌ Anti-pattern
view.environment.lighting = { type: "sun", date: new Date(Date.UTC(2026, 5, 21, 17)), directShadowsEnabled: true };// ✅ Correct
view.environment.lighting = {
type: "sun", date: new Date(Date.UTC(2026, 5, 21, 17)), directShadowsEnabled: true, cameraTrackingEnabled: false,
};Impact: measured: with the default cameraTrackingEnabled: true, moving the camera from Bogotá to Tokyo
changed date from 2026-06-21T17:00Z to 2026-06-21T02:44Z (it keeps the local time of day, not the instant).
With false it stayed at 17:00Z.
Pitfall 3: Weather that silently does not show
// ❌ Anti-pattern
new SceneView({ map, viewingMode: "local", environment: { weather: { type: "rainy" } } });// ✅ Correct
const scene = new SceneView({ map, environment: { weather: { type: "rainy", precipitation: 0.6 } } }); // global
await scene.when();
if (!scene.environment.weatherAvailable) showHint("Zoom in to see the weather");Impact: measured: weather.type was "rainy" in all three cases, but weatherAvailable was true only in a
global scene at 3 km; false at 3000 km and false in a local scene. Nothing errors.
When to Read references/
| If you need... | Read |
| environment / lighting / weather signatures | references/api-detail.md |
| Lighting / shadow / weather examples | references/examples.md |
| More pitfalls (5+ extended) | references/pitfalls.md |
Related Skills
arcgis-3d-layers— the 3D content being litarcgis-widgets-advanced— the daylight UI componentarcgis-core-maps— create the SceneView
Reference Samples
Changelog
- 0.2.0 (2026-10-27): SDK 5.1. Measured in
tests/runtime/casos/arcgis-scene-environment.ts. New top pitfalls:cameraTrackingEnabled(defaulttrue) moves the sun date when the camera moves, and weather only shows whereweatherAvailableis true (not in local scenes nor high up). Documented the real defaults (15 March at local noon, not "now"; shadows off; atmosphere and stars on). Fixed the date pitfall (a date-only string is UTC midnight, not local midnight). Moved the GPU pitfall to the extended list (not measured) and replaced three comment-only extended pitfalls. - 0.1.0 (2026-05-31): Initial release.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

