1 | export declare type ArrayLikeIterable<T> = ArrayLike<T> & Iterable<T>;
|
2 | export declare type NumericArray = number[] | TypedArray;
|
3 | export declare type TypedArray = Float32Array | Float64Array | Int8Array | Int16Array | Int32Array | Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array;
|
4 | export declare type FloatArray = Float32Array | Float64Array;
|
5 | export declare type IntArray = Int8Array | Int16Array | Int32Array;
|
6 | export declare type UIntArray = Uint8Array | Uint8ClampedArray | Uint16Array | Uint32Array;
|
7 | export declare type FloatArrayConstructor = Float32ArrayConstructor | Float64ArrayConstructor;
|
8 | export declare type IntArrayConstructor = Int8ArrayConstructor | Int16ArrayConstructor | Int32ArrayConstructor;
|
9 | export declare type UIntArrayConstructor = Uint8ArrayConstructor | Uint8ClampedArrayConstructor | Uint16ArrayConstructor | Uint32ArrayConstructor;
|
10 | export declare type TypedArrayConstructor = FloatArrayConstructor | IntArrayConstructor | UIntArrayConstructor;
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | export declare type Type = "u8" | "u8c" | "i8" | "u16" | "i16" | "u32" | "i32" | "f32" | "f64";
|
18 | export declare type UintType = "u8" | "u8c" | "u16" | "u32";
|
19 | export declare type IntType = "i8" | "i16" | "i32";
|
20 | export declare type FloatType = "f32" | "f64";
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 | export declare enum GLType {
|
29 | I8 = 5120,
|
30 | U8 = 5121,
|
31 | I16 = 5122,
|
32 | U16 = 5123,
|
33 | I32 = 5124,
|
34 | U32 = 5125,
|
35 | F32 = 5126
|
36 | }
|
37 |
|
38 |
|
39 |
|
40 | export declare const GL2TYPE: Record<GLType, Type>;
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare const TYPE2GL: Record<Type, GLType | undefined>;
|
50 |
|
51 |
|
52 |
|
53 | export declare const SIZEOF: {
|
54 | u8: number;
|
55 | u8c: number;
|
56 | i8: number;
|
57 | u16: number;
|
58 | i16: number;
|
59 | u32: number;
|
60 | i32: number;
|
61 | f32: number;
|
62 | f64: number;
|
63 | };
|
64 | export declare const FLOAT_ARRAY_CTORS: Record<FloatType, FloatArrayConstructor>;
|
65 | export declare const INT_ARRAY_CTORS: Record<IntType, IntArrayConstructor>;
|
66 | export declare const UINT_ARRAY_CTORS: Record<UintType, UIntArrayConstructor>;
|
67 | export declare const TYPEDARRAY_CTORS: Record<Type, TypedArrayConstructor>;
|
68 | export interface TypedArrayTypeMap extends Record<Type | GLType, TypedArray> {
|
69 | u8: Uint8Array;
|
70 | u8c: Uint8ClampedArray;
|
71 | i8: Int8Array;
|
72 | u16: Uint16Array;
|
73 | i16: Int16Array;
|
74 | u32: Uint32Array;
|
75 | i32: Int32Array;
|
76 | f32: Float32Array;
|
77 | f64: Float64Array;
|
78 | [GLType.U8]: Uint8Array;
|
79 | [GLType.I8]: Int8Array;
|
80 | [GLType.U16]: Uint16Array;
|
81 | [GLType.I16]: Int16Array;
|
82 | [GLType.U32]: Uint32Array;
|
83 | [GLType.I32]: Int32Array;
|
84 | [GLType.F32]: Float32Array;
|
85 | }
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 | export declare const asNativeType: (type: GLType | Type) => Type;
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 | export declare const asGLType: (type: GLType | Type) => GLType;
|
111 |
|
112 |
|
113 |
|
114 | export declare const asInt: (...args: number[]) => number[];
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 | export declare const sizeOf: (type: GLType | Type) => number;
|
121 |
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 | export declare function typedArray<T extends Type | GLType>(type: T, length: number): TypedArrayTypeMap[T];
|
128 | export declare function typedArray<T extends Type | GLType>(type: T, src: ArrayLike<number> | ArrayBufferLike): TypedArrayTypeMap[T];
|
129 | export declare function typedArray<T extends Type | GLType>(type: T, buf: ArrayBufferLike, byteOffset: number, length?: number): TypedArrayTypeMap[T];
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 | export declare const typedArrayType: (x: NumericArray) => Type;
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 | export declare const uintTypeForSize: (x: number) => UintType;
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 | export declare const intTypeForSize: (x: number) => IntType;
|
151 |
|
152 |
|
153 |
|
154 |
|
155 |
|
156 | export declare const uintTypeForBits: (x: number) => UintType;
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 | export declare const intTypeForBits: (x: number) => IntType;
|
163 |
|
\ | No newline at end of file |