@babylonjs/loaders 9.31.0 → 9.31.1
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/SPLAT/gaussianSplattingDownloadManager.d.ts +10 -9
- package/SPLAT/gaussianSplattingDownloadManager.js +64 -53
- package/SPLAT/gaussianSplattingDownloadManager.js.map +1 -1
- package/SPLAT/gaussianSplattingResidencyPages.d.ts +49 -0
- package/SPLAT/gaussianSplattingResidencyPages.js +93 -0
- package/SPLAT/gaussianSplattingResidencyPages.js.map +1 -0
- package/SPLAT/gaussianSplattingStream.d.ts +154 -15
- package/SPLAT/gaussianSplattingStream.js +407 -25
- package/SPLAT/gaussianSplattingStream.js.map +1 -1
- package/SPLAT/gaussianSplattingWorkBuffer.d.ts +3 -1
- package/SPLAT/gaussianSplattingWorkBuffer.js +51 -14
- package/SPLAT/gaussianSplattingWorkBuffer.js.map +1 -1
- package/SPLAT/gaussianSplattingWorkBufferShaders.d.ts +6 -6
- package/SPLAT/gaussianSplattingWorkBufferShaders.js +12 -6
- package/SPLAT/gaussianSplattingWorkBufferShaders.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.pure.js +24 -9
- package/glTF/2.0/Extensions/KHR_animation_pointer.data.pure.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.d.ts +6 -1
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js +66 -40
- package/glTF/2.0/Extensions/KHR_interactivity/declarationMapper.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphDelayReferenceBlock.d.ts +26 -0
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphDelayReferenceBlock.js +44 -0
- package/glTF/2.0/Extensions/KHR_interactivity/flowGraphDelayReferenceBlock.js.map +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/index.d.ts +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/index.js +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/index.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphExporter.js +7 -1
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphExporter.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.d.ts +2 -1
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.js +75 -6
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphModel.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.d.ts +9 -0
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js +35 -5
- package/glTF/2.0/Extensions/KHR_interactivity/interactivityGraphParser.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity/pure.d.ts +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/pure.js +1 -0
- package/glTF/2.0/Extensions/KHR_interactivity/pure.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_interactivity.pure.js +27 -6
- package/glTF/2.0/Extensions/KHR_interactivity.pure.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js +2 -0
- package/glTF/2.0/Extensions/KHR_node_hoverability.pure.js.map +1 -1
- package/glTF/2.0/Extensions/KHR_node_selectability.pure.js +11 -0
- package/glTF/2.0/Extensions/KHR_node_selectability.pure.js.map +1 -1
- package/glTF/2.0/Extensions/gltfAreaLightDimensions.d.ts +26 -0
- package/glTF/2.0/Extensions/gltfAreaLightDimensions.js +49 -0
- package/glTF/2.0/Extensions/gltfAreaLightDimensions.js.map +1 -0
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.js +3 -0
- package/glTF/2.0/Extensions/gltfPathToObjectConverter.js.map +1 -1
- package/glTF/2.0/Extensions/interactivityAssetPathToObjectConverter.d.ts +1 -1
- package/glTF/2.0/Extensions/interactivityAssetPathToObjectConverter.js +5 -2
- package/glTF/2.0/Extensions/interactivityAssetPathToObjectConverter.js.map +1 -1
- package/glTF/2.0/Extensions/interactivityRefPathToObjectConverter.js +1 -2
- package/glTF/2.0/Extensions/interactivityRefPathToObjectConverter.js.map +1 -1
- package/glTF/2.0/Extensions/objectModelMapping.d.ts +16 -13
- package/glTF/2.0/Extensions/objectModelMapping.js +157 -108
- package/glTF/2.0/Extensions/objectModelMapping.js.map +1 -1
- package/glTF/2.0/glTFLoaderInterfaces.d.ts +2 -0
- package/glTF/2.0/glTFLoaderInterfaces.js.map +1 -1
- package/package.json +3 -3
|
@@ -180,8 +180,10 @@ export declare class GaussianSplattingWorkBuffer {
|
|
|
180
180
|
* dispose the source pack textures after this resolves.
|
|
181
181
|
* @param pack the SOG texture pack (GPU source textures + per-file decode parameters)
|
|
182
182
|
* @param offset first splat index (pixel offset) for this file in the work buffer
|
|
183
|
+
* @param sourceOffset first splat of the pack to decode, defaults to 0
|
|
184
|
+
* @param count number of splats to decode, defaults to the rest of the pack
|
|
183
185
|
*/
|
|
184
|
-
decodeAsync(pack: ISogTexturePack, offset: number): Promise<void>;
|
|
186
|
+
decodeAsync(pack: ISogTexturePack, offset: number, sourceOffset?: number, count?: number): Promise<void>;
|
|
185
187
|
/**
|
|
186
188
|
* Whether the relayout copy shader is compiled and ready. Lazily creates the copy material on first call.
|
|
187
189
|
* Callers should poll this before {@link relayoutSync} (which must only run when ready).
|
|
@@ -404,21 +404,42 @@ export class GaussianSplattingWorkBuffer {
|
|
|
404
404
|
* dispose the source pack textures after this resolves.
|
|
405
405
|
* @param pack the SOG texture pack (GPU source textures + per-file decode parameters)
|
|
406
406
|
* @param offset first splat index (pixel offset) for this file in the work buffer
|
|
407
|
+
* @param sourceOffset first splat of the pack to decode, defaults to 0
|
|
408
|
+
* @param count number of splats to decode, defaults to the rest of the pack
|
|
407
409
|
*/
|
|
408
|
-
async decodeAsync(pack, offset) {
|
|
410
|
+
async decodeAsync(pack, offset, sourceOffset, count) {
|
|
409
411
|
if (this._disposed) {
|
|
410
412
|
return;
|
|
411
413
|
}
|
|
412
|
-
|
|
414
|
+
const first = sourceOffset ?? 0;
|
|
415
|
+
const n = count ?? pack.splatCount - first;
|
|
416
|
+
if (sourceOffset !== undefined || count !== undefined) {
|
|
417
|
+
if (!Number.isSafeInteger(pack.splatCount) ||
|
|
418
|
+
pack.splatCount < 0 ||
|
|
419
|
+
!Number.isSafeInteger(first) ||
|
|
420
|
+
first < 0 ||
|
|
421
|
+
!Number.isSafeInteger(n) ||
|
|
422
|
+
n < 0 ||
|
|
423
|
+
first + n > pack.splatCount ||
|
|
424
|
+
!Number.isSafeInteger(offset) ||
|
|
425
|
+
offset < 0 ||
|
|
426
|
+
offset + n > this._capacity) {
|
|
427
|
+
throw new RangeError("GaussianSplattingWorkBuffer: invalid source or destination decode range.");
|
|
428
|
+
}
|
|
429
|
+
if (n === 0) {
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
this._applyPack(pack, first, n);
|
|
413
434
|
// When SH is enabled, bake EVERY file's region — even a file with no higher-order SH (a coarse LOD may drop
|
|
414
435
|
// it): those get uCoeffs=0 so the whole region neutral-fills (128), keeping mixed-degree files consistent.
|
|
415
436
|
const decodeSh = this._shMaterial !== null && this._shMrts.length > 0;
|
|
416
437
|
if (decodeSh) {
|
|
417
|
-
this._applyShPack(pack);
|
|
438
|
+
this._applyShPack(pack, first, n);
|
|
418
439
|
}
|
|
419
440
|
const decodeRot = this._rotMaterial !== null && this._rotMrt !== null;
|
|
420
441
|
if (decodeRot) {
|
|
421
|
-
this._applyRotPack(pack);
|
|
442
|
+
this._applyRotPack(pack, first, n);
|
|
422
443
|
}
|
|
423
444
|
// Render the decode pass at the start of a frame (the safe point for custom render targets),
|
|
424
445
|
// once the shader is compiled — never re-entrantly from a promise/observable continuation.
|
|
@@ -447,7 +468,7 @@ export class GaussianSplattingWorkBuffer {
|
|
|
447
468
|
this._rotMaterial.setInt("uOffset", globalOffset);
|
|
448
469
|
}
|
|
449
470
|
const firstRow = Math.floor(globalOffset / width);
|
|
450
|
-
const rowCount = Math.max(1, Math.ceil((globalOffset +
|
|
471
|
+
const rowCount = Math.max(1, Math.ceil((globalOffset + n) / width) - firstRow);
|
|
451
472
|
const engine = this._scene.getEngine();
|
|
452
473
|
engine.enableScissor(0, firstRow, width, rowCount);
|
|
453
474
|
try {
|
|
@@ -908,7 +929,20 @@ export class GaussianSplattingWorkBuffer {
|
|
|
908
929
|
fragmentSource: isWGSL ? GaussianSplattingWorkBufferFragmentShaderWGSL : GaussianSplattingWorkBufferFragmentShaderGLSL,
|
|
909
930
|
}, {
|
|
910
931
|
attributes: ["position"],
|
|
911
|
-
uniforms: [
|
|
932
|
+
uniforms: [
|
|
933
|
+
"sogMeansMin",
|
|
934
|
+
"sogMeansMax",
|
|
935
|
+
"sogScalesMin",
|
|
936
|
+
"sogScalesMax",
|
|
937
|
+
"sogSh0Min",
|
|
938
|
+
"sogSh0Max",
|
|
939
|
+
"uVersion",
|
|
940
|
+
"uOffset",
|
|
941
|
+
"uSourceOffset",
|
|
942
|
+
"uCount",
|
|
943
|
+
"uDestWidth",
|
|
944
|
+
"uSrcWidth",
|
|
945
|
+
],
|
|
912
946
|
samplers: ["sogMeansLTex", "sogMeansUTex", "sogScalesTex", "sogQuatsTex", "sogSh0Tex", "sogCodebookTex"],
|
|
913
947
|
shaderLanguage: this._shaderLanguage,
|
|
914
948
|
});
|
|
@@ -916,7 +950,7 @@ export class GaussianSplattingWorkBuffer {
|
|
|
916
950
|
material.disableDepthWrite = true;
|
|
917
951
|
return material;
|
|
918
952
|
}
|
|
919
|
-
_applyPack(pack) {
|
|
953
|
+
_applyPack(pack, sourceOffset, count) {
|
|
920
954
|
const material = this._material;
|
|
921
955
|
const srcWidth = pack.meansTextureL.getSize().width;
|
|
922
956
|
material.setTexture("sogMeansLTex", pack.meansTextureL);
|
|
@@ -938,7 +972,8 @@ export class GaussianSplattingWorkBuffer {
|
|
|
938
972
|
material.setVector4("sogSh0Max", new Vector4(c0Max[0], c0Max[1], c0Max[2], c0Max[3]));
|
|
939
973
|
material.setInt("uVersion", pack.version);
|
|
940
974
|
// uOffset is bound at render time in decodeAsync (from the live _baseOffset).
|
|
941
|
-
material.setInt("
|
|
975
|
+
material.setInt("uSourceOffset", sourceOffset);
|
|
976
|
+
material.setInt("uCount", count);
|
|
942
977
|
material.setInt("uDestWidth", this._textureSize);
|
|
943
978
|
material.setInt("uSrcWidth", srcWidth);
|
|
944
979
|
}
|
|
@@ -949,7 +984,7 @@ export class GaussianSplattingWorkBuffer {
|
|
|
949
984
|
fragmentSource: isWGSL ? GaussianSplattingWorkBufferShDecodeFragmentShaderWGSL : GaussianSplattingWorkBufferShDecodeFragmentShaderGLSL,
|
|
950
985
|
}, {
|
|
951
986
|
attributes: ["position"],
|
|
952
|
-
uniforms: ["sogShnMin", "sogShnMax", "uVersion", "uOffset", "uCount", "uDestWidth", "uSrcWidth", "uCoeffs", "uShTextureIndex"],
|
|
987
|
+
uniforms: ["sogShnMin", "sogShnMax", "uVersion", "uOffset", "uSourceOffset", "uCount", "uDestWidth", "uSrcWidth", "uCoeffs", "uShTextureIndex"],
|
|
953
988
|
samplers: ["sogShLabelsTex", "sogShCentroidsTex", "sogCodebookTex"],
|
|
954
989
|
shaderLanguage: this._shaderLanguage,
|
|
955
990
|
});
|
|
@@ -957,7 +992,7 @@ export class GaussianSplattingWorkBuffer {
|
|
|
957
992
|
material.disableDepthWrite = true;
|
|
958
993
|
return material;
|
|
959
994
|
}
|
|
960
|
-
_applyShPack(pack) {
|
|
995
|
+
_applyShPack(pack, sourceOffset, count) {
|
|
961
996
|
const material = this._shMaterial;
|
|
962
997
|
// A file may carry no higher-order SH (coarse LOD): fall back to sh0Texture as a harmless placeholder for the
|
|
963
998
|
// label/centroid samplers and set uCoeffs=0 so the shader neutral-fills every coefficient (128 -> 0 lighting).
|
|
@@ -972,7 +1007,8 @@ export class GaussianSplattingWorkBuffer {
|
|
|
972
1007
|
material.setFloat("sogShnMax", pack.shnMax ?? 0);
|
|
973
1008
|
material.setInt("uVersion", pack.version);
|
|
974
1009
|
// uOffset is bound at render time in decodeAsync (from the live _baseOffset).
|
|
975
|
-
material.setInt("
|
|
1010
|
+
material.setInt("uSourceOffset", sourceOffset);
|
|
1011
|
+
material.setInt("uCount", count);
|
|
976
1012
|
material.setInt("uDestWidth", this._textureSize);
|
|
977
1013
|
material.setInt("uSrcWidth", labels.getSize().width);
|
|
978
1014
|
// Higher-order coefficient count for THIS file (bands=3 -> 15). 0 when the file has no SH -> full neutral fill.
|
|
@@ -985,7 +1021,7 @@ export class GaussianSplattingWorkBuffer {
|
|
|
985
1021
|
fragmentSource: isWGSL ? GaussianSplattingWorkBufferRotationDecodeFragmentShaderWGSL : GaussianSplattingWorkBufferRotationDecodeFragmentShaderGLSL,
|
|
986
1022
|
}, {
|
|
987
1023
|
attributes: ["position"],
|
|
988
|
-
uniforms: ["sogScalesMin", "sogScalesMax", "uVersion", "uOffset", "uCount", "uDestWidth", "uSrcWidth"],
|
|
1024
|
+
uniforms: ["sogScalesMin", "sogScalesMax", "uVersion", "uOffset", "uSourceOffset", "uCount", "uDestWidth", "uSrcWidth"],
|
|
989
1025
|
samplers: ["sogScalesTex", "sogQuatsTex", "sogCodebookTex"],
|
|
990
1026
|
shaderLanguage: this._shaderLanguage,
|
|
991
1027
|
});
|
|
@@ -993,7 +1029,7 @@ export class GaussianSplattingWorkBuffer {
|
|
|
993
1029
|
material.disableDepthWrite = true;
|
|
994
1030
|
return material;
|
|
995
1031
|
}
|
|
996
|
-
_applyRotPack(pack) {
|
|
1032
|
+
_applyRotPack(pack, sourceOffset, count) {
|
|
997
1033
|
const material = this._rotMaterial;
|
|
998
1034
|
const srcWidth = pack.scalesTexture.getSize().width;
|
|
999
1035
|
material.setTexture("sogScalesTex", pack.scalesTexture);
|
|
@@ -1006,7 +1042,8 @@ export class GaussianSplattingWorkBuffer {
|
|
|
1006
1042
|
material.setVector3("sogScalesMax", new Vector3(sMax[0], sMax[1], sMax[2]));
|
|
1007
1043
|
material.setInt("uVersion", pack.version);
|
|
1008
1044
|
// uOffset is bound at render time in decodeAsync (from the live _baseOffset).
|
|
1009
|
-
material.setInt("
|
|
1045
|
+
material.setInt("uSourceOffset", sourceOffset);
|
|
1046
|
+
material.setInt("uCount", count);
|
|
1010
1047
|
material.setInt("uDestWidth", this._textureSize);
|
|
1011
1048
|
material.setInt("uSrcWidth", srcWidth);
|
|
1012
1049
|
}
|