@galacean/engine-math 1.0.0-beta.9 → 1.0.1

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.
@@ -4669,10 +4669,11 @@ var Rect = /*#__PURE__*/ function() {
4669
4669
  if (y === void 0) y = 0;
4670
4670
  if (width === void 0) width = 0;
4671
4671
  if (height === void 0) height = 0;
4672
- this.x = x;
4673
- this.y = y;
4674
- this.width = width;
4675
- this.height = height;
4672
+ /** @internal */ this._onValueChanged = null;
4673
+ this._x = x;
4674
+ this._y = y;
4675
+ this._width = width;
4676
+ this._height = height;
4676
4677
  }
4677
4678
  var _proto = Rect.prototype;
4678
4679
  /**
@@ -4683,10 +4684,11 @@ var Rect = /*#__PURE__*/ function() {
4683
4684
  * @param height - The height of the rectangle, measured from the y position
4684
4685
  * @returns This rectangle
4685
4686
  */ _proto.set = function set(x, y, width, height) {
4686
- this.x = x;
4687
- this.y = y;
4688
- this.width = width;
4689
- this.height = height;
4687
+ this._x = x;
4688
+ this._y = y;
4689
+ this._width = width;
4690
+ this._height = height;
4691
+ this._onValueChanged && this._onValueChanged();
4690
4692
  return this;
4691
4693
  };
4692
4694
  /**
@@ -4700,12 +4702,63 @@ var Rect = /*#__PURE__*/ function() {
4700
4702
  * @param source - The specified rect
4701
4703
  * @returns This rect
4702
4704
  */ _proto.copyFrom = function copyFrom(source) {
4703
- this.x = source.x;
4704
- this.y = source.y;
4705
- this.width = source.width;
4706
- this.height = source.height;
4705
+ this._x = source.x;
4706
+ this._y = source.y;
4707
+ this._width = source.width;
4708
+ this._height = source.height;
4709
+ this._onValueChanged && this._onValueChanged();
4707
4710
  return this;
4708
4711
  };
4712
+ _create_class(Rect, [
4713
+ {
4714
+ key: "x",
4715
+ get: /**
4716
+ * The x coordinate of the rectangle.
4717
+ */ function get() {
4718
+ return this._x;
4719
+ },
4720
+ set: function set(value) {
4721
+ this._x = value;
4722
+ this._onValueChanged && this._onValueChanged();
4723
+ }
4724
+ },
4725
+ {
4726
+ key: "y",
4727
+ get: /**
4728
+ * The y coordinate of the rectangle.
4729
+ */ function get() {
4730
+ return this._y;
4731
+ },
4732
+ set: function set(value) {
4733
+ this._y = value;
4734
+ this._onValueChanged && this._onValueChanged();
4735
+ }
4736
+ },
4737
+ {
4738
+ key: "width",
4739
+ get: /**
4740
+ * The width of the rectangle, measured from the x position.
4741
+ */ function get() {
4742
+ return this._width;
4743
+ },
4744
+ set: function set(value) {
4745
+ this._width = value;
4746
+ this._onValueChanged && this._onValueChanged();
4747
+ }
4748
+ },
4749
+ {
4750
+ key: "height",
4751
+ get: /**
4752
+ * The height of the rectangle, measured from the y position.
4753
+ */ function get() {
4754
+ return this._height;
4755
+ },
4756
+ set: function set(value) {
4757
+ this._height = value;
4758
+ this._onValueChanged && this._onValueChanged();
4759
+ }
4760
+ }
4761
+ ]);
4709
4762
  return Rect;
4710
4763
  }();
4711
4764
 
package/dist/module.js CHANGED
@@ -4665,10 +4665,11 @@ var Rect = /*#__PURE__*/ function() {
4665
4665
  if (y === void 0) y = 0;
4666
4666
  if (width === void 0) width = 0;
4667
4667
  if (height === void 0) height = 0;
4668
- this.x = x;
4669
- this.y = y;
4670
- this.width = width;
4671
- this.height = height;
4668
+ /** @internal */ this._onValueChanged = null;
4669
+ this._x = x;
4670
+ this._y = y;
4671
+ this._width = width;
4672
+ this._height = height;
4672
4673
  }
4673
4674
  var _proto = Rect.prototype;
4674
4675
  /**
@@ -4679,10 +4680,11 @@ var Rect = /*#__PURE__*/ function() {
4679
4680
  * @param height - The height of the rectangle, measured from the y position
4680
4681
  * @returns This rectangle
4681
4682
  */ _proto.set = function set(x, y, width, height) {
4682
- this.x = x;
4683
- this.y = y;
4684
- this.width = width;
4685
- this.height = height;
4683
+ this._x = x;
4684
+ this._y = y;
4685
+ this._width = width;
4686
+ this._height = height;
4687
+ this._onValueChanged && this._onValueChanged();
4686
4688
  return this;
4687
4689
  };
4688
4690
  /**
@@ -4696,12 +4698,63 @@ var Rect = /*#__PURE__*/ function() {
4696
4698
  * @param source - The specified rect
4697
4699
  * @returns This rect
4698
4700
  */ _proto.copyFrom = function copyFrom(source) {
4699
- this.x = source.x;
4700
- this.y = source.y;
4701
- this.width = source.width;
4702
- this.height = source.height;
4701
+ this._x = source.x;
4702
+ this._y = source.y;
4703
+ this._width = source.width;
4704
+ this._height = source.height;
4705
+ this._onValueChanged && this._onValueChanged();
4703
4706
  return this;
4704
4707
  };
4708
+ _create_class(Rect, [
4709
+ {
4710
+ key: "x",
4711
+ get: /**
4712
+ * The x coordinate of the rectangle.
4713
+ */ function get() {
4714
+ return this._x;
4715
+ },
4716
+ set: function set(value) {
4717
+ this._x = value;
4718
+ this._onValueChanged && this._onValueChanged();
4719
+ }
4720
+ },
4721
+ {
4722
+ key: "y",
4723
+ get: /**
4724
+ * The y coordinate of the rectangle.
4725
+ */ function get() {
4726
+ return this._y;
4727
+ },
4728
+ set: function set(value) {
4729
+ this._y = value;
4730
+ this._onValueChanged && this._onValueChanged();
4731
+ }
4732
+ },
4733
+ {
4734
+ key: "width",
4735
+ get: /**
4736
+ * The width of the rectangle, measured from the x position.
4737
+ */ function get() {
4738
+ return this._width;
4739
+ },
4740
+ set: function set(value) {
4741
+ this._width = value;
4742
+ this._onValueChanged && this._onValueChanged();
4743
+ }
4744
+ },
4745
+ {
4746
+ key: "height",
4747
+ get: /**
4748
+ * The height of the rectangle, measured from the y position.
4749
+ */ function get() {
4750
+ return this._height;
4751
+ },
4752
+ set: function set(value) {
4753
+ this._height = value;
4754
+ this._onValueChanged && this._onValueChanged();
4755
+ }
4756
+ }
4757
+ ]);
4705
4758
  return Rect;
4706
4759
  }();
4707
4760