1 | import type {DepthFuncType, DepthMaskType, DepthRangeType} from './types';
|
2 |
|
3 | const ALWAYS = 0x0207;
|
4 |
|
5 | class DepthMode {
|
6 | func: DepthFuncType;
|
7 | mask: DepthMaskType;
|
8 | range: DepthRangeType;
|
9 |
|
10 |
|
11 | static ReadOnly: boolean;
|
12 | static ReadWrite: boolean;
|
13 |
|
14 | constructor(depthFunc: DepthFuncType, depthMask: DepthMaskType, depthRange: DepthRangeType) {
|
15 | this.func = depthFunc;
|
16 | this.mask = depthMask;
|
17 | this.range = depthRange;
|
18 | }
|
19 |
|
20 | static disabled: Readonly<DepthMode>;
|
21 | }
|
22 |
|
23 | DepthMode.ReadOnly = false;
|
24 | DepthMode.ReadWrite = true;
|
25 |
|
26 | DepthMode.disabled = new DepthMode(ALWAYS, DepthMode.ReadOnly, [0, 1]);
|
27 |
|
28 | export default DepthMode;
|