Class: ModelGraphics

ModelGraphics

new ModelGraphics(options)

Used for loading and managing 3D models based on glTF, it is a runtime asset format for WebGL, OpenGL ES, and OpenGL. The position and orientation of the model are determined by the included entities.

Support geometry, materials, animation, and skinning for glTF. Currently, cameras and lighting are not supported.

Name Type Description
options Object optional

Object is an object that contains the following properties:

Name Type Default Description
uri Property optional

The string or Resource attribute is used to specify the URI address of the gltf resource.

show Property true optional

Boolean attribute, specifying the visibility of the model.

scale Property 1.0 optional

The number attribute specifies the scaling ratio of the model.

minimumPixelSize Property 0.0 optional

The number attribute specifies the approximate minimum pixel size of the model, regardless of scaling.

maximumScale Property optional

The number attribute specifies the maximum scale size of the model. The upper limit of minimumPixelSize.

incrementallyLoadTextures Property true optional

Boolean attribute, determines whether the texture can continue to flow after the model is loaded.

runAnimations Property true optional

Boolean attribute, used to specify whether animations in gltf resources should be played.

clampAnimations Property true optional

Boolean attribute, used to specify whether the gltf animation maintains the last pose during the duration without keyframes.

nodeTransformations PropertyBag optional

Object, where the key is the name of the node and the value is the TranslationRotationScale property, describing the transformation applied to that node.

shadows Property ShadowMode.ENABLED optional

Enumeration properties used to specify whether the model casts shadows from each light source or receives shadows.

heightReference Property HeightReference.NONE optional

The HeightReference property is used to specify the reference point for the height of the model.

distanceDisplayCondition Property optional

The DistanceDisplayCondition property specifies how far the model should be displayed from the camera.

silhouetteColor Property Color.RED optional

The Color property specifies the color of the contour.

silhouetteSize Property 0.0 optional

The number attribute specifies the pixel size of the model outline.

color Property Color.WHITE optional

The Color property is used to blend with the rendered color of the model.

colorBlendMode Property ColorBlendMode.HIGHLIGHT optional

The ColorBlendMode property is used to specify the blending mode used when blending ModelGraphics # color with the rendered color of the model.

colorBlendAmount Property 0.5 optional

The number attribute specifies the blending factor for ModelGraphics # color when colorBlendMode is MIX.

clippingPlanes Property optional

The ClippingPlaneCollection property is used to selectively not render a portion of the model.

imageBasedLightingFactor Property new Cartesian2(1.0, 1.0) optional

Cartesian2 attribute specifies the contribution of image illumination based on diffuse and specular reflection.

lightColor Property optional

Cartesian3 attribute, which specifies the color of the light source when rendering the model. When this value is not specified, the default light source color will be used.

Members

clampAnimationsProperty

Gets or sets the boolean property to specify whether the gltf animation maintains its last pose during the duration without keyframes.

Default Value:
true

clippingPlanesProperty

Get or specify the ClippingPlaneCollection property for selectively not rendering a portion of the model.

colorProperty

Get or set the Color property to blend with the rendered color of the model.

Default Value:
Color.WHITE

colorBlendAmountProperty

Gets or sets the number property, which specifies the blending factor of ModelGraphics # color when colorBlendMode is MIX. When the value is 0.0, the final color of the model is the rendering color. When the value is 1.0, the final color of the model is ModelGraphics # color. When the value is between 0.0 and 1.0, the final color of the model is a mixture of the two.

Default Value:
0.5

colorBlendModeProperty

Get or set the ColorBlendMode property to specify the blending mode used when blending ModelGraphics # color with the rendered color of the model.

Default Value:
ColorBlendMode.HIGHLIGHT

readonly definitionChangedEvent

Get events. This event is thrown when the value of a property or sub property is modified, or when the definition is modified.

distanceDisplayConditionProperty

Get or set the DistanceDisplayCondition property to specify how far the model should be displayed from the camera.

heightReferenceProperty

Get or set the HeightReference property.

Default Value:
HeightReference.NONE

imageBasedLightingFactorProperty

Get or set the Cartesian2 property to specify the contribution of image illumination based on diffuse and specular reflection.

incrementallyLoadTexturesProperty

Gets or sets the boolean property to specify whether the texture can be incrementally loaded after the model is loaded.

lightColorProperty

Gets or specifies the Cartesian3 property, which specifies the color of the lighting source when rendering the model.

maximumScaleProperty

Get or set the number property to specify the maximum scale size of the model. The upper limit of minimumPixelSize. ModelGraphics#minimumPixelSize.

minimumPixelSizeProperty

Get or set the number attribute to specify the approximate minimum pixel size of the model, regardless of scaling.

Default Value:
0.0

nodeTransformationsPropertyBag

Get or set the set of node transformations to be applied to this model. It is represented as a Property Bag, where key is the name of the node and the value is the TranslationRotationScale property, describing the transformation applied to that node.

runAnimationsProperty

Gets or sets the boolean property to specify whether animations in the gltf resource should be played.

Default Value:
true

scaleProperty

Gets or sets the boolean property, specifying the uniform linear scaling ratio of the model. A scaling ratio greater than 1 will increase the size of the model, while a scaling ratio less than 1 will decrease the size of the model.

Default Value:
1.0

shadowsProperty

Get or set enumeration properties to specify whether the model casts or receives shadows from each light source.

Default Value:
ShadowMode.ENABLED

showProperty

Get or set boolean properties to specify the visibility of the model.

Default Value:
true

silhouetteColorProperty

Get or set the Color property, which specifies the color of the contour.

Default Value:
Color.RED

silhouetteSizeProperty

Get or set the number property, which specifies the pixel size of the model outline.

Default Value:
0.0

Get or set the string property to specify the URI address of the gltf resource.

Methods

clone(result){ModelGraphics}

Copy instance

Name Type Description
result ModelGraphics optional

The object that stores the copied results

Returns:
Type Description
ModelGraphics If input parameters are provided, return the modified input parameter object. If no input parameters are provided, return a new instance.

merge(source)

Assign the attribute values corresponding to the source object to all unspecified attributes of this instance.

Name Type Description
source ModelGraphics

An object that provides attribute values.