@zappar/zappar-cv 3.0.1-alpha.16 → 3.0.1-alpha.19

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.
Files changed (42) hide show
  1. package/README.md +2 -2
  2. package/lib/additional.d.ts +1 -0
  3. package/lib/deserializer.d.ts +4 -1
  4. package/lib/deserializer.js +3 -0
  5. package/lib/drawaxis.js +4 -39
  6. package/lib/gen/zappar-bridge.d.ts +34 -10
  7. package/lib/gen/zappar-bridge.js +3 -0
  8. package/lib/gen/zappar-client.d.ts +1 -0
  9. package/lib/gen/zappar-client.js +238 -48
  10. package/lib/gen/zappar-cwrap.js +164 -38
  11. package/lib/gen/zappar-native.d.ts +46 -12
  12. package/lib/gen/zappar-native.js +23 -1
  13. package/lib/gen/zappar-server.d.ts +3 -0
  14. package/lib/gen/zappar-server.js +128 -28
  15. package/lib/gen/zappar.d.ts +41 -12
  16. package/lib/gen/zappar.js +3 -0
  17. package/lib/html-element-source.d.ts +1 -0
  18. package/lib/html-element-source.js +5 -1
  19. package/lib/index.d.ts +1 -1
  20. package/lib/index.js +1 -1
  21. package/lib/mstp-camera-source.js +2 -1
  22. package/lib/native.js +48 -4
  23. package/lib/permission.js +35 -9
  24. package/lib/pipeline.d.ts +1 -1
  25. package/lib/pipeline.js +3 -2
  26. package/lib/sequencesource.js +1 -1
  27. package/lib/serializer.d.ts +4 -1
  28. package/lib/serializer.js +3 -0
  29. package/lib/tr.js +1 -1
  30. package/lib/version.d.ts +1 -1
  31. package/lib/version.js +1 -1
  32. package/lib/worker-imagebitmap.js +1 -1
  33. package/lib/worker-server.js +2 -2
  34. package/lib/workerinterface.d.ts +1 -0
  35. package/lib/zappar-cv.js +1 -1
  36. package/lib/zappar-cv.wasm +0 -0
  37. package/package.json +1 -1
  38. package/umd/{6cf17bab4f58a189fc94.wasm → 3c548945c91fd14a0d90.wasm} +0 -0
  39. package/umd/751.zappar-cv.js +1 -1
  40. package/umd/867.zappar-cv.js +1 -1
  41. package/umd/zappar-cv.js +1 -1
  42. package/umd/zappar-cv.worker.js +1 -1
@@ -34,7 +34,7 @@ export function getRuntimeObject(mod) {
34
34
  ]);
35
35
  let pipeline_camera_frame_submit_wrapped = mod.cwrap("zappar_pipeline_camera_frame_submit", null, [
36
36
  "number",
37
- "number", "number", "number", "number", "number", "number", "number", "number"
37
+ "number", "number", "number", "number", "number", "number", "number", "number", "number"
38
38
  ]);
39
39
  let pipeline_camera_frame_submit_raw_pointer_wrapped = mod.cwrap("zappar_pipeline_camera_frame_submit_raw_pointer", null, [
40
40
  "number",
@@ -237,39 +237,64 @@ export function getRuntimeObject(mod) {
237
237
  let world_tracker_quality_wrapped = mod.cwrap("zappar_world_tracker_quality", "number", [
238
238
  "number"
239
239
  ]);
240
- let world_tracker_plane_detection_enabled_wrapped = mod.cwrap("zappar_world_tracker_plane_detection_enabled", "number", [
240
+ let world_tracker_horizontal_plane_detection_enabled_wrapped = mod.cwrap("zappar_world_tracker_horizontal_plane_detection_enabled", "number", [
241
241
  "number"
242
242
  ]);
243
- let world_tracker_plane_detection_enabled_set_wrapped = mod.cwrap("zappar_world_tracker_plane_detection_enabled_set", null, [
243
+ let world_tracker_horizontal_plane_detection_enabled_set_wrapped = mod.cwrap("zappar_world_tracker_horizontal_plane_detection_enabled_set", null, [
244
244
  "number",
245
245
  "number"
246
246
  ]);
247
- let world_tracker_plane_count_wrapped = mod.cwrap("zappar_world_tracker_plane_count", "number", [
247
+ let world_tracker_vertical_plane_detection_enabled_wrapped = mod.cwrap("zappar_world_tracker_vertical_plane_detection_enabled", "number", [
248
248
  "number"
249
249
  ]);
250
- let world_tracker_plane_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_plane_pose_raw", "number", [
250
+ let world_tracker_vertical_plane_detection_enabled_set_wrapped = mod.cwrap("zappar_world_tracker_vertical_plane_detection_enabled_set", null, [
251
251
  "number",
252
252
  "number"
253
253
  ]);
254
- let world_tracker_plane_visible_wrapped = mod.cwrap("zappar_world_tracker_plane_visible", "number", [
254
+ let world_tracker_plane_anchor_count_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_count", "number", [
255
+ "number"
256
+ ]);
257
+ let world_tracker_plane_anchor_id_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_id", "string", [
258
+ "number",
259
+ "number"
260
+ ]);
261
+ let world_tracker_plane_anchor_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_pose_raw", "number", [
255
262
  "number",
256
263
  "number"
257
264
  ]);
258
- let world_tracker_plane_polygon_data_size_wrapped = mod.cwrap("zappar_world_tracker_plane_polygon_data_size", "number", [
265
+ let world_tracker_plane_anchor_status_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_status", "number", [
259
266
  "number",
260
267
  "number"
261
268
  ]);
262
- let world_tracker_plane_polygon_data_wrapped = mod.cwrap("zappar_world_tracker_plane_polygon_data", "number", [
269
+ let world_tracker_plane_anchor_polygon_data_size_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_polygon_data_size", "number", [
263
270
  "number",
264
271
  "number"
265
272
  ]);
266
- let world_tracker_world_anchor_valid_wrapped = mod.cwrap("zappar_world_tracker_world_anchor_valid", "number", [
273
+ let world_tracker_plane_anchor_polygon_data_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_polygon_data", "number", [
274
+ "number",
275
+ "number"
276
+ ]);
277
+ let world_tracker_plane_anchor_polygon_version_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_polygon_version", "number", [
278
+ "number",
279
+ "number"
280
+ ]);
281
+ let world_tracker_plane_anchor_orientation_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_orientation", "number", [
282
+ "number",
283
+ "number"
284
+ ]);
285
+ let world_tracker_world_anchor_status_wrapped = mod.cwrap("zappar_world_tracker_world_anchor_status", "number", [
286
+ "number"
287
+ ]);
288
+ let world_tracker_world_anchor_id_wrapped = mod.cwrap("zappar_world_tracker_world_anchor_id", "string", [
267
289
  "number"
268
290
  ]);
269
291
  let world_tracker_world_anchor_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_world_anchor_pose_raw", "number", [
270
292
  "number"
271
293
  ]);
272
- let world_tracker_ground_anchor_valid_wrapped = mod.cwrap("zappar_world_tracker_ground_anchor_valid", "number", [
294
+ let world_tracker_ground_anchor_id_wrapped = mod.cwrap("zappar_world_tracker_ground_anchor_id", "string", [
295
+ "number"
296
+ ]);
297
+ let world_tracker_ground_anchor_status_wrapped = mod.cwrap("zappar_world_tracker_ground_anchor_status", "number", [
273
298
  "number"
274
299
  ]);
275
300
  let world_tracker_ground_anchor_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_ground_anchor_pose_raw", "number", [
@@ -310,6 +335,29 @@ export function getRuntimeObject(mod) {
310
335
  let world_tracker_projections_data_wrapped = mod.cwrap("zappar_world_tracker_projections_data", "number", [
311
336
  "number"
312
337
  ]);
338
+ let custom_anchor_create_wrapped = mod.cwrap("zappar_custom_anchor_create", "number", ["number", "number", "string"]);
339
+ let custom_anchor_destroy_wrapped = mod.cwrap("zappar_custom_anchor_destroy", null, ["number"]);
340
+ let custom_anchor_status_wrapped = mod.cwrap("zappar_custom_anchor_status", "number", [
341
+ "number"
342
+ ]);
343
+ let custom_anchor_enabled_set_wrapped = mod.cwrap("zappar_custom_anchor_enabled_set", null, [
344
+ "number",
345
+ "number"
346
+ ]);
347
+ let custom_anchor_enabled_wrapped = mod.cwrap("zappar_custom_anchor_enabled", "number", [
348
+ "number"
349
+ ]);
350
+ let custom_anchor_pose_raw_wrapped = mod.cwrap("zappar_custom_anchor_pose_raw", "number", [
351
+ "number"
352
+ ]);
353
+ let custom_anchor_pose_set_from_camera_offset_raw_wrapped = mod.cwrap("zappar_custom_anchor_pose_set_from_camera_offset_raw", null, [
354
+ "number",
355
+ "number", "number", "number", "number"
356
+ ]);
357
+ let custom_anchor_pose_set_from_anchor_offset_wrapped = mod.cwrap("zappar_custom_anchor_pose_set_from_anchor_offset", null, [
358
+ "number",
359
+ "string", "number", "number", "number", "number"
360
+ ]);
313
361
  let dataArrayArgLength = 32;
314
362
  let dataArrayArg = mod._malloc(dataArrayArgLength);
315
363
  let floatDataArrayArgLength = 16 * 4;
@@ -382,7 +430,7 @@ export function getRuntimeObject(mod) {
382
430
  let ret = pipeline_camera_frame_user_data_wrapped(o);
383
431
  return ret;
384
432
  },
385
- pipeline_camera_frame_submit: (o, data, width, height, user_data, camera_to_device_transform, camera_model, user_facing) => {
433
+ pipeline_camera_frame_submit: (o, data, width, height, user_data, camera_to_device_transform, camera_model, user_facing, timestampSeconds) => {
386
434
  if (dataArrayArgLength < data.byteLength) {
387
435
  mod._free(dataArrayArg);
388
436
  dataArrayArgLength = data.byteLength;
@@ -399,10 +447,11 @@ export function getRuntimeObject(mod) {
399
447
  let arg_camera_model = getFloatDataArrayForArgIndex(5, camera_model.byteLength);
400
448
  mod.HEAPF32.set(camera_model, arg_camera_model / 4);
401
449
  let arg_user_facing = user_facing ? 1 : 0;
402
- let ret = pipeline_camera_frame_submit_wrapped(o, arg_data, arg_len_data, arg_width, arg_height, arg_user_data, arg_camera_to_device_transform, arg_camera_model, arg_user_facing);
450
+ let arg_timestampSeconds = timestampSeconds;
451
+ let ret = pipeline_camera_frame_submit_wrapped(o, arg_data, arg_len_data, arg_width, arg_height, arg_user_data, arg_camera_to_device_transform, arg_camera_model, arg_user_facing, arg_timestampSeconds);
403
452
  return ret;
404
453
  },
405
- pipeline_camera_frame_submit_raw_pointer: (o, data, dataLength, format, width, height, user_data, camera_to_device_transform, rotation, camera_model, user_facing, timestamp, halfSample) => {
454
+ pipeline_camera_frame_submit_raw_pointer: (o, data, dataLength, format, width, height, user_data, camera_to_device_transform, rotation, camera_model, user_facing, timestampSeconds, halfSample) => {
406
455
  let arg_data = data;
407
456
  let arg_dataLength = dataLength;
408
457
  let arg_format = format;
@@ -415,9 +464,9 @@ export function getRuntimeObject(mod) {
415
464
  let arg_camera_model = getFloatDataArrayForArgIndex(8, camera_model.byteLength);
416
465
  mod.HEAPF32.set(camera_model, arg_camera_model / 4);
417
466
  let arg_user_facing = user_facing ? 1 : 0;
418
- let arg_timestamp = timestamp;
467
+ let arg_timestampSeconds = timestampSeconds;
419
468
  let arg_halfSample = halfSample ? 1 : 0;
420
- let ret = pipeline_camera_frame_submit_raw_pointer_wrapped(o, arg_data, arg_dataLength, arg_format, arg_width, arg_height, arg_user_data, arg_camera_to_device_transform, arg_rotation, arg_camera_model, arg_user_facing, arg_timestamp, arg_halfSample);
469
+ let ret = pipeline_camera_frame_submit_raw_pointer_wrapped(o, arg_data, arg_dataLength, arg_format, arg_width, arg_height, arg_user_data, arg_camera_to_device_transform, arg_rotation, arg_camera_model, arg_user_facing, arg_timestampSeconds, arg_halfSample);
421
470
  return ret;
422
471
  },
423
472
  pipeline_camera_frame_camera_attitude: (o) => {
@@ -796,51 +845,78 @@ export function getRuntimeObject(mod) {
796
845
  let ret = world_tracker_quality_wrapped(o);
797
846
  return ret;
798
847
  },
799
- world_tracker_plane_detection_enabled: (o) => {
800
- let ret = world_tracker_plane_detection_enabled_wrapped(o);
848
+ world_tracker_horizontal_plane_detection_enabled: (o) => {
849
+ let ret = world_tracker_horizontal_plane_detection_enabled_wrapped(o);
850
+ ret = ret === 1;
851
+ return ret;
852
+ },
853
+ world_tracker_horizontal_plane_detection_enabled_set: (o, horizontal_plane_detection_enabled) => {
854
+ let arg_horizontal_plane_detection_enabled = horizontal_plane_detection_enabled ? 1 : 0;
855
+ let ret = world_tracker_horizontal_plane_detection_enabled_set_wrapped(o, arg_horizontal_plane_detection_enabled);
856
+ return ret;
857
+ },
858
+ world_tracker_vertical_plane_detection_enabled: (o) => {
859
+ let ret = world_tracker_vertical_plane_detection_enabled_wrapped(o);
801
860
  ret = ret === 1;
802
861
  return ret;
803
862
  },
804
- world_tracker_plane_detection_enabled_set: (o, plane_detection_enabled) => {
805
- let arg_plane_detection_enabled = plane_detection_enabled ? 1 : 0;
806
- let ret = world_tracker_plane_detection_enabled_set_wrapped(o, arg_plane_detection_enabled);
863
+ world_tracker_vertical_plane_detection_enabled_set: (o, vertical_plane_detection_enabled) => {
864
+ let arg_vertical_plane_detection_enabled = vertical_plane_detection_enabled ? 1 : 0;
865
+ let ret = world_tracker_vertical_plane_detection_enabled_set_wrapped(o, arg_vertical_plane_detection_enabled);
807
866
  return ret;
808
867
  },
809
- world_tracker_plane_count: (o) => {
810
- let ret = world_tracker_plane_count_wrapped(o);
868
+ world_tracker_plane_anchor_count: (o) => {
869
+ let ret = world_tracker_plane_anchor_count_wrapped(o);
811
870
  return ret;
812
871
  },
813
- world_tracker_plane_pose_raw: (o, indx) => {
872
+ world_tracker_plane_anchor_id: (o, indx) => {
814
873
  let arg_indx = indx;
815
- let ret = world_tracker_plane_pose_raw_wrapped(o, arg_indx);
874
+ let ret = world_tracker_plane_anchor_id_wrapped(o, arg_indx);
875
+ return ret;
876
+ },
877
+ world_tracker_plane_anchor_pose_raw: (o, indx) => {
878
+ let arg_indx = indx;
879
+ let ret = world_tracker_plane_anchor_pose_raw_wrapped(o, arg_indx);
816
880
  let ab = new Float32Array(16);
817
881
  ab.set(mod.HEAPF32.subarray(ret / 4, 16 + ret / 4));
818
882
  ret = ab;
819
883
  return ret;
820
884
  },
821
- world_tracker_plane_visible: (o, indx) => {
885
+ world_tracker_plane_anchor_status: (o, indx) => {
822
886
  let arg_indx = indx;
823
- let ret = world_tracker_plane_visible_wrapped(o, arg_indx);
824
- ret = ret === 1;
887
+ let ret = world_tracker_plane_anchor_status_wrapped(o, arg_indx);
825
888
  return ret;
826
889
  },
827
- world_tracker_plane_polygon_data_size: (o, indx) => {
890
+ world_tracker_plane_anchor_polygon_data_size: (o, indx) => {
828
891
  let arg_indx = indx;
829
- let ret = world_tracker_plane_polygon_data_size_wrapped(o, arg_indx);
892
+ let ret = world_tracker_plane_anchor_polygon_data_size_wrapped(o, arg_indx);
830
893
  return ret;
831
894
  },
832
- world_tracker_plane_polygon_data: (o, indx) => {
895
+ world_tracker_plane_anchor_polygon_data: (o, indx) => {
833
896
  let arg_indx = indx;
834
- let ret = world_tracker_plane_polygon_data_wrapped(o, arg_indx);
835
- let retsize = world_tracker_plane_polygon_data_size_wrapped(o, indx);
897
+ let ret = world_tracker_plane_anchor_polygon_data_wrapped(o, arg_indx);
898
+ let retsize = world_tracker_plane_anchor_polygon_data_size_wrapped(o, indx);
836
899
  let ab = new Float32Array(retsize);
837
900
  ab.set(mod.HEAPF32.subarray(ret / 4, retsize + ret / 4));
838
901
  ret = ab;
839
902
  return ret;
840
903
  },
841
- world_tracker_world_anchor_valid: (o) => {
842
- let ret = world_tracker_world_anchor_valid_wrapped(o);
843
- ret = ret === 1;
904
+ world_tracker_plane_anchor_polygon_version: (o, indx) => {
905
+ let arg_indx = indx;
906
+ let ret = world_tracker_plane_anchor_polygon_version_wrapped(o, arg_indx);
907
+ return ret;
908
+ },
909
+ world_tracker_plane_anchor_orientation: (o, indx) => {
910
+ let arg_indx = indx;
911
+ let ret = world_tracker_plane_anchor_orientation_wrapped(o, arg_indx);
912
+ return ret;
913
+ },
914
+ world_tracker_world_anchor_status: (o) => {
915
+ let ret = world_tracker_world_anchor_status_wrapped(o);
916
+ return ret;
917
+ },
918
+ world_tracker_world_anchor_id: (o) => {
919
+ let ret = world_tracker_world_anchor_id_wrapped(o);
844
920
  return ret;
845
921
  },
846
922
  world_tracker_world_anchor_pose_raw: (o) => {
@@ -850,9 +926,12 @@ export function getRuntimeObject(mod) {
850
926
  ret = ab;
851
927
  return ret;
852
928
  },
853
- world_tracker_ground_anchor_valid: (o) => {
854
- let ret = world_tracker_ground_anchor_valid_wrapped(o);
855
- ret = ret === 1;
929
+ world_tracker_ground_anchor_id: (o) => {
930
+ let ret = world_tracker_ground_anchor_id_wrapped(o);
931
+ return ret;
932
+ },
933
+ world_tracker_ground_anchor_status: (o) => {
934
+ let ret = world_tracker_ground_anchor_status_wrapped(o);
856
935
  return ret;
857
936
  },
858
937
  world_tracker_ground_anchor_pose_raw: (o) => {
@@ -922,5 +1001,52 @@ export function getRuntimeObject(mod) {
922
1001
  ret = ab;
923
1002
  return ret;
924
1003
  },
1004
+ custom_anchor_create: (pipeline, worldtracker, id) => {
1005
+ let arg_pipeline = pipeline;
1006
+ let arg_worldtracker = worldtracker;
1007
+ let arg_id = id;
1008
+ return custom_anchor_create_wrapped(arg_pipeline, arg_worldtracker, arg_id);
1009
+ },
1010
+ custom_anchor_destroy: () => {
1011
+ custom_anchor_destroy_wrapped();
1012
+ },
1013
+ custom_anchor_status: (o) => {
1014
+ let ret = custom_anchor_status_wrapped(o);
1015
+ return ret;
1016
+ },
1017
+ custom_anchor_enabled_set: (o, enabled) => {
1018
+ let arg_enabled = enabled ? 1 : 0;
1019
+ let ret = custom_anchor_enabled_set_wrapped(o, arg_enabled);
1020
+ return ret;
1021
+ },
1022
+ custom_anchor_enabled: (o) => {
1023
+ let ret = custom_anchor_enabled_wrapped(o);
1024
+ ret = ret === 1;
1025
+ return ret;
1026
+ },
1027
+ custom_anchor_pose_raw: (o) => {
1028
+ let ret = custom_anchor_pose_raw_wrapped(o);
1029
+ let ab = new Float32Array(16);
1030
+ ab.set(mod.HEAPF32.subarray(ret / 4, 16 + ret / 4));
1031
+ ret = ab;
1032
+ return ret;
1033
+ },
1034
+ custom_anchor_pose_set_from_camera_offset_raw: (o, x, y, z, orientation) => {
1035
+ let arg_x = x;
1036
+ let arg_y = y;
1037
+ let arg_z = z;
1038
+ let arg_orientation = orientation;
1039
+ let ret = custom_anchor_pose_set_from_camera_offset_raw_wrapped(o, arg_x, arg_y, arg_z, arg_orientation);
1040
+ return ret;
1041
+ },
1042
+ custom_anchor_pose_set_from_anchor_offset: (o, anchor_id, x, y, z, orientation) => {
1043
+ let arg_anchor_id = anchor_id;
1044
+ let arg_x = x;
1045
+ let arg_y = y;
1046
+ let arg_z = z;
1047
+ let arg_orientation = orientation;
1048
+ let ret = custom_anchor_pose_set_from_anchor_offset_wrapped(o, arg_anchor_id, arg_x, arg_y, arg_z, arg_orientation);
1049
+ return ret;
1050
+ },
925
1051
  };
926
1052
  }
@@ -40,6 +40,12 @@ export declare enum instant_world_tracker_transform_orientation_t {
40
40
  MINUS_Z_HEADING = 5,
41
41
  UNCHANGED = 6
42
42
  }
43
+ export declare enum transform_orientation_t {
44
+ UNCHANGED = 0,
45
+ WORLD = 1,
46
+ PARENT = 2,
47
+ Z_TOWARDS_CAMERA = 3
48
+ }
43
49
  export declare enum log_level_t {
44
50
  LOG_LEVEL_NONE = 0,
45
51
  LOG_LEVEL_ERROR = 1,
@@ -64,7 +70,17 @@ export declare enum image_target_type_t {
64
70
  export declare enum world_tracker_quality_t {
65
71
  WORLD_TRACKER_QUALITY_INITIALIZING = 0,
66
72
  WORLD_TRACKER_QUALITY_GOOD = 1,
67
- WORLD_TRACKER_QUALITY_ORIENTATION_ONLY = 2
73
+ WORLD_TRACKER_QUALITY_LIMITED = 2
74
+ }
75
+ export declare enum anchor_status_t {
76
+ ANCHOR_STATUS_INITIALIZING = 0,
77
+ ANCHOR_STATUS_TRACKING = 1,
78
+ ANCHOR_STATUS_PAUSED = 2,
79
+ ANCHOR_STATUS_STOPPED = 3
80
+ }
81
+ export declare enum plane_orientation_t {
82
+ PLANE_ORIENTATION_HORIZONTAL = 0,
83
+ PLANE_ORIENTATION_VERTICAL = 1
68
84
  }
69
85
  export declare enum camera_profile_t {
70
86
  DEFAULT = 0,
@@ -103,6 +119,9 @@ export declare type zappar_zapcode_tracker_t = number & {
103
119
  export declare type zappar_world_tracker_t = number & {
104
120
  _: 'zappar_world_tracker_t';
105
121
  };
122
+ export declare type zappar_custom_anchor_t = number & {
123
+ _: 'zappar_custom_anchor_t';
124
+ };
106
125
  export interface zappar_cwrap {
107
126
  log_level(): log_level_t;
108
127
  log_level_set(level: log_level_t): void;
@@ -117,8 +136,8 @@ export interface zappar_cwrap {
117
136
  pipeline_frame_number(o: zappar_pipeline_t): number;
118
137
  pipeline_camera_model(o: zappar_pipeline_t): Float32Array;
119
138
  pipeline_camera_frame_user_data(o: zappar_pipeline_t): number;
120
- pipeline_camera_frame_submit(o: zappar_pipeline_t, data: ArrayBuffer, width: number, height: number, user_data: number, camera_to_device_transform: Float32Array, camera_model: Float32Array, user_facing: boolean): void;
121
- pipeline_camera_frame_submit_raw_pointer(o: zappar_pipeline_t, data: number, dataLength: number, format: frame_pixel_format_t, width: number, height: number, user_data: number, camera_to_device_transform: Float32Array, rotation: number, camera_model: Float32Array, user_facing: boolean, timestamp: number, halfSample: boolean): void;
139
+ pipeline_camera_frame_submit(o: zappar_pipeline_t, data: ArrayBuffer, width: number, height: number, user_data: number, camera_to_device_transform: Float32Array, camera_model: Float32Array, user_facing: boolean, timestampSeconds: number): void;
140
+ pipeline_camera_frame_submit_raw_pointer(o: zappar_pipeline_t, data: number, dataLength: number, format: frame_pixel_format_t, width: number, height: number, user_data: number, camera_to_device_transform: Float32Array, rotation: number, camera_model: Float32Array, user_facing: boolean, timestampSeconds: number, halfSample: boolean): void;
122
141
  pipeline_camera_frame_camera_attitude(o: zappar_pipeline_t): Float32Array;
123
142
  pipeline_camera_frame_device_attitude(o: zappar_pipeline_t): Float32Array;
124
143
  pipeline_motion_accelerometer_submit(o: zappar_pipeline_t, time: number, x: number, y: number, z: number): void;
@@ -188,16 +207,23 @@ export interface zappar_cwrap {
188
207
  world_tracker_enabled(o: zappar_world_tracker_t): boolean;
189
208
  world_tracker_enabled_set(o: zappar_world_tracker_t, enabled: boolean): void;
190
209
  world_tracker_quality(o: zappar_world_tracker_t): number;
191
- world_tracker_plane_detection_enabled(o: zappar_world_tracker_t): boolean;
192
- world_tracker_plane_detection_enabled_set(o: zappar_world_tracker_t, plane_detection_enabled: boolean): void;
193
- world_tracker_plane_count(o: zappar_world_tracker_t): number;
194
- world_tracker_plane_pose_raw(o: zappar_world_tracker_t, indx: number): Float32Array;
195
- world_tracker_plane_visible(o: zappar_world_tracker_t, indx: number): boolean;
196
- world_tracker_plane_polygon_data_size(o: zappar_world_tracker_t, indx: number): number;
197
- world_tracker_plane_polygon_data(o: zappar_world_tracker_t, indx: number): Float32Array;
198
- world_tracker_world_anchor_valid(o: zappar_world_tracker_t): boolean;
210
+ world_tracker_horizontal_plane_detection_enabled(o: zappar_world_tracker_t): boolean;
211
+ world_tracker_horizontal_plane_detection_enabled_set(o: zappar_world_tracker_t, horizontal_plane_detection_enabled: boolean): void;
212
+ world_tracker_vertical_plane_detection_enabled(o: zappar_world_tracker_t): boolean;
213
+ world_tracker_vertical_plane_detection_enabled_set(o: zappar_world_tracker_t, vertical_plane_detection_enabled: boolean): void;
214
+ world_tracker_plane_anchor_count(o: zappar_world_tracker_t): number;
215
+ world_tracker_plane_anchor_id(o: zappar_world_tracker_t, indx: number): string;
216
+ world_tracker_plane_anchor_pose_raw(o: zappar_world_tracker_t, indx: number): Float32Array;
217
+ world_tracker_plane_anchor_status(o: zappar_world_tracker_t, indx: number): anchor_status_t;
218
+ world_tracker_plane_anchor_polygon_data_size(o: zappar_world_tracker_t, indx: number): number;
219
+ world_tracker_plane_anchor_polygon_data(o: zappar_world_tracker_t, indx: number): Float32Array;
220
+ world_tracker_plane_anchor_polygon_version(o: zappar_world_tracker_t, indx: number): number;
221
+ world_tracker_plane_anchor_orientation(o: zappar_world_tracker_t, indx: number): plane_orientation_t;
222
+ world_tracker_world_anchor_status(o: zappar_world_tracker_t): anchor_status_t;
223
+ world_tracker_world_anchor_id(o: zappar_world_tracker_t): string;
199
224
  world_tracker_world_anchor_pose_raw(o: zappar_world_tracker_t): Float32Array;
200
- world_tracker_ground_anchor_valid(o: zappar_world_tracker_t): boolean;
225
+ world_tracker_ground_anchor_id(o: zappar_world_tracker_t): string;
226
+ world_tracker_ground_anchor_status(o: zappar_world_tracker_t): anchor_status_t;
201
227
  world_tracker_ground_anchor_pose_raw(o: zappar_world_tracker_t): Float32Array;
202
228
  world_tracker_reset(o: zappar_world_tracker_t): void;
203
229
  world_tracker_tracks_data_enabled(o: zappar_world_tracker_t): boolean;
@@ -210,4 +236,12 @@ export interface zappar_cwrap {
210
236
  world_tracker_projections_data_enabled_set(o: zappar_world_tracker_t, projections_data_enabled: boolean): void;
211
237
  world_tracker_projections_data_size(o: zappar_world_tracker_t): number;
212
238
  world_tracker_projections_data(o: zappar_world_tracker_t): Float32Array;
239
+ custom_anchor_create(pipeline: zappar_pipeline_t, worldtracker: zappar_world_tracker_t, id: string): zappar_custom_anchor_t;
240
+ custom_anchor_destroy(o: zappar_custom_anchor_t): void;
241
+ custom_anchor_status(o: zappar_custom_anchor_t): anchor_status_t;
242
+ custom_anchor_enabled_set(o: zappar_custom_anchor_t, enabled: boolean): void;
243
+ custom_anchor_enabled(o: zappar_custom_anchor_t): boolean;
244
+ custom_anchor_pose_raw(o: zappar_custom_anchor_t): Float32Array;
245
+ custom_anchor_pose_set_from_camera_offset_raw(o: zappar_custom_anchor_t, x: number, y: number, z: number, orientation: transform_orientation_t): void;
246
+ custom_anchor_pose_set_from_anchor_offset(o: zappar_custom_anchor_t, anchor_id: string, x: number, y: number, z: number, orientation: transform_orientation_t): void;
213
247
  }
@@ -46,6 +46,14 @@ export var instant_world_tracker_transform_orientation_t;
46
46
  instant_world_tracker_transform_orientation_t[instant_world_tracker_transform_orientation_t["UNCHANGED"] = 6] = "UNCHANGED";
47
47
  })(instant_world_tracker_transform_orientation_t || (instant_world_tracker_transform_orientation_t = {}));
48
48
  ;
49
+ export var transform_orientation_t;
50
+ (function (transform_orientation_t) {
51
+ transform_orientation_t[transform_orientation_t["UNCHANGED"] = 0] = "UNCHANGED";
52
+ transform_orientation_t[transform_orientation_t["WORLD"] = 1] = "WORLD";
53
+ transform_orientation_t[transform_orientation_t["PARENT"] = 2] = "PARENT";
54
+ transform_orientation_t[transform_orientation_t["Z_TOWARDS_CAMERA"] = 3] = "Z_TOWARDS_CAMERA";
55
+ })(transform_orientation_t || (transform_orientation_t = {}));
56
+ ;
49
57
  export var log_level_t;
50
58
  (function (log_level_t) {
51
59
  log_level_t[log_level_t["LOG_LEVEL_NONE"] = 0] = "LOG_LEVEL_NONE";
@@ -77,9 +85,23 @@ export var world_tracker_quality_t;
77
85
  (function (world_tracker_quality_t) {
78
86
  world_tracker_quality_t[world_tracker_quality_t["WORLD_TRACKER_QUALITY_INITIALIZING"] = 0] = "WORLD_TRACKER_QUALITY_INITIALIZING";
79
87
  world_tracker_quality_t[world_tracker_quality_t["WORLD_TRACKER_QUALITY_GOOD"] = 1] = "WORLD_TRACKER_QUALITY_GOOD";
80
- world_tracker_quality_t[world_tracker_quality_t["WORLD_TRACKER_QUALITY_ORIENTATION_ONLY"] = 2] = "WORLD_TRACKER_QUALITY_ORIENTATION_ONLY";
88
+ world_tracker_quality_t[world_tracker_quality_t["WORLD_TRACKER_QUALITY_LIMITED"] = 2] = "WORLD_TRACKER_QUALITY_LIMITED";
81
89
  })(world_tracker_quality_t || (world_tracker_quality_t = {}));
82
90
  ;
91
+ export var anchor_status_t;
92
+ (function (anchor_status_t) {
93
+ anchor_status_t[anchor_status_t["ANCHOR_STATUS_INITIALIZING"] = 0] = "ANCHOR_STATUS_INITIALIZING";
94
+ anchor_status_t[anchor_status_t["ANCHOR_STATUS_TRACKING"] = 1] = "ANCHOR_STATUS_TRACKING";
95
+ anchor_status_t[anchor_status_t["ANCHOR_STATUS_PAUSED"] = 2] = "ANCHOR_STATUS_PAUSED";
96
+ anchor_status_t[anchor_status_t["ANCHOR_STATUS_STOPPED"] = 3] = "ANCHOR_STATUS_STOPPED";
97
+ })(anchor_status_t || (anchor_status_t = {}));
98
+ ;
99
+ export var plane_orientation_t;
100
+ (function (plane_orientation_t) {
101
+ plane_orientation_t[plane_orientation_t["PLANE_ORIENTATION_HORIZONTAL"] = 0] = "PLANE_ORIENTATION_HORIZONTAL";
102
+ plane_orientation_t[plane_orientation_t["PLANE_ORIENTATION_VERTICAL"] = 1] = "PLANE_ORIENTATION_VERTICAL";
103
+ })(plane_orientation_t || (plane_orientation_t = {}));
104
+ ;
83
105
  export var camera_profile_t;
84
106
  (function (camera_profile_t) {
85
107
  camera_profile_t[camera_profile_t["DEFAULT"] = 0] = "DEFAULT";
@@ -11,6 +11,7 @@ import { zappar_barcode_finder_t } from "./zappar-native";
11
11
  import { zappar_instant_world_tracker_t } from "./zappar-native";
12
12
  import { zappar_zapcode_tracker_t } from "./zappar-native";
13
13
  import { zappar_world_tracker_t } from "./zappar-native";
14
+ import { zappar_custom_anchor_t } from "./zappar-native";
14
15
  export declare class zappar_server {
15
16
  private _impl;
16
17
  private _sender;
@@ -39,6 +40,8 @@ export declare class zappar_server {
39
40
  _zapcode_tracker_by_instance: Map<number, zappar_zapcode_tracker_t>;
40
41
  _pipeline_id_by_world_tracker_id: Map<number, number>;
41
42
  _world_tracker_by_instance: Map<number, zappar_world_tracker_t>;
43
+ _pipeline_id_by_custom_anchor_id: Map<number, number>;
44
+ _custom_anchor_by_instance: Map<number, zappar_custom_anchor_t>;
42
45
  processBuffer(b: ArrayBuffer): void;
43
46
  exploreState(): void;
44
47
  }