Class: FMEffectRenderer

FMEffectRenderer

一种具有但不止于bloom发光、阴影、SAO等特效的渲染器。

new fengmap.FMEffectRenderer(options, map)

Name Type Description
options
map
Example
let er = map.getEffectRenderer();
er.bloomPass.strength = 10;

Members

bloomPass

typeID

Properties:
Name Type Description
bloomPass Object

bloom发光通道

Properties
Name Type Description
threshold number

bloom发光临界值

strength number

bloom发光强度

radius number

bloom发光半径

enableSAOBlur

是否启用SAO模糊

Properties:
Name Type Description
bool boolean

true,启用;false,禁用

SAOBlurDepthCutoff

设置SAO模糊深度

Properties:
Name Type Description
value number

范围0-1

SAOBlurRadius

设置SAO模糊半径

Properties:
Name Type Description
value number

范围0-100

SAOBlurStdDev

设置SAO模糊标准偏差

Properties:
Name Type Description
value number

范围0-50

SAOIntensity

设置SAO强度

Properties:
Name Type Description
value number

范围0-1

SAOScale

设置SAO等级

Properties:
Name Type Description
value number

范围0-100

shadowLights

获取阴影光源

shadowMapSize

设置阴影尺寸

Properties:
Type Description
number

Methods

addBloomList(layer)

添加到bloom发光列表

Name Type Description
layer Object

需要发光的layer

enableBloom(bool)

启用bloom发光效果

Name Type Description
bool boolean

true,启用;false,禁用

enableSAO(bool)

启用SAO效果

Name Type Description
bool boolean

true,启用;false,禁用

enableShadow(bool)

是否启用阴影

Name Type Description
bool boolean

true,启用;false,禁用

lightChange(timevalue)

调整光源位置

Name Type Description
timevalue number

lightCtrl(bool)

光线操作开关

Name Type Description
bool boolean

true,开;false,关

removeAllBloomList()

清空bloom发光列表

removeBloomList(layer){boolean}

从bloom发光列表中移除

Name Type Description
layer Object

需要移除的layer

Returns:
Type Description
boolean