@zappar/zappar-cv 3.0.1-alpha.8 → 3.0.1-beta.1

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 (55) hide show
  1. package/README.md +2 -2
  2. package/lib/additional.d.ts +17 -2
  3. package/lib/deserializer.d.ts +5 -1
  4. package/lib/deserializer.js +12 -0
  5. package/lib/direct.js +1 -1
  6. package/lib/drawaxis.d.ts +2 -0
  7. package/lib/drawaxis.js +137 -0
  8. package/lib/drawgrid.js +5 -2
  9. package/lib/drawpoints.d.ts +1 -0
  10. package/lib/drawpoints.js +2 -2
  11. package/lib/drawpointswithtype.d.ts +13 -0
  12. package/lib/drawpointswithtype.js +190 -0
  13. package/lib/drawpolygon.d.ts +5 -0
  14. package/lib/drawpolygon.js +94 -0
  15. package/lib/gen/zappar-bridge.d.ts +44 -11
  16. package/lib/gen/zappar-bridge.js +3 -0
  17. package/lib/gen/zappar-client.d.ts +1 -0
  18. package/lib/gen/zappar-client.js +347 -47
  19. package/lib/gen/zappar-cwrap.js +251 -41
  20. package/lib/gen/zappar-native.d.ts +56 -13
  21. package/lib/gen/zappar-native.js +23 -1
  22. package/lib/gen/zappar-server.d.ts +3 -0
  23. package/lib/gen/zappar-server.js +166 -21
  24. package/lib/gen/zappar.d.ts +51 -13
  25. package/lib/gen/zappar.js +3 -0
  26. package/lib/html-element-source.d.ts +4 -0
  27. package/lib/html-element-source.js +30 -2
  28. package/lib/index.d.ts +1 -1
  29. package/lib/index.js +1 -1
  30. package/lib/mstp-camera-source.js +2 -1
  31. package/lib/native.js +59 -4
  32. package/lib/permission.d.ts +3 -2
  33. package/lib/permission.js +52 -23
  34. package/lib/pipeline.d.ts +1 -1
  35. package/lib/pipeline.js +3 -2
  36. package/lib/sequencesource.js +1 -1
  37. package/lib/serializer.d.ts +5 -1
  38. package/lib/serializer.js +4 -0
  39. package/lib/tr.js +1 -1
  40. package/lib/version.d.ts +1 -1
  41. package/lib/version.js +1 -1
  42. package/lib/worker-client.js +4 -1
  43. package/lib/worker-imagebitmap.js +1 -1
  44. package/lib/worker-server.d.ts +1 -1
  45. package/lib/worker-server.js +5 -5
  46. package/lib/worker.js +1 -1
  47. package/lib/workerinterface.d.ts +1 -0
  48. package/lib/zappar-cv.js +1 -212
  49. package/lib/zappar-cv.wasm +0 -0
  50. package/package.json +1 -1
  51. package/umd/751.zappar-cv.js +1 -1
  52. package/umd/867.zappar-cv.js +1 -1
  53. package/umd/{5a86c8fa5c139c48ad64.wasm → ad30381eac4454d1944a.wasm} +0 -0
  54. package/umd/zappar-cv.js +1 -1
  55. 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,20 +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_count_wrapped = mod.cwrap("zappar_world_tracker_plane_count", "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_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_plane_pose_raw", "number", [
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_world_anchor_valid_wrapped = mod.cwrap("zappar_world_tracker_world_anchor_valid", "number", [
247
+ let world_tracker_vertical_plane_detection_enabled_wrapped = mod.cwrap("zappar_world_tracker_vertical_plane_detection_enabled", "number", [
248
+ "number"
249
+ ]);
250
+ let world_tracker_vertical_plane_detection_enabled_set_wrapped = mod.cwrap("zappar_world_tracker_vertical_plane_detection_enabled_set", null, [
251
+ "number",
252
+ "number"
253
+ ]);
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", [
262
+ "number",
263
+ "number"
264
+ ]);
265
+ let world_tracker_plane_anchor_status_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_status", "number", [
266
+ "number",
267
+ "number"
268
+ ]);
269
+ let world_tracker_plane_anchor_polygon_data_size_wrapped = mod.cwrap("zappar_world_tracker_plane_anchor_polygon_data_size", "number", [
270
+ "number",
271
+ "number"
272
+ ]);
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", [
248
289
  "number"
249
290
  ]);
250
291
  let world_tracker_world_anchor_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_world_anchor_pose_raw", "number", [
251
292
  "number"
252
293
  ]);
253
- 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", [
254
298
  "number"
255
299
  ]);
256
300
  let world_tracker_ground_anchor_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_ground_anchor_pose_raw", "number", [
@@ -259,25 +303,61 @@ export function getRuntimeObject(mod) {
259
303
  let world_tracker_reset_wrapped = mod.cwrap("zappar_world_tracker_reset", null, [
260
304
  "number"
261
305
  ]);
262
- let world_tracker_debug_enabled_wrapped = mod.cwrap("zappar_world_tracker_debug_enabled", "number", [
306
+ let world_tracker_tracks_data_enabled_wrapped = mod.cwrap("zappar_world_tracker_tracks_data_enabled", "number", [
307
+ "number"
308
+ ]);
309
+ let world_tracker_tracks_data_enabled_set_wrapped = mod.cwrap("zappar_world_tracker_tracks_data_enabled_set", null, [
310
+ "number",
263
311
  "number"
264
312
  ]);
265
- let world_tracker_debug_enabled_set_wrapped = mod.cwrap("zappar_world_tracker_debug_enabled_set", null, [
313
+ let world_tracker_tracks_data_size_wrapped = mod.cwrap("zappar_world_tracker_tracks_data_size", "number", [
314
+ "number"
315
+ ]);
316
+ let world_tracker_tracks_data_wrapped = mod.cwrap("zappar_world_tracker_tracks_data", "number", [
317
+ "number"
318
+ ]);
319
+ let world_tracker_tracks_type_data_size_wrapped = mod.cwrap("zappar_world_tracker_tracks_type_data_size", "number", [
320
+ "number"
321
+ ]);
322
+ let world_tracker_tracks_type_data_wrapped = mod.cwrap("zappar_world_tracker_tracks_type_data", "number", [
323
+ "number"
324
+ ]);
325
+ let world_tracker_projections_data_enabled_wrapped = mod.cwrap("zappar_world_tracker_projections_data_enabled", "number", [
326
+ "number"
327
+ ]);
328
+ let world_tracker_projections_data_enabled_set_wrapped = mod.cwrap("zappar_world_tracker_projections_data_enabled_set", null, [
266
329
  "number",
267
330
  "number"
268
331
  ]);
269
- let world_tracker_debug_tracks_data_size_wrapped = mod.cwrap("zappar_world_tracker_debug_tracks_data_size", "number", [
332
+ let world_tracker_projections_data_size_wrapped = mod.cwrap("zappar_world_tracker_projections_data_size", "number", [
333
+ "number"
334
+ ]);
335
+ let world_tracker_projections_data_wrapped = mod.cwrap("zappar_world_tracker_projections_data", "number", [
336
+ "number"
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", [
270
341
  "number"
271
342
  ]);
272
- let world_tracker_debug_tracks_data_wrapped = mod.cwrap("zappar_world_tracker_debug_tracks_data", "number", [
343
+ let custom_anchor_enabled_set_wrapped = mod.cwrap("zappar_custom_anchor_enabled_set", null, [
344
+ "number",
273
345
  "number"
274
346
  ]);
275
- let world_tracker_debug_projections_data_size_wrapped = mod.cwrap("zappar_world_tracker_debug_projections_data_size", "number", [
347
+ let custom_anchor_enabled_wrapped = mod.cwrap("zappar_custom_anchor_enabled", "number", [
276
348
  "number"
277
349
  ]);
278
- let world_tracker_debug_projections_data_wrapped = mod.cwrap("zappar_world_tracker_debug_projections_data", "number", [
350
+ let custom_anchor_pose_raw_wrapped = mod.cwrap("zappar_custom_anchor_pose_raw", "number", [
279
351
  "number"
280
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
+ ]);
281
361
  let dataArrayArgLength = 32;
282
362
  let dataArrayArg = mod._malloc(dataArrayArgLength);
283
363
  let floatDataArrayArgLength = 16 * 4;
@@ -350,7 +430,7 @@ export function getRuntimeObject(mod) {
350
430
  let ret = pipeline_camera_frame_user_data_wrapped(o);
351
431
  return ret;
352
432
  },
353
- 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) => {
354
434
  if (dataArrayArgLength < data.byteLength) {
355
435
  mod._free(dataArrayArg);
356
436
  dataArrayArgLength = data.byteLength;
@@ -367,10 +447,11 @@ export function getRuntimeObject(mod) {
367
447
  let arg_camera_model = getFloatDataArrayForArgIndex(5, camera_model.byteLength);
368
448
  mod.HEAPF32.set(camera_model, arg_camera_model / 4);
369
449
  let arg_user_facing = user_facing ? 1 : 0;
370
- 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);
371
452
  return ret;
372
453
  },
373
- 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) => {
374
455
  let arg_data = data;
375
456
  let arg_dataLength = dataLength;
376
457
  let arg_format = format;
@@ -383,9 +464,9 @@ export function getRuntimeObject(mod) {
383
464
  let arg_camera_model = getFloatDataArrayForArgIndex(8, camera_model.byteLength);
384
465
  mod.HEAPF32.set(camera_model, arg_camera_model / 4);
385
466
  let arg_user_facing = user_facing ? 1 : 0;
386
- let arg_timestamp = timestamp;
467
+ let arg_timestampSeconds = timestampSeconds;
387
468
  let arg_halfSample = halfSample ? 1 : 0;
388
- 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);
389
470
  return ret;
390
471
  },
391
472
  pipeline_camera_frame_camera_attitude: (o) => {
@@ -764,21 +845,78 @@ export function getRuntimeObject(mod) {
764
845
  let ret = world_tracker_quality_wrapped(o);
765
846
  return ret;
766
847
  },
767
- world_tracker_plane_count: (o) => {
768
- let ret = world_tracker_plane_count_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);
769
856
  return ret;
770
857
  },
771
- world_tracker_plane_pose_raw: (o, indx) => {
858
+ world_tracker_vertical_plane_detection_enabled: (o) => {
859
+ let ret = world_tracker_vertical_plane_detection_enabled_wrapped(o);
860
+ ret = ret === 1;
861
+ return ret;
862
+ },
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);
866
+ return ret;
867
+ },
868
+ world_tracker_plane_anchor_count: (o) => {
869
+ let ret = world_tracker_plane_anchor_count_wrapped(o);
870
+ return ret;
871
+ },
872
+ world_tracker_plane_anchor_id: (o, indx) => {
772
873
  let arg_indx = indx;
773
- 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);
774
880
  let ab = new Float32Array(16);
775
881
  ab.set(mod.HEAPF32.subarray(ret / 4, 16 + ret / 4));
776
882
  ret = ab;
777
883
  return ret;
778
884
  },
779
- world_tracker_world_anchor_valid: (o) => {
780
- let ret = world_tracker_world_anchor_valid_wrapped(o);
781
- ret = ret === 1;
885
+ world_tracker_plane_anchor_status: (o, indx) => {
886
+ let arg_indx = indx;
887
+ let ret = world_tracker_plane_anchor_status_wrapped(o, arg_indx);
888
+ return ret;
889
+ },
890
+ world_tracker_plane_anchor_polygon_data_size: (o, indx) => {
891
+ let arg_indx = indx;
892
+ let ret = world_tracker_plane_anchor_polygon_data_size_wrapped(o, arg_indx);
893
+ return ret;
894
+ },
895
+ world_tracker_plane_anchor_polygon_data: (o, indx) => {
896
+ let arg_indx = 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);
899
+ let ab = new Float32Array(retsize);
900
+ ab.set(mod.HEAPF32.subarray(ret / 4, retsize + ret / 4));
901
+ ret = ab;
902
+ return ret;
903
+ },
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);
782
920
  return ret;
783
921
  },
784
922
  world_tracker_world_anchor_pose_raw: (o) => {
@@ -788,9 +926,12 @@ export function getRuntimeObject(mod) {
788
926
  ret = ab;
789
927
  return ret;
790
928
  },
791
- world_tracker_ground_anchor_valid: (o) => {
792
- let ret = world_tracker_ground_anchor_valid_wrapped(o);
793
- 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);
794
935
  return ret;
795
936
  },
796
937
  world_tracker_ground_anchor_pose_raw: (o) => {
@@ -804,39 +945,108 @@ export function getRuntimeObject(mod) {
804
945
  let ret = world_tracker_reset_wrapped(o);
805
946
  return ret;
806
947
  },
807
- world_tracker_debug_enabled: (o) => {
808
- let ret = world_tracker_debug_enabled_wrapped(o);
948
+ world_tracker_tracks_data_enabled: (o) => {
949
+ let ret = world_tracker_tracks_data_enabled_wrapped(o);
809
950
  ret = ret === 1;
810
951
  return ret;
811
952
  },
812
- world_tracker_debug_enabled_set: (o, debug_enabled) => {
813
- let arg_debug_enabled = debug_enabled ? 1 : 0;
814
- let ret = world_tracker_debug_enabled_set_wrapped(o, arg_debug_enabled);
953
+ world_tracker_tracks_data_enabled_set: (o, tracks_data_enabled) => {
954
+ let arg_tracks_data_enabled = tracks_data_enabled ? 1 : 0;
955
+ let ret = world_tracker_tracks_data_enabled_set_wrapped(o, arg_tracks_data_enabled);
815
956
  return ret;
816
957
  },
817
- world_tracker_debug_tracks_data_size: (o) => {
818
- let ret = world_tracker_debug_tracks_data_size_wrapped(o);
958
+ world_tracker_tracks_data_size: (o) => {
959
+ let ret = world_tracker_tracks_data_size_wrapped(o);
819
960
  return ret;
820
961
  },
821
- world_tracker_debug_tracks_data: (o) => {
822
- let ret = world_tracker_debug_tracks_data_wrapped(o);
823
- let retsize = world_tracker_debug_tracks_data_size_wrapped(o);
962
+ world_tracker_tracks_data: (o) => {
963
+ let ret = world_tracker_tracks_data_wrapped(o);
964
+ let retsize = world_tracker_tracks_data_size_wrapped(o);
824
965
  let ab = new Float32Array(retsize);
825
966
  ab.set(mod.HEAPF32.subarray(ret / 4, retsize + ret / 4));
826
967
  ret = ab;
827
968
  return ret;
828
969
  },
829
- world_tracker_debug_projections_data_size: (o) => {
830
- let ret = world_tracker_debug_projections_data_size_wrapped(o);
970
+ world_tracker_tracks_type_data_size: (o) => {
971
+ let ret = world_tracker_tracks_type_data_size_wrapped(o);
972
+ return ret;
973
+ },
974
+ world_tracker_tracks_type_data: (o) => {
975
+ let ret = world_tracker_tracks_type_data_wrapped(o);
976
+ let retsize = world_tracker_tracks_type_data_size_wrapped(o);
977
+ let ab = new Uint8Array(retsize);
978
+ ab.set(mod.HEAPU8.subarray(ret, retsize + ret));
979
+ ret = ab;
980
+ return ret;
981
+ },
982
+ world_tracker_projections_data_enabled: (o) => {
983
+ let ret = world_tracker_projections_data_enabled_wrapped(o);
984
+ ret = ret === 1;
831
985
  return ret;
832
986
  },
833
- world_tracker_debug_projections_data: (o) => {
834
- let ret = world_tracker_debug_projections_data_wrapped(o);
835
- let retsize = world_tracker_debug_projections_data_size_wrapped(o);
987
+ world_tracker_projections_data_enabled_set: (o, projections_data_enabled) => {
988
+ let arg_projections_data_enabled = projections_data_enabled ? 1 : 0;
989
+ let ret = world_tracker_projections_data_enabled_set_wrapped(o, arg_projections_data_enabled);
990
+ return ret;
991
+ },
992
+ world_tracker_projections_data_size: (o) => {
993
+ let ret = world_tracker_projections_data_size_wrapped(o);
994
+ return ret;
995
+ },
996
+ world_tracker_projections_data: (o) => {
997
+ let ret = world_tracker_projections_data_wrapped(o);
998
+ let retsize = world_tracker_projections_data_size_wrapped(o);
836
999
  let ab = new Float32Array(retsize);
837
1000
  ab.set(mod.HEAPF32.subarray(ret / 4, retsize + ret / 4));
838
1001
  ret = ab;
839
1002
  return ret;
840
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
+ },
841
1051
  };
842
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,17 +207,41 @@ 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_count(o: zappar_world_tracker_t): number;
192
- world_tracker_plane_pose_raw(o: zappar_world_tracker_t, indx: number): Float32Array;
193
- 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;
194
224
  world_tracker_world_anchor_pose_raw(o: zappar_world_tracker_t): Float32Array;
195
- 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;
196
227
  world_tracker_ground_anchor_pose_raw(o: zappar_world_tracker_t): Float32Array;
197
228
  world_tracker_reset(o: zappar_world_tracker_t): void;
198
- world_tracker_debug_enabled(o: zappar_world_tracker_t): boolean;
199
- world_tracker_debug_enabled_set(o: zappar_world_tracker_t, debug_enabled: boolean): void;
200
- world_tracker_debug_tracks_data_size(o: zappar_world_tracker_t): number;
201
- world_tracker_debug_tracks_data(o: zappar_world_tracker_t): Float32Array;
202
- world_tracker_debug_projections_data_size(o: zappar_world_tracker_t): number;
203
- world_tracker_debug_projections_data(o: zappar_world_tracker_t): Float32Array;
229
+ world_tracker_tracks_data_enabled(o: zappar_world_tracker_t): boolean;
230
+ world_tracker_tracks_data_enabled_set(o: zappar_world_tracker_t, tracks_data_enabled: boolean): void;
231
+ world_tracker_tracks_data_size(o: zappar_world_tracker_t): number;
232
+ world_tracker_tracks_data(o: zappar_world_tracker_t): Float32Array;
233
+ world_tracker_tracks_type_data_size(o: zappar_world_tracker_t): number;
234
+ world_tracker_tracks_type_data(o: zappar_world_tracker_t): Uint8Array;
235
+ world_tracker_projections_data_enabled(o: zappar_world_tracker_t): boolean;
236
+ world_tracker_projections_data_enabled_set(o: zappar_world_tracker_t, projections_data_enabled: boolean): void;
237
+ world_tracker_projections_data_size(o: zappar_world_tracker_t): number;
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;
204
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
  }