@zappar/zappar-cv 3.0.1-alpha.5 → 3.0.1-alpha.8
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/gen/zappar-bridge.d.ts +13 -0
- package/lib/gen/zappar-bridge.js +1 -0
- package/lib/gen/zappar-client.d.ts +1 -0
- package/lib/gen/zappar-client.js +125 -16
- package/lib/gen/zappar-cwrap.js +81 -3
- package/lib/gen/zappar-native.d.ts +17 -1
- package/lib/gen/zappar-native.js +6 -0
- package/lib/gen/zappar-server.d.ts +3 -0
- package/lib/gen/zappar-server.js +81 -15
- package/lib/gen/zappar.d.ts +17 -0
- package/lib/gen/zappar.js +1 -0
- package/lib/html-element-source.d.ts +3 -1
- package/lib/html-element-source.js +12 -6
- package/lib/image-process-gl.d.ts +3 -2
- package/lib/image-process-gl.js +9 -7
- package/lib/imagebitmap-camera-source.d.ts +3 -1
- package/lib/imagebitmap-camera-source.js +10 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/mstp-camera-source.d.ts +2 -1
- package/lib/mstp-camera-source.js +5 -0
- package/lib/native.js +20 -1
- package/lib/pipeline.d.ts +3 -1
- package/lib/pipeline.js +12 -2
- package/lib/profile.d.ts +2 -2
- package/lib/profile.js +3 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/worker-imagebitmap.js +5 -4
- package/lib/worker-server.js +19 -8
- package/lib/workerinterface.d.ts +8 -1
- package/lib/zappar-cv.js +203 -166
- package/lib/zappar-cv.wasm +0 -0
- package/package.json +1 -1
- package/umd/{17cb8e68ad2789719d7f.wasm → 5a86c8fa5c139c48ad64.wasm} +0 -0
- package/umd/751.zappar-cv.js +1 -1
- package/umd/867.zappar-cv.js +1 -1
- package/umd/zappar-cv.js +1 -1
- package/umd/zappar-cv.worker.js +1 -1
package/README.md
CHANGED
|
@@ -18,8 +18,8 @@ npm i @zappar/zappar-cv
|
|
|
18
18
|
|
|
19
19
|
You can use our CDN from within your HTML:
|
|
20
20
|
```
|
|
21
|
-
<script src="https://libs.zappar.com/zappar-cv/3.0.1-alpha.
|
|
21
|
+
<script src="https://libs.zappar.com/zappar-cv/3.0.1-alpha.8/zappar-cv.js"></script>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
Or you can download and host our standalone JavaScript bundle:
|
|
25
|
-
[https://libs.zappar.com/zappar-cv/3.0.1-alpha.
|
|
25
|
+
[https://libs.zappar.com/zappar-cv/3.0.1-alpha.8/zappar-cv.zip](https://libs.zappar.com/zappar-cv/3.0.1-alpha.8/zappar-cv.zip)
|
|
@@ -9,6 +9,7 @@ import { log_level_t } from "./zappar-native";
|
|
|
9
9
|
export { log_level_t } from "./zappar-native";
|
|
10
10
|
export { image_target_type_t } from "./zappar-native";
|
|
11
11
|
export { world_tracker_quality_t } from "./zappar-native";
|
|
12
|
+
export { camera_profile_t } from "./zappar-native";
|
|
12
13
|
export declare type zappar_pipeline_t = number & {
|
|
13
14
|
_: 'zappar_pipeline_t';
|
|
14
15
|
};
|
|
@@ -36,6 +37,9 @@ export declare type zappar_barcode_finder_t = number & {
|
|
|
36
37
|
export declare type zappar_instant_world_tracker_t = number & {
|
|
37
38
|
_: 'zappar_instant_world_tracker_t';
|
|
38
39
|
};
|
|
40
|
+
export declare type zappar_zapcode_tracker_t = number & {
|
|
41
|
+
_: 'zappar_zapcode_tracker_t';
|
|
42
|
+
};
|
|
39
43
|
export declare type zappar_world_tracker_t = number & {
|
|
40
44
|
_: 'zappar_world_tracker_t';
|
|
41
45
|
};
|
|
@@ -105,6 +109,15 @@ export interface zappar {
|
|
|
105
109
|
instant_world_tracker_enabled(o: zappar_instant_world_tracker_t): boolean;
|
|
106
110
|
instant_world_tracker_anchor_pose_raw(o: zappar_instant_world_tracker_t): Float32Array;
|
|
107
111
|
instant_world_tracker_anchor_pose_set_from_camera_offset_raw(o: zappar_instant_world_tracker_t, x: number, y: number, z: number, orientation: instant_world_tracker_transform_orientation_t): void;
|
|
112
|
+
zapcode_tracker_create(pipeline: zappar_pipeline_t): zappar_zapcode_tracker_t;
|
|
113
|
+
zapcode_tracker_destroy(o: zappar_zapcode_tracker_t): void;
|
|
114
|
+
zapcode_tracker_target_load_from_memory(o: zappar_zapcode_tracker_t, data: ArrayBuffer): void;
|
|
115
|
+
zapcode_tracker_target_loaded_version(o: zappar_zapcode_tracker_t): number;
|
|
116
|
+
zapcode_tracker_enabled(o: zappar_zapcode_tracker_t): boolean;
|
|
117
|
+
zapcode_tracker_enabled_set(o: zappar_zapcode_tracker_t, enabled: boolean): void;
|
|
118
|
+
zapcode_tracker_anchor_count(o: zappar_zapcode_tracker_t): number;
|
|
119
|
+
zapcode_tracker_anchor_id(o: zappar_zapcode_tracker_t, indx: number): string;
|
|
120
|
+
zapcode_tracker_anchor_pose_raw(o: zappar_zapcode_tracker_t, indx: number): Float32Array;
|
|
108
121
|
world_tracker_create(pipeline: zappar_pipeline_t): zappar_world_tracker_t;
|
|
109
122
|
world_tracker_destroy(o: zappar_world_tracker_t): void;
|
|
110
123
|
world_tracker_enabled(o: zappar_world_tracker_t): boolean;
|
package/lib/gen/zappar-bridge.js
CHANGED
|
@@ -5,3 +5,4 @@ export { instant_world_tracker_transform_orientation_t } from "./zappar-native";
|
|
|
5
5
|
export { log_level_t } from "./zappar-native";
|
|
6
6
|
export { image_target_type_t } from "./zappar-native";
|
|
7
7
|
export { world_tracker_quality_t } from "./zappar-native";
|
|
8
|
+
export { camera_profile_t } from "./zappar-native";
|
|
@@ -17,6 +17,7 @@ export declare class zappar_client {
|
|
|
17
17
|
private _face_landmark_state_by_instance;
|
|
18
18
|
private _barcode_finder_state_by_instance;
|
|
19
19
|
private _instant_world_tracker_state_by_instance;
|
|
20
|
+
private _zapcode_tracker_state_by_instance;
|
|
20
21
|
private _world_tracker_state_by_instance;
|
|
21
22
|
impl: zappar;
|
|
22
23
|
processMessages(a: ArrayBuffer): void;
|
package/lib/gen/zappar-client.js
CHANGED
|
@@ -20,6 +20,7 @@ export class zappar_client {
|
|
|
20
20
|
this._face_landmark_state_by_instance = new Map();
|
|
21
21
|
this._barcode_finder_state_by_instance = new Map();
|
|
22
22
|
this._instant_world_tracker_state_by_instance = new Map();
|
|
23
|
+
this._zapcode_tracker_state_by_instance = new Map();
|
|
23
24
|
this._world_tracker_state_by_instance = new Map();
|
|
24
25
|
this.impl = {
|
|
25
26
|
log_level: () => {
|
|
@@ -600,6 +601,80 @@ export class zappar_client {
|
|
|
600
601
|
m.instantTrackerTransformOrientation(orientation);
|
|
601
602
|
});
|
|
602
603
|
},
|
|
604
|
+
// #### zapcode_tracker ####
|
|
605
|
+
zapcode_tracker_create: (pipeline) => {
|
|
606
|
+
let newId = (this._latestId++);
|
|
607
|
+
let s = {
|
|
608
|
+
enabled: true,
|
|
609
|
+
target_loaded_version: -1,
|
|
610
|
+
anchor_count: 0,
|
|
611
|
+
anchor_id: [],
|
|
612
|
+
anchor_pose: [],
|
|
613
|
+
};
|
|
614
|
+
this._zapcode_tracker_state_by_instance.set(newId, s);
|
|
615
|
+
this.serializer.sendMessage(41, m => {
|
|
616
|
+
m.type(newId);
|
|
617
|
+
m.type(pipeline);
|
|
618
|
+
});
|
|
619
|
+
return newId;
|
|
620
|
+
},
|
|
621
|
+
zapcode_tracker_destroy: (o) => {
|
|
622
|
+
let s = this._zapcode_tracker_state_by_instance.get(o);
|
|
623
|
+
if (!s)
|
|
624
|
+
throw new Error("This object has been destroyed");
|
|
625
|
+
this._zapcode_tracker_state_by_instance.delete(o);
|
|
626
|
+
this.serializer.sendMessage(44, m => {
|
|
627
|
+
m.type(o);
|
|
628
|
+
});
|
|
629
|
+
},
|
|
630
|
+
zapcode_tracker_target_load_from_memory: (o, data) => {
|
|
631
|
+
let s = this._zapcode_tracker_state_by_instance.get(o);
|
|
632
|
+
if (!s)
|
|
633
|
+
throw new Error("This object has been destroyed");
|
|
634
|
+
this.serializer.sendMessage(43, m => {
|
|
635
|
+
m.type(o);
|
|
636
|
+
m.dataWithLength(data);
|
|
637
|
+
});
|
|
638
|
+
},
|
|
639
|
+
zapcode_tracker_target_loaded_version: (o) => {
|
|
640
|
+
let s = this._zapcode_tracker_state_by_instance.get(o);
|
|
641
|
+
if (!s)
|
|
642
|
+
throw new Error("This object has been destroyed");
|
|
643
|
+
return s.target_loaded_version;
|
|
644
|
+
},
|
|
645
|
+
zapcode_tracker_enabled: (o) => {
|
|
646
|
+
let s = this._zapcode_tracker_state_by_instance.get(o);
|
|
647
|
+
if (!s)
|
|
648
|
+
throw new Error("This object has been destroyed");
|
|
649
|
+
return s.enabled;
|
|
650
|
+
},
|
|
651
|
+
zapcode_tracker_enabled_set: (o, enabled) => {
|
|
652
|
+
let s = this._zapcode_tracker_state_by_instance.get(o);
|
|
653
|
+
if (!s)
|
|
654
|
+
throw new Error("This object has been destroyed");
|
|
655
|
+
this.serializer.sendMessage(42, m => {
|
|
656
|
+
m.type(o);
|
|
657
|
+
m.bool(enabled);
|
|
658
|
+
});
|
|
659
|
+
},
|
|
660
|
+
zapcode_tracker_anchor_count: (o) => {
|
|
661
|
+
let s = this._zapcode_tracker_state_by_instance.get(o);
|
|
662
|
+
if (!s)
|
|
663
|
+
throw new Error("This object has been destroyed");
|
|
664
|
+
return s.anchor_count;
|
|
665
|
+
},
|
|
666
|
+
zapcode_tracker_anchor_id: (o, indx) => {
|
|
667
|
+
let s = this._zapcode_tracker_state_by_instance.get(o);
|
|
668
|
+
if (!s)
|
|
669
|
+
throw new Error("This object has been destroyed");
|
|
670
|
+
return s.anchor_id[indx];
|
|
671
|
+
},
|
|
672
|
+
zapcode_tracker_anchor_pose_raw: (o, indx) => {
|
|
673
|
+
let s = this._zapcode_tracker_state_by_instance.get(o);
|
|
674
|
+
if (!s)
|
|
675
|
+
throw new Error("This object has been destroyed");
|
|
676
|
+
return s.anchor_pose[indx];
|
|
677
|
+
},
|
|
603
678
|
// #### world_tracker ####
|
|
604
679
|
world_tracker_create: (pipeline) => {
|
|
605
680
|
let newId = (this._latestId++);
|
|
@@ -619,7 +694,7 @@ export class zappar_client {
|
|
|
619
694
|
quality: 0,
|
|
620
695
|
};
|
|
621
696
|
this._world_tracker_state_by_instance.set(newId, s);
|
|
622
|
-
this.serializer.sendMessage(
|
|
697
|
+
this.serializer.sendMessage(45, m => {
|
|
623
698
|
m.type(newId);
|
|
624
699
|
m.type(pipeline);
|
|
625
700
|
});
|
|
@@ -630,7 +705,7 @@ export class zappar_client {
|
|
|
630
705
|
if (!s)
|
|
631
706
|
throw new Error("This object has been destroyed");
|
|
632
707
|
this._world_tracker_state_by_instance.delete(o);
|
|
633
|
-
this.serializer.sendMessage(
|
|
708
|
+
this.serializer.sendMessage(46, m => {
|
|
634
709
|
m.type(o);
|
|
635
710
|
});
|
|
636
711
|
},
|
|
@@ -644,7 +719,7 @@ export class zappar_client {
|
|
|
644
719
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
645
720
|
if (!s)
|
|
646
721
|
throw new Error("This object has been destroyed");
|
|
647
|
-
this.serializer.sendMessage(
|
|
722
|
+
this.serializer.sendMessage(47, m => {
|
|
648
723
|
m.type(o);
|
|
649
724
|
m.bool(enabled);
|
|
650
725
|
});
|
|
@@ -695,7 +770,7 @@ export class zappar_client {
|
|
|
695
770
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
696
771
|
if (!s)
|
|
697
772
|
throw new Error("This object has been destroyed");
|
|
698
|
-
this.serializer.sendMessage(
|
|
773
|
+
this.serializer.sendMessage(48, m => {
|
|
699
774
|
m.type(o);
|
|
700
775
|
});
|
|
701
776
|
},
|
|
@@ -709,7 +784,7 @@ export class zappar_client {
|
|
|
709
784
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
710
785
|
if (!s)
|
|
711
786
|
throw new Error("This object has been destroyed");
|
|
712
|
-
this.serializer.sendMessage(
|
|
787
|
+
this.serializer.sendMessage(49, m => {
|
|
713
788
|
m.type(o);
|
|
714
789
|
m.bool(debug_enabled);
|
|
715
790
|
});
|
|
@@ -904,7 +979,41 @@ export class zappar_client {
|
|
|
904
979
|
inst.pose = msg.matrix4x4();
|
|
905
980
|
break;
|
|
906
981
|
}
|
|
907
|
-
case
|
|
982
|
+
case 24: {
|
|
983
|
+
let handle = msg.type();
|
|
984
|
+
let inst = this._zapcode_tracker_state_by_instance.get(handle);
|
|
985
|
+
if (!inst)
|
|
986
|
+
return;
|
|
987
|
+
inst.target_loaded_version = msg.int();
|
|
988
|
+
break;
|
|
989
|
+
}
|
|
990
|
+
case 21: {
|
|
991
|
+
let handle = msg.type();
|
|
992
|
+
let inst = this._zapcode_tracker_state_by_instance.get(handle);
|
|
993
|
+
if (!inst)
|
|
994
|
+
return;
|
|
995
|
+
inst.anchor_count = msg.int();
|
|
996
|
+
break;
|
|
997
|
+
}
|
|
998
|
+
case 22: {
|
|
999
|
+
let handle = msg.type();
|
|
1000
|
+
let inst = this._zapcode_tracker_state_by_instance.get(handle);
|
|
1001
|
+
if (!inst)
|
|
1002
|
+
return;
|
|
1003
|
+
let indx = msg.int();
|
|
1004
|
+
inst.anchor_id[indx] = msg.string();
|
|
1005
|
+
break;
|
|
1006
|
+
}
|
|
1007
|
+
case 23: {
|
|
1008
|
+
let handle = msg.type();
|
|
1009
|
+
let inst = this._zapcode_tracker_state_by_instance.get(handle);
|
|
1010
|
+
if (!inst)
|
|
1011
|
+
return;
|
|
1012
|
+
let indx = msg.int();
|
|
1013
|
+
inst.anchor_pose[indx] = msg.matrix4x4();
|
|
1014
|
+
break;
|
|
1015
|
+
}
|
|
1016
|
+
case 31: {
|
|
908
1017
|
let handle = msg.type();
|
|
909
1018
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
910
1019
|
if (!inst)
|
|
@@ -912,7 +1021,7 @@ export class zappar_client {
|
|
|
912
1021
|
inst.quality = msg.int();
|
|
913
1022
|
break;
|
|
914
1023
|
}
|
|
915
|
-
case
|
|
1024
|
+
case 25: {
|
|
916
1025
|
let handle = msg.type();
|
|
917
1026
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
918
1027
|
if (!inst)
|
|
@@ -920,7 +1029,7 @@ export class zappar_client {
|
|
|
920
1029
|
inst.plane_count = msg.int();
|
|
921
1030
|
break;
|
|
922
1031
|
}
|
|
923
|
-
case
|
|
1032
|
+
case 26: {
|
|
924
1033
|
let handle = msg.type();
|
|
925
1034
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
926
1035
|
if (!inst)
|
|
@@ -929,7 +1038,7 @@ export class zappar_client {
|
|
|
929
1038
|
inst.plane_pose[indx] = msg.matrix4x4();
|
|
930
1039
|
break;
|
|
931
1040
|
}
|
|
932
|
-
case
|
|
1041
|
+
case 27: {
|
|
933
1042
|
let handle = msg.type();
|
|
934
1043
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
935
1044
|
if (!inst)
|
|
@@ -937,7 +1046,7 @@ export class zappar_client {
|
|
|
937
1046
|
inst.world_anchor_valid = msg.bool();
|
|
938
1047
|
break;
|
|
939
1048
|
}
|
|
940
|
-
case
|
|
1049
|
+
case 28: {
|
|
941
1050
|
let handle = msg.type();
|
|
942
1051
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
943
1052
|
if (!inst)
|
|
@@ -945,7 +1054,7 @@ export class zappar_client {
|
|
|
945
1054
|
inst.world_anchor_pose = msg.matrix4x4();
|
|
946
1055
|
break;
|
|
947
1056
|
}
|
|
948
|
-
case
|
|
1057
|
+
case 27: {
|
|
949
1058
|
let handle = msg.type();
|
|
950
1059
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
951
1060
|
if (!inst)
|
|
@@ -953,7 +1062,7 @@ export class zappar_client {
|
|
|
953
1062
|
inst.world_anchor_valid = msg.bool();
|
|
954
1063
|
break;
|
|
955
1064
|
}
|
|
956
|
-
case
|
|
1065
|
+
case 30: {
|
|
957
1066
|
let handle = msg.type();
|
|
958
1067
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
959
1068
|
if (!inst)
|
|
@@ -961,7 +1070,7 @@ export class zappar_client {
|
|
|
961
1070
|
inst.ground_anchor_pose = msg.matrix4x4();
|
|
962
1071
|
break;
|
|
963
1072
|
}
|
|
964
|
-
case
|
|
1073
|
+
case 33: {
|
|
965
1074
|
let handle = msg.type();
|
|
966
1075
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
967
1076
|
if (!inst)
|
|
@@ -969,7 +1078,7 @@ export class zappar_client {
|
|
|
969
1078
|
inst.debug_tracks_data_size = msg.int();
|
|
970
1079
|
break;
|
|
971
1080
|
}
|
|
972
|
-
case
|
|
1081
|
+
case 32: {
|
|
973
1082
|
let handle = msg.type();
|
|
974
1083
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
975
1084
|
if (!inst)
|
|
@@ -977,7 +1086,7 @@ export class zappar_client {
|
|
|
977
1086
|
inst.debug_tracks_data = msg.floatArray();
|
|
978
1087
|
break;
|
|
979
1088
|
}
|
|
980
|
-
case
|
|
1089
|
+
case 35: {
|
|
981
1090
|
let handle = msg.type();
|
|
982
1091
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
983
1092
|
if (!inst)
|
|
@@ -985,7 +1094,7 @@ export class zappar_client {
|
|
|
985
1094
|
inst.debug_projections_data_size = msg.int();
|
|
986
1095
|
break;
|
|
987
1096
|
}
|
|
988
|
-
case
|
|
1097
|
+
case 34: {
|
|
989
1098
|
let handle = msg.type();
|
|
990
1099
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
991
1100
|
if (!inst)
|
package/lib/gen/zappar-cwrap.js
CHANGED
|
@@ -38,7 +38,7 @@ export function getRuntimeObject(mod) {
|
|
|
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",
|
|
41
|
-
"number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number"
|
|
41
|
+
"number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number", "number"
|
|
42
42
|
]);
|
|
43
43
|
let pipeline_camera_frame_camera_attitude_wrapped = mod.cwrap("zappar_pipeline_camera_frame_camera_attitude", "number", [
|
|
44
44
|
"number"
|
|
@@ -198,6 +198,33 @@ export function getRuntimeObject(mod) {
|
|
|
198
198
|
"number",
|
|
199
199
|
"number", "number", "number", "number"
|
|
200
200
|
]);
|
|
201
|
+
let zapcode_tracker_create_wrapped = mod.cwrap("zappar_zapcode_tracker_create", "number", ["number"]);
|
|
202
|
+
let zapcode_tracker_destroy_wrapped = mod.cwrap("zappar_zapcode_tracker_destroy", null, ["number"]);
|
|
203
|
+
let zapcode_tracker_target_load_from_memory_wrapped = mod.cwrap("zappar_zapcode_tracker_target_load_from_memory", null, [
|
|
204
|
+
"number",
|
|
205
|
+
"number", "number"
|
|
206
|
+
]);
|
|
207
|
+
let zapcode_tracker_target_loaded_version_wrapped = mod.cwrap("zappar_zapcode_tracker_target_loaded_version", "number", [
|
|
208
|
+
"number"
|
|
209
|
+
]);
|
|
210
|
+
let zapcode_tracker_enabled_wrapped = mod.cwrap("zappar_zapcode_tracker_enabled", "number", [
|
|
211
|
+
"number"
|
|
212
|
+
]);
|
|
213
|
+
let zapcode_tracker_enabled_set_wrapped = mod.cwrap("zappar_zapcode_tracker_enabled_set", null, [
|
|
214
|
+
"number",
|
|
215
|
+
"number"
|
|
216
|
+
]);
|
|
217
|
+
let zapcode_tracker_anchor_count_wrapped = mod.cwrap("zappar_zapcode_tracker_anchor_count", "number", [
|
|
218
|
+
"number"
|
|
219
|
+
]);
|
|
220
|
+
let zapcode_tracker_anchor_id_wrapped = mod.cwrap("zappar_zapcode_tracker_anchor_id", "string", [
|
|
221
|
+
"number",
|
|
222
|
+
"number"
|
|
223
|
+
]);
|
|
224
|
+
let zapcode_tracker_anchor_pose_raw_wrapped = mod.cwrap("zappar_zapcode_tracker_anchor_pose_raw", "number", [
|
|
225
|
+
"number",
|
|
226
|
+
"number"
|
|
227
|
+
]);
|
|
201
228
|
let world_tracker_create_wrapped = mod.cwrap("zappar_world_tracker_create", "number", ["number"]);
|
|
202
229
|
let world_tracker_destroy_wrapped = mod.cwrap("zappar_world_tracker_destroy", null, ["number"]);
|
|
203
230
|
let world_tracker_enabled_wrapped = mod.cwrap("zappar_world_tracker_enabled", "number", [
|
|
@@ -343,7 +370,7 @@ export function getRuntimeObject(mod) {
|
|
|
343
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);
|
|
344
371
|
return ret;
|
|
345
372
|
},
|
|
346
|
-
pipeline_camera_frame_submit_raw_pointer: (o, data, dataLength, format, width, height, user_data, camera_to_device_transform, rotation, camera_model, user_facing, timestamp) => {
|
|
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) => {
|
|
347
374
|
let arg_data = data;
|
|
348
375
|
let arg_dataLength = dataLength;
|
|
349
376
|
let arg_format = format;
|
|
@@ -357,7 +384,8 @@ export function getRuntimeObject(mod) {
|
|
|
357
384
|
mod.HEAPF32.set(camera_model, arg_camera_model / 4);
|
|
358
385
|
let arg_user_facing = user_facing ? 1 : 0;
|
|
359
386
|
let arg_timestamp = timestamp;
|
|
360
|
-
let
|
|
387
|
+
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);
|
|
361
389
|
return ret;
|
|
362
390
|
},
|
|
363
391
|
pipeline_camera_frame_camera_attitude: (o) => {
|
|
@@ -665,6 +693,56 @@ export function getRuntimeObject(mod) {
|
|
|
665
693
|
let ret = instant_world_tracker_anchor_pose_set_from_camera_offset_raw_wrapped(o, arg_x, arg_y, arg_z, arg_orientation);
|
|
666
694
|
return ret;
|
|
667
695
|
},
|
|
696
|
+
zapcode_tracker_create: (pipeline) => {
|
|
697
|
+
let arg_pipeline = pipeline;
|
|
698
|
+
return zapcode_tracker_create_wrapped(arg_pipeline);
|
|
699
|
+
},
|
|
700
|
+
zapcode_tracker_destroy: () => {
|
|
701
|
+
zapcode_tracker_destroy_wrapped();
|
|
702
|
+
},
|
|
703
|
+
zapcode_tracker_target_load_from_memory: (o, data) => {
|
|
704
|
+
if (dataArrayArgLength < data.byteLength) {
|
|
705
|
+
mod._free(dataArrayArg);
|
|
706
|
+
dataArrayArgLength = data.byteLength;
|
|
707
|
+
dataArrayArg = mod._malloc(dataArrayArgLength);
|
|
708
|
+
}
|
|
709
|
+
let arg_data = dataArrayArg;
|
|
710
|
+
let arg_len_data = data.byteLength;
|
|
711
|
+
mod.HEAPU8.set(new Uint8Array(data), dataArrayArg);
|
|
712
|
+
let ret = zapcode_tracker_target_load_from_memory_wrapped(o, arg_data, arg_len_data);
|
|
713
|
+
return ret;
|
|
714
|
+
},
|
|
715
|
+
zapcode_tracker_target_loaded_version: (o) => {
|
|
716
|
+
let ret = zapcode_tracker_target_loaded_version_wrapped(o);
|
|
717
|
+
return ret;
|
|
718
|
+
},
|
|
719
|
+
zapcode_tracker_enabled: (o) => {
|
|
720
|
+
let ret = zapcode_tracker_enabled_wrapped(o);
|
|
721
|
+
ret = ret === 1;
|
|
722
|
+
return ret;
|
|
723
|
+
},
|
|
724
|
+
zapcode_tracker_enabled_set: (o, enabled) => {
|
|
725
|
+
let arg_enabled = enabled ? 1 : 0;
|
|
726
|
+
let ret = zapcode_tracker_enabled_set_wrapped(o, arg_enabled);
|
|
727
|
+
return ret;
|
|
728
|
+
},
|
|
729
|
+
zapcode_tracker_anchor_count: (o) => {
|
|
730
|
+
let ret = zapcode_tracker_anchor_count_wrapped(o);
|
|
731
|
+
return ret;
|
|
732
|
+
},
|
|
733
|
+
zapcode_tracker_anchor_id: (o, indx) => {
|
|
734
|
+
let arg_indx = indx;
|
|
735
|
+
let ret = zapcode_tracker_anchor_id_wrapped(o, arg_indx);
|
|
736
|
+
return ret;
|
|
737
|
+
},
|
|
738
|
+
zapcode_tracker_anchor_pose_raw: (o, indx) => {
|
|
739
|
+
let arg_indx = indx;
|
|
740
|
+
let ret = zapcode_tracker_anchor_pose_raw_wrapped(o, arg_indx);
|
|
741
|
+
let ab = new Float32Array(16);
|
|
742
|
+
ab.set(mod.HEAPF32.subarray(ret / 4, 16 + ret / 4));
|
|
743
|
+
ret = ab;
|
|
744
|
+
return ret;
|
|
745
|
+
},
|
|
668
746
|
world_tracker_create: (pipeline) => {
|
|
669
747
|
let arg_pipeline = pipeline;
|
|
670
748
|
return world_tracker_create_wrapped(arg_pipeline);
|
|
@@ -66,6 +66,10 @@ export declare enum world_tracker_quality_t {
|
|
|
66
66
|
WORLD_TRACKER_QUALITY_GOOD = 1,
|
|
67
67
|
WORLD_TRACKER_QUALITY_ORIENTATION_ONLY = 2
|
|
68
68
|
}
|
|
69
|
+
export declare enum camera_profile_t {
|
|
70
|
+
DEFAULT = 0,
|
|
71
|
+
HIGH = 1
|
|
72
|
+
}
|
|
69
73
|
export declare type zappar_pipeline_t = number & {
|
|
70
74
|
_: 'zappar_pipeline_t';
|
|
71
75
|
};
|
|
@@ -93,6 +97,9 @@ export declare type zappar_barcode_finder_t = number & {
|
|
|
93
97
|
export declare type zappar_instant_world_tracker_t = number & {
|
|
94
98
|
_: 'zappar_instant_world_tracker_t';
|
|
95
99
|
};
|
|
100
|
+
export declare type zappar_zapcode_tracker_t = number & {
|
|
101
|
+
_: 'zappar_zapcode_tracker_t';
|
|
102
|
+
};
|
|
96
103
|
export declare type zappar_world_tracker_t = number & {
|
|
97
104
|
_: 'zappar_world_tracker_t';
|
|
98
105
|
};
|
|
@@ -111,7 +118,7 @@ export interface zappar_cwrap {
|
|
|
111
118
|
pipeline_camera_model(o: zappar_pipeline_t): Float32Array;
|
|
112
119
|
pipeline_camera_frame_user_data(o: zappar_pipeline_t): number;
|
|
113
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;
|
|
114
|
-
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): 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;
|
|
115
122
|
pipeline_camera_frame_camera_attitude(o: zappar_pipeline_t): Float32Array;
|
|
116
123
|
pipeline_camera_frame_device_attitude(o: zappar_pipeline_t): Float32Array;
|
|
117
124
|
pipeline_motion_accelerometer_submit(o: zappar_pipeline_t, time: number, x: number, y: number, z: number): void;
|
|
@@ -167,6 +174,15 @@ export interface zappar_cwrap {
|
|
|
167
174
|
instant_world_tracker_enabled(o: zappar_instant_world_tracker_t): boolean;
|
|
168
175
|
instant_world_tracker_anchor_pose_raw(o: zappar_instant_world_tracker_t): Float32Array;
|
|
169
176
|
instant_world_tracker_anchor_pose_set_from_camera_offset_raw(o: zappar_instant_world_tracker_t, x: number, y: number, z: number, orientation: instant_world_tracker_transform_orientation_t): void;
|
|
177
|
+
zapcode_tracker_create(pipeline: zappar_pipeline_t): zappar_zapcode_tracker_t;
|
|
178
|
+
zapcode_tracker_destroy(o: zappar_zapcode_tracker_t): void;
|
|
179
|
+
zapcode_tracker_target_load_from_memory(o: zappar_zapcode_tracker_t, data: ArrayBuffer): void;
|
|
180
|
+
zapcode_tracker_target_loaded_version(o: zappar_zapcode_tracker_t): number;
|
|
181
|
+
zapcode_tracker_enabled(o: zappar_zapcode_tracker_t): boolean;
|
|
182
|
+
zapcode_tracker_enabled_set(o: zappar_zapcode_tracker_t, enabled: boolean): void;
|
|
183
|
+
zapcode_tracker_anchor_count(o: zappar_zapcode_tracker_t): number;
|
|
184
|
+
zapcode_tracker_anchor_id(o: zappar_zapcode_tracker_t, indx: number): string;
|
|
185
|
+
zapcode_tracker_anchor_pose_raw(o: zappar_zapcode_tracker_t, indx: number): Float32Array;
|
|
170
186
|
world_tracker_create(pipeline: zappar_pipeline_t): zappar_world_tracker_t;
|
|
171
187
|
world_tracker_destroy(o: zappar_world_tracker_t): void;
|
|
172
188
|
world_tracker_enabled(o: zappar_world_tracker_t): boolean;
|
package/lib/gen/zappar-native.js
CHANGED
|
@@ -80,3 +80,9 @@ export var world_tracker_quality_t;
|
|
|
80
80
|
world_tracker_quality_t[world_tracker_quality_t["WORLD_TRACKER_QUALITY_ORIENTATION_ONLY"] = 2] = "WORLD_TRACKER_QUALITY_ORIENTATION_ONLY";
|
|
81
81
|
})(world_tracker_quality_t || (world_tracker_quality_t = {}));
|
|
82
82
|
;
|
|
83
|
+
export var camera_profile_t;
|
|
84
|
+
(function (camera_profile_t) {
|
|
85
|
+
camera_profile_t[camera_profile_t["DEFAULT"] = 0] = "DEFAULT";
|
|
86
|
+
camera_profile_t[camera_profile_t["HIGH"] = 1] = "HIGH";
|
|
87
|
+
})(camera_profile_t || (camera_profile_t = {}));
|
|
88
|
+
;
|
|
@@ -9,6 +9,7 @@ import { zappar_face_mesh_t } from "./zappar-native";
|
|
|
9
9
|
import { zappar_face_landmark_t } from "./zappar-native";
|
|
10
10
|
import { zappar_barcode_finder_t } from "./zappar-native";
|
|
11
11
|
import { zappar_instant_world_tracker_t } from "./zappar-native";
|
|
12
|
+
import { zappar_zapcode_tracker_t } from "./zappar-native";
|
|
12
13
|
import { zappar_world_tracker_t } from "./zappar-native";
|
|
13
14
|
export declare class zappar_server {
|
|
14
15
|
private _impl;
|
|
@@ -34,6 +35,8 @@ export declare class zappar_server {
|
|
|
34
35
|
_barcode_finder_by_instance: Map<number, zappar_barcode_finder_t>;
|
|
35
36
|
_pipeline_id_by_instant_world_tracker_id: Map<number, number>;
|
|
36
37
|
_instant_world_tracker_by_instance: Map<number, zappar_instant_world_tracker_t>;
|
|
38
|
+
_pipeline_id_by_zapcode_tracker_id: Map<number, number>;
|
|
39
|
+
_zapcode_tracker_by_instance: Map<number, zappar_zapcode_tracker_t>;
|
|
37
40
|
_pipeline_id_by_world_tracker_id: Map<number, number>;
|
|
38
41
|
_world_tracker_by_instance: Map<number, zappar_world_tracker_t>;
|
|
39
42
|
processBuffer(b: ArrayBuffer): void;
|