sunrize 1.7.59 → 1.7.60

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.7.59",
4
+ "version": "1.7.60",
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": "^35.0.1",
93
+ "electron": "^35.0.3",
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.3.2",
112
+ "x_ite": "^11.4.0",
113
113
  "x3d-traverse": "^1.0.10"
114
114
  }
115
115
  }
@@ -577,12 +577,12 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
577
577
  var menu = [
578
578
  {
579
579
  label: _("Rename Imported Node..."),
580
- visible: Editor .getScene (importedNode .getExecutionContext ()) === this .executionContext,
580
+ visible: importedNode .getExecutionContext () .getLocalScene () === this .executionContext,
581
581
  args: ["renameImportedNode", element .attr ("id")],
582
582
  },
583
583
  {
584
584
  label: _("Remove Imported Node"),
585
- visible: Editor .getScene (importedNode .getExecutionContext ()) === this .executionContext,
585
+ visible: importedNode .getExecutionContext () .getLocalScene () === this .executionContext,
586
586
  args: ["removeImportedNode", element .attr ("id")],
587
587
  },
588
588
  ];
@@ -153,6 +153,7 @@ module .exports = class OutlineView extends Interface
153
153
  X3D .X3DConstants .SpotLight,
154
154
  X3D .X3DConstants .Sound,
155
155
  X3D .X3DConstants .SpatialSound,
156
+ X3D .X3DConstants .ViewpointGroup,
156
157
  X3D .X3DConstants .X3DEnvironmentalSensorNode,
157
158
  X3D .X3DConstants .X3DTextureProjectorNode,
158
159
  X3D .X3DConstants .X3DViewpointNode,
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const
4
- X3DChildNodeTool = require ("../Core/X3DChildNodeTool"),
5
- Editor = require ("../../Undo/Editor");
3
+ const X3DChildNodeTool = require ("../Core/X3DChildNodeTool");
6
4
 
7
5
  class X3DEnvironmentalSensorNodeTool extends X3DChildNodeTool
8
6
  {
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ const
4
+ X3DEnvironmentalSensorNodeTool = require ("../EnvironmentalSensor/X3DEnvironmentalSensorNodeTool"),
5
+ ToolColors = require ("../Core/ToolColors");
6
+
7
+ class ViewpointGroupTool extends X3DEnvironmentalSensorNodeTool
8
+ {
9
+ toolBoxColor = ToolColors .PROXIMITY_SENSOR;
10
+ }
11
+
12
+ module .exports = ViewpointGroupTool;
@@ -18,16 +18,6 @@ module .exports = class Editor
18
18
  */
19
19
  static Id = /(?:^[^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*$|^$)/
20
20
 
21
- /**
22
- *
23
- * @param {X3DExecutionContext} executionContext source execution context
24
- * @returns {X3DScene} corresponding scene
25
- */
26
- static getScene (executionContext)
27
- {
28
- return executionContext instanceof X3D .X3DScene ? executionContext : executionContext .getScene ();
29
- }
30
-
31
21
  /**
32
22
  *
33
23
  * @param {X3DExecutionContext} executionContext source execution context
@@ -240,7 +230,7 @@ module .exports = class Editor
240
230
 
241
231
  const
242
232
  browser = executionContext .getBrowser (),
243
- scene = this .getScene (executionContext),
233
+ scene = executionContext .getLocalScene (),
244
234
  profile = scene .getProfile (),
245
235
  x_ite = scene .hasComponent ("X_ITE"),
246
236
  externprotos = new Map (Array .from (executionContext .externprotos, p => [p .getName (), p])),
@@ -742,7 +732,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
742
732
  */
743
733
  static addComponent (scene, name, undoManager = UndoManager .shared)
744
734
  {
745
- scene = this .getScene (scene);
735
+ scene = scene .getLocalScene ();
746
736
  name = name instanceof X3D .ComponentInfo ? name .name : name;
747
737
 
748
738
  if (scene .hasComponent (name))
@@ -770,7 +760,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
770
760
  */
771
761
  static removeComponent (scene, name, undoManager = UndoManager .shared)
772
762
  {
773
- scene = this .getScene (scene);
763
+ scene = scene .getLocalScene ();
774
764
  name = name instanceof X3D .ComponentInfo ? name .name : name;
775
765
 
776
766
  if (!scene .hasComponent (name))
@@ -2630,6 +2620,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
2630
2620
  return innerNode .getBBox (new X3D .Box3 ()) .multRight (modelMatrix);
2631
2621
  case X3D .X3DConstants .X3DGeometryNode:
2632
2622
  return innerNode .getBBox () .copy () .multRight (modelMatrix);
2623
+ case X3D .X3DConstants .ViewpointGroup:
2633
2624
  case X3D .X3DConstants .X3DEnvironmentalSensorNode:
2634
2625
  return new X3D .Box3 (innerNode ._size .getValue (), innerNode ._center .getValue ())
2635
2626
  .multRight (modelMatrix);