The WebGLRenderingContext.frontFace()
method of the WebGL API specifies whether polygons are front- or back-facing by setting a winding orientation.
SyntaxEdit
void gl.frontFace(mode);
Parameters
- mode
- Sets the winding orientation. The default value is
gl.CCW
. Possible values:gl.CW
: Clock-wise winding.gl.CCW
: Counter-clock-wise winding.
Return value
None.
ExamplesEdit
gl.frontFace(gl.CW);
SpecificationsEdit
Specification | Status | Comment |
---|---|---|
WebGL 1.0 The definition of 'frontFace' in that specification. |
Recommendation | Initial definition. |
OpenGL ES 2.0 The definition of 'glFrontFace' in that specification. |
Standard | Man page of the OpenGL API. |