@woosh/meep-engine 2.43.50 → 2.43.51
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.
|
@@ -32,6 +32,25 @@ test("createConnection returns a number", () => {
|
|
|
32
32
|
expect(typeof g.createConnection(i0, pOut, i1, pInt)).toBe('number');
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
+
test("createConnection populates NodeInstance.connections", () => {
|
|
36
|
+
const node = new NodeDescription();
|
|
37
|
+
|
|
38
|
+
const dt = new DataType();
|
|
39
|
+
|
|
40
|
+
const pInt = node.createPort(dt, "in", PortDirection.In);
|
|
41
|
+
const pOut = node.createPort(dt, "out", PortDirection.Out);
|
|
42
|
+
|
|
43
|
+
const g = new NodeGraph();
|
|
44
|
+
|
|
45
|
+
const i0 = g.createNode(node);
|
|
46
|
+
const i1 = g.createNode(node);
|
|
47
|
+
|
|
48
|
+
g.createConnection(i0, pOut, i1, pInt);
|
|
49
|
+
|
|
50
|
+
expect(g.getNode(i0).connections.length).toBe(1);
|
|
51
|
+
expect(g.getNode(i1).connections.length).toBe(1);
|
|
52
|
+
});
|
|
53
|
+
|
|
35
54
|
test('getNode produces correct result', () => {
|
|
36
55
|
const graph = new NodeGraph();
|
|
37
56
|
|
|
@@ -10,6 +10,7 @@ import { Sampler2D } from "../../../texture/sampler/Sampler2D.js";
|
|
|
10
10
|
import { GameAssetType } from "../../../../asset/GameAssetType.js";
|
|
11
11
|
import { assert } from "../../../../../core/assert.js";
|
|
12
12
|
import { AsyncLoadingCache } from "../../../../../core/collection/map/AsyncLoadingCache.js";
|
|
13
|
+
import { copy_Sampler2D_channel_data } from "../../../texture/sampler/copy_Sampler2D_channel_data.js";
|
|
13
14
|
|
|
14
15
|
const placeholder_texture = Sampler2D.uint8(4, 1, 1);
|
|
15
16
|
placeholder_texture.data.fill(255);
|
|
@@ -167,7 +168,19 @@ export class FPDecalSystem extends AbstractContextSystem {
|
|
|
167
168
|
* @private
|
|
168
169
|
*/
|
|
169
170
|
this.__texture_cache = new AsyncLoadingCache(new Map(), (key) => {
|
|
170
|
-
return this.__assets.promise(key, GameAssetType.Image).then(asset =>
|
|
171
|
+
return this.__assets.promise(key, GameAssetType.Image).then(asset => {
|
|
172
|
+
const asset_sampler = asset.create();
|
|
173
|
+
|
|
174
|
+
if (asset_sampler.itemSize === 4) {
|
|
175
|
+
return asset_sampler;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
const resampled = Sampler2D.uint8(4, asset_sampler.width, asset_sampler.height);
|
|
179
|
+
|
|
180
|
+
copy_Sampler2D_channel_data(asset_sampler, resampled);
|
|
181
|
+
|
|
182
|
+
return resampled;
|
|
183
|
+
});
|
|
171
184
|
});
|
|
172
185
|
|
|
173
186
|
/**
|
|
@@ -287,7 +287,8 @@ function makeNormalTestGridDecal(ecd, root_transform = new Transform()) {
|
|
|
287
287
|
|
|
288
288
|
const decal = new Decal();
|
|
289
289
|
|
|
290
|
-
decal.uri = decal_urls[1];
|
|
290
|
+
// decal.uri = decal_urls[1];
|
|
291
|
+
decal.uri ='moicon/ISO 7010 - Safety Signs (3)/ISO 7010 - Safety Signs/Emergency/400px/E001 – Emergency exit (left hand).png';
|
|
291
292
|
|
|
292
293
|
const entity = new EntityBuilder();
|
|
293
294
|
|
|
@@ -44,7 +44,7 @@ export function copy_Sampler2D_channel_data(source, destination) {
|
|
|
44
44
|
destination_data[i4 + 1] = source_data[i3 + 1];
|
|
45
45
|
destination_data[i4 + 2] = source_data[i3 + 2];
|
|
46
46
|
|
|
47
|
-
destination_data[i4] = 255; // fill alpha
|
|
47
|
+
destination_data[i4 + 3] = 255; // fill alpha
|
|
48
48
|
}
|
|
49
49
|
} else if (source_item_size === 2 && destination_item_size === 4) {
|
|
50
50
|
//RA -> RGBA
|
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.43.
|
|
8
|
+
"version": "2.43.51",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"gl-matrix": "3.4.3",
|
|
11
11
|
"fast-levenshtein": "2.0.6",
|