@web-ar-studio/webar-engine-sdk 1.0.10 → 1.0.12
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 +11 -8
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -1
package/dist/index.d.ts
CHANGED
|
@@ -12,11 +12,12 @@ declare const EVENT_DETECTED = "detected";
|
|
|
12
12
|
declare const EVENT_LOST = "lost";
|
|
13
13
|
declare const EVENT_POSE = "pose";
|
|
14
14
|
declare const EVENT_PROCESS = "process";
|
|
15
|
+
declare const EVENT_XR_SESSION = "xrsession";
|
|
16
|
+
declare const EVENT_SELECT = "select";
|
|
15
17
|
declare const EVENT_RESIZE = "resize";
|
|
16
18
|
declare const EVENT_DEVICE_ORIENTATION = "deviceorientation";
|
|
17
19
|
declare const EVENT_SCREEN_ORIENTATION = "change";
|
|
18
20
|
declare const EVENT_VISIBILITY = "visibilitychange";
|
|
19
|
-
declare const EVENT_SELECT = "select";
|
|
20
21
|
declare const EVENT_FRAME = "frame";
|
|
21
22
|
declare const DATA_ERROR = "DataError";
|
|
22
23
|
declare const EVENT_ERROR = "EventError";
|
|
@@ -105,7 +106,7 @@ type TConfigData = {
|
|
|
105
106
|
anchor: TAnchorType;
|
|
106
107
|
});
|
|
107
108
|
|
|
108
|
-
type TEventWASType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof
|
|
109
|
+
type TEventWASType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof EVENT_XR_SESSION | typeof EVENT_SELECT | typeof EVENT_RESIZE | typeof EVENT_DEVICE_ORIENTATION | typeof EVENT_SCREEN_ORIENTATION | typeof EVENT_VISIBILITY | typeof EVENT_FRAME;
|
|
109
110
|
|
|
110
111
|
type TVector = {
|
|
111
112
|
x: number;
|
|
@@ -149,15 +150,16 @@ type TEventWASCallBack = {
|
|
|
149
150
|
(lostData: TEventLostData[]): void;
|
|
150
151
|
(poseData: TEventPoseData[]): void;
|
|
151
152
|
(isProcess: boolean): void;
|
|
153
|
+
(isActive: boolean): void;
|
|
154
|
+
(event: XRInputSourceEvent): void;
|
|
152
155
|
(event: UIEvent): void;
|
|
153
156
|
(event: DeviceOrientationEvent): void;
|
|
154
157
|
(angle: number): void;
|
|
155
158
|
(isVisible: boolean): void;
|
|
156
|
-
(): void;
|
|
157
159
|
(deltaTime: number): void;
|
|
158
160
|
};
|
|
159
161
|
|
|
160
|
-
type TEventType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof
|
|
162
|
+
type TEventType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof EVENT_XR_SESSION | typeof EVENT_SELECT | typeof EVENT_RESIZE | typeof EVENT_DEVICE_ORIENTATION | typeof EVENT_SCREEN_ORIENTATION | typeof EVENT_VISIBILITY | typeof EVENT_FRAME;
|
|
161
163
|
|
|
162
164
|
type TViewportSizes = {
|
|
163
165
|
width: number;
|
|
@@ -177,9 +179,9 @@ type TTriggerSize = {
|
|
|
177
179
|
height: number;
|
|
178
180
|
};
|
|
179
181
|
|
|
180
|
-
type TEventEmitType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof EVENT_SELECT;
|
|
182
|
+
type TEventEmitType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof EVENT_XR_SESSION | typeof EVENT_SELECT;
|
|
181
183
|
|
|
182
|
-
type TEventEmitData = TEventDetectedData[] | TEventLostData[] | TEventPoseData[] | boolean;
|
|
184
|
+
type TEventEmitData = TEventDetectedData[] | TEventLostData[] | TEventPoseData[] | XRInputSourceEvent | boolean;
|
|
183
185
|
|
|
184
186
|
type TXRViewerPose = {
|
|
185
187
|
positionVector: TVector;
|
|
@@ -253,11 +255,12 @@ declare class WAS implements IWAS {
|
|
|
253
255
|
on(type: typeof EVENT_LOST, callBack: (lostData: TEventLostData[]) => void): Promise<void>;
|
|
254
256
|
on(type: typeof EVENT_POSE, callBack: (poseData: TEventPoseData[]) => void): Promise<void>;
|
|
255
257
|
on(type: typeof EVENT_PROCESS, callBack: (isProcess: boolean) => void): Promise<void>;
|
|
258
|
+
on(type: typeof EVENT_XR_SESSION, callBack: (isActive: boolean) => void): Promise<void>;
|
|
259
|
+
on(type: typeof EVENT_SELECT, callBack: (event: XRInputSourceEvent) => void): Promise<void>;
|
|
256
260
|
on(type: typeof EVENT_RESIZE, callBack: (event: UIEvent) => void): Promise<void>;
|
|
257
261
|
on(type: typeof EVENT_DEVICE_ORIENTATION, callBack: (event: DeviceOrientationEvent) => void): Promise<void>;
|
|
258
262
|
on(type: typeof EVENT_SCREEN_ORIENTATION, callBack: (angle: number) => void): Promise<void>;
|
|
259
263
|
on(type: typeof EVENT_VISIBILITY, callBack: (isVisible: boolean) => void): Promise<void>;
|
|
260
|
-
on(type: typeof EVENT_SELECT, callBack: () => void): Promise<void>;
|
|
261
264
|
on(type: typeof EVENT_FRAME, callBack: (deltaTime: number) => void): Promise<void>;
|
|
262
265
|
un(type: TEventType): Promise<void>;
|
|
263
266
|
dispose(): Promise<void>;
|
|
@@ -299,4 +302,4 @@ declare class WAS implements IWAS {
|
|
|
299
302
|
getDeltaTime(): number;
|
|
300
303
|
}
|
|
301
304
|
|
|
302
|
-
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_SELECT, EVENT_VISIBILITY, GL_ERROR, HTML_ERROR, PROJECT_MODE_FACE, PROJECT_MODE_IMAGE, PROJECT_MODE_MIX, PROJECT_MODE_QR, PROJECT_MODE_SLAM_3DOF, PROJECT_MODE_SLAM_WEBXR, type TEventDetectedData, type TEventLostData, type TEventPoseData, TRIGGER_MODE_FACE, TRIGGER_MODE_IMAGE, TRIGGER_MODE_QR, TRIGGER_MODE_SLAM_WEBXR, type TTriggerSize, type TViewportSizes, type TXRViewerPose, VIDEO_ERROR, WORKER_ERROR, XR_ERROR, WAS as default };
|
|
305
|
+
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_SELECT, EVENT_VISIBILITY, EVENT_XR_SESSION, GL_ERROR, HTML_ERROR, PROJECT_MODE_FACE, PROJECT_MODE_IMAGE, PROJECT_MODE_MIX, PROJECT_MODE_QR, PROJECT_MODE_SLAM_3DOF, PROJECT_MODE_SLAM_WEBXR, type TEventDetectedData, type TEventLostData, type TEventPoseData, TRIGGER_MODE_FACE, TRIGGER_MODE_IMAGE, TRIGGER_MODE_QR, TRIGGER_MODE_SLAM_WEBXR, type TTriggerSize, type TViewportSizes, type TXRViewerPose, VIDEO_ERROR, WORKER_ERROR, XR_ERROR, WAS as default };
|