laymur 0.3.11 → 0.3.13

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;\nuniform mat3 uvTransform;\n\n#include <common>\n#include <alphahash_pars_fragment>\n";
2162
+ var fragmentShader = "in vec2 io_UV;\n\nuniform float alphaTest;\nuniform float 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 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";
4976
+ var source$2 = "void main() {\n vec2 transformedUV = (uvTransform * vec3(io_UV, 1.0)).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.
@@ -5596,6 +5596,7 @@ class UIScene extends UIElement {
5596
5596
  const color = options.color ?? new UIColor();
5597
5597
  super(layer, 0, 0, w, h, source$2, {
5598
5598
  map: renderTarget.texture,
5599
+ uvTransform: new Matrix3(),
5599
5600
  color,
5600
5601
  });
5601
5602
  /** Frame alternation boolean for EACH_SECOND_FRAME update mode. */
@@ -6076,6 +6077,7 @@ class UIText extends UIElement {
6076
6077
  const color = options.color ?? new UIColor();
6077
6078
  super(layer, options.x ?? 0, options.y ?? 0, 2, 2, source$2, {
6078
6079
  map: texture,
6080
+ uvTransform: new Matrix3(),
6079
6081
  color,
6080
6082
  });
6081
6083
  /** Target aspect ratio for the text element based on content. */