@flighthq/camera 0.5.1-next.3269.831c174 → 0.5.1-next.3302.76ece6b

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/README.md CHANGED
@@ -13,5 +13,5 @@ Import the supported application-facing API from `@flighthq/camera`. The `@fligh
13
13
  This package is part of the locked-version Flight SDK graph. Applications may instead install and import `@flighthq/sdk` when package-level tree shaking is sufficient.
14
14
 
15
15
  - [Flight project](https://github.com/flighthq/flight)
16
- - [Source for @flighthq/camera@0.5.1-next.3269.831c174](https://github.com/flighthq/flight/tree/831c174bfb28953d8f2cebaefa5a2743e35045e3/packages/camera)
17
- - [License](https://github.com/flighthq/flight/blob/831c174bfb28953d8f2cebaefa5a2743e35045e3/LICENSE.md)
16
+ - [Source for @flighthq/camera@0.5.1-next.3302.76ece6b](https://github.com/flighthq/flight/tree/76ece6bee38e3d07816f341b7f017bfcec3e8e29/packages/camera)
17
+ - [License](https://github.com/flighthq/flight/blob/76ece6bee38e3d07816f341b7f017bfcec3e8e29/LICENSE.md)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flighthq/camera",
3
- "version": "0.5.1-next.3269.831c174",
3
+ "version": "0.5.1-next.3302.76ece6b",
4
4
  "author": "Joshua Granick and other contributors",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -38,10 +38,10 @@
38
38
  "clean:dist": "tsx ../../scripts/clean-package-dist.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@flighthq/entity": "0.5.1-next.3269.831c174",
42
- "@flighthq/geometry": "0.5.1-next.3269.831c174",
43
- "@flighthq/log": "0.5.1-next.3269.831c174",
44
- "@flighthq/types": "0.5.1-next.3269.831c174"
41
+ "@flighthq/entity": "0.5.1-next.3302.76ece6b",
42
+ "@flighthq/geometry": "0.5.1-next.3302.76ece6b",
43
+ "@flighthq/log": "0.5.1-next.3302.76ece6b",
44
+ "@flighthq/types": "0.5.1-next.3302.76ece6b"
45
45
  },
46
46
  "devDependencies": {
47
47
  "typescript": "^5.3.0"
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  createMatrix4,
3
+ createMatrix4FromValues,
3
4
  createPlane,
4
5
  createVector3,
5
6
  inverseMatrix4,
@@ -237,7 +238,10 @@ describe('setCamera3DViewGuard', () => {
237
238
  projection: createPerspectiveProjection({ aspect: 1, fovY: 1 }),
238
239
  });
239
240
  expect(seen).toEqual([]);
240
- setCamera3DViewMatrix4FromMatrix4(camera, createMatrix4(4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1));
241
+ setCamera3DViewMatrix4FromMatrix4(
242
+ camera,
243
+ createMatrix4FromValues(4, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1),
244
+ );
241
245
  expect(seen).toEqual([4]);
242
246
  } finally {
243
247
  setCamera3DViewGuard(null);
@@ -1,4 +1,4 @@
1
- import { createMatrix4, createRectangle } from '@flighthq/geometry/contract';
1
+ import { createMatrix4, createMatrix4FromValues, createRectangle } from '@flighthq/geometry/contract';
2
2
  import { clearLogOnceKeys, setLogSink } from '@flighthq/log/contract';
3
3
  import type { Camera2D, LogEntry } from '@flighthq/types/contract';
4
4
  import { afterEach, describe, expect, test } from 'vitest';
@@ -49,7 +49,10 @@ describe('enableCameraGuards', () => {
49
49
  near: 0.1,
50
50
  projection: createPerspectiveProjection({ aspect: 1, fovY: 1 }),
51
51
  });
52
- setCamera3DViewMatrix4FromMatrix4(camera, createMatrix4(3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1));
52
+ setCamera3DViewMatrix4FromMatrix4(
53
+ camera,
54
+ createMatrix4FromValues(3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1),
55
+ );
53
56
  });
54
57
  expect(entries).toHaveLength(1);
55
58
  expect(String((entries[0].data as { message: string }).message)).toContain('not orthonormal');
@@ -65,7 +68,10 @@ describe('enableCameraGuards', () => {
65
68
  near: 0.1,
66
69
  projection: createPerspectiveProjection({ aspect: 1, fovY: 1 }),
67
70
  });
68
- setCamera3DViewMatrix4FromMatrix4(camera, createMatrix4(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 3, 4, 1));
71
+ setCamera3DViewMatrix4FromMatrix4(
72
+ camera,
73
+ createMatrix4FromValues(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 3, 4, 1),
74
+ );
69
75
  });
70
76
  expect(entries).toHaveLength(0);
71
77
  });
@@ -1,4 +1,4 @@
1
- import { createMatrix4 } from '@flighthq/geometry/contract';
1
+ import { createMatrix4, createMatrix4FromValues } from '@flighthq/geometry/contract';
2
2
  import { describe, expect, test } from 'vitest';
3
3
 
4
4
  import { createCamera3D, setCamera3DViewMatrix4FromLookAt, setCamera3DViewMatrix4FromMatrix4 } from './camera.ts';
@@ -20,7 +20,7 @@ describe('explainCamera3DView', () => {
20
20
  // transpose is lost. It must not be reported as a violation.
21
21
  test('accepts a reflection view and reports it as one', () => {
22
22
  const camera = perspectiveCamera();
23
- setCamera3DViewMatrix4FromMatrix4(camera, createMatrix4(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5, 7, 9, 1));
23
+ setCamera3DViewMatrix4FromMatrix4(camera, createMatrix4FromValues(-1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5, 7, 9, 1));
24
24
  const explanation = explainCamera3DView(camera);
25
25
  expect(explanation.isOrthonormal).toBe(true);
26
26
  expect(explanation.isReflection).toBe(true);
@@ -29,7 +29,7 @@ describe('explainCamera3DView', () => {
29
29
 
30
30
  test('reports a scaled view as non-orthonormal, with the deviation', () => {
31
31
  const camera = perspectiveCamera();
32
- setCamera3DViewMatrix4FromMatrix4(camera, createMatrix4(2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1));
32
+ setCamera3DViewMatrix4FromMatrix4(camera, createMatrix4FromValues(2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1));
33
33
  const explanation = explainCamera3DView(camera);
34
34
  expect(explanation.isOrthonormal).toBe(false);
35
35
  expect(explanation.scaleDeviation).toBeCloseTo(1, 6);
@@ -37,7 +37,10 @@ describe('explainCamera3DView', () => {
37
37
 
38
38
  test('reports a sheared view as non-orthonormal', () => {
39
39
  const camera = perspectiveCamera();
40
- setCamera3DViewMatrix4FromMatrix4(camera, createMatrix4(1, 0, 0, 0, 0.5, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1));
40
+ setCamera3DViewMatrix4FromMatrix4(
41
+ camera,
42
+ createMatrix4FromValues(1, 0, 0, 0, 0.5, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1),
43
+ );
41
44
  const explanation = explainCamera3DView(camera);
42
45
  expect(explanation.isOrthonormal).toBe(false);
43
46
  expect(explanation.shearDeviation).toBeGreaterThan(0.1);