Class: ModelGraphics

ModelGraphics

new ModelGraphics(optionsopt)

A 3D model based on glTF, the runtime asset format for WebGL, OpenGL ES, and OpenGL. The position and orientation of the model is determined by the containing Entity.

Cesium includes support for glTF geometry, materials, animations, and skinning. Cameras and lights are not currently supported.

Parameters:
Name Type Attributes Description
options Object <optional>
Object with the following properties:
Properties
Name Type Attributes Default Description
uri Property <optional>
A string Property specifying the URI of the glTF asset.
show Property <optional>
true A boolean Property specifying the visibility of the model.
scale Property <optional>
1.0 A numeric Property specifying a uniform linear scale.
minimumPixelSize Property <optional>
0.0 A numeric Property specifying the approximate minimum pixel size of the model regardless of zoom.
maximumScale Property <optional>
The maximum scale size of a model. An upper limit for minimumPixelSize.
incrementallyLoadTextures Property <optional>
true Determine if textures may continue to stream in after the model is loaded.
runAnimations Property <optional>
true A boolean Property specifying if glTF animations specified in the model should be started.
nodeTransformations Property <optional>
An object, where keys are names of nodes, and values are TranslationRotationScale Properties describing the transformation to apply to that node.
shadows Property <optional>
ShadowMode.ENABLED An enum Property specifying whether the model casts or receives shadows from each light source.
heightReference Property <optional>
HeightReference.NONE A Property specifying what the height is relative to.
distanceDisplayCondition Property <optional>
A Property specifying at what distance from the camera that this model will be displayed.
Source:
See:

Members

(readonly) definitionChanged :Event

Gets the event that is raised whenever a property or sub-property is changed or modified.
Type:
Source:

distanceDisplayCondition :Property

Gets or sets the DistanceDisplayCondition Property specifying at what distance from the camera that this model will be displayed.
Type:
Source:

heightReference :Property

Gets or sets the Property specifying the HeightReference.
Type:
Default Value:
  • HeightReference.NONE
Source:

incrementallyLoadTextures :Property

Get or sets the boolean Property specifying whether textures may continue to stream in after the model is loaded.
Type:
Source:

maximumScale :Property

Gets or sets the numeric Property specifying the maximum scale size of a model. This property is used as an upper limit for ModelGraphics#minimumPixelSize.
Type:
Source:

minimumPixelSize :Property

Gets or sets the numeric Property specifying the approximate minimum pixel size of the model regardless of zoom. This can be used to ensure that a model is visible even when the viewer zooms out. When 0.0, no minimum size is enforced.
Type:
Default Value:
  • 0.0
Source:

nodeTransformations :PropertyBag

Gets or sets the set of node transformations to apply to this model. This is represented as an PropertyBag, where keys are names of nodes, and values are TranslationRotationScale Properties describing the transformation to apply to that node.
Type:
Source:

runAnimations :Property

Gets or sets the boolean Property specifying if glTF animations should be run.
Type:
Default Value:
  • true
Source:

scale :Property

Gets or sets the numeric Property specifying a uniform linear scale for this model. Values greater than 1.0 increase the size of the model while values less than 1.0 decrease it.
Type:
Default Value:
  • 1.0
Source:

shadows :Property

Get or sets the enum Property specifying whether the model casts or receives shadows from each light source.
Type:
Default Value:
  • ShadowMode.ENABLED
Source:

show :Property

Gets or sets the boolean Property specifying the visibility of the model.
Type:
Default Value:
  • true
Source:

uri :Property

Gets or sets the string Property specifying the URI of the glTF asset.
Type:
Source:

Methods

clone(resultopt) → {ModelGraphics}

Duplicates this instance.
Parameters:
Name Type Attributes Description
result ModelGraphics <optional>
The object onto which to store the result.
Source:
Returns:
The modified result parameter or a new instance if one was not provided.
Type
ModelGraphics

merge(source)

Assigns each unassigned property on this object to the value of the same property on the provided source object.
Parameters:
Name Type Description
source ModelGraphics The object to be merged into this object.
Source: