@zappar/zappar-cv 3.0.1-beta.0 → 3.0.1-beta.10
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 +14 -3
- package/lib/cameramodel.d.ts +1 -1
- package/lib/cameramodel.js +3 -3
- package/lib/drawpointswithtype.d.ts +1 -1
- package/lib/drawpointswithtype.js +11 -13
- package/lib/drawquad.d.ts +2 -0
- package/lib/drawquad.js +99 -0
- package/lib/gen/zappar-bridge.d.ts +5 -2
- package/lib/gen/zappar-client.js +103 -55
- package/lib/gen/zappar-cwrap.js +37 -26
- package/lib/gen/zappar-native.d.ts +5 -4
- package/lib/gen/zappar-server.js +63 -43
- package/lib/gen/zappar.d.ts +7 -4
- package/lib/html-element-source.js +1 -1
- package/lib/mstp-camera-source.js +2 -1
- package/lib/native.js +247 -35
- package/lib/permission.d.ts +3 -2
- package/lib/permission.js +18 -15
- package/lib/tracing/jsontracer.d.ts +14 -0
- package/lib/tracing/jsontracer.js +37 -0
- package/lib/tracing/performancetracer.d.ts +11 -0
- package/lib/tracing/performancetracer.js +17 -0
- package/lib/tracing/sharedtracer.d.ts +2 -0
- package/lib/tracing/sharedtracer.js +8 -0
- package/lib/tracing/usertimingtracer.d.ts +10 -0
- package/lib/tracing/usertimingtracer.js +30 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/worker-server.js +3 -3
- package/lib/zappar-cv.js +1 -1
- package/lib/zappar-cv.wasm +0 -0
- package/package.json +8 -16
- package/umd/{c8e05439176ea756192a.wasm → 067b89f3ea352f4f7279.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/lib/gen/zappar-client.js
CHANGED
|
@@ -44,6 +44,8 @@ export class zappar_client {
|
|
|
44
44
|
let s = {
|
|
45
45
|
current_frame_user_data: 0,
|
|
46
46
|
camera_model: new Float32Array([300, 300, 160, 120, 0, 0]),
|
|
47
|
+
camera_data_width: 320,
|
|
48
|
+
camera_data_height: 240,
|
|
47
49
|
camera_pose: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
|
|
48
50
|
camera_frame_camera_attitude: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
|
|
49
51
|
camera_frame_device_attitude: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
|
|
@@ -84,6 +86,18 @@ export class zappar_client {
|
|
|
84
86
|
throw new Error("This object has been destroyed");
|
|
85
87
|
return s.camera_model;
|
|
86
88
|
},
|
|
89
|
+
pipeline_camera_data_width: (o) => {
|
|
90
|
+
let s = this._pipeline_state_by_instance.get(o);
|
|
91
|
+
if (!s)
|
|
92
|
+
throw new Error("This object has been destroyed");
|
|
93
|
+
return s.camera_data_width;
|
|
94
|
+
},
|
|
95
|
+
pipeline_camera_data_height: (o) => {
|
|
96
|
+
let s = this._pipeline_state_by_instance.get(o);
|
|
97
|
+
if (!s)
|
|
98
|
+
throw new Error("This object has been destroyed");
|
|
99
|
+
return s.camera_data_height;
|
|
100
|
+
},
|
|
87
101
|
pipeline_camera_frame_user_data: (o) => {
|
|
88
102
|
let s = this._pipeline_state_by_instance.get(o);
|
|
89
103
|
if (!s)
|
|
@@ -937,9 +951,9 @@ export class zappar_client {
|
|
|
937
951
|
custom_anchor_create: (pipeline, worldtracker, id) => {
|
|
938
952
|
let newId = (this._latestId++);
|
|
939
953
|
let s = {
|
|
940
|
-
enabled: true,
|
|
941
954
|
pose: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
|
|
942
|
-
status:
|
|
955
|
+
status: 3,
|
|
956
|
+
pose_version: 0,
|
|
943
957
|
};
|
|
944
958
|
this._custom_anchor_state_by_instance.set(newId, s);
|
|
945
959
|
this.serializer.sendMessage(53, m => {
|
|
@@ -965,20 +979,11 @@ export class zappar_client {
|
|
|
965
979
|
throw new Error("This object has been destroyed");
|
|
966
980
|
return s.status;
|
|
967
981
|
},
|
|
968
|
-
|
|
969
|
-
let s = this._custom_anchor_state_by_instance.get(o);
|
|
970
|
-
if (!s)
|
|
971
|
-
throw new Error("This object has been destroyed");
|
|
972
|
-
this.serializer.sendMessage(55, m => {
|
|
973
|
-
m.type(o);
|
|
974
|
-
m.bool(enabled);
|
|
975
|
-
});
|
|
976
|
-
},
|
|
977
|
-
custom_anchor_enabled: (o) => {
|
|
982
|
+
custom_anchor_pose_version: (o) => {
|
|
978
983
|
let s = this._custom_anchor_state_by_instance.get(o);
|
|
979
984
|
if (!s)
|
|
980
985
|
throw new Error("This object has been destroyed");
|
|
981
|
-
return s.
|
|
986
|
+
return s.pose_version;
|
|
982
987
|
},
|
|
983
988
|
custom_anchor_pose_raw: (o) => {
|
|
984
989
|
let s = this._custom_anchor_state_by_instance.get(o);
|
|
@@ -990,7 +995,7 @@ export class zappar_client {
|
|
|
990
995
|
let s = this._custom_anchor_state_by_instance.get(o);
|
|
991
996
|
if (!s)
|
|
992
997
|
throw new Error("This object has been destroyed");
|
|
993
|
-
this.serializer.sendMessage(
|
|
998
|
+
this.serializer.sendMessage(55, m => {
|
|
994
999
|
m.type(o);
|
|
995
1000
|
m.float(x);
|
|
996
1001
|
m.float(y);
|
|
@@ -1002,7 +1007,7 @@ export class zappar_client {
|
|
|
1002
1007
|
let s = this._custom_anchor_state_by_instance.get(o);
|
|
1003
1008
|
if (!s)
|
|
1004
1009
|
throw new Error("This object has been destroyed");
|
|
1005
|
-
this.serializer.sendMessage(
|
|
1010
|
+
this.serializer.sendMessage(56, m => {
|
|
1006
1011
|
m.type(o);
|
|
1007
1012
|
m.string(anchor_id);
|
|
1008
1013
|
m.float(x);
|
|
@@ -1011,13 +1016,32 @@ export class zappar_client {
|
|
|
1011
1016
|
m.transformOrientation(orientation);
|
|
1012
1017
|
});
|
|
1013
1018
|
},
|
|
1019
|
+
custom_anchor_pose_set: (o, pose) => {
|
|
1020
|
+
let s = this._custom_anchor_state_by_instance.get(o);
|
|
1021
|
+
if (!s)
|
|
1022
|
+
throw new Error("This object has been destroyed");
|
|
1023
|
+
this.serializer.sendMessage(57, m => {
|
|
1024
|
+
m.type(o);
|
|
1025
|
+
m.matrix4x4(pose);
|
|
1026
|
+
});
|
|
1027
|
+
},
|
|
1028
|
+
custom_anchor_pose_set_with_parent: (o, pose, anchor_id) => {
|
|
1029
|
+
let s = this._custom_anchor_state_by_instance.get(o);
|
|
1030
|
+
if (!s)
|
|
1031
|
+
throw new Error("This object has been destroyed");
|
|
1032
|
+
this.serializer.sendMessage(58, m => {
|
|
1033
|
+
m.type(o);
|
|
1034
|
+
m.matrix4x4(pose);
|
|
1035
|
+
m.string(anchor_id);
|
|
1036
|
+
});
|
|
1037
|
+
},
|
|
1014
1038
|
};
|
|
1015
1039
|
}
|
|
1016
1040
|
processMessages(a) {
|
|
1017
1041
|
this.deserializer.setData(a);
|
|
1018
1042
|
this.deserializer.forMessages((messageId, msg) => {
|
|
1019
1043
|
switch (messageId) {
|
|
1020
|
-
case
|
|
1044
|
+
case 9: {
|
|
1021
1045
|
let handle = msg.type();
|
|
1022
1046
|
let inst = this._pipeline_state_by_instance.get(handle);
|
|
1023
1047
|
if (!inst)
|
|
@@ -1033,6 +1057,22 @@ export class zappar_client {
|
|
|
1033
1057
|
inst.camera_model = msg.cameraModel();
|
|
1034
1058
|
break;
|
|
1035
1059
|
}
|
|
1060
|
+
case 7: {
|
|
1061
|
+
let handle = msg.type();
|
|
1062
|
+
let inst = this._pipeline_state_by_instance.get(handle);
|
|
1063
|
+
if (!inst)
|
|
1064
|
+
return;
|
|
1065
|
+
inst.camera_data_width = msg.int();
|
|
1066
|
+
break;
|
|
1067
|
+
}
|
|
1068
|
+
case 8: {
|
|
1069
|
+
let handle = msg.type();
|
|
1070
|
+
let inst = this._pipeline_state_by_instance.get(handle);
|
|
1071
|
+
if (!inst)
|
|
1072
|
+
return;
|
|
1073
|
+
inst.camera_data_height = msg.int();
|
|
1074
|
+
break;
|
|
1075
|
+
}
|
|
1036
1076
|
case 5: {
|
|
1037
1077
|
let handle = msg.type();
|
|
1038
1078
|
let inst = this._pipeline_state_by_instance.get(handle);
|
|
@@ -1041,7 +1081,7 @@ export class zappar_client {
|
|
|
1041
1081
|
inst.current_frame_user_data = msg.int();
|
|
1042
1082
|
break;
|
|
1043
1083
|
}
|
|
1044
|
-
case
|
|
1084
|
+
case 13: {
|
|
1045
1085
|
let handle = msg.type();
|
|
1046
1086
|
let inst = this._pipeline_state_by_instance.get(handle);
|
|
1047
1087
|
if (!inst)
|
|
@@ -1049,7 +1089,7 @@ export class zappar_client {
|
|
|
1049
1089
|
inst.camera_frame_camera_attitude = msg.matrix4x4();
|
|
1050
1090
|
break;
|
|
1051
1091
|
}
|
|
1052
|
-
case
|
|
1092
|
+
case 14: {
|
|
1053
1093
|
let handle = msg.type();
|
|
1054
1094
|
let inst = this._pipeline_state_by_instance.get(handle);
|
|
1055
1095
|
if (!inst)
|
|
@@ -1057,7 +1097,7 @@ export class zappar_client {
|
|
|
1057
1097
|
inst.camera_frame_device_attitude = msg.matrix4x4();
|
|
1058
1098
|
break;
|
|
1059
1099
|
}
|
|
1060
|
-
case
|
|
1100
|
+
case 21: {
|
|
1061
1101
|
let handle = msg.type();
|
|
1062
1102
|
let inst = this._image_tracker_state_by_instance.get(handle);
|
|
1063
1103
|
if (!inst)
|
|
@@ -1091,7 +1131,7 @@ export class zappar_client {
|
|
|
1091
1131
|
inst.anchor_pose[indx] = msg.matrix4x4();
|
|
1092
1132
|
break;
|
|
1093
1133
|
}
|
|
1094
|
-
case
|
|
1134
|
+
case 20: {
|
|
1095
1135
|
let handle = msg.type();
|
|
1096
1136
|
let inst = this._face_tracker_state_by_instance.get(handle);
|
|
1097
1137
|
if (!inst)
|
|
@@ -1099,7 +1139,7 @@ export class zappar_client {
|
|
|
1099
1139
|
inst.model_loaded = msg.int();
|
|
1100
1140
|
break;
|
|
1101
1141
|
}
|
|
1102
|
-
case
|
|
1142
|
+
case 15: {
|
|
1103
1143
|
let handle = msg.type();
|
|
1104
1144
|
let inst = this._face_tracker_state_by_instance.get(handle);
|
|
1105
1145
|
if (!inst)
|
|
@@ -1107,7 +1147,7 @@ export class zappar_client {
|
|
|
1107
1147
|
inst.anchor_count = msg.int();
|
|
1108
1148
|
break;
|
|
1109
1149
|
}
|
|
1110
|
-
case
|
|
1150
|
+
case 16: {
|
|
1111
1151
|
let handle = msg.type();
|
|
1112
1152
|
let inst = this._face_tracker_state_by_instance.get(handle);
|
|
1113
1153
|
if (!inst)
|
|
@@ -1116,7 +1156,7 @@ export class zappar_client {
|
|
|
1116
1156
|
inst.anchor_id[indx] = msg.string();
|
|
1117
1157
|
break;
|
|
1118
1158
|
}
|
|
1119
|
-
case
|
|
1159
|
+
case 17: {
|
|
1120
1160
|
let handle = msg.type();
|
|
1121
1161
|
let inst = this._face_tracker_state_by_instance.get(handle);
|
|
1122
1162
|
if (!inst)
|
|
@@ -1125,7 +1165,7 @@ export class zappar_client {
|
|
|
1125
1165
|
inst.anchor_pose[indx] = msg.matrix4x4();
|
|
1126
1166
|
break;
|
|
1127
1167
|
}
|
|
1128
|
-
case
|
|
1168
|
+
case 18: {
|
|
1129
1169
|
let handle = msg.type();
|
|
1130
1170
|
let inst = this._face_tracker_state_by_instance.get(handle);
|
|
1131
1171
|
if (!inst)
|
|
@@ -1134,7 +1174,7 @@ export class zappar_client {
|
|
|
1134
1174
|
inst.anchor_identity_coefficients[indx] = msg.identityCoefficients();
|
|
1135
1175
|
break;
|
|
1136
1176
|
}
|
|
1137
|
-
case
|
|
1177
|
+
case 19: {
|
|
1138
1178
|
let handle = msg.type();
|
|
1139
1179
|
let inst = this._face_tracker_state_by_instance.get(handle);
|
|
1140
1180
|
if (!inst)
|
|
@@ -1143,7 +1183,7 @@ export class zappar_client {
|
|
|
1143
1183
|
inst.anchor_expression_coefficients[indx] = msg.expressionCoefficients();
|
|
1144
1184
|
break;
|
|
1145
1185
|
}
|
|
1146
|
-
case
|
|
1186
|
+
case 10: {
|
|
1147
1187
|
let handle = msg.type();
|
|
1148
1188
|
let inst = this._barcode_finder_state_by_instance.get(handle);
|
|
1149
1189
|
if (!inst)
|
|
@@ -1151,7 +1191,7 @@ export class zappar_client {
|
|
|
1151
1191
|
inst.number_found = msg.int();
|
|
1152
1192
|
break;
|
|
1153
1193
|
}
|
|
1154
|
-
case
|
|
1194
|
+
case 11: {
|
|
1155
1195
|
let handle = msg.type();
|
|
1156
1196
|
let inst = this._barcode_finder_state_by_instance.get(handle);
|
|
1157
1197
|
if (!inst)
|
|
@@ -1160,7 +1200,7 @@ export class zappar_client {
|
|
|
1160
1200
|
inst.found_text[indx] = msg.string();
|
|
1161
1201
|
break;
|
|
1162
1202
|
}
|
|
1163
|
-
case
|
|
1203
|
+
case 12: {
|
|
1164
1204
|
let handle = msg.type();
|
|
1165
1205
|
let inst = this._barcode_finder_state_by_instance.get(handle);
|
|
1166
1206
|
if (!inst)
|
|
@@ -1177,7 +1217,7 @@ export class zappar_client {
|
|
|
1177
1217
|
inst.pose = msg.matrix4x4();
|
|
1178
1218
|
break;
|
|
1179
1219
|
}
|
|
1180
|
-
case
|
|
1220
|
+
case 26: {
|
|
1181
1221
|
let handle = msg.type();
|
|
1182
1222
|
let inst = this._zapcode_tracker_state_by_instance.get(handle);
|
|
1183
1223
|
if (!inst)
|
|
@@ -1185,7 +1225,7 @@ export class zappar_client {
|
|
|
1185
1225
|
inst.target_loaded_version = msg.int();
|
|
1186
1226
|
break;
|
|
1187
1227
|
}
|
|
1188
|
-
case
|
|
1228
|
+
case 23: {
|
|
1189
1229
|
let handle = msg.type();
|
|
1190
1230
|
let inst = this._zapcode_tracker_state_by_instance.get(handle);
|
|
1191
1231
|
if (!inst)
|
|
@@ -1193,7 +1233,7 @@ export class zappar_client {
|
|
|
1193
1233
|
inst.anchor_count = msg.int();
|
|
1194
1234
|
break;
|
|
1195
1235
|
}
|
|
1196
|
-
case
|
|
1236
|
+
case 24: {
|
|
1197
1237
|
let handle = msg.type();
|
|
1198
1238
|
let inst = this._zapcode_tracker_state_by_instance.get(handle);
|
|
1199
1239
|
if (!inst)
|
|
@@ -1202,7 +1242,7 @@ export class zappar_client {
|
|
|
1202
1242
|
inst.anchor_id[indx] = msg.string();
|
|
1203
1243
|
break;
|
|
1204
1244
|
}
|
|
1205
|
-
case
|
|
1245
|
+
case 25: {
|
|
1206
1246
|
let handle = msg.type();
|
|
1207
1247
|
let inst = this._zapcode_tracker_state_by_instance.get(handle);
|
|
1208
1248
|
if (!inst)
|
|
@@ -1211,7 +1251,7 @@ export class zappar_client {
|
|
|
1211
1251
|
inst.anchor_pose[indx] = msg.matrix4x4();
|
|
1212
1252
|
break;
|
|
1213
1253
|
}
|
|
1214
|
-
case
|
|
1254
|
+
case 42: {
|
|
1215
1255
|
let handle = msg.type();
|
|
1216
1256
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1217
1257
|
if (!inst)
|
|
@@ -1219,7 +1259,7 @@ export class zappar_client {
|
|
|
1219
1259
|
inst.quality = msg.int();
|
|
1220
1260
|
break;
|
|
1221
1261
|
}
|
|
1222
|
-
case
|
|
1262
|
+
case 27: {
|
|
1223
1263
|
let handle = msg.type();
|
|
1224
1264
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1225
1265
|
if (!inst)
|
|
@@ -1227,7 +1267,7 @@ export class zappar_client {
|
|
|
1227
1267
|
inst.plane_anchor_count = msg.int();
|
|
1228
1268
|
break;
|
|
1229
1269
|
}
|
|
1230
|
-
case
|
|
1270
|
+
case 35: {
|
|
1231
1271
|
let handle = msg.type();
|
|
1232
1272
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1233
1273
|
if (!inst)
|
|
@@ -1236,7 +1276,7 @@ export class zappar_client {
|
|
|
1236
1276
|
inst.plane_anchor_id[indx] = msg.string();
|
|
1237
1277
|
break;
|
|
1238
1278
|
}
|
|
1239
|
-
case
|
|
1279
|
+
case 28: {
|
|
1240
1280
|
let handle = msg.type();
|
|
1241
1281
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1242
1282
|
if (!inst)
|
|
@@ -1245,7 +1285,7 @@ export class zappar_client {
|
|
|
1245
1285
|
inst.plane_anchor_pose[indx] = msg.matrix4x4();
|
|
1246
1286
|
break;
|
|
1247
1287
|
}
|
|
1248
|
-
case
|
|
1288
|
+
case 30: {
|
|
1249
1289
|
let handle = msg.type();
|
|
1250
1290
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1251
1291
|
if (!inst)
|
|
@@ -1254,7 +1294,7 @@ export class zappar_client {
|
|
|
1254
1294
|
inst.plane_anchor_status[indx] = msg.anchorStatus();
|
|
1255
1295
|
break;
|
|
1256
1296
|
}
|
|
1257
|
-
case
|
|
1297
|
+
case 31: {
|
|
1258
1298
|
let handle = msg.type();
|
|
1259
1299
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1260
1300
|
if (!inst)
|
|
@@ -1263,7 +1303,7 @@ export class zappar_client {
|
|
|
1263
1303
|
inst.plane_anchor_polygon_data_size[indx] = msg.int();
|
|
1264
1304
|
break;
|
|
1265
1305
|
}
|
|
1266
|
-
case
|
|
1306
|
+
case 32: {
|
|
1267
1307
|
let handle = msg.type();
|
|
1268
1308
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1269
1309
|
if (!inst)
|
|
@@ -1272,7 +1312,7 @@ export class zappar_client {
|
|
|
1272
1312
|
inst.plane_anchor_polygon_data[indx] = msg.floatArray();
|
|
1273
1313
|
break;
|
|
1274
1314
|
}
|
|
1275
|
-
case
|
|
1315
|
+
case 33: {
|
|
1276
1316
|
let handle = msg.type();
|
|
1277
1317
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1278
1318
|
if (!inst)
|
|
@@ -1281,7 +1321,7 @@ export class zappar_client {
|
|
|
1281
1321
|
inst.plane_anchor_polygon_version[indx] = msg.int();
|
|
1282
1322
|
break;
|
|
1283
1323
|
}
|
|
1284
|
-
case
|
|
1324
|
+
case 34: {
|
|
1285
1325
|
let handle = msg.type();
|
|
1286
1326
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1287
1327
|
if (!inst)
|
|
@@ -1290,7 +1330,7 @@ export class zappar_client {
|
|
|
1290
1330
|
inst.plane_anchor_orientation[indx] = msg.planeOrientation();
|
|
1291
1331
|
break;
|
|
1292
1332
|
}
|
|
1293
|
-
case
|
|
1333
|
+
case 38: {
|
|
1294
1334
|
let handle = msg.type();
|
|
1295
1335
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1296
1336
|
if (!inst)
|
|
@@ -1298,7 +1338,7 @@ export class zappar_client {
|
|
|
1298
1338
|
inst.world_anchor_status = msg.anchorStatus();
|
|
1299
1339
|
break;
|
|
1300
1340
|
}
|
|
1301
|
-
case
|
|
1341
|
+
case 37: {
|
|
1302
1342
|
let handle = msg.type();
|
|
1303
1343
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1304
1344
|
if (!inst)
|
|
@@ -1306,7 +1346,7 @@ export class zappar_client {
|
|
|
1306
1346
|
inst.world_anchor_id = msg.string();
|
|
1307
1347
|
break;
|
|
1308
1348
|
}
|
|
1309
|
-
case
|
|
1349
|
+
case 36: {
|
|
1310
1350
|
let handle = msg.type();
|
|
1311
1351
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1312
1352
|
if (!inst)
|
|
@@ -1314,7 +1354,7 @@ export class zappar_client {
|
|
|
1314
1354
|
inst.world_anchor_pose = msg.matrix4x4();
|
|
1315
1355
|
break;
|
|
1316
1356
|
}
|
|
1317
|
-
case
|
|
1357
|
+
case 40: {
|
|
1318
1358
|
let handle = msg.type();
|
|
1319
1359
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1320
1360
|
if (!inst)
|
|
@@ -1322,7 +1362,7 @@ export class zappar_client {
|
|
|
1322
1362
|
inst.ground_anchor_id = msg.string();
|
|
1323
1363
|
break;
|
|
1324
1364
|
}
|
|
1325
|
-
case
|
|
1365
|
+
case 41: {
|
|
1326
1366
|
let handle = msg.type();
|
|
1327
1367
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1328
1368
|
if (!inst)
|
|
@@ -1330,7 +1370,7 @@ export class zappar_client {
|
|
|
1330
1370
|
inst.ground_anchor_status = msg.anchorStatus();
|
|
1331
1371
|
break;
|
|
1332
1372
|
}
|
|
1333
|
-
case
|
|
1373
|
+
case 39: {
|
|
1334
1374
|
let handle = msg.type();
|
|
1335
1375
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1336
1376
|
if (!inst)
|
|
@@ -1338,7 +1378,7 @@ export class zappar_client {
|
|
|
1338
1378
|
inst.ground_anchor_pose = msg.matrix4x4();
|
|
1339
1379
|
break;
|
|
1340
1380
|
}
|
|
1341
|
-
case
|
|
1381
|
+
case 45: {
|
|
1342
1382
|
let handle = msg.type();
|
|
1343
1383
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1344
1384
|
if (!inst)
|
|
@@ -1346,7 +1386,7 @@ export class zappar_client {
|
|
|
1346
1386
|
inst.tracks_data_size = msg.int();
|
|
1347
1387
|
break;
|
|
1348
1388
|
}
|
|
1349
|
-
case
|
|
1389
|
+
case 44: {
|
|
1350
1390
|
let handle = msg.type();
|
|
1351
1391
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1352
1392
|
if (!inst)
|
|
@@ -1354,7 +1394,7 @@ export class zappar_client {
|
|
|
1354
1394
|
inst.tracks_data = msg.floatArray();
|
|
1355
1395
|
break;
|
|
1356
1396
|
}
|
|
1357
|
-
case
|
|
1397
|
+
case 47: {
|
|
1358
1398
|
let handle = msg.type();
|
|
1359
1399
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1360
1400
|
if (!inst)
|
|
@@ -1362,7 +1402,7 @@ export class zappar_client {
|
|
|
1362
1402
|
inst.tracks_type_data_size = msg.int();
|
|
1363
1403
|
break;
|
|
1364
1404
|
}
|
|
1365
|
-
case
|
|
1405
|
+
case 46: {
|
|
1366
1406
|
let handle = msg.type();
|
|
1367
1407
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1368
1408
|
if (!inst)
|
|
@@ -1370,7 +1410,7 @@ export class zappar_client {
|
|
|
1370
1410
|
inst.tracks_type_data = msg.ucharArray();
|
|
1371
1411
|
break;
|
|
1372
1412
|
}
|
|
1373
|
-
case
|
|
1413
|
+
case 50: {
|
|
1374
1414
|
let handle = msg.type();
|
|
1375
1415
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1376
1416
|
if (!inst)
|
|
@@ -1378,7 +1418,7 @@ export class zappar_client {
|
|
|
1378
1418
|
inst.projections_data_size = msg.int();
|
|
1379
1419
|
break;
|
|
1380
1420
|
}
|
|
1381
|
-
case
|
|
1421
|
+
case 49: {
|
|
1382
1422
|
let handle = msg.type();
|
|
1383
1423
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1384
1424
|
if (!inst)
|
|
@@ -1386,7 +1426,7 @@ export class zappar_client {
|
|
|
1386
1426
|
inst.projections_data = msg.floatArray();
|
|
1387
1427
|
break;
|
|
1388
1428
|
}
|
|
1389
|
-
case
|
|
1429
|
+
case 52: {
|
|
1390
1430
|
let handle = msg.type();
|
|
1391
1431
|
let inst = this._custom_anchor_state_by_instance.get(handle);
|
|
1392
1432
|
if (!inst)
|
|
@@ -1394,7 +1434,15 @@ export class zappar_client {
|
|
|
1394
1434
|
inst.status = msg.anchorStatus();
|
|
1395
1435
|
break;
|
|
1396
1436
|
}
|
|
1397
|
-
case
|
|
1437
|
+
case 53: {
|
|
1438
|
+
let handle = msg.type();
|
|
1439
|
+
let inst = this._custom_anchor_state_by_instance.get(handle);
|
|
1440
|
+
if (!inst)
|
|
1441
|
+
return;
|
|
1442
|
+
inst.pose_version = msg.int();
|
|
1443
|
+
break;
|
|
1444
|
+
}
|
|
1445
|
+
case 51: {
|
|
1398
1446
|
let handle = msg.type();
|
|
1399
1447
|
let inst = this._custom_anchor_state_by_instance.get(handle);
|
|
1400
1448
|
if (!inst)
|
package/lib/gen/zappar-cwrap.js
CHANGED
|
@@ -14,19 +14,19 @@ export function getRuntimeObject(mod) {
|
|
|
14
14
|
let pipeline_camera_frame_data_raw_size_wrapped = mod.cwrap("zappar_pipeline_camera_frame_data_raw_size", "number", [
|
|
15
15
|
"number"
|
|
16
16
|
]);
|
|
17
|
-
let
|
|
17
|
+
let pipeline_frame_update_wrapped = mod.cwrap("zappar_pipeline_frame_update", null, [
|
|
18
18
|
"number"
|
|
19
19
|
]);
|
|
20
|
-
let
|
|
20
|
+
let pipeline_frame_number_wrapped = mod.cwrap("zappar_pipeline_frame_number", "number", [
|
|
21
21
|
"number"
|
|
22
22
|
]);
|
|
23
|
-
let
|
|
23
|
+
let pipeline_camera_model_wrapped = mod.cwrap("zappar_pipeline_camera_model", "number", [
|
|
24
24
|
"number"
|
|
25
25
|
]);
|
|
26
|
-
let
|
|
26
|
+
let pipeline_camera_data_width_wrapped = mod.cwrap("zappar_pipeline_camera_data_width", "number", [
|
|
27
27
|
"number"
|
|
28
28
|
]);
|
|
29
|
-
let
|
|
29
|
+
let pipeline_camera_data_height_wrapped = mod.cwrap("zappar_pipeline_camera_data_height", "number", [
|
|
30
30
|
"number"
|
|
31
31
|
]);
|
|
32
32
|
let pipeline_camera_frame_user_data_wrapped = mod.cwrap("zappar_pipeline_camera_frame_user_data", "number", [
|
|
@@ -340,11 +340,7 @@ export function getRuntimeObject(mod) {
|
|
|
340
340
|
let custom_anchor_status_wrapped = mod.cwrap("zappar_custom_anchor_status", "number", [
|
|
341
341
|
"number"
|
|
342
342
|
]);
|
|
343
|
-
let
|
|
344
|
-
"number",
|
|
345
|
-
"number"
|
|
346
|
-
]);
|
|
347
|
-
let custom_anchor_enabled_wrapped = mod.cwrap("zappar_custom_anchor_enabled", "number", [
|
|
343
|
+
let custom_anchor_pose_version_wrapped = mod.cwrap("zappar_custom_anchor_pose_version", "number", [
|
|
348
344
|
"number"
|
|
349
345
|
]);
|
|
350
346
|
let custom_anchor_pose_raw_wrapped = mod.cwrap("zappar_custom_anchor_pose_raw", "number", [
|
|
@@ -358,6 +354,14 @@ export function getRuntimeObject(mod) {
|
|
|
358
354
|
"number",
|
|
359
355
|
"string", "number", "number", "number", "number"
|
|
360
356
|
]);
|
|
357
|
+
let custom_anchor_pose_set_wrapped = mod.cwrap("zappar_custom_anchor_pose_set", null, [
|
|
358
|
+
"number",
|
|
359
|
+
"number"
|
|
360
|
+
]);
|
|
361
|
+
let custom_anchor_pose_set_with_parent_wrapped = mod.cwrap("zappar_custom_anchor_pose_set_with_parent", null, [
|
|
362
|
+
"number",
|
|
363
|
+
"number", "string"
|
|
364
|
+
]);
|
|
361
365
|
let dataArrayArgLength = 32;
|
|
362
366
|
let dataArrayArg = mod._malloc(dataArrayArgLength);
|
|
363
367
|
let floatDataArrayArgLength = 16 * 4;
|
|
@@ -403,14 +407,6 @@ export function getRuntimeObject(mod) {
|
|
|
403
407
|
let ret = pipeline_camera_frame_data_raw_size_wrapped(o);
|
|
404
408
|
return ret;
|
|
405
409
|
},
|
|
406
|
-
pipeline_camera_frame_data_raw_width: (o) => {
|
|
407
|
-
let ret = pipeline_camera_frame_data_raw_width_wrapped(o);
|
|
408
|
-
return ret;
|
|
409
|
-
},
|
|
410
|
-
pipeline_camera_frame_data_raw_height: (o) => {
|
|
411
|
-
let ret = pipeline_camera_frame_data_raw_height_wrapped(o);
|
|
412
|
-
return ret;
|
|
413
|
-
},
|
|
414
410
|
pipeline_frame_update: (o) => {
|
|
415
411
|
let ret = pipeline_frame_update_wrapped(o);
|
|
416
412
|
return ret;
|
|
@@ -426,6 +422,14 @@ export function getRuntimeObject(mod) {
|
|
|
426
422
|
ret = ab;
|
|
427
423
|
return ret;
|
|
428
424
|
},
|
|
425
|
+
pipeline_camera_data_width: (o) => {
|
|
426
|
+
let ret = pipeline_camera_data_width_wrapped(o);
|
|
427
|
+
return ret;
|
|
428
|
+
},
|
|
429
|
+
pipeline_camera_data_height: (o) => {
|
|
430
|
+
let ret = pipeline_camera_data_height_wrapped(o);
|
|
431
|
+
return ret;
|
|
432
|
+
},
|
|
429
433
|
pipeline_camera_frame_user_data: (o) => {
|
|
430
434
|
let ret = pipeline_camera_frame_user_data_wrapped(o);
|
|
431
435
|
return ret;
|
|
@@ -1014,14 +1018,8 @@ export function getRuntimeObject(mod) {
|
|
|
1014
1018
|
let ret = custom_anchor_status_wrapped(o);
|
|
1015
1019
|
return ret;
|
|
1016
1020
|
},
|
|
1017
|
-
|
|
1018
|
-
let
|
|
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;
|
|
1021
|
+
custom_anchor_pose_version: (o) => {
|
|
1022
|
+
let ret = custom_anchor_pose_version_wrapped(o);
|
|
1025
1023
|
return ret;
|
|
1026
1024
|
},
|
|
1027
1025
|
custom_anchor_pose_raw: (o) => {
|
|
@@ -1048,5 +1046,18 @@ export function getRuntimeObject(mod) {
|
|
|
1048
1046
|
let ret = custom_anchor_pose_set_from_anchor_offset_wrapped(o, arg_anchor_id, arg_x, arg_y, arg_z, arg_orientation);
|
|
1049
1047
|
return ret;
|
|
1050
1048
|
},
|
|
1049
|
+
custom_anchor_pose_set: (o, pose) => {
|
|
1050
|
+
let arg_pose = getFloatDataArrayForArgIndex(0, pose.byteLength);
|
|
1051
|
+
mod.HEAPF32.set(pose, arg_pose / 4);
|
|
1052
|
+
let ret = custom_anchor_pose_set_wrapped(o, arg_pose);
|
|
1053
|
+
return ret;
|
|
1054
|
+
},
|
|
1055
|
+
custom_anchor_pose_set_with_parent: (o, pose, anchor_id) => {
|
|
1056
|
+
let arg_pose = getFloatDataArrayForArgIndex(0, pose.byteLength);
|
|
1057
|
+
mod.HEAPF32.set(pose, arg_pose / 4);
|
|
1058
|
+
let arg_anchor_id = anchor_id;
|
|
1059
|
+
let ret = custom_anchor_pose_set_with_parent_wrapped(o, arg_pose, arg_anchor_id);
|
|
1060
|
+
return ret;
|
|
1061
|
+
},
|
|
1051
1062
|
};
|
|
1052
1063
|
}
|
|
@@ -130,11 +130,11 @@ export interface zappar_cwrap {
|
|
|
130
130
|
pipeline_destroy(o: zappar_pipeline_t): void;
|
|
131
131
|
pipeline_camera_frame_data_raw(o: zappar_pipeline_t): number;
|
|
132
132
|
pipeline_camera_frame_data_raw_size(o: zappar_pipeline_t): number;
|
|
133
|
-
pipeline_camera_frame_data_raw_width(o: zappar_pipeline_t): number;
|
|
134
|
-
pipeline_camera_frame_data_raw_height(o: zappar_pipeline_t): number;
|
|
135
133
|
pipeline_frame_update(o: zappar_pipeline_t): void;
|
|
136
134
|
pipeline_frame_number(o: zappar_pipeline_t): number;
|
|
137
135
|
pipeline_camera_model(o: zappar_pipeline_t): Float32Array;
|
|
136
|
+
pipeline_camera_data_width(o: zappar_pipeline_t): number;
|
|
137
|
+
pipeline_camera_data_height(o: zappar_pipeline_t): number;
|
|
138
138
|
pipeline_camera_frame_user_data(o: zappar_pipeline_t): number;
|
|
139
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
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;
|
|
@@ -239,9 +239,10 @@ export interface zappar_cwrap {
|
|
|
239
239
|
custom_anchor_create(pipeline: zappar_pipeline_t, worldtracker: zappar_world_tracker_t, id: string): zappar_custom_anchor_t;
|
|
240
240
|
custom_anchor_destroy(o: zappar_custom_anchor_t): void;
|
|
241
241
|
custom_anchor_status(o: zappar_custom_anchor_t): anchor_status_t;
|
|
242
|
-
|
|
243
|
-
custom_anchor_enabled(o: zappar_custom_anchor_t): boolean;
|
|
242
|
+
custom_anchor_pose_version(o: zappar_custom_anchor_t): number;
|
|
244
243
|
custom_anchor_pose_raw(o: zappar_custom_anchor_t): Float32Array;
|
|
245
244
|
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
245
|
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;
|
|
246
|
+
custom_anchor_pose_set(o: zappar_custom_anchor_t, pose: Float32Array): void;
|
|
247
|
+
custom_anchor_pose_set_with_parent(o: zappar_custom_anchor_t, pose: Float32Array, anchor_id: string): void;
|
|
247
248
|
}
|