minidraco 0.7.0 → 0.9.0
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 +5 -5
- package/dist/index.d.ts +6 -4
- package/dist/index.js +1608 -1625
- package/dist/pool.js +36 -36
- package/dist/three.d.ts +6 -4
- package/dist/three.js +1636 -1653
- package/dist/worker.js +1608 -1625
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,16 +44,16 @@ Median across 18 models vs [draco.js](https://github.com/mrdoob/draco.js) and th
|
|
|
44
44
|
|
|
45
45
|
| benchmark | vs draco.js | vs draco3d wasm |
|
|
46
46
|
| -------------------------------------------------- | --------------- | --------------- |
|
|
47
|
-
| single-threaded decode — bun (JSC) | 🟢 1.
|
|
48
|
-
| single-threaded decode — Chrome (V8) | 🟢 1.
|
|
49
|
-
| `GLTFLoader.parse`, warm worker pool — Chrome (V8) | 🟢 1.
|
|
50
|
-
| `GLTFLoader.parse`, cold first load — Chrome (V8) | 🟢 1.
|
|
47
|
+
| single-threaded decode — bun (JSC) | 🟢 1.82× faster | 🟢 1.97× faster |
|
|
48
|
+
| single-threaded decode — Chrome (V8) | 🟢 1.79× faster | 🟢 1.48× faster |
|
|
49
|
+
| `GLTFLoader.parse`, warm worker pool — Chrome (V8) | 🟢 1.74× faster | 🟢 1.03× faster |
|
|
50
|
+
| `GLTFLoader.parse`, cold first load — Chrome (V8) | 🟢 1.60× faster | 🟢 1.38× faster |
|
|
51
51
|
|
|
52
52
|
## Download size
|
|
53
53
|
|
|
54
54
|
| download (brotli) | minidraco | vs draco.js | vs draco3d wasm |
|
|
55
55
|
| ----------------------------- | --------- | ------------------------ | ------------------------ |
|
|
56
|
-
| single-threaded (default) | 21 KB | 🟢 1.04× smaller (22 KB) | 🟢 3.
|
|
56
|
+
| single-threaded (default) | 21 KB | 🟢 1.04× smaller (22 KB) | 🟢 3.80× smaller (81 KB) |
|
|
57
57
|
| worker pool (`workers: true`) | 44 KB | 🟢 not supported | 🟢 1.84× smaller (81 KB) |
|
|
58
58
|
|
|
59
59
|
## Monorepo
|
package/dist/index.d.ts
CHANGED
|
@@ -52,13 +52,15 @@ declare class PointAttribute extends GeometryAttribute {
|
|
|
52
52
|
_lazyValues: Int32Array | null;
|
|
53
53
|
_lazyMin: number[];
|
|
54
54
|
_lazyScale: number;
|
|
55
|
+
_lazyBounded: boolean;
|
|
55
56
|
constructor(geometryAttribute?: GeometryAttribute);
|
|
56
57
|
init(attributeType: number, numComponents: number, dataType: number, normalized: boolean, numAttributeValues: number): void;
|
|
57
58
|
reset(numAttributeValues: number): boolean;
|
|
59
|
+
resetWithData(data: Uint8Array, numAttributeValues: number): void;
|
|
58
60
|
resetLazy(numAttributeValues: number): void;
|
|
59
61
|
setLazyInteger(values: Int32Array | null): void;
|
|
60
|
-
setLazyQuantized(values: Int32Array | null, minValues: number[], delta: number): void;
|
|
61
|
-
setLazyOctahedron(values: Int32Array | null, scale: number): void;
|
|
62
|
+
setLazyQuantized(values: Int32Array | null, minValues: number[], delta: number, bounded: boolean): void;
|
|
63
|
+
setLazyOctahedron(values: Int32Array | null, scale: number, bounded: boolean): void;
|
|
62
64
|
get size(): number;
|
|
63
65
|
mappedIndex(pointIndex: number): number;
|
|
64
66
|
get isMappingIdentity(): boolean;
|
|
@@ -73,8 +75,8 @@ declare class PointAttribute extends GeometryAttribute {
|
|
|
73
75
|
extractTo<C extends new (length: number) => ExtractTypedArray>(OutputTypedArray: C, numPoints: number): InstanceType<C>;
|
|
74
76
|
_lazyMap(numPoints: number): Uint32Array;
|
|
75
77
|
_lazyFloatValues(): Int32Array;
|
|
76
|
-
_extractQuantized(out:
|
|
77
|
-
_extractOctahedron(out:
|
|
78
|
+
_extractQuantized(out: Float32Array, numPoints: number): void;
|
|
79
|
+
_extractOctahedron(out: Float32Array, numPoints: number): void;
|
|
78
80
|
_extractInteger(out: ExtractTypedArray, numPoints: number): void;
|
|
79
81
|
}
|
|
80
82
|
|