应用于
Cesium3DTileset
的样式的表达式。
Derived classes of this interface evaluate expressions in the 3D Tiles Styling language.
This type describes an interface and is not intended to be instantiated directly.
Methods
evaluate(feature, result) → Boolean|Number|String|RegExp|Cartesian2|Cartesian3|Cartesian4|Color
计算表达式的
result
,可选地使用提供的功能的属性。如果
中的表达式
3D Tiles Styling language
类型为Boolean
、Number
或String
,对应的JavaScript
将返回基元类型。如果结果是RegExp
,则为Javascript RegExp
对象将被返回。如果结果是Cartesian2
、Cartesian3
或Cartesian4
,
将返回Cartesian2
、Cartesian3
或Cartesian4
对象。如果结果参数是
一个Color
,Cartesian4
值被转换为Color
,然后返回。Name | Type | Description |
---|---|---|
feature |
Cesium3DTileFeature | 其属性可以用作表达式中变量的特性。 |
result |
Object | optional 要将结果存储到的对象。 |
Returns:
计算表达式的结果。
evaluateColor(feature, result) → Color
计算颜色表达式的结果,可选地使用提供的功能的属性。
This is equivalent to StyleExpression#evaluate
but always returns a Color
object.
Name | Type | Description |
---|---|---|
feature |
Cesium3DTileFeature | 其属性可以用作表达式中变量的特性。 |
result |
Color | optional 存储结果的对象。 |
Returns:
如果未提供修改的结果参数或新的颜色实例。