Appearance
ModelEntity (glTF Model Entity Object)
Create and manage glTF model Entity objects.
Constructor
ts
new ge3d.feature.ModelEntity(options?: {}): ModelEntityParameters (StyleOptions)
| Parameter | Type | Default | Description |
|---|---|---|---|
| url | String | Cesium.Resource | - | String or resource property of glTF model URI |
| scale | Number | 1 | Scale |
| heading | Number | 0 | Heading angle (degrees, 0-360) |
| pitch | Number | 0 | Pitch angle (degrees, 0-360) |
| roll | Number | 0 | Roll angle (degrees, 0-360) |
| minimumPixelSize | number | 0.0 | Specify approximate minimum pixel size of model regardless of scale |
| maximumScale | number | - | Maximum scale size of model. Upper limit of minimumPixelSize |
| fill | Boolean | false | Whether to fill, specify blending with model rendering color |
| color | String | Cesium.Color | "#3388ff" | Color |
| opacity | Number | 1.0 | Opacity, range 0.0-1.0 |
| colorBlendMode | Cesium.ColorBlendMode | ColorBlendMode.HIGHLIGHT | Specify how color blends with model |
| colorBlendAmount | number | 0.5 | When colorBlendMode is MIX, specify numeric property of color intensity. Value of 0.0 means model rendering color, value of 1.0 means pure color, any value in between means blend of both |
| silhouette | Boolean | false | Whether to have silhouette |
| silhouetteColor | String | Cesium.Color | "#ffffff" | Silhouette color |
| silhouetteSize | Number | 2 | Silhouette width |
| silhouetteAlpha | Number | 0.8 | Silhouette opacity |
| distanceDisplayCondition | Boolean | Cesium.DistanceDisplayCondition | false | Whether to display by distance or specify at what distance from camera this will be displayed |
| distanceDisplayCondition_near | Number | 0 | Minimum distance |
| distanceDisplayCondition_far | Number | 100000 | Maximum distance |
| distanceDisplayPoint | PointEntity.StyleOptions | - | Style of pixel point object displayed when view distance exceeds certain distance (defined by distanceDisplayCondition_far), only effective when distanceDisplayCondition is set |
| distanceDisplayBillboard | BillboardEntity.StyleOptions | - | Style of icon object displayed when view distance exceeds certain distance (defined by distanceDisplayCondition_far), only effective when distanceDisplayCondition is set |
| hasShadows | Boolean | true | Whether to cast shadows |
| shadows | Cesium.ShadowMode | ShadowMode.ENABLED | Specify whether model casts or receives shadows from light sources |
| clampToGround | Boolean | false | Whether to clamp to ground |
| heightReference | Cesium.HeightReference | Cesium.HeightReference.NONE | Property specifying what the height is relative to |
| incrementallyLoadTextures | boolean | true | Determine whether textures will continue to stream in after model loads |
| runAnimations | boolean | true | Specify whether glTF animations specified in model should start |
| clampAnimations | boolean | true | Specify whether glTF animations should maintain last pose when no keyframes |
| imageBasedLightingFactor | Cesium.Cartesian2 | new Cartesian2(1.0, 1.0) | Specify contribution from image-based diffuse and specular lighting |
| lightColor | Color | - | Property specifying color of light when shading model. When undefined, scene's light color is used instead |
| nodeTransformations | Cesium.PropertyBag | Object<string, Cesium.TranslationRotationScale> | - | Object where keys are node names and values are TranslationRotationScale properties describing transformations to apply to that node. Transformation is applied after node's existing transformation (as specified in glTF) and does not replace node's existing transformation |
| articulations | Cesium.PropertyBag | Object<string, number> | - | An object, where keys are composed of an articulation name, a single space, and a stage name, and the values are numeric properties |
| clippingPlanes | Cesium.ClippingPlaneCollection | - | Collection of Plane planes used to clip model |
| setHeight | Number | 0 | Specify coordinate height value (commonly used in layer configuration) |
| addHeight | Number | 0 | Height value added to existing coordinates (commonly used in layer configuration) |
| highlight | ModelEntity.StyleOptions | - | Highlight style on hover or click (type:'click'), can also be toggled via openHighlight/closeHighlight methods after creating Graphic |
| label | LabelEntity.StyleOptions | - | Support for additional text display |