@flighthq/render-wgpu 0.5.1-next.815.cc08b93 → 0.5.1-next.903.f434bc2

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 (55) hide show
  1. package/README.md +2 -2
  2. package/dist/contract.d.ts +6 -0
  3. package/dist/contract.d.ts.map +1 -1
  4. package/dist/contract.js +6 -0
  5. package/dist/contract.js.map +1 -1
  6. package/dist/wgpuCompressedTexture.d.ts +1 -1
  7. package/dist/wgpuCompressedTexture.d.ts.map +1 -1
  8. package/dist/wgpuCompressedTexture.js +12 -9
  9. package/dist/wgpuCompressedTexture.js.map +1 -1
  10. package/dist/wgpuDraw.d.ts +2 -1
  11. package/dist/wgpuDraw.d.ts.map +1 -1
  12. package/dist/wgpuDraw.js +47 -23
  13. package/dist/wgpuDraw.js.map +1 -1
  14. package/dist/wgpuExternalTexture.d.ts +3 -1
  15. package/dist/wgpuExternalTexture.d.ts.map +1 -1
  16. package/dist/wgpuExternalTexture.js +21 -14
  17. package/dist/wgpuExternalTexture.js.map +1 -1
  18. package/dist/wgpuFullscreenPass.d.ts +2 -1
  19. package/dist/wgpuFullscreenPass.d.ts.map +1 -1
  20. package/dist/wgpuFullscreenPass.js +49 -41
  21. package/dist/wgpuFullscreenPass.js.map +1 -1
  22. package/dist/wgpuHost.d.ts +2 -1
  23. package/dist/wgpuHost.d.ts.map +1 -1
  24. package/dist/wgpuHost.js +52 -46
  25. package/dist/wgpuHost.js.map +1 -1
  26. package/dist/wgpuPipeline.d.ts +2 -1
  27. package/dist/wgpuPipeline.d.ts.map +1 -1
  28. package/dist/wgpuPipeline.js +21 -17
  29. package/dist/wgpuPipeline.js.map +1 -1
  30. package/dist/wgpuRenderState.d.ts +9 -1
  31. package/dist/wgpuRenderState.d.ts.map +1 -1
  32. package/dist/wgpuRenderState.js +31 -6
  33. package/dist/wgpuRenderState.js.map +1 -1
  34. package/dist/wgpuRenderTarget.d.ts +2 -1
  35. package/dist/wgpuRenderTarget.d.ts.map +1 -1
  36. package/dist/wgpuRenderTarget.js +48 -43
  37. package/dist/wgpuRenderTarget.js.map +1 -1
  38. package/dist/wgpuRenderTargetPool.d.ts +2 -1
  39. package/dist/wgpuRenderTargetPool.d.ts.map +1 -1
  40. package/dist/wgpuRenderTargetPool.js +7 -2
  41. package/dist/wgpuRenderTargetPool.js.map +1 -1
  42. package/dist/wgpuRenderTexturePool.d.ts +2 -1
  43. package/dist/wgpuRenderTexturePool.d.ts.map +1 -1
  44. package/dist/wgpuRenderTexturePool.js +11 -8
  45. package/dist/wgpuRenderTexturePool.js.map +1 -1
  46. package/dist/wgpuShader.d.ts +2 -1
  47. package/dist/wgpuShader.d.ts.map +1 -1
  48. package/dist/wgpuShader.js +30 -24
  49. package/dist/wgpuShader.js.map +1 -1
  50. package/package.json +11 -11
  51. package/src/explainWgpuTextureResolution.test.ts +9 -2
  52. package/src/wgpuElement.test.ts +6 -2
  53. package/src/wgpuHost.test.ts +22 -8
  54. package/src/wgpuRenderState.test.ts +31 -20
  55. package/src/wgpuTextureResolver.test.ts +10 -10
@@ -1,6 +1,6 @@
1
- import { createEntity } from '@flighthq/entity/contract';
1
+ import { allocateEntity, finishEntity } from '@flighthq/entity/contract';
2
2
  import { getRegistryTableKeys } from '@flighthq/registry/contract';
3
- import type { ImageResource, RenderTexture, Texture, TextureSource } from '@flighthq/types/contract';
3
+ import type { ImageResource, RenderTarget, RenderTexture, Texture, TextureSource } from '@flighthq/types/contract';
4
4
  import {
5
5
  BitmapTextureSourceKind,
6
6
  CompressedImageTextureSourceKind,
@@ -73,14 +73,14 @@ function renderTexture(): RenderTexture {
73
73
  const texture = textureWithImage(null);
74
74
  texture.colorSpace = 'linear';
75
75
  if (texture.dimension !== '2d') throw new Error('test texture must be 2d');
76
- texture.source = createEntity({
77
- alphaType: 'straight' as const,
78
- gamut: 'srgb' as const,
79
- height: 8,
80
- kind: RenderTargetTextureSourceKind,
81
- version: 0,
82
- width: 8,
83
- });
76
+ const _entity = allocateEntity<RenderTarget>();
77
+ _entity.alphaType = 'straight' as const;
78
+ _entity.gamut = 'srgb' as const;
79
+ _entity.height = 8;
80
+ _entity.kind = RenderTargetTextureSourceKind;
81
+ _entity.version = 0;
82
+ _entity.width = 8;
83
+ texture.source = finishEntity(_entity);
84
84
  return texture as RenderTexture;
85
85
  }
86
86