@zappar/zappar-cv 3.7.0 → 3.8.0-beta.2

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.7.0/zappar-cv.js"></script>
21
+ <script src="https://libs.zappar.com/zappar-cv/3.8.0-beta.2/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.7.0/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.7.0/zappar-cv.zip)
25
+ [https://libs.zappar.com/zappar-cv/3.8.0-beta.2/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.8.0-beta.2/zappar-cv.zip)
@@ -144,6 +144,11 @@ export class BridgedD3Tracker {
144
144
  const data = this._getD3Data(o);
145
145
  return (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.detections) === null || _a === void 0 ? void 0 : _a[indx]) === null || _b === void 0 ? void 0 : _b.dense) !== null && _c !== void 0 ? _c : 0;
146
146
  },
147
+ d3_tracker_category: (o, indx) => {
148
+ var _a, _b, _c;
149
+ const data = this._getD3Data(o);
150
+ return (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.detections) === null || _a === void 0 ? void 0 : _a[indx]) === null || _b === void 0 ? void 0 : _b.category) !== null && _c !== void 0 ? _c : 0;
151
+ },
147
152
  d3_tracker_size_for_id_set: (o, id, size) => {
148
153
  const state = this._getD3State(o);
149
154
  state.sizeById[id] = size;
@@ -34,6 +34,7 @@ export interface D3Detection {
34
34
  type: number;
35
35
  qr?: string;
36
36
  dense?: number;
37
+ category?: number;
37
38
  worldPoses: (Float32Array | number[])[];
38
39
  landmarks: Float32Array | number[];
39
40
  scale: number;
@@ -1121,6 +1121,7 @@ export class zappar_client {
1121
1121
  pose: [],
1122
1122
  type: [],
1123
1123
  dense: [],
1124
+ category: [],
1124
1125
  process_max_resolution: false,
1125
1126
  };
1126
1127
  this._d3_tracker_state_by_instance.set(newId, s);
@@ -314,5 +314,6 @@ export interface zappar {
314
314
  d3_tracker_landmarks_data_size(o: zappar_d3_tracker_t, indx: number): number;
315
315
  d3_tracker_type(o: zappar_d3_tracker_t, indx: number): number;
316
316
  d3_tracker_dense(o: zappar_d3_tracker_t, indx: number): number;
317
+ d3_tracker_category(o: zappar_d3_tracker_t, indx: number): number;
317
318
  d3_tracker_size_for_id_set(o: zappar_d3_tracker_t, id: string, size: number): void;
318
319
  }
package/lib/native.js CHANGED
@@ -194,7 +194,7 @@ export function initialize(opts) {
194
194
  let bridgedWtImpl = (bridgedWtApi === null || bridgedWtApi === void 0 ? void 0 : bridgedWtApi.impl) || {};
195
195
  const wtImpl = (bridgedWtApi === null || bridgedWtApi === void 0 ? void 0 : bridgedWtApi.impl) || c.impl;
196
196
  let bridgedD3Impl = (bridgedD3Api === null || bridgedD3Api === void 0 ? void 0 : bridgedD3Api.impl) || {};
197
- client = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, c.impl), { world_tracker_mesh_anchor_count: () => 0, world_tracker_mesh_anchor_id: () => "", world_tracker_mesh_anchor_indices: () => new Uint32Array(0), world_tracker_mesh_anchor_indices_count: () => 0, world_tracker_mesh_anchor_indices_size: () => 0, world_tracker_mesh_anchor_vertices: () => new Float32Array(0), world_tracker_mesh_anchor_vertices_count: () => 0, world_tracker_mesh_anchor_vertices_size: () => 0, world_tracker_mesh_anchor_vertices_offset: () => 0, world_tracker_mesh_anchor_vertices_stride: () => 0, world_tracker_mesh_anchor_pose_raw: () => new Float32Array(), world_tracker_mesh_anchor_status: () => anchor_status_t.ANCHOR_STATUS_STOPPED, world_tracker_mesh_anchors_enabled: () => false, world_tracker_mesh_anchors_enabled_set: () => { }, d3_tracker_create: (p) => { return -1; }, d3_tracker_destroy: (o) => { }, d3_tracker_count: (o) => { return 0; }, d3_tracker_enabled: (o) => { return false; }, d3_tracker_enabled_set: (o, v) => { }, d3_tracker_process_max_resolution_set: (o, v) => { }, d3_tracker_pose_raw: (o, indx) => { return mat4.create(); }, d3_tracker_pose0_raw: (o, indx) => { return mat4.create(); }, d3_tracker_pose1_raw: (o, indx) => { return mat4.create(); }, d3_tracker_id: (o, indx) => { return ''; }, d3_tracker_qr: (o, indx) => { return ''; }, d3_tracker_landmarks_data: (o, indx) => { return new Float32Array(0); }, d3_tracker_landmarks_data_size: (o, indx) => { return 0; }, d3_tracker_type: (o, indx) => { return 0; }, d3_tracker_dense: (o, indx) => { return 0; }, d3_tracker_size_for_id_set: (o, id, size) => { return 0; }, d3_tracker_pose: (o, indx, cameraPose, mirror) => {
197
+ client = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, c.impl), { world_tracker_mesh_anchor_count: () => 0, world_tracker_mesh_anchor_id: () => "", world_tracker_mesh_anchor_indices: () => new Uint32Array(0), world_tracker_mesh_anchor_indices_count: () => 0, world_tracker_mesh_anchor_indices_size: () => 0, world_tracker_mesh_anchor_vertices: () => new Float32Array(0), world_tracker_mesh_anchor_vertices_count: () => 0, world_tracker_mesh_anchor_vertices_size: () => 0, world_tracker_mesh_anchor_vertices_offset: () => 0, world_tracker_mesh_anchor_vertices_stride: () => 0, world_tracker_mesh_anchor_pose_raw: () => new Float32Array(), world_tracker_mesh_anchor_status: () => anchor_status_t.ANCHOR_STATUS_STOPPED, world_tracker_mesh_anchors_enabled: () => false, world_tracker_mesh_anchors_enabled_set: () => { }, d3_tracker_create: (p) => { return -1; }, d3_tracker_destroy: (o) => { }, d3_tracker_count: (o) => { return 0; }, d3_tracker_enabled: (o) => { return false; }, d3_tracker_enabled_set: (o, v) => { }, d3_tracker_process_max_resolution_set: (o, v) => { }, d3_tracker_pose_raw: (o, indx) => { return mat4.create(); }, d3_tracker_pose0_raw: (o, indx) => { return mat4.create(); }, d3_tracker_pose1_raw: (o, indx) => { return mat4.create(); }, d3_tracker_id: (o, indx) => { return ''; }, d3_tracker_qr: (o, indx) => { return ''; }, d3_tracker_landmarks_data: (o, indx) => { return new Float32Array(0); }, d3_tracker_landmarks_data_size: (o, indx) => { return 0; }, d3_tracker_type: (o, indx) => { return 0; }, d3_tracker_dense: (o, indx) => { return 0; }, d3_tracker_category: (o, indx) => { return 0; }, d3_tracker_size_for_id_set: (o, id, size) => { return 0; }, d3_tracker_pose: (o, indx, cameraPose, mirror) => {
198
198
  let res = applyScreenCounterRotation(undefined, client.d3_tracker_pose_raw(o, indx));
199
199
  if (mirror) {
200
200
  let scale = mat4.create();
@@ -34,6 +34,7 @@ export interface D3Detection {
34
34
  type: number;
35
35
  qr?: string;
36
36
  dense?: number;
37
+ category?: number;
37
38
  worldPoses: (Float32Array | number[])[];
38
39
  landmarks: Float32Array | number[];
39
40
  scale: number;
@@ -314,5 +314,6 @@ export interface zappar {
314
314
  d3_tracker_landmarks_data_size(o: zappar_d3_tracker_t, indx: number): number;
315
315
  d3_tracker_type(o: zappar_d3_tracker_t, indx: number): number;
316
316
  d3_tracker_dense(o: zappar_d3_tracker_t, indx: number): number;
317
+ d3_tracker_category(o: zappar_d3_tracker_t, indx: number): number;
317
318
  d3_tracker_size_for_id_set(o: zappar_d3_tracker_t, id: string, size: number): void;
318
319
  }
@@ -1 +1 @@
1
- export declare const VERSION = "3.7.0";
1
+ export declare const VERSION = "3.8.0-beta.2";
package/lib/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "3.7.0";
1
+ export declare const VERSION = "3.8.0-beta.2";
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "3.7.0";
1
+ export const VERSION = "3.8.0-beta.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zappar/zappar-cv",
3
- "version": "3.7.0",
3
+ "version": "3.8.0-beta.2",
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",