@forgeax/engine-runtime 0.1.26 → 0.1.27
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": "@forgeax/engine-runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.27",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -26,37 +26,37 @@
|
|
|
26
26
|
"LICENSE"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@forgeax/engine-animation": "0.1.
|
|
30
|
-
"@forgeax/engine-assets-runtime": "0.1.
|
|
31
|
-
"@forgeax/engine-audio-webaudio": "0.1.
|
|
32
|
-
"@forgeax/engine-codec": "0.1.
|
|
33
|
-
"@forgeax/engine-debug-draw": "0.1.
|
|
34
|
-
"@forgeax/engine-ecs": "0.1.
|
|
35
|
-
"@forgeax/engine-font": "0.1.
|
|
36
|
-
"@forgeax/engine-geometry": "0.1.
|
|
37
|
-
"@forgeax/engine-graphics-extras": "0.1.
|
|
38
|
-
"@forgeax/engine-image": "0.1.
|
|
39
|
-
"@forgeax/engine-input": "0.1.
|
|
40
|
-
"@forgeax/engine-math": "0.1.
|
|
41
|
-
"@forgeax/engine-pack": "0.1.
|
|
42
|
-
"@forgeax/engine-profiler": "0.1.
|
|
43
|
-
"@forgeax/engine-render": "0.1.
|
|
44
|
-
"@forgeax/engine-render-graph": "0.1.
|
|
45
|
-
"@forgeax/engine-rhi": "0.1.
|
|
46
|
-
"@forgeax/engine-rhi-null": "0.1.
|
|
47
|
-
"@forgeax/engine-rhi-webgpu": "0.1.
|
|
48
|
-
"@forgeax/engine-rhi-wgpu": "0.1.
|
|
49
|
-
"@forgeax/engine-scene": "0.1.
|
|
50
|
-
"@forgeax/engine-shader": "0.1.
|
|
51
|
-
"@forgeax/engine-skinning": "0.1.
|
|
52
|
-
"@forgeax/engine-types": "0.1.
|
|
53
|
-
"@forgeax/engine-vfx": "0.1.
|
|
29
|
+
"@forgeax/engine-animation": "0.1.27",
|
|
30
|
+
"@forgeax/engine-assets-runtime": "0.1.27",
|
|
31
|
+
"@forgeax/engine-audio-webaudio": "0.1.27",
|
|
32
|
+
"@forgeax/engine-codec": "0.1.27",
|
|
33
|
+
"@forgeax/engine-debug-draw": "0.1.27",
|
|
34
|
+
"@forgeax/engine-ecs": "0.1.27",
|
|
35
|
+
"@forgeax/engine-font": "0.1.27",
|
|
36
|
+
"@forgeax/engine-geometry": "0.1.27",
|
|
37
|
+
"@forgeax/engine-graphics-extras": "0.1.27",
|
|
38
|
+
"@forgeax/engine-image": "0.1.27",
|
|
39
|
+
"@forgeax/engine-input": "0.1.27",
|
|
40
|
+
"@forgeax/engine-math": "0.1.27",
|
|
41
|
+
"@forgeax/engine-pack": "0.1.27",
|
|
42
|
+
"@forgeax/engine-profiler": "0.1.27",
|
|
43
|
+
"@forgeax/engine-render": "0.1.27",
|
|
44
|
+
"@forgeax/engine-render-graph": "0.1.27",
|
|
45
|
+
"@forgeax/engine-rhi": "0.1.27",
|
|
46
|
+
"@forgeax/engine-rhi-null": "0.1.27",
|
|
47
|
+
"@forgeax/engine-rhi-webgpu": "0.1.27",
|
|
48
|
+
"@forgeax/engine-rhi-wgpu": "0.1.27",
|
|
49
|
+
"@forgeax/engine-scene": "0.1.27",
|
|
50
|
+
"@forgeax/engine-shader": "0.1.27",
|
|
51
|
+
"@forgeax/engine-skinning": "0.1.27",
|
|
52
|
+
"@forgeax/engine-types": "0.1.27",
|
|
53
|
+
"@forgeax/engine-vfx": "0.1.27"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@forgeax/engine-import": "0.1.
|
|
57
|
-
"@forgeax/engine-naga": "0.1.
|
|
58
|
-
"@forgeax/engine-state": "0.1.
|
|
59
|
-
"@forgeax/engine-vite-plugin-shader": "0.1.
|
|
56
|
+
"@forgeax/engine-import": "0.1.27",
|
|
57
|
+
"@forgeax/engine-naga": "0.1.27",
|
|
58
|
+
"@forgeax/engine-state": "0.1.27",
|
|
59
|
+
"@forgeax/engine-vite-plugin-shader": "0.1.27",
|
|
60
60
|
"@types/node": "^20.14.0"
|
|
61
61
|
},
|
|
62
62
|
"forgeax": {
|
|
@@ -105,6 +105,7 @@ import type {
|
|
|
105
105
|
} from '@forgeax/engine-types';
|
|
106
106
|
import { toShared } from '@forgeax/engine-types';
|
|
107
107
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from 'vitest';
|
|
108
|
+
import { componentId } from '../../../ecs/src/component';
|
|
108
109
|
import { worldInternal } from '../../../ecs/src/world-internal';
|
|
109
110
|
import {
|
|
110
111
|
SPRITE_PLAYBACK_MODE_CLAMP,
|
|
@@ -489,7 +490,10 @@ type __MergedKeep =
|
|
|
489
490
|
if (archetype === undefined || record === undefined) throw new Error('child row missing');
|
|
490
491
|
const tableRow = archetype.rows[record.archetypeRow];
|
|
491
492
|
if (tableRow === undefined) throw new Error('child table row missing');
|
|
492
|
-
world[worldInternal].
|
|
493
|
+
const table = world[worldInternal].getGraph().tables[archetype.tableId];
|
|
494
|
+
const parentColumn = table?.storage.get(componentId(ChildOf))?.fields.get('parent');
|
|
495
|
+
if (parentColumn === undefined) throw new Error('ChildOf.parent column missing');
|
|
496
|
+
parentColumn.view[tableRow] = ghost as number;
|
|
493
497
|
|
|
494
498
|
const r = propagateTransforms(world);
|
|
495
499
|
expect(r.ok).toBe(false);
|
|
@@ -25,6 +25,7 @@ import { World } from '@forgeax/engine-ecs';
|
|
|
25
25
|
import { readRenderArrayView } from '@forgeax/engine-ecs/projection';
|
|
26
26
|
import { ChildOf, GlobalTransform, propagateTransforms, Transform } from '@forgeax/engine-scene';
|
|
27
27
|
import { describe, expect, it } from 'vitest';
|
|
28
|
+
import { componentId } from '../../../ecs/src/component';
|
|
28
29
|
import { worldInternal } from '../../../ecs/src/world-internal';
|
|
29
30
|
import { TileLayer, Tilemap } from '../../../render/src/components';
|
|
30
31
|
|
|
@@ -258,7 +259,10 @@ describe('propagate-transforms.dawn - root-down DFS + stale ChildOf fail-fast (A
|
|
|
258
259
|
if (archetype === undefined || record === undefined) throw new Error('orphan row missing');
|
|
259
260
|
const tableRow = archetype.rows[record.archetypeRow];
|
|
260
261
|
if (tableRow === undefined) throw new Error('orphan table row missing');
|
|
261
|
-
world[worldInternal].
|
|
262
|
+
const table = world[worldInternal].getGraph().tables[archetype.tableId];
|
|
263
|
+
const parentColumn = table?.storage.get(componentId(ChildOf))?.fields.get('parent');
|
|
264
|
+
if (parentColumn === undefined) throw new Error('ChildOf.parent column missing');
|
|
265
|
+
parentColumn.view[tableRow] = ghost as number;
|
|
262
266
|
|
|
263
267
|
const r = propagateTransforms(world);
|
|
264
268
|
expect(r.ok).toBe(false);
|
|
@@ -13,6 +13,7 @@ import { AssetGuid } from '@forgeax/engine-pack/guid';
|
|
|
13
13
|
import {
|
|
14
14
|
Camera,
|
|
15
15
|
DirectionalLight,
|
|
16
|
+
Materials,
|
|
16
17
|
MeshFilter,
|
|
17
18
|
MeshRenderer,
|
|
18
19
|
PointLight,
|
|
@@ -284,6 +285,52 @@ import { makeMockShaderRegistry } from './helpers/mock-shader-registry';
|
|
|
284
285
|
);
|
|
285
286
|
});
|
|
286
287
|
|
|
288
|
+
it('keeps custom Standard Surface fields in the extracted material ABI', () => {
|
|
289
|
+
const world = new World();
|
|
290
|
+
spawnCamera(world);
|
|
291
|
+
const assets = new AssetRegistry(makeMockShaderRegistry());
|
|
292
|
+
const mesh = registerMesh(world);
|
|
293
|
+
const material = world.allocSharedRef<'MaterialAsset', MaterialAsset>(
|
|
294
|
+
'MaterialAsset',
|
|
295
|
+
Materials.standard({
|
|
296
|
+
surfaceModule: 'game_3d::rusted_iron_surface',
|
|
297
|
+
parameters: [
|
|
298
|
+
{ name: 'ironColor', type: 'color' },
|
|
299
|
+
{ name: 'rustDark', type: 'color' },
|
|
300
|
+
{ name: 'rustBright', type: 'color' },
|
|
301
|
+
{ name: 'noiseScale', type: 'f32' },
|
|
302
|
+
],
|
|
303
|
+
values: {
|
|
304
|
+
ironColor: [0.4, 0.45, 0.47, 1],
|
|
305
|
+
rustDark: [0.42, 0.085, 0.018, 1],
|
|
306
|
+
rustBright: [0.95, 0.34, 0.055, 1],
|
|
307
|
+
noiseScale: 1.85,
|
|
308
|
+
},
|
|
309
|
+
}),
|
|
310
|
+
);
|
|
311
|
+
world
|
|
312
|
+
.spawn(
|
|
313
|
+
{ component: Transform, data: { ...identity(), pos: [0, 0, -2] } },
|
|
314
|
+
{ component: MeshFilter, data: { assetHandle: mesh } },
|
|
315
|
+
{ component: MeshRenderer, data: { materials: [material] } },
|
|
316
|
+
)
|
|
317
|
+
.unwrap();
|
|
318
|
+
|
|
319
|
+
const frame = extractFrame(world, prepareExtractContext(world, { assets }));
|
|
320
|
+
const snapshot = frame.renderables[0]?.material;
|
|
321
|
+
const schemaNames = snapshot?.materialParamSchema?.map((entry) => entry.name) ?? [];
|
|
322
|
+
|
|
323
|
+
expect(schemaNames).toEqual(
|
|
324
|
+
expect.arrayContaining(['ironColor', 'rustDark', 'rustBright', 'noiseScale']),
|
|
325
|
+
);
|
|
326
|
+
expect(snapshot?.paramSnapshot).toMatchObject({
|
|
327
|
+
ironColor: [0.4, 0.45, 0.47].map(srgbChannelToLinear).concat(1),
|
|
328
|
+
rustDark: [0.42, 0.085, 0.018].map(srgbChannelToLinear).concat(1),
|
|
329
|
+
rustBright: [0.95, 0.34, 0.055].map(srgbChannelToLinear).concat(1),
|
|
330
|
+
noiseScale: 1.85,
|
|
331
|
+
});
|
|
332
|
+
});
|
|
333
|
+
|
|
287
334
|
it('mesh-walk: RenderableSnapshot.transform.world is the resolved world mat4 (parent x child), zero per-snapshot compose', () => {
|
|
288
335
|
const world = new World();
|
|
289
336
|
world
|