@zappar/zappar-cv 3.0.1-alpha.8 → 3.0.1-beta.0
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 +3 -1
- package/lib/deserializer.d.ts +5 -1
- package/lib/deserializer.js +12 -0
- package/lib/direct.js +1 -1
- package/lib/drawaxis.d.ts +2 -0
- package/lib/drawaxis.js +137 -0
- package/lib/drawgrid.js +5 -2
- package/lib/drawpoints.d.ts +1 -0
- package/lib/drawpoints.js +2 -2
- package/lib/drawpointswithtype.d.ts +13 -0
- package/lib/drawpointswithtype.js +190 -0
- package/lib/drawpolygon.d.ts +5 -0
- package/lib/drawpolygon.js +94 -0
- package/lib/gen/zappar-bridge.d.ts +44 -11
- package/lib/gen/zappar-bridge.js +3 -0
- package/lib/gen/zappar-client.d.ts +1 -0
- package/lib/gen/zappar-client.js +347 -47
- package/lib/gen/zappar-cwrap.js +251 -41
- package/lib/gen/zappar-native.d.ts +56 -13
- package/lib/gen/zappar-native.js +23 -1
- package/lib/gen/zappar-server.d.ts +3 -0
- package/lib/gen/zappar-server.js +166 -21
- package/lib/gen/zappar.d.ts +51 -13
- package/lib/gen/zappar.js +3 -0
- package/lib/html-element-source.d.ts +4 -0
- package/lib/html-element-source.js +30 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/mstp-camera-source.js +2 -1
- package/lib/native.js +59 -4
- package/lib/permission.js +35 -9
- package/lib/pipeline.d.ts +1 -1
- package/lib/pipeline.js +3 -2
- package/lib/sequencesource.js +1 -1
- package/lib/serializer.d.ts +5 -1
- package/lib/serializer.js +4 -0
- package/lib/tr.js +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/lib/worker-client.js +4 -1
- package/lib/worker-imagebitmap.js +1 -1
- package/lib/worker-server.d.ts +1 -1
- package/lib/worker-server.js +5 -5
- package/lib/worker.js +1 -1
- package/lib/workerinterface.d.ts +1 -0
- package/lib/zappar-cv.js +1 -212
- 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/{5a86c8fa5c139c48ad64.wasm → c8e05439176ea756192a.wasm} +0 -0
- package/umd/zappar-cv.js +1 -1
- package/umd/zappar-cv.worker.js +1 -1
|
@@ -5,10 +5,16 @@ export { face_landmark_name_t } from "./zappar-native";
|
|
|
5
5
|
export { frame_pixel_format_t } from "./zappar-native";
|
|
6
6
|
import { instant_world_tracker_transform_orientation_t } from "./zappar-native";
|
|
7
7
|
export { instant_world_tracker_transform_orientation_t } from "./zappar-native";
|
|
8
|
+
import { transform_orientation_t } from "./zappar-native";
|
|
9
|
+
export { transform_orientation_t } from "./zappar-native";
|
|
10
|
+
import { plane_orientation_t } from "./zappar-native";
|
|
11
|
+
export { plane_orientation_t } from "./zappar-native";
|
|
8
12
|
import { log_level_t } from "./zappar-native";
|
|
9
13
|
export { log_level_t } from "./zappar-native";
|
|
10
14
|
export { image_target_type_t } from "./zappar-native";
|
|
11
15
|
export { world_tracker_quality_t } from "./zappar-native";
|
|
16
|
+
import { anchor_status_t } from "./zappar-native";
|
|
17
|
+
export { anchor_status_t } from "./zappar-native";
|
|
12
18
|
export { camera_profile_t } from "./zappar-native";
|
|
13
19
|
export declare type zappar_pipeline_t = number & {
|
|
14
20
|
_: 'zappar_pipeline_t';
|
|
@@ -43,6 +49,9 @@ export declare type zappar_zapcode_tracker_t = number & {
|
|
|
43
49
|
export declare type zappar_world_tracker_t = number & {
|
|
44
50
|
_: 'zappar_world_tracker_t';
|
|
45
51
|
};
|
|
52
|
+
export declare type zappar_custom_anchor_t = number & {
|
|
53
|
+
_: 'zappar_custom_anchor_t';
|
|
54
|
+
};
|
|
46
55
|
export interface zappar {
|
|
47
56
|
log_level(): log_level_t;
|
|
48
57
|
log_level_set(level: log_level_t): void;
|
|
@@ -53,7 +62,7 @@ export interface zappar {
|
|
|
53
62
|
pipeline_frame_number(o: zappar_pipeline_t): number;
|
|
54
63
|
pipeline_camera_model(o: zappar_pipeline_t): Float32Array;
|
|
55
64
|
pipeline_camera_frame_user_data(o: zappar_pipeline_t): number;
|
|
56
|
-
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;
|
|
65
|
+
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;
|
|
57
66
|
pipeline_camera_frame_camera_attitude(o: zappar_pipeline_t): Float32Array;
|
|
58
67
|
pipeline_camera_frame_device_attitude(o: zappar_pipeline_t): Float32Array;
|
|
59
68
|
pipeline_motion_accelerometer_submit(o: zappar_pipeline_t, time: number, x: number, y: number, z: number): void;
|
|
@@ -123,17 +132,41 @@ export interface zappar {
|
|
|
123
132
|
world_tracker_enabled(o: zappar_world_tracker_t): boolean;
|
|
124
133
|
world_tracker_enabled_set(o: zappar_world_tracker_t, enabled: boolean): void;
|
|
125
134
|
world_tracker_quality(o: zappar_world_tracker_t): number;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
135
|
+
world_tracker_horizontal_plane_detection_enabled(o: zappar_world_tracker_t): boolean;
|
|
136
|
+
world_tracker_horizontal_plane_detection_enabled_set(o: zappar_world_tracker_t, horizontal_plane_detection_enabled: boolean): void;
|
|
137
|
+
world_tracker_vertical_plane_detection_enabled(o: zappar_world_tracker_t): boolean;
|
|
138
|
+
world_tracker_vertical_plane_detection_enabled_set(o: zappar_world_tracker_t, vertical_plane_detection_enabled: boolean): void;
|
|
139
|
+
world_tracker_plane_anchor_count(o: zappar_world_tracker_t): number;
|
|
140
|
+
world_tracker_plane_anchor_id(o: zappar_world_tracker_t, indx: number): string;
|
|
141
|
+
world_tracker_plane_anchor_pose_raw(o: zappar_world_tracker_t, indx: number): Float32Array;
|
|
142
|
+
world_tracker_plane_anchor_status(o: zappar_world_tracker_t, indx: number): anchor_status_t;
|
|
143
|
+
world_tracker_plane_anchor_polygon_data_size(o: zappar_world_tracker_t, indx: number): number;
|
|
144
|
+
world_tracker_plane_anchor_polygon_data(o: zappar_world_tracker_t, indx: number): Float32Array;
|
|
145
|
+
world_tracker_plane_anchor_polygon_version(o: zappar_world_tracker_t, indx: number): number;
|
|
146
|
+
world_tracker_plane_anchor_orientation(o: zappar_world_tracker_t, indx: number): plane_orientation_t;
|
|
147
|
+
world_tracker_world_anchor_status(o: zappar_world_tracker_t): anchor_status_t;
|
|
148
|
+
world_tracker_world_anchor_id(o: zappar_world_tracker_t): string;
|
|
129
149
|
world_tracker_world_anchor_pose_raw(o: zappar_world_tracker_t): Float32Array;
|
|
130
|
-
|
|
150
|
+
world_tracker_ground_anchor_id(o: zappar_world_tracker_t): string;
|
|
151
|
+
world_tracker_ground_anchor_status(o: zappar_world_tracker_t): anchor_status_t;
|
|
131
152
|
world_tracker_ground_anchor_pose_raw(o: zappar_world_tracker_t): Float32Array;
|
|
132
153
|
world_tracker_reset(o: zappar_world_tracker_t): void;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
154
|
+
world_tracker_tracks_data_enabled(o: zappar_world_tracker_t): boolean;
|
|
155
|
+
world_tracker_tracks_data_enabled_set(o: zappar_world_tracker_t, tracks_data_enabled: boolean): void;
|
|
156
|
+
world_tracker_tracks_data_size(o: zappar_world_tracker_t): number;
|
|
157
|
+
world_tracker_tracks_data(o: zappar_world_tracker_t): Float32Array;
|
|
158
|
+
world_tracker_tracks_type_data_size(o: zappar_world_tracker_t): number;
|
|
159
|
+
world_tracker_tracks_type_data(o: zappar_world_tracker_t): Uint8Array;
|
|
160
|
+
world_tracker_projections_data_enabled(o: zappar_world_tracker_t): boolean;
|
|
161
|
+
world_tracker_projections_data_enabled_set(o: zappar_world_tracker_t, projections_data_enabled: boolean): void;
|
|
162
|
+
world_tracker_projections_data_size(o: zappar_world_tracker_t): number;
|
|
163
|
+
world_tracker_projections_data(o: zappar_world_tracker_t): Float32Array;
|
|
164
|
+
custom_anchor_create(pipeline: zappar_pipeline_t, worldtracker: zappar_world_tracker_t, id: string): zappar_custom_anchor_t;
|
|
165
|
+
custom_anchor_destroy(o: zappar_custom_anchor_t): void;
|
|
166
|
+
custom_anchor_status(o: zappar_custom_anchor_t): anchor_status_t;
|
|
167
|
+
custom_anchor_enabled_set(o: zappar_custom_anchor_t, enabled: boolean): void;
|
|
168
|
+
custom_anchor_enabled(o: zappar_custom_anchor_t): boolean;
|
|
169
|
+
custom_anchor_pose_raw(o: zappar_custom_anchor_t): Float32Array;
|
|
170
|
+
custom_anchor_pose_set_from_camera_offset_raw(o: zappar_custom_anchor_t, x: number, y: number, z: number, orientation: transform_orientation_t): void;
|
|
171
|
+
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;
|
|
139
172
|
}
|
package/lib/gen/zappar-bridge.js
CHANGED
|
@@ -2,7 +2,10 @@ export { barcode_format_t } from "./zappar-native";
|
|
|
2
2
|
export { face_landmark_name_t } from "./zappar-native";
|
|
3
3
|
export { frame_pixel_format_t } from "./zappar-native";
|
|
4
4
|
export { instant_world_tracker_transform_orientation_t } from "./zappar-native";
|
|
5
|
+
export { transform_orientation_t } from "./zappar-native";
|
|
6
|
+
export { plane_orientation_t } from "./zappar-native";
|
|
5
7
|
export { log_level_t } from "./zappar-native";
|
|
6
8
|
export { image_target_type_t } from "./zappar-native";
|
|
7
9
|
export { world_tracker_quality_t } from "./zappar-native";
|
|
10
|
+
export { anchor_status_t } from "./zappar-native";
|
|
8
11
|
export { camera_profile_t } from "./zappar-native";
|
|
@@ -19,6 +19,7 @@ export declare class zappar_client {
|
|
|
19
19
|
private _instant_world_tracker_state_by_instance;
|
|
20
20
|
private _zapcode_tracker_state_by_instance;
|
|
21
21
|
private _world_tracker_state_by_instance;
|
|
22
|
+
private _custom_anchor_state_by_instance;
|
|
22
23
|
impl: zappar;
|
|
23
24
|
processMessages(a: ArrayBuffer): void;
|
|
24
25
|
}
|
package/lib/gen/zappar-client.js
CHANGED
|
@@ -22,6 +22,7 @@ export class zappar_client {
|
|
|
22
22
|
this._instant_world_tracker_state_by_instance = new Map();
|
|
23
23
|
this._zapcode_tracker_state_by_instance = new Map();
|
|
24
24
|
this._world_tracker_state_by_instance = new Map();
|
|
25
|
+
this._custom_anchor_state_by_instance = new Map();
|
|
25
26
|
this.impl = {
|
|
26
27
|
log_level: () => {
|
|
27
28
|
return this._globalState.log_level;
|
|
@@ -89,7 +90,7 @@ export class zappar_client {
|
|
|
89
90
|
throw new Error("This object has been destroyed");
|
|
90
91
|
return s.current_frame_user_data;
|
|
91
92
|
},
|
|
92
|
-
pipeline_camera_frame_submit: (o, data, width, height, user_data, camera_to_device_transform, camera_model, user_facing) => {
|
|
93
|
+
pipeline_camera_frame_submit: (o, data, width, height, user_data, camera_to_device_transform, camera_model, user_facing, timestampSeconds) => {
|
|
93
94
|
let s = this._pipeline_state_by_instance.get(o);
|
|
94
95
|
if (!s)
|
|
95
96
|
throw new Error("This object has been destroyed");
|
|
@@ -102,6 +103,7 @@ export class zappar_client {
|
|
|
102
103
|
m.matrix4x4(camera_to_device_transform);
|
|
103
104
|
m.cameraModel(camera_model);
|
|
104
105
|
m.bool(user_facing);
|
|
106
|
+
m.float(timestampSeconds);
|
|
105
107
|
});
|
|
106
108
|
},
|
|
107
109
|
pipeline_camera_frame_camera_attitude: (o) => {
|
|
@@ -680,17 +682,30 @@ export class zappar_client {
|
|
|
680
682
|
let newId = (this._latestId++);
|
|
681
683
|
let s = {
|
|
682
684
|
enabled: true,
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
685
|
+
horizontal_plane_detection_enabled: true,
|
|
686
|
+
vertical_plane_detection_enabled: false,
|
|
687
|
+
plane_anchor_count: 0,
|
|
688
|
+
plane_anchor_pose: [],
|
|
689
|
+
plane_anchor_status: [],
|
|
690
|
+
plane_anchor_polygon_version: [],
|
|
691
|
+
plane_anchor_polygon_data: [],
|
|
692
|
+
plane_anchor_polygon_data_size: [],
|
|
693
|
+
plane_anchor_id: [],
|
|
694
|
+
plane_anchor_orientation: [],
|
|
695
|
+
world_anchor_status: 0,
|
|
686
696
|
world_anchor_pose: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
|
|
687
|
-
|
|
697
|
+
world_anchor_id: '',
|
|
698
|
+
ground_anchor_status: 0,
|
|
688
699
|
ground_anchor_pose: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
700
|
+
ground_anchor_id: '',
|
|
701
|
+
tracks_data_enabled: false,
|
|
702
|
+
tracks_data: new Float32Array([]),
|
|
703
|
+
tracks_data_size: 0,
|
|
704
|
+
tracks_type_data: new Uint8Array([]),
|
|
705
|
+
tracks_type_data_size: 0,
|
|
706
|
+
projections_data_enabled: false,
|
|
707
|
+
projections_data: new Float32Array([]),
|
|
708
|
+
projections_data_size: 0,
|
|
694
709
|
quality: 0,
|
|
695
710
|
};
|
|
696
711
|
this._world_tracker_state_by_instance.set(newId, s);
|
|
@@ -730,23 +745,95 @@ export class zappar_client {
|
|
|
730
745
|
throw new Error("This object has been destroyed");
|
|
731
746
|
return s.quality;
|
|
732
747
|
},
|
|
733
|
-
|
|
748
|
+
world_tracker_horizontal_plane_detection_enabled: (o) => {
|
|
734
749
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
735
750
|
if (!s)
|
|
736
751
|
throw new Error("This object has been destroyed");
|
|
737
|
-
return s.
|
|
752
|
+
return s.horizontal_plane_detection_enabled;
|
|
738
753
|
},
|
|
739
|
-
|
|
754
|
+
world_tracker_horizontal_plane_detection_enabled_set: (o, horizontal_plane_detection_enabled) => {
|
|
740
755
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
741
756
|
if (!s)
|
|
742
757
|
throw new Error("This object has been destroyed");
|
|
743
|
-
|
|
758
|
+
this.serializer.sendMessage(48, m => {
|
|
759
|
+
m.type(o);
|
|
760
|
+
m.bool(horizontal_plane_detection_enabled);
|
|
761
|
+
});
|
|
762
|
+
},
|
|
763
|
+
world_tracker_vertical_plane_detection_enabled: (o) => {
|
|
764
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
765
|
+
if (!s)
|
|
766
|
+
throw new Error("This object has been destroyed");
|
|
767
|
+
return s.vertical_plane_detection_enabled;
|
|
768
|
+
},
|
|
769
|
+
world_tracker_vertical_plane_detection_enabled_set: (o, vertical_plane_detection_enabled) => {
|
|
770
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
771
|
+
if (!s)
|
|
772
|
+
throw new Error("This object has been destroyed");
|
|
773
|
+
this.serializer.sendMessage(49, m => {
|
|
774
|
+
m.type(o);
|
|
775
|
+
m.bool(vertical_plane_detection_enabled);
|
|
776
|
+
});
|
|
744
777
|
},
|
|
745
|
-
|
|
778
|
+
world_tracker_plane_anchor_count: (o) => {
|
|
746
779
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
747
780
|
if (!s)
|
|
748
781
|
throw new Error("This object has been destroyed");
|
|
749
|
-
return s.
|
|
782
|
+
return s.plane_anchor_count;
|
|
783
|
+
},
|
|
784
|
+
world_tracker_plane_anchor_id: (o, indx) => {
|
|
785
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
786
|
+
if (!s)
|
|
787
|
+
throw new Error("This object has been destroyed");
|
|
788
|
+
return s.plane_anchor_id[indx];
|
|
789
|
+
},
|
|
790
|
+
world_tracker_plane_anchor_pose_raw: (o, indx) => {
|
|
791
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
792
|
+
if (!s)
|
|
793
|
+
throw new Error("This object has been destroyed");
|
|
794
|
+
return s.plane_anchor_pose[indx];
|
|
795
|
+
},
|
|
796
|
+
world_tracker_plane_anchor_status: (o, indx) => {
|
|
797
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
798
|
+
if (!s)
|
|
799
|
+
throw new Error("This object has been destroyed");
|
|
800
|
+
return s.plane_anchor_status[indx];
|
|
801
|
+
},
|
|
802
|
+
world_tracker_plane_anchor_polygon_data_size: (o, indx) => {
|
|
803
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
804
|
+
if (!s)
|
|
805
|
+
throw new Error("This object has been destroyed");
|
|
806
|
+
return s.plane_anchor_polygon_data_size[indx];
|
|
807
|
+
},
|
|
808
|
+
world_tracker_plane_anchor_polygon_data: (o, indx) => {
|
|
809
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
810
|
+
if (!s)
|
|
811
|
+
throw new Error("This object has been destroyed");
|
|
812
|
+
return s.plane_anchor_polygon_data[indx];
|
|
813
|
+
},
|
|
814
|
+
world_tracker_plane_anchor_polygon_version: (o, indx) => {
|
|
815
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
816
|
+
if (!s)
|
|
817
|
+
throw new Error("This object has been destroyed");
|
|
818
|
+
return s.plane_anchor_polygon_version[indx];
|
|
819
|
+
},
|
|
820
|
+
world_tracker_plane_anchor_orientation: (o, indx) => {
|
|
821
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
822
|
+
if (!s)
|
|
823
|
+
throw new Error("This object has been destroyed");
|
|
824
|
+
return s.plane_anchor_orientation[indx];
|
|
825
|
+
},
|
|
826
|
+
world_tracker_world_anchor_status: (o) => {
|
|
827
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
828
|
+
if (!s)
|
|
829
|
+
throw new Error("This object has been destroyed");
|
|
830
|
+
return s.world_anchor_status;
|
|
831
|
+
},
|
|
832
|
+
world_tracker_world_anchor_id: (o) => {
|
|
833
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
834
|
+
if (!s)
|
|
835
|
+
throw new Error("This object has been destroyed");
|
|
836
|
+
return s.world_anchor_id;
|
|
750
837
|
},
|
|
751
838
|
world_tracker_world_anchor_pose_raw: (o) => {
|
|
752
839
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
@@ -754,11 +841,17 @@ export class zappar_client {
|
|
|
754
841
|
throw new Error("This object has been destroyed");
|
|
755
842
|
return s.world_anchor_pose;
|
|
756
843
|
},
|
|
757
|
-
|
|
844
|
+
world_tracker_ground_anchor_id: (o) => {
|
|
758
845
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
759
846
|
if (!s)
|
|
760
847
|
throw new Error("This object has been destroyed");
|
|
761
|
-
return s.
|
|
848
|
+
return s.ground_anchor_id;
|
|
849
|
+
},
|
|
850
|
+
world_tracker_ground_anchor_status: (o) => {
|
|
851
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
852
|
+
if (!s)
|
|
853
|
+
throw new Error("This object has been destroyed");
|
|
854
|
+
return s.ground_anchor_status;
|
|
762
855
|
},
|
|
763
856
|
world_tracker_ground_anchor_pose_raw: (o) => {
|
|
764
857
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
@@ -770,48 +863,153 @@ export class zappar_client {
|
|
|
770
863
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
771
864
|
if (!s)
|
|
772
865
|
throw new Error("This object has been destroyed");
|
|
773
|
-
this.serializer.sendMessage(
|
|
866
|
+
this.serializer.sendMessage(50, m => {
|
|
774
867
|
m.type(o);
|
|
775
868
|
});
|
|
776
869
|
},
|
|
777
|
-
|
|
870
|
+
world_tracker_tracks_data_enabled: (o) => {
|
|
778
871
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
779
872
|
if (!s)
|
|
780
873
|
throw new Error("This object has been destroyed");
|
|
781
|
-
return s.
|
|
874
|
+
return s.tracks_data_enabled;
|
|
782
875
|
},
|
|
783
|
-
|
|
876
|
+
world_tracker_tracks_data_enabled_set: (o, tracks_data_enabled) => {
|
|
784
877
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
785
878
|
if (!s)
|
|
786
879
|
throw new Error("This object has been destroyed");
|
|
787
|
-
this.serializer.sendMessage(
|
|
880
|
+
this.serializer.sendMessage(51, m => {
|
|
788
881
|
m.type(o);
|
|
789
|
-
m.bool(
|
|
882
|
+
m.bool(tracks_data_enabled);
|
|
790
883
|
});
|
|
791
884
|
},
|
|
792
|
-
|
|
885
|
+
world_tracker_tracks_data_size: (o) => {
|
|
886
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
887
|
+
if (!s)
|
|
888
|
+
throw new Error("This object has been destroyed");
|
|
889
|
+
return s.tracks_data_size;
|
|
890
|
+
},
|
|
891
|
+
world_tracker_tracks_data: (o) => {
|
|
892
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
893
|
+
if (!s)
|
|
894
|
+
throw new Error("This object has been destroyed");
|
|
895
|
+
return s.tracks_data;
|
|
896
|
+
},
|
|
897
|
+
world_tracker_tracks_type_data_size: (o) => {
|
|
898
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
899
|
+
if (!s)
|
|
900
|
+
throw new Error("This object has been destroyed");
|
|
901
|
+
return s.tracks_type_data_size;
|
|
902
|
+
},
|
|
903
|
+
world_tracker_tracks_type_data: (o) => {
|
|
793
904
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
794
905
|
if (!s)
|
|
795
906
|
throw new Error("This object has been destroyed");
|
|
796
|
-
return s.
|
|
907
|
+
return s.tracks_type_data;
|
|
797
908
|
},
|
|
798
|
-
|
|
909
|
+
world_tracker_projections_data_enabled: (o) => {
|
|
799
910
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
800
911
|
if (!s)
|
|
801
912
|
throw new Error("This object has been destroyed");
|
|
802
|
-
return s.
|
|
913
|
+
return s.projections_data_enabled;
|
|
803
914
|
},
|
|
804
|
-
|
|
915
|
+
world_tracker_projections_data_enabled_set: (o, projections_data_enabled) => {
|
|
805
916
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
806
917
|
if (!s)
|
|
807
918
|
throw new Error("This object has been destroyed");
|
|
808
|
-
|
|
919
|
+
this.serializer.sendMessage(52, m => {
|
|
920
|
+
m.type(o);
|
|
921
|
+
m.bool(projections_data_enabled);
|
|
922
|
+
});
|
|
809
923
|
},
|
|
810
|
-
|
|
924
|
+
world_tracker_projections_data_size: (o) => {
|
|
811
925
|
let s = this._world_tracker_state_by_instance.get(o);
|
|
812
926
|
if (!s)
|
|
813
927
|
throw new Error("This object has been destroyed");
|
|
814
|
-
return s.
|
|
928
|
+
return s.projections_data_size;
|
|
929
|
+
},
|
|
930
|
+
world_tracker_projections_data: (o) => {
|
|
931
|
+
let s = this._world_tracker_state_by_instance.get(o);
|
|
932
|
+
if (!s)
|
|
933
|
+
throw new Error("This object has been destroyed");
|
|
934
|
+
return s.projections_data;
|
|
935
|
+
},
|
|
936
|
+
// #### custom_anchor ####
|
|
937
|
+
custom_anchor_create: (pipeline, worldtracker, id) => {
|
|
938
|
+
let newId = (this._latestId++);
|
|
939
|
+
let s = {
|
|
940
|
+
enabled: true,
|
|
941
|
+
pose: new Float32Array([1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]),
|
|
942
|
+
status: 0,
|
|
943
|
+
};
|
|
944
|
+
this._custom_anchor_state_by_instance.set(newId, s);
|
|
945
|
+
this.serializer.sendMessage(53, m => {
|
|
946
|
+
m.type(newId);
|
|
947
|
+
m.type(pipeline);
|
|
948
|
+
m.type(worldtracker);
|
|
949
|
+
m.string(id);
|
|
950
|
+
});
|
|
951
|
+
return newId;
|
|
952
|
+
},
|
|
953
|
+
custom_anchor_destroy: (o) => {
|
|
954
|
+
let s = this._custom_anchor_state_by_instance.get(o);
|
|
955
|
+
if (!s)
|
|
956
|
+
throw new Error("This object has been destroyed");
|
|
957
|
+
this._custom_anchor_state_by_instance.delete(o);
|
|
958
|
+
this.serializer.sendMessage(54, m => {
|
|
959
|
+
m.type(o);
|
|
960
|
+
});
|
|
961
|
+
},
|
|
962
|
+
custom_anchor_status: (o) => {
|
|
963
|
+
let s = this._custom_anchor_state_by_instance.get(o);
|
|
964
|
+
if (!s)
|
|
965
|
+
throw new Error("This object has been destroyed");
|
|
966
|
+
return s.status;
|
|
967
|
+
},
|
|
968
|
+
custom_anchor_enabled_set: (o, enabled) => {
|
|
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) => {
|
|
978
|
+
let s = this._custom_anchor_state_by_instance.get(o);
|
|
979
|
+
if (!s)
|
|
980
|
+
throw new Error("This object has been destroyed");
|
|
981
|
+
return s.enabled;
|
|
982
|
+
},
|
|
983
|
+
custom_anchor_pose_raw: (o) => {
|
|
984
|
+
let s = this._custom_anchor_state_by_instance.get(o);
|
|
985
|
+
if (!s)
|
|
986
|
+
throw new Error("This object has been destroyed");
|
|
987
|
+
return s.pose;
|
|
988
|
+
},
|
|
989
|
+
custom_anchor_pose_set_from_camera_offset_raw: (o, x, y, z, orientation) => {
|
|
990
|
+
let s = this._custom_anchor_state_by_instance.get(o);
|
|
991
|
+
if (!s)
|
|
992
|
+
throw new Error("This object has been destroyed");
|
|
993
|
+
this.serializer.sendMessage(56, m => {
|
|
994
|
+
m.type(o);
|
|
995
|
+
m.float(x);
|
|
996
|
+
m.float(y);
|
|
997
|
+
m.float(z);
|
|
998
|
+
m.transformOrientation(orientation);
|
|
999
|
+
});
|
|
1000
|
+
},
|
|
1001
|
+
custom_anchor_pose_set_from_anchor_offset: (o, anchor_id, x, y, z, orientation) => {
|
|
1002
|
+
let s = this._custom_anchor_state_by_instance.get(o);
|
|
1003
|
+
if (!s)
|
|
1004
|
+
throw new Error("This object has been destroyed");
|
|
1005
|
+
this.serializer.sendMessage(57, m => {
|
|
1006
|
+
m.type(o);
|
|
1007
|
+
m.string(anchor_id);
|
|
1008
|
+
m.float(x);
|
|
1009
|
+
m.float(y);
|
|
1010
|
+
m.float(z);
|
|
1011
|
+
m.transformOrientation(orientation);
|
|
1012
|
+
});
|
|
815
1013
|
},
|
|
816
1014
|
};
|
|
817
1015
|
}
|
|
@@ -1013,7 +1211,7 @@ export class zappar_client {
|
|
|
1013
1211
|
inst.anchor_pose[indx] = msg.matrix4x4();
|
|
1014
1212
|
break;
|
|
1015
1213
|
}
|
|
1016
|
-
case
|
|
1214
|
+
case 40: {
|
|
1017
1215
|
let handle = msg.type();
|
|
1018
1216
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1019
1217
|
if (!inst)
|
|
@@ -1026,24 +1224,25 @@ export class zappar_client {
|
|
|
1026
1224
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1027
1225
|
if (!inst)
|
|
1028
1226
|
return;
|
|
1029
|
-
inst.
|
|
1227
|
+
inst.plane_anchor_count = msg.int();
|
|
1030
1228
|
break;
|
|
1031
1229
|
}
|
|
1032
|
-
case
|
|
1230
|
+
case 33: {
|
|
1033
1231
|
let handle = msg.type();
|
|
1034
1232
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1035
1233
|
if (!inst)
|
|
1036
1234
|
return;
|
|
1037
1235
|
let indx = msg.int();
|
|
1038
|
-
inst.
|
|
1236
|
+
inst.plane_anchor_id[indx] = msg.string();
|
|
1039
1237
|
break;
|
|
1040
1238
|
}
|
|
1041
|
-
case
|
|
1239
|
+
case 26: {
|
|
1042
1240
|
let handle = msg.type();
|
|
1043
1241
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1044
1242
|
if (!inst)
|
|
1045
1243
|
return;
|
|
1046
|
-
|
|
1244
|
+
let indx = msg.int();
|
|
1245
|
+
inst.plane_anchor_pose[indx] = msg.matrix4x4();
|
|
1047
1246
|
break;
|
|
1048
1247
|
}
|
|
1049
1248
|
case 28: {
|
|
@@ -1051,15 +1250,17 @@ export class zappar_client {
|
|
|
1051
1250
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1052
1251
|
if (!inst)
|
|
1053
1252
|
return;
|
|
1054
|
-
|
|
1253
|
+
let indx = msg.int();
|
|
1254
|
+
inst.plane_anchor_status[indx] = msg.anchorStatus();
|
|
1055
1255
|
break;
|
|
1056
1256
|
}
|
|
1057
|
-
case
|
|
1257
|
+
case 29: {
|
|
1058
1258
|
let handle = msg.type();
|
|
1059
1259
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1060
1260
|
if (!inst)
|
|
1061
1261
|
return;
|
|
1062
|
-
|
|
1262
|
+
let indx = msg.int();
|
|
1263
|
+
inst.plane_anchor_polygon_data_size[indx] = msg.int();
|
|
1063
1264
|
break;
|
|
1064
1265
|
}
|
|
1065
1266
|
case 30: {
|
|
@@ -1067,15 +1268,17 @@ export class zappar_client {
|
|
|
1067
1268
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1068
1269
|
if (!inst)
|
|
1069
1270
|
return;
|
|
1070
|
-
|
|
1271
|
+
let indx = msg.int();
|
|
1272
|
+
inst.plane_anchor_polygon_data[indx] = msg.floatArray();
|
|
1071
1273
|
break;
|
|
1072
1274
|
}
|
|
1073
|
-
case
|
|
1275
|
+
case 31: {
|
|
1074
1276
|
let handle = msg.type();
|
|
1075
1277
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1076
1278
|
if (!inst)
|
|
1077
1279
|
return;
|
|
1078
|
-
|
|
1280
|
+
let indx = msg.int();
|
|
1281
|
+
inst.plane_anchor_polygon_version[indx] = msg.int();
|
|
1079
1282
|
break;
|
|
1080
1283
|
}
|
|
1081
1284
|
case 32: {
|
|
@@ -1083,7 +1286,16 @@ export class zappar_client {
|
|
|
1083
1286
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1084
1287
|
if (!inst)
|
|
1085
1288
|
return;
|
|
1086
|
-
|
|
1289
|
+
let indx = msg.int();
|
|
1290
|
+
inst.plane_anchor_orientation[indx] = msg.planeOrientation();
|
|
1291
|
+
break;
|
|
1292
|
+
}
|
|
1293
|
+
case 36: {
|
|
1294
|
+
let handle = msg.type();
|
|
1295
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1296
|
+
if (!inst)
|
|
1297
|
+
return;
|
|
1298
|
+
inst.world_anchor_status = msg.anchorStatus();
|
|
1087
1299
|
break;
|
|
1088
1300
|
}
|
|
1089
1301
|
case 35: {
|
|
@@ -1091,7 +1303,7 @@ export class zappar_client {
|
|
|
1091
1303
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1092
1304
|
if (!inst)
|
|
1093
1305
|
return;
|
|
1094
|
-
inst.
|
|
1306
|
+
inst.world_anchor_id = msg.string();
|
|
1095
1307
|
break;
|
|
1096
1308
|
}
|
|
1097
1309
|
case 34: {
|
|
@@ -1099,7 +1311,95 @@ export class zappar_client {
|
|
|
1099
1311
|
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1100
1312
|
if (!inst)
|
|
1101
1313
|
return;
|
|
1102
|
-
inst.
|
|
1314
|
+
inst.world_anchor_pose = msg.matrix4x4();
|
|
1315
|
+
break;
|
|
1316
|
+
}
|
|
1317
|
+
case 38: {
|
|
1318
|
+
let handle = msg.type();
|
|
1319
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1320
|
+
if (!inst)
|
|
1321
|
+
return;
|
|
1322
|
+
inst.ground_anchor_id = msg.string();
|
|
1323
|
+
break;
|
|
1324
|
+
}
|
|
1325
|
+
case 39: {
|
|
1326
|
+
let handle = msg.type();
|
|
1327
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1328
|
+
if (!inst)
|
|
1329
|
+
return;
|
|
1330
|
+
inst.ground_anchor_status = msg.anchorStatus();
|
|
1331
|
+
break;
|
|
1332
|
+
}
|
|
1333
|
+
case 37: {
|
|
1334
|
+
let handle = msg.type();
|
|
1335
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1336
|
+
if (!inst)
|
|
1337
|
+
return;
|
|
1338
|
+
inst.ground_anchor_pose = msg.matrix4x4();
|
|
1339
|
+
break;
|
|
1340
|
+
}
|
|
1341
|
+
case 43: {
|
|
1342
|
+
let handle = msg.type();
|
|
1343
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1344
|
+
if (!inst)
|
|
1345
|
+
return;
|
|
1346
|
+
inst.tracks_data_size = msg.int();
|
|
1347
|
+
break;
|
|
1348
|
+
}
|
|
1349
|
+
case 42: {
|
|
1350
|
+
let handle = msg.type();
|
|
1351
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1352
|
+
if (!inst)
|
|
1353
|
+
return;
|
|
1354
|
+
inst.tracks_data = msg.floatArray();
|
|
1355
|
+
break;
|
|
1356
|
+
}
|
|
1357
|
+
case 45: {
|
|
1358
|
+
let handle = msg.type();
|
|
1359
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1360
|
+
if (!inst)
|
|
1361
|
+
return;
|
|
1362
|
+
inst.tracks_type_data_size = msg.int();
|
|
1363
|
+
break;
|
|
1364
|
+
}
|
|
1365
|
+
case 44: {
|
|
1366
|
+
let handle = msg.type();
|
|
1367
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1368
|
+
if (!inst)
|
|
1369
|
+
return;
|
|
1370
|
+
inst.tracks_type_data = msg.ucharArray();
|
|
1371
|
+
break;
|
|
1372
|
+
}
|
|
1373
|
+
case 48: {
|
|
1374
|
+
let handle = msg.type();
|
|
1375
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1376
|
+
if (!inst)
|
|
1377
|
+
return;
|
|
1378
|
+
inst.projections_data_size = msg.int();
|
|
1379
|
+
break;
|
|
1380
|
+
}
|
|
1381
|
+
case 47: {
|
|
1382
|
+
let handle = msg.type();
|
|
1383
|
+
let inst = this._world_tracker_state_by_instance.get(handle);
|
|
1384
|
+
if (!inst)
|
|
1385
|
+
return;
|
|
1386
|
+
inst.projections_data = msg.floatArray();
|
|
1387
|
+
break;
|
|
1388
|
+
}
|
|
1389
|
+
case 50: {
|
|
1390
|
+
let handle = msg.type();
|
|
1391
|
+
let inst = this._custom_anchor_state_by_instance.get(handle);
|
|
1392
|
+
if (!inst)
|
|
1393
|
+
return;
|
|
1394
|
+
inst.status = msg.anchorStatus();
|
|
1395
|
+
break;
|
|
1396
|
+
}
|
|
1397
|
+
case 49: {
|
|
1398
|
+
let handle = msg.type();
|
|
1399
|
+
let inst = this._custom_anchor_state_by_instance.get(handle);
|
|
1400
|
+
if (!inst)
|
|
1401
|
+
return;
|
|
1402
|
+
inst.pose = msg.matrix4x4();
|
|
1103
1403
|
break;
|
|
1104
1404
|
}
|
|
1105
1405
|
}
|