@needle-tools/gltf-progressive 1.2.1-alpha.3 → 1.2.2-alpha
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 +8 -0
- package/examples/modelviewer-multiple.html +49 -0
- package/examples/modelviewer.html +3 -1
- package/gltf-progressive.js +504 -465
- package/gltf-progressive.min.js +6 -4
- package/gltf-progressive.umd.cjs +6 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -4
- package/lib/lods_manager.d.ts +5 -1
- package/lib/lods_manager.js +26 -18
- package/lib/plugins/modelviewer.d.ts +1 -4
- package/lib/plugins/modelviewer.js +58 -18
- package/lib/utils.internal.d.ts +1 -0
- package/lib/utils.internal.js +5 -1
- package/lib/version.d.ts +1 -0
- package/lib/version.js +4 -0
- package/package.json +17 -5
package/lib/utils.internal.d.ts
CHANGED
package/lib/utils.internal.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
const debug = getParam("debugprogressive");
|
|
2
|
+
export function isDebugMode() {
|
|
3
|
+
return debug;
|
|
4
|
+
}
|
|
1
5
|
export function getParam(name) {
|
|
2
6
|
const url = new URL(window.location.href);
|
|
3
7
|
const param = url.searchParams.get(name);
|
|
@@ -41,6 +45,6 @@ export function isMobileDevice() {
|
|
|
41
45
|
return _ismobile;
|
|
42
46
|
_ismobile = /iPhone|iPad|iPod|Android|IEMobile/i.test(navigator.userAgent);
|
|
43
47
|
if (getParam("debugprogressive"))
|
|
44
|
-
console.log("isMobileDevice", _ismobile);
|
|
48
|
+
console.log("[glTF Progressive]: isMobileDevice", _ismobile);
|
|
45
49
|
return _ismobile;
|
|
46
50
|
}
|
package/lib/version.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const version = "";
|
package/lib/version.js
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-progressive",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2-alpha",
|
|
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": {
|
|
@@ -27,14 +27,22 @@
|
|
|
27
27
|
"require": "./gltf-progressive.js"
|
|
28
28
|
}
|
|
29
29
|
},
|
|
30
|
+
"watch": {
|
|
31
|
+
"build:lib": {
|
|
32
|
+
"patterns": [
|
|
33
|
+
"src/**/*",
|
|
34
|
+
"examples/**/*.html"
|
|
35
|
+
],
|
|
36
|
+
"extensions": "ts,json,html",
|
|
37
|
+
"ignore": "dist"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
30
40
|
"peerDependencies": {
|
|
31
41
|
"three": ">= 0.160.0"
|
|
32
42
|
},
|
|
33
43
|
"devDependencies": {
|
|
34
|
-
"@types/three": "0.162.0",
|
|
35
|
-
"three": ">= 0.160.0",
|
|
36
|
-
"vite": "<= 4.3.9",
|
|
37
44
|
"@stylistic/eslint-plugin-ts": "^1.5.4",
|
|
45
|
+
"@types/three": "0.162.0",
|
|
38
46
|
"@typescript-eslint/eslint-plugin": "^6.2.0",
|
|
39
47
|
"@typescript-eslint/parser": "^6.2.0",
|
|
40
48
|
"eslint": "^8.56.0",
|
|
@@ -42,7 +50,11 @@
|
|
|
42
50
|
"eslint-plugin-no-secrets": "^0.8.9",
|
|
43
51
|
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
44
52
|
"eslint-plugin-promise": "^6.1.1",
|
|
45
|
-
"eslint-plugin-xss": "^0.1.12"
|
|
53
|
+
"eslint-plugin-xss": "^0.1.12",
|
|
54
|
+
"nodemon": "^3.1.4",
|
|
55
|
+
"npm-watch": "^0.13.0",
|
|
56
|
+
"three": ">= 0.160.0",
|
|
57
|
+
"vite": "<= 4.3.9"
|
|
46
58
|
},
|
|
47
59
|
"types": "./lib/index.d.ts"
|
|
48
60
|
}
|