sunrize 1.7.58 → 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.58",
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.0",
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",
@@ -99,7 +99,7 @@
99
99
  "jquery-ui-dist": "^1.13.3",
100
100
  "jstree": "^3.3.17",
101
101
  "material-icons": "^1.13.14",
102
- "material-symbols": "^0.29.0",
102
+ "material-symbols": "^0.29.1",
103
103
  "md5": "^2.3.0",
104
104
  "mime-types": "^2.1.35",
105
105
  "monaco-editor": "^0.50.0",
@@ -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.1",
113
- "x3d-traverse": "^1.0.9"
112
+ "x_ite": "^11.4.0",
113
+ "x3d-traverse": "^1.0.10"
114
114
  }
115
115
  }
@@ -9,6 +9,8 @@ function StaticGroup (executionContext)
9
9
 
10
10
  this .addType (X3D .X3DConstants .StaticGroup);
11
11
 
12
+ // Private properties
13
+
12
14
  this .groupNode = new X3D .Group (this .getExecutionContext ());
13
15
  }
14
16
 
@@ -30,7 +32,7 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, X3D .X3DChildNod
30
32
  this .groupNode .setPrivate (true);
31
33
  this .groupNode .setup ();
32
34
 
33
- this .connectChildNode (this .groupNode);
35
+ this .connectChildNode (this .groupNode, [X3D .TraverseType .CAMERA]);
34
36
  },
35
37
  getBBox (bbox, shadows)
36
38
  {
@@ -52,22 +54,27 @@ Object .defineProperties (StaticGroup,
52
54
  typeName:
53
55
  {
54
56
  value: X3D .StaticGroup .typeName,
57
+ enumerable: true,
55
58
  },
56
59
  componentInfo:
57
60
  {
58
61
  value: X3D .StaticGroup .componentInfo,
62
+ enumerable: true,
59
63
  },
60
64
  containerField:
61
65
  {
62
66
  value: X3D .StaticGroup .containerField,
67
+ enumerable: true,
63
68
  },
64
69
  specificationRange:
65
70
  {
66
71
  value: X3D .StaticGroup .specificationRange,
72
+ enumerable: true,
67
73
  },
68
74
  fieldDefinitions:
69
75
  {
70
76
  value: X3D .StaticGroup .fieldDefinitions,
77
+ enumerable: true,
71
78
  },
72
79
  });
73
80
 
@@ -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,
@@ -274,9 +275,12 @@ module .exports = class OutlineView extends Interface
274
275
  .attr ("draggable", "true")
275
276
  .on ("dragstart", this .onDragStartProto .bind (this));
276
277
 
277
- child .find (".node > .item")
278
- .attr ("draggable", "true")
279
- .on ("dragstart", this .onDragStartNode .bind (this));
278
+ if (this .getField (parent) ?.getAccessType () !== X3D .X3DConstants .outputOnly)
279
+ {
280
+ child .find (".node > .item")
281
+ .attr ("draggable", "true")
282
+ .on ("dragstart", this .onDragStartNode .bind (this));
283
+ }
280
284
  }
281
285
 
282
286
  child .find (".externproto .name, .externproto .icon, .proto .name, .proto .icon, .node .name, .node .icon")
@@ -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
  {
@@ -25,6 +23,11 @@ class X3DEnvironmentalSensorNodeTool extends X3DChildNodeTool
25
23
  this .undoSaveInitialValues (["size", "center"]);
26
24
  }
27
25
 
26
+ isBoundedObject ()
27
+ {
28
+ return true;
29
+ }
30
+
28
31
  getBBox (bbox, shadows)
29
32
  {
30
33
  if (shadows)
@@ -17,6 +17,11 @@ class X3DLightNodeTool extends X3DChildNodeTool
17
17
  this .tool .getField ("isActive") .addInterest ("handleUndo", this);
18
18
  }
19
19
 
20
+ isBoundedObject ()
21
+ {
22
+ return true;
23
+ }
24
+
20
25
  getBBox (bbox, shadows)
21
26
  {
22
27
  return this .getToolBBox (bbox, shadows);
@@ -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;
@@ -32,6 +32,11 @@ class X3DViewpointNodeTool extends X3DChildNodeTool
32
32
  this .undoSaveInitialValues (["position", "orientation"]);
33
33
  }
34
34
 
35
+ isBoundedObject ()
36
+ {
37
+ return true;
38
+ }
39
+
35
40
  getBBox (bbox, shadows)
36
41
  {
37
42
  return this .getToolBBox (bbox, shadows);
@@ -21,6 +21,11 @@ class ListenerPointSourceTool extends X3DChildNodeTool
21
21
  this .undoSaveInitialValues (["position", "orientation"]);
22
22
  }
23
23
 
24
+ isBoundedObject ()
25
+ {
26
+ return true;
27
+ }
28
+
24
29
  getBBox (bbox, shadows)
25
30
  {
26
31
  return this .getToolBBox (bbox, shadows);
@@ -66,6 +66,11 @@ class SoundTool extends X3DChildNodeTool
66
66
  }
67
67
  }
68
68
 
69
+ isBoundedObject ()
70
+ {
71
+ return true;
72
+ }
73
+
69
74
  getBBox (bbox, shadows)
70
75
  {
71
76
  return this .getToolBBox (bbox, shadows);
@@ -24,6 +24,11 @@ class SpatialSoundTool extends X3DChildNodeTool
24
24
  this .undoSaveInitialValues (["location", "direction"]);
25
25
  }
26
26
 
27
+ isBoundedObject ()
28
+ {
29
+ return true;
30
+ }
31
+
27
32
  getBBox (bbox, shadows)
28
33
  {
29
34
  return this .getToolBBox (bbox, shadows);
@@ -26,6 +26,11 @@ class X3DTextureProjectorNodeTool extends X3DChildNodeTool
26
26
  this .undoSaveInitialValues (["location", "direction", "upVector"]);
27
27
  }
28
28
 
29
+ isBoundedObject ()
30
+ {
31
+ return true;
32
+ }
33
+
29
34
  getBBox (bbox, shadows)
30
35
  {
31
36
  return this .getToolBBox (bbox, shadows);
@@ -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);