lucky-scratch 1.0.1 → 1.1.1
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.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/types/index.d.ts +25 -0
package/types/index.d.ts
CHANGED
|
@@ -220,12 +220,37 @@ declare class LuckyScratch extends Lucky {
|
|
|
220
220
|
private handleMove;
|
|
221
221
|
private handleEnd;
|
|
222
222
|
private drawArc;
|
|
223
|
+
/**
|
|
224
|
+
* 在指定坐标绘制刮痕
|
|
225
|
+
* @param x 相对于 canvas 的 x 坐标(物理像素,已乘以 dpr)
|
|
226
|
+
* @param y 相对于 canvas 的 y 坐标(物理像素,已乘以 dpr)
|
|
227
|
+
*/
|
|
228
|
+
private drawArcAt;
|
|
223
229
|
private checkProgress;
|
|
224
230
|
/**
|
|
225
231
|
* 动态设置禁用状态
|
|
226
232
|
* @param disabled 是否禁用
|
|
227
233
|
*/
|
|
228
234
|
setDisabled(disabled: boolean): void;
|
|
235
|
+
/**
|
|
236
|
+
* 公共方法:处理触摸/鼠标开始事件
|
|
237
|
+
* 供小程序、uni-app 等非 DOM 环境使用
|
|
238
|
+
* @param x 相对于 canvas 的 x 坐标(逻辑像素)
|
|
239
|
+
* @param y 相对于 canvas 的 y 坐标(逻辑像素)
|
|
240
|
+
*/
|
|
241
|
+
handleTouchStart(x: number, y: number): Promise<void>;
|
|
242
|
+
/**
|
|
243
|
+
* 公共方法:处理触摸/鼠标移动事件
|
|
244
|
+
* 供小程序、uni-app 等非 DOM 环境使用
|
|
245
|
+
* @param x 相对于 canvas 的 x 坐标(逻辑像素)
|
|
246
|
+
* @param y 相对于 canvas 的 y 坐标(逻辑像素)
|
|
247
|
+
*/
|
|
248
|
+
handleTouchMove(x: number, y: number): void;
|
|
249
|
+
/**
|
|
250
|
+
* 公共方法:处理触摸/鼠标结束事件
|
|
251
|
+
* 供小程序、uni-app 等非 DOM 环境使用
|
|
252
|
+
*/
|
|
253
|
+
handleTouchEnd(): void;
|
|
229
254
|
}
|
|
230
255
|
|
|
231
256
|
/**
|