Class: DepthMode

X3DOM
Component: Shape

.nodeTypes. DepthMode

The depth mode contains the parameters that are specific for depth control, like the value used for depth buffer comparisons.

HTML Encoding and Default Values

<DepthMode depthFunc='"none"' enableDepthTest='true' metadata='X3DMetadataObject' readOnly='false' zFarRange='-1' zNearRange='-1' ></DepthMode>

Inheritance


Constructor

DepthMode(ctx)

Constructor for DepthMode

Parameters:
Name Type Argument Default Description
ctx Object <optional>
null context object, containing initial settings like namespace

Fields

These are the X3D / X3DOM fields of this node. Values should usually be received / set as strings via DOM functions (i.e., using setAttribute("myFieldName", "myFieldValue") and getAttribute("myFieldName")).
Name Type Default Value Range Inheritance Standard Description
depthFunc SFString "none" [NONE, NEVER, LESS, EQUAL, LEQUAL, GREATER, NOTEQUAL, GEQUAL, ALWAYS] The depth function to use. If "none", it's not changed, the default is "lequal".
enableDepthTest SFBool true Whether the depth test should be enabled or not.
metadata SFNode X3DMetadataObject X3DNode Field to add metadata information
readOnly SFBool false Whether the depth buffer is enabled for writing or not.
zFarRange SFFloat -1 [0, 1] The far value for the depth range. Ignored if less than 0, defaults to -1.
zNearRange SFFloat -1 [0, 1] The near value for the depth range. Ignored if less than 0, defaults to -1.