/
StencilOperation.js
103 lines (93 loc) · 2.54 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*global define*/
define(['../Core/Enumeration'], function(Enumeration) {
"use strict";
/**
* DOC_TBA
*
* @exports StencilOperation
*/
var StencilOperation = {
/**
* DOC_TBA
*
* @type {Enumeration}
* @constant
* @default 0
*/
ZERO : new Enumeration(0, 'ZERO'),
/**
* DOC_TBA
*
* @type {Enumeration}
* @constant
* @default 0x1E00
*/
KEEP : new Enumeration(0x1E00, 'KEEP'),
/**
* DOC_TBA
*
* @type {Enumeration}
* @constant
* @default 0x1E01
*/
REPLACE : new Enumeration(0x1E01, 'REPLACE'),
/**
* DOC_TBA
*
* @type {Enumeration}
* @constant
* @default 0x1E02
*/
INCREMENT : new Enumeration(0x1E02, 'INCREMENT'), // WebGL: INCR
/**
* DOC_TBA
*
* @type {Enumeration}
* @constant
* @default 0x1E03
*/
DECREMENT : new Enumeration(0x1E03, 'DECREMENT'), // WebGL: DECR
/**
* DOC_TBA
*
* @type {Enumeration}
* @constant
* @default 0x150A
*/
INVERT : new Enumeration(0x150A, 'INVERT'),
/**
* DOC_TBA
*
* @type {Enumeration}
* @constant
* @default 0x8507
*/
INCREMENT_WRAP : new Enumeration(0x8507, 'INCREMENT_WRAP'), // WebGL: INCR_WRAP
/**
* DOC_TBA
*
* @type {Enumeration}
* @constant
* @default 0x8508
*/
DECREMENT_WRAP : new Enumeration(0x8508, 'DECREMENT_WRAP'), // WebGL: DECR_WRAP
/**
* DOC_TBA
*
* @param {StencilOperation} stencilOperation
*
* @returns {Boolean}
*/
validate : function(stencilOperation) {
return ((stencilOperation === StencilOperation.ZERO) ||
(stencilOperation === StencilOperation.KEEP) ||
(stencilOperation === StencilOperation.REPLACE) ||
(stencilOperation === StencilOperation.INCREMENT) ||
(stencilOperation === StencilOperation.DECREMENT) ||
(stencilOperation === StencilOperation.INVERT) ||
(stencilOperation === StencilOperation.INCREMENT_WRAP) ||
(stencilOperation === StencilOperation.DECREMENT_WRAP));
}
};
return StencilOperation;
});