UNPKG

682 BPlain TextView Raw
1import type {DepthFuncType, DepthMaskType, DepthRangeType} from './types';
2
3const ALWAYS = 0x0207;
4
5class DepthMode {
6 func: DepthFuncType;
7 mask: DepthMaskType;
8 range: DepthRangeType;
9
10 // DepthMask enums
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
23DepthMode.ReadOnly = false;
24DepthMode.ReadWrite = true;
25
26DepthMode.disabled = new DepthMode(ALWAYS, DepthMode.ReadOnly, [0, 1]);
27
28export default DepthMode;