new Cesium.Appearance(options)

外观定义了完整的顶点和片段阴影以及 render state used to draw a Primitive. All appearances implement 此基础为 Appearance 接口.
Name Type Description
options object optional 下列属性的对象 :
Name Type Default Description
translucent boolean true optional When true, the geometry is expected to appear translucent so Appearance#renderState has alpha blending enabled.
closed boolean false optional When true, the geometry is expected to be closed so Appearance#renderState has backface culling enabled.
material Material Material.ColorType optional The material used to determine the fragment color.
vertexShaderSource string optional 可选 NT 0 顶点阴影源,以覆盖默认顶点阴影源.
fragmentShaderSource string optional 可选的 NT 0 碎片遮蔽源以覆盖默认的碎片遮蔽源 .
renderState object optional 可选的渲染状态来推翻默认渲染状态 .
Demo:
See:

Members

readonly closed : boolean

当 NT 0 real NT 1 时,几何学有望关闭.
Default Value: false

readonly fragmentShaderSource : string

The GLSL source code for the fragment shader. The full fragment shader source is built procedurally taking into account the Appearance#material. 使用 Appearance#getFragmentShaderSource 获得完整来源.

material : Material

The material used to determine the fragment color. Unlike other Appearance 属性,这不是只读的,所以一个外观的材料可以在苍蝇上改变.
See:

readonly renderState : object

The WebGL fixed-function state to use when rendering the geometry.

translucent : boolean

ret 时,几何形似半透明.
Default Value: true

readonly vertexShaderSource : string

顶点遮蔽器的 GLSL 源代码.

Methods

getFragmentShaderSource()string

在程序上为这一外观创建完整的 NT 0 碎片遮蔽源 taking into account Appearance#fragmentShaderSource and Appearance#material.
Returns:
The full GLSL fragment shader source.

getRenderState()object

创建渲染状态。 这不是最终的州法院;相反, 它可以包含一个子集,与渲染状态相同的渲染状态属性 在上下文中创建.
Returns:
铸造状态.

isTranslucent()boolean

Determines if the geometry is translucent based on Appearance#translucent and Material#isTranslucent.
Returns:
如果外观为半透明,则使用# .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.