new Cesium.DebugAppearance(options)

通过显示顶点属性作为调试的颜色来视觉.

Components for well-known unit-length vectors, i.e., normal, NT+0 tangent NT+1 ,和 NT+2 bitangent NT+3 ,都是缩放和偏颇的 from [-1.0, 1.0] to (-1.0, 1.0).

Name Type Description
options object 下列属性的对象 :
Name Type Default Description
attributeName string 可视化的属性名称.
perInstanceAttribute boolean false optional Boolean that determines whether this attribute is a per-instance geometry attribute.
glslDatatype string 'vec3' optional The GLSL datatype of the attribute. Supported datatypes are float, vec2, vec3, and vec4.
vertexShaderSource string optional 可选 NT 0 顶点阴影源,以覆盖默认顶点阴影源.
fragmentShaderSource string optional 可选的 NT 0 碎片遮蔽源以覆盖默认的碎片遮蔽源 .
renderState object optional 可选的渲染状态来推翻默认渲染状态 .
Throws:
  • DeveloperError : options.glslDatatype must be float, vec2, vec3, or vec4.
Example:
const primitive = new Cesium.Primitive({
  geometryInstances : // ...
  appearance : new Cesium.DebugAppearance({
    attributeName : 'normal'
  })
});

Members

readonly attributeName : string

属性名称被可视化.

readonly closed : boolean

当 NT 0 real NT 1 时,几何学有望关闭.
Default Value: false

readonly fragmentShaderSource : string

The GLSL source code for the fragment shader. The full fragment shader source is built procedurally taking into account the DebugAppearance#material. 使用 DebugAppearance#getFragmentShaderSource 获得完整来源.

readonly glslDatatype : string

正在可视化属性的 GLSL 数据类型.

material : Material

This property is part of the Appearance interface, but is not 由于使用了完全自定义的片段遮蔽器,故由 DebugAppearance 使用.
Default Value: undefined

readonly renderState : object

The WebGL fixed-function state to use when rendering the geometry.

translucent : boolean

ret 时,几何形似半透明.
Default Value: false

readonly vertexShaderSource : string

顶点遮蔽器的 GLSL 源代码.

Methods

getFragmentShaderSource()string

Returns the full GLSL fragment shader source, which for DebugAppearance is just DebugAppearance#fragmentShaderSource.
Returns:
The full GLSL fragment shader source.

getRenderState()object

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

isTranslucent()boolean

确定以 DebugAppearance#translucent 为基础的几何是否半透明.
Returns:
如果外观为半透明,则使用# .
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.