基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/views/3d/environment/SunLighting"], (SunLighting) => { /* code goes here */ });
ESM:
import SunLighting from "@arcgis/core/views/3d/environment/SunLighting";
類:
esri/views/3d/environment/SunLighting
繼承: SunLighting > Lighting > Accessor
自從:用於 JavaScript 4.23 的 ArcGIS API
用法說明
SunLighting 類允許您將場景中的照明更改為陽光。燈光的位置設置為太陽的位置。
例子:
let view = new SceneView({
container: "viewDiv",
map: new Map({
basemap: "satellite",
ground: "world-elevation"
}),
environment: {
lighting: {
type: "sun" // autocasts as new SunLighting()
}
}
});
隻要 type 屬性更改,照明可視化就會更新:
view.environment.lighting = {
type: "sun",
directShadowsEnabled: true // autocasts as new SunLighting({ directShadowsEnabled: true })
}
相關用法
- JavaScript ArcGIS SunLighting.when用法及代碼示例
- JavaScript ArcGIS SunnyWeather用法及代碼示例
- JavaScript ArcGIS Sublayer.JoinTableDataSource用法及代碼示例
- JavaScript ArcGIS Sublayer.DynamicDataLayer用法及代碼示例
- JavaScript ArcGIS SubtypeSublayer.renderer用法及代碼示例
- JavaScript ArcGIS Sublayer.opacity用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.on用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.sublayers用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.timeOffset用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.fields用法及代碼示例
- JavaScript ArcGIS Sublayer.TableDataSource用法及代碼示例
- JavaScript ArcGIS Sublayer.visible用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.maxScale用法及代碼示例
- JavaScript ArcGIS Sublayer.labelingInfo用法及代碼示例
- JavaScript ArcGIS Sublayer.createFeatureLayer用法及代碼示例
- JavaScript ArcGIS Sublayer.DynamicMapLayer用法及代碼示例
- JavaScript ArcGIS Sublayer.title用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer layerview-create-error事件用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.layerId用法及代碼示例
- JavaScript ArcGIS Sublayer.maxScale用法及代碼示例
- JavaScript ArcGIS Sublayer.fields用法及代碼示例
- JavaScript ArcGIS Sublayer.getFieldDomain用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer refresh事件用法及代碼示例
- JavaScript ArcGIS Sublayer.labelsVisible用法及代碼示例
- JavaScript ArcGIS SubtypeGroupLayer.queryFeatureCount用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 SunLighting。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。