ss-component-new 1.2.23 → 1.2.25

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 (143) hide show
  1. package/dist/MTLLoader-AqmsmIp6.cjs +6 -0
  2. package/dist/MTLLoader-DJNdEDx2.js +609 -0
  3. package/dist/OrbitControls-Bj5caXhQ.js +419 -0
  4. package/dist/OrbitControls-rTIa-2s-.cjs +1 -0
  5. package/dist/{animationData-Bwh55Xw6.cjs → animationData-Bc9LlHz0.cjs} +1 -1
  6. package/dist/{animationData-D0TJ-9dd.js → animationData-Ca4l4roD.js} +4 -4
  7. package/dist/array-Baxi4C30.cjs +11 -0
  8. package/dist/array-Ca6KqnNx.js +1142 -0
  9. package/dist/{dataUtil-i5X2xhin.cjs → dataUtil-Cg2dZbrV.cjs} +1 -1
  10. package/dist/{dataUtil-gEKo7CEq.js → dataUtil-DUI9Vz64.js} +2 -2
  11. package/dist/{fileUtil-GIRXMs25.cjs → fileUtil-CTTbs0aJ.cjs} +1 -1
  12. package/dist/{fileUtil-CN00xr9W.js → fileUtil-CWt--rV-.js} +1 -1
  13. package/dist/{iconfont-C9-pGpAJ.cjs → iconfont-BaUxcJrk.cjs} +1 -1
  14. package/dist/{iconfont-DTSZW2AU.js → iconfont-D886hAXy.js} +2 -2
  15. package/dist/icons/svg//345/215/225/345/205/203/345/272/223.svg +1 -0
  16. package/dist/icons/svg//346/250/241/345/236/213/347/256/241/347/220/206.svg +1 -0
  17. package/dist/icons/svg//346/265/201/347/250/213/345/272/223.svg +1 -0
  18. package/dist/icons/svg//347/225/214/351/235/242/344/277/256/346/224/271.svg +1 -0
  19. package/dist/{index-BOJUyAaV.cjs → index-1z9RrjZc.cjs} +1 -1
  20. package/dist/{index-DSlPg3dk.cjs → index-9wWF5fgR.cjs} +1 -1
  21. package/dist/index-B-I7BsZI.js +2570 -0
  22. package/dist/{index-CqYUVCh5.js → index-B-p8m73c.js} +12 -12
  23. package/dist/{index-CK54pscx.cjs → index-B1qlTlfX.cjs} +1 -1
  24. package/dist/{index-BD5yZDAq.js → index-B5iT5NR0.js} +2 -2
  25. package/dist/{index-BkIFY0hK.cjs → index-B8MyAHnT.cjs} +1 -1
  26. package/dist/{index-7oJ8Ile4.js → index-BLW6fsom.js} +1 -1
  27. package/dist/{index-DbCNaQ87.cjs → index-BMK703KG.cjs} +1 -1
  28. package/dist/{index-eH9RMVXv.cjs → index-BNYCmfv9.cjs} +1 -1
  29. package/dist/{index-ThNNBX7h.js → index-BQkk6yoU.js} +1 -1
  30. package/dist/index-BQq7Cw_K.cjs +1 -0
  31. package/dist/{index-pmcRbjPd.cjs → index-BZENxsjL.cjs} +1 -1
  32. package/dist/{index-BNYeBPmi.cjs → index-BZoOaP9C.cjs} +1 -1
  33. package/dist/{index-G_cKl_J4.js → index-B_jnPuBE.js} +275 -270
  34. package/dist/{index-XXKsLOYd.js → index-Bke5IOmW.js} +2 -2
  35. package/dist/{index-DrWIUUZK.cjs → index-BtfS9ULE.cjs} +1 -1
  36. package/dist/{index-CvC2498b.js → index-BuLPXgWU.js} +5 -5
  37. package/dist/index-BxXOWAHT.cjs +1 -0
  38. package/dist/{index-2fqHNrPg.js → index-C8OFJprL.js} +4 -4
  39. package/dist/{index-CtXpoEg0.cjs → index-C9OPT3q5.cjs} +1 -1
  40. package/dist/{index-D8Y3imz9.cjs → index-CEV2ULrI.cjs} +1 -1
  41. package/dist/{index-BTTpV9o2.js → index-CTRrKUtw.js} +14 -14
  42. package/dist/{index-CptCatmL.js → index-CYmHP5Ky.js} +48 -32
  43. package/dist/{index-Dfwm0xPp.cjs → index-Cb0d2cT8.cjs} +1 -1
  44. package/dist/{index-Cl6HMOao.js → index-CeeMzEXY.js} +1 -1
  45. package/dist/{index-tttYIzsn.cjs → index-CjI5pDiU.cjs} +1 -1
  46. package/dist/{index-DEs8s152.js → index-CmUjrEkz.js} +6 -6
  47. package/dist/index-CtE7IIJq.js +7297 -0
  48. package/dist/{index-DSchKIyh.cjs → index-CxnH4vfV.cjs} +1 -1
  49. package/dist/index-CyY9deE5.cjs +1 -0
  50. package/dist/{index-DlIkbsRf.js → index-Cyk3pWtk.js} +6 -6
  51. package/dist/index-D-eD7QhS.js +654 -0
  52. package/dist/{index-NlkdTb--.js → index-D0odjY-X.js} +4 -4
  53. package/dist/{index-B0dydZDW.js → index-D1cjMjid.js} +1 -1
  54. package/dist/index-D5gT6DCZ.cjs +1 -0
  55. package/dist/{index-CvrBt7bU.js → index-D7GiDyDn.js} +6 -6
  56. package/dist/index-D88kGgy-.cjs +1 -0
  57. package/dist/{index-DMbCaqEC.cjs → index-DEExEFRs.cjs} +13 -13
  58. package/dist/{index-DllJulGH.cjs → index-DFMKBytS.cjs} +1 -1
  59. package/dist/{index-Dm_WlV6R.js → index-DNe_JGg0.js} +1 -1
  60. package/dist/{index-Bvk4OpkL.js → index-DTCPY-4V.js} +2 -2
  61. package/dist/{index-BTfg83yY.cjs → index-DTuCopl-.cjs} +1 -1
  62. package/dist/{index-BwEfrokO.js → index-DVSVJAdn.js} +2 -2
  63. package/dist/{index-7Ru3e632.cjs → index-DYr8VySV.cjs} +1 -1
  64. package/dist/{index-BQBxzTyE.js → index-DkA_gjlb.js} +2 -2
  65. package/dist/{index-7gU0r1We.cjs → index-Dkoh6zZr.cjs} +1 -1
  66. package/dist/{index-DNs9XPOG.js → index-DpE6q48b.js} +2 -2
  67. package/dist/{index-BVFL7Z_0.js → index-DqAAn-WP.js} +5 -5
  68. package/dist/{index-DHp714Ep.cjs → index-DrgssxCP.cjs} +1 -1
  69. package/dist/{index-Bt2MaT2G.js → index-J98IKvqx.js} +6 -6
  70. package/dist/{index-C6C5VWbs.cjs → index-PNi4RMPc.cjs} +1 -1
  71. package/dist/index-XXEzSATd.js +158 -0
  72. package/dist/{index-CADH_aSQ.cjs → index-clFmHtGU.cjs} +1 -1
  73. package/dist/{index-Be1LJMUR.js → index-pFuDv6dx.js} +2 -2
  74. package/dist/{index-BuSsSHAY.js → index-sk7jYyaG.js} +2301 -2282
  75. package/dist/{index-DQ3y1xkr.cjs → index-vmURlfDn.cjs} +1 -1
  76. package/dist/{index-BXEOQo2c.cjs → index-yyc7_nsV.cjs} +1 -1
  77. package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BCjeeJqj.cjs +5675 -0
  78. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aFJhRTyx.js} +41519 -48931
  79. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-De0avjy5.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Dv39W1q4.js} +6 -6
  80. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DhMDLOg8.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-OXHjy9ED.cjs} +1 -1
  81. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-C4gG2WxT.cjs +56 -0
  82. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CEcxaThh.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CEIVtyL9.js} +10702 -10654
  83. package/dist/index.vue_vue_type_style_index_1_lang-D0ileuYo.cjs +32 -0
  84. package/dist/index.vue_vue_type_style_index_1_lang-DOP0uVOd.cjs +5 -0
  85. package/dist/index.vue_vue_type_style_index_1_lang-DSKzPKLD.js +8262 -0
  86. package/dist/{index.vue_vue_type_style_index_1_lang-DzZEPkuk.js → index.vue_vue_type_style_index_1_lang-DkkdpQbZ.js} +1368 -1456
  87. package/dist/{isString-CELwppr9.cjs → isString-BmAegMGI.cjs} +1 -1
  88. package/dist/{isString-DvY0kl3S.js → isString-CohCsKzS.js} +1 -1
  89. package/dist/{main-DQXqHTYg.js → main-B4gwcsBp.js} +5 -5
  90. package/dist/{main-yiUkyrA7.cjs → main-HIDJ5ncj.cjs} +1 -1
  91. package/dist/ss-component.cjs +1 -1
  92. package/dist/ss-component.css +2 -2
  93. package/dist/ss-component.js +11 -11
  94. package/dist/ss-component2.cjs +1 -1
  95. package/dist/ss-component2.js +12 -12
  96. package/dist/{threeModel-BiWZCOOI.js → threeModel-LJMbJaUb.js} +5 -5
  97. package/dist/{threeModel-Cva5i9Dy.cjs → threeModel-tRhkTPHD.cjs} +1 -1
  98. package/dist/threePreview-CeCm5KTT.cjs +1 -0
  99. package/dist/{threePreview-CjFKHY3_.js → threePreview-CqWnM1XW.js} +442 -541
  100. package/dist/{threeSceneView-DM8uof_D.cjs → threeSceneView-CTChIfwR.cjs} +1 -1
  101. package/dist/{threeSceneView-DPTQ_xR-.js → threeSceneView-D2mX_5N9.js} +11 -11
  102. package/dist/{threeSceneViewForCPMPIP-D5jl1r-h.cjs → threeSceneViewForCPMPIP-C_MBwi1O.cjs} +1 -1
  103. package/dist/{threeSceneViewForCPMPIP-Bqb44i-c.js → threeSceneViewForCPMPIP-CpVcogbP.js} +10 -10
  104. package/dist/{threeTrackPathView-BvxoafSz.js → threeTrackPathView-DMTpRQTP.js} +172 -354
  105. package/dist/threeTrackPathView-Deim_dX7.cjs +371 -0
  106. package/dist/threeViewerHost-BMrWNnGK.cjs +1 -0
  107. package/dist/{threeViewerHost-CKmZPGir.js → threeViewerHost-WXqI_L3g.js} +91 -78
  108. package/dist/{urdfTree-BxuavyNQ.js → urdfTree-BX92weHU.js} +1 -1
  109. package/dist/{urdfTree-wR2vnG4s.cjs → urdfTree-CbDb_7PZ.cjs} +1 -1
  110. package/dist/{workpieceTreePanel-C2BXrv3k.cjs → workpieceTreePanel-CbTolK6t.cjs} +1 -1
  111. package/dist/{workpieceTreePanel-CSKzSdIt.js → workpieceTreePanel-Q4S9btz3.js} +18 -18
  112. package/package.json +1 -1
  113. package/public/icons/svg//345/215/225/345/205/203/345/272/223.svg +1 -0
  114. package/public/icons/svg//346/250/241/345/236/213/347/256/241/347/220/206.svg +1 -0
  115. package/public/icons/svg//346/265/201/347/250/213/345/272/223.svg +1 -0
  116. package/public/icons/svg//347/225/214/351/235/242/344/277/256/346/224/271.svg +1 -0
  117. package/dist/MTLLoader-B8MnfNfT.cjs +0 -6
  118. package/dist/MTLLoader-BD3cbBAW.js +0 -657
  119. package/dist/OrbitControls-2UHRU9Fu.cjs +0 -1
  120. package/dist/OrbitControls-D1pz0uFI.js +0 -458
  121. package/dist/array-DMPAgNcb.cjs +0 -11
  122. package/dist/array-DTXrs6ZK.js +0 -1207
  123. package/dist/index-BLwwxnzs.cjs +0 -1
  124. package/dist/index-BVdolwlx.js +0 -7293
  125. package/dist/index-Bm3FE_ss.js +0 -504
  126. package/dist/index-BpTrDbkf.js +0 -22
  127. package/dist/index-C54wX50t.cjs +0 -1
  128. package/dist/index-CFriKZ-T.cjs +0 -1
  129. package/dist/index-CsOz5vsv.cjs +0 -1
  130. package/dist/index-D4pN9YmB.js +0 -144
  131. package/dist/index-DOhvzke2.js +0 -24
  132. package/dist/index-DPX3w6cO.js +0 -2643
  133. package/dist/index-DR9beXhk.cjs +0 -1
  134. package/dist/index-Do8zI4DM.cjs +0 -1
  135. package/dist/index-dwX_BHyo.cjs +0 -1
  136. package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs +0 -5677
  137. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DLuOs1IZ.cjs +0 -56
  138. package/dist/index.vue_vue_type_style_index_1_lang-B0l6QIWy.js +0 -7806
  139. package/dist/index.vue_vue_type_style_index_1_lang-CC1o5rIu.cjs +0 -32
  140. package/dist/index.vue_vue_type_style_index_1_lang-Chzrrthw.cjs +0 -6
  141. package/dist/threePreview-BNvDY6xx.cjs +0 -1
  142. package/dist/threeTrackPathView-DgnuPrBe.cjs +0 -370
  143. package/dist/threeViewerHost-D80V4Cfh.cjs +0 -1
@@ -1,131 +1,86 @@
1
- import { defineComponent as We, ref as B, shallowRef as he, computed as $, watch as Ve, onMounted as He, onBeforeUnmount as Ne, resolveComponent as $e, createElementBlock as te, openBlock as X, createElementVNode as d, withDirectives as k, createCommentVNode as ne, createVNode as p, unref as b, renderSlot as ve, toDisplayString as ie, withCtx as ge, createBlock as Xe, isRef as Y, vModelRadio as q, vShow as se } from "vue";
2
- import { u as Ye, a as qe, b as Je, f as Ze, d as Ke } from "./iconfont-DTSZW2AU.js";
3
- import { aE as Qe, aF as le, aG as de, av as R, aH as et, B as ce, aD as Ce, V as P, aI as tt, aJ as Q, aK as _e, Y as Ue, aL as ee, k as nt, aM as V, aN as it, r as st, s as Ee, t as ot, w as at, ag as rt, ao as lt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js";
4
- import { r as dt } from "./fileUtil-CN00xr9W.js";
5
- import { E as ct } from "./index-Dm_WlV6R.js";
6
- import { U as ut, J as ft } from "./urdfTree-BxuavyNQ.js";
1
+ import { defineComponent as Fe, ref as B, shallowRef as me, computed as N, watch as We, onMounted as He, onBeforeUnmount as Ve, resolveComponent as Ne, createElementBlock as te, openBlock as $, createElementVNode as d, withDirectives as k, createCommentVNode as ne, createVNode as p, unref as b, renderSlot as he, toDisplayString as ie, withCtx as ve, createBlock as $e, isRef as X, vModelRadio as Y, vShow as se } from "vue";
2
+ import { u as Xe, a as Ye, b as qe, f as Je, d as Ze } from "./iconfont-D886hAXy.js";
3
+ import { aE as Ke, aF as re, aG as le, av as G, aH as Qe, B as de, aD as ze, V as P, aI as et, aJ as K, aK as Ce, Y as _e, aL as Q, k as tt, aM as ee, aN as nt, r as it, s as Ee, t as st, w as ot, ag as at, ao as rt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aFJhRTyx.js";
4
+ import { r as lt } from "./fileUtil-CWt--rV-.js";
5
+ import { E as dt } from "./index-DNe_JGg0.js";
6
+ import { U as ct, J as ut } from "./urdfTree-BX92weHU.js";
7
7
  import { T as v } from "./svgIcon-D-_fXUBL.js";
8
- import { i as pt } from "./isString-DvY0kl3S.js";
9
- import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
- const ye = new ce(), J = new P();
11
- class Ae extends Qe {
12
- /**
13
- * Constructs a new line segments geometry.
14
- */
8
+ import { i as ft } from "./isString-CohCsKzS.js";
9
+ import { _ as pt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ const ge = new de(), q = new P();
11
+ class Ue extends Ke {
15
12
  constructor() {
16
13
  super(), this.isLineSegmentsGeometry = !0, this.type = "LineSegmentsGeometry";
17
14
  const e = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], n = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], i = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
18
- this.setIndex(i), this.setAttribute("position", new le(e, 3)), this.setAttribute("uv", new le(n, 2));
15
+ this.setIndex(i), this.setAttribute("position", new re(e, 3)), this.setAttribute("uv", new re(n, 2));
19
16
  }
20
- /**
21
- * Applies the given 4x4 transformation matrix to the geometry.
22
- *
23
- * @param {Matrix4} matrix - The matrix to apply.
24
- * @return {LineSegmentsGeometry} A reference to this instance.
25
- */
26
17
  applyMatrix4(e) {
27
18
  const n = this.attributes.instanceStart, i = this.attributes.instanceEnd;
28
19
  return n !== void 0 && (n.applyMatrix4(e), i.applyMatrix4(e), n.needsUpdate = !0), this.boundingBox !== null && this.computeBoundingBox(), this.boundingSphere !== null && this.computeBoundingSphere(), this;
29
20
  }
30
- /**
31
- * Sets the given line positions for this geometry. The length must be a multiple of six since
32
- * each line segment is defined by a start end vertex in the pattern `(xyz xyz)`.
33
- *
34
- * @param {Float32Array|Array<number>} array - The position data to set.
35
- * @return {LineSegmentsGeometry} A reference to this geometry.
36
- */
37
21
  setPositions(e) {
38
22
  let n;
39
23
  e instanceof Float32Array ? n = e : Array.isArray(e) && (n = new Float32Array(e));
40
- const i = new de(n, 6, 1);
41
- return this.setAttribute("instanceStart", new R(i, 3, 0)), this.setAttribute("instanceEnd", new R(i, 3, 3)), this.instanceCount = this.attributes.instanceStart.count, this.computeBoundingBox(), this.computeBoundingSphere(), this;
24
+ const i = new le(n, 6, 1);
25
+ return this.setAttribute("instanceStart", new G(i, 3, 0)), this.setAttribute("instanceEnd", new G(i, 3, 3)), this.computeBoundingBox(), this.computeBoundingSphere(), this;
42
26
  }
43
- /**
44
- * Sets the given line colors for this geometry. The length must be a multiple of six since
45
- * each line segment is defined by a start end color in the pattern `(rgb rgb)`.
46
- *
47
- * @param {Float32Array|Array<number>} array - The position data to set.
48
- * @return {LineSegmentsGeometry} A reference to this geometry.
49
- */
50
27
  setColors(e) {
51
28
  let n;
52
29
  e instanceof Float32Array ? n = e : Array.isArray(e) && (n = new Float32Array(e));
53
- const i = new de(n, 6, 1);
54
- return this.setAttribute("instanceColorStart", new R(i, 3, 0)), this.setAttribute("instanceColorEnd", new R(i, 3, 3)), this;
30
+ const i = new le(n, 6, 1);
31
+ return this.setAttribute("instanceColorStart", new G(i, 3, 0)), this.setAttribute("instanceColorEnd", new G(i, 3, 3)), this;
55
32
  }
56
- /**
57
- * Setups this line segments geometry from the given wireframe geometry.
58
- *
59
- * @param {WireframeGeometry} geometry - The geometry that should be used as a data source for this geometry.
60
- * @return {LineSegmentsGeometry} A reference to this geometry.
61
- */
62
33
  fromWireframeGeometry(e) {
63
34
  return this.setPositions(e.attributes.position.array), this;
64
35
  }
65
- /**
66
- * Setups this line segments geometry from the given edges geometry.
67
- *
68
- * @param {EdgesGeometry} geometry - The geometry that should be used as a data source for this geometry.
69
- * @return {LineSegmentsGeometry} A reference to this geometry.
70
- */
71
36
  fromEdgesGeometry(e) {
72
37
  return this.setPositions(e.attributes.position.array), this;
73
38
  }
74
- /**
75
- * Setups this line segments geometry from the given mesh.
76
- *
77
- * @param {Mesh} mesh - The mesh geometry that should be used as a data source for this geometry.
78
- * @return {LineSegmentsGeometry} A reference to this geometry.
79
- */
80
39
  fromMesh(e) {
81
- return this.fromWireframeGeometry(new et(e.geometry)), this;
40
+ return this.fromWireframeGeometry(new Qe(e.geometry)), this;
82
41
  }
83
- /**
84
- * Setups this line segments geometry from the given line segments.
85
- *
86
- * @param {LineSegments} lineSegments - The line segments that should be used as a data source for this geometry.
87
- * Assumes the source geometry is not using indices.
88
- * @return {LineSegmentsGeometry} A reference to this geometry.
89
- */
90
42
  fromLineSegments(e) {
91
43
  const n = e.geometry;
92
44
  return this.setPositions(n.attributes.position.array), this;
93
45
  }
94
46
  computeBoundingBox() {
95
- this.boundingBox === null && (this.boundingBox = new ce());
47
+ this.boundingBox === null && (this.boundingBox = new de());
96
48
  const e = this.attributes.instanceStart, n = this.attributes.instanceEnd;
97
- e !== void 0 && n !== void 0 && (this.boundingBox.setFromBufferAttribute(e), ye.setFromBufferAttribute(n), this.boundingBox.union(ye));
49
+ e !== void 0 && n !== void 0 && (this.boundingBox.setFromBufferAttribute(e), ge.setFromBufferAttribute(n), this.boundingBox.union(ge));
98
50
  }
99
51
  computeBoundingSphere() {
100
- this.boundingSphere === null && (this.boundingSphere = new Ce()), this.boundingBox === null && this.computeBoundingBox();
52
+ this.boundingSphere === null && (this.boundingSphere = new ze()), this.boundingBox === null && this.computeBoundingBox();
101
53
  const e = this.attributes.instanceStart, n = this.attributes.instanceEnd;
102
54
  if (e !== void 0 && n !== void 0) {
103
55
  const i = this.boundingSphere.center;
104
56
  this.boundingBox.getCenter(i);
105
57
  let t = 0;
106
58
  for (let r = 0, l = e.count; r < l; r++)
107
- J.fromBufferAttribute(e, r), t = Math.max(t, i.distanceToSquared(J)), J.fromBufferAttribute(n, r), t = Math.max(t, i.distanceToSquared(J));
59
+ q.fromBufferAttribute(e, r), t = Math.max(t, i.distanceToSquared(q)), q.fromBufferAttribute(n, r), t = Math.max(t, i.distanceToSquared(q));
108
60
  this.boundingSphere.radius = Math.sqrt(t), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
109
61
  }
110
62
  }
111
63
  toJSON() {
112
64
  }
65
+ applyMatrix(e) {
66
+ return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."), this.applyMatrix4(e);
67
+ }
113
68
  }
114
- ee.line = {
69
+ Q.line = {
115
70
  worldUnits: { value: 1 },
116
71
  linewidth: { value: 1 },
117
- resolution: { value: new Ue(1, 1) },
72
+ resolution: { value: new _e(1, 1) },
118
73
  dashOffset: { value: 0 },
119
74
  dashScale: { value: 1 },
120
75
  dashSize: { value: 1 },
121
76
  gapSize: { value: 1 }
122
77
  // todo FIX - maybe change to totalSize
123
78
  };
124
- Q.line = {
125
- uniforms: _e.merge([
126
- ee.common,
127
- ee.fog,
128
- ee.line
79
+ K.line = {
80
+ uniforms: Ce.merge([
81
+ Q.common,
82
+ Q.fog,
83
+ Q.line
129
84
  ]),
130
85
  vertexShader: (
131
86
  /* glsl */
@@ -414,9 +369,6 @@ Q.line = {
414
369
 
415
370
  void main() {
416
371
 
417
- float alpha = opacity;
418
- vec4 diffuseColor = vec4( diffuse, alpha );
419
-
420
372
  #include <clipping_planes_fragment>
421
373
 
422
374
  #ifdef USE_DASH
@@ -427,6 +379,8 @@ Q.line = {
427
379
 
428
380
  #endif
429
381
 
382
+ float alpha = opacity;
383
+
430
384
  #ifdef WORLD_UNITS
431
385
 
432
386
  // Find the closest points on the view ray and the line segment
@@ -491,6 +445,8 @@ Q.line = {
491
445
 
492
446
  #endif
493
447
 
448
+ vec4 diffuseColor = vec4( diffuse, alpha );
449
+
494
450
  #include <logdepthbuf_fragment>
495
451
  #include <color_fragment>
496
452
 
@@ -505,154 +461,77 @@ Q.line = {
505
461
  `
506
462
  )
507
463
  };
508
- class ue extends tt {
509
- /**
510
- * Constructs a new line segments geometry.
511
- *
512
- * @param {Object} [parameters] - An object with one or more properties
513
- * defining the material's appearance. Any property of the material
514
- * (including any property from inherited materials) can be passed
515
- * in here. Color values can be passed any type of value accepted
516
- * by {@link Color#set}.
517
- */
464
+ class ce extends et {
518
465
  constructor(e) {
519
466
  super({
520
467
  type: "LineMaterial",
521
- uniforms: _e.clone(Q.line.uniforms),
522
- vertexShader: Q.line.vertexShader,
523
- fragmentShader: Q.line.fragmentShader,
468
+ uniforms: Ce.clone(K.line.uniforms),
469
+ vertexShader: K.line.vertexShader,
470
+ fragmentShader: K.line.fragmentShader,
524
471
  clipping: !0
525
472
  // required for clipping support
526
473
  }), this.isLineMaterial = !0, this.setValues(e);
527
474
  }
528
- /**
529
- * The material's color.
530
- *
531
- * @type {Color}
532
- * @default (1,1,1)
533
- */
534
475
  get color() {
535
476
  return this.uniforms.diffuse.value;
536
477
  }
537
478
  set color(e) {
538
479
  this.uniforms.diffuse.value = e;
539
480
  }
540
- /**
541
- * Whether the material's sizes (width, dash gaps) are in world units.
542
- *
543
- * @type {boolean}
544
- * @default false
545
- */
546
481
  get worldUnits() {
547
482
  return "WORLD_UNITS" in this.defines;
548
483
  }
549
484
  set worldUnits(e) {
550
485
  e === !0 ? this.defines.WORLD_UNITS = "" : delete this.defines.WORLD_UNITS;
551
486
  }
552
- /**
553
- * Controls line thickness in CSS pixel units when `worldUnits` is `false` (default),
554
- * or in world units when `worldUnits` is `true`.
555
- *
556
- * @type {number}
557
- * @default 1
558
- */
559
487
  get linewidth() {
560
488
  return this.uniforms.linewidth.value;
561
489
  }
562
490
  set linewidth(e) {
563
491
  this.uniforms.linewidth && (this.uniforms.linewidth.value = e);
564
492
  }
565
- /**
566
- * Whether the line is dashed, or solid.
567
- *
568
- * @type {boolean}
569
- * @default false
570
- */
571
493
  get dashed() {
572
494
  return "USE_DASH" in this.defines;
573
495
  }
574
496
  set dashed(e) {
575
497
  e === !0 !== this.dashed && (this.needsUpdate = !0), e === !0 ? this.defines.USE_DASH = "" : delete this.defines.USE_DASH;
576
498
  }
577
- /**
578
- * The scale of the dashes and gaps.
579
- *
580
- * @type {number}
581
- * @default 1
582
- */
583
499
  get dashScale() {
584
500
  return this.uniforms.dashScale.value;
585
501
  }
586
502
  set dashScale(e) {
587
503
  this.uniforms.dashScale.value = e;
588
504
  }
589
- /**
590
- * The size of the dash.
591
- *
592
- * @type {number}
593
- * @default 1
594
- */
595
505
  get dashSize() {
596
506
  return this.uniforms.dashSize.value;
597
507
  }
598
508
  set dashSize(e) {
599
509
  this.uniforms.dashSize.value = e;
600
510
  }
601
- /**
602
- * Where in the dash cycle the dash starts.
603
- *
604
- * @type {number}
605
- * @default 0
606
- */
607
511
  get dashOffset() {
608
512
  return this.uniforms.dashOffset.value;
609
513
  }
610
514
  set dashOffset(e) {
611
515
  this.uniforms.dashOffset.value = e;
612
516
  }
613
- /**
614
- * The size of the gap.
615
- *
616
- * @type {number}
617
- * @default 0
618
- */
619
517
  get gapSize() {
620
518
  return this.uniforms.gapSize.value;
621
519
  }
622
520
  set gapSize(e) {
623
521
  this.uniforms.gapSize.value = e;
624
522
  }
625
- /**
626
- * The opacity.
627
- *
628
- * @type {number}
629
- * @default 1
630
- */
631
523
  get opacity() {
632
524
  return this.uniforms.opacity.value;
633
525
  }
634
526
  set opacity(e) {
635
527
  this.uniforms && (this.uniforms.opacity.value = e);
636
528
  }
637
- /**
638
- * The size of the viewport, in screen pixels. This must be kept updated to make
639
- * screen-space rendering accurate.The `LineSegments2.onBeforeRender` callback
640
- * performs the update for visible objects.
641
- *
642
- * @type {Vector2}
643
- */
644
529
  get resolution() {
645
530
  return this.uniforms.resolution.value;
646
531
  }
647
532
  set resolution(e) {
648
533
  this.uniforms.resolution.value.copy(e);
649
534
  }
650
- /**
651
- * Whether to use alphaToCoverage or not. When enabled, this can improve the
652
- * anti-aliasing of line edges when using MSAA.
653
- *
654
- * @type {boolean}
655
- */
656
535
  get alphaToCoverage() {
657
536
  return "USE_ALPHA_TO_COVERAGE" in this.defines;
658
537
  }
@@ -660,20 +539,20 @@ class ue extends tt {
660
539
  this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
661
540
  }
662
541
  }
663
- const oe = new V(), we = new P(), xe = new P(), w = new V(), x = new V(), E = new V(), ae = new P(), re = new st(), S = new it(), Se = new P(), Z = new ce(), K = new Ce(), A = new V();
664
- let M, D;
665
- function be(o, e, n) {
666
- return A.set(0, 0, -e, 1).applyMatrix4(o.projectionMatrix), A.multiplyScalar(1 / A.w), A.x = D / n.width, A.y = D / n.height, A.applyMatrix4(o.projectionMatrixInverse), A.multiplyScalar(1 / A.w), Math.abs(Math.max(A.x, A.y));
542
+ const ye = new P(), we = new P(), w = new ee(), x = new ee(), U = new ee(), oe = new P(), ae = new it(), S = new nt(), xe = new P(), J = new de(), Z = new ze(), M = new ee();
543
+ let A, D;
544
+ function Se(o, e, n) {
545
+ return M.set(0, 0, -e, 1).applyMatrix4(o.projectionMatrix), M.multiplyScalar(1 / M.w), M.x = D / n.width, M.y = D / n.height, M.applyMatrix4(o.projectionMatrixInverse), M.multiplyScalar(1 / M.w), Math.abs(Math.max(M.x, M.y));
667
546
  }
668
- function ht(o, e) {
547
+ function mt(o, e) {
669
548
  const n = o.matrixWorld, i = o.geometry, t = i.attributes.instanceStart, r = i.attributes.instanceEnd, l = Math.min(i.instanceCount, t.count);
670
549
  for (let a = 0, c = l; a < c; a++) {
671
550
  S.start.fromBufferAttribute(t, a), S.end.fromBufferAttribute(r, a), S.applyMatrix4(n);
672
551
  const u = new P(), m = new P();
673
- M.distanceSqToSegment(S.start, S.end, m, u), m.distanceTo(u) < D * 0.5 && e.push({
552
+ A.distanceSqToSegment(S.start, S.end, m, u), m.distanceTo(u) < D * 0.5 && e.push({
674
553
  point: m,
675
554
  pointOnLine: u,
676
- distance: M.origin.distanceTo(m),
555
+ distance: A.origin.distanceTo(m),
677
556
  object: o,
678
557
  face: null,
679
558
  faceIndex: a,
@@ -682,30 +561,30 @@ function ht(o, e) {
682
561
  });
683
562
  }
684
563
  }
685
- function vt(o, e, n) {
564
+ function ht(o, e, n) {
686
565
  const i = e.projectionMatrix, r = o.material.resolution, l = o.matrixWorld, a = o.geometry, c = a.attributes.instanceStart, u = a.attributes.instanceEnd, m = Math.min(a.instanceCount, c.count), y = -e.near;
687
- M.at(1, E), E.w = 1, E.applyMatrix4(e.matrixWorldInverse), E.applyMatrix4(i), E.multiplyScalar(1 / E.w), E.x *= r.x / 2, E.y *= r.y / 2, E.z = 0, ae.copy(E), re.multiplyMatrices(e.matrixWorldInverse, l);
566
+ A.at(1, U), U.w = 1, U.applyMatrix4(e.matrixWorldInverse), U.applyMatrix4(i), U.multiplyScalar(1 / U.w), U.x *= r.x / 2, U.y *= r.y / 2, U.z = 0, oe.copy(U), ae.multiplyMatrices(e.matrixWorldInverse, l);
688
567
  for (let g = 0, O = m; g < O; g++) {
689
- if (w.fromBufferAttribute(c, g), x.fromBufferAttribute(u, g), w.w = 1, x.w = 1, w.applyMatrix4(re), x.applyMatrix4(re), w.z > y && x.z > y)
568
+ if (w.fromBufferAttribute(c, g), x.fromBufferAttribute(u, g), w.w = 1, x.w = 1, w.applyMatrix4(ae), x.applyMatrix4(ae), w.z > y && x.z > y)
690
569
  continue;
691
570
  if (w.z > y) {
692
- const U = w.z - x.z, L = (w.z - y) / U;
571
+ const E = w.z - x.z, L = (w.z - y) / E;
693
572
  w.lerp(x, L);
694
573
  } else if (x.z > y) {
695
- const U = x.z - w.z, L = (x.z - y) / U;
574
+ const E = x.z - w.z, L = (x.z - y) / E;
696
575
  x.lerp(w, L);
697
576
  }
698
577
  w.applyMatrix4(i), x.applyMatrix4(i), w.multiplyScalar(1 / w.w), x.multiplyScalar(1 / x.w), w.x *= r.x / 2, w.y *= r.y / 2, x.x *= r.x / 2, x.y *= r.y / 2, S.start.copy(w), S.start.z = 0, S.end.copy(x), S.end.z = 0;
699
- const j = S.closestPointToPointParameter(ae, !0);
700
- S.at(j, Se);
701
- const _ = Ee.lerp(w.z, x.z, j), z = _ >= -1 && _ <= 1, I = ae.distanceTo(Se) < D * 0.5;
578
+ const j = S.closestPointToPointParameter(oe, !0);
579
+ S.at(j, xe);
580
+ const _ = Ee.lerp(w.z, x.z, j), z = _ >= -1 && _ <= 1, I = oe.distanceTo(xe) < D * 0.5;
702
581
  if (z && I) {
703
582
  S.start.fromBufferAttribute(c, g), S.end.fromBufferAttribute(u, g), S.start.applyMatrix4(l), S.end.applyMatrix4(l);
704
- const U = new P(), L = new P();
705
- M.distanceSqToSegment(S.start, S.end, L, U), n.push({
583
+ const E = new P(), L = new P();
584
+ A.distanceSqToSegment(S.start, S.end, L, E), n.push({
706
585
  point: L,
707
- pointOnLine: U,
708
- distance: M.origin.distanceTo(L),
586
+ pointOnLine: E,
587
+ distance: A.origin.distanceTo(L),
709
588
  object: o,
710
589
  face: null,
711
590
  faceIndex: g,
@@ -715,140 +594,79 @@ function vt(o, e, n) {
715
594
  }
716
595
  }
717
596
  }
718
- class gt extends nt {
719
- /**
720
- * Constructs a new wide line.
721
- *
722
- * @param {LineSegmentsGeometry} [geometry] - The line geometry.
723
- * @param {LineMaterial} [material] - The line material.
724
- */
725
- constructor(e = new Ae(), n = new ue({ color: Math.random() * 16777215 })) {
597
+ class vt extends tt {
598
+ constructor(e = new Ue(), n = new ce({ color: Math.random() * 16777215 })) {
726
599
  super(e, n), this.isLineSegments2 = !0, this.type = "LineSegments2";
727
600
  }
728
- /**
729
- * Computes an array of distance values which are necessary for rendering dashed lines.
730
- * For each vertex in the geometry, the method calculates the cumulative length from the
731
- * current point to the very beginning of the line.
732
- *
733
- * @return {LineSegments2} A reference to this instance.
734
- */
601
+ // for backwards-compatibility, but could be a method of LineSegmentsGeometry...
735
602
  computeLineDistances() {
736
603
  const e = this.geometry, n = e.attributes.instanceStart, i = e.attributes.instanceEnd, t = new Float32Array(2 * n.count);
737
604
  for (let l = 0, a = 0, c = n.count; l < c; l++, a += 2)
738
- we.fromBufferAttribute(n, l), xe.fromBufferAttribute(i, l), t[a] = a === 0 ? 0 : t[a - 1], t[a + 1] = t[a] + we.distanceTo(xe);
739
- const r = new de(t, 2, 1);
740
- return e.setAttribute("instanceDistanceStart", new R(r, 1, 0)), e.setAttribute("instanceDistanceEnd", new R(r, 1, 1)), this;
605
+ ye.fromBufferAttribute(n, l), we.fromBufferAttribute(i, l), t[a] = a === 0 ? 0 : t[a - 1], t[a + 1] = t[a] + ye.distanceTo(we);
606
+ const r = new le(t, 2, 1);
607
+ return e.setAttribute("instanceDistanceStart", new G(r, 1, 0)), e.setAttribute("instanceDistanceEnd", new G(r, 1, 1)), this;
741
608
  }
742
- /**
743
- * Computes intersection points between a casted ray and this instance.
744
- *
745
- * @param {Raycaster} raycaster - The raycaster.
746
- * @param {Array<Object>} intersects - The target array that holds the intersection points.
747
- */
748
609
  raycast(e, n) {
749
610
  const i = this.material.worldUnits, t = e.camera;
750
611
  t === null && !i && console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');
751
612
  const r = e.params.Line2 !== void 0 && e.params.Line2.threshold || 0;
752
- M = e.ray;
613
+ A = e.ray;
753
614
  const l = this.matrixWorld, a = this.geometry, c = this.material;
754
- D = c.linewidth + r, a.boundingSphere === null && a.computeBoundingSphere(), K.copy(a.boundingSphere).applyMatrix4(l);
615
+ D = c.linewidth + r, a.boundingSphere === null && a.computeBoundingSphere(), Z.copy(a.boundingSphere).applyMatrix4(l);
755
616
  let u;
756
617
  if (i)
757
618
  u = D * 0.5;
758
619
  else {
759
- const y = Math.max(t.near, K.distanceToPoint(M.origin));
760
- u = be(t, y, c.resolution);
620
+ const y = Math.max(t.near, Z.distanceToPoint(A.origin));
621
+ u = Se(t, y, c.resolution);
761
622
  }
762
- if (K.radius += u, M.intersectsSphere(K) === !1)
623
+ if (Z.radius += u, A.intersectsSphere(Z) === !1)
763
624
  return;
764
- a.boundingBox === null && a.computeBoundingBox(), Z.copy(a.boundingBox).applyMatrix4(l);
625
+ a.boundingBox === null && a.computeBoundingBox(), J.copy(a.boundingBox).applyMatrix4(l);
765
626
  let m;
766
627
  if (i)
767
628
  m = D * 0.5;
768
629
  else {
769
- const y = Math.max(t.near, Z.distanceToPoint(M.origin));
770
- m = be(t, y, c.resolution);
630
+ const y = Math.max(t.near, J.distanceToPoint(A.origin));
631
+ m = Se(t, y, c.resolution);
771
632
  }
772
- Z.expandByScalar(m), M.intersectsBox(Z) !== !1 && (i ? ht(this, n) : vt(this, t, n));
773
- }
774
- onBeforeRender(e) {
775
- const n = this.material.uniforms;
776
- n && n.resolution && (e.getViewport(oe), this.material.uniforms.resolution.value.set(oe.z, oe.w));
633
+ J.expandByScalar(m), A.intersectsBox(J) !== !1 && (i ? mt(this, n) : ht(this, t, n));
777
634
  }
778
635
  }
779
- class Me extends Ae {
780
- /**
781
- * Constructs a new line geometry.
782
- */
636
+ class Me extends Ue {
783
637
  constructor() {
784
638
  super(), this.isLineGeometry = !0, this.type = "LineGeometry";
785
639
  }
786
- /**
787
- * Sets the given line positions for this geometry.
788
- *
789
- * @param {Float32Array|Array<number>} array - The position data to set.
790
- * @return {LineGeometry} A reference to this geometry.
791
- */
792
640
  setPositions(e) {
793
641
  const n = e.length - 3, i = new Float32Array(2 * n);
794
642
  for (let t = 0; t < n; t += 3)
795
643
  i[2 * t] = e[t], i[2 * t + 1] = e[t + 1], i[2 * t + 2] = e[t + 2], i[2 * t + 3] = e[t + 3], i[2 * t + 4] = e[t + 4], i[2 * t + 5] = e[t + 5];
796
644
  return super.setPositions(i), this;
797
645
  }
798
- /**
799
- * Sets the given line colors for this geometry.
800
- *
801
- * @param {Float32Array|Array<number>} array - The position data to set.
802
- * @return {LineGeometry} A reference to this geometry.
803
- */
804
646
  setColors(e) {
805
647
  const n = e.length - 3, i = new Float32Array(2 * n);
806
648
  for (let t = 0; t < n; t += 3)
807
649
  i[2 * t] = e[t], i[2 * t + 1] = e[t + 1], i[2 * t + 2] = e[t + 2], i[2 * t + 3] = e[t + 3], i[2 * t + 4] = e[t + 4], i[2 * t + 5] = e[t + 5];
808
650
  return super.setColors(i), this;
809
651
  }
810
- /**
811
- * Setups this line segments geometry from the given sequence of points.
812
- *
813
- * @param {Array<Vector3|Vector2>} points - An array of points in 2D or 3D space.
814
- * @return {LineGeometry} A reference to this geometry.
815
- */
816
- setFromPoints(e) {
817
- const n = e.length - 1, i = new Float32Array(6 * n);
818
- for (let t = 0; t < n; t++)
819
- i[6 * t] = e[t].x, i[6 * t + 1] = e[t].y, i[6 * t + 2] = e[t].z || 0, i[6 * t + 3] = e[t + 1].x, i[6 * t + 4] = e[t + 1].y, i[6 * t + 5] = e[t + 1].z || 0;
820
- return super.setPositions(i), this;
821
- }
822
- /**
823
- * Setups this line segments geometry from the given line.
824
- *
825
- * @param {Line} line - The line that should be used as a data source for this geometry.
826
- * @return {LineGeometry} A reference to this geometry.
827
- */
828
652
  fromLine(e) {
829
653
  const n = e.geometry;
830
654
  return this.setPositions(n.attributes.position.array), this;
831
655
  }
832
656
  }
833
- class yt extends gt {
834
- /**
835
- * Constructs a new wide line.
836
- *
837
- * @param {LineGeometry} [geometry] - The line geometry.
838
- * @param {LineMaterial} [material] - The line material.
839
- */
840
- constructor(e = new Me(), n = new ue({ color: Math.random() * 16777215 })) {
657
+ class gt extends vt {
658
+ constructor(e = new Me(), n = new ce({ color: Math.random() * 16777215 })) {
841
659
  super(e, n), this.isLine2 = !0, this.type = "Line2";
842
660
  }
843
661
  }
844
- function wt(o) {
662
+ function yt(o) {
845
663
  const e = [];
846
664
  return o.forEach((n) => {
847
665
  const [i, t, r] = n.trim().split(/\s+/);
848
666
  e.push(+i, +t, +r);
849
667
  }), e;
850
668
  }
851
- function ze(o, e, n) {
669
+ function be(o, e, n) {
852
670
  switch (o) {
853
671
  case "X":
854
672
  e.x = +n || 0;
@@ -861,7 +679,7 @@ function ze(o, e, n) {
861
679
  break;
862
680
  }
863
681
  }
864
- function xt(o) {
682
+ function wt(o) {
865
683
  const e = [], n = ["X", "Y", "Z"];
866
684
  return o.forEach((i) => {
867
685
  const t = {
@@ -875,23 +693,23 @@ function xt(o) {
875
693
  for (let c = 0; c < (r == null ? void 0 : r.length); c++) {
876
694
  const u = r[c], m = n.find((y) => y === u);
877
695
  if (m) {
878
- l && ze(l, t, a), a = "", l = m;
696
+ l && be(l, t, a), a = "", l = m;
879
697
  continue;
880
698
  }
881
699
  a = a + u;
882
700
  }
883
- ze(l, t, a), e.push(t.x, t.y, t.z);
701
+ be(l, t, a), e.push(t.x, t.y, t.z);
884
702
  }), e;
885
703
  }
886
- async function St(o) {
704
+ async function xt(o) {
887
705
  var t, r;
888
706
  const e = (t = o == null ? void 0 : o.trim()) == null ? void 0 : t.split(/\r?\n/), n = e == null ? void 0 : e[0], i = (r = n == null ? void 0 : n.trim()) == null ? void 0 : r.split(/\s+/);
889
707
  if ((i == null ? void 0 : i.length) >= 3)
890
- return wt(e);
708
+ return yt(e);
891
709
  if ((i == null ? void 0 : i.length) === 1)
892
- return xt(e);
710
+ return wt(e);
893
711
  }
894
- async function bt(o) {
712
+ async function St(o) {
895
713
  const e = o.trim().split(/\r?\n/), n = [];
896
714
  return e.forEach((i) => {
897
715
  const t = i.trim().split(/\s+/);
@@ -901,7 +719,7 @@ async function bt(o) {
901
719
  n.push(+r, +l, +a);
902
720
  }), n;
903
721
  }
904
- async function zt(o) {
722
+ async function bt(o) {
905
723
  const e = o.trim().split(/\r?\n/), n = [];
906
724
  return e.forEach((i) => {
907
725
  const t = i.trim().split(/\s+/);
@@ -911,11 +729,11 @@ async function zt(o) {
911
729
  n.push(+r, +l, +a);
912
730
  }), n;
913
731
  }
914
- async function Ct(o, e) {
732
+ async function zt(o, e) {
915
733
  const { isCyd: n, isUv: i, isCpt: t } = e;
916
- return i ? St(o) : n ? zt(o) : t ? bt(o) : [];
734
+ return i ? xt(o) : n ? bt(o) : t ? St(o) : [];
917
735
  }
918
- function _t(o, e) {
736
+ function Ct(o, e) {
919
737
  if (!e || e.length < 3)
920
738
  return;
921
739
  const { scene: n, camera: i, renderer: t, controls: r } = o();
@@ -924,37 +742,37 @@ function _t(o, e) {
924
742
  const l = [];
925
743
  for (let g = 0; g < e.length; g += 3)
926
744
  l.push(new P(e[g], e[g + 1], e[g + 2]));
927
- const c = new ot(l, !1, "catmullrom", 0.5).getPoints(150).flatMap((g) => [g.x, g.y, g.z]), u = new Me();
745
+ const c = new st(l, !1, "catmullrom", 0.5).getPoints(150).flatMap((g) => [g.x, g.y, g.z]), u = new Me();
928
746
  u.setPositions(c);
929
- const m = new ue({
747
+ const m = new ce({
930
748
  color: 55551,
931
749
  linewidth: 3,
932
750
  // 像素宽度,可 >1
933
- resolution: new Ue(window.innerWidth, window.innerHeight)
934
- }), y = new yt(u, m);
751
+ resolution: new _e(window.innerWidth, window.innerHeight)
752
+ }), y = new gt(u, m);
935
753
  return y.name = "轨迹路径", n.add(y), y;
936
754
  }
937
- function Ut(o, e, n, i = 4, t = 50) {
755
+ function _t(o, e, n, i = 4, t = 50) {
938
756
  let r = 1 / 0, l = -1 / 0, a = 1 / 0, c = -1 / 0, u = 1 / 0, m = -1 / 0;
939
757
  for (let _ = 0; _ < o.length; _ += 3) {
940
- const z = o[_], I = o[_ + 1], U = o[_ + 2];
941
- r = Math.min(r, z), l = Math.max(l, z), a = Math.min(a, I), c = Math.max(c, I), u = Math.min(u, U), m = Math.max(m, U);
758
+ const z = o[_], I = o[_ + 1], E = o[_ + 2];
759
+ r = Math.min(r, z), l = Math.max(l, z), a = Math.min(a, I), c = Math.max(c, I), u = Math.min(u, E), m = Math.max(m, E);
942
760
  }
943
761
  const g = Math.sqrt((l - r) ** 2 + (c - a) ** 2 + (m - u) ** 2) * 0.05, O = Ee.degToRad(e.fov), H = 2 * Math.tan(O / 2) * t, j = g / H * n.domElement.height * (i / 4);
944
762
  return Math.max(1, j);
945
763
  }
946
764
  function Et(o) {
947
- const e = new at();
948
- e.setAttribute("position", new le(o, 3));
949
- const n = new rt({
765
+ const e = new ot();
766
+ e.setAttribute("position", new re(o, 3));
767
+ const n = new at({
950
768
  color: 55551,
951
769
  size: 1,
952
770
  // 像素世界单位
953
771
  sizeAttenuation: !1
954
772
  });
955
- return new lt(e, n);
773
+ return new rt(e, n);
956
774
  }
957
- function At(o, e) {
775
+ function Ut(o, e) {
958
776
  if (!e)
959
777
  return;
960
778
  const { scene: n, camera: i, renderer: t, controls: r } = o();
@@ -962,16 +780,16 @@ function At(o, e) {
962
780
  return;
963
781
  const l = Et(e);
964
782
  l.name = "轨迹路径", n.add(l);
965
- const a = Ut(e, i, t, 0.5, 50);
783
+ const a = _t(e, i, t, 0.5, 50);
966
784
  return l.material.size = a, l;
967
785
  }
968
- const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" }, Lt = { class: "buttonGroup-topLeft" }, Tt = { class: "buttonGroup-left" }, Bt = { class: "buttonGroup-right" }, kt = { class: "buttonGroup-bottom" }, Dt = { class: "left-panel" }, Ot = { class: "panel-header" }, jt = { class: "panel-body" }, It = {
786
+ const Mt = { class: "obj-viewer-container" }, At = { class: "buttonGroup-top" }, Pt = { class: "buttonGroup-topLeft" }, Lt = { class: "buttonGroup-left" }, Tt = { class: "buttonGroup-right" }, Bt = { class: "buttonGroup-bottom" }, kt = { class: "left-panel" }, Dt = { class: "panel-header" }, Ot = { class: "panel-body" }, jt = {
969
787
  key: 1,
970
788
  class: "clipping-content"
971
- }, Ft = { class: "radio-group" }, Rt = { class: "radio-label" }, Gt = { class: "radio-label" }, Wt = { class: "radio-label" }, Vt = { class: "radio-label" }, Ht = { class: "right-panel" }, Nt = { class: "panel-header" }, $t = { class: "panel-body" }, Xt = {
789
+ }, It = { class: "radio-group" }, Rt = { class: "radio-label" }, Gt = { class: "radio-label" }, Ft = { class: "radio-label" }, Wt = { class: "radio-label" }, Ht = { class: "right-panel" }, Vt = { class: "panel-header" }, Nt = { class: "panel-body" }, $t = {
972
790
  key: 0,
973
791
  class: "loading-overlay"
974
- }, Yt = /* @__PURE__ */ We({
792
+ }, Xt = /* @__PURE__ */ Fe({
975
793
  __name: "threeTrackPathView",
976
794
  props: {
977
795
  fileUrls: {},
@@ -980,48 +798,48 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
980
798
  },
981
799
  emits: ["getAnimationData", "getThreeData"],
982
800
  setup(o, { emit: e }) {
983
- const n = e, i = o, t = B(null), r = B(!1), l = B(""), a = B(!1), c = B(""), u = B(!1), m = B(""), y = he(null), g = he(null), {
801
+ const n = e, i = o, t = B(null), r = B(!1), l = B(""), a = B(!1), c = B(""), u = B(!1), m = B(""), y = me(null), g = me(null), {
984
802
  currentModels: O,
985
803
  resetView: H,
986
804
  initThreeJS: j,
987
805
  handleResize: _,
988
806
  getThreeJSObjects: z,
989
807
  cleanup: I,
990
- axesHelperVisible: U,
808
+ axesHelperVisible: E,
991
809
  toggleAxesVisibility: L
992
- } = Ye(t), { isAnimating: fe, toggleAnimation: Pe, stopAnimation: Le } = qe(z, O), { isClipping: Te, activeClippingAxis: C, toggleClipping: Be, updateClippingPlanes: T } = Je(z, O), ke = () => {
810
+ } = Xe(t), { isAnimating: ue, toggleAnimation: Ae, stopAnimation: Pe } = Ye(z, O), { isClipping: Le, activeClippingAxis: C, toggleClipping: Te, updateClippingPlanes: T } = qe(z, O), Be = () => {
993
811
  L();
994
- }, G = (f) => {
995
- a.value = !0, c.value = f, f === "剖面视图" && !Te.value && Be();
996
- }, N = (f) => {
812
+ }, F = (f) => {
813
+ a.value = !0, c.value = f, f === "剖面视图" && !Le.value && Te();
814
+ }, V = (f) => {
997
815
  u.value = !0, m.value = f, f === "动画仿真" && n("getAnimationData");
998
- }, pe = B([]), De = $(() => {
816
+ }, fe = B([]), ke = N(() => {
999
817
  var s;
1000
818
  return (s = i.trackFileType) == null ? void 0 : s.isUv;
1001
- }), Oe = $(() => {
819
+ }), De = N(() => {
1002
820
  var s;
1003
821
  return (s = i.trackFileType) == null ? void 0 : s.isCyd;
1004
- }), je = $(() => {
822
+ }), Oe = N(() => {
1005
823
  var s;
1006
824
  return (s = i.trackFileType) == null ? void 0 : s.isCpt;
1007
- }), Ie = $(() => {
825
+ }), je = N(() => {
1008
826
  const f = i.fileUrls || [];
1009
827
  return f == null ? void 0 : f[0];
1010
828
  });
1011
- let F = null;
1012
- const me = () => {
829
+ let R = null;
830
+ const pe = () => {
1013
831
  const { scene: f } = z();
1014
- F && f && (Ke(F, f), F = null);
1015
- }, Fe = async (f) => {
1016
- const s = await dt(f);
1017
- if (pt(s)) {
1018
- pe.value = await Ct(s, i.trackFileType) || [];
1019
- const W = pe.value;
1020
- De.value && (F = _t(z, W)), (Oe.value || je.value) && (F = At(z, W)), Ze(z, F);
832
+ R && f && (Ze(R, f), R = null);
833
+ }, Ie = async (f) => {
834
+ const s = await lt(f);
835
+ if (ft(s)) {
836
+ fe.value = await zt(s, i.trackFileType) || [];
837
+ const W = fe.value;
838
+ ke.value && (R = Ct(z, W)), (De.value || Oe.value) && (R = Ut(z, W)), Je(z, R);
1021
839
  }
1022
840
  };
1023
- Ve(() => Ie.value, async (f) => {
1024
- f && (me(), await Fe(f));
841
+ We(() => je.value, async (f) => {
842
+ f && (pe(), await Ie(f));
1025
843
  }, {
1026
844
  immediate: !0,
1027
845
  deep: !0
@@ -1031,25 +849,25 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1031
849
  const f = z();
1032
850
  g.value = f.scene, g.value && (g.value.name = "CPMPIP");
1033
851
  }, Ge = () => {
1034
- window.removeEventListener("resize", _), fe.value && Le(), me(), I();
852
+ window.removeEventListener("resize", _), ue.value && Pe(), pe(), I();
1035
853
  };
1036
854
  return He(async () => {
1037
855
  try {
1038
856
  Re();
1039
857
  } catch (f) {
1040
- console.error("Three.js 初始化失败:", f), ct.error("渲染引擎初始化失败!");
858
+ console.error("Three.js 初始化失败:", f), dt.error("渲染引擎初始化失败!");
1041
859
  }
1042
- }), Ne(() => {
860
+ }), Ve(() => {
1043
861
  Ge();
1044
862
  }), (f, s) => {
1045
- const W = $e("el-scrollbar");
1046
- return X(), te("div", Mt, [
863
+ const W = Ne("el-scrollbar");
864
+ return $(), te("div", Mt, [
1047
865
  d("div", {
1048
866
  ref_key: "threejsContainer",
1049
867
  ref: t,
1050
868
  class: "threejs-container"
1051
869
  }, null, 512),
1052
- d("div", Pt, [
870
+ d("div", At, [
1053
871
  p(v, {
1054
872
  name: "guanjianjiexi",
1055
873
  size: "34"
@@ -1071,7 +889,7 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1071
889
  size: "34"
1072
890
  })
1073
891
  ]),
1074
- d("div", Lt, [
892
+ d("div", Pt, [
1075
893
  p(v, {
1076
894
  name: "viewReset",
1077
895
  size: "24",
@@ -1091,46 +909,46 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1091
909
  p(v, {
1092
910
  name: "lookAround",
1093
911
  size: "24",
1094
- onClick: b(Pe),
1095
- title: b(fe) ? "停止动画" : "动画视图"
912
+ onClick: b(Ae),
913
+ title: b(ue) ? "停止动画" : "动画视图"
1096
914
  }, null, 8, ["onClick", "title"]),
1097
915
  p(v, {
1098
916
  name: "zuobiaoxi",
1099
917
  size: "24",
1100
- active: b(U),
1101
- onClick: ke,
918
+ active: b(E),
919
+ onClick: Be,
1102
920
  title: "显隐坐标轴"
1103
921
  }, null, 8, ["active"])
1104
922
  ]),
1105
- d("div", Tt, [
1106
- ve(f.$slots, "button-left", { switchRightPanel: G }, void 0, !0),
923
+ d("div", Lt, [
924
+ he(f.$slots, "button-left", { switchRightPanel: F }, void 0, !0),
1107
925
  p(v, {
1108
926
  name: "jiegoushu",
1109
927
  size: "24",
1110
- onClick: s[0] || (s[0] = (h) => G("场景树")),
928
+ onClick: s[0] || (s[0] = (h) => F("场景树")),
1111
929
  active: a.value && c.value === "场景树",
1112
930
  title: "场景树"
1113
931
  }, null, 8, ["active"]),
1114
932
  p(v, {
1115
933
  name: "clipping",
1116
934
  size: "24",
1117
- onClick: s[1] || (s[1] = (h) => G("剖面视图")),
935
+ onClick: s[1] || (s[1] = (h) => F("剖面视图")),
1118
936
  active: a.value && c.value === "剖面视图",
1119
937
  title: "剖面视图"
1120
938
  }, null, 8, ["active"]),
1121
939
  p(v, {
1122
940
  name: "donghuafangzhen",
1123
941
  size: "24",
1124
- onClick: s[2] || (s[2] = (h) => G("场景树3"))
942
+ onClick: s[2] || (s[2] = (h) => F("场景树3"))
1125
943
  }),
1126
944
  p(v, {
1127
945
  name: "donghuafangzhen",
1128
946
  size: "24",
1129
- onClick: s[3] || (s[3] = (h) => G("场景4"))
947
+ onClick: s[3] || (s[3] = (h) => F("场景4"))
1130
948
  })
1131
949
  ]),
1132
- d("div", Bt, [
1133
- ve(f.$slots, "button-right", { switchRightPanel: N }, void 0, !0),
950
+ d("div", Tt, [
951
+ he(f.$slots, "button-right", { switchRightPanel: V }, void 0, !0),
1134
952
  p(v, {
1135
953
  name: "donghuafangzhen",
1136
954
  size: "24"
@@ -1138,7 +956,7 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1138
956
  p(v, {
1139
957
  name: "guanjiekongzhi",
1140
958
  size: "24",
1141
- onClick: s[4] || (s[4] = (h) => N("关节控制")),
959
+ onClick: s[4] || (s[4] = (h) => V("关节控制")),
1142
960
  active: u.value && m.value === "关节控制",
1143
961
  title: "关节控制"
1144
962
  }, null, 8, ["active"]),
@@ -1146,14 +964,14 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1146
964
  name: "donghuafangzhen",
1147
965
  size: "24",
1148
966
  title: "动画仿真",
1149
- onClick: s[5] || (s[5] = (h) => N("动画仿真")),
967
+ onClick: s[5] || (s[5] = (h) => V("动画仿真")),
1150
968
  active: u.value && m.value === "动画仿真"
1151
969
  }, null, 8, ["active"]),
1152
970
  p(v, {
1153
971
  name: "donghuafangzhen",
1154
972
  size: "24",
1155
973
  title: "urdf动画",
1156
- onClick: s[6] || (s[6] = (h) => N("urdf动画")),
974
+ onClick: s[6] || (s[6] = (h) => V("urdf动画")),
1157
975
  active: u.value && m.value === "urdf动画"
1158
976
  }, null, 8, ["active"]),
1159
977
  p(v, {
@@ -1161,7 +979,7 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1161
979
  size: "24"
1162
980
  })
1163
981
  ]),
1164
- d("div", kt, [
982
+ d("div", Bt, [
1165
983
  p(v, {
1166
984
  name: "kuaitui",
1167
985
  size: "24",
@@ -1203,33 +1021,33 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1203
1021
  })
1204
1022
  })
1205
1023
  ]),
1206
- k(d("div", Dt, [
1207
- d("div", Ot, [
1024
+ k(d("div", kt, [
1025
+ d("div", Dt, [
1208
1026
  d("span", null, ie(c.value), 1),
1209
1027
  d("span", {
1210
1028
  class: "close",
1211
1029
  onClick: s[12] || (s[12] = (h) => a.value = !1)
1212
1030
  }, " X ")
1213
1031
  ]),
1214
- d("div", jt, [
1032
+ d("div", Ot, [
1215
1033
  p(W, { height: "100%" }, {
1216
- default: ge(() => [
1217
- c.value === "场景树" ? (X(), Xe(ut, {
1034
+ default: ve(() => [
1035
+ c.value === "场景树" ? ($(), $e(ct, {
1218
1036
  key: 0,
1219
1037
  model: y.value
1220
1038
  }, null, 8, ["model"])) : ne("", !0),
1221
- c.value === "剖面视图" ? (X(), te("div", It, [
1222
- d("div", Ft, [
1039
+ c.value === "剖面视图" ? ($(), te("div", jt, [
1040
+ d("div", It, [
1223
1041
  d("label", Rt, [
1224
1042
  k(d("input", {
1225
1043
  type: "radio",
1226
1044
  name: "clipping-axis",
1227
1045
  value: "none",
1228
- "onUpdate:modelValue": s[13] || (s[13] = (h) => Y(C) ? C.value = h : null),
1046
+ "onUpdate:modelValue": s[13] || (s[13] = (h) => X(C) ? C.value = h : null),
1229
1047
  onChange: s[14] || (s[14] = //@ts-ignore
1230
1048
  (...h) => b(T) && b(T)(...h))
1231
1049
  }, null, 544), [
1232
- [q, b(C)]
1050
+ [Y, b(C)]
1233
1051
  ]),
1234
1052
  s[22] || (s[22] = d("span", { class: "radio-text" }, "无切割", -1))
1235
1053
  ]),
@@ -1238,37 +1056,37 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1238
1056
  type: "radio",
1239
1057
  name: "clipping-axis",
1240
1058
  value: "x",
1241
- "onUpdate:modelValue": s[15] || (s[15] = (h) => Y(C) ? C.value = h : null),
1059
+ "onUpdate:modelValue": s[15] || (s[15] = (h) => X(C) ? C.value = h : null),
1242
1060
  onChange: s[16] || (s[16] = //@ts-ignore
1243
1061
  (...h) => b(T) && b(T)(...h))
1244
1062
  }, null, 544), [
1245
- [q, b(C)]
1063
+ [Y, b(C)]
1246
1064
  ]),
1247
1065
  s[23] || (s[23] = d("span", { class: "radio-text" }, "X轴切割", -1))
1248
1066
  ]),
1249
- d("label", Wt, [
1067
+ d("label", Ft, [
1250
1068
  k(d("input", {
1251
1069
  type: "radio",
1252
1070
  name: "clipping-axis",
1253
1071
  value: "y",
1254
- "onUpdate:modelValue": s[17] || (s[17] = (h) => Y(C) ? C.value = h : null),
1072
+ "onUpdate:modelValue": s[17] || (s[17] = (h) => X(C) ? C.value = h : null),
1255
1073
  onChange: s[18] || (s[18] = //@ts-ignore
1256
1074
  (...h) => b(T) && b(T)(...h))
1257
1075
  }, null, 544), [
1258
- [q, b(C)]
1076
+ [Y, b(C)]
1259
1077
  ]),
1260
1078
  s[24] || (s[24] = d("span", { class: "radio-text" }, "Y轴切割", -1))
1261
1079
  ]),
1262
- d("label", Vt, [
1080
+ d("label", Wt, [
1263
1081
  k(d("input", {
1264
1082
  type: "radio",
1265
1083
  name: "clipping-axis",
1266
1084
  value: "z",
1267
- "onUpdate:modelValue": s[19] || (s[19] = (h) => Y(C) ? C.value = h : null),
1085
+ "onUpdate:modelValue": s[19] || (s[19] = (h) => X(C) ? C.value = h : null),
1268
1086
  onChange: s[20] || (s[20] = //@ts-ignore
1269
1087
  (...h) => b(T) && b(T)(...h))
1270
1088
  }, null, 544), [
1271
- [q, b(C)]
1089
+ [Y, b(C)]
1272
1090
  ]),
1273
1091
  s[25] || (s[25] = d("span", { class: "radio-text" }, "Z轴切割", -1))
1274
1092
  ])
@@ -1282,17 +1100,17 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1282
1100
  [se, a.value]
1283
1101
  ]),
1284
1102
  k(d("div", Ht, [
1285
- d("div", Nt, [
1103
+ d("div", Vt, [
1286
1104
  d("span", null, ie(m.value), 1),
1287
1105
  d("span", {
1288
1106
  class: "close",
1289
1107
  onClick: s[21] || (s[21] = (h) => u.value = !1)
1290
1108
  }, " X ")
1291
1109
  ]),
1292
- d("div", $t, [
1110
+ d("div", Nt, [
1293
1111
  p(W, { height: "100%" }, {
1294
- default: ge(() => [
1295
- k(p(ft, { model: y.value }, null, 8, ["model"]), [
1112
+ default: ve(() => [
1113
+ k(p(ut, { model: y.value }, null, 8, ["model"]), [
1296
1114
  [se, m.value === "关节控制"]
1297
1115
  ])
1298
1116
  ]),
@@ -1302,14 +1120,14 @@ const Mt = { class: "obj-viewer-container" }, Pt = { class: "buttonGroup-top" },
1302
1120
  ], 512), [
1303
1121
  [se, u.value]
1304
1122
  ]),
1305
- r.value ? (X(), te("div", Xt, [
1123
+ r.value ? ($(), te("div", $t, [
1306
1124
  s[26] || (s[26] = d("div", { class: "loading-spinner" }, null, -1)),
1307
1125
  d("p", null, ie(l.value), 1)
1308
1126
  ])) : ne("", !0)
1309
1127
  ]);
1310
1128
  };
1311
1129
  }
1312
- }), on = /* @__PURE__ */ mt(Yt, [["__scopeId", "data-v-c3ad7441"]]);
1130
+ }), sn = /* @__PURE__ */ pt(Xt, [["__scopeId", "data-v-c3ad7441"]]);
1313
1131
  export {
1314
- on as default
1132
+ sn as default
1315
1133
  };