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:
|
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
uriProperty
Get or set the string property to specify the URI address of the gltf resource.
Methods
-
clone(result){ModelGraphics}
-
Copy instance
Name Type Description resultModelGraphics 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 sourceModelGraphics An object that provides attribute values.