An appearance for arbitrary geometry (as opposed to
EllipsoidSurfaceAppearance, for example)
用材料支持阴影.
| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
下列属性的对象 :
|
Example:
const primitive = new Cesium.Primitive({
geometryInstances : new Cesium.GeometryInstance({
geometry : new Cesium.WallGeometry({
materialSupport : Cesium.MaterialAppearance.MaterialSupport.BASIC.vertexFormat,
// ...
})
}),
appearance : new Cesium.MaterialAppearance({
material : Cesium.Material.fromType('Color'),
faceForward : true
})
});
Demo:
See:
Namespaces
Members
当 NT 0 真 NT 1 时,几何会关闭如此
MaterialAppearance#renderState has backface culling enabled.
若观者入于几何不显.
-
Default Value:
false
当 NT 0 true NT 1 时,碎片遮蔽器翻转表面正常
以确保正常人面对观众以避免
暗处 当一个几何学的两侧都应该是
shaded like
WallGeometry.
-
Default Value:
true
当 NT 0 真 NT 1 时,在碎片遮蔽器中使用平面阴影,
这意味着照明没有被考虑进去.
-
Default Value:
false
The GLSL source code for the fragment shader. The full fragment shader
source is built procedurally taking into account
MaterialAppearance#material,
MaterialAppearance#flat, and MaterialAppearance#faceForward.
使用 MaterialAppearance#getFragmentShaderSource 获得完整来源.
material : Material
The material used to determine the fragment color. Unlike other
MaterialAppearance
属性,这不是只读的,所以一个外观的材料可以在苍蝇上改变.
-
Default Value:
Material.ColorType
See:
readonly materialSupport : MaterialAppearance.MaterialSupportType
这一实例所支持的材料类型。 这影响了所需的
VertexFormat and the complexity of the vertex and fragment shaders.
-
Default Value:
MaterialAppearance.MaterialSupport.TEXTURED
The WebGL fixed-function state to use when rendering the geometry.
The render state can be explicitly defined when constructing a MaterialAppearance
instance, or it is set implicitly via MaterialAppearance#translucent
和 MaterialAppearance#closed .
当
ret 时,几何形似半透明.
-
Default Value:
true
readonly vertexFormat : VertexFormat
The
VertexFormat that this appearance instance is compatible with.
几何可以有更多的顶点属性,并且仍然是兼容的 - 在
潜在性能成本 但它不能少.
-
Default Value:
MaterialAppearance.MaterialSupport.TEXTURED.vertexFormat
顶点遮蔽器的 GLSL 源代码.
Methods
在程序上创建完整的 NT 0 碎片遮蔽源. 为
MaterialAppearance ,
this is derived from MaterialAppearance#fragmentShaderSource, MaterialAppearance#material,
MaterialAppearance#flat, and MaterialAppearance#faceForward.
Returns:
The full GLSL fragment shader source.
创建渲染状态。 这不是最终的州法院;相反,
它可以包含一个子集,与渲染状态相同的渲染状态属性
在上下文中创建.
Returns:
铸造状态.
Determines if the geometry is translucent based on
MaterialAppearance#translucent and Material#isTranslucent.
Returns:
如果外观为半透明,则使用#
真 .
Type Definitions
Properties:
| Name | Type | Description |
|---|---|---|
vertexFormat |
VertexFormat | |
vertexShaderSource |
string | |
fragmentShaderSource |
string |