@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.
- package/dist/contract.d.ts +19 -0
- package/dist/contract.d.ts.map +1 -0
- package/dist/contract.js +19 -0
- package/dist/contract.js.map +1 -0
- package/dist/index.d.ts +1 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -18
- package/dist/index.js.map +1 -1
- package/dist/wgpuAdapterCapabilities.d.ts +1 -1
- package/dist/wgpuAdapterCapabilities.d.ts.map +1 -1
- package/dist/wgpuBackground.d.ts +1 -1
- package/dist/wgpuBackground.d.ts.map +1 -1
- package/dist/wgpuCompressedTexture.d.ts +1 -1
- package/dist/wgpuCompressedTexture.d.ts.map +1 -1
- package/dist/wgpuDraw.d.ts +6 -6
- package/dist/wgpuDraw.d.ts.map +1 -1
- package/dist/wgpuDraw.js +48 -30
- package/dist/wgpuDraw.js.map +1 -1
- package/dist/wgpuFullscreenPass.d.ts +1 -1
- package/dist/wgpuFullscreenPass.d.ts.map +1 -1
- package/dist/wgpuMaterialRegistry.d.ts +1 -1
- package/dist/wgpuMaterialRegistry.d.ts.map +1 -1
- package/dist/wgpuMaterialRegistry.js +3 -3
- package/dist/wgpuMaterialRegistry.js.map +1 -1
- package/dist/wgpuMipmap.d.ts +1 -1
- package/dist/wgpuMipmap.d.ts.map +1 -1
- package/dist/wgpuRenderState.d.ts +1 -1
- package/dist/wgpuRenderState.d.ts.map +1 -1
- package/dist/wgpuRenderState.js +6 -5
- package/dist/wgpuRenderState.js.map +1 -1
- package/dist/wgpuRenderTarget.d.ts +1 -1
- package/dist/wgpuRenderTarget.d.ts.map +1 -1
- package/dist/wgpuRenderTarget.js +2 -2
- package/dist/wgpuRenderTarget.js.map +1 -1
- package/dist/wgpuRenderTargetPool.d.ts +1 -1
- package/dist/wgpuRenderTargetPool.d.ts.map +1 -1
- package/dist/wgpuRenderTargetPool.js.map +1 -1
- package/dist/wgpuScissor.d.ts +1 -1
- package/dist/wgpuScissor.d.ts.map +1 -1
- package/dist/wgpuShader.d.ts +3 -3
- package/dist/wgpuShader.d.ts.map +1 -1
- package/dist/wgpuShader.js +27 -27
- package/dist/wgpuShader.js.map +1 -1
- package/dist/wgpuShaderBinding.d.ts +1 -1
- package/dist/wgpuShaderBinding.d.ts.map +1 -1
- package/dist/wgpuShaderBinding.js +1 -1
- package/dist/wgpuShaderBinding.js.map +1 -1
- package/dist/wgpuShaderRegistry.d.ts +1 -1
- package/dist/wgpuShaderRegistry.d.ts.map +1 -1
- package/dist/wgpuShaderRegistry.js +1 -1
- package/dist/wgpuShaderRegistry.js.map +1 -1
- package/dist/wgpuSurface.d.ts +1 -1
- package/dist/wgpuSurface.d.ts.map +1 -1
- package/dist/wgpuSurface.js +1 -1
- package/dist/wgpuSurface.js.map +1 -1
- package/dist/wgpuTestHelper.d.ts +1 -1
- package/dist/wgpuTestHelper.d.ts.map +1 -1
- package/dist/wgpuTextureUpload.d.ts +1 -1
- package/dist/wgpuTextureUpload.d.ts.map +1 -1
- package/package.json +11 -7
- package/src/wgpuCompressedTexture.test.ts +1 -1
- package/src/wgpuDraw.test.ts +25 -19
- package/src/wgpuMaterialRegistry.test.ts +4 -4
- package/src/wgpuMipmap.test.ts +1 -1
- package/src/wgpuRenderTarget.test.ts +1 -1
- package/src/wgpuShader.test.ts +8 -8
- package/src/wgpuShaderBinding.test.ts +3 -3
- package/src/wgpuShaderRegistry.test.ts +1 -1
- package/src/wgpuTextureUpload.test.ts +1 -1
package/src/wgpuShader.test.ts
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
178
|
-
|
|
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
|
-
|
|
192
|
-
|
|
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
|
-
|
|
212
|
-
|
|
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';
|