wgge 2.0.21 → 2.0.22

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.
@@ -1,4 +1,5 @@
1
1
  import ModelBase from "../ModelBase";
2
+ import NumberHelper from "../../helper/NumberHelper";
2
3
 
3
4
  export default class Vector3 extends ModelBase {
4
5
 
@@ -105,6 +106,10 @@ export default class Vector3 extends ModelBase {
105
106
  static zero() {
106
107
  return ZERO_VECTOR3;
107
108
  }
109
+
110
+ toString(decimals = 2) {
111
+ return `[${NumberHelper.round(this.x, decimals)},${NumberHelper.round(this.y, decimals)},${NumberHelper.round(this.z, decimals)}]`;
112
+ }
108
113
  }
109
114
 
110
115
  export const ZERO_VECTOR3 = new Vector3(0, 0, 0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wgge",
3
- "version": "2.0.21",
3
+ "version": "2.0.22",
4
4
  "description": "Web GL Game Engine",
5
5
  "main": "index.js",
6
6
  "devDependencies": {