@galacean/engine-math 1.5.0-alpha.1 → 1.5.0-beta.0

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/module.js CHANGED
@@ -773,6 +773,25 @@ BoundingSphere._tempVec30 = new Vector3();
773
773
  return this;
774
774
  };
775
775
  /**
776
+ * Serialize this bounding box to a JSON representation.
777
+ * @returns A JSON representation of this bounding box
778
+ */ _proto.toJSON = function toJSON() {
779
+ var min = this.min;
780
+ var max = this.max;
781
+ return {
782
+ min: {
783
+ x: min._x,
784
+ y: min._y,
785
+ z: min._z
786
+ },
787
+ max: {
788
+ x: max._x,
789
+ y: max._y,
790
+ z: max._z
791
+ }
792
+ };
793
+ };
794
+ /**
776
795
  * Calculate a bounding box from the center point and the extent of the bounding box.
777
796
  * @param center - The center point
778
797
  * @param extent - The extent of the bounding box