@thi.ng/api 8.9.24 → 8.9.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/README.md +1 -1
- package/deref.d.ts +2 -0
- package/package.json +2 -2
- package/typedarray.d.ts +6 -0
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
[](https://mastodon.thi.ng/@toxi)
|
|
19
19
|
|
|
20
20
|
> [!NOTE]
|
|
21
|
-
> This is one of
|
|
21
|
+
> This is one of 190 standalone projects, maintained as part
|
|
22
22
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
23
23
|
> and anti-framework.
|
|
24
24
|
>
|
package/deref.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/api",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.26",
|
|
4
4
|
"description": "Common, generic types, interfaces & mixins",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -225,5 +225,5 @@
|
|
|
225
225
|
"default": "./watch.js"
|
|
226
226
|
}
|
|
227
227
|
},
|
|
228
|
-
"gitHead": "
|
|
228
|
+
"gitHead": "6e20f80dd9df1c8055ffa3c1e4d6f7598add0c0b\n"
|
|
229
229
|
}
|
package/typedarray.d.ts
CHANGED
|
@@ -117,6 +117,8 @@ export interface BigTypedArrayTypeMap extends Record<BigType, BigTypedArray> {
|
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
119
|
* ```ts
|
|
120
|
+
* import { asNativeType } from "@thi.ng/api";
|
|
121
|
+
*
|
|
120
122
|
* asNativeType(GLType.F32) => "f32"
|
|
121
123
|
* asNativeType("f32") => "f32"
|
|
122
124
|
* ```
|
|
@@ -129,6 +131,8 @@ export declare const asNativeType: (type: GLType | Type) => Type;
|
|
|
129
131
|
*
|
|
130
132
|
* @example
|
|
131
133
|
* ```ts
|
|
134
|
+
* import { asGLType } from "@thi.ng/api";
|
|
135
|
+
*
|
|
132
136
|
* asGLType("f32") => GLType.F32
|
|
133
137
|
* asGLType(GLType.F32) => GLType.F32
|
|
134
138
|
* ```
|
|
@@ -169,6 +173,8 @@ export declare function typedArray<T extends BigType>(type: T, buf: ArrayBufferL
|
|
|
169
173
|
*
|
|
170
174
|
* @example
|
|
171
175
|
* ```ts
|
|
176
|
+
* import { typedArrayOfVec } from "@thi.ng/api";
|
|
177
|
+
*
|
|
172
178
|
* // inferred stride=2 (2d vectors)
|
|
173
179
|
* typedArrayOfVec("f32", [[1,2], [3,4], [-10,20]]);
|
|
174
180
|
* // Float32Array(6) [ 1, 2, 3, 4, -10, 20 ]
|