@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.
- package/dist/main.js +65 -12
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +65 -12
- package/dist/module.js +65 -12
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/types/Gradient.d.ts +103 -0
- package/types/Rand.d.ts +30 -0
- package/types/Rect.d.ts +20 -8
- package/types/enums/GradientMode.d.ts +9 -0
package/dist/main.js
CHANGED
|
@@ -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.
|
|
4673
|
-
this.
|
|
4674
|
-
this.
|
|
4675
|
-
this.
|
|
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.
|
|
4687
|
-
this.
|
|
4688
|
-
this.
|
|
4689
|
-
this.
|
|
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.
|
|
4704
|
-
this.
|
|
4705
|
-
this.
|
|
4706
|
-
this.
|
|
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
|
|