sunrize 1.8.10 → 1.8.12

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "1.8.10",
4
+ "version": "1.8.12",
5
5
  "description": "A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -90,7 +90,7 @@
90
90
  "dependencies": {
91
91
  "capitalize": "^2.0.4",
92
92
  "console": "^0.7.2",
93
- "electron": "^36.3.1",
93
+ "electron": "^37.1.0",
94
94
  "electron-prompt": "^1.7.0",
95
95
  "electron-squirrel-startup": "^1.0.1",
96
96
  "electron-tabs": "^1.0.4",
@@ -109,7 +109,7 @@
109
109
  "string-similarity": "^4.0.4",
110
110
  "tweakpane": "^3.1.10",
111
111
  "update-electron-app": "^3.1.1",
112
- "x_ite": "^11.5.10",
113
- "x3d-traverse": "^1.0.12"
112
+ "x_ite": "^11.5.12",
113
+ "x3d-traverse": "^1.0.13"
114
114
  }
115
115
  }
@@ -61,6 +61,8 @@ module .exports = new class Hierarchy extends Interface
61
61
  flags |= Traverse .PROTO_DECLARATION_BODY;
62
62
  flags |= Traverse .ROOT_NODES;
63
63
 
64
+ const targets = [ ];
65
+
64
66
  for (const object of Traverse .traverse (node, flags))
65
67
  {
66
68
  if (!(object instanceof X3D .SFNode))
@@ -71,14 +73,14 @@ module .exports = new class Hierarchy extends Interface
71
73
  if (!node .getType () .some (type => this .#targetTypes .has (type)))
72
74
  continue;
73
75
 
74
- const target = node .getGeometry ?.() ?.valueOf () ?? node;
75
-
76
- for (const hierarchy of this .#find (target))
77
- this .#hierarchies .push (hierarchy);
76
+ targets .push (node .getGeometry ?.() ?.valueOf () ?? node);
78
77
  }
79
78
 
79
+ for (const hierarchy of this .#find (targets))
80
+ this .#hierarchies .push (hierarchy);
81
+
80
82
  if (!this .#hierarchies .length)
81
- this .#hierarchies = this .#find (node);
83
+ this .#hierarchies = this .#find ([node]);
82
84
  }
83
85
  else
84
86
  {
@@ -86,7 +88,7 @@ module .exports = new class Hierarchy extends Interface
86
88
  ? node .getGeometry () ?.valueOf () ?? node
87
89
  : node;
88
90
 
89
- this .#hierarchies = this .#find (target);
91
+ this .#hierarchies = this .#find ([target]);
90
92
  }
91
93
 
92
94
  this .#processInterests ();
@@ -137,9 +139,9 @@ module .exports = new class Hierarchy extends Interface
137
139
  this .#processInterests ();
138
140
  }
139
141
 
140
- #find (target)
142
+ #find (targets)
141
143
  {
142
- if (!target)
144
+ if (!targets .length)
143
145
  return [ ];
144
146
 
145
147
  // Find target node.
@@ -150,7 +152,7 @@ module .exports = new class Hierarchy extends Interface
150
152
  flags |= Traverse .PROTO_DECLARATION_BODY;
151
153
  flags |= Traverse .ROOT_NODES;
152
154
 
153
- return Array .from (this .executionContext .find (target, flags),
155
+ return Array .from (this .executionContext .find (targets, flags),
154
156
  hierarchy => hierarchy .filter (object => object instanceof X3D .SFNode)
155
157
  .map (node => node .getValue () .valueOf ()));
156
158
  }