@flighthq/render-wgpu 0.3.1-next.733.f1845ac → 0.3.1-next.794.0bfc53e

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": "@flighthq/render-wgpu",
3
- "version": "0.3.1-next.733.f1845ac",
3
+ "version": "0.3.1-next.794.0bfc53e",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,17 +38,17 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/color": "0.3.1-next.733.f1845ac",
42
- "@flighthq/entity": "0.3.1-next.733.f1845ac",
43
- "@flighthq/scene2d": "0.3.1-next.733.f1845ac",
44
- "@flighthq/geometry": "0.3.1-next.733.f1845ac",
45
- "@flighthq/log": "0.3.1-next.733.f1845ac",
46
- "@flighthq/render": "0.3.1-next.733.f1845ac",
47
- "@flighthq/registry": "0.3.1-next.733.f1845ac",
48
- "@flighthq/signals": "0.3.1-next.733.f1845ac",
49
- "@flighthq/bitmap": "0.3.1-next.733.f1845ac",
50
- "@flighthq/texture": "0.3.1-next.733.f1845ac",
51
- "@flighthq/types": "0.3.1-next.733.f1845ac"
41
+ "@flighthq/color": "0.3.1-next.794.0bfc53e",
42
+ "@flighthq/entity": "0.3.1-next.794.0bfc53e",
43
+ "@flighthq/scene2d": "0.3.1-next.794.0bfc53e",
44
+ "@flighthq/geometry": "0.3.1-next.794.0bfc53e",
45
+ "@flighthq/log": "0.3.1-next.794.0bfc53e",
46
+ "@flighthq/render": "0.3.1-next.794.0bfc53e",
47
+ "@flighthq/registry": "0.3.1-next.794.0bfc53e",
48
+ "@flighthq/signals": "0.3.1-next.794.0bfc53e",
49
+ "@flighthq/bitmap": "0.3.1-next.794.0bfc53e",
50
+ "@flighthq/texture": "0.3.1-next.794.0bfc53e",
51
+ "@flighthq/types": "0.3.1-next.794.0bfc53e"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@webgpu/types": "^0.1.70"
@@ -17,6 +17,7 @@ import {
17
17
  import { createDisplayObject } from '@flighthq/scene2d/contract';
18
18
  import type {
19
19
  RenderEffectPaddingResolver,
20
+ RenderRootGuard,
20
21
  RenderState,
21
22
  WgpuColorAdjustmentMaterialFeature,
22
23
  WgpuColorAdjustmentMaterialFeatureGuard,
@@ -139,6 +140,7 @@ describe('createWgpuOffscreenRenderState', () => {
139
140
  resolveFlush: vi.fn(() => null),
140
141
  };
141
142
  const colorAdjustmentFeatureGuard: WgpuColorAdjustmentMaterialFeatureGuard = vi.fn();
143
+ const renderRootGuard: RenderRootGuard = vi.fn();
142
144
  registerRenderer(screen, 'acme.Node', renderer);
143
145
  registerWgpuMaterialRenderer(screen, 'acme.Material', materialRenderer);
144
146
  registerWgpuTextureResolver(screen, 'acme.Texture', textureResolver);
@@ -157,6 +159,12 @@ describe('createWgpuOffscreenRenderState', () => {
157
159
  registry: 'WgpuColorAdjustmentFeatureGuard',
158
160
  shape: 'slot',
159
161
  };
162
+ getWgpuRenderStateRuntime(screen).registries.renderRootGuard = {
163
+ entry: { state: RegistryEntryState.Bound, value: renderRootGuard },
164
+ onMiss: 'Disabled',
165
+ registry: 'RenderRootGuard',
166
+ shape: 'slot',
167
+ };
160
168
  getWgpuRenderStateRuntime(screen).registries.renderEffects = withRegistryTableEntry(
161
169
  getWgpuRenderStateRuntime(screen).registries.renderEffects,
162
170
  'acme.Effect',
@@ -203,6 +211,21 @@ describe('createWgpuOffscreenRenderState', () => {
203
211
  expect(getColorAdjustmentUnsupportedGuard(screen)).toBeNull();
204
212
  expect(offscreenRuntime.registries.colorAdjustmentUnsupportedGuard).toBe(sharedUnsupportedGuard);
205
213
  expect(getColorAdjustmentUnsupportedGuard(offscreen)).not.toBeNull();
214
+ expect(offscreenRuntime.registries.renderRootGuard).toBe(screenRuntime.registries.renderRootGuard);
215
+ expect(offscreenRuntime.registries.renderRootGuard?.entry).toEqual({
216
+ state: RegistryEntryState.Bound,
217
+ value: renderRootGuard,
218
+ });
219
+ const sharedRenderRootGuard = offscreenRuntime.registries.renderRootGuard;
220
+ screenRuntime.registries.renderRootGuard = undefined;
221
+ expect(screenRuntime.registries.renderRootGuard).toBeUndefined();
222
+ expect(offscreenRuntime.registries.renderRootGuard).toBe(sharedRenderRootGuard);
223
+ expect(
224
+ getRegistryTableEntry(
225
+ offscreenRuntime.registries.renderRootGuard!,
226
+ offscreenRuntime.registries.renderRootGuard!.registry,
227
+ ),
228
+ ).toBe(renderRootGuard);
206
229
  expect(offscreenRuntime.registries.compressedTextureDecoder).toBe(
207
230
  screenRuntime.registries.compressedTextureDecoder,
208
231
  );