# ModelGraphics

#### new Cesium.ModelGraphics(options)
engine/Source/DataSources/ModelGraphics.js 65

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.

Name | Type | Description
--- | --- | ---
`options` | ModelGraphics.ConstructorOptions | optional Object describing initialization options

##### Demo:

- Cesium Sandcastle 3D Models Demo

### Members

#### articulations : PropertyBag
engine/Source/DataSources/ModelGraphics.js 302

Gets or sets the set of articulation values to apply to this model. This is represented as an `PropertyBag`, where keys are composed as the name of the articulation, a single space, and the name of the stage.

#### clampAnimations : Property|undefined
engine/Source/DataSources/ModelGraphics.js 197

Gets or sets the boolean Property specifying if glTF animations should hold the last pose for time durations with no keyframes.

Default Value: `true`

#### clippingPlanes : Property|undefined
engine/Source/DataSources/ModelGraphics.js 313

A property specifying the `ClippingPlaneCollection` used to selectively disable rendering the model.

#### color : Property|undefined
engine/Source/DataSources/ModelGraphics.js 238

Gets or sets the Property specifying the `Color` that blends with the model's rendered color.

Default Value: `Color.WHITE`

#### colorBlendAmount : Property|undefined
engine/Source/DataSources/ModelGraphics.js 256

A numeric Property specifying the color strength when the `colorBlendMode` is MIX. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.

Default Value: `0.5`

#### colorBlendMode : Property|undefined
engine/Source/DataSources/ModelGraphics.js 246

Gets or sets the enum Property specifying how the color blends with the model.

Default Value: `ColorBlendMode.HIGHLIGHT`

#### customShader : Property|undefined
engine/Source/DataSources/ModelGraphics.js 320

Gets or sets the `CustomShader` to apply to this model. When `undefined`, no custom shader code is used.

#### readonly definitionChanged : Event
engine/Source/DataSources/ModelGraphics.js 122

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

#### distanceDisplayCondition : Property|undefined
engine/Source/DataSources/ModelGraphics.js 279

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

#### heightReference : Property|undefined
engine/Source/DataSources/ModelGraphics.js 214

Gets or sets the Property specifying the `HeightReference`.

Default Value: `HeightReference.NONE`

#### imageBasedLightingFactor : Property|undefined
engine/Source/DataSources/ModelGraphics.js 263

A property specifying the `Cartesian2` used to scale the diffuse and specular image-based lighting contribution to the final color.

#### incrementallyLoadTextures : Property|undefined
engine/Source/DataSources/ModelGraphics.js 179

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

#### lightColor : Property|undefined
engine/Source/DataSources/ModelGraphics.js 272

A property specifying the `Cartesian3` light color when shading the model. When `undefined` the scene's light color is used instead.

#### maximumScale : Property|undefined
engine/Source/DataSources/ModelGraphics.js 171

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`.

#### minimumPixelSize : Property|undefined
engine/Source/DataSources/ModelGraphics.js 162

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.

Default Value: `0.0`

#### nodeTransformations : PropertyBag
engine/Source/DataSources/ModelGraphics.js 290

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. The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation.

#### runAnimations : Property|undefined
engine/Source/DataSources/ModelGraphics.js 189

Gets or sets the boolean Property specifying if glTF animations should be run.

Default Value: `true`

#### scale : Property|undefined
engine/Source/DataSources/ModelGraphics.js 151

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.

Default Value: `1.0`

#### shadows : Property|undefined
engine/Source/DataSources/ModelGraphics.js 206

Get or sets the enum Property specifying whether the model casts or receives shadows from light sources.

Default Value: `ShadowMode.ENABLED`

#### show : Property|undefined
engine/Source/DataSources/ModelGraphics.js 134

Gets or sets the boolean Property specifying the visibility of the model.

Default Value: `true`

#### silhouetteColor : Property|undefined
engine/Source/DataSources/ModelGraphics.js 222

Gets or sets the Property specifying the `Color` of the silhouette.

Default Value: `Color.RED`

#### silhouetteSize : Property|undefined
engine/Source/DataSources/ModelGraphics.js 230

Gets or sets the numeric Property specifying the size of the silhouette in pixels.

Default Value: `0.0`

#### uri : Property|undefined
engine/Source/DataSources/ModelGraphics.js 141

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

### Methods

#### clone(result) → ModelGraphics
engine/Source/DataSources/ModelGraphics.js 329

Duplicates this instance.

Name | Type | Description
--- | --- | ---
`result` | ModelGraphics | optional The object onto which to store the result.

##### Returns:

The modified result parameter or a new instance if one was not provided.

#### merge(source)
engine/Source/DataSources/ModelGraphics.js 363

Assigns each unassigned property on this object to the value of the same property on the provided source object.

Name | Type | Description
--- | --- | ---
`source` | ModelGraphics | The object to be merged into this object.

### Type Definitions

#### Cesium.ModelGraphics.ConstructorOptions
engine/Source/DataSources/ModelGraphics.js 21

Initialization options for the ModelGraphics constructor

##### Properties:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`show` | Property | boolean | <optional> | true | A boolean Property specifying the visibility of the model.
`uri` | Property | string | Resource | <optional> |  | A string or Resource Property specifying the URI of the glTF asset.
`scale` | Property | number | <optional> | 1.0 | A numeric Property specifying a uniform linear scale.
`minimumPixelSize` | Property | number | <optional> | 0.0 | A numeric Property specifying the approximate minimum pixel size of the model regardless of zoom.
`maximumScale` | Property | number | <optional> |  | The maximum scale size of a model. An upper limit for minimumPixelSize.
`incrementallyLoadTextures` | Property | boolean | <optional> | true | Determine if textures may continue to stream in after the model is loaded.
`runAnimations` | Property | boolean | <optional> | true | A boolean Property specifying if glTF animations specified in the model should be started.
`clampAnimations` | Property | boolean | <optional> | true | A boolean Property specifying if glTF animations should hold the last pose for time durations with no keyframes.
`shadows` | Property | ShadowMode | <optional> | ShadowMode.ENABLED | An enum Property specifying whether the model casts or receives shadows from light sources.
`heightReference` | Property | HeightReference | <optional> | HeightReference.NONE | A Property specifying what the height is relative to.
`silhouetteColor` | Property | Color | <optional> | Color.RED | A Property specifying the `Color` of the silhouette.
`silhouetteSize` | Property | number | <optional> | 0.0 | A numeric Property specifying the size of the silhouette in pixels.
`color` | Property | Color | <optional> | Color.WHITE | A Property specifying the `Color` that blends with the model's rendered color.
`colorBlendMode` | Property | ColorBlendMode | <optional> | ColorBlendMode.HIGHLIGHT | An enum Property specifying how the color blends with the model.
`colorBlendAmount` | Property | number | <optional> | 0.5 | A numeric Property specifying the color strength when the `colorBlendMode` is `MIX`. A value of 0.0 results in the model's rendered color while a value of 1.0 results in a solid color, with any value in-between resulting in a mix of the two.
`imageBasedLightingFactor` | Property | Cartesian2 | <optional> | new Cartesian2(1.0, 1.0) | A property specifying the contribution from diffuse and specular image-based lighting.
`lightColor` | Property | Color | <optional> |  | A property specifying the light color when shading the model. When `undefined` the scene's light color is used instead.
`distanceDisplayCondition` | Property | DistanceDisplayCondition | <optional> |  | A Property specifying at what distance from the camera that this model will be displayed.
`nodeTransformations` | PropertyBag | Object.<string, TranslationRotationScale> | <optional> |  | An object, where keys are names of nodes, and values are `TranslationRotationScale` Properties describing the transformation to apply to that node. The transformation is applied after the node's existing transformation as specified in the glTF, and does not replace the node's existing transformation.
`articulations` | PropertyBag | Object.<string, number> | <optional> |  | An object, where keys are composed of an articulation name, a single space, and a stage name, and the values are numeric properties.
`clippingPlanes` | Property | ClippingPlaneCollection | <optional> |  | A property specifying the `ClippingPlaneCollection` used to selectively disable rendering the model.
`customShader` | Property | CustomShader | <optional> |  | A property specifying the `CustomShader` to apply to this model.

Need help? The fastest way to get answers is from the community and team on the Cesium Forum.