@needle-tools/gltf-progressive 2.1.3 → 2.1.5
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/CHANGELOG.md +3 -0
- package/README.md +6 -8
- package/lib/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,9 @@ All notable changes to this package will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.1.4] - 2025-04-13
|
|
8
|
+
- Fix: Don't minify internal exports (e.g. class names of three.js)
|
|
9
|
+
|
|
7
10
|
## [2.1.3] - 2025-03-19
|
|
8
11
|
- Fix: DracoLoader cache busting due to range request
|
|
9
12
|
|
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Examples are in the `/examples` directory. Live versions can be found in the lin
|
|
|
20
20
|
- [single \<model-viewer> element](https://engine.needle.tools/demos/gltf-progressive/modelviewer)
|
|
21
21
|
- [multiple \<model-viewer> elements](https://engine.needle.tools/demos/gltf-progressive/modelviewer-multiple)
|
|
22
22
|
- [Needle Engine](https://stackblitz.com/edit/needle-engine-gltf-progressive?file=src%2Fmain.ts)
|
|
23
|
-
- [
|
|
23
|
+
- [Needle Cloud](https://cloud.needle.tools/view?file=Z23hmXBZN45qJ-ZN45qJ-world)
|
|
24
24
|
|
|
25
25
|
**Interactive Examples**:
|
|
26
26
|
- [Stackblitz](https://stackblitz.com/@marwie/collections/gltf-progressive)
|
|
@@ -40,9 +40,9 @@ Examples are in the `/examples` directory. Live versions can be found in the lin
|
|
|
40
40
|
Full example in `examples/react-three-fiber`
|
|
41
41
|
|
|
42
42
|
```ts
|
|
43
|
-
function
|
|
43
|
+
function MyModel() {
|
|
44
44
|
const { gl } = useThree()
|
|
45
|
-
const url = 'https://
|
|
45
|
+
const url = 'https://cloud.needle.tools/-/assets/Z23hmXBZN45qJ-ZN45qJ-world/file'
|
|
46
46
|
const { scene } = useGLTF(url, false, false, (loader) => {
|
|
47
47
|
useNeedleProgressive(url, gl, loader as any)
|
|
48
48
|
})
|
|
@@ -74,16 +74,14 @@ In your script:
|
|
|
74
74
|
```ts
|
|
75
75
|
const gltfLoader = new GLTFLoader();
|
|
76
76
|
|
|
77
|
-
const url = "https://
|
|
77
|
+
const url = "https://cloud.needle.tools/-/assets/Z23hmXBZN45qJ-ZN45qJ-world/file";
|
|
78
78
|
|
|
79
|
-
// register the progressive loader
|
|
79
|
+
// register the progressive loader plugin
|
|
80
80
|
useNeedleProgressive(url, renderer, gltfLoader)
|
|
81
81
|
|
|
82
82
|
// just call the load method as usual
|
|
83
83
|
gltfLoader.load(url, gltf => {
|
|
84
|
-
console.log(gltf)
|
|
85
84
|
scene.add(gltf.scene)
|
|
86
|
-
gltf.scene.position.y += .95;
|
|
87
85
|
})
|
|
88
86
|
```
|
|
89
87
|
|
|
@@ -110,7 +108,7 @@ The example can be found in `examples/modelviewer.html`
|
|
|
110
108
|
</head>
|
|
111
109
|
<body>
|
|
112
110
|
|
|
113
|
-
<model-viewer src="https://
|
|
111
|
+
<model-viewer src="https://cloud.needle.tools/-/assets/Z23hmXBZN45qJ-ZN45qJ-world/file" camera-controls auto-rotate></model-viewer>
|
|
114
112
|
|
|
115
113
|
</body>
|
|
116
114
|
```
|
package/lib/version.js
CHANGED
package/package.json
CHANGED