An appearance for
GeometryInstance instances with color attributes and
PolylineGeometry or GroundPolylineGeometry.
这样可以让数个几何图形实例,每个实例都有不同的颜色
be drawn with the same Primitive.
| Name | Type | Description | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
optional
下列属性的对象 :
|
Example:
// A solid white line segment
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.PolylineColorAppearance.VERTEX_FORMAT
}),
attributes : {
color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 1.0, 1.0, 1.0))
}
}),
appearance : new Cesium.PolylineColorAppearance({
translucent : false
})
});
Members
static constant Cesium.PolylineColorAppearance.VERTEX_FORMAT : VertexFormat
The
VertexFormat that all PolylineColorAppearance instances
兼容。 这只需要 NT 0 位置 NT 1 属性.
当 NT 0 真 NT 1 时,几何会关闭如此
PolylineColorAppearance#renderState has backface culling enabled.
这始终是 NT 0 false NT 1 ,用于 NT 2 Polyline ColorAppearance NT 3 .
-
Default Value:
false
The GLSL source code for the fragment shader.
material : Material
This property is part of the
Appearance interface, but is not
由于使用了完全自定义的片段遮蔽器,故由 PolylineColorAppearance 使用.
-
Default Value:
undefined
The WebGL fixed-function state to use when rendering the geometry.
The render state can be explicitly defined when constructing a PolylineColorAppearance
instance, or it is set implicitly via PolylineColorAppearance#translucent.
当 NT 0 real NT 1 时,几何会显得半透明,所以
PolylineColorAppearance#renderState 已启用α混合.
-
Default Value:
true
readonly vertexFormat : VertexFormat
The
VertexFormat that this appearance instance is compatible with.
几何可以有更多的顶点属性,并且仍然是兼容的 - 在
潜在性能成本 但它不能少.
-
Default Value:
PolylineColorAppearance.VERTEX_FORMAT
顶点遮蔽器的 GLSL 源代码.
Methods
在程序上创建完整的 NT 0 碎片遮蔽源.
Returns:
The full GLSL fragment shader source.
创建渲染状态。 这不是最终的州法院;相反,
它可以包含一个子集,与渲染状态相同的渲染状态属性
在上下文中创建.
Returns:
铸造状态.
确定以
PolylineColorAppearance#translucent 为基础的几何是否半透明.
Returns:
如果外观为半透明,则使用#
真 .