Options
All
  • Public
  • Public/Protected
  • All
Menu

This is the general interface that describes a Mesh style object.

The Mesh style object defines styling expressions used by TileSet3DLayer layer to style Mesh data. All properties are optional.

since

2019.0

Hierarchy

  • MeshStyle

Overview

Properties

Optional colorExpression

colorExpression: Expression<Color> | null

An expression to specify what colors to apply to mesh data.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a color value.

If you want to update the styling very often, consider using parameters in your expression. Changing the values of parameters is more efficient than replacing the whole expression.

If you define a colorExpression, the texture data, if any, will not be displayed. The color expression will determine the color.

Note that the alpha component of the color is ignored so the color will be fully opaque, unless you enable transparency.

default

null If not set, the mesh will use the texture data of the mesh, if any.

Optional displacementExpression

displacementExpression: Expression<Vector3> | null

An expression to displace mesh data.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a point value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

  // Example of a displacement expression that pushes down everything inside a shape.
  var _  = ExpressionFactory;
  var shape = _.orientedBox(layer.orientedBox);
  meshStyle.displacementExpression =  _.pushDown(shape);
default

null meshes are not displaced by default.

since

2020.0

Optional lighting

lighting: boolean

Boolean indicating whether lighting effects should be applied to the mesh.

The map allows you to apply graphics effects. This boolean indicates whether the lighting graphical effects should be applied to meshes styled with this style.

default

true

Optional selectedColorExpression

selectedColorExpression: Expression<Color> | null

An expression to specify what colors to apply to selected mesh data.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a color value. This value can also be set to null to prevent selection from changing the color.

If you want to update the styling very often, consider using parameters in your expression. Changing the values of parameters is more efficient than replacing the whole expression.

If you define a selectedColorExpression, the texture data, if any, will not be displayed while selection is active for the selected part of the mesh. The color expression will determine the color.

import {color, defaultColor, multiply} from "@luciad/ria/util/expression/ExpressionFactory";
import {OGC3DTilesModel} from "@luciad/ria/model/tileset/OGC3DTilesModel";
import {TileSet3DLayer} from "@luciad/ria/view/tileset/TileSet3DLayer";

layer.meshStyle = {
  selectedColorExpression: multiply(color("rgb(255,148,76)"), defaultColor()),
  lighting: false
};

Note that the alpha component of the color is ignored so the selection color will be fully opaque.

since

2020.0

default

An orange color expression.

Optional visibilityExpression

visibilityExpression: Expression<boolean> | null

An expression to filter mesh data.

To create expressions, you must use the factory methods in the ExpressionFactory module. The expression must be well-formed and resolve to a boolean value.

If you want to update the styling very often, consider using parameters in your expressions. Changing the values of parameters is more efficient than replacing the whole expression.

  // Example of a visibility expression that makes everything inside a shape invisible.
  var _  = ExpressionFactory;
  var shape = _.orientedBox(layer.orientedBox);
  meshStyle.visibilityExpression =  _.not(_.isInside(shape));
default

null meshes are visible by default.

since

2020.0

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method