An expression for a style applied to a
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(frameState, feature, result) → Boolean|Number|String|RegExp|Cartesian2|Cartesian3|Cartesian4|Color
-
Evaluates the result of an expression, optionally using the provided feature's properties. If the result of the expression in the 3D Tiles Styling language is of type
Boolean
,Number
, orString
, the corresponding JavaScript primitive type will be returned. If the result is aRegExp
, a JavascriptRegExp
object will be returned. If the result is aCartesian2
,Cartesian3
, orCartesian4
, aCartesian2
,Cartesian3
, orCartesian4
object will be returned. If theresult
argument is aColor
, theCartesian4
value is converted to aColor
and then returned.Name Type Description frameState
FrameState The frame state. feature
Cesium3DTileFeature The feature whose properties may be used as variables in the expression. result
Object optional The object onto which to store the result. Returns:
The result of evaluating the expression. -
evaluateColor(frameState, feature, result) → Color
-
Evaluates the result of a Color expression, optionally using the provided feature's properties.
This is equivalent to
StyleExpression#evaluate
but always returns aColor
object.Name Type Description frameState
FrameState The frame state. feature
Cesium3DTileFeature The feature whose properties may be used as variables in the expression. result
Color optional The object in which to store the result. Returns:
The modified result parameter or a new Color instance if one was not provided.