@zappar/zappar-cv 3.11.0 → 3.12.0

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
@@ -18,8 +18,8 @@ npm i @zappar/zappar-cv
18
18
 
19
19
  You can use our CDN from within your HTML:
20
20
  ```
21
- <script src="https://libs.zappar.com/zappar-cv/3.11.0/zappar-cv.js"></script>
21
+ <script src="https://libs.zappar.com/zappar-cv/3.12.0/zappar-cv.js"></script>
22
22
  ```
23
23
 
24
24
  Or you can download and host our standalone JavaScript bundle:
25
- [https://libs.zappar.com/zappar-cv/3.11.0/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.11.0/zappar-cv.zip)
25
+ [https://libs.zappar.com/zappar-cv/3.12.0/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.12.0/zappar-cv.zip)
@@ -126,6 +126,7 @@ export interface zappar {
126
126
  camera_source_pause(o: zappar_camera_source_t): void;
127
127
  camera_source_profile_set(o: zappar_camera_source_t, profile: camera_profile_t): void;
128
128
  camera_source_preferred_resolution_set(o: zappar_camera_source_t, width: number, height: number): void;
129
+ camera_source_preferred_resolution_set_default(o: zappar_camera_source_t): void;
129
130
  sequence_source_create(pipeline: zappar_pipeline_t): zappar_sequence_source_t;
130
131
  sequence_source_destroy(o: zappar_sequence_source_t): void;
131
132
  sequence_source_start(o: zappar_sequence_source_t): void;
package/lib/native.js CHANGED
@@ -34,6 +34,7 @@ import { BridgedD3Tracker } from "./bridged-d3-tracker";
34
34
  import { BridgedCameraSource } from "./bridged-camera-source";
35
35
  import { WebXRCameraSource } from "./webxr-camera-source";
36
36
  import { WebXRWorldTracker } from "./webxr-world-tracker";
37
+ import { profile } from "./profile";
37
38
  let client;
38
39
  const pipelineByWorldTracker = new Map();
39
40
  const d3TrackerSizeById = new Map();
@@ -271,7 +272,7 @@ export function initialize(opts) {
271
272
  mat4.multiply(res, res, scale);
272
273
  }
273
274
  return res;
274
- }, loaded: () => loaded, camera_default_device_id: userFacing => userFacing ? CameraSource.USER_DEFAULT_DEVICE_ID : CameraSource.DEFAULT_DEVICE_ID, camera_source_create: (p, deviceId) => createCameraSource(p, deviceId, preferWebXRCamera), camera_source_destroy: cam => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.destroy(); }, camera_source_pause: cam => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.pause(); }, camera_source_start: cam => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.start(); }, camera_source_profile_set: (cam, p) => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.setProfile(p); }, camera_source_preferred_resolution_set: (cam, w, h) => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.setPreferredResolution(w, h); }, camera_count: () => 2, camera_id: indx => indx === 0 ? CameraSource.DEFAULT_DEVICE_ID : CameraSource.USER_DEFAULT_DEVICE_ID, camera_name: indx => indx === 0 ? "Rear-facing Camera" : "User-facing Camera", camera_user_facing: indx => indx !== 0, pose_from_raw: (raw_pose, mirror) => {
275
+ }, loaded: () => loaded, camera_default_device_id: userFacing => userFacing ? CameraSource.USER_DEFAULT_DEVICE_ID : CameraSource.DEFAULT_DEVICE_ID, camera_source_create: (p, deviceId) => createCameraSource(p, deviceId, preferWebXRCamera), camera_source_destroy: cam => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.destroy(); }, camera_source_pause: cam => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.pause(); }, camera_source_start: cam => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.start(); }, camera_source_profile_set: (cam, p) => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.setProfile(p); }, camera_source_preferred_resolution_set: (cam, w, h) => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.setPreferredResolution(w, h); }, camera_source_preferred_resolution_set_default: cam => { var _a; return (_a = getCameraSource(cam)) === null || _a === void 0 ? void 0 : _a.setPreferredResolution(profile.videoWidth, profile.videoHeight); }, camera_count: () => 2, camera_id: indx => indx === 0 ? CameraSource.DEFAULT_DEVICE_ID : CameraSource.USER_DEFAULT_DEVICE_ID, camera_name: indx => indx === 0 ? "Rear-facing Camera" : "User-facing Camera", camera_user_facing: indx => indx !== 0, pose_from_raw: (raw_pose, mirror) => {
275
276
  let res = applyScreenCounterRotation(undefined, raw_pose);
276
277
  if (mirror) {
277
278
  let scale = mat4.create();
@@ -126,6 +126,7 @@ export interface zappar {
126
126
  camera_source_pause(o: zappar_camera_source_t): void;
127
127
  camera_source_profile_set(o: zappar_camera_source_t, profile: camera_profile_t): void;
128
128
  camera_source_preferred_resolution_set(o: zappar_camera_source_t, width: number, height: number): void;
129
+ camera_source_preferred_resolution_set_default(o: zappar_camera_source_t): void;
129
130
  sequence_source_create(pipeline: zappar_pipeline_t): zappar_sequence_source_t;
130
131
  sequence_source_destroy(o: zappar_sequence_source_t): void;
131
132
  sequence_source_start(o: zappar_sequence_source_t): void;
@@ -1 +1 @@
1
- export declare const VERSION = "3.11.0";
1
+ export declare const VERSION = "3.12.0";
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "3.11.0";
1
+ export declare const VERSION = "3.12.0";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "3.11.0";
1
+ export const VERSION = "3.12.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zappar/zappar-cv",
3
- "version": "3.11.0",
3
+ "version": "3.12.0",
4
4
  "description": "Zappar's core computer vision library, supporting image, face and world tracking.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",