@zappar/zappar-cv 3.8.3 → 3.8.4

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.8.3/zappar-cv.js"></script>
21
+ <script src="https://libs.zappar.com/zappar-cv/3.8.4/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.8.3/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.8.3/zappar-cv.zip)
25
+ [https://libs.zappar.com/zappar-cv/3.8.4/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.8.4/zappar-cv.zip)
package/lib/pipeline.js CHANGED
@@ -349,6 +349,7 @@ export class Pipeline {
349
349
  data.frame = msg.frame;
350
350
  data.userFacing = msg.userFacing;
351
351
  data.uvTransform = msg.uvTransform;
352
+ data.data = msg.data;
352
353
  if (this._cameraFrameDataRGBEnabled)
353
354
  data.rgbFrame = msg.frame;
354
355
  this.tokensInFlight--;
@@ -531,7 +532,8 @@ export class Pipeline {
531
532
  userFacing,
532
533
  cameraModel,
533
534
  cameraToDevice,
534
- cp
535
+ cp,
536
+ requestData: this._cameraFrameDataEnabled,
535
537
  };
536
538
  this._mgr.postOutgoingMessage(msg, [img]);
537
539
  }
@@ -1 +1 @@
1
- export declare const VERSION = "3.8.3";
1
+ export declare const VERSION = "3.8.4";
@@ -61,12 +61,14 @@ export interface ImageBitmapC2S {
61
61
  cameraModel: Float32Array;
62
62
  cameraToDevice: Float32Array;
63
63
  cp: camera_profile_t;
64
+ requestData?: boolean;
64
65
  }
65
66
  export interface ImageBitmapS2C {
66
67
  t: "imageBitmapS2C";
67
68
  p: zappar_pipeline_t;
68
69
  dataWidth: number;
69
70
  dataHeight: number;
71
+ data?: ArrayBuffer;
70
72
  uvTransform: Float32Array;
71
73
  userFacing: boolean;
72
74
  frame: ImageBitmap;
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "3.8.3";
1
+ export declare const VERSION = "3.8.4";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "3.8.3";
1
+ export const VERSION = "3.8.4";
@@ -58,7 +58,8 @@ export function handleImageBitmap(m, r, server, mgr) {
58
58
  frame: m.i,
59
59
  userFacing: info.userFacing,
60
60
  uvTransform: info.uvTransform || mat4.create(),
61
- tokenId: m.tokenId, p: m.p
61
+ tokenId: m.tokenId, p: m.p,
62
+ data: m.requestData ? info.data : undefined
62
63
  };
63
64
  mgr.postOutgoingMessage(msg, [m.i]);
64
65
  let pipeline = server._pipeline_by_instance.get(m.p);
@@ -61,12 +61,14 @@ export interface ImageBitmapC2S {
61
61
  cameraModel: Float32Array;
62
62
  cameraToDevice: Float32Array;
63
63
  cp: camera_profile_t;
64
+ requestData?: boolean;
64
65
  }
65
66
  export interface ImageBitmapS2C {
66
67
  t: "imageBitmapS2C";
67
68
  p: zappar_pipeline_t;
68
69
  dataWidth: number;
69
70
  dataHeight: number;
71
+ data?: ArrayBuffer;
70
72
  uvTransform: Float32Array;
71
73
  userFacing: boolean;
72
74
  frame: ImageBitmap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zappar/zappar-cv",
3
- "version": "3.8.3",
3
+ "version": "3.8.4",
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",