@galacean/engine-math 1.5.0-alpha.1 → 1.5.0-alpha.2
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 +19 -0
- package/dist/main.js.map +1 -1
- package/dist/module.js +19 -0
- package/dist/module.js.map +1 -1
- package/package.json +1 -1
- package/types/BoundingBox.d.ts +13 -1
- package/types/Vector3.d.ts +1 -2
package/dist/main.js
CHANGED
|
@@ -777,6 +777,25 @@ BoundingSphere._tempVec30 = new Vector3();
|
|
|
777
777
|
return this;
|
|
778
778
|
};
|
|
779
779
|
/**
|
|
780
|
+
* Serialize this bounding box to a JSON representation.
|
|
781
|
+
* @returns A JSON representation of this bounding box
|
|
782
|
+
*/ _proto.toJSON = function toJSON() {
|
|
783
|
+
var min = this.min;
|
|
784
|
+
var max = this.max;
|
|
785
|
+
return {
|
|
786
|
+
min: {
|
|
787
|
+
x: min._x,
|
|
788
|
+
y: min._y,
|
|
789
|
+
z: min._z
|
|
790
|
+
},
|
|
791
|
+
max: {
|
|
792
|
+
x: max._x,
|
|
793
|
+
y: max._y,
|
|
794
|
+
z: max._z
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
/**
|
|
780
799
|
* Calculate a bounding box from the center point and the extent of the bounding box.
|
|
781
800
|
* @param center - The center point
|
|
782
801
|
* @param extent - The extent of the bounding box
|