laymur 0.3.10 → 0.3.11

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.
package/dist/index.js CHANGED
@@ -2159,7 +2159,7 @@ var UITransparencyMode;
2159
2159
  UITransparencyMode[UITransparencyMode["BLEND"] = 2] = "BLEND";
2160
2160
  })(UITransparencyMode || (UITransparencyMode = {}));
2161
2161
 
2162
- var fragmentShader = "in vec2 io_UV;\n\nuniform float alphaTest;\n\n#include <common>\n#include <alphahash_pars_fragment>\n";
2162
+ var fragmentShader = "in vec2 io_UV;\n\nuniform float alphaTest;\nuniform mat3 uvTransform;\n\n#include <common>\n#include <alphahash_pars_fragment>\n";
2163
2163
 
2164
2164
  var vertexShader = "out vec2 io_UV;\n#include <common>\n\nvoid main() {\n #include <begin_vertex>\n io_UV = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n";
2165
2165
 
@@ -4973,7 +4973,7 @@ class UIElement extends UIAnchor {
4973
4973
  }
4974
4974
  }
4975
4975
 
4976
- var source$2 = "void main() {\n vec4 diffuseColor = texture(map, io_UV) * color;\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n gl_FragColor = diffuseColor;\n #include <colorspace_fragment>\n}\n";
4976
+ var source$2 = "void main() {\n vec2 transformedUV = (vec3(io_UV, 1.0) * uvTransform).xy;\n vec4 diffuseColor = texture(map, transformedUV) * color;\n #include <alphatest_fragment>\n #include <alphahash_fragment>\n gl_FragColor = diffuseColor;\n #include <colorspace_fragment>\n}\n";
4977
4977
 
4978
4978
  /**
4979
4979
  * UI element for displaying textured images.
@@ -5004,6 +5004,7 @@ class UIImage extends UIElement {
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,
5007
+ uvTransform: texture.matrix,
5007
5008
  color,
5008
5009
  });
5009
5010
  /** Event handler for when the color changes */