@xort/cga 0.0.82 → 0.0.84

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.
Files changed (68) hide show
  1. package/build/@xort_cga.js +639 -314
  2. package/deploy.sh +13 -1
  3. package/dist/IKanimation/Bone.d.ts +1 -3
  4. package/dist/IKanimation/Bone.js +4 -22
  5. package/dist/alg/common.d.ts +2 -2
  6. package/dist/alg/common.js +4 -4
  7. package/dist/alg/extrude.js +4 -4
  8. package/dist/extends/geometryaid.js +7 -15
  9. package/dist/index.d.ts +1 -2
  10. package/dist/index.js +1 -2
  11. package/dist/math/Color.d.ts +1 -2
  12. package/dist/math/Color.js +14 -31
  13. package/dist/math/Euler.d.ts +4 -5
  14. package/dist/math/Euler.js +16 -34
  15. package/dist/math/HVec3.d.ts +1 -2
  16. package/dist/math/HVec3.js +13 -30
  17. package/dist/math/Quat.d.ts +1 -2
  18. package/dist/math/Quat.js +23 -43
  19. package/dist/math/Vec2.d.ts +4 -4
  20. package/dist/math/Vec2.js +7 -24
  21. package/dist/math/Vec3.d.ts +5 -9
  22. package/dist/math/Vec3.js +35 -52
  23. package/dist/math/Vec4.d.ts +4 -4
  24. package/dist/math/Vec4.js +11 -28
  25. package/dist/math/vecs.d.ts +21 -1
  26. package/dist/math/vecs.js +85 -3
  27. package/dist/render/{buffer-attribute.d.ts → bufferAttribute.d.ts} +8 -4
  28. package/dist/render/{buffer-attribute.js → bufferAttribute.js} +4 -0
  29. package/dist/render/geometry.d.ts +7 -9
  30. package/dist/render/geometry.js +22 -25
  31. package/dist/render/mesh.d.ts +23 -18
  32. package/dist/render/mesh.js +62 -57
  33. package/dist/render/types.d.ts +1 -0
  34. package/dist/struct/3d/Box.d.ts +1 -1
  35. package/dist/struct/3d/Plane.js +1 -1
  36. package/package.json +73 -73
  37. package/rollup.config.js +1 -1
  38. package/src/IKanimation/Bone.ts +1 -5
  39. package/src/alg/common.ts +4 -4
  40. package/src/alg/extrude.ts +6 -6
  41. package/src/app.ts +2 -10
  42. package/src/extends/geometryaid.ts +10 -13
  43. package/src/index.ts +2 -4
  44. package/src/math/Color.ts +6 -8
  45. package/src/math/Euler.ts +11 -12
  46. package/src/math/HVec3.ts +3 -5
  47. package/src/math/Quat.ts +18 -23
  48. package/src/math/Vec2.ts +7 -7
  49. package/src/math/Vec3.ts +37 -36
  50. package/src/math/Vec4.ts +9 -9
  51. package/src/math/vecs.ts +104 -4
  52. package/src/render/{buffer-attribute.ts → bufferAttribute.ts} +11 -4
  53. package/src/render/geometry.ts +18 -15
  54. package/src/render/mesh.ts +56 -54
  55. package/src/render/types.ts +2 -0
  56. package/src/struct/3d/Box.ts +1 -1
  57. package/src/struct/3d/Plane.ts +2 -4
  58. package/dist/math/Vec.d.ts +0 -7
  59. package/dist/math/Vec.js +0 -41
  60. package/dist/math/vector.d.ts +0 -114
  61. package/dist/math/vector.js +0 -371
  62. package/dist/render/eventhandler.d.ts +0 -78
  63. package/dist/render/eventhandler.js +0 -191
  64. package/dist/render/thing.d.ts +0 -34
  65. package/dist/render/thing.js +0 -194
  66. package/src/math/Vec.ts +0 -26
  67. package/src/render/eventhandler.ts +0 -196
  68. package/src/render/thing.ts +0 -204
package/deploy.sh CHANGED
@@ -24,4 +24,16 @@ git push -f git@github.com:yszhao91/cga.js.git master:gh-pages
24
24
 
25
25
  rm -rf *
26
26
  cd -
27
- git checkout master
27
+ git checkout master
28
+
29
+
30
+ # git config --global http.proxy socks5://127.0.0.1:5006
31
+ # git config --global https.proxy socks5://127.0.0.1:5006
32
+
33
+
34
+ # git config --global https.proxy http://127.0.0.1:5006
35
+ # git config --global https.proxy https://127.0.0.1:5006
36
+
37
+
38
+ # git config --global --unset http.proxy
39
+ # git config --global --unset https.proxy
@@ -1,8 +1,6 @@
1
1
  import { Mat4 } from "src/math/Mat4";
2
- import { Thing } from "src/render/thing";
3
2
  import { TypedConstraint } from "./constaint/constraint";
4
- export declare class Bone extends Thing {
5
- children: Bone[];
3
+ export declare class Bone {
6
4
  contraints: TypedConstraint[];
7
5
  matrix: Mat4;
8
6
  constructor();
@@ -1,21 +1,7 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
2
  Object.defineProperty(exports, "__esModule", { value: true });
16
3
  exports.Bone = void 0;
17
4
  var Mat4_1 = require("src/math/Mat4");
18
- var thing_1 = require("src/render/thing");
19
5
  /*
20
6
  * @Description :
21
7
  * @Author : 赵耀圣
@@ -24,15 +10,11 @@ var thing_1 = require("src/render/thing");
24
10
  * @LastEditTime : 2021-03-23 16:19:09
25
11
  * @FilePath : \cga.js\src\IKanimation\Bone.ts
26
12
  */
27
- var Bone = /** @class */ (function (_super) {
28
- __extends(Bone, _super);
13
+ var Bone = /** @class */ (function () {
29
14
  function Bone() {
30
- var _this = _super.call(this) || this;
31
- _this.children = [];
32
- _this.contraints = [];
33
- _this.matrix = Mat4_1.Mat4.Identity;
34
- return _this;
15
+ this.contraints = [];
16
+ this.matrix = Mat4_1.Mat4.Identity;
35
17
  }
36
18
  return Bone;
37
- }(thing_1.Thing));
19
+ }());
38
20
  exports.Bone = Bone;
@@ -23,10 +23,10 @@ export declare function boundingBox(points: Vec3[]): Vec3[];
23
23
  /**
24
24
  *
25
25
  * @param {*} points
26
- * @param {*} Quat
26
+ * @param {*} quat
27
27
  * @param {Boolean} ref 是否是引用
28
28
  */
29
- export declare function applyQuat(points: any | Vec3[], Quat: Quat, ref?: boolean): Vec3 | any;
29
+ export declare function applyQuat(points: any | Vec3[], quat: Quat, ref?: boolean): Vec3 | any;
30
30
  /**
31
31
  * 平移
32
32
  * @param {*} points
@@ -73,18 +73,18 @@ exports.boundingBox = boundingBox;
73
73
  /**
74
74
  *
75
75
  * @param {*} points
76
- * @param {*} Quat
76
+ * @param {*} quat
77
77
  * @param {Boolean} ref 是否是引用
78
78
  */
79
- function applyQuat(points, Quat, ref) {
79
+ function applyQuat(points, quat, ref) {
80
80
  if (ref === void 0) { ref = true; }
81
81
  if (ref) {
82
82
  points.flat(Infinity).forEach(function (point) {
83
- point.applyQuat(Quat);
83
+ point.applyQuat(quat);
84
84
  });
85
85
  return points;
86
86
  }
87
- return applyQuat(clone(points), Quat);
87
+ return applyQuat(clone(points), quat);
88
88
  }
89
89
  exports.applyQuat = applyQuat;
90
90
  /**
@@ -153,7 +153,7 @@ function linkSides(options) {
153
153
  var orgShape = options.orgShape || shapes[0];
154
154
  var orgHoles = options.orgHoles || (holess && holess[0]);
155
155
  if (index)
156
- mesh_1.indexable(allVertics, index);
156
+ mesh_1.MeshTool.indexable(allVertics, index);
157
157
  for (var i = 0; i < length; i++) {
158
158
  if (holess)
159
159
  triangles.push.apply(triangles, linkSide({ side0: shapes[i], side1: shapes[(i + 1) % shapes.length], holes0: holess[i], holes1: holess[(i + 1) % shapes.length], shapeClosed: options.shapeClosed }));
@@ -466,7 +466,7 @@ function extrude_obsolete(shape, arg_path, options) {
466
466
  }
467
467
  var gindex = { index: 0 };
468
468
  var vertices = array_1.flat(shapeArray);
469
- mesh_1.indexable(vertices, gindex);
469
+ mesh_1.MeshTool.indexable(vertices, gindex);
470
470
  var index = linkSides({ shapes: shapeArray, shapeClosed: options.shapeClosed, pathClosed: options.isClosed2, orgShape: shape }).index;
471
471
  shapepath = new Path_1.Path(shape);
472
472
  var uvs = [];
@@ -500,9 +500,9 @@ function extrude_obsolete(shape, arg_path, options) {
500
500
  var sealStartTris = trianglution_1.triangulation(sealUv, [], { normal: normal });
501
501
  sealStartTris.reverse();
502
502
  if (options.sealStart)
503
- mesh_1.indexable(startSeal, gindex);
503
+ mesh_1.MeshTool.indexable(startSeal, gindex);
504
504
  if (options.sealEnd)
505
- mesh_1.indexable(endSeal, gindex);
505
+ mesh_1.MeshTool.indexable(endSeal, gindex);
506
506
  var sealEndTris = [];
507
507
  var hasVLen = vertices.length;
508
508
  if (options.sealStart)
@@ -1,20 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.linksToGeometry = exports.linkToGeometry = exports.extrudeToGeometryBuffer = exports.toGeometryBuffer = void 0;
4
- /*
5
- * @Description :
6
- * @Author : 赵耀圣
7
- * @Q群 : 632839661
8
- * @Date : 2020-12-10 15:01:42
9
- * @LastEditTime : 2021-03-11 10:54:11
10
- * @FilePath : \cga.js\src\extends\geometryaid.ts
11
- */
12
- var mesh_1 = require("../render/mesh");
13
4
  var extrude_1 = require("../alg/extrude");
14
5
  var trianglution_1 = require("../alg/trianglution");
15
6
  var array_1 = require("../utils/array");
7
+ var mesh_1 = require("../render/mesh");
16
8
  function toGeometryBuffer(geo) {
17
- var buffer = mesh_1.toGeoBuffer(geo.position, geo.index, geo.uv);
9
+ var buffer = mesh_1.MeshTool.toGeoBuffer(geo.position, geo.index, geo.uv);
18
10
  return buffer;
19
11
  }
20
12
  exports.toGeometryBuffer = toGeometryBuffer;
@@ -26,7 +18,7 @@ exports.toGeometryBuffer = toGeometryBuffer;
26
18
  */
27
19
  function extrudeToGeometryBuffer(shape, arg_path, options) {
28
20
  var extrudeRes = extrude_1.extrude_obsolete(shape, arg_path, options);
29
- return mesh_1.toGeoBuffer(extrudeRes.vertices, extrudeRes.index, extrudeRes.uvs);
21
+ return mesh_1.MeshTool.toGeoBuffer(extrudeRes.vertices, extrudeRes.index, extrudeRes.uvs);
30
22
  }
31
23
  exports.extrudeToGeometryBuffer = extrudeToGeometryBuffer;
32
24
  /**
@@ -54,7 +46,7 @@ function linksToGeometry(shapes, pathClosed, shapeClosed) {
54
46
  if (pathClosed === void 0) { pathClosed = true; }
55
47
  if (shapeClosed === void 0) { shapeClosed = true; }
56
48
  var vertices = array_1.flat(shapes);
57
- mesh_1.indexable(vertices);
49
+ mesh_1.MeshTool.indexable(vertices);
58
50
  var geo = extrude_1.linkSides({ shapes: shapes, shapeClosed: pathClosed, orgShape: shapes[0] });
59
51
  var geometry = toGeometryBuffer(geo);
60
52
  return geometry;
@@ -63,9 +55,9 @@ exports.linksToGeometry = linksToGeometry;
63
55
  // /**
64
56
  // * 三角剖分后转成几何体
65
57
  // * 只考虑XY平面
66
- // * @param {*} boundary
67
- // * @param {*} hole
68
- // * @param {*} options
58
+ // * @param {*} boundary
59
+ // * @param {*} hole
60
+ // * @param {*} options
69
61
  // */
70
62
  // export function trianglutionToGeometryBuffer(boundary: any, holes: any[] = [], options: any = { normal: Vec3.UnitZ }) {
71
63
  // var triangles = triangulation(boundary, holes, options)
package/dist/index.d.ts CHANGED
@@ -31,8 +31,7 @@ export * from "./struct/3d/Frustum";
31
31
  export * from "./struct/3d/Sphere";
32
32
  export * from "./alg/delaunator";
33
33
  export * from "./alg/voronoi";
34
- export * from "./render/eventhandler";
35
34
  export * from "./extends/geometryaid";
36
- export * from "./render/buffer-attribute";
35
+ export * from "./render/bufferAttribute";
37
36
  export * from "./render/geometry";
38
37
  export * from "./render/mesh";
package/dist/index.js CHANGED
@@ -44,9 +44,8 @@ __exportStar(require("./struct/3d/Frustum"), exports);
44
44
  __exportStar(require("./struct/3d/Sphere"), exports);
45
45
  __exportStar(require("./alg/delaunator"), exports);
46
46
  __exportStar(require("./alg/voronoi"), exports);
47
- __exportStar(require("./render/eventhandler"), exports);
48
47
  __exportStar(require("./extends/geometryaid"), exports);
49
48
  //Geometry
50
- __exportStar(require("./render/buffer-attribute"), exports);
49
+ __exportStar(require("./render/bufferAttribute"), exports);
51
50
  __exportStar(require("./render/geometry"), exports);
52
51
  __exportStar(require("./render/mesh"), exports);
@@ -1,5 +1,4 @@
1
- import { EventHandler } from "../render/eventhandler";
2
- export declare class Color extends EventHandler {
1
+ export declare class Color {
3
2
  _r: number;
4
3
  _g: number;
5
4
  _b: number;
@@ -1,37 +1,20 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
2
  Object.defineProperty(exports, "__esModule", { value: true });
16
3
  exports.Color = void 0;
17
- var eventhandler_1 = require("../render/eventhandler");
18
- var Color = /** @class */ (function (_super) {
19
- __extends(Color, _super);
4
+ var Color = /** @class */ (function () {
20
5
  function Color(r, g, b, a) {
21
6
  if (r === void 0) { r = 0; }
22
7
  if (g === void 0) { g = 0; }
23
8
  if (b === void 0) { b = 0; }
24
9
  if (a === void 0) { a = 1; }
25
- var _this = _super.call(this) || this;
26
- _this._r = 0.0;
27
- _this._g = 0.0;
28
- _this._b = 0.0;
29
- _this._a = 1.0;
30
- _this._r = r;
31
- _this._g = g;
32
- _this._b = b;
33
- _this._a = a;
34
- return _this;
10
+ this._r = 0.0;
11
+ this._g = 0.0;
12
+ this._b = 0.0;
13
+ this._a = 1.0;
14
+ this._r = r;
15
+ this._g = g;
16
+ this._b = b;
17
+ this._a = a;
35
18
  }
36
19
  Object.defineProperty(Color.prototype, "isColor", {
37
20
  get: function () {
@@ -47,7 +30,7 @@ var Color = /** @class */ (function (_super) {
47
30
  set: function (value) {
48
31
  if (this._r !== value) {
49
32
  this._r = value;
50
- this.fire('change', 'r', this._r, value);
33
+ // this.fire('change', 'r', this._r, value)
51
34
  }
52
35
  },
53
36
  enumerable: false,
@@ -60,7 +43,7 @@ var Color = /** @class */ (function (_super) {
60
43
  set: function (value) {
61
44
  if (this._g !== value) {
62
45
  this._g = value;
63
- this.fire('change', 'g', this._g, value);
46
+ // this.fire('change', 'g', this._g, value)
64
47
  }
65
48
  },
66
49
  enumerable: false,
@@ -73,7 +56,7 @@ var Color = /** @class */ (function (_super) {
73
56
  set: function (value) {
74
57
  if (this._b !== value) {
75
58
  this._b = value;
76
- this.fire('change', 'b', this._b, value);
59
+ // this.fire('change', 'b', this._b, value)
77
60
  }
78
61
  },
79
62
  enumerable: false,
@@ -86,7 +69,7 @@ var Color = /** @class */ (function (_super) {
86
69
  set: function (value) {
87
70
  if (this._a !== value) {
88
71
  this._a = value;
89
- this.fire('change', 'a', this._a, value);
72
+ // this.fire('change', 'a', this._a, value)
90
73
  }
91
74
  },
92
75
  enumerable: false,
@@ -214,5 +197,5 @@ var Color = /** @class */ (function (_super) {
214
197
  return this.getHexCssString();
215
198
  };
216
199
  return Color;
217
- }(eventhandler_1.EventHandler));
200
+ }());
218
201
  exports.Color = Color;
@@ -1,7 +1,6 @@
1
1
  import { Mat4 } from "./Mat4";
2
2
  import { Quat } from './Quat';
3
- import { EventHandler } from "../render/eventhandler";
4
- export declare class Euler extends EventHandler {
3
+ export declare class Euler {
5
4
  _x: number;
6
5
  _y: number;
7
6
  _z: number;
@@ -24,14 +23,14 @@ export declare class Euler extends EventHandler {
24
23
  _z: number;
25
24
  _order: string;
26
25
  }): this;
27
- setFromRotationMat(m: Mat4, order: string, update: boolean | undefined): this;
28
- setFromQuat(q: Quat, order?: any, update?: boolean): this;
26
+ setFromRotationMat(m: Mat4, order: string, update: boolean | undefined): this | undefined;
27
+ setFromQuat(q: Quat, order?: any, update?: boolean): this | undefined;
29
28
  setFromVec3(v: {
30
29
  x: any;
31
30
  y: any;
32
31
  z: any;
33
32
  }, order: any): this;
34
- reorder(newOrder: any): this;
33
+ reorder(newOrder: any): this | undefined;
35
34
  equals(Euler: {
36
35
  _x: number;
37
36
  _y: number;
@@ -1,42 +1,25 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
2
  Object.defineProperty(exports, "__esModule", { value: true });
16
3
  exports.euler = exports.Euler = void 0;
17
4
  var Vec3_1 = require("./Vec3");
18
5
  var Math_1 = require("./Math");
19
6
  var Mat4_1 = require("./Mat4");
20
7
  var Quat_1 = require("./Quat");
21
- var eventhandler_1 = require("../render/eventhandler");
22
8
  var _matrix = Mat4_1.m4();
23
9
  var _Quat = Quat_1.quat();
24
10
  var RotationOrders = ["XYZ", "YZX", "ZXY", "XZY", "YXZ", "ZYX"];
25
11
  var DefaultOrder = "XYZ";
26
- var Euler = /** @class */ (function (_super) {
27
- __extends(Euler, _super);
12
+ var Euler = /** @class */ (function () {
28
13
  function Euler(_x, _y, _z, _order) {
29
14
  if (_x === void 0) { _x = 0; }
30
15
  if (_y === void 0) { _y = 0; }
31
16
  if (_z === void 0) { _z = 0; }
32
17
  if (_order === void 0) { _order = DefaultOrder; }
33
- var _this = _super.call(this) || this;
34
- _this._x = _x;
35
- _this._y = _y;
36
- _this._z = _z;
37
- _this._order = _order;
38
- _this.isEuler = true;
39
- return _this;
18
+ this._x = _x;
19
+ this._y = _y;
20
+ this._z = _z;
21
+ this._order = _order;
22
+ this.isEuler = true;
40
23
  }
41
24
  Object.defineProperty(Euler.prototype, "x", {
42
25
  get: function () {
@@ -45,7 +28,7 @@ var Euler = /** @class */ (function (_super) {
45
28
  set: function (value) {
46
29
  if (this._x !== value) {
47
30
  this._x = value;
48
- this.fire('change', 'x', this._x, value);
31
+ // this.fire('change', 'x', this._x, value)
49
32
  }
50
33
  },
51
34
  enumerable: false,
@@ -58,7 +41,7 @@ var Euler = /** @class */ (function (_super) {
58
41
  set: function (value) {
59
42
  if (this._y !== value) {
60
43
  this._y = value;
61
- this.fire('change', 'y', this._y, value);
44
+ // this.fire('change', 'y', this._y, value)
62
45
  }
63
46
  },
64
47
  enumerable: false,
@@ -71,7 +54,7 @@ var Euler = /** @class */ (function (_super) {
71
54
  set: function (value) {
72
55
  if (this._z !== value) {
73
56
  this._z = value;
74
- this.fire('change', 'z', this._z, value);
57
+ // this.fire('change', 'z', this._z, value)
75
58
  }
76
59
  },
77
60
  enumerable: false,
@@ -83,7 +66,7 @@ var Euler = /** @class */ (function (_super) {
83
66
  },
84
67
  set: function (value) {
85
68
  if (this._order !== value) {
86
- this.fire('change', 'order', this._order, value);
69
+ // this.fire('change', 'order', this._order, value)
87
70
  this._order = value;
88
71
  }
89
72
  },
@@ -95,7 +78,7 @@ var Euler = /** @class */ (function (_super) {
95
78
  this._y = y;
96
79
  this._z = z;
97
80
  this._order = order || this._order;
98
- this.fire('change');
81
+ // this.fire('change')
99
82
  return this;
100
83
  };
101
84
  Euler.prototype.clone = function () {
@@ -106,7 +89,7 @@ var Euler = /** @class */ (function (_super) {
106
89
  this._y = Euler._y;
107
90
  this._z = Euler._z;
108
91
  this._order = Euler._order;
109
- this.fire('change');
92
+ // this.fire('change')
110
93
  return this;
111
94
  };
112
95
  Euler.prototype.setFromRotationMat = function (m, order, update) {
@@ -186,9 +169,8 @@ var Euler = /** @class */ (function (_super) {
186
169
  console.warn("Euler: .setFromRotationMat() given unsupported order: " + order);
187
170
  }
188
171
  this._order = order;
189
- if (update !== false)
190
- this.fire('change');
191
- return this;
172
+ if (update !== false) // this.fire('change')
173
+ return this;
192
174
  };
193
175
  Euler.prototype.setFromQuat = function (q, order, update) {
194
176
  _matrix.makeRotationFromQuat(q);
@@ -214,7 +196,7 @@ var Euler = /** @class */ (function (_super) {
214
196
  this._z = array[2];
215
197
  if (array[3] !== undefined)
216
198
  this._order = array[3];
217
- this.fire('change');
199
+ // this.fire('change')
218
200
  return this;
219
201
  };
220
202
  Euler.prototype.toArray = function (array, offset) {
@@ -235,7 +217,7 @@ var Euler = /** @class */ (function (_super) {
235
217
  }
236
218
  };
237
219
  return Euler;
238
- }(eventhandler_1.EventHandler));
220
+ }());
239
221
  exports.Euler = Euler;
240
222
  function euler(x, y, z) {
241
223
  return new Euler(x, y, z);
@@ -1,4 +1,3 @@
1
- import { EventHandler } from '../render/eventhandler';
2
1
  import Decimal from 'decimal.js';
3
2
  export interface IHVec2 {
4
3
  x: Decimal;
@@ -10,7 +9,7 @@ export interface IHVec3 extends IHVec2 {
10
9
  export interface IHVec4 extends IHVec3 {
11
10
  w: Decimal;
12
11
  }
13
- export declare class HVec3 extends EventHandler implements IHVec3 {
12
+ export declare class HVec3 implements IHVec3 {
14
13
  private _x;
15
14
  private _y;
16
15
  private _z;
@@ -1,22 +1,4 @@
1
1
  "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- extendStatics(d, b);
11
- function __() { this.constructor = d; }
12
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13
- };
14
- })();
15
- var __importDefault = (this && this.__importDefault) || function (mod) {
16
- return (mod && mod.__esModule) ? mod : { "default": mod };
17
- };
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.HVec3 = void 0;
20
2
  /*
21
3
  * @Description : arbitrary-precision 任意精度的向量
22
4
  * @Author : 赵耀圣
@@ -25,22 +7,23 @@ exports.HVec3 = void 0;
25
7
  * @LastEditTime : 2021-08-03 11:32:10
26
8
  * @FilePath : \cga.js\src\math\HVec3.ts
27
9
  */
28
- var eventhandler_1 = require("../render/eventhandler");
10
+ var __importDefault = (this && this.__importDefault) || function (mod) {
11
+ return (mod && mod.__esModule) ? mod : { "default": mod };
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.HVec3 = void 0;
29
15
  var decimal_js_1 = __importDefault(require("decimal.js"));
30
- var HVec3 = /** @class */ (function (_super) {
31
- __extends(HVec3, _super);
16
+ var HVec3 = /** @class */ (function () {
32
17
  function HVec3(_x, _y, _z) {
33
18
  if (_x === void 0) { _x = 0; }
34
19
  if (_y === void 0) { _y = 0; }
35
20
  if (_z === void 0) { _z = 0; }
36
- var _this = _super.call(this) || this;
37
- _this._x = _x;
38
- _this._y = _y;
39
- _this._z = _z;
40
- _this.x = new decimal_js_1.default(_x);
41
- _this.y = new decimal_js_1.default(_x);
42
- _this.z = new decimal_js_1.default(_x);
43
- return _this;
21
+ this._x = _x;
22
+ this._y = _y;
23
+ this._z = _z;
24
+ this.x = new decimal_js_1.default(_x);
25
+ this.y = new decimal_js_1.default(_x);
26
+ this.z = new decimal_js_1.default(_x);
44
27
  }
45
28
  HVec3.isVec3 = function (v) {
46
29
  return !isNaN(v.x) && !isNaN(v.y) && !isNaN(v.z) && isNaN(v.w);
@@ -189,5 +172,5 @@ var HVec3 = /** @class */ (function (_super) {
189
172
  return this.multiplyScalar(new decimal_js_1.default(1).mul(new decimal_js_1.default(scalar)));
190
173
  };
191
174
  return HVec3;
192
- }(eventhandler_1.EventHandler));
175
+ }());
193
176
  exports.HVec3 = HVec3;
@@ -1,6 +1,5 @@
1
1
  import { Euler } from './Euler';
2
- import { EventHandler } from '../render/eventhandler';
3
- export declare class Quat extends EventHandler {
2
+ export declare class Quat {
4
3
  _x: number;
5
4
  _y: number;
6
5
  _z: number;