通过将顶点属性显示为一种颜色以供调试时使用,从而将其可视化。
已知单位长度向量的分量,即, normal
,tan
, bitangent
,范围从[-1.0,1.0]到(-1.0,1.0)。
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
具有下列属性的对象:
|
Throws:
-
DeveloperError : options.glslDatatype 必须是float, vec2, vec3, 或 vec4。
Example:
var primitive = new Cesium.Primitive({
geometryInstances : // ...
appearance : new Cesium.DebugAppearance({
attributeName : 'normal'
})
});
Members
要显示的属性的名称。
当
true
时,几何图形将启用背面剔除。
-
Default Value:
false
片段着色器的GLSL源代码。
完整的片段着色器源程序是根据
DebugAppearance#material
构建的,使用DebugAppearance#getFragmentShaderSource
获取完整的源代码。
要显示的属性的GLSL数据类型。
material : Material
此属性是
Appearance
接口的一部分,但DebugAppearance
不使用此属性,因为使用的是完全自定义的片段着色器。
-
Default Value:
undefined
在渲染几何图形时使用的WebGL渲染状态。
当
true
时,几何图形应该是半透明的。
-
Default Value:
false
顶点着色器的GLSL源代码。
Methods
返回完整的GLSL片段着色器,对于
DebugAppearance
来说就是DebugAppearance#fragmentShaderSource
。
Returns:
完整的GLSL片段着色器。
创建渲染状态。
Returns:
渲染状态。
基于
DebugAppearance#translucent
确定几何图形是否是半透明的。
Returns:
如果外观是半透明的返回
true
。