three-stdlib 2.22.3 → 2.22.4

Sign up to get free protection for your applications and to get access to all the features.
package/index.d.ts CHANGED
@@ -250,4 +250,5 @@ export * from './curves/NURBSCurve';
250
250
  export * from './curves/NURBSSurface';
251
251
  export * from './curves/CurveExtras';
252
252
  export * from './deprecated/Geometry';
253
+ export * from './libs/MeshoptDecoder';
253
254
  export * from './libs/MotionControllers';
@@ -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 };
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-stdlib",
3
- "version": "2.22.3",
3
+ "version": "2.22.4",
4
4
  "private": false,
5
5
  "description": "stand-alone library of threejs examples",
6
6
  "main": "index.cjs.js",