@web-ar-studio/webar-engine-sdk 1.0.11 → 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 CHANGED
@@ -13,11 +13,11 @@ declare const EVENT_LOST = "lost";
13
13
  declare const EVENT_POSE = "pose";
14
14
  declare const EVENT_PROCESS = "process";
15
15
  declare const EVENT_XR_SESSION = "xrsession";
16
+ declare const EVENT_SELECT = "select";
16
17
  declare const EVENT_RESIZE = "resize";
17
18
  declare const EVENT_DEVICE_ORIENTATION = "deviceorientation";
18
19
  declare const EVENT_SCREEN_ORIENTATION = "change";
19
20
  declare const EVENT_VISIBILITY = "visibilitychange";
20
- declare const EVENT_SELECT = "select";
21
21
  declare const EVENT_FRAME = "frame";
22
22
  declare const DATA_ERROR = "DataError";
23
23
  declare const EVENT_ERROR = "EventError";
@@ -106,7 +106,7 @@ type TConfigData = {
106
106
  anchor: TAnchorType;
107
107
  });
108
108
 
109
- type TEventWASType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof EVENT_XR_SESSION | typeof EVENT_RESIZE | typeof EVENT_DEVICE_ORIENTATION | typeof EVENT_SCREEN_ORIENTATION | typeof EVENT_VISIBILITY | typeof EVENT_SELECT | typeof EVENT_FRAME;
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;
110
110
 
111
111
  type TVector = {
112
112
  x: number;
@@ -151,15 +151,15 @@ type TEventWASCallBack = {
151
151
  (poseData: TEventPoseData[]): void;
152
152
  (isProcess: boolean): void;
153
153
  (isActive: boolean): void;
154
+ (event: XRInputSourceEvent): void;
154
155
  (event: UIEvent): void;
155
156
  (event: DeviceOrientationEvent): void;
156
157
  (angle: number): void;
157
158
  (isVisible: boolean): void;
158
- (): void;
159
159
  (deltaTime: number): void;
160
160
  };
161
161
 
162
- type TEventType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof EVENT_XR_SESSION | typeof EVENT_RESIZE | typeof EVENT_DEVICE_ORIENTATION | typeof EVENT_SCREEN_ORIENTATION | typeof EVENT_VISIBILITY | typeof EVENT_SELECT | typeof EVENT_FRAME;
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;
163
163
 
164
164
  type TViewportSizes = {
165
165
  width: number;
@@ -181,7 +181,7 @@ type TTriggerSize = {
181
181
 
182
182
  type TEventEmitType = typeof EVENT_DETECTED | typeof EVENT_LOST | typeof EVENT_POSE | typeof EVENT_PROCESS | typeof EVENT_XR_SESSION | typeof EVENT_SELECT;
183
183
 
184
- type TEventEmitData = TEventDetectedData[] | TEventLostData[] | TEventPoseData[] | boolean;
184
+ type TEventEmitData = TEventDetectedData[] | TEventLostData[] | TEventPoseData[] | XRInputSourceEvent | boolean;
185
185
 
186
186
  type TXRViewerPose = {
187
187
  positionVector: TVector;
@@ -256,11 +256,11 @@ declare class WAS implements IWAS {
256
256
  on(type: typeof EVENT_POSE, callBack: (poseData: TEventPoseData[]) => void): Promise<void>;
257
257
  on(type: typeof EVENT_PROCESS, callBack: (isProcess: boolean) => void): Promise<void>;
258
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>;
259
260
  on(type: typeof EVENT_RESIZE, callBack: (event: UIEvent) => void): Promise<void>;
260
261
  on(type: typeof EVENT_DEVICE_ORIENTATION, callBack: (event: DeviceOrientationEvent) => void): Promise<void>;
261
262
  on(type: typeof EVENT_SCREEN_ORIENTATION, callBack: (angle: number) => void): Promise<void>;
262
263
  on(type: typeof EVENT_VISIBILITY, callBack: (isVisible: boolean) => void): Promise<void>;
263
- on(type: typeof EVENT_SELECT, callBack: () => void): Promise<void>;
264
264
  on(type: typeof EVENT_FRAME, callBack: (deltaTime: number) => void): Promise<void>;
265
265
  un(type: TEventType): Promise<void>;
266
266
  dispose(): Promise<void>;