@woosh/meep-engine 2.34.0 → 2.34.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.
@@ -46,32 +46,7 @@ export function loadLegacyTerrainSplats(description, mapping, am) {
46
46
 
47
47
  mapping.resize(width, height, 4);
48
48
 
49
-
50
- const weightData = mapping.weightData;
51
-
52
- const dataOffset = index * width * height;
53
-
54
- const sourceWidth = source.width;
55
- const sourceHeight = source.height;
56
-
57
- const source_max_y = sourceHeight - 1;
58
- const source_max_x = sourceWidth - 1;
59
-
60
- for (let y = 0; y < height; y++) {
61
- const v = y / height;
62
-
63
- for (let x = 0; x < width; x++) {
64
-
65
- const u = x / width;
66
-
67
- const targetIndex = y * width + x;
68
- const targetAddress = dataOffset + targetIndex;
69
-
70
- const value = source.sampleChannelBilinear(u * source_max_x, v * source_max_y, 0);
71
-
72
- weightData[targetAddress] = value;
73
- }
74
- }
49
+ mapping.writeLayerFromSampler(source, index, 0);
75
50
 
76
51
  });
77
52
  }
@@ -98,7 +98,16 @@ class GLTFAssetTransformer extends AssetTransformer {
98
98
 
99
99
  const base = computePathDirectory(ad.path);
100
100
 
101
- const micron_data = await this.__am.promise(`${base}/${micron_uri}`, ASSET_TYPE_ARRAY_BUFFER);
101
+ let micron_data;
102
+
103
+ const micron_path = `${base}/${micron_uri}`;
104
+
105
+ try {
106
+ micron_data = await this.__am.promise(micron_path, ASSET_TYPE_ARRAY_BUFFER);
107
+ } catch (e) {
108
+ console.error(`Failed to load micron geometry '${micron_path}' referenced in GLTF (will skip): ${e}`);
109
+ return;
110
+ }
102
111
 
103
112
  // deserialize micron data
104
113
  const buffer = BinaryBuffer.fromArrayBuffer(micron_data.create());
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "productName": "Meep",
6
6
  "description": "production-ready JavaScript game engine based on Entity Component System Architecture",
7
7
  "author": "Alexander Goldring",
8
- "version": "2.34.0",
8
+ "version": "2.34.1",
9
9
  "dependencies": {
10
10
  "gl-matrix": "3.4.3",
11
11
  "fast-levenshtein": "2.0.6",