@web-ar-studio/webar-engine-sdk 1.0.4 → 1.0.6
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/dist/index.d.ts +46 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,18 @@ declare const ANCHOR_TYPE_BOTTOM_RIGHT = "bottomRight";
|
|
|
26
26
|
declare const ANCHOR_TYPE_TOP_LEFT = "topLeft";
|
|
27
27
|
declare const ANCHOR_TYPE_TOP_RIGHT = "topRight";
|
|
28
28
|
declare const ANCHOR_TYPE_CENTER = "center";
|
|
29
|
+
declare const ANCHOR_TYPE_ORIGIN = "origin";
|
|
30
|
+
declare const ANCHOR_TYPE_LEFT_EYEBROW = 283;
|
|
31
|
+
declare const ANCHOR_TYPE_RIGHT_EYEBROW = 53;
|
|
32
|
+
declare const ANCHOR_TYPE_LEFT_EAR = 356;
|
|
33
|
+
declare const ANCHOR_TYPE_RIGHT_EAR = 127;
|
|
34
|
+
declare const ANCHOR_TYPE_LEFT_EYE = 374;
|
|
35
|
+
declare const ANCHOR_TYPE_RIGHT_EYE = 145;
|
|
36
|
+
declare const ANCHOR_TYPE_NOSE_BRIDGE = 6;
|
|
37
|
+
declare const ANCHOR_TYPE_NOSE_TIP = 4;
|
|
38
|
+
declare const ANCHOR_TYPE_NOSE_BASE = 2;
|
|
39
|
+
declare const ANCHOR_TYPE_BOTTOM_LIP = 14;
|
|
40
|
+
declare const ANCHOR_TYPE_CHIN = 199;
|
|
29
41
|
|
|
30
42
|
type TTriggerMode = typeof TRIGGER_MODE_QR | typeof TRIGGER_MODE_IMAGE;
|
|
31
43
|
|
|
@@ -39,19 +51,33 @@ type TProjectMode = typeof PROJECT_MODE_QR | typeof PROJECT_MODE_IMAGE | typeof
|
|
|
39
51
|
|
|
40
52
|
type TAnchorType = typeof ANCHOR_TYPE_BOTTOM_LEFT | typeof ANCHOR_TYPE_BOTTOM_RIGHT | typeof ANCHOR_TYPE_TOP_LEFT | typeof ANCHOR_TYPE_TOP_RIGHT | typeof ANCHOR_TYPE_CENTER;
|
|
41
53
|
|
|
54
|
+
type TAnchorFaceType = typeof ANCHOR_TYPE_ORIGIN | typeof ANCHOR_TYPE_LEFT_EYEBROW | typeof ANCHOR_TYPE_RIGHT_EYEBROW | typeof ANCHOR_TYPE_LEFT_EAR | typeof ANCHOR_TYPE_RIGHT_EAR | typeof ANCHOR_TYPE_LEFT_EYE | typeof ANCHOR_TYPE_RIGHT_EYE | typeof ANCHOR_TYPE_NOSE_BRIDGE | typeof ANCHOR_TYPE_NOSE_TIP | typeof ANCHOR_TYPE_NOSE_BASE | typeof ANCHOR_TYPE_BOTTOM_LIP | typeof ANCHOR_TYPE_CHIN;
|
|
55
|
+
|
|
42
56
|
type TConfigData = {
|
|
43
57
|
apiKey: string;
|
|
44
58
|
mode: TProjectMode;
|
|
45
59
|
container: Element;
|
|
46
60
|
} & ({
|
|
47
|
-
mode: typeof PROJECT_MODE_SLAM_3DOF
|
|
61
|
+
mode: typeof PROJECT_MODE_SLAM_3DOF;
|
|
48
62
|
fov?: never;
|
|
63
|
+
near?: never;
|
|
64
|
+
far?: never;
|
|
49
65
|
triggers?: never;
|
|
50
66
|
isMultiTracking?: never;
|
|
51
67
|
anchor?: never;
|
|
68
|
+
} | {
|
|
69
|
+
mode: typeof PROJECT_MODE_FACE;
|
|
70
|
+
fov: number;
|
|
71
|
+
near: number;
|
|
72
|
+
far: number;
|
|
73
|
+
triggers?: never;
|
|
74
|
+
isMultiTracking?: never;
|
|
75
|
+
anchor?: TAnchorFaceType;
|
|
52
76
|
} | {
|
|
53
77
|
mode: Exclude<TProjectMode, typeof PROJECT_MODE_SLAM_3DOF | typeof PROJECT_MODE_FACE>;
|
|
54
78
|
fov: number;
|
|
79
|
+
near?: never;
|
|
80
|
+
far?: never;
|
|
55
81
|
triggers: TTrigger[];
|
|
56
82
|
isMultiTracking: boolean;
|
|
57
83
|
anchor: TAnchorType;
|
|
@@ -77,6 +103,7 @@ type TEventDetectedData = {
|
|
|
77
103
|
positionVector: TVector;
|
|
78
104
|
rotationQuaternion: TQuaternion;
|
|
79
105
|
scaleVector: TVector;
|
|
106
|
+
landmarksData?: TVector[];
|
|
80
107
|
};
|
|
81
108
|
|
|
82
109
|
type TEventLostData = {
|
|
@@ -84,6 +111,7 @@ type TEventLostData = {
|
|
|
84
111
|
positionVector: TVector;
|
|
85
112
|
rotationQuaternion: TQuaternion;
|
|
86
113
|
scaleVector: TVector;
|
|
114
|
+
landmarksData?: TVector[];
|
|
87
115
|
};
|
|
88
116
|
|
|
89
117
|
type TEventPoseData = {
|
|
@@ -91,6 +119,7 @@ type TEventPoseData = {
|
|
|
91
119
|
positionVector: TVector;
|
|
92
120
|
rotationQuaternion: TQuaternion;
|
|
93
121
|
scaleVector: TVector;
|
|
122
|
+
landmarksData?: TVector[];
|
|
94
123
|
};
|
|
95
124
|
|
|
96
125
|
type TEventWASCallBack = {
|
|
@@ -134,6 +163,12 @@ interface IWAS {
|
|
|
134
163
|
getTriggerSize(triggerId: number): TTriggerSize | undefined;
|
|
135
164
|
getTriggerScale(triggerId: number): TVector | undefined;
|
|
136
165
|
getViewportSizes(): TViewportSizes;
|
|
166
|
+
getFaceMeshTriangulation(): Uint16Array;
|
|
167
|
+
getFaceMeshTriangulationFillMouth(): Uint16Array;
|
|
168
|
+
getFaceMeshTriangulationFillEyes(): Uint16Array;
|
|
169
|
+
getFaceMeshTriangulationFill(): Uint16Array;
|
|
170
|
+
getFaceMeshUv(): Float32Array;
|
|
171
|
+
getFaceMeshPosition(): Float32Array;
|
|
137
172
|
}
|
|
138
173
|
|
|
139
174
|
declare class WAS implements IWAS {
|
|
@@ -164,6 +199,9 @@ declare class WAS implements IWAS {
|
|
|
164
199
|
private faceLandmarker;
|
|
165
200
|
private faceLandmarkerTime;
|
|
166
201
|
private faceData;
|
|
202
|
+
private readonly fov;
|
|
203
|
+
private readonly near;
|
|
204
|
+
private readonly far;
|
|
167
205
|
private readonly browserManager;
|
|
168
206
|
private readonly eventsManager;
|
|
169
207
|
private readonly dataManager;
|
|
@@ -206,7 +244,12 @@ declare class WAS implements IWAS {
|
|
|
206
244
|
getTriggerSize(triggerId: number): TTriggerSize | undefined;
|
|
207
245
|
getTriggerScale(triggerId: number): TVector | undefined;
|
|
208
246
|
getViewportSizes(): TViewportSizes;
|
|
209
|
-
|
|
247
|
+
getFaceMeshTriangulation(): Uint16Array;
|
|
248
|
+
getFaceMeshTriangulationFillMouth(): Uint16Array;
|
|
249
|
+
getFaceMeshTriangulationFillEyes(): Uint16Array;
|
|
250
|
+
getFaceMeshTriangulationFill(): Uint16Array;
|
|
251
|
+
getFaceMeshUv(): Float32Array;
|
|
252
|
+
getFaceMeshPosition(): Float32Array;
|
|
210
253
|
}
|
|
211
254
|
|
|
212
|
-
export { ANCHOR_TYPE_BOTTOM_LEFT, ANCHOR_TYPE_BOTTOM_RIGHT, ANCHOR_TYPE_CENTER, ANCHOR_TYPE_TOP_LEFT, ANCHOR_TYPE_TOP_RIGHT, DATA_ERROR, DEVICE_ERROR, EVENT_DETECTED, EVENT_DEVICE_ORIENTATION, EVENT_ERROR, EVENT_FRAME, EVENT_LOST, EVENT_POSE, EVENT_PROCESS, EVENT_RESIZE, EVENT_SCREEN_ORIENTATION, EVENT_VISIBILITY, GL_ERROR, HTML_ERROR, PROJECT_MODE_FACE, PROJECT_MODE_IMAGE, PROJECT_MODE_MIX, PROJECT_MODE_QR, PROJECT_MODE_SLAM_3DOF, type TEventDetectedData, type TEventLostData, type TEventPoseData, TRIGGER_MODE_IMAGE, TRIGGER_MODE_QR, type TTriggerSize, type TViewportSizes, VIDEO_ERROR, WORKER_ERROR, WAS as default };
|
|
255
|
+
export { ANCHOR_TYPE_BOTTOM_LEFT, ANCHOR_TYPE_BOTTOM_LIP, ANCHOR_TYPE_BOTTOM_RIGHT, ANCHOR_TYPE_CENTER, ANCHOR_TYPE_CHIN, ANCHOR_TYPE_LEFT_EAR, ANCHOR_TYPE_LEFT_EYE, ANCHOR_TYPE_LEFT_EYEBROW, ANCHOR_TYPE_NOSE_BASE, ANCHOR_TYPE_NOSE_BRIDGE, ANCHOR_TYPE_NOSE_TIP, ANCHOR_TYPE_ORIGIN, ANCHOR_TYPE_RIGHT_EAR, ANCHOR_TYPE_RIGHT_EYE, ANCHOR_TYPE_RIGHT_EYEBROW, ANCHOR_TYPE_TOP_LEFT, ANCHOR_TYPE_TOP_RIGHT, DATA_ERROR, DEVICE_ERROR, EVENT_DETECTED, EVENT_DEVICE_ORIENTATION, EVENT_ERROR, EVENT_FRAME, EVENT_LOST, EVENT_POSE, EVENT_PROCESS, EVENT_RESIZE, EVENT_SCREEN_ORIENTATION, EVENT_VISIBILITY, GL_ERROR, HTML_ERROR, PROJECT_MODE_FACE, PROJECT_MODE_IMAGE, PROJECT_MODE_MIX, PROJECT_MODE_QR, PROJECT_MODE_SLAM_3DOF, type TEventDetectedData, type TEventLostData, type TEventPoseData, TRIGGER_MODE_IMAGE, TRIGGER_MODE_QR, type TTriggerSize, type TViewportSizes, VIDEO_ERROR, WORKER_ERROR, WAS as default };
|