laymur 0.3.14 → 0.3.16

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.
@@ -10,6 +10,10 @@ export interface UIImageOptions {
10
10
  x: number;
11
11
  /** Y position of the element */
12
12
  y: number;
13
+ /** Width of the element */
14
+ width: number;
15
+ /** Height of the element */
16
+ height: number;
13
17
  /** Color tint applied to the image */
14
18
  color: UIColor;
15
19
  }
package/dist/index.js CHANGED
@@ -4999,8 +4999,8 @@ class UIImage extends UIElement {
4999
4999
  * @throws Will throw an error if the texture dimensions are not valid positive numbers
5000
5000
  */
5001
5001
  constructor(layer, texture, options = {}) {
5002
- const w = texture.image.width;
5003
- const h = texture.image.height;
5002
+ const w = options.width ?? texture.image.width;
5003
+ const h = options.height ?? texture.image.height;
5004
5004
  const color = options.color ?? new UIColor();
5005
5005
  super(layer, options.x ?? 0, options.y ?? 0, w, h, source$2, {
5006
5006
  map: texture,
@@ -5048,6 +5048,7 @@ class UIImage extends UIElement {
5048
5048
  this.solverWrapper.suggestVariableValue(this.hVariable, h);
5049
5049
  this._private_textureInternal = value;
5050
5050
  this.sceneWrapper.setUniform(this.planeHandler, "map", value);
5051
+ this.sceneWrapper.setUniform(this.planeHandler, "uvTransform", value.matrix);
5051
5052
  }
5052
5053
  /**
5053
5054
  * Sets the color tint applied to the image.