@predy-js/render-interface 0.3.4-beta.13 → 0.3.4-beta.14
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.js +86 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +87 -84
- package/dist/index.mjs.map +1 -1
- package/dist/src/module.d.ts +0 -1
- package/dist/src/render/EventSystem.d.ts +2 -1
- package/dist/src/render/event/UniversalRecognizer.d.ts +3 -3
- package/dist/statistic.js +1 -1
- package/dist/types/EventSystem.d.ts +5 -9
- package/package.json +1 -1
- package/types/EventSystem.ts +6 -10
package/dist/src/module.d.ts
CHANGED
@@ -17,5 +17,4 @@ export { MarsSharedGeometry as SharedGeometry } from './render/MarsSharedGeometr
|
|
17
17
|
export { getDefaultGPUCapability } from './render/MarsGPUCapability';
|
18
18
|
export { getDefaultTextureFactory, setDefaultTextureFactory, MarsTextureFactory } from './render/MarsTextureFactory';
|
19
19
|
export { PredyEventSystem as EventSystem } from './render/EventSystem';
|
20
|
-
export { UniversalRecognizer as PredyUniversalRecognizer } from './render/event/UniversalRecognizer';
|
21
20
|
export declare const ModuleMsg = "RI Package: @predy-js/render-interface";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { PredyTouchEventArg, PredyRecognizer } from 'types';
|
1
|
+
import type { PredyTouchEventArg, PredyRecognizer, UniversalRecognizerOptions } from 'types';
|
2
2
|
import { type EventSystem } from 'types';
|
3
3
|
import { EventSystemEnv } from 'types';
|
4
4
|
import type { Canvas } from 'types/Canvas';
|
@@ -13,6 +13,7 @@ export declare class PredyEventSystem implements EventSystem {
|
|
13
13
|
set enabled(value: boolean);
|
14
14
|
private createPlatformHandler;
|
15
15
|
setRecognizer(recognizer: PredyRecognizer): void;
|
16
|
+
setUniversalRecognizer(options: UniversalRecognizerOptions): void;
|
16
17
|
handleBaseEvent(event: PredyTouchEventArg): void;
|
17
18
|
dispatch(type: string, event: PredyTouchEventArg): void;
|
18
19
|
addEventListener(type: string, handler: (e: PredyTouchEventArg) => void): () => void;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import type { UniversalRecognizerOptions } from 'types';
|
2
|
-
import { RecognizerState
|
3
|
-
export declare class UniversalRecognizer implements
|
1
|
+
import type { PredyRecognizer, UniversalRecognizerOptions, PredyTouchEventArg } from 'types';
|
2
|
+
import { RecognizerState } from 'types';
|
3
|
+
export declare class UniversalRecognizer implements PredyRecognizer {
|
4
4
|
readonly options: UniversalRecognizerOptions;
|
5
5
|
private _state;
|
6
6
|
private trackedTouches;
|
package/dist/statistic.js
CHANGED
@@ -62,15 +62,6 @@ export interface PredyRecognizer {
|
|
62
62
|
detect(event: PredyTouchEventArg): string | undefined;
|
63
63
|
reset(): void;
|
64
64
|
}
|
65
|
-
/**
|
66
|
-
* 通用手势识别器
|
67
|
-
*/
|
68
|
-
export declare class PredyUniversalRecognizer implements PredyRecognizer {
|
69
|
-
constructor(options: UniversalRecognizerOptions);
|
70
|
-
_callback?: ((type: string, event: PredyTouchEventArg) => void) | undefined;
|
71
|
-
detect(event: PredyTouchEventArg): string | undefined;
|
72
|
-
reset(): void;
|
73
|
-
}
|
74
65
|
/**
|
75
66
|
* 事件系统
|
76
67
|
*/
|
@@ -80,8 +71,13 @@ export declare class EventSystem {
|
|
80
71
|
constructor(target: HTMLCanvasElement | Canvas, env: EventSystemEnv);
|
81
72
|
/**
|
82
73
|
* 设置自定义手势识别器
|
74
|
+
* 如不设置则只能监听基础的 touch 事件
|
83
75
|
*/
|
84
76
|
setRecognizer: (recognizer: PredyRecognizer) => void;
|
77
|
+
/**
|
78
|
+
* 设置 Predy 提供的通用手势识别器
|
79
|
+
*/
|
80
|
+
setUniversalRecognizer: (options: UniversalRecognizerOptions) => void;
|
85
81
|
/**
|
86
82
|
* 处理基础手势,只能在平台接口中调用
|
87
83
|
*/
|
package/package.json
CHANGED
package/types/EventSystem.ts
CHANGED
@@ -84,16 +84,6 @@ export interface PredyRecognizer {
|
|
84
84
|
reset(): void,
|
85
85
|
}
|
86
86
|
|
87
|
-
/**
|
88
|
-
* 通用手势识别器
|
89
|
-
*/
|
90
|
-
export declare class PredyUniversalRecognizer implements PredyRecognizer {
|
91
|
-
constructor (options: UniversalRecognizerOptions);
|
92
|
-
_callback?: ((type: string, event: PredyTouchEventArg) => void) | undefined;
|
93
|
-
detect (event: PredyTouchEventArg): string | undefined;
|
94
|
-
reset (): void;
|
95
|
-
}
|
96
|
-
|
97
87
|
/**
|
98
88
|
* 事件系统
|
99
89
|
*/
|
@@ -104,9 +94,15 @@ export declare class EventSystem {
|
|
104
94
|
|
105
95
|
/**
|
106
96
|
* 设置自定义手势识别器
|
97
|
+
* 如不设置则只能监听基础的 touch 事件
|
107
98
|
*/
|
108
99
|
setRecognizer: (recognizer: PredyRecognizer) => void;
|
109
100
|
|
101
|
+
/**
|
102
|
+
* 设置 Predy 提供的通用手势识别器
|
103
|
+
*/
|
104
|
+
setUniversalRecognizer: (options: UniversalRecognizerOptions) => void;
|
105
|
+
|
110
106
|
/**
|
111
107
|
* 处理基础手势,只能在平台接口中调用
|
112
108
|
*/
|