@galacean/effects-core 2.10.0-alpha.3 → 2.10.0-alpha.4

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.
@@ -63,3 +63,5 @@ export declare enum CursorShape {
63
63
  Hsplit = 15,
64
64
  Help = 16
65
65
  }
66
+ /** A preset cursor shape or a complete CSS cursor value. */
67
+ export type CursorStyle = CursorShape | string;
@@ -9,6 +9,10 @@ export declare class InputEvent {
9
9
  device: number;
10
10
  pressed: boolean;
11
11
  canceled: boolean;
12
+ private _accepted;
13
+ accept(): void;
14
+ clearAccepted(): void;
15
+ isAccepted(): boolean;
12
16
  isPressed(): boolean;
13
17
  isReleased(): boolean;
14
18
  isCanceled(): boolean;
@@ -22,7 +26,6 @@ export declare class InputEventWithModifiers extends InputEvent {
22
26
  metaPressed: boolean;
23
27
  ctrlPressed: boolean;
24
28
  protected copyModifiersTo(event: InputEventWithModifiers): void;
25
- xformedBy(transform: Matrix3): InputEventWithModifiers;
26
29
  }
27
30
  export declare class InputEventKey extends InputEventWithModifiers {
28
31
  keycode: string;
@@ -32,14 +35,12 @@ export declare class InputEventKey extends InputEventWithModifiers {
32
35
  location: KeyLocation;
33
36
  echo: boolean;
34
37
  isEcho(): boolean;
35
- xformedBy(transform: Matrix3): InputEventKey;
36
38
  }
37
39
  export declare class InputEventMouse extends InputEventWithModifiers {
38
40
  buttonMask: MouseButtonMask;
39
41
  position: Vector2;
40
42
  globalPosition: Vector2;
41
43
  protected copyMouseTo(event: InputEventMouse): void;
42
- xformedBy(transform: Matrix3): InputEventMouse;
43
44
  }
44
45
  export declare class InputEventMouseButton extends InputEventMouse {
45
46
  factor: number;
@@ -109,8 +109,8 @@ export declare class Graphics {
109
109
  drawTriangle(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, color?: Color, thickness?: number): void;
110
110
  /**
111
111
  * 绘制矩形边框
112
- * @param x - 矩形左下角 X 坐标
113
- * @param y - 矩形左下角 Y 坐标
112
+ * @param x - 矩形左上角 X 坐标
113
+ * @param y - 矩形左上角 Y 坐标
114
114
  * @param width - 矩形宽度
115
115
  * @param height - 矩形高度
116
116
  * @param color - 边框颜色,默认白色,范围 0-1
@@ -139,8 +139,8 @@ export declare class Graphics {
139
139
  fillTriangle(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, color?: Color): void;
140
140
  /**
141
141
  * 绘制填充矩形
142
- * @param x - 矩形左下角 X 坐标
143
- * @param y - 矩形左下角 Y 坐标
142
+ * @param x - 矩形左上角 X 坐标
143
+ * @param y - 矩形左上角 Y 坐标
144
144
  * @param width - 矩形宽度
145
145
  * @param height - 矩形高度
146
146
  * @param color - 填充颜色,默认白色,范围 0-1
@@ -159,9 +159,9 @@ export declare class Graphics {
159
159
  */
160
160
  fillCircle(cx: number, cy: number, radius: number, color?: Color): void;
161
161
  /**
162
- * 绘制纹理矩形(本地坐标,Y 向上,(x, y) 为左下角)
163
- * @param x - 矩形左下角 X 坐标
164
- * @param y - 矩形左下角 Y 坐标
162
+ * 绘制纹理矩形(本地坐标,Y 向下,(x, y) 为左上角)
163
+ * @param x - 矩形左上角 X 坐标
164
+ * @param y - 矩形左上角 Y 坐标
165
165
  * @param width - 矩形宽度
166
166
  * @param height - 矩形高度
167
167
  * @param texture - 要采样的纹理。同纹理连续绘制会合批,纹理切换会自动 flush 当前批次
@@ -170,14 +170,14 @@ export declare class Graphics {
170
170
  */
171
171
  drawTexture(x: number, y: number, width: number, height: number, texture: Texture, region?: TextureRegion, color?: Color): void;
172
172
  /**
173
- * 绘制文本(本地坐标,Y 向上,(x, y) 为文本左下角)。
173
+ * 绘制文本(本地坐标,Y 向下,(x, y) 为文本 cell 左上角)。
174
174
  *
175
175
  * 文本走字符级 bitmap atlas(同一字体下每个字只渲染一次,任意文本组合复用 atlas);
176
176
  * `color` 作为乘色与白色字形 alpha 相乘,任意颜色都不会污染 atlas。
177
177
  *
178
178
  * 字体参数全部展开,避免调用方每帧创建临时 style 对象触发 GC
179
- * @param x - 文本左下角 X 坐标(首字 ink 起始处,含 padding 的 quad 会向左延伸)
180
- * @param y - 文本左下角 Y 坐标(cell 底,含底部 padding;字形 ink 在其上方 padding+ascent 处)
179
+ * @param x - 文本左上角 X 坐标(首字 ink 起始处,含 padding 的 quad 会向左延伸)
180
+ * @param y - 文本 cell 顶部 Y 坐标
181
181
  * @param text - 要绘制的文本内容,空串直接 return
182
182
  * @param fontSize - 字号(逻辑像素)
183
183
  * @param color - 乘色,默认白色,范围 0-1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "2.10.0-alpha.3",
3
+ "version": "2.10.0-alpha.4",
4
4
  "description": "Galacean Effects runtime core for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",