new Cesium.PolylineMaterialAppearance(options)

用于 PolylineGeometry 的外观,支持用材料遮蔽.
Name Type Description
options object optional 下列属性的对象 :
Name Type Default Description
translucent boolean true optional When true, the geometry is expected to appear translucent so PolylineMaterialAppearance#renderState has alpha blending 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.PolylineGeometry({
      positions : Cesium.Cartesian3.fromDegreesArray([
        0.0, 0.0,
        5.0, 0.0
      ]),
      width : 10.0,
      vertexFormat : Cesium.PolylineMaterialAppearance.VERTEX_FORMAT
    })
  }),
  appearance : new Cesium.PolylineMaterialAppearance({
    material : Cesium.Material.fromType('Color')
  })
});
See:

Members

static constant Cesium.PolylineMaterialAppearance.VERTEX_FORMAT : VertexFormat

The VertexFormat that all PolylineMaterialAppearance instances 兼容。 这需要 NT 0 位置 NT 1 和 NT 2 st NT 3 属性.

readonly closed : boolean

当 NT 0 真 NT 1 时,几何会关闭如此 PolylineMaterialAppearance#renderState has backface culling enabled. 这始终是 NT 0 false NT 1 NT 2 Polyline Matriary Appearance NT 3 .
Default Value: false

readonly fragmentShaderSource : string

The GLSL source code for the fragment shader.

material : Material

The material used to determine the fragment color. Unlike other PolylineMaterialAppearance 属性,这不是只读的,所以一个外观的材料可以在苍蝇上改变.
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 PolylineMaterialAppearance instance, or it is set implicitly via PolylineMaterialAppearance#translucentPolylineMaterialAppearance#closed .

translucent : boolean

当 NT 0 real NT 1 时,几何会显得半透明,所以 PolylineMaterialAppearance#renderState 已启用α混合.
Default Value: true

readonly vertexFormat : VertexFormat

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

readonly vertexShaderSource : string

顶点遮蔽器的 GLSL 源代码.

Methods

getFragmentShaderSource()string

在程序上创建完整的 NT 0 碎片遮蔽源. 为 PolylineMaterialAppearance , this is derived from PolylineMaterialAppearance#fragmentShaderSource and PolylineMaterialAppearance#material.
Returns:
The full GLSL fragment shader source.

getRenderState()object

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

isTranslucent()boolean

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