laymur 0.2.8 → 0.2.10

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.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Defines the anchor mode for UIMicro, determining which transformations are applied around the anchor point.
3
+ */
4
+ export declare enum UIAnchorMode {
5
+ /** Rotation and scaling are applied around the anchor point */
6
+ ROTATION_SCALE = 0,
7
+ /** Position, rotation, and scaling transformations are all applied around the anchor point */
8
+ POSITION_ROTATION_SCALE = 1
9
+ }
@@ -1,3 +1,4 @@
1
+ import { UIAnchorMode } from "./UIAnchorMode";
1
2
  /**
2
3
  * Micro-transformation system for non-constraint based UI element adjustments.
3
4
  *
@@ -27,6 +28,8 @@ export declare class UIMicro {
27
28
  private scaleYInternal;
28
29
  /** Internal storage for rotation in radians. */
29
30
  private rotationInternal;
31
+ /** Internal storage for anchor mode determining which transformations are applied around the anchor point. */
32
+ private anchorModeInternal;
30
33
  /** Flag indicating if any transformation properties have changed. */
31
34
  private recalculationRequired;
32
35
  /**
@@ -69,6 +72,11 @@ export declare class UIMicro {
69
72
  * @returns The rotation angle in degrees
70
73
  */
71
74
  get angle(): number;
75
+ /**
76
+ * Gets the current anchor mode determining which transformations are applied around the anchor point.
77
+ * @returns The anchor mode (ROTATION_SCALE or POSITION_ROTATION_SCALE)
78
+ */
79
+ get anchorMode(): UIAnchorMode;
72
80
  /**
73
81
  * Gets the rotation angle in radians.
74
82
  * @returns The rotation angle in radians
@@ -119,6 +127,11 @@ export declare class UIMicro {
119
127
  * @param value - The rotation angle in radians
120
128
  */
121
129
  set rotation(value: number);
130
+ /**
131
+ * Sets the anchor mode determining which transformations are applied around the anchor point.
132
+ * @param value - The anchor mode (ROTATION_SCALE or POSITION_ROTATION_SCALE)
133
+ */
134
+ set anchorMode(value: UIAnchorMode);
122
135
  /**
123
136
  * Resets all transformation properties to their default values.
124
137
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "laymur",
3
- "version": "0.2.8",
3
+ "version": "0.2.10",
4
4
  "description": "Lightweight Three.js UI toolkit mainly for mobile ads",
5
5
  "scripts": {
6
6
  "clean": "rm -rf dist",