new StyleExpression()
Style expression for Cesium3DTileset.
The derived classes of this interface will evaluate expressions in the 3D Tiles Styling language.
This type describes an interface and is not intended to be directly instantiated.
Methods
-
evaluate(frameState, feature, result){Boolean|Number|String|RegExp|Cartesian2|Cartesian3|Cartesian4|Color}
-
The result of the expression can be calculated using the provided properties. If the type of the expression 3D Tiles Styling language is boolean, numeric, or string, the corresponding JavaScript will return a Cartesian2, Cartesian3, or Cartesian4 object if the result is Cartesian2, Cartesian3, or Cartesian4. If the result parameter is Color, the Cartesian4 value is converted to Color and returned.
Name Type Description frameStateFrameState Frame status.
featureCesium3DTileFeature Its properties can be used as characteristics of variables in expressions.
resultObject optional The object that stores the results.
Returns:
Type Description Boolean | Number | String | RegExp | Cartesian2 | Cartesian3 | Cartesian4 | Color The calculation result of the expression. -
evaluateColor(frameState, feature, result){Color}
-
Evaluate the results of color expressions and choose to use the provided feature attributes.
This is equivalent to StyleExpression # evaluate, but always returns a Color object.
Name Type Description frameStateFrameState Frame status.
featureCesium3DTileFeature Its attributes can be used as features of variables in expressions.
resultColor optional The object that stores the results.
Returns:
Type Description Color The modified result parameters, or a new color instance (if not provided).