场景效果 🌎
ECCesium.Weather
天气效果
example
js
let weather = new ECCesium.Weather(viewer)
creation
constructor(viewer)
构造函数
- 参数
{Viewer} viewer
:3D 场景
- 返回值
weather
- 参数
properties
{Rain} rain
:雨天readonly
{Snow} snow
:雪天readonly
{Fog} snow
:雾天readonly
{Cloud} cloud
:云readonly
Rain
雨天效果
example
js
weather.rain.enable = true
weather.rain.speed = 2
properties
{Boolean} enable
:是否启用{Number} speed
:速度
Snow
雪天效果
example
js
weather.snow.enable = true
weather.snow.speed = 2
properties
{Boolean} enable
:是否启用{Number} speed
:速度
Fog
雾天效果
example
js
weather.fog.enable = true
weather.fog.fogColor = ECCesium.Color.BLACK
properties
{Boolean} enable
:是否启用{Color} fogColor
:颜色,{Object} fogByDistance
:距离可见,默认:{ near: 10, nearValue: 0, far: 2000, farValue: 1.0 }
Cloud
云效果
example
js
weather.cloud.enable = true
weather.cloud.rotateAmount = 0.02
properties
{Boolean} enable
:是否启用{Number} rotateAmount
:移动增量,可为负数
ECCesium.Effect
效果类
example
js
let effect = new ECCesium.Effect(viewer)
creation
constructor(viewer)
构造函数
- 参数
{Viewer} viewer
:3D 场景
- 返回值
effect
- 参数
properties
{BlackAndWhite} blackAndWhite
:黑白readonly
{Bloom} bloom
:泛光readonly
{Brightness} brightness
:明亮readonly
{DepthOfField} depthOfField
:景深readonly
{LensFlare} lensFlare
:镜头耀斑readonly
{Night} night
:夜视readonly
{Silhouette} silhouette
:描边readonly
BlackAndWhite
黑白效果
example
js
effect.blackAndWhite.enable = true
properties
{Boolean} enable
:是否启用{Number} gradations
:强度{Array} selected
:设置后期作用的覆盖物
Bloom
泛光效果
example
js
effect.bloom.enable = true
properties
{Boolean} enable
:是否启用{Number} contrast
:对比度{Number} brightness
:亮度{Number} glowOnly
:只发光{Number} delta
:Delta{Number} sigma
:Sigma{Number} stepSize
:StepSize{Array} selected
:设置后期作用的覆盖物
Brightness
明亮效果
example
js
effect.brightness.enable = true
properties
{Boolean} enable
:是否启用{Number} intensity
:强度{Array} selected
:设置后期作用的覆盖物
DepthOfField
景深效果
example
js
effect.depthOfField.enable = true
properties
{Boolean} enable
:是否启用{Number}} focalDistance
:焦距{Number} delta
:Delta{Number} sigma
:Sigma{Number} stepSize
:StepSize{Array} selected
:设置后期作用的覆盖物
LensFlare
镜头耀斑效果
example
js
effect.lensFlare.enable = true
properties
{Boolean} enable
:是否启用{Number}} intensity
:强度{Number} distortion
:扭曲度{Number} dirtAmount
:分散度{Number} haloWidth
:光圈宽度{Array} selected
:设置后期作用的覆盖物
Night
夜视效果
example
js
effect.night.enable = true
properties
{Boolean} enable
:是否启用{Array} selected
:设置后期作用的覆盖物
Silhouette
描边效果
example
js
effect.silhouette.enable = true
properties
{Boolean} enable
:是否启用{Color} color
:颜色{Number} length
:长度{Array} selected
:设置后期作用的覆盖物
ECCesium.CircleScan
扫描圈,继承于Animation
example
js
let circleScan = new ECCesium.CircleScan(viewer, '120, 20', 200)
circleScan.start()
creation
constructor(viewer,position,radius,options)
构造函数
- 参数
{Viewer} viewer
:场景{ECCesium.Position} position
:位置{Number} radius
:半径{Object} options
:属性
- 返回值
circleScan
- 参数
json
// 属性参数(optional)
{
"color": ECCesium.Color.BLUE, // 颜色
"speed": 5 // 速度
}
ECCesium.RadarScan
雷达扫描,继承于Animation
example
js
let radarScan = new ECCesium.RadarScan(viewer, '120, 20', 200)
radarScan.start()
creation
constructor(viewer,position,radius,options)
构造函数
- 参数
{Viewer} viewer
:场景{ECCesium.Position} position
:位置{Number} radius
:半径{Object} options
:属性
- 返回值
radarScan
- 参数
json
// 属性参数(optional)
{
"color": ECCesium.Color.BLUE, // 颜色
"speed": 5 // 速度
}