@thi.ng/api 8.9.25 → 8.9.27
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 -12
- 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
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
<!-- This file is generated - DO NOT EDIT! -->
|
|
2
2
|
<!-- Please see: https://github.com/thi-ng/umbrella/blob/develop/CONTRIBUTING.md#changes-to-readme-files -->
|
|
3
|
-
> [!IMPORTANT]
|
|
4
|
-
> ‼️ Announcing the thi.ng user survey 2024 📋
|
|
5
|
-
>
|
|
6
|
-
> [Please participate in the survey here!](https://forms.gle/XacbSDEmQMPZg8197)\
|
|
7
|
-
> (open until end of February)
|
|
8
|
-
>
|
|
9
|
-
> **To achieve a better sample size, I'd highly appreciate if you could
|
|
10
|
-
> circulate the link to this survey in your own networks.**
|
|
11
|
-
>
|
|
12
|
-
> [Discussion](https://github.com/thi-ng/umbrella/discussions/447)
|
|
13
|
-
|
|
14
3
|
# 
|
|
15
4
|
|
|
16
5
|
[](https://www.npmjs.com/package/@thi.ng/api)
|
|
@@ -22,7 +11,7 @@
|
|
|
22
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
23
12
|
> and anti-framework.
|
|
24
13
|
>
|
|
25
|
-
> 🚀
|
|
14
|
+
> 🚀 Please help me to work full-time on these projects by [sponsoring me on
|
|
26
15
|
> GitHub](https://github.com/sponsors/postspectacular). Thank you! ❤️
|
|
27
16
|
|
|
28
17
|
- [About](#about)
|
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.27",
|
|
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": "d660ae8fd1bf64d919b4334f19509f1f539d70f6\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 ]
|