PolylineGeometry
的外观,支持使用材质进行着色。
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
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
如果为
true
,则几何体应被关闭,因此
PolylineMaterialAppearance#renderState
启用了背面剔除。
对于 PolylineMaterialAppearance
,此参数始终为 false
。
-
Default Value:
false
片段着色器的 GLSL 源代码。
用于确定片段颜色的材料。 与其他
不同ialAppearance
属性,这不是只读的,因此外观的材质可以动态更改。
-
Default Value:
Material.ColorType
See:
渲染几何体时使用的 WebGL 固定函数状态。
在构造 PolylineMaterialAppearance
时,可以显式定义渲染状态
实例,或者通过 PolylineMaterialAppearance#translucent
隐式设置
和 PolylineMaterialAppearance#closed
的 Package。
如果为
true
,则几何体应显示为半透明,因此
PolylineMaterialAppearance#renderState
已启用 Alpha 混合。
-
Default Value:
true
readonly vertexFormat : VertexFormat
与此外观实例兼容的
VertexFormat
。
几何体可以具有更多顶点属性,并且仍然兼容 - 在
潜在的性能成本 - 但不能更少。
-
Default Value:
PolylineMaterialAppearance.VERTEX_FORMAT
顶点着色器的 GLSL 源代码。
Methods
以程序方式创建完整的 GLSL 片段着色器源。 对于
PolylineMaterialAppearance
,
此数据源自 PolylineMaterialAppearance#fragmentShaderSource
和 PolylineMaterialAppearance#material
。
Returns:
完整的 GLSL 片段着色器源。
创建渲染状态。 这不是最终的渲染状态实例;相反
它可以包含与渲染状态相同的渲染状态属性的子集
在上下文中创建。
Returns:
render 状态。
根据
PolylineMaterialAppearance#translucent
和 Material#isTranslucent
确定几何体是否为半透明。
Returns:
true
,如果外观是半透明的。