@draco-rust/decoder 0.3.0 → 0.3.1

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/README.md CHANGED
@@ -147,4 +147,4 @@ For a subpath entry, resolve its own file, for example
147
147
  - Licensed under Apache-2.0, like Draco.
148
148
  ## This build
149
149
 
150
- `@draco-rust/decoder@0.3.0` was built from draco-rust commit `4b72cfc8`, with draco-core 2.3.2, draco-io 0.6.0, draco-gltf 0.7.0.
150
+ `@draco-rust/decoder@0.3.1` was built from draco-rust commit `18d16cdc`, with draco-core 2.3.3, draco-io 0.6.1, draco-gltf 0.7.0.
package/index.d.ts CHANGED
@@ -3,8 +3,8 @@
3
3
 
4
4
  /** The name of a typed array `decode_draco` can convert an attribute to. */
5
5
  export type DracoArrayType =
6
- | "Int8Array" | "Uint8Array" | "Int16Array" | "Uint16Array"
7
- | "Int32Array" | "Uint32Array" | "Float32Array";
6
+ | "Int8Array" | "Uint8Array" | "Int16Array" | "Uint16Array"
7
+ | "Int32Array" | "Uint32Array" | "Float32Array";
8
8
 
9
9
  /** A Draco attribute type, as `semantic` names it. */
10
10
  export type DracoSemantic = "POSITION" | "NORMAL" | "COLOR" | "TEX_COORD" | "GENERIC";
@@ -14,44 +14,44 @@ export type DracoSemantic = "POSITION" | "NORMAL" | "COLOR" | "TEX_COORD" | "GEN
14
14
  * attribute of that type. `name` is handed back unchanged.
15
15
  */
16
16
  export interface DracoAttributeRequest {
17
- name?: string;
18
- id?: number;
19
- semantic?: DracoSemantic;
20
- type?: DracoArrayType;
17
+ name?: string;
18
+ id?: number;
19
+ semantic?: DracoSemantic;
20
+ type?: DracoArrayType;
21
21
  }
22
22
 
23
23
  /** The typed arrays an attribute can come back in. */
24
24
  export type DracoArray =
25
- | Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
26
- | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
25
+ | Int8Array | Uint8Array | Int16Array | Uint16Array | Int32Array | Uint32Array
26
+ | Float32Array | Float64Array | BigInt64Array | BigUint64Array;
27
27
 
28
28
  export interface DracoAttribute {
29
- /** The request's `name`, or else the name the stream's metadata gives it. */
30
- name?: string;
31
- uniqueId: number;
32
- semantic: DracoSemantic;
33
- array: DracoArray;
34
- itemSize: number;
35
- normalized: boolean;
29
+ /** The request's `name`, or else the name the stream's metadata gives it. */
30
+ name?: string;
31
+ uniqueId: number;
32
+ semantic: DracoSemantic;
33
+ array: DracoArray;
34
+ itemSize: number;
35
+ normalized: boolean;
36
36
  }
37
37
 
38
38
  export interface DracoDecodeOptions {
39
- /**
40
- * The index's array: `"Uint32Array"`, the default, or `"auto"`, which uses a
41
- * `Uint16Array` when every point number fits, at most 65536 points, and
42
- * halves what a worker sends back.
43
- */
44
- index?: "Uint32Array" | "auto";
39
+ /**
40
+ * The index's array: `"Uint32Array"`, the default, or `"auto"`, which uses a
41
+ * `Uint16Array` when every point number fits, at most 65536 points, and
42
+ * halves what a worker sends back.
43
+ */
44
+ index?: "Uint32Array" | "auto";
45
45
  }
46
46
 
47
47
  export interface DracoDecodeResult {
48
- success: boolean;
49
- error?: string;
50
- warnings: string[];
51
- geometry?: "mesh" | "point_cloud";
52
- /** Triangle corners for a mesh, `null` for a point cloud. */
53
- index: Uint32Array | Uint16Array | null;
54
- attributes: DracoAttribute[];
48
+ success: boolean;
49
+ error?: string;
50
+ warnings: string[];
51
+ geometry?: "mesh" | "point_cloud";
52
+ /** Triangle corners for a mesh, `null` for a point cloud. */
53
+ index: Uint32Array | Uint16Array | null;
54
+ attributes: DracoAttribute[];
55
55
  }
56
56
 
57
57
  /**
@@ -60,9 +60,9 @@ export interface DracoDecodeResult {
60
60
  * upstream's `GetAttributeDataArrayForAllPoints` converts them.
61
61
  */
62
62
  export function decode_draco(
63
- data: Uint8Array,
64
- attributes?: DracoAttributeRequest[],
65
- options?: DracoDecodeOptions,
63
+ data: Uint8Array,
64
+ attributes?: DracoAttributeRequest[],
65
+ options?: DracoDecodeOptions,
66
66
  ): DracoDecodeResult;
67
67
 
68
68
 
@@ -90,38 +90,38 @@ export function version(): string;
90
90
  export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
91
91
 
92
92
  export interface InitOutput {
93
- readonly memory: WebAssembly.Memory;
94
- readonly decode_draco: (a: number, b: number, c: number, d: number) => number;
95
- readonly init: () => void;
96
- readonly parse_drc_bytes: (a: number, b: number) => number;
97
- readonly supported_extensions: (a: number) => void;
98
- readonly version: (a: number) => void;
99
- readonly __wbindgen_export: (a: number, b: number) => number;
100
- readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
101
- readonly __wbindgen_export3: (a: number) => void;
102
- readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
103
- readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
104
- readonly __wbindgen_start: () => void;
93
+ readonly memory: WebAssembly.Memory;
94
+ readonly decode_draco: (a: number, b: number, c: number, d: number) => number;
95
+ readonly parse_drc_bytes: (a: number, b: number) => number;
96
+ readonly supported_extensions: (a: number) => void;
97
+ readonly version: (a: number) => void;
98
+ readonly init: () => void;
99
+ readonly __wbindgen_export: (a: number, b: number) => number;
100
+ readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
101
+ readonly __wbindgen_export3: (a: number) => void;
102
+ readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
103
+ readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
104
+ readonly __wbindgen_start: () => void;
105
105
  }
106
106
 
107
107
  export type SyncInitInput = BufferSource | WebAssembly.Module;
108
108
 
109
109
  /**
110
- * Instantiates the given `module`, which can either be bytes or
111
- * a precompiled `WebAssembly.Module`.
112
- *
113
- * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
114
- *
115
- * @returns {InitOutput}
116
- */
110
+ * Instantiates the given `module`, which can either be bytes or
111
+ * a precompiled `WebAssembly.Module`.
112
+ *
113
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
114
+ *
115
+ * @returns {InitOutput}
116
+ */
117
117
  export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
118
118
 
119
119
  /**
120
- * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
121
- * for everything else, calls `WebAssembly.instantiate` directly.
122
- *
123
- * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
124
- *
125
- * @returns {Promise<InitOutput>}
126
- */
120
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
121
+ * for everything else, calls `WebAssembly.instantiate` directly.
122
+ *
123
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
124
+ *
125
+ * @returns {Promise<InitOutput>}
126
+ */
127
127
  export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;