@loaders.gl/tile-converter 5.0.0-alpha.4 → 5.0.0-alpha.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/tile-converter",
3
- "version": "5.0.0-alpha.4",
3
+ "version": "5.0.0-alpha.6",
4
4
  "description": "Converter",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -51,24 +51,24 @@
51
51
  "copy-certificates": "cp -R src/i3s-server/certs dist/i3s-server"
52
52
  },
53
53
  "dependencies": {
54
- "@loaders.gl/3d-tiles": "5.0.0-alpha.4",
55
- "@loaders.gl/compression": "5.0.0-alpha.4",
56
- "@loaders.gl/crypto": "5.0.0-alpha.4",
57
- "@loaders.gl/draco": "5.0.0-alpha.4",
58
- "@loaders.gl/gltf": "5.0.0-alpha.4",
59
- "@loaders.gl/i3s": "5.0.0-alpha.4",
60
- "@loaders.gl/images": "5.0.0-alpha.4",
61
- "@loaders.gl/loader-utils": "5.0.0-alpha.4",
62
- "@loaders.gl/polyfills": "5.0.0-alpha.4",
63
- "@loaders.gl/textures": "5.0.0-alpha.4",
64
- "@loaders.gl/tiles": "5.0.0-alpha.4",
65
- "@loaders.gl/worker-utils": "5.0.0-alpha.4",
66
- "@loaders.gl/zip": "5.0.0-alpha.4",
67
- "@math.gl/core": "^4.1.0",
68
- "@math.gl/culling": "^4.1.0",
69
- "@math.gl/geoid": "^4.1.0",
70
- "@math.gl/geometry-utils": "4.2.0-alpha.6",
71
- "@math.gl/geospatial": "^4.1.0",
54
+ "@loaders.gl/3d-tiles": "5.0.0-alpha.6",
55
+ "@loaders.gl/compression": "5.0.0-alpha.6",
56
+ "@loaders.gl/crypto": "5.0.0-alpha.6",
57
+ "@loaders.gl/draco": "5.0.0-alpha.6",
58
+ "@loaders.gl/gltf": "5.0.0-alpha.6",
59
+ "@loaders.gl/i3s": "5.0.0-alpha.6",
60
+ "@loaders.gl/images": "5.0.0-alpha.6",
61
+ "@loaders.gl/loader-utils": "5.0.0-alpha.6",
62
+ "@loaders.gl/polyfills": "5.0.0-alpha.6",
63
+ "@loaders.gl/textures": "5.0.0-alpha.6",
64
+ "@loaders.gl/tiles": "5.0.0-alpha.6",
65
+ "@loaders.gl/worker-utils": "5.0.0-alpha.6",
66
+ "@loaders.gl/zip": "5.0.0-alpha.6",
67
+ "@math.gl/core": "5.0.0-alpha.5",
68
+ "@math.gl/culling": "5.0.0-alpha.5",
69
+ "@math.gl/geoid": "5.0.0-alpha.5",
70
+ "@math.gl/geometry-utils": "5.0.0-alpha.5",
71
+ "@math.gl/geospatial": "5.0.0-alpha.5",
72
72
  "ajv": "^8.12.0",
73
73
  "archiver": "^5.0.0",
74
74
  "cors": "^2.8.5",
@@ -93,5 +93,5 @@
93
93
  "peerDependencies": {
94
94
  "@loaders.gl/core": "~5.0.0-alpha.0"
95
95
  },
96
- "gitHead": "470a9cf1956b8326c92015b314f4ad8a10a3517c"
96
+ "gitHead": "9b9ea7738e0fe63e55c19c136283705f99e0b9bf"
97
97
  }
@@ -1056,7 +1056,7 @@ async function mergeMaterials(
1056
1056
  * @param sourceMaterial - material object
1057
1057
  * @returns I3S material definition and texture
1058
1058
  */
1059
- function convertMaterial(sourceMaterial: GLTFMaterialPostprocessed): I3SMaterialWithTexture {
1059
+ export function convertMaterial(sourceMaterial: GLTFMaterialPostprocessed): I3SMaterialWithTexture {
1060
1060
  const material: I3SMaterialDefinition = {
1061
1061
  doubleSided: sourceMaterial.doubleSided,
1062
1062
  emissiveFactor: sourceMaterial.emissiveFactor?.map(c => Math.round(c * 255)) as [
@@ -1069,9 +1069,9 @@ function convertMaterial(sourceMaterial: GLTFMaterialPostprocessed): I3SMaterial
1069
1069
  alphaMode: convertAlphaMode(sourceMaterial.alphaMode),
1070
1070
  pbrMetallicRoughness: {
1071
1071
  roughnessFactor:
1072
- sourceMaterial?.pbrMetallicRoughness?.roughnessFactor || DEFAULT_ROUGHNESS_FACTOR,
1072
+ sourceMaterial?.pbrMetallicRoughness?.roughnessFactor ?? DEFAULT_ROUGHNESS_FACTOR,
1073
1073
  metallicFactor:
1074
- sourceMaterial?.pbrMetallicRoughness?.metallicFactor || DEFAULT_METALLIC_FACTOR
1074
+ sourceMaterial?.pbrMetallicRoughness?.metallicFactor ?? DEFAULT_METALLIC_FACTOR
1075
1075
  }
1076
1076
  };
1077
1077
 
@@ -1095,6 +1095,8 @@ function convertMaterial(sourceMaterial: GLTFMaterialPostprocessed): I3SMaterial
1095
1095
  // Should use default baseColorFactor if it is not present in source material
1096
1096
  // https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#reference-pbrmetallicroughness
1097
1097
  const baseColorFactor = sourceMaterial?.pbrMetallicRoughness?.baseColorFactor;
1098
+ // This converter's I3S storage path uses byte-style color values; the I3S loader normalizes
1099
+ // them when creating the glTF-compatible material consumed by deck/luma.
1098
1100
  material.pbrMetallicRoughness.baseColorFactor =
1099
1101
  ((baseColorFactor && baseColorFactor.map(c => Math.round(c * 255))) as [
1100
1102
  number,