scaleByDistance

Gets or sets the StyleExpression object used to evaluate the style's scaleByDistance property. Alternatively a string or object defining a vec4 style can be used. The getter will return the internal Expression or ConditionsExpression, which may differ from the value provided to the setter.

The expression must return a Cartesian4.

This expression is only applicable to point features in a Vector tile.

const style = new Cesium3DTileStyle();
// Override scaleByDistance expression with a string
style.scaleByDistance = 'vec4(1.5e2, 2.0, 1.5e7, 0.5)';
style.scaleByDistance.evaluate(feature); // returns a Cartesian4

See also