Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | optional
具有以下属性的对象:
|
Example:
// A solid white line segment
var 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
-
Default Value:
false
片段着色器的GLSL源代码。
material : Material
此属性是
Appearance
接口的一部分,但不是
6866完全使用了自定义着色器6166。-
Default Value:
undefined
WebGL修复了渲染几何体时要使用的函数状态。
The render state can be explicitly defined when constructing a PolylineColorAppearance
instance, or it is set implicitly via PolylineColorAppearance#translucent
.
当
true
时,几何体看起来是半透明的
PolylineColorAppearance#renderState
启用了alpha混合。-
Default Value:
true
readonly vertexFormat : VertexFormat
此外观实例与
VertexFormat
兼容。
一个几何体可以有更多的顶点属性并且仍然是兼容的
潜在的性能成本-但它不能少。-
Default Value:
PolylineColorAppearance.VERTEX_FORMAT
顶点着色器的GLSL源代码。
Methods
按程序创建完整的GLSL片段着色器源。
Returns:
完整的GLSL片段着色器源。
创建渲染状态。这不是最终渲染状态实例;而是,
它可以包含与渲染状态相同的渲染状态属性子集
在上下文中创建。
Returns:
渲染状态。
基于
PolylineColorAppearance#translucent
确定几何体是否半透明。Returns:
如果外观是半透明的,则为
true
。