@needle-tools/gltf-progressive 3.6.0-beta.1 → 3.6.0-beta.2

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
@@ -30,15 +30,15 @@ To view the examples locally with the current checkout's runtime, run `npm run e
30
30
 
31
31
  - [Loading comparisons](https://stackblitz.com/edit/gltf-progressive-comparison?file=package.json,index.html)
32
32
  - [Vanilla three.js](https://engine.needle.tools/demos/gltf-progressive/threejs/) - multiple models and animations
33
- - `examples/webgpu` - WebGPU renderer
34
- - `examples/offscreen` - main-thread OffscreenCanvas rendering
35
- - `examples/worker-rendering` - OffscreenCanvas rendering in a Worker
36
33
  - [React Three Fiber](https://engine.needle.tools/demos/gltf-progressive/r3f/)
37
34
  - \<model-viewer\>
38
35
  - [single \<model-viewer> element](https://engine.needle.tools/demos/gltf-progressive/modelviewer)
39
36
  - [multiple \<model-viewer> elements](https://engine.needle.tools/demos/gltf-progressive/modelviewer-multiple)
40
37
  - [Needle Engine](https://stackblitz.com/edit/needle-engine-gltf-progressive?file=src%2Fmain.ts)
41
38
  - [Needle Cloud](https://cloud.needle.tools/view?file=Z23hmXBZN45qJ-ZN45qJ-world)
39
+ - `examples/webgpu` - WebGPU renderer
40
+ - `examples/offscreen` - main-thread OffscreenCanvas rendering
41
+ - `examples/worker-rendering` - OffscreenCanvas rendering in a Worker
42
42
 
43
43
  **Interactive Examples**:
44
44
  - [Stackblitz](https://stackblitz.com/@marwie/collections/gltf-progressive)
@@ -90,7 +90,7 @@ gltfLoader.load(url, gltf => {
90
90
  ```
91
91
 
92
92
 
93
- ## react three fiber
93
+ ## React Three Fiber
94
94
 
95
95
  Full react-three-fiber example at: `examples/react-three-fiber`
96
96
 
@@ -105,7 +105,7 @@ function MyModel() {
105
105
  }
106
106
  ```
107
107
 
108
- ## google \<model-viewer\>
108
+ ## Google \<model-viewer\>
109
109
 
110
110
  Full model-viewer example at: `examples/modelviewer.html`
111
111
 
@@ -134,7 +134,7 @@ Full model-viewer example at: `examples/modelviewer.html`
134
134
 
135
135
  ## Needle Engine
136
136
 
137
- [Needle Engine](https://needle.tools) natively supports progressive loading of these glTF files! See [docs.needle.tools](https://docs.needle.tools) for more information.
137
+ [Needle Engine](https://needle.tools) natively supports progressive loading of these glTF files! See [docs.needle.tools/gltf-progressive](https://engine.needle.tools/docs/gltf-progressive/) for more information.
138
138
 
139
139
 
140
140
  # How can I generate assets for progressive loading
@@ -209,6 +209,8 @@ Call `getRaycastMesh(<your_mesh_object>)`
209
209
  # Extension
210
210
  Read more about the [NEEDLE_progressive extension](./NEEDLE_progressive/README.md)
211
211
 
212
+ # Documentation
213
+ Read more about Needle Progressive GLTF loading in the [Needle Engine documentation](https://docs.needle.tools/engine/gltf-progressive/)
212
214
 
213
215
  # Contact ✒️
214
216
  <b>[🌵 needle — tools for creators](https://needle.tools)</b> •
package/lib/loaders.d.ts CHANGED
@@ -28,7 +28,14 @@ export declare function setKTX2TranscoderLocation(location: string): void;
28
28
  export declare function createLoaders(renderer: WebGLRenderer | null): {
29
29
  dracoLoader: DRACOLoader;
30
30
  ktx2Loader: KTX2Loader;
31
- meshoptDecoder: any;
31
+ meshoptDecoder: {
32
+ supported: boolean;
33
+ ready: Promise<void>;
34
+ decodeVertexBuffer: (target: Uint8Array, count: number, size: number, source: Uint8Array, filter?: string) => void;
35
+ decodeIndexBuffer: (target: Uint8Array, count: number, size: number, source: Uint8Array) => void;
36
+ decodeIndexSequence: (target: Uint8Array, count: number, size: number, source: Uint8Array) => void;
37
+ decodeGltfBuffer: (target: Uint8Array, count: number, size: number, source: Uint8Array, mode: string, filter?: string) => void;
38
+ };
32
39
  };
33
40
  export declare function addDracoAndKTX2Loaders(loader: GLTFLoader): void;
34
41
  /**
package/lib/utils.d.ts CHANGED
@@ -5,7 +5,7 @@ export declare const isSSR: boolean;
5
5
  * @param obj the object to get the raycast mesh from
6
6
  * @returns the raycast mesh or null if not set
7
7
  */
8
- export declare function getRaycastMesh(obj: Object3D): BufferGeometry<any, any> | null;
8
+ export declare function getRaycastMesh(obj: Object3D): BufferGeometry<any> | null;
9
9
  /**
10
10
  * Set the raycast mesh for an object.
11
11
  * The raycast mesh is a low poly version of the mesh used for raycasting. It is set when a mesh that has LOD level with more vertices is discovered for the first time
package/lib/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // replaced at build time
2
- export const version = "3.6.0-beta.1";
2
+ export const version = "3.6.0-beta.2";
3
3
  globalThis["GLTF_PROGRESSIVE_VERSION"] = version;
4
4
  console.debug(`[gltf-progressive] version ${version || "-"}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@needle-tools/gltf-progressive",
3
- "version": "3.6.0-beta.1",
3
+ "version": "3.6.0-beta.2",
4
4
  "description": "three.js support for loading glTF or GLB files that contain progressive loading data",
5
5
  "homepage": "https://needle.tools",
6
6
  "author": {
@@ -62,7 +62,7 @@
62
62
  "@needle-tools/engine": "^5.1.0-alpha.6",
63
63
  "@needle-tools/three-test-matrix": "^0.1.0",
64
64
  "@stylistic/eslint-plugin-ts": "^1.5.4",
65
- "@types/three": "0.183.1",
65
+ "@types/three": "0.169.0",
66
66
  "@typescript-eslint/eslint-plugin": "^6.2.0",
67
67
  "@typescript-eslint/parser": "^6.2.0",
68
68
  "@vitest/browser-playwright": "^4.1.8",