-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable face culling for fill-extrusion layers. (#7178)
- Loading branch information
1 parent
02d6fa9
commit e682aa6
Showing
25 changed files
with
191 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// @flow | ||
|
||
import type {CullFaceModeType, FrontFaceType} from './types'; | ||
|
||
const BACK = 0x0405; | ||
const CCW = 0x0901; | ||
|
||
class CullFaceMode { | ||
enable: boolean; | ||
mode: CullFaceModeType; | ||
frontFace: FrontFaceType; | ||
|
||
constructor(enable: boolean, mode: CullFaceModeType, frontFace: FrontFaceType) { | ||
this.enable = enable; | ||
this.mode = mode; | ||
this.frontFace = frontFace; | ||
} | ||
|
||
static disabled: $ReadOnly<CullFaceMode>; | ||
static backCCW: $ReadOnly<CullFaceMode>; | ||
} | ||
|
||
CullFaceMode.disabled = new CullFaceMode(false, BACK, CCW); | ||
CullFaceMode.backCCW = new CullFaceMode(true, BACK, CCW); | ||
|
||
export default CullFaceMode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.