/
StencilOperation.js
81 lines (72 loc) · 1.92 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
74
75
76
77
78
79
80
81
define([
'../Core/freezeObject',
'../Core/WebGLConstants'
], function(
freezeObject,
WebGLConstants) {
'use strict';
/**
* Determines the action taken based on the result of the stencil test.
*
* @exports StencilOperation
*/
var 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
};
return freezeObject(StencilOperation);
});