three-stdlib 2.22.3 → 2.22.4
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/index.d.ts +1 -0
- package/libs/MeshoptDecoder.d.ts +12 -0
- package/libs/MeshoptDecoder.js +4 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
declare type API = {
|
2
|
+
ready: Promise<void>;
|
3
|
+
supported: boolean;
|
4
|
+
decodeVertexBuffer: (target: Uint8Array, count: number, size: number, source: Uint8Array, filter?: string) => void;
|
5
|
+
decodeIndexBuffer: (target: Uint8Array, count: number, size: number, source: Uint8Array) => void;
|
6
|
+
decodeIndexSequence: (target: Uint8Array, count: number, size: number, source: Uint8Array) => void;
|
7
|
+
decodeGltfBuffer: (target: Uint8Array, count: number, size: number, source: Uint8Array, mode: string, filter?: string) => void;
|
8
|
+
};
|
9
|
+
declare const MeshoptDecoder: () => API | {
|
10
|
+
supported: boolean;
|
11
|
+
};
|
12
|
+
export { MeshoptDecoder };
|
package/libs/MeshoptDecoder.js
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
// This file is part of meshoptimizer library and is distributed under the terms of MIT License.
|
2
2
|
// Copyright (C) 2016-2020, by Arseny Kapoulkine (arseny.kapoulkine@gmail.com)
|
3
|
+
|
4
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
3
5
|
let generated;
|
4
6
|
|
5
7
|
const MeshoptDecoder = () => {
|
@@ -26,7 +28,8 @@ const MeshoptDecoder = () => {
|
|
26
28
|
wasm = wasm_simd;
|
27
29
|
}
|
28
30
|
|
29
|
-
let instance;
|
31
|
+
let instance; // WebAssembly.Instance
|
32
|
+
|
30
33
|
const promise = WebAssembly.instantiate(unpack(wasm), {}).then(result => {
|
31
34
|
instance = result.instance;
|
32
35
|
|