Options
All
  • Public
  • Public/Protected
  • All
Menu

Icon3DStyle that requires a URL to retrieve a 3D mesh.

Hierarchy

Overview

Properties

Optional bloom

bloom: BloomStyle

Adds a BloomEffect to the 3D icon.

Bloom is only supported on WebGL maps.

since

2022.1

Optional color

color: string

The color of the mesh. For example "rgb(125, 125, 125)" or "rgba(125, 125, 125, 0.5)".

The default for this value is opaque white: rgba(255,255,255,1.0)

Note that if the mesh contains textures, this color will act as a modulation color. This can be useful for selection:

  painter.paintBody = function(geoCanvas, feature, shape, map, layer, state) {
     //Applying a selection style using modulation color
     var icon3DStyle = {
        meshUrl: "aircraft.gltf",
        color: state.selected ? "rgba(255,0,0,0.5)" : "rgba(255,255,255,1.0)"
     }
     geoCanvas.drawIcon3D(shape, icon3DStyle);
   };

Optional credentials

credentials: boolean

Whether credentials should be included with every HTTP request.

meshUrl

meshUrl: string

A URL referring to a mesh resource. For example http://www.example.com/mesh.gltf.

Currently only the GLTF format is supported.

Optional orientation

orientation: { heading?: number; pitch?: number; roll?: number }

Defines the orientation of a 3D icon. It can contain the following properties:

  • roll: A number defining the roll in degrees. Default value is 0 (parallel with earth).
  • pitch: A number defining the pitch in degrees. Default value is 0 (parallel with earth).
  • heading: A number defining the heading in degrees. Default value is 0 (north).

The difference between orientation and rotation is that orientation is defined in the world reference. Rotation on the other hand is defined in the local reference of the mesh.

You should use rotation to align the mesh to its axes, before it is added to the world.

You should use orientation to point the mesh in a certain world direction, after it has been added to the world.

   // The following example illustrates a plane rising upward with a pitch of 20 degrees against the horizon,
   // while heading west (270 degree azimuth).
  var orientation = {
    roll: 0,
    pitch: 20,
    heading: 270
  };

Type declaration

  • Optional heading?: number

    A number defining the heading in degrees, clockwise. Default value is 0 (north).

  • Optional pitch?: number

    A number defining the pitch in degrees, clockwise. Default value is 0 (parallel with earth).

  • Optional roll?: number

    A number defining the roll in degrees, clockwise. Default value is 0 (parallel with earth).

Optional pbrSettings

pbrSettings: PBRSettings | null

Configures the PBR shading effects applied to the mesh.

default

null

since

2021.1

Optional requestHeaders

requestHeaders: {} | null

An object literal that represents headers (as a key-value map) to send with each HTTP request. If set (and not empty), an XHR with the specified headers will be performed instead of creating an Image.

Optional requestParameters

requestParameters: {} | null

An object literal that represents URL parameters (as a key-value map) to send with each HTTP request. If set (and not empty), an XHR with the specified query parameters will be performed instead of creating an Image.

since

2021.0

Optional rotation

rotation: { x?: number; y?: number; z?: number }

Defines the rotation angle in degrees around the various axes of the mesh in its local reference. Rotation happens around (0,0,0) in the local reference of the mesh.

By default the rotation is 0 for all axis. The rotation for any axis should be defined in degrees and be a positive floating point number between 0 and 360.

The difference between orientation and rotation is that orientation is defined in the world reference. Rotation on the other hand is defined in the local reference of the mesh.

You should use rotation to align the mesh to its axes, before it is added to the world.

You should use orientation to point the mesh in a certain world direction, after it has been added to the world.

  // Example of an orientation object with a 90 degrees rotation around the X-axis.
  var rotation = {
    x: 90,
    y: 0,
    z: 0
  };

Type declaration

  • Optional x?: number

    The rotation around the x-axis. Default is 0.

  • Optional y?: number

    The rotation around the y-axis. Default is 0.

  • Optional z?: number

    The rotation around the z-axis. Default is 0.

Optional scale

scale: { x?: number; y?: number; z?: number }

Defines the factor by which the 3D icon is scaled along the various axes of the mesh's local reference. Scale can be used to convert a mesh from its local unit-of-measure to meters. By default, we assume that a mesh is defined in meters. If this is not the case, scale can be used to enlarge or shrink the mesh to fit its own unit of measure.

By default the scale is 1 for all axis. Note that the scale must be a positive, non-zero floating point value.

  // Example of scaling an object by a factor of a 1000, to convert it from millimeters to meters.</caption>
  var scale = {
    x: 1000,
    y: 1000,
    z: 1000
  };

Type declaration

  • Optional x?: number

    The rotation for the x-axis. Default is 1.

  • Optional y?: number

    The rotation for the y-axis. Default is 1.

  • Optional z?: number

    The rotation for the z-axis. Default is 1.

Optional translation

translation: { x?: number; y?: number; z?: number }

Defines the distance by which coordinates are translated in the various axes direction of the mesh local reference. This property should be used to center a mesh to (0,0,0) in its own local cartesian reference. This allows you to set the anchorpoint of the mesh, which is useful when you want to rotate the mesh around a specific point.

By default the translation is 0 for all axis. The translation can be a negative, or positive floating point number.

   // Example of how to translate a mesh 1000 meters along the Z-axis.</caption>
  var translation = {
    x: 0,
    y: 0,
    z: 1000
  };

Type declaration

  • Optional x?: number

    The translation via the x-axis. Default is 0.

  • Optional y?: number

    The translation via the y-axis. Default is 0.

  • Optional z?: number

    The translation via the z-axis. Default is 0.

Optional transparency

transparency: boolean

Indicates whether transparent surfaces should be painted transparently.

A transparent surface is a surface with either a color or a texture with an alpha channel value lower than 1. The transparency of a surface is not auto-detected.

If you set this property to true, LuciadRIA considers the mesh to have transparent surfaces, and renders it as such. If you set it to false, there is no guarantee that LuciadRIA renders the transparent surfaces of the mesh properly. For example, if you set transparency to false for this jet with a transparent cockpit, it has a see-through hole where the cockpit should be:

Transparency set to false Transparency set to true
Transparency Off Transparency On

Note that setting this flag to true might affect performance. Use it for meshes with transparent surfaces only. Drawing a mesh with the transparency flag enabled comes at a cost. It amounts to drawing the mesh twice.

default

false

since

2022.0

Optional zOrder

zOrder: number

The Z-order of this shape. Shapes will be painted from lowest to highest Z-order, so that shapes with a higher Z-order are painted on top of shapes with a lower Z-order. The default value is 0.

Note that the Z-order only has meaning in 2D.

By default the Z-order is 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