@flighthq/scene3d-wgpu 0.3.0-next.1383.c61de17 → 0.3.0-next.1392.f0bd0cc

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/scene3d-wgpu",
3
- "version": "0.3.0-next.1383.c61de17",
3
+ "version": "0.3.0-next.1392.f0bd0cc",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/flighthq/flight.git",
@@ -36,20 +36,20 @@
36
36
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
37
37
  },
38
38
  "dependencies": {
39
- "@flighthq/camera": "0.3.0-next.1383.c61de17",
40
- "@flighthq/color": "0.3.0-next.1383.c61de17",
41
- "@flighthq/geometry": "0.3.0-next.1383.c61de17",
42
- "@flighthq/image": "0.3.0-next.1383.c61de17",
43
- "@flighthq/lighting": "0.3.0-next.1383.c61de17",
44
- "@flighthq/log": "0.3.0-next.1383.c61de17",
45
- "@flighthq/materials": "0.3.0-next.1383.c61de17",
46
- "@flighthq/node": "0.3.0-next.1383.c61de17",
47
- "@flighthq/render": "0.3.0-next.1383.c61de17",
48
- "@flighthq/render-wgpu": "0.3.0-next.1383.c61de17",
49
- "@flighthq/scene3d": "0.3.0-next.1383.c61de17",
50
- "@flighthq/shading": "0.3.0-next.1383.c61de17",
51
- "@flighthq/texture": "0.3.0-next.1383.c61de17",
52
- "@flighthq/types": "0.3.0-next.1383.c61de17"
39
+ "@flighthq/camera": "0.3.0-next.1392.f0bd0cc",
40
+ "@flighthq/color": "0.3.0-next.1392.f0bd0cc",
41
+ "@flighthq/geometry": "0.3.0-next.1392.f0bd0cc",
42
+ "@flighthq/image": "0.3.0-next.1392.f0bd0cc",
43
+ "@flighthq/lighting": "0.3.0-next.1392.f0bd0cc",
44
+ "@flighthq/log": "0.3.0-next.1392.f0bd0cc",
45
+ "@flighthq/materials": "0.3.0-next.1392.f0bd0cc",
46
+ "@flighthq/node": "0.3.0-next.1392.f0bd0cc",
47
+ "@flighthq/render": "0.3.0-next.1392.f0bd0cc",
48
+ "@flighthq/render-wgpu": "0.3.0-next.1392.f0bd0cc",
49
+ "@flighthq/scene3d": "0.3.0-next.1392.f0bd0cc",
50
+ "@flighthq/shading": "0.3.0-next.1392.f0bd0cc",
51
+ "@flighthq/texture": "0.3.0-next.1392.f0bd0cc",
52
+ "@flighthq/types": "0.3.0-next.1392.f0bd0cc"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@flighthq/mesh": "*",
@@ -172,10 +172,13 @@ describe('customShaderWgpuMeshMaterialRenderer', () => {
172
172
  });
173
173
 
174
174
  function makeImageResource(version: number): Image {
175
+ const source = document.createElement('canvas');
176
+ source.width = 1;
177
+ source.height = 1;
175
178
  return {
176
179
  height: 1,
177
180
  kind: ImageTextureSourceKind,
178
- source: {} as CanvasImageSource,
181
+ source,
179
182
  version,
180
183
  width: 1,
181
184
  } as unknown as Image;
@@ -55,8 +55,14 @@ describe('unlitWgpuMeshMaterialRenderer', () => {
55
55
  it('uploads a ready dynamic video map into the color-map slot', () => {
56
56
  const { fake, state } = makeWgpuScene3DState();
57
57
  const material = createUnlitMaterial();
58
+ const element = document.createElement('video');
59
+ Object.defineProperties(element, {
60
+ readyState: { value: 4 },
61
+ videoHeight: { value: 120 },
62
+ videoWidth: { value: 160 },
63
+ });
58
64
  material.baseColorMap = createVideoTexture({
59
- element: { readyState: 4, videoHeight: 120, videoWidth: 160 } as HTMLVideoElement,
65
+ element,
60
66
  objectUrl: null,
61
67
  });
62
68
  advanceVideoTexture(material.baseColorMap);
@@ -10,10 +10,13 @@ import { makeWgpuScene3DState } from './wgpuScene3DTestHelper';
10
10
  // and the "no complete cube" sentinel path callers depend on to no-op — mirroring scene-gl's cube test.
11
11
 
12
12
  function completeEnvironment(): Environment {
13
+ const source = document.createElement('canvas');
14
+ source.width = 4;
15
+ source.height = 4;
13
16
  const face = {
14
17
  height: 4,
15
18
  kind: ImageTextureSourceKind,
16
- source: {} as CanvasImageSource,
19
+ source,
17
20
  width: 4,
18
21
  } as unknown as Image;
19
22
  const cube = {
@@ -11,10 +11,13 @@ import { makeWgpuScene3DState } from './wgpuScene3DTestHelper';
11
11
  // scene-gl's bake test.
12
12
 
13
13
  function completeEnvironment(): Environment {
14
+ const source = document.createElement('canvas');
15
+ source.width = 4;
16
+ source.height = 4;
14
17
  const face = {
15
18
  height: 4,
16
19
  kind: ImageTextureSourceKind,
17
- source: {} as CanvasImageSource,
20
+ source,
18
21
  width: 4,
19
22
  } as unknown as Image;
20
23
  const cube = {
@@ -14,10 +14,13 @@ function makeCamera(): Camera3D {
14
14
  }
15
15
 
16
16
  function completeEnvironment(): Environment {
17
+ const source = document.createElement('canvas');
18
+ source.width = 4;
19
+ source.height = 4;
17
20
  const face = {
18
21
  height: 4,
19
22
  kind: ImageTextureSourceKind,
20
- source: {} as CanvasImageSource,
23
+ source,
21
24
  width: 4,
22
25
  } as unknown as Image;
23
26
  const cube = {
@@ -428,10 +428,13 @@ describe('shaded binding cache', () => {
428
428
  });
429
429
 
430
430
  function makeImageResource(): Image {
431
+ const source = document.createElement('canvas');
432
+ source.width = 1;
433
+ source.height = 1;
431
434
  return {
432
435
  height: 1,
433
436
  kind: ImageTextureSourceKind,
434
- source: {} as CanvasImageSource,
437
+ source,
435
438
  version: 0,
436
439
  width: 1,
437
440
  } as unknown as Image;
@@ -33,8 +33,14 @@ describe('bindWgpuUnlitVideoSurface', () => {
33
33
  it('uploads the ready video frame into the same unlit material layout', () => {
34
34
  const { fake, state } = makeWgpuScene3DState();
35
35
  const pipeline = compileWgpuUnlitPipeline(state, { ...FLAT, hasColorMap: true }, 'bgra8unorm');
36
+ const element = document.createElement('video');
37
+ Object.defineProperties(element, {
38
+ readyState: { value: 4 },
39
+ videoHeight: { value: 120 },
40
+ videoWidth: { value: 160 },
41
+ });
36
42
  const video = createVideoTexture({
37
- element: { readyState: 4, videoHeight: 120, videoWidth: 160 } as HTMLVideoElement,
43
+ element,
38
44
  objectUrl: null,
39
45
  });
40
46
  advanceVideoTexture(video);