@xort/cga 0.0.86 → 0.0.87

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 (77) hide show
  1. package/build/cga.d.ts +2032 -0
  2. package/dist/IKanimation/CCDSolver.js +2 -2
  3. package/dist/IKanimation/constaint/hinge.js +3 -1
  4. package/dist/IKanimation/constaint/slider.js +3 -1
  5. package/dist/alg/common.js +2 -2
  6. package/dist/alg/delaunay.js +1 -1
  7. package/dist/alg/extrude.js +52 -50
  8. package/dist/alg/pointset.js +5 -5
  9. package/dist/alg/trianglution.js +12 -10
  10. package/dist/alg/voronoi.js +1 -1
  11. package/dist/app.js +14 -10
  12. package/dist/diamondMaterialShader.js +6 -2
  13. package/dist/effect/breath-light.js +3 -1
  14. package/dist/extends/geometryaid.js +4 -4
  15. package/dist/index.d.ts +1 -0
  16. package/dist/index.js +7 -2
  17. package/dist/math/Color.d.ts +4 -0
  18. package/dist/math/Color.js +30 -6
  19. package/dist/math/Euler.js +9 -9
  20. package/dist/math/Mat3.js +1 -1
  21. package/dist/math/Mat4.js +6 -6
  22. package/dist/math/Quat.js +1 -1
  23. package/dist/math/Vec3.js +4 -4
  24. package/dist/math/vecs.js +9 -7
  25. package/dist/render/bufferAttribute.js +12 -28
  26. package/dist/render/geometry.js +2 -2
  27. package/dist/render/mesh.js +11 -9
  28. package/dist/render/types.d.ts +2 -2
  29. package/dist/render/types.js +2 -1
  30. package/dist/struct/3d/Box.js +3 -3
  31. package/dist/struct/3d/Capsule.js +3 -1
  32. package/dist/struct/3d/Circle.js +2 -2
  33. package/dist/struct/3d/Disk.js +1 -1
  34. package/dist/struct/3d/Line.js +4 -4
  35. package/dist/struct/3d/Path.js +13 -11
  36. package/dist/struct/3d/Plane.d.ts +3 -3
  37. package/dist/struct/3d/Plane.js +23 -18
  38. package/dist/struct/3d/Point.js +3 -1
  39. package/dist/struct/3d/Polygon.js +3 -1
  40. package/dist/struct/3d/Polyline.d.ts +9 -0
  41. package/dist/struct/3d/Polyline.js +25 -2
  42. package/dist/struct/3d/Rectangle.js +3 -1
  43. package/dist/struct/3d/Segment.js +9 -7
  44. package/dist/struct/3d/Shape.js +3 -1
  45. package/dist/struct/3d/Sphere.js +1 -1
  46. package/dist/struct/3d/Triangle.js +3 -1
  47. package/dist/struct/bsp.d.ts +0 -0
  48. package/dist/struct/bsp.js +1 -0
  49. package/dist/struct/btree.d.ts +0 -0
  50. package/dist/struct/btree.js +1 -0
  51. package/dist/struct/data/ArrayList.js +11 -9
  52. package/dist/struct/data/ArrayObject.js +3 -1
  53. package/dist/struct/kdtree.d.ts +0 -0
  54. package/dist/struct/kdtree.js +1 -0
  55. package/dist/struct/polyTree.d.ts +4 -0
  56. package/dist/struct/polyTree.js +27 -0
  57. package/dist/struct/quatTree.d.ts +0 -0
  58. package/dist/struct/quatTree.js +1 -0
  59. package/dist/struct/tree.d.ts +11 -0
  60. package/dist/struct/tree.js +26 -0
  61. package/dist/utils/types.d.ts +2 -2
  62. package/package.json +4 -3
  63. package/rollup.config.js +22 -14
  64. package/src/index.ts +1 -0
  65. package/src/math/Color.ts +6 -0
  66. package/src/struct/3d/Plane.ts +15 -11
  67. package/src/struct/3d/PolyLine.ts +18 -1
  68. package/src/struct/3d/Polygon.ts +2 -0
  69. package/src/struct/bsp.ts +0 -0
  70. package/src/struct/btree.ts +0 -0
  71. package/src/struct/kdtree.ts +0 -0
  72. package/src/struct/polyTree.ts +8 -0
  73. package/src/struct/quatTree.ts +0 -0
  74. package/src/struct/tree.ts +30 -0
  75. package/tsconfig.json +2 -0
  76. package/dist/shape/arc.d.ts +0 -2
  77. package/dist/shape/arc.js +0 -14
@@ -0,0 +1,8 @@
1
+ import { Tree } from "./tree";
2
+
3
+ export class PolyTree extends Tree{
4
+ constructor() {
5
+ super();
6
+ }
7
+
8
+ }
File without changes
@@ -0,0 +1,30 @@
1
+ export class Tree {
2
+ N: number = 2;//数量决定是N叉树;
3
+ children!: this[];
4
+ findFn!: Function;
5
+ objects: any[] = [];
6
+
7
+ constructor(N: number = -1) {
8
+ this.N = N;
9
+ if (N !== -1)
10
+ this.children = new Array(N)
11
+ }
12
+
13
+ setObject(obj: any, generateFn: Function, findFn: Function) {
14
+ generateFn(this, obj);
15
+ this.findFn = findFn;
16
+ }
17
+
18
+ add(obj: any) {
19
+
20
+ }
21
+
22
+ remove(obj: any) {
23
+
24
+ }
25
+
26
+ find(condition: any) {
27
+
28
+ this.findFn(this, condition);
29
+ }
30
+ }
package/tsconfig.json CHANGED
@@ -15,6 +15,8 @@
15
15
  // "checkJs": true, /* Report errors in .js files. */
16
16
  // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
17
17
  "declaration": true, /* Generates corresponding '.d.ts' file. */
18
+ // "declarationDir": "dist/types",
19
+ // "emitDeclarationOnly": true,
18
20
  // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
19
21
  // "sourceMap": true, /* Generates corresponding '.map' file. */
20
22
  // "outFile": "./", /* Concatenate and emit output to single file. */
@@ -1,2 +0,0 @@
1
- import { Vec3 } from "../math/Vec3";
2
- export declare function Circle(center: Vec3, radius: number, segment: number, startAngle: number, lenAngle: number): void;
package/dist/shape/arc.js DELETED
@@ -1,14 +0,0 @@
1
- "use strict";
2
- /*
3
- * @Description :
4
- * @Author : 赵耀圣
5
- * @QQ : 549184003
6
- * @Date : 2021-03-15 09:40:01
7
- * @LastEditTime : 2021-03-15 09:42:14
8
- * @FilePath : \cga.js\src\shape\arc.ts
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.Circle = void 0;
12
- function Circle(center, radius, segment, startAngle, lenAngle) {
13
- }
14
- exports.Circle = Circle;