soonspacejs 2.14.33 → 2.14.34

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.
package/dist/index.esm.js CHANGED
@@ -24,7 +24,7 @@ import * as wi from "three/examples/jsm/utils/SkeletonUtils.js";
24
24
  import * as jc from "three/examples/jsm/libs/fflate.module.js";
25
25
  import { NURBSCurve as Uc } from "three/examples/jsm/curves/NURBSCurve.js";
26
26
  import { RectAreaLightHelper as Gc } from "three/examples/jsm/helpers/RectAreaLightHelper.js";
27
- const Vc = "soonspacejs", Hc = "2.14.33", bi = {
27
+ const Vc = "soonspacejs", Hc = "2.14.34", bi = {
28
28
  name: Vc,
29
29
  version: Hc
30
30
  }, wa = "[soonspacejs]: ";
@@ -7210,16 +7210,20 @@ var ae = ad();
7210
7210
  function er(i) {
7211
7211
  return i.charAt(0).toLowerCase() + i.slice(1);
7212
7212
  }
7213
- function od(i) {
7214
- let e = i, t;
7215
- for (; e; ) {
7216
- if (e instanceof De && e.stype !== "Group") {
7217
- t = e;
7213
+ function od(i, e) {
7214
+ let t = i, n;
7215
+ for (; t; ) {
7216
+ if (t instanceof De && t.stype !== "Group") {
7217
+ if (e && e.has(t.stype)) {
7218
+ t = t.parent;
7219
+ continue;
7220
+ }
7221
+ n = t;
7218
7222
  break;
7219
7223
  }
7220
- e = e.parent;
7224
+ t = t.parent;
7221
7225
  }
7222
- return t;
7226
+ return n;
7223
7227
  }
7224
7228
  function is(i, e) {
7225
7229
  return i[e] || (i[e] = new ae.Signal()), i[e];
@@ -7254,6 +7258,8 @@ class ld {
7254
7258
  touchstartTimes = [0, 0];
7255
7259
  // 按 stype 存储当前 hover 选中的对象
7256
7260
  hoverSelectMap = /* @__PURE__ */ new Map();
7261
+ // 根据 stype 排除事件触发的对象类型
7262
+ eventExcludeStypes = /* @__PURE__ */ new Set();
7257
7263
  _getPoiAndModel() {
7258
7264
  const { meshOfModelList: e, poiIconList: t } = this.viewport.scener.intersectsList;
7259
7265
  return [...e, ...t];
@@ -7281,7 +7287,7 @@ class ld {
7281
7287
  point: null
7282
7288
  }, a = /* @__PURE__ */ new Map();
7283
7289
  s.forEach((g) => {
7284
- const v = od(g.object);
7290
+ const v = od(g.object, this.eventExcludeStypes);
7285
7291
  if (!v) return;
7286
7292
  const w = v.stype;
7287
7293
  r.object || (r.type = w, r.object = g.object, r.point = g.point);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "soonspacejs",
3
- "version": "2.14.33",
3
+ "version": "2.14.34",
4
4
  "homepage": "https://www.xwbuilders.com/soonspacejs/",
5
5
  "description": "soonspacejs 2.x",
6
6
  "module": "./dist/index.esm.js",
@@ -18,6 +18,7 @@ declare class EventHandler {
18
18
  private touchStartEvent;
19
19
  private touchstartTimes;
20
20
  private hoverSelectMap;
21
+ eventExcludeStypes: Set<string>;
21
22
  constructor(viewport: Viewport);
22
23
  _getPoiAndModel(): Object3D<import('three').Object3DEventMap>[];
23
24
  /**