laymur 0.3.8 → 0.3.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.
@@ -69,6 +69,22 @@ export declare abstract class UIElement extends UIAnchor implements UIPlaneEleme
69
69
  * @returns The current height dimension
70
70
  */
71
71
  get height(): number;
72
+ /**
73
+ * The right edge X coordinate of this element (x + width).
74
+ */
75
+ get oppositeX(): number;
76
+ /**
77
+ * The bottom edge Y coordinate of this element (y + height).
78
+ */
79
+ get oppositeY(): number;
80
+ /**
81
+ * The X coordinate of the center of this element.
82
+ */
83
+ get centerX(): number;
84
+ /**
85
+ * The Y coordinate of the center of this element.
86
+ */
87
+ get centerY(): number;
72
88
  /**
73
89
  * Gets the current z-index (depth) value.
74
90
  * @returns The current z-index value
package/dist/index.js CHANGED
@@ -4770,7 +4770,7 @@ class UIElement extends UIAnchor {
4770
4770
  /** Internal storage for the current visibility/interaction mode. */
4771
4771
  this.modeInternal = UIMode.VISIBLE;
4772
4772
  /** Internal storage for the transparency rendering mode. */
4773
- this.transparencyInternal = UITransparencyMode.CLIP;
4773
+ this.transparencyInternal = UITransparencyMode.BLEND;
4774
4774
  /** Internal storage for the z-index (depth) value. */
4775
4775
  this.zIndexInternal = 0;
4776
4776
  /**
@@ -4791,6 +4791,7 @@ class UIElement extends UIAnchor {
4791
4791
  this.hVariable = this.solverWrapper.createVariable(height, UIPriority.P6);
4792
4792
  this.sceneWrapper = layer["getSceneWrapperClientAPI"]();
4793
4793
  this.planeHandler = this.sceneWrapper.createPlane(source, uniforms);
4794
+ this.sceneWrapper.setTransparency(this.planeHandler, this.transparencyInternal);
4794
4795
  }
4795
4796
  /**
4796
4797
  * Gets the current width value from the solver.
@@ -4806,6 +4807,30 @@ class UIElement extends UIAnchor {
4806
4807
  get height() {
4807
4808
  return this.solverWrapper.readVariableValue(this.hVariable);
4808
4809
  }
4810
+ /**
4811
+ * The right edge X coordinate of this element (x + width).
4812
+ */
4813
+ get oppositeX() {
4814
+ return this.x + this.width;
4815
+ }
4816
+ /**
4817
+ * The bottom edge Y coordinate of this element (y + height).
4818
+ */
4819
+ get oppositeY() {
4820
+ return this.y + this.height;
4821
+ }
4822
+ /**
4823
+ * The X coordinate of the center of this element.
4824
+ */
4825
+ get centerX() {
4826
+ return this.x + this.width / 2;
4827
+ }
4828
+ /**
4829
+ * The Y coordinate of the center of this element.
4830
+ */
4831
+ get centerY() {
4832
+ return this.y + this.height / 2;
4833
+ }
4809
4834
  /**
4810
4835
  * Gets the current z-index (depth) value.
4811
4836
  * @returns The current z-index value