提交 55e8d364 编写于 作者: A alteredq

Added frontface direction constants.

These replace frontFaceDirection parameter strings in renderer.setFaceCulling( cullFace, frontFaceDirection ):

"cw"  => THREE.FrontFaceDirectionCW
"ccw" => THREE.FrontFaceDirectionCCW

See related cullFace constants changes in #2683
上级 ea4b8a60
......@@ -88,6 +88,9 @@ THREE.CullFaceBack = 1;
THREE.CullFaceFront = 2;
THREE.CullFaceFrontBack = 3;
THREE.FrontFaceDirectionCW = 0;
THREE.FrontFaceDirectionCCW = 1;
// MATERIAL CONSTANTS
// side
......@@ -21558,7 +21561,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// GL state setting
this.setFaceCulling = function ( cullFace, frontFace ) {
this.setFaceCulling = function ( cullFace, frontFaceDirection ) {
if ( cullFace === THREE.CullFaceNone ) {
......@@ -21566,13 +21569,13 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
if ( !frontFace || frontFace === "ccw" ) {
if ( frontFaceDirection === THREE.FrontFaceDirectionCW ) {
_gl.frontFace( _gl.CCW );
_gl.frontFace( _gl.CW );
} else {
_gl.frontFace( _gl.CW );
_gl.frontFace( _gl.CCW );
}
......
此差异已折叠。
......@@ -88,6 +88,9 @@ THREE.CullFaceBack = 1;
THREE.CullFaceFront = 2;
THREE.CullFaceFrontBack = 3;
THREE.FrontFaceDirectionCW = 0;
THREE.FrontFaceDirectionCCW = 1;
// MATERIAL CONSTANTS
// side
......
......@@ -5938,7 +5938,7 @@ THREE.WebGLRenderer = function ( parameters ) {
// GL state setting
this.setFaceCulling = function ( cullFace, frontFace ) {
this.setFaceCulling = function ( cullFace, frontFaceDirection ) {
if ( cullFace === THREE.CullFaceNone ) {
......@@ -5946,13 +5946,13 @@ THREE.WebGLRenderer = function ( parameters ) {
} else {
if ( !frontFace || frontFace === "ccw" ) {
if ( frontFaceDirection === THREE.FrontFaceDirectionCW ) {
_gl.frontFace( _gl.CCW );
_gl.frontFace( _gl.CW );
} else {
_gl.frontFace( _gl.CW );
_gl.frontFace( _gl.CCW );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册