@zappar/zappar-cv 3.0.1-alpha.15 → 3.0.1-alpha.17
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 +2 -2
- package/lib/additional.d.ts +1 -0
- package/lib/deserializer.d.ts +4 -1
- package/lib/deserializer.js +3 -0
- package/lib/drawgrid.js +2 -2
- package/lib/drawpolygon.d.ts +5 -0
- package/lib/drawpolygon.js +94 -0
- package/lib/gen/zappar-bridge.d.ts +33 -6
- package/lib/gen/zappar-bridge.js +3 -0
- package/lib/gen/zappar-client.d.ts +1 -0
- package/lib/gen/zappar-client.js +272 -35
- package/lib/gen/zappar-cwrap.js +178 -21
- package/lib/gen/zappar-native.d.ts +44 -7
- package/lib/gen/zappar-native.js +23 -1
- package/lib/gen/zappar-server.d.ts +3 -0
- package/lib/gen/zappar-server.js +140 -19
- package/lib/gen/zappar.d.ts +40 -8
- package/lib/gen/zappar.js +3 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/native.js +48 -4
- package/lib/permission.js +35 -9
- package/lib/serializer.d.ts +4 -1
- package/lib/serializer.js +3 -0
- package/lib/tr.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/zappar-cv.js +1 -1
- package/lib/zappar-cv.wasm +0 -0
- package/package.json +1 -1
- package/umd/751.zappar-cv.js +1 -1
- package/umd/867.zappar-cv.js +1 -1
- package/umd/{97ab16ef8d251feb4f5d.wasm → e601e2d6a412c37c4379.wasm} +0 -0
- package/umd/zappar-cv.js +1 -1
- package/umd/zappar-cv.worker.js +1 -1
package/lib/gen/zappar-cwrap.js
CHANGED
|
@@ -237,27 +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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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", [
|
|
255
289
|
"number"
|
|
256
290
|
]);
|
|
257
291
|
let world_tracker_world_anchor_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_world_anchor_pose_raw", "number", [
|
|
258
292
|
"number"
|
|
259
293
|
]);
|
|
260
|
-
let
|
|
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", [
|
|
261
298
|
"number"
|
|
262
299
|
]);
|
|
263
300
|
let world_tracker_ground_anchor_pose_raw_wrapped = mod.cwrap("zappar_world_tracker_ground_anchor_pose_raw", "number", [
|
|
@@ -298,6 +335,29 @@ export function getRuntimeObject(mod) {
|
|
|
298
335
|
let world_tracker_projections_data_wrapped = mod.cwrap("zappar_world_tracker_projections_data", "number", [
|
|
299
336
|
"number"
|
|
300
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
|
+
]);
|
|
301
361
|
let dataArrayArgLength = 32;
|
|
302
362
|
let dataArrayArg = mod._malloc(dataArrayArgLength);
|
|
303
363
|
let floatDataArrayArgLength = 16 * 4;
|
|
@@ -784,31 +844,78 @@ export function getRuntimeObject(mod) {
|
|
|
784
844
|
let ret = world_tracker_quality_wrapped(o);
|
|
785
845
|
return ret;
|
|
786
846
|
},
|
|
787
|
-
|
|
788
|
-
let ret =
|
|
847
|
+
world_tracker_horizontal_plane_detection_enabled: (o) => {
|
|
848
|
+
let ret = world_tracker_horizontal_plane_detection_enabled_wrapped(o);
|
|
849
|
+
ret = ret === 1;
|
|
850
|
+
return ret;
|
|
851
|
+
},
|
|
852
|
+
world_tracker_horizontal_plane_detection_enabled_set: (o, horizontal_plane_detection_enabled) => {
|
|
853
|
+
let arg_horizontal_plane_detection_enabled = horizontal_plane_detection_enabled ? 1 : 0;
|
|
854
|
+
let ret = world_tracker_horizontal_plane_detection_enabled_set_wrapped(o, arg_horizontal_plane_detection_enabled);
|
|
855
|
+
return ret;
|
|
856
|
+
},
|
|
857
|
+
world_tracker_vertical_plane_detection_enabled: (o) => {
|
|
858
|
+
let ret = world_tracker_vertical_plane_detection_enabled_wrapped(o);
|
|
789
859
|
ret = ret === 1;
|
|
790
860
|
return ret;
|
|
791
861
|
},
|
|
792
|
-
|
|
793
|
-
let
|
|
794
|
-
let ret =
|
|
862
|
+
world_tracker_vertical_plane_detection_enabled_set: (o, vertical_plane_detection_enabled) => {
|
|
863
|
+
let arg_vertical_plane_detection_enabled = vertical_plane_detection_enabled ? 1 : 0;
|
|
864
|
+
let ret = world_tracker_vertical_plane_detection_enabled_set_wrapped(o, arg_vertical_plane_detection_enabled);
|
|
865
|
+
return ret;
|
|
866
|
+
},
|
|
867
|
+
world_tracker_plane_anchor_count: (o) => {
|
|
868
|
+
let ret = world_tracker_plane_anchor_count_wrapped(o);
|
|
795
869
|
return ret;
|
|
796
870
|
},
|
|
797
|
-
|
|
798
|
-
let
|
|
871
|
+
world_tracker_plane_anchor_id: (o, indx) => {
|
|
872
|
+
let arg_indx = indx;
|
|
873
|
+
let ret = world_tracker_plane_anchor_id_wrapped(o, arg_indx);
|
|
799
874
|
return ret;
|
|
800
875
|
},
|
|
801
|
-
|
|
876
|
+
world_tracker_plane_anchor_pose_raw: (o, indx) => {
|
|
802
877
|
let arg_indx = indx;
|
|
803
|
-
let ret =
|
|
878
|
+
let ret = world_tracker_plane_anchor_pose_raw_wrapped(o, arg_indx);
|
|
804
879
|
let ab = new Float32Array(16);
|
|
805
880
|
ab.set(mod.HEAPF32.subarray(ret / 4, 16 + ret / 4));
|
|
806
881
|
ret = ab;
|
|
807
882
|
return ret;
|
|
808
883
|
},
|
|
809
|
-
|
|
810
|
-
let
|
|
811
|
-
ret =
|
|
884
|
+
world_tracker_plane_anchor_status: (o, indx) => {
|
|
885
|
+
let arg_indx = indx;
|
|
886
|
+
let ret = world_tracker_plane_anchor_status_wrapped(o, arg_indx);
|
|
887
|
+
return ret;
|
|
888
|
+
},
|
|
889
|
+
world_tracker_plane_anchor_polygon_data_size: (o, indx) => {
|
|
890
|
+
let arg_indx = indx;
|
|
891
|
+
let ret = world_tracker_plane_anchor_polygon_data_size_wrapped(o, arg_indx);
|
|
892
|
+
return ret;
|
|
893
|
+
},
|
|
894
|
+
world_tracker_plane_anchor_polygon_data: (o, indx) => {
|
|
895
|
+
let arg_indx = indx;
|
|
896
|
+
let ret = world_tracker_plane_anchor_polygon_data_wrapped(o, arg_indx);
|
|
897
|
+
let retsize = world_tracker_plane_anchor_polygon_data_size_wrapped(o, indx);
|
|
898
|
+
let ab = new Float32Array(retsize);
|
|
899
|
+
ab.set(mod.HEAPF32.subarray(ret / 4, retsize + ret / 4));
|
|
900
|
+
ret = ab;
|
|
901
|
+
return ret;
|
|
902
|
+
},
|
|
903
|
+
world_tracker_plane_anchor_polygon_version: (o, indx) => {
|
|
904
|
+
let arg_indx = indx;
|
|
905
|
+
let ret = world_tracker_plane_anchor_polygon_version_wrapped(o, arg_indx);
|
|
906
|
+
return ret;
|
|
907
|
+
},
|
|
908
|
+
world_tracker_plane_anchor_orientation: (o, indx) => {
|
|
909
|
+
let arg_indx = indx;
|
|
910
|
+
let ret = world_tracker_plane_anchor_orientation_wrapped(o, arg_indx);
|
|
911
|
+
return ret;
|
|
912
|
+
},
|
|
913
|
+
world_tracker_world_anchor_status: (o) => {
|
|
914
|
+
let ret = world_tracker_world_anchor_status_wrapped(o);
|
|
915
|
+
return ret;
|
|
916
|
+
},
|
|
917
|
+
world_tracker_world_anchor_id: (o) => {
|
|
918
|
+
let ret = world_tracker_world_anchor_id_wrapped(o);
|
|
812
919
|
return ret;
|
|
813
920
|
},
|
|
814
921
|
world_tracker_world_anchor_pose_raw: (o) => {
|
|
@@ -818,9 +925,12 @@ export function getRuntimeObject(mod) {
|
|
|
818
925
|
ret = ab;
|
|
819
926
|
return ret;
|
|
820
927
|
},
|
|
821
|
-
|
|
822
|
-
let ret =
|
|
823
|
-
|
|
928
|
+
world_tracker_ground_anchor_id: (o) => {
|
|
929
|
+
let ret = world_tracker_ground_anchor_id_wrapped(o);
|
|
930
|
+
return ret;
|
|
931
|
+
},
|
|
932
|
+
world_tracker_ground_anchor_status: (o) => {
|
|
933
|
+
let ret = world_tracker_ground_anchor_status_wrapped(o);
|
|
824
934
|
return ret;
|
|
825
935
|
},
|
|
826
936
|
world_tracker_ground_anchor_pose_raw: (o) => {
|
|
@@ -890,5 +1000,52 @@ export function getRuntimeObject(mod) {
|
|
|
890
1000
|
ret = ab;
|
|
891
1001
|
return ret;
|
|
892
1002
|
},
|
|
1003
|
+
custom_anchor_create: (pipeline, worldtracker, id) => {
|
|
1004
|
+
let arg_pipeline = pipeline;
|
|
1005
|
+
let arg_worldtracker = worldtracker;
|
|
1006
|
+
let arg_id = id;
|
|
1007
|
+
return custom_anchor_create_wrapped(arg_pipeline, arg_worldtracker, arg_id);
|
|
1008
|
+
},
|
|
1009
|
+
custom_anchor_destroy: () => {
|
|
1010
|
+
custom_anchor_destroy_wrapped();
|
|
1011
|
+
},
|
|
1012
|
+
custom_anchor_status: (o) => {
|
|
1013
|
+
let ret = custom_anchor_status_wrapped(o);
|
|
1014
|
+
return ret;
|
|
1015
|
+
},
|
|
1016
|
+
custom_anchor_enabled_set: (o, enabled) => {
|
|
1017
|
+
let arg_enabled = enabled ? 1 : 0;
|
|
1018
|
+
let ret = custom_anchor_enabled_set_wrapped(o, arg_enabled);
|
|
1019
|
+
return ret;
|
|
1020
|
+
},
|
|
1021
|
+
custom_anchor_enabled: (o) => {
|
|
1022
|
+
let ret = custom_anchor_enabled_wrapped(o);
|
|
1023
|
+
ret = ret === 1;
|
|
1024
|
+
return ret;
|
|
1025
|
+
},
|
|
1026
|
+
custom_anchor_pose_raw: (o) => {
|
|
1027
|
+
let ret = custom_anchor_pose_raw_wrapped(o);
|
|
1028
|
+
let ab = new Float32Array(16);
|
|
1029
|
+
ab.set(mod.HEAPF32.subarray(ret / 4, 16 + ret / 4));
|
|
1030
|
+
ret = ab;
|
|
1031
|
+
return ret;
|
|
1032
|
+
},
|
|
1033
|
+
custom_anchor_pose_set_from_camera_offset_raw: (o, x, y, z, orientation) => {
|
|
1034
|
+
let arg_x = x;
|
|
1035
|
+
let arg_y = y;
|
|
1036
|
+
let arg_z = z;
|
|
1037
|
+
let arg_orientation = orientation;
|
|
1038
|
+
let ret = custom_anchor_pose_set_from_camera_offset_raw_wrapped(o, arg_x, arg_y, arg_z, arg_orientation);
|
|
1039
|
+
return ret;
|
|
1040
|
+
},
|
|
1041
|
+
custom_anchor_pose_set_from_anchor_offset: (o, anchor_id, x, y, z, orientation) => {
|
|
1042
|
+
let arg_anchor_id = anchor_id;
|
|
1043
|
+
let arg_x = x;
|
|
1044
|
+
let arg_y = y;
|
|
1045
|
+
let arg_z = z;
|
|
1046
|
+
let arg_orientation = orientation;
|
|
1047
|
+
let ret = custom_anchor_pose_set_from_anchor_offset_wrapped(o, arg_anchor_id, arg_x, arg_y, arg_z, arg_orientation);
|
|
1048
|
+
return ret;
|
|
1049
|
+
},
|
|
893
1050
|
};
|
|
894
1051
|
}
|
|
@@ -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
|
-
|
|
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;
|
|
@@ -188,13 +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
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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;
|
|
196
224
|
world_tracker_world_anchor_pose_raw(o: zappar_world_tracker_t): Float32Array;
|
|
197
|
-
|
|
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;
|
|
198
227
|
world_tracker_ground_anchor_pose_raw(o: zappar_world_tracker_t): Float32Array;
|
|
199
228
|
world_tracker_reset(o: zappar_world_tracker_t): void;
|
|
200
229
|
world_tracker_tracks_data_enabled(o: zappar_world_tracker_t): boolean;
|
|
@@ -207,4 +236,12 @@ export interface zappar_cwrap {
|
|
|
207
236
|
world_tracker_projections_data_enabled_set(o: zappar_world_tracker_t, projections_data_enabled: boolean): void;
|
|
208
237
|
world_tracker_projections_data_size(o: zappar_world_tracker_t): number;
|
|
209
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;
|
|
210
247
|
}
|
package/lib/gen/zappar-native.js
CHANGED
|
@@ -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["
|
|
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
|
}
|
package/lib/gen/zappar-server.js
CHANGED
|
@@ -28,6 +28,8 @@ export class zappar_server {
|
|
|
28
28
|
this._zapcode_tracker_by_instance = new Map();
|
|
29
29
|
this._pipeline_id_by_world_tracker_id = new Map();
|
|
30
30
|
this._world_tracker_by_instance = new Map();
|
|
31
|
+
this._pipeline_id_by_custom_anchor_id = new Map();
|
|
32
|
+
this._custom_anchor_by_instance = new Map();
|
|
31
33
|
}
|
|
32
34
|
processBuffer(b) {
|
|
33
35
|
this._deserializer.setData(b);
|
|
@@ -417,7 +419,7 @@ export class zappar_server {
|
|
|
417
419
|
let obj = this._world_tracker_by_instance.get(clientId);
|
|
418
420
|
if (obj === undefined)
|
|
419
421
|
return;
|
|
420
|
-
this._impl.
|
|
422
|
+
this._impl.world_tracker_horizontal_plane_detection_enabled_set(obj, msg.bool());
|
|
421
423
|
break;
|
|
422
424
|
}
|
|
423
425
|
case 49: {
|
|
@@ -425,7 +427,7 @@ export class zappar_server {
|
|
|
425
427
|
let obj = this._world_tracker_by_instance.get(clientId);
|
|
426
428
|
if (obj === undefined)
|
|
427
429
|
return;
|
|
428
|
-
this._impl.
|
|
430
|
+
this._impl.world_tracker_vertical_plane_detection_enabled_set(obj, msg.bool());
|
|
429
431
|
break;
|
|
430
432
|
}
|
|
431
433
|
case 50: {
|
|
@@ -433,10 +435,18 @@ export class zappar_server {
|
|
|
433
435
|
let obj = this._world_tracker_by_instance.get(clientId);
|
|
434
436
|
if (obj === undefined)
|
|
435
437
|
return;
|
|
436
|
-
this._impl.
|
|
438
|
+
this._impl.world_tracker_reset(obj);
|
|
437
439
|
break;
|
|
438
440
|
}
|
|
439
441
|
case 51: {
|
|
442
|
+
let clientId = msg.type();
|
|
443
|
+
let obj = this._world_tracker_by_instance.get(clientId);
|
|
444
|
+
if (obj === undefined)
|
|
445
|
+
return;
|
|
446
|
+
this._impl.world_tracker_tracks_data_enabled_set(obj, msg.bool());
|
|
447
|
+
break;
|
|
448
|
+
}
|
|
449
|
+
case 52: {
|
|
440
450
|
let clientId = msg.type();
|
|
441
451
|
let obj = this._world_tracker_by_instance.get(clientId);
|
|
442
452
|
if (obj === undefined)
|
|
@@ -444,6 +454,51 @@ export class zappar_server {
|
|
|
444
454
|
this._impl.world_tracker_projections_data_enabled_set(obj, msg.bool());
|
|
445
455
|
break;
|
|
446
456
|
}
|
|
457
|
+
case 53: {
|
|
458
|
+
let clientId = msg.type();
|
|
459
|
+
let arg_pipeline_id = msg.type();
|
|
460
|
+
let arg_pipeline = this._pipeline_by_instance.get(arg_pipeline_id);
|
|
461
|
+
let arg_worldtracker_id = msg.type();
|
|
462
|
+
let arg_worldtracker = this._world_tracker_by_instance.get(arg_worldtracker_id);
|
|
463
|
+
let arg_id = msg.string();
|
|
464
|
+
let handle = this._impl.custom_anchor_create(arg_pipeline, arg_worldtracker, arg_id);
|
|
465
|
+
this._custom_anchor_by_instance.set(clientId, handle);
|
|
466
|
+
this._pipeline_id_by_custom_anchor_id.set(clientId, arg_pipeline_id);
|
|
467
|
+
break;
|
|
468
|
+
}
|
|
469
|
+
case 54: {
|
|
470
|
+
let clientId = msg.type();
|
|
471
|
+
let obj = this._custom_anchor_by_instance.get(clientId);
|
|
472
|
+
if (obj === undefined)
|
|
473
|
+
return;
|
|
474
|
+
this._impl.custom_anchor_destroy(obj);
|
|
475
|
+
this._custom_anchor_by_instance.delete(clientId);
|
|
476
|
+
break;
|
|
477
|
+
}
|
|
478
|
+
case 55: {
|
|
479
|
+
let clientId = msg.type();
|
|
480
|
+
let obj = this._custom_anchor_by_instance.get(clientId);
|
|
481
|
+
if (obj === undefined)
|
|
482
|
+
return;
|
|
483
|
+
this._impl.custom_anchor_enabled_set(obj, msg.bool());
|
|
484
|
+
break;
|
|
485
|
+
}
|
|
486
|
+
case 56: {
|
|
487
|
+
let clientId = msg.type();
|
|
488
|
+
let obj = this._custom_anchor_by_instance.get(clientId);
|
|
489
|
+
if (obj === undefined)
|
|
490
|
+
return;
|
|
491
|
+
this._impl.custom_anchor_pose_set_from_camera_offset_raw(obj, msg.float(), msg.float(), msg.float(), msg.transformOrientation());
|
|
492
|
+
break;
|
|
493
|
+
}
|
|
494
|
+
case 57: {
|
|
495
|
+
let clientId = msg.type();
|
|
496
|
+
let obj = this._custom_anchor_by_instance.get(clientId);
|
|
497
|
+
if (obj === undefined)
|
|
498
|
+
return;
|
|
499
|
+
this._impl.custom_anchor_pose_set_from_anchor_offset(obj, msg.string(), msg.float(), msg.float(), msg.float(), msg.transformOrientation());
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
447
502
|
}
|
|
448
503
|
});
|
|
449
504
|
}
|
|
@@ -657,61 +712,127 @@ export class zappar_server {
|
|
|
657
712
|
let serializer = this.serializersByPipelineId.get(pipeline);
|
|
658
713
|
if (!serializer)
|
|
659
714
|
continue;
|
|
660
|
-
serializer.sendMessage(
|
|
715
|
+
serializer.sendMessage(40, msg => {
|
|
661
716
|
msg.type(k);
|
|
662
717
|
msg.int(this._impl.world_tracker_quality(v));
|
|
663
718
|
});
|
|
664
719
|
serializer.sendMessage(25, msg => {
|
|
665
720
|
msg.type(k);
|
|
666
|
-
msg.int(this._impl.
|
|
721
|
+
msg.int(this._impl.world_tracker_plane_anchor_count(v));
|
|
667
722
|
});
|
|
668
|
-
for (let i = 0; i < this._impl.
|
|
723
|
+
for (let i = 0; i < this._impl.world_tracker_plane_anchor_count(v); i++) {
|
|
724
|
+
serializer.sendMessage(33, msg => {
|
|
725
|
+
msg.type(k);
|
|
726
|
+
msg.int(i);
|
|
727
|
+
msg.string(this._impl.world_tracker_plane_anchor_id(v, i));
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
for (let i = 0; i < this._impl.world_tracker_plane_anchor_count(v); i++) {
|
|
669
731
|
serializer.sendMessage(26, msg => {
|
|
670
732
|
msg.type(k);
|
|
671
733
|
msg.int(i);
|
|
672
|
-
msg.matrix4x4(this._impl.
|
|
734
|
+
msg.matrix4x4(this._impl.world_tracker_plane_anchor_pose_raw(v, i));
|
|
673
735
|
});
|
|
674
736
|
}
|
|
675
|
-
|
|
737
|
+
for (let i = 0; i < this._impl.world_tracker_plane_anchor_count(v); i++) {
|
|
738
|
+
serializer.sendMessage(28, msg => {
|
|
739
|
+
msg.type(k);
|
|
740
|
+
msg.int(i);
|
|
741
|
+
msg.anchorStatus(this._impl.world_tracker_plane_anchor_status(v, i));
|
|
742
|
+
});
|
|
743
|
+
}
|
|
744
|
+
for (let i = 0; i < this._impl.world_tracker_plane_anchor_count(v); i++) {
|
|
745
|
+
serializer.sendMessage(29, msg => {
|
|
746
|
+
msg.type(k);
|
|
747
|
+
msg.int(i);
|
|
748
|
+
msg.int(this._impl.world_tracker_plane_anchor_polygon_data_size(v, i));
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
for (let i = 0; i < this._impl.world_tracker_plane_anchor_count(v); i++) {
|
|
752
|
+
serializer.sendMessage(30, msg => {
|
|
753
|
+
msg.type(k);
|
|
754
|
+
msg.int(i);
|
|
755
|
+
msg.floatArray(this._impl.world_tracker_plane_anchor_polygon_data(v, i));
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
for (let i = 0; i < this._impl.world_tracker_plane_anchor_count(v); i++) {
|
|
759
|
+
serializer.sendMessage(31, msg => {
|
|
760
|
+
msg.type(k);
|
|
761
|
+
msg.int(i);
|
|
762
|
+
msg.int(this._impl.world_tracker_plane_anchor_polygon_version(v, i));
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
for (let i = 0; i < this._impl.world_tracker_plane_anchor_count(v); i++) {
|
|
766
|
+
serializer.sendMessage(32, msg => {
|
|
767
|
+
msg.type(k);
|
|
768
|
+
msg.int(i);
|
|
769
|
+
msg.planeOrientation(this._impl.world_tracker_plane_anchor_orientation(v, i));
|
|
770
|
+
});
|
|
771
|
+
}
|
|
772
|
+
serializer.sendMessage(36, msg => {
|
|
676
773
|
msg.type(k);
|
|
677
|
-
msg.
|
|
774
|
+
msg.anchorStatus(this._impl.world_tracker_world_anchor_status(v));
|
|
678
775
|
});
|
|
679
|
-
serializer.sendMessage(
|
|
776
|
+
serializer.sendMessage(35, msg => {
|
|
777
|
+
msg.type(k);
|
|
778
|
+
msg.string(this._impl.world_tracker_world_anchor_id(v));
|
|
779
|
+
});
|
|
780
|
+
serializer.sendMessage(34, msg => {
|
|
680
781
|
msg.type(k);
|
|
681
782
|
msg.matrix4x4(this._impl.world_tracker_world_anchor_pose_raw(v));
|
|
682
783
|
});
|
|
683
|
-
serializer.sendMessage(
|
|
784
|
+
serializer.sendMessage(38, msg => {
|
|
785
|
+
msg.type(k);
|
|
786
|
+
msg.string(this._impl.world_tracker_ground_anchor_id(v));
|
|
787
|
+
});
|
|
788
|
+
serializer.sendMessage(39, msg => {
|
|
684
789
|
msg.type(k);
|
|
685
|
-
msg.
|
|
790
|
+
msg.anchorStatus(this._impl.world_tracker_ground_anchor_status(v));
|
|
686
791
|
});
|
|
687
|
-
serializer.sendMessage(
|
|
792
|
+
serializer.sendMessage(37, msg => {
|
|
688
793
|
msg.type(k);
|
|
689
794
|
msg.matrix4x4(this._impl.world_tracker_ground_anchor_pose_raw(v));
|
|
690
795
|
});
|
|
691
|
-
serializer.sendMessage(
|
|
796
|
+
serializer.sendMessage(43, msg => {
|
|
692
797
|
msg.type(k);
|
|
693
798
|
msg.int(this._impl.world_tracker_tracks_data_size(v));
|
|
694
799
|
});
|
|
695
|
-
serializer.sendMessage(
|
|
800
|
+
serializer.sendMessage(42, msg => {
|
|
696
801
|
msg.type(k);
|
|
697
802
|
msg.floatArray(this._impl.world_tracker_tracks_data(v));
|
|
698
803
|
});
|
|
699
|
-
serializer.sendMessage(
|
|
804
|
+
serializer.sendMessage(45, msg => {
|
|
700
805
|
msg.type(k);
|
|
701
806
|
msg.int(this._impl.world_tracker_tracks_type_data_size(v));
|
|
702
807
|
});
|
|
703
|
-
serializer.sendMessage(
|
|
808
|
+
serializer.sendMessage(44, msg => {
|
|
704
809
|
msg.type(k);
|
|
705
810
|
msg.ucharArray(this._impl.world_tracker_tracks_type_data(v));
|
|
706
811
|
});
|
|
707
|
-
serializer.sendMessage(
|
|
812
|
+
serializer.sendMessage(48, msg => {
|
|
708
813
|
msg.type(k);
|
|
709
814
|
msg.int(this._impl.world_tracker_projections_data_size(v));
|
|
710
815
|
});
|
|
711
|
-
serializer.sendMessage(
|
|
816
|
+
serializer.sendMessage(47, msg => {
|
|
712
817
|
msg.type(k);
|
|
713
818
|
msg.floatArray(this._impl.world_tracker_projections_data(v));
|
|
714
819
|
});
|
|
715
820
|
}
|
|
821
|
+
for (let [k, v] of this._custom_anchor_by_instance) {
|
|
822
|
+
let pipeline = this._pipeline_id_by_custom_anchor_id.get(k);
|
|
823
|
+
if (!pipeline)
|
|
824
|
+
continue;
|
|
825
|
+
let serializer = this.serializersByPipelineId.get(pipeline);
|
|
826
|
+
if (!serializer)
|
|
827
|
+
continue;
|
|
828
|
+
serializer.sendMessage(50, msg => {
|
|
829
|
+
msg.type(k);
|
|
830
|
+
msg.anchorStatus(this._impl.custom_anchor_status(v));
|
|
831
|
+
});
|
|
832
|
+
serializer.sendMessage(49, msg => {
|
|
833
|
+
msg.type(k);
|
|
834
|
+
msg.matrix4x4(this._impl.custom_anchor_pose_raw(v));
|
|
835
|
+
});
|
|
836
|
+
}
|
|
716
837
|
}
|
|
717
838
|
}
|