@flighthq/render-wgpu 0.2.1-next.840.857425c → 0.3.0-next.906.07cea63

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.
Files changed (69) hide show
  1. package/dist/contract.d.ts +19 -0
  2. package/dist/contract.d.ts.map +1 -0
  3. package/dist/contract.js +19 -0
  4. package/dist/contract.js.map +1 -0
  5. package/dist/index.d.ts +1 -18
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +1 -18
  8. package/dist/index.js.map +1 -1
  9. package/dist/wgpuAdapterCapabilities.d.ts +1 -1
  10. package/dist/wgpuAdapterCapabilities.d.ts.map +1 -1
  11. package/dist/wgpuBackground.d.ts +1 -1
  12. package/dist/wgpuBackground.d.ts.map +1 -1
  13. package/dist/wgpuCompressedTexture.d.ts +1 -1
  14. package/dist/wgpuCompressedTexture.d.ts.map +1 -1
  15. package/dist/wgpuDraw.d.ts +6 -6
  16. package/dist/wgpuDraw.d.ts.map +1 -1
  17. package/dist/wgpuDraw.js +48 -30
  18. package/dist/wgpuDraw.js.map +1 -1
  19. package/dist/wgpuFullscreenPass.d.ts +1 -1
  20. package/dist/wgpuFullscreenPass.d.ts.map +1 -1
  21. package/dist/wgpuMaterialRegistry.d.ts +1 -1
  22. package/dist/wgpuMaterialRegistry.d.ts.map +1 -1
  23. package/dist/wgpuMaterialRegistry.js +3 -3
  24. package/dist/wgpuMaterialRegistry.js.map +1 -1
  25. package/dist/wgpuMipmap.d.ts +1 -1
  26. package/dist/wgpuMipmap.d.ts.map +1 -1
  27. package/dist/wgpuRenderState.d.ts +1 -1
  28. package/dist/wgpuRenderState.d.ts.map +1 -1
  29. package/dist/wgpuRenderState.js +6 -5
  30. package/dist/wgpuRenderState.js.map +1 -1
  31. package/dist/wgpuRenderTarget.d.ts +1 -1
  32. package/dist/wgpuRenderTarget.d.ts.map +1 -1
  33. package/dist/wgpuRenderTarget.js +2 -2
  34. package/dist/wgpuRenderTarget.js.map +1 -1
  35. package/dist/wgpuRenderTargetPool.d.ts +1 -1
  36. package/dist/wgpuRenderTargetPool.d.ts.map +1 -1
  37. package/dist/wgpuRenderTargetPool.js.map +1 -1
  38. package/dist/wgpuScissor.d.ts +1 -1
  39. package/dist/wgpuScissor.d.ts.map +1 -1
  40. package/dist/wgpuShader.d.ts +3 -3
  41. package/dist/wgpuShader.d.ts.map +1 -1
  42. package/dist/wgpuShader.js +27 -27
  43. package/dist/wgpuShader.js.map +1 -1
  44. package/dist/wgpuShaderBinding.d.ts +1 -1
  45. package/dist/wgpuShaderBinding.d.ts.map +1 -1
  46. package/dist/wgpuShaderBinding.js +1 -1
  47. package/dist/wgpuShaderBinding.js.map +1 -1
  48. package/dist/wgpuShaderRegistry.d.ts +1 -1
  49. package/dist/wgpuShaderRegistry.d.ts.map +1 -1
  50. package/dist/wgpuShaderRegistry.js +1 -1
  51. package/dist/wgpuShaderRegistry.js.map +1 -1
  52. package/dist/wgpuSurface.d.ts +1 -1
  53. package/dist/wgpuSurface.d.ts.map +1 -1
  54. package/dist/wgpuSurface.js +1 -1
  55. package/dist/wgpuSurface.js.map +1 -1
  56. package/dist/wgpuTestHelper.d.ts +1 -1
  57. package/dist/wgpuTestHelper.d.ts.map +1 -1
  58. package/dist/wgpuTextureUpload.d.ts +1 -1
  59. package/dist/wgpuTextureUpload.d.ts.map +1 -1
  60. package/package.json +11 -7
  61. package/src/wgpuCompressedTexture.test.ts +1 -1
  62. package/src/wgpuDraw.test.ts +25 -19
  63. package/src/wgpuMaterialRegistry.test.ts +4 -4
  64. package/src/wgpuMipmap.test.ts +1 -1
  65. package/src/wgpuRenderTarget.test.ts +1 -1
  66. package/src/wgpuShader.test.ts +8 -8
  67. package/src/wgpuShaderBinding.test.ts +3 -3
  68. package/src/wgpuShaderRegistry.test.ts +1 -1
  69. package/src/wgpuTextureUpload.test.ts +1 -1
@@ -1,4 +1,4 @@
1
- import { AdvancedBlendMode, BlendMode } from '@flighthq/types';
1
+ import { AdvancedBlendMode, BlendMode } from '@flighthq/types/contract';
2
2
 
3
3
  import { renderWgpuBackground } from './wgpuBackground';
4
4
  import { getWgpuRenderStateRuntime } from './wgpuRenderState';
@@ -159,7 +159,7 @@ describe('writeWgpuMatrixOnlyUniforms', () => {
159
159
  const runtime = getWgpuRenderStateRuntime(state);
160
160
  renderWgpuBackground(state);
161
161
  const before = runtime.uniformOffset;
162
- const fakeNode = { alpha: 1, useColorTransform: false, colorTransform: null };
162
+ const fakeNode = { alpha: 1, useColorScaleBias: false, colorScaleBias: null };
163
163
  const t = { a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0 };
164
164
  writeWgpuMatrixOnlyUniforms(state, fakeNode as never, t, 0, 0, 10, 10, 0, 0, 1, 1);
165
165
  expect(runtime.uniformOffset).toBe(before + runtime.uniformStride);
@@ -174,8 +174,8 @@ describe('writeWgpuQuadUniforms', () => {
174
174
  const before = runtime.uniformOffset;
175
175
  const fakeNode = {
176
176
  alpha: 1,
177
- useColorTransform: false,
178
- colorTransform: null,
177
+ useColorScaleBias: false,
178
+ colorScaleBias: null,
179
179
  transform2D: { a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0 },
180
180
  };
181
181
  writeWgpuQuadUniforms(state, fakeNode, null, 0, 0, 100, 100, 0, 0, 1, 1);
@@ -188,8 +188,8 @@ describe('writeWgpuQuadUniforms', () => {
188
188
  renderWgpuBackground(state);
189
189
  const fakeNode = {
190
190
  alpha: 0.5,
191
- useColorTransform: false,
192
- colorTransform: null,
191
+ useColorScaleBias: false,
192
+ colorScaleBias: null,
193
193
  transform2D: { a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0 },
194
194
  };
195
195
  const offset = writeWgpuQuadUniforms(state, fakeNode, null, 10, 20, 30, 40, 0.1, 0.2, 0.9, 0.8);
@@ -208,8 +208,8 @@ describe('writeWgpuQuadUniforms', () => {
208
208
  renderWgpuBackground(state);
209
209
  const fakeNode = {
210
210
  alpha: 1,
211
- useColorTransform: false,
212
- colorTransform: null,
211
+ useColorScaleBias: false,
212
+ colorScaleBias: null,
213
213
  transform2D: { a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0 },
214
214
  };
215
215
 
@@ -1,6 +1,6 @@
1
- import { getOrCreateRenderProxy2D } from '@flighthq/render';
2
- import { createBitmap } from '@flighthq/scene2d';
3
- import type { WgpuBitmapShader } from '@flighthq/types';
1
+ import { getOrCreateRenderProxy2D } from '@flighthq/render/contract';
2
+ import { createBitmap } from '@flighthq/scene2d/contract';
3
+ import type { WgpuBitmapShader } from '@flighthq/types/contract';
4
4
 
5
5
  import { getWgpuRenderStateRuntime } from './wgpuRenderState';
6
6
  import { getWgpuShader, resolveWgpuShader, setWgpuShader } from './wgpuShaderBinding';
@@ -1,4 +1,4 @@
1
- import type { WgpuBitmapShader } from '@flighthq/types';
1
+ import type { WgpuBitmapShader } from '@flighthq/types/contract';
2
2
 
3
3
  import { getWgpuRenderStateRuntime } from './wgpuRenderState';
4
4
  import { registerWgpuBitmapShader } from './wgpuShaderRegistry';
@@ -1,4 +1,4 @@
1
- import type { ImageResource } from '@flighthq/types';
1
+ import type { ImageResource } from '@flighthq/types/contract';
2
2
 
3
3
  import { uploadWgpuTextureData, uploadWgpuTextureElement, uploadWgpuTextureImageResource } from './wgpuTextureUpload';
4
4