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 包括支持glTF几何,材料,动画,以及剥皮. 目前不支持相机和灯光.
| Name | Type | Description |
|---|---|---|
options |
ModelGraphics.ConstructorOptions | optional 描述初始化选项的对象 |
Members
articulations : PropertyBag
Gets or sets the set of articulation values to apply to this model. This is represented as an
PropertyBag, where keys are
编织为标音的名称,单空,和舞台的名称.
clampAnimations : Property|undefined
获取或设置布尔属性, 指定 glTF 动画是否在没有键框的时间内保持最后一个位置 .
-
Default Value:
true
clippingPlanes : Property|undefined
A property specifying the
ClippingPlaneCollection used to selectively disable rendering the model.
color : Property|undefined
Gets or sets the Property specifying the
Color that blends with the model's rendered color.
-
Default Value:
Color.WHITE
colorBlendAmount : Property|undefined
A numeric Property specifying the color strength when the
colorBlendMode is MIX.
值为0.0的数值导致模型的成色,而值为1.0的数值则导致固体的颜色,与
导致两者混合的值.
-
Default Value:
0.5
colorBlendMode : Property|undefined
获取或设置 enum 属性,指定颜色如何与模型混合 .
-
Default Value:
ColorBlendMode.HIGHLIGHT
customShader : Property|undefined
获取或设置
CustomShader 适用于此模式. 当 NT 0 未定义 NT 1 时,不使用自定义阴影码.
readonly definitionChanged : Event
当财产或次级财产被改变或修改时,获取该事件.
distanceDisplayCondition : Property|undefined
Gets or sets the
DistanceDisplayCondition Property specifying at what distance from the camera that this model will be displayed.
enableVerticalExaggeration : Property|undefined
Gets or sets the boolean Property specifying if the model is exaggerated along the ellipsoid normal when
Scene.verticalExaggeration is set to a value other than 1.0.
-
Default Value:
true
environmentMapOptions : PropertyBag
Gets or sets the
DynamicEnvironmentMapManager.ConstructorOptions to apply to this model. This is represented as an PropertyBag.
heightReference : Property|undefined
Gets or sets the Property specifying the
HeightReference.
-
Default Value:
HeightReference.NONE
imageBasedLightingFactor : Property|undefined
A property specifying the
Cartesian2 used to scale the diffuse and specular image-based lighting contribution to the final color.
incrementallyLoadTextures : Property|undefined
获取或设置布尔属性, 指定是否纹理
可以在模型装入后继续流入.
lightColor : Property|undefined
A property specifying the
Cartesian3 light color when shading the model. When undefined the scene's light color is used instead.
maximumScale : Property|undefined
获取或设置指定最大比例的数值属性
模型的大小。 此属性用作
ModelGraphics#minimumPixelSize.
minimumPixelSize : Property|undefined
获取或设置指定大致最小值的数值属性
模型的像素大小,不论缩放大小. 这可以用来确保
一种模型即使查看器放大也可见。 当 NT 0 0.0 NT 1 时,
没有执行最小尺寸.
-
Default Value:
0.0
nodeTransformations : PropertyBag
Gets or sets the set of node transformations to apply to this model. This is represented as an
PropertyBag, where keys are
节点名称,且值为 TranslationRotationScale 属性描述要应用到该节点的转换 .
该变换在glTF中指定的节点现有变换后应用,不取代节点现有变换.
runAnimations : Property|undefined
获取或设置布尔属性, 指定是否运行 glTF 动画 .
-
Default Value:
true
scale : Property|undefined
获取或设置指定统一线性比例的数值属性
这个模型。 大于1.0的值增加模型的大小,同时
数值小于 1.0 减少.
-
Default Value:
1.0
shadows : Property|undefined
获取或设置 enum 属性, 指定模型是否
投影或接收来自光源的阴影.
-
Default Value:
ShadowMode.ENABLED
show : Property|undefined
获取或设置指定模型可见度的布尔属性 .
-
Default Value:
true
silhouetteColor : Property|undefined
Gets or sets the Property specifying the
Color of the silhouette.
-
Default Value:
Color.RED
silhouetteSize : Property|undefined
获取或设置数字属性,指定以像素表示的圆柱的大小.
-
Default Value:
0.0
uri : Property|undefined
获取或设置字符串属性,指定 glTF 资产的 NT 0 .
Methods
clone(result) → ModelGraphics
重复这个例子.
| Name | Type | Description |
|---|---|---|
result |
ModelGraphics | optional 存储结果的对象 . |
Returns:
未提供修改的结果参数或新实例 .
指定该对象上每个未指定属性的值
- 提供源对象上的同一财产.
| Name | Type | Description |
|---|---|---|
source |
ModelGraphics | 要合并成此天体的对象. |
Type Definitions
模型图形构建器的初始化选项
Properties:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
show |
Property | boolean |
<optional> |
real | 一个布尔属性指定模型的能见度. |
uri |
Property | string | Resource |
<optional> |
A string or Resource Property specifying the URI of the glTF asset. | |
scale |
Property | number |
<optional> |
1.0 | 指定统一线性尺度的数字属性. |
enableVerticalExaggeration |
Property | boolean |
<optional> |
true | A boolean Property specifying if the model is exaggerated along the ellipsoid normal when Scene.verticalExaggeration is set to a value other than 1.0. |
minimumPixelSize |
Property | number |
<optional> |
0.0 | 一个数字属性,指定模型的大约最小像素大小,而不论缩放大小. |
maximumScale |
Property | number |
<optional> |
模型的最大缩放大小 。 最小像素Size的上限 . | |
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 | 一个数字属性,指定像素中硅的大小. |
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 | 一个数字属性,指定当 NT 0 colorBlendMode NT 1 为 NT 2 MI NT 3 时的颜色强度. 0.0的值导致模型的渲染色,1.0的值则导致固体的颜色,任何值在二者之间产生混合. |
imageBasedLightingFactor |
Property | Cartesian2 |
<optional> |
new Cartesian2(1.0, 1.0) | A property specifying the contribution from diffuse and specular image-based lighting. |
environmentMapOptions |
PropertyBag | Object.<string, *> |
<optional> |
该实体上管理动态环境映射的属性 . | |
lightColor |
Property | Color |
<optional> |
阴影模型时指定浅色的属性 。 当 NT 0 未定义 NT 1 取而代之的是场景的浅色. | |
distanceDisplayCondition |
Property | DistanceDisplayCondition |
<optional> |
指定显示此模型的距离的属性 . | |
nodeTransformations |
PropertyBag | Object.<string, TranslationRotationScale> |
<optional> |
对象,其中键为节点名称,值为 TranslationRotationScale 属性描述要应用到该节点的变换. 该变换在glTF中指定的节点现有变换后应用,不取代节点现有变换. |
|
articulations |
PropertyBag | Object.<string, number> |
<optional> |
一个对象,其中键由一个拼写名称,一个空格,和一个艺名组成,值是数字属性. | |
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. |