@needle-tools/gltf-progressive 2.1.6 → 3.0.0-rc.f23cbbb
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/gltf-progressive.js +663 -672
- package/gltf-progressive.min.js +7 -7
- package/gltf-progressive.umd.cjs +8 -8
- package/lib/extension.d.ts +10 -6
- package/lib/extension.js +20 -94
- package/lib/lods.debug.d.ts +4 -0
- package/lib/lods.debug.js +41 -0
- package/lib/lods_manager.d.ts +6 -1
- package/lib/lods_manager.js +26 -10
- package/lib/plugins/plugin.d.ts +2 -2
- package/lib/version.js +1 -1
- package/package.json +2 -2
package/lib/extension.js
CHANGED
|
@@ -1,80 +1,15 @@
|
|
|
1
1
|
import { BufferGeometry, Mesh, Texture, TextureLoader } from "three";
|
|
2
2
|
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
3
3
|
import { addDracoAndKTX2Loaders } from "./loaders.js";
|
|
4
|
-
import {
|
|
4
|
+
import { resolveUrl } from "./utils.internal.js";
|
|
5
5
|
import { getRaycastMesh, registerRaycastMesh } from "./utils.js";
|
|
6
6
|
// All of this has to be removed
|
|
7
7
|
// import { getRaycastMesh, setRaycastMesh } from "../../engine_physics.js";
|
|
8
8
|
// import { PromiseAllWithErrors, resolveUrl } from "../../engine_utils.js";
|
|
9
9
|
import { plugins } from "./plugins/plugin.js";
|
|
10
|
+
import { debug } from "./lods.debug.js";
|
|
10
11
|
export const EXTENSION_NAME = "NEEDLE_progressive";
|
|
11
|
-
const debug = getParam("debugprogressive");
|
|
12
12
|
const $progressiveTextureExtension = Symbol("needle-progressive-texture");
|
|
13
|
-
const debug_toggle_maps = new Map();
|
|
14
|
-
const debug_materials = new Set();
|
|
15
|
-
if (debug) {
|
|
16
|
-
let currentDebugLodLevel = -1;
|
|
17
|
-
let maxLevel = 2;
|
|
18
|
-
let wireframe = false;
|
|
19
|
-
function debugToggleProgressive() {
|
|
20
|
-
currentDebugLodLevel += 1;
|
|
21
|
-
console.log("Toggle LOD level", currentDebugLodLevel, debug_toggle_maps);
|
|
22
|
-
debug_toggle_maps.forEach((arr, obj) => {
|
|
23
|
-
for (const key of arr.keys) {
|
|
24
|
-
const cur = obj[key];
|
|
25
|
-
// if it's null or undefined we skip it
|
|
26
|
-
if (cur == null) {
|
|
27
|
-
continue;
|
|
28
|
-
}
|
|
29
|
-
if (cur.isBufferGeometry === true) {
|
|
30
|
-
const info = NEEDLE_progressive.getMeshLODInformation(cur);
|
|
31
|
-
const level = !info ? 0 : Math.min(currentDebugLodLevel, info.lods.length);
|
|
32
|
-
obj["DEBUG:LOD"] = level;
|
|
33
|
-
// NEEDLE_progressive.assignMeshLOD(obj as Mesh, level);
|
|
34
|
-
if (info)
|
|
35
|
-
maxLevel = Math.max(maxLevel, info.lods.length - 1);
|
|
36
|
-
}
|
|
37
|
-
else if (obj.isMaterial === true) {
|
|
38
|
-
obj["DEBUG:LOD"] = currentDebugLodLevel;
|
|
39
|
-
// NEEDLE_progressive.assignTextureLOD(obj as Material, currentDebugLodLevel);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
if (currentDebugLodLevel >= maxLevel) {
|
|
44
|
-
currentDebugLodLevel = -1;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
window.addEventListener("keyup", evt => {
|
|
48
|
-
if (evt.key === "p")
|
|
49
|
-
debugToggleProgressive();
|
|
50
|
-
if (evt.key === "w") {
|
|
51
|
-
wireframe = !wireframe;
|
|
52
|
-
if (debug_materials) {
|
|
53
|
-
debug_materials.forEach(mat => {
|
|
54
|
-
// we don't want to change the skybox material
|
|
55
|
-
if (mat.name == "BackgroundCubeMaterial")
|
|
56
|
-
return;
|
|
57
|
-
if (mat["glyphMap"] != undefined)
|
|
58
|
-
return;
|
|
59
|
-
if ("wireframe" in mat) {
|
|
60
|
-
mat.wireframe = wireframe;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
function registerDebug(obj, key, sourceId) {
|
|
68
|
-
if (!debug)
|
|
69
|
-
return;
|
|
70
|
-
if (!debug_toggle_maps.has(obj)) {
|
|
71
|
-
debug_toggle_maps.set(obj, { keys: [], sourceId });
|
|
72
|
-
}
|
|
73
|
-
const existing = debug_toggle_maps.get(obj);
|
|
74
|
-
if (existing?.keys?.includes(key) == false) {
|
|
75
|
-
existing.keys.push(key);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
13
|
/**
|
|
79
14
|
* The NEEDLE_progressive extension for the GLTFLoader is responsible for loading progressive LODs for meshes and textures.
|
|
80
15
|
* This extension can be used to load different resolutions of a mesh or texture at runtime (e.g. for LODs or progressive textures).
|
|
@@ -95,13 +30,19 @@ export class NEEDLE_progressive {
|
|
|
95
30
|
get name() {
|
|
96
31
|
return EXTENSION_NAME;
|
|
97
32
|
}
|
|
98
|
-
static
|
|
33
|
+
static getMeshLODExtension(geo) {
|
|
99
34
|
const info = this.getAssignedLODInformation(geo);
|
|
100
35
|
if (info?.key) {
|
|
101
36
|
return this.lodInfos.get(info.key);
|
|
102
37
|
}
|
|
103
38
|
return null;
|
|
104
39
|
}
|
|
40
|
+
static getPrimitiveIndex(geo) {
|
|
41
|
+
const index = this.getAssignedLODInformation(geo)?.index;
|
|
42
|
+
if (index === undefined || index === null)
|
|
43
|
+
return -1;
|
|
44
|
+
return index;
|
|
45
|
+
}
|
|
105
46
|
static getMaterialMinMaxLODsCount(material, minmax) {
|
|
106
47
|
const self = this;
|
|
107
48
|
// we can cache this material min max data because it wont change at runtime
|
|
@@ -261,8 +202,6 @@ export class NEEDLE_progressive {
|
|
|
261
202
|
// if (debug == "verbose") console.log("Progressive Mesh " + mesh.name + " loaded", currentGeometry, "→", geo, "\n", mesh)
|
|
262
203
|
if (isGeometry) {
|
|
263
204
|
mesh.geometry = geo;
|
|
264
|
-
if (debug)
|
|
265
|
-
registerDebug(mesh, "geometry", lodinfo.url);
|
|
266
205
|
}
|
|
267
206
|
else if (debug) {
|
|
268
207
|
console.error("Invalid LOD geometry", geo);
|
|
@@ -311,8 +250,6 @@ export class NEEDLE_progressive {
|
|
|
311
250
|
const material = materialOrTexture;
|
|
312
251
|
const promises = [];
|
|
313
252
|
const slots = new Array();
|
|
314
|
-
if (debug)
|
|
315
|
-
debug_materials.add(material);
|
|
316
253
|
// Handle custom shaders / uniforms progressive textures. This includes support for VRM shaders
|
|
317
254
|
if (material.uniforms && (material.isRawShaderMaterial || material.isShaderMaterial === true)) {
|
|
318
255
|
// iterate uniforms of custom shaders
|
|
@@ -391,13 +328,6 @@ export class NEEDLE_progressive {
|
|
|
391
328
|
}
|
|
392
329
|
material[slot] = tex;
|
|
393
330
|
}
|
|
394
|
-
if (debug && slot && material) {
|
|
395
|
-
const lodinfo = this.getAssignedLODInformation(current);
|
|
396
|
-
if (lodinfo)
|
|
397
|
-
registerDebug(material, slot, lodinfo.url);
|
|
398
|
-
else
|
|
399
|
-
console.warn("No LOD info for texture", current);
|
|
400
|
-
}
|
|
401
331
|
// check if the old texture is still used by other objects
|
|
402
332
|
// if not we dispose it...
|
|
403
333
|
// this could also be handled elsewhere and not be done immediately
|
|
@@ -440,7 +370,7 @@ export class NEEDLE_progressive {
|
|
|
440
370
|
return this.parser.getDependency("mesh", meshIndex).then(mesh => {
|
|
441
371
|
this._isLoadingMesh = false;
|
|
442
372
|
if (mesh) {
|
|
443
|
-
NEEDLE_progressive.registerMesh(this.url, ext.guid, mesh, ext.lods?.length,
|
|
373
|
+
NEEDLE_progressive.registerMesh(this.url, ext.guid, mesh, ext.lods?.length, 0, ext);
|
|
444
374
|
}
|
|
445
375
|
return mesh;
|
|
446
376
|
});
|
|
@@ -522,7 +452,7 @@ export class NEEDLE_progressive {
|
|
|
522
452
|
if (tex.source)
|
|
523
453
|
tex.source[$progressiveTextureExtension] = ext;
|
|
524
454
|
const LODKEY = ext.guid;
|
|
525
|
-
NEEDLE_progressive.assignLODInformation(url, tex, LODKEY, level, index
|
|
455
|
+
NEEDLE_progressive.assignLODInformation(url, tex, LODKEY, level, index);
|
|
526
456
|
NEEDLE_progressive.lodInfos.set(LODKEY, ext);
|
|
527
457
|
NEEDLE_progressive.lowresCache.set(LODKEY, tex);
|
|
528
458
|
};
|
|
@@ -530,8 +460,6 @@ export class NEEDLE_progressive {
|
|
|
530
460
|
* Register a mesh with LOD information
|
|
531
461
|
*/
|
|
532
462
|
static registerMesh = (url, key, mesh, level, index, ext) => {
|
|
533
|
-
if (debug)
|
|
534
|
-
console.log("> Progressive: register mesh", index, mesh.name, ext, mesh.uuid, mesh);
|
|
535
463
|
const geometry = mesh.geometry;
|
|
536
464
|
if (!geometry) {
|
|
537
465
|
if (debug)
|
|
@@ -540,7 +468,9 @@ export class NEEDLE_progressive {
|
|
|
540
468
|
}
|
|
541
469
|
if (!geometry.userData)
|
|
542
470
|
geometry.userData = {};
|
|
543
|
-
|
|
471
|
+
if (debug)
|
|
472
|
+
console.log("> Progressive: register mesh " + mesh.name, { index, uuid: mesh.uuid }, ext, mesh);
|
|
473
|
+
NEEDLE_progressive.assignLODInformation(url, geometry, key, level, index);
|
|
544
474
|
NEEDLE_progressive.lodInfos.set(key, ext);
|
|
545
475
|
let existing = NEEDLE_progressive.lowresCache.get(key);
|
|
546
476
|
if (existing)
|
|
@@ -695,7 +625,7 @@ export class NEEDLE_progressive {
|
|
|
695
625
|
if (found) {
|
|
696
626
|
let tex = await parser.getDependency("texture", index);
|
|
697
627
|
if (tex) {
|
|
698
|
-
NEEDLE_progressive.assignLODInformation(LOD.url, tex, LODKEY, level, undefined
|
|
628
|
+
NEEDLE_progressive.assignLODInformation(LOD.url, tex, LODKEY, level, undefined);
|
|
699
629
|
}
|
|
700
630
|
if (debugverbose)
|
|
701
631
|
console.log("change \"" + current.name + "\" → \"" + tex.name + "\"", lod_url, index, tex, KEY);
|
|
@@ -733,7 +663,7 @@ export class NEEDLE_progressive {
|
|
|
733
663
|
console.log(`Loaded Mesh \"${mesh.name}\"`, lod_url, index, mesh, KEY);
|
|
734
664
|
if (mesh.isMesh === true) {
|
|
735
665
|
const geo = mesh.geometry;
|
|
736
|
-
NEEDLE_progressive.assignLODInformation(LOD.url, geo, LODKEY, level,
|
|
666
|
+
NEEDLE_progressive.assignLODInformation(LOD.url, geo, LODKEY, level, 0);
|
|
737
667
|
return resolve(geo);
|
|
738
668
|
}
|
|
739
669
|
else {
|
|
@@ -742,7 +672,7 @@ export class NEEDLE_progressive {
|
|
|
742
672
|
const child = mesh.children[i];
|
|
743
673
|
if (child.isMesh === true) {
|
|
744
674
|
const geo = child.geometry;
|
|
745
|
-
NEEDLE_progressive.assignLODInformation(LOD.url, geo, LODKEY, level, i
|
|
675
|
+
NEEDLE_progressive.assignLODInformation(LOD.url, geo, LODKEY, level, i);
|
|
746
676
|
geometries.push(geo);
|
|
747
677
|
}
|
|
748
678
|
}
|
|
@@ -786,12 +716,12 @@ export class NEEDLE_progressive {
|
|
|
786
716
|
}
|
|
787
717
|
return null;
|
|
788
718
|
}
|
|
789
|
-
static assignLODInformation(url, res, key, level, index
|
|
719
|
+
static assignLODInformation(url, res, key, level, index) {
|
|
790
720
|
if (!res)
|
|
791
721
|
return;
|
|
792
722
|
if (!res.userData)
|
|
793
723
|
res.userData = {};
|
|
794
|
-
const info = new LODInformation(url, key, level, index
|
|
724
|
+
const info = new LODInformation(url, key, level, index);
|
|
795
725
|
res.userData.LODS = info;
|
|
796
726
|
}
|
|
797
727
|
static getAssignedLODInformation(res) {
|
|
@@ -848,16 +778,12 @@ class LODInformation {
|
|
|
848
778
|
level;
|
|
849
779
|
/** For multi objects (e.g. a group of meshes) this is the index of the object */
|
|
850
780
|
index;
|
|
851
|
-
|
|
852
|
-
density;
|
|
853
|
-
constructor(url, key, level, index, density) {
|
|
781
|
+
constructor(url, key, level, index) {
|
|
854
782
|
this.url = url;
|
|
855
783
|
this.key = key;
|
|
856
784
|
this.level = level;
|
|
857
785
|
if (index != undefined)
|
|
858
786
|
this.index = index;
|
|
859
|
-
if (density != undefined)
|
|
860
|
-
this.density = density;
|
|
861
787
|
}
|
|
862
788
|
}
|
|
863
789
|
;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { getParam } from "./utils.internal.js";
|
|
2
|
+
export const debug = getParam("debugprogressive");
|
|
3
|
+
let debug_RenderWireframe;
|
|
4
|
+
export let debug_OverrideLodLevel = -1; // -1 is automatic
|
|
5
|
+
if (debug) {
|
|
6
|
+
let maxLevel = 6;
|
|
7
|
+
function debugToggleProgressive() {
|
|
8
|
+
debug_OverrideLodLevel += 1;
|
|
9
|
+
if (debug_OverrideLodLevel >= maxLevel) {
|
|
10
|
+
debug_OverrideLodLevel = -1;
|
|
11
|
+
}
|
|
12
|
+
console.log(`Toggle LOD level [${debug_OverrideLodLevel}]`);
|
|
13
|
+
}
|
|
14
|
+
window.addEventListener("keyup", evt => {
|
|
15
|
+
if (evt.key === "p")
|
|
16
|
+
debugToggleProgressive();
|
|
17
|
+
if (evt.key === "w") {
|
|
18
|
+
debug_RenderWireframe = !debug_RenderWireframe;
|
|
19
|
+
console.log(`Toggle wireframe [${debug_RenderWireframe}]`);
|
|
20
|
+
}
|
|
21
|
+
const pressedNumber = parseInt(evt.key);
|
|
22
|
+
if (!isNaN(pressedNumber) && pressedNumber >= 0) {
|
|
23
|
+
debug_OverrideLodLevel = pressedNumber;
|
|
24
|
+
console.log(`Set LOD level to [${debug_OverrideLodLevel}]`);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export function applyDebugSettings(material) {
|
|
29
|
+
if (!debug)
|
|
30
|
+
return;
|
|
31
|
+
if (Array.isArray(material)) {
|
|
32
|
+
for (const mat of material) {
|
|
33
|
+
applyDebugSettings(mat);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (material) {
|
|
37
|
+
if ("wireframe" in material) {
|
|
38
|
+
material.wireframe = debug_RenderWireframe === true;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
package/lib/lods_manager.d.ts
CHANGED
|
@@ -43,9 +43,14 @@ declare type LODChangedEventListener = (args: {
|
|
|
43
43
|
*/
|
|
44
44
|
export declare class LODsManager {
|
|
45
45
|
#private;
|
|
46
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Assign a function to draw debug lines for the LODs. This function will be called with the start and end position of the line and the color of the line when the `debugprogressive` query parameter is set.
|
|
47
48
|
*/
|
|
48
49
|
static debugDrawLine?: (a: Vector3, b: Vector3, color: number) => void;
|
|
50
|
+
/**
|
|
51
|
+
* Force override the LOD level for all objects in the scene
|
|
52
|
+
*/
|
|
53
|
+
static overrideGlobalLodLevel?: number;
|
|
49
54
|
/** @internal */
|
|
50
55
|
static getObjectLODState(object: Object3D): LOD_state | undefined;
|
|
51
56
|
static addPlugin(plugin: NEEDLE_progressive_plugin): void;
|
package/lib/lods_manager.js
CHANGED
|
@@ -4,6 +4,7 @@ import { createLoaders } from "./loaders.js";
|
|
|
4
4
|
import { getParam, isMobileDevice } from "./utils.internal.js";
|
|
5
5
|
import { plugins } from "./plugins/plugin.js";
|
|
6
6
|
import { getRaycastMesh } from "./utils.js";
|
|
7
|
+
import { applyDebugSettings, debug, debug_OverrideLodLevel } from "./lods.debug.js";
|
|
7
8
|
const debugProgressiveLoading = getParam("debugprogressive");
|
|
8
9
|
const suppressProgressiveLoading = getParam("noprogressive");
|
|
9
10
|
const $lodsManager = Symbol("Needle:LODSManager");
|
|
@@ -40,9 +41,14 @@ const levels = { mesh_lod: -1, texture_lod: -1 };
|
|
|
40
41
|
* ```
|
|
41
42
|
*/
|
|
42
43
|
export class LODsManager {
|
|
43
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Assign a function to draw debug lines for the LODs. This function will be called with the start and end position of the line and the color of the line when the `debugprogressive` query parameter is set.
|
|
44
46
|
*/
|
|
45
47
|
static debugDrawLine;
|
|
48
|
+
/**
|
|
49
|
+
* Force override the LOD level for all objects in the scene
|
|
50
|
+
*/
|
|
51
|
+
static overrideGlobalLodLevel;
|
|
46
52
|
/** @internal */
|
|
47
53
|
static getObjectLODState(object) {
|
|
48
54
|
return object[$lodstate];
|
|
@@ -305,17 +311,26 @@ export class LODsManager {
|
|
|
305
311
|
for (const plugin of plugins) {
|
|
306
312
|
plugin.onBeforeUpdateLOD?.(this.renderer, scene, camera, object);
|
|
307
313
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
314
|
+
const debugLodLevel = LODsManager.overrideGlobalLodLevel !== undefined ? LODsManager.overrideGlobalLodLevel : debug_OverrideLodLevel;
|
|
315
|
+
if (debugLodLevel >= 0) {
|
|
316
|
+
levels.mesh_lod = debugLodLevel;
|
|
317
|
+
levels.texture_lod = debugLodLevel;
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
this.calculateLodLevel(camera, object, state, desiredDensity, levels);
|
|
321
|
+
levels.mesh_lod = Math.round(levels.mesh_lod);
|
|
322
|
+
levels.texture_lod = Math.round(levels.texture_lod);
|
|
323
|
+
}
|
|
311
324
|
// we currently only support auto LOD changes for meshes
|
|
312
325
|
if (levels.mesh_lod >= 0) {
|
|
313
326
|
this.loadProgressiveMeshes(object, levels.mesh_lod);
|
|
314
327
|
}
|
|
315
328
|
// TODO: we currently can not switch texture lods because we need better caching for the textures internally (see copySettings in progressive + NE-4431)
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
329
|
+
if (object.material && levels.texture_lod >= 0) {
|
|
330
|
+
this.loadProgressiveTextures(object.material, levels.texture_lod);
|
|
331
|
+
}
|
|
332
|
+
if (debug && object.material && !object["isGizmo"]) {
|
|
333
|
+
applyDebugSettings(object.material);
|
|
319
334
|
}
|
|
320
335
|
for (const plugin of plugins) {
|
|
321
336
|
plugin.onAfterUpdatedLOD?.(this.renderer, scene, camera, object, levels);
|
|
@@ -435,8 +450,8 @@ export class LODsManager {
|
|
|
435
450
|
return mesh["DEBUG:LOD"];
|
|
436
451
|
}
|
|
437
452
|
// The mesh info contains also the density for all available LOD level so we can use this for selecting which level to show
|
|
438
|
-
const
|
|
439
|
-
const
|
|
453
|
+
const mesh_lods = NEEDLE_progressive.getMeshLODExtension(mesh.geometry)?.lods;
|
|
454
|
+
const primitive_index = NEEDLE_progressive.getPrimitiveIndex(mesh.geometry);
|
|
440
455
|
const has_mesh_lods = mesh_lods && mesh_lods.length > 0;
|
|
441
456
|
const texture_lods_minmax = NEEDLE_progressive.getMaterialMinMaxLODsCount(mesh.material);
|
|
442
457
|
const has_texture_lods = texture_lods_minmax?.min_count != Infinity && texture_lods_minmax.min_count > 0 && texture_lods_minmax.max_count > 0;
|
|
@@ -590,7 +605,8 @@ export class LODsManager {
|
|
|
590
605
|
// const framerate = this.context.time.smoothedFps;
|
|
591
606
|
if (mesh_lods && state.lastScreenCoverage > 0) {
|
|
592
607
|
for (let l = 0; l < mesh_lods.length; l++) {
|
|
593
|
-
const
|
|
608
|
+
const lod = mesh_lods[l];
|
|
609
|
+
const densityForThisLevel = lod.densities?.[primitive_index] || lod.density || .00001;
|
|
594
610
|
const resultingDensity = densityForThisLevel / state.lastScreenCoverage;
|
|
595
611
|
if (resultingDensity < desiredDensity) {
|
|
596
612
|
expectedLevel = l;
|
package/lib/plugins/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { WebGLRenderer, Scene, Camera, Mesh } from 'three';
|
|
2
|
-
import {
|
|
2
|
+
import { NEEDLE_ext_progressive_mesh } from '../extension.js';
|
|
3
3
|
/**
|
|
4
4
|
* This interface is used to define a plugin for the progressive extension. It can be registered using the `registerPlugin` function.
|
|
5
5
|
*/
|
|
@@ -12,7 +12,7 @@ export interface NEEDLE_progressive_plugin {
|
|
|
12
12
|
texture_lod: number;
|
|
13
13
|
}): void;
|
|
14
14
|
/** Called when a new mesh is registered */
|
|
15
|
-
onRegisteredNewMesh?(mesh: Mesh, ext:
|
|
15
|
+
onRegisteredNewMesh?(mesh: Mesh, ext: NEEDLE_ext_progressive_mesh): void;
|
|
16
16
|
/** Called before the LOD mesh is fetched */
|
|
17
17
|
onBeforeGetLODMesh?(mesh: Mesh, level: number): void;
|
|
18
18
|
}
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@needle-tools/gltf-progressive",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-rc.f23cbbb",
|
|
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": {
|
|
@@ -72,4 +72,4 @@
|
|
|
72
72
|
"vite": "<= 4.3.9"
|
|
73
73
|
},
|
|
74
74
|
"types": "./lib/index.d.ts"
|
|
75
|
-
}
|
|
75
|
+
}
|