laymur 0.3.29 → 0.3.30

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.
@@ -48,11 +48,7 @@ export declare class UIFullscreenLayer extends UILayer {
48
48
  * Handles window resize. Updates layer dimensions according to resize policy.
49
49
  */
50
50
  private readonly onResize;
51
- /**
52
- * Handles pointer down. Converts browser coordinates to layer space.
53
- * Y-coordinate is flipped to match UI coordinate system.
54
- *
55
- * @param event - Browser pointer event
56
- */
57
- private readonly onClick;
51
+ private readonly onDown;
52
+ private readonly onMove;
53
+ private readonly onUp;
58
54
  }
@@ -10,13 +10,9 @@ import { UISolverWrapper } from "../wrappers/UISolverWrapper";
10
10
  * Interface for handling input events within UI layers.
11
11
  */
12
12
  export interface UILayerInputListener {
13
- /**
14
- * Handles click events at the specified coordinates.
15
- * @param x - The x-coordinate of the click
16
- * @param y - The y-coordinate of the click
17
- * @returns True if the click was handled, false otherwise
18
- */
19
- catchClick(x: number, y: number): boolean;
13
+ catchDown(x: number, y: number): boolean;
14
+ catchMove(x: number, y: number): boolean;
15
+ catchUp(x: number, y: number): boolean;
20
16
  }
21
17
  /**
22
18
  * Events that can be emitted by UI layers.
@@ -157,18 +153,9 @@ export declare abstract class UILayer extends Eventail implements UIPlaneElement
157
153
  * @protected
158
154
  */
159
155
  protected renderInternal(renderer: WebGLRenderer, deltaTime: number): void;
160
- /**
161
- * Internal method for handling click events on the layer.
162
- *
163
- * Processes click events by testing elements in reverse z-order (top to bottom)
164
- * until one handles the click. Only processes clicks when the layer is in
165
- * interactive mode.
166
- *
167
- * @param x - The x-coordinate of the click
168
- * @param y - The y-coordinate of the click
169
- * @protected
170
- */
171
- protected pointerClickInternal(x: number, y: number): void;
156
+ protected pointerDownInternal(x: number, y: number): void;
157
+ protected pointerMoveInternal(x: number, y: number): void;
158
+ protected pointerUpInternal(x: number, y: number): void;
172
159
  /**
173
160
  * Internal method for accessing the constraint solver wrapper.
174
161
  *
@@ -2,6 +2,7 @@
2
2
  * Events that can be emitted by UI elements.
3
3
  */
4
4
  export declare enum UIInputEvent {
5
- /** Emitted when the element is clicked. */
6
- CLICK = "click"
5
+ DOWN = "click",
6
+ MOVE = "move",
7
+ UP = "up"
7
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "laymur",
3
- "version": "0.3.29",
3
+ "version": "0.3.30",
4
4
  "description": "Constraint-based UI library for Three.js mobile advertisements",
5
5
  "scripts": {
6
6
  "clean": "rm -rf dist",