endset_three_editor 0.9.4 → 0.9.5

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.
@@ -5238,16 +5238,25 @@ function Ia(r) {
5238
5238
  ks();
5239
5239
  }
5240
5240
  function Ca(r) {
5241
+ var t, n;
5242
+ let e = r;
5243
+ for (; e; ) {
5244
+ if (((t = e.userData) == null ? void 0 : t.type) === "lightHelper" || e.type === "DirectionalLightHelper")
5245
+ return e.light || e;
5246
+ if (((n = e.userData) == null ? void 0 : n.type) === "AmbientLightHelper")
5247
+ return e.parent && e.parent.type === "AmbientLight" ? e.parent : e;
5248
+ e = e.parent;
5249
+ }
5241
5250
  if (r.type === "Line" || r.type === "LineSegments") {
5242
- const e = r.parent;
5243
- if (e)
5244
- switch (e.type) {
5251
+ const s = r.parent;
5252
+ if (s)
5253
+ switch (s.type) {
5245
5254
  case "DirectionalLightHelper":
5246
- return e.light;
5255
+ return s.light;
5247
5256
  case "AmbientLight":
5248
- return e;
5257
+ return s;
5249
5258
  default:
5250
- return e.isMesh ? e : r;
5259
+ return s.isMesh ? s : r;
5251
5260
  }
5252
5261
  return r;
5253
5262
  }
@@ -5657,7 +5666,7 @@ async function Ga(r, e = "edit", t, n, s, i) {
5657
5666
  const h = g;
5658
5667
  if (!h.userData.helper) {
5659
5668
  const y = new P.DirectionalLightHelper(h, 1);
5660
- y.userData.type = "lightHelper", h.userData.helper = y, (f = I.scene) == null || f.add(y);
5669
+ y.userData.type = "lightHelper", h.userData.helper = y, y.update(), (f = I.scene) == null || f.add(y);
5661
5670
  }
5662
5671
  }
5663
5672
  }));
@@ -6510,7 +6519,7 @@ function ii() {
6510
6519
  const e = 10;
6511
6520
  r.shadow.camera.left = -e, r.shadow.camera.right = e, r.shadow.camera.top = e, r.shadow.camera.bottom = -e, r.shadow.camera.near = 0.1, r.shadow.camera.far = 25, r.shadow.bias = -5e-4, r.shadow.normalBias = 0.02, r.target.position.set(0, 0, 0);
6512
6521
  const t = new P.DirectionalLightHelper(r, 1);
6513
- t.lightPlane.userData.name = "平行光辅助", t.userData.type = "lightHelper", r.userData.helper = t, nt(t), nt(r, !0);
6522
+ t.lightPlane.userData.name = "平行光辅助", t.userData.type = "lightHelper", r.userData.helper = t, t.update(), nt(t), nt(r, !0);
6514
6523
  }
6515
6524
  function oi(r) {
6516
6525
  const {