@leafer/worker 1.9.8 → 1.9.9

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/worker.js CHANGED
@@ -6409,7 +6409,7 @@ var LeaferUI = function(exports) {
6409
6409
  this.levelMap = null;
6410
6410
  }
6411
6411
  }
6412
- const version = "1.9.8";
6412
+ const version = "1.9.9";
6413
6413
  class LeaferCanvas extends LeaferCanvasBase {
6414
6414
  get allowBackgroundColor() {
6415
6415
  return true;
@@ -11061,8 +11061,8 @@ var LeaferUI = function(exports) {
11061
11061
  const sx = Math.abs(nowWorld.scaleX);
11062
11062
  if (sx > 1) otherScale = 1 / sx;
11063
11063
  }
11064
- other.setWorldShadow(offsetOutBounds$1.offsetX + item.x * scaleX * otherScale, offsetOutBounds$1.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale, ColorConvert.string(item.color));
11065
- transform = getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
11064
+ other.setWorldShadow(offsetOutBounds$1.offsetX + (item.x || 0) * scaleX * otherScale, offsetOutBounds$1.offsetY + (item.y || 0) * scaleY * otherScale, (item.blur || 0) * scaleX * otherScale, ColorConvert.string(item.color));
11065
+ transform = Effect.getShadowTransform(ui, other, shape, item, offsetOutBounds$1, otherScale);
11066
11066
  if (transform) other.setTransform(transform);
11067
11067
  drawWorldShadow(other, offsetOutBounds$1, shape);
11068
11068
  if (transform) other.resetTransform();
@@ -11132,8 +11132,8 @@ var LeaferUI = function(exports) {
11132
11132
  if (sx > 1) otherScale = 1 / sx;
11133
11133
  }
11134
11134
  other.save();
11135
- other.setWorldShadow(offsetOutBounds.offsetX + item.x * scaleX * otherScale, offsetOutBounds.offsetY + item.y * scaleY * otherScale, item.blur * scaleX * otherScale);
11136
- transform = getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
11135
+ other.setWorldShadow(offsetOutBounds.offsetX + (item.x || 0) * scaleX * otherScale, offsetOutBounds.offsetY + (item.y || 0) * scaleY * otherScale, (item.blur || 0) * scaleX * otherScale);
11136
+ transform = Effect.getShadowTransform(ui, other, shape, item, offsetOutBounds, otherScale, true);
11137
11137
  if (transform) other.setTransform(transform);
11138
11138
  drawWorldShadow(other, offsetOutBounds, shape);
11139
11139
  other.restore();
@@ -11707,6 +11707,7 @@ var LeaferUI = function(exports) {
11707
11707
  getDrawData: getDrawData$1
11708
11708
  };
11709
11709
  function string(color, opacity) {
11710
+ if (!color) return "#000";
11710
11711
  const doOpacity = isNumber(opacity) && opacity < 1;
11711
11712
  if (isString(color)) {
11712
11713
  if (doOpacity && ColorConvert.object) color = ColorConvert.object(color); else return color;