new Cesium.EllipsoidSurfaceAppearance(options)

椭圆表面的几何外观, 如 PolygonGeometryRectangleGeometry ,支持所有材料如 MaterialAppearance with MaterialAppearance.MaterialSupport.ALL. However, this appearance requires 由于碎片遮蔽器可在程序上计算出 NT 0 正态 NT 1 ,顶点属性较少, tangent, and bitangent.
Name Type Description
options object optional 下列属性的对象 :
Name Type Default Description
flat boolean false optional When true, flat shading is used in the fragment shader, which means lighting is not taking into account.
faceForward boolean options.aboveGround optional When true, the fragment shader flips the surface normal as needed to ensure that the normal faces the viewer to avoid dark spots. This is useful when both sides of a geometry should be shaded like WallGeometry.
translucent boolean true optional When true, the geometry is expected to appear translucent so EllipsoidSurfaceAppearance#renderState has alpha blending enabled.
aboveGround boolean false optional When true, the geometry is expected to be on the ellipsoid's surface - not at a constant height above it - so EllipsoidSurfaceAppearance#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 可选的渲染状态来推翻默认渲染状态 .
Example:
const primitive = new Cesium.Primitive({
  geometryInstances : new Cesium.GeometryInstance({
    geometry : new Cesium.PolygonGeometry({
      vertexFormat : Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT,
      // ...
    })
  }),
  appearance : new Cesium.EllipsoidSurfaceAppearance({
    material : Cesium.Material.fromType('Stripe')
  })
});
See:

Members

static constant Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT : VertexFormat

The VertexFormat that all EllipsoidSurfaceAppearance instances 兼容,只需 位置 st 属性。 其他属性在碎片遮蔽器中按程序计算.

readonly aboveGround : boolean

当 NT 0 true NT 1 时,几何学有望在椭圆形上 surface - not at a constant height above it - so EllipsoidSurfaceAppearance#renderState 已启用后脸 culling .
Default Value: false

readonly closed : boolean

当 NT 0 真 NT 1 时,几何会关闭如此 EllipsoidSurfaceAppearance#renderState has backface culling enabled. 若观者入于几何不显.
Default Value: false

readonly faceForward : boolean

当 NT 0 true NT 1 时,碎片遮蔽器翻转表面正常 以确保正常人面对观众以避免 暗处 当一个几何学的两侧都应该是 shaded like WallGeometry.
Default Value: true

readonly flat : boolean

当 NT 0 真 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 EllipsoidSurfaceAppearance#material, EllipsoidSurfaceAppearance#flat, and EllipsoidSurfaceAppearance#faceForward. 使用 EllipsoidSurfaceAppearance#getFragmentShaderSource 获得完整来源.

material : Material

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

readonly renderState : object

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

The render state can be explicitly defined when constructing a EllipsoidSurfaceAppearance instance, or it is set implicitly via EllipsoidSurfaceAppearance#translucentEllipsoidSurfaceAppearance#aboveGround .

translucent : boolean

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

readonly vertexFormat : VertexFormat

The VertexFormat that this appearance instance is compatible with. 几何可以有更多的顶点属性,并且仍然是兼容的 - 在 潜在性能成本 但它不能少.
Default Value: EllipsoidSurfaceAppearance.VERTEX_FORMAT

readonly vertexShaderSource : string

顶点遮蔽器的 GLSL 源代码.

Methods

getFragmentShaderSource()string

Returns:
The full GLSL fragment shader source.

getRenderState()object

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

isTranslucent()boolean

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