Class: ModelComplexColor

Glodon.CIMCube.Animation.ModelEffect. ModelComplexColor

模型单体要素按高程分段着色

new ModelComplexColor(map, opts)

模型单体要素按高程分段着色
Parameters:
Name Type Description
map Glodon.CIMCube CIMCube实例
opts Object 模型单体要素着色参数
Properties
Name Type Argument Default Description
tiles3DLayer Tiles3DLayer Tiles3DLayer图层
field string <optional>
feature字段,默认id
mode string <optional>
step硬切分 / gradient段间插值,默认step
replace Boolean <optional>
true true替换漫反射,false与原材质相乘
colorList Array <optional>
着色列表
Properties
Name Type Description
ids Array featureId集合
colorStops Array 高程比例色带,ratio为该段上界
Properties
Name Type Description
ratio Number 0~1
color String | Color 颜色

Methods


checkUpdate(tile)

检查是否需要更新。
Parameters:
Name Type Description
tile Object 瓦片。
Returns:
Type
Boolean

clearComplexColor()

清除着色。

disable()

关闭着色,恢复原材质

dispose()

释放资源

enable()

写入纹理并开启着色

isDirtyData(tile)

判断数据是否变更。
Parameters:
Name Type Description
tile Object 瓦片。
Returns:
Type
Boolean

loadUpdate(tile)

加载时更新。
Parameters:
Name Type Description
tile Object 瓦片。

removeFeatures(ids)

删除指定feature的分段着色
Parameters:
Name Type Description
ids Array featureId集合

setFeatureComplexColor(ids, packed)

设置要素颜色。
Parameters:
Name Type Description
ids Array 标识列表。
packed Array 颜色数据。

setOpts(options)

更新参数
Parameters:
Name Type Description
options Object 模型单体要素着色参数
Properties
Name Type Argument Description
mode string <optional>
step硬切分 / gradient段间插值
replace boolean <optional>
true替换漫反射,false与原材质相乘
colorList Array <optional>
着色列表
Properties
Name Type Description
ids Array featureId集合
colorStops Array 高程比例色带

updateData(colorList)

更新着色数据。
Parameters:
Name Type Description
colorList Array 颜色列表。

updateOption(opts)

更新参数。
Parameters:
Name Type Description
opts Object 参数。
Properties
Name Type Description
field string 字段。
mode string 模式。
replace boolean 是否替换。
colorList Array 颜色列表。

updateProperties(tile)

更新属性。
Parameters:
Name Type Description
tile Object 瓦片。

updateTileProperties(tile, forceScan)

更新瓦片属性。
Parameters:
Name Type Description
tile Object 瓦片。
forceScan Boolean 是否强制扫描。

visibleUpdate(tile)

更新可见瓦片。
Parameters:
Name Type Description
tile Object 瓦片。