/
StencilOperation.js
73 lines (65 loc) · 1.45 KB
/
StencilOperation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import WebGLConstants from "../Core/WebGLConstants.js";
/**
* Determines the action taken based on the result of the stencil test.
*
* @enum {number}
*/
const StencilOperation = {
/**
* Sets the stencil buffer value to zero.
*
* @type {number}
* @constant
*/
ZERO: WebGLConstants.ZERO,
/**
* Does not change the stencil buffer.
*
* @type {number}
* @constant
*/
KEEP: WebGLConstants.KEEP,
/**
* Replaces the stencil buffer value with the reference value.
*
* @type {number}
* @constant
*/
REPLACE: WebGLConstants.REPLACE,
/**
* Increments the stencil buffer value, clamping to unsigned byte.
*
* @type {number}
* @constant
*/
INCREMENT: WebGLConstants.INCR,
/**
* Decrements the stencil buffer value, clamping to zero.
*
* @type {number}
* @constant
*/
DECREMENT: WebGLConstants.DECR,
/**
* Bitwise inverts the existing stencil buffer value.
*
* @type {number}
* @constant
*/
INVERT: WebGLConstants.INVERT,
/**
* Increments the stencil buffer value, wrapping to zero when exceeding the unsigned byte range.
*
* @type {number}
* @constant
*/
INCREMENT_WRAP: WebGLConstants.INCR_WRAP,
/**
* Decrements the stencil buffer value, wrapping to the maximum unsigned byte instead of going below zero.
*
* @type {number}
* @constant
*/
DECREMENT_WRAP: WebGLConstants.DECR_WRAP,
};
export default Object.freeze(StencilOperation);