new Cesium.StyleExpression()

An expression for a style applied to a Cesium3DTileset.

此接口的衍生类评价在 3D Tiles Styling language.

该类型描述了一个接口,并不打算直接被即时化.

See:

Methods

evaluate(feature, result)boolean|number|string|RegExp|Cartesian2|Cartesian3|Cartesian4|Color

评估表达式的结果,可选择使用所提供的特性属性。 如果结果是 表达式 3D Tiles Styling language 是类型为 NT 0 Boolean NT 1 , NT 2 NT 3 ,或 NT 4 String NT 5 ,对应的JavaScript 原始类型将返回 。 如果结果为 NT 0 RegExp NT 1 ,则使用Javascript NT 2 RegExp NT 3 object will be returned. If the result is a Cartesian2, Cartesian3, or Cartesian4, a Cartesian2, Cartesian3, or Cartesian4 object will be returned. If the result argument is a Color, the Cartesian4 value is converted to a Color and then returned.
Name Type Description
feature Cesium3DTileFeature 其属性可以作为表达式中的变量的特征.
result object optional 存储结果的对象 .
Returns:
评估表达的结果.

evaluateColor(feature, result)Color

评估颜色表达式的结果,可选择使用提供的特性属性.

这相当于 StyleExpression#evaluate 但总是返回 Color 的对象.

Name Type Description
feature Cesium3DTileFeature 其属性可以作为表达式中的变量的特征.
result Color optional 存储结果的对象 .
Returns:
未提供修改的结果参数或新颜色实例 .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.