sunrize 2.1.8 → 2.1.10

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.
Files changed (62) hide show
  1. package/package.json +22 -14
  2. package/src/Application/ActionKeys.js +1 -1
  3. package/src/Application/DataStorage.js +1 -1
  4. package/src/Application/Document.js +1 -1
  5. package/src/Application/Footer.js +15 -15
  6. package/src/Application/Hierarchy.js +1 -1
  7. package/src/Application/Registry.js +1 -1
  8. package/src/Application/Selection.js +1 -1
  9. package/src/Application/Sidebar.js +16 -16
  10. package/src/Application/Tabs.js +2 -2
  11. package/src/Bits/MimeTypes.js +1 -1
  12. package/src/Controls/AnimationPropertiesPopover.js +3 -3
  13. package/src/Controls/Dialog.js +2 -2
  14. package/src/Controls/EditNodePopover.js +1 -1
  15. package/src/Controls/EditUserDefinedFieldPopover.js +13 -45
  16. package/src/Controls/ExportNodePopover.js +1 -1
  17. package/src/Controls/ImportNodePopover.js +1 -1
  18. package/src/Controls/RenameNodeInput.js +1 -1
  19. package/src/Controls/Splitter.js +2 -2
  20. package/src/Controls/Tabs.js +25 -25
  21. package/src/Controls/TexturePreviewPopover.js +3 -3
  22. package/src/Controls/VideoPreviewPopover.js +3 -3
  23. package/src/Editors/AnimationEditor.js +10 -10
  24. package/src/Editors/AnimationMemberList.js +1 -1
  25. package/src/Editors/FileManager.js +7 -7
  26. package/src/Editors/Library.js +2 -2
  27. package/src/Editors/OutlineEditor.js +37 -37
  28. package/src/Editors/OutlineRouteGraph.js +2 -2
  29. package/src/Editors/OutlineView.js +99 -97
  30. package/src/Editors/Panel.js +17 -10
  31. package/src/Editors/SceneProperties.js +8 -8
  32. package/src/Editors/ScriptEditor.js +7 -7
  33. package/src/Editors/Units.js +1 -1
  34. package/src/Parser/AudioParser.js +1 -1
  35. package/src/Parser/ImageParser.js +1 -1
  36. package/src/Parser/VideoParser.js +1 -1
  37. package/src/Tools/CADGeometry/CADAssemblyTool.js +4 -4
  38. package/src/Tools/CADGeometry/CADFaceTool.js +4 -4
  39. package/src/Tools/CADGeometry/CADLayerTool.js +4 -4
  40. package/src/Tools/CADGeometry/CADPartTool.js +4 -4
  41. package/src/Tools/Core/X3DBaseTool.js +1 -1
  42. package/src/Tools/Core/X3DNodeTool.js +3 -1
  43. package/src/Tools/Core/X3DPrototypeInstanceTool.js +1 -1
  44. package/src/Tools/Grouping/GroupTool.js +1 -1
  45. package/src/Tools/Grouping/StaticGroupTool.js +4 -4
  46. package/src/Tools/Grouping/SwitchTool.js +4 -4
  47. package/src/Tools/Grouping/TransformTool.js +4 -4
  48. package/src/Tools/Grouping/X3DTransformNodeTool.js +1 -1
  49. package/src/Tools/HAnim/HAnimHumanoidTool.js +4 -4
  50. package/src/Tools/HAnim/HAnimJointTool.js +4 -4
  51. package/src/Tools/HAnim/HAnimSegmentTool.js +4 -4
  52. package/src/Tools/HAnim/HAnimSiteTool.js +4 -4
  53. package/src/Tools/Layering/LayerTool.js +3 -3
  54. package/src/Tools/Layering/ViewportTool.js +1 -1
  55. package/src/Tools/Networking/AnchorTool.js +4 -4
  56. package/src/Tools/Networking/InlineGeometryTool.js +1 -1
  57. package/src/Tools/Networking/InlineTool.js +4 -4
  58. package/src/Undo/Editor.js +68 -68
  59. package/src/Undo/UndoManager.js +1 -1
  60. package/src/assets/X3DUOM.xml +30 -50
  61. package/src/assets/images/OutlineEditor/Fields/MFQuaternion.svg +199 -0
  62. package/src/assets/images/OutlineEditor/Fields/SFQuaternion.svg +199 -0
@@ -520,7 +520,7 @@ module .exports = class AnimationEditor extends Interface
520
520
 
521
521
  const
522
522
  timeSensor = this .timeSensor,
523
- executionContext = timeSensor .getExecutionContext ()
523
+ executionContext = timeSensor .getExecutionContext ();
524
524
 
525
525
  Editor .setFieldValue (executionContext, timeSensor, timeSensor ._cycleInterval, newDuration / newFrameRate);
526
526
 
@@ -561,7 +561,7 @@ module .exports = class AnimationEditor extends Interface
561
561
  this .setCurrentFrame (Math .min (this .getCurrentFrame (), newDuration));
562
562
  }
563
563
 
564
- this .updateInterpolators ()
564
+ this .updateInterpolators ();
565
565
  this .registerZoomFit ();
566
566
 
567
567
  Editor .undoManager .endUndo ();
@@ -595,7 +595,7 @@ module .exports = class AnimationEditor extends Interface
595
595
  .replace (/([A-Z][a-z]+)/g, " $1")
596
596
  .replace (/\s+/g, " ")
597
597
  .trim ();
598
- }
598
+ };
599
599
 
600
600
  Editor .undoManager .beginUndo (_("Rename Animation"));
601
601
 
@@ -873,7 +873,7 @@ module .exports = class AnimationEditor extends Interface
873
873
  Editor .undoManager .beginUndo (_("Add Interpolators to »%s«"), this .animation .getDisplayName ());
874
874
 
875
875
  for (const { node, field, typeName } of keyframes)
876
- this .getInterpolator (node, field, typeName)
876
+ this .getInterpolator (node, field, typeName);
877
877
 
878
878
  Editor .undoManager .endUndo ();
879
879
 
@@ -1025,7 +1025,7 @@ module .exports = class AnimationEditor extends Interface
1025
1025
  Editor .undoManager .beginUndo (_("Update Interpolators"));
1026
1026
 
1027
1027
  for (const interpolator of this .interpolators)
1028
- this .updateInterpolator (interpolator)
1028
+ this .updateInterpolator (interpolator);
1029
1029
 
1030
1030
  Editor .undoManager .endUndo ();
1031
1031
  }
@@ -1868,14 +1868,14 @@ module .exports = class AnimationEditor extends Interface
1868
1868
  if (selectionRange [0] === selectionRange [1])
1869
1869
  {
1870
1870
  if (this .getCurrentFrame () === this .getDuration ())
1871
- this .firstFrame ()
1871
+ this .firstFrame ();
1872
1872
  else
1873
1873
  this .setCurrentFrame (Math .min (this .getCurrentFrame () + 1, this .getDuration ()));
1874
1874
  }
1875
1875
  else
1876
1876
  {
1877
1877
  if (this .getCurrentFrame () >= selectionRange [1])
1878
- this .firstFrame ()
1878
+ this .firstFrame ();
1879
1879
  else
1880
1880
  this .setCurrentFrame (Math .min (this .getCurrentFrame () + 1, this .getDuration ()));
1881
1881
  }
@@ -2976,7 +2976,7 @@ module .exports = class AnimationEditor extends Interface
2976
2976
  {
2977
2977
  case "main":
2978
2978
  {
2979
- const fields = new Set (this .fields .keys ())
2979
+ const fields = new Set (this .fields .keys ());
2980
2980
 
2981
2981
  this .drawSelectedKeyframes (context, fields, bottom - this .TRACK_PADDING, red);
2982
2982
  break;
@@ -3081,7 +3081,7 @@ module .exports = class AnimationEditor extends Interface
3081
3081
  for (const { field, interpolator, index } of this .getSelectedKeyframes ())
3082
3082
  {
3083
3083
  if (!fields .has (field))
3084
- continue
3084
+ continue;
3085
3085
 
3086
3086
  this .#defaultIntegers .length = 0;
3087
3087
 
@@ -3117,4 +3117,4 @@ module .exports = class AnimationEditor extends Interface
3117
3117
 
3118
3118
  return this .#params [index] ?.[1] ?? [1, 5];
3119
3119
  }
3120
- }
3120
+ };
@@ -530,7 +530,7 @@ module .exports = class AnimationMembersList extends Interface
530
530
 
531
531
  isRunning ()
532
532
  {
533
- return this .#timeSensor ._isActive .getValue () && !this .#timeSensor ._isPaused .getValue ()
533
+ return this .#timeSensor ._isActive .getValue () && !this .#timeSensor ._isPaused .getValue ();
534
534
  }
535
535
 
536
536
  connectNodes ()
@@ -1,18 +1,18 @@
1
- "use strict"
1
+ "use strict";
2
2
 
3
3
  const
4
- Interface = require ("../Application/Interface")
4
+ Interface = require ("../Application/Interface");
5
5
 
6
6
  module .exports = class FileManager extends Interface
7
7
  {
8
8
  constructor (element)
9
9
  {
10
- super (`Sunrize.FileManager.${element .attr ("id")}.`)
10
+ super (`Sunrize.FileManager.${element .attr ("id")}.`);
11
11
 
12
- this .fileManager = element
12
+ this .fileManager = element;
13
13
 
14
- this .fileManager .text ("File Manager")
14
+ this .fileManager .text ("File Manager");
15
15
 
16
- this .setup ()
16
+ this .setup ();
17
17
  }
18
- }
18
+ };
@@ -150,7 +150,7 @@ module .exports = new class Library extends Dialog
150
150
  if (element .hasClass ("component"))
151
151
  {
152
152
  if (hidden === nodes)
153
- element .addClass ("hidden")
153
+ element .addClass ("hidden");
154
154
  else
155
155
  element .removeClass ("hidden");
156
156
 
@@ -265,4 +265,4 @@ module .exports = new class Library extends Dialog
265
265
  outlineEditor .expandTo (node);
266
266
  outlineEditor .selectNodeElement ($(`.node[node-id=${node .getId ()}]`), { target: true });
267
267
  }
268
- }
268
+ };
@@ -611,7 +611,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
611
611
  enabled: !(protoNode .isExternProto && executionContext .protos .get (protoNode .getName ())),
612
612
  args: ["addInstance", element .attr ("id"), executionContext .getId (), protoNode .getId ()],
613
613
  },
614
- ]
614
+ ];
615
615
  }
616
616
 
617
617
  else if (element .is ("#outline-editor, .proto-scene, .description.externprotos, .description.protos, .description.root-nodes, .description.empty-scene"))
@@ -802,9 +802,9 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
802
802
  proto = this .objects .get (protoId),
803
803
  protoField = this .objects .get (protoFieldId),
804
804
  node = this .objects .get (nodeId),
805
- field = this .objects .get (fieldId)
805
+ field = this .objects .get (fieldId);
806
806
 
807
- Editor .addReference (proto, protoField, node, field)
807
+ Editor .addReference (proto, protoField, node, field);
808
808
  }
809
809
 
810
810
  removeReference (protoId, protoFieldId, nodeId, fieldId)
@@ -813,9 +813,9 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
813
813
  proto = this .objects .get (protoId),
814
814
  protoField = this .objects .get (protoFieldId),
815
815
  node = this .objects .get (nodeId),
816
- field = this .objects .get (fieldId)
816
+ field = this .objects .get (fieldId);
817
817
 
818
- Editor .removeReference (proto, protoField, node, field)
818
+ Editor .removeReference (proto, protoField, node, field);
819
819
  }
820
820
 
821
821
  resetToDefaultValue (id, executionContextId, nodeId, fieldId)
@@ -943,7 +943,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
943
943
  primary = $(":is(.node, .proto, .externproto).primary"),
944
944
  selected = this .sceneGraph .find (":is(.node, .proto, .externproto).manually"),
945
945
  selection = selected .filter (primary) .length ? selected : primary,
946
- ids = selection .map (function () { return this .id }) .get (),
946
+ ids = selection .map (function () { return this .id; }) .get (),
947
947
  elements = ids .map (id => $(`#${id}`)),
948
948
  nodes = elements .map (element => this .getNode ($(element)));
949
949
 
@@ -961,7 +961,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
961
961
  primary = $(":is(.node, .proto, .externproto, .imported-node.proxy).primary"),
962
962
  selected = this .sceneGraph .find (":is(.node, .proto, .externproto, .imported-node.proxy).manually"),
963
963
  selection = selected .filter (primary) .length ? selected : primary,
964
- ids = selection .map (function () { return this .id }) .get (),
964
+ ids = selection .map (function () { return this .id; }) .get (),
965
965
  elements = ids .map (id => $(`#${id}`)),
966
966
  nodes = elements .map (element => this .getNode ($(element))),
967
967
  undoManager = new UndoManager ();
@@ -1106,7 +1106,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
1106
1106
  primary = $(".node.primary, .imported-node.proxy.primary"),
1107
1107
  selected = this .sceneGraph .find (".node.manually, .imported-node.proxy.manually"),
1108
1108
  selection = !primary .length || selected .filter (primary) .length ? selected : primary,
1109
- ids = selection .map (function () { return this .id }) .get ();
1109
+ ids = selection .map (function () { return this .id; }) .get ();
1110
1110
 
1111
1111
  if (ids .length > 1)
1112
1112
  UndoManager .shared .beginUndo (_("Delete %s Nodes"), ids .length);
@@ -1357,7 +1357,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
1357
1357
  {
1358
1358
  const
1359
1359
  selection = this .sceneGraph .find (".node.primary, .node.manually"),
1360
- ids = selection .map (function () { return this .id }) .get (),
1360
+ ids = selection .map (function () { return this .id; }) .get (),
1361
1361
  nodes = ids .length ? ids .map (id => this .getNode ($(`#${id}`))) : this .executionContext .rootNodes;
1362
1362
 
1363
1363
  Editor .removeEmptyGroups (this .executionContext, nodes);
@@ -1490,7 +1490,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
1490
1490
 
1491
1491
  UndoManager .shared .beginUndo (_("Convert Node to PhysicalMaterial"));
1492
1492
 
1493
- const physicalMaterialNode = Editor .convertPhongToPhysical (executionContext, new X3D .SFNode (materialNode))
1493
+ const physicalMaterialNode = Editor .convertPhongToPhysical (executionContext, new X3D .SFNode (materialNode));
1494
1494
 
1495
1495
  if (materialNode .getName ())
1496
1496
  Editor .updateNamedNode (executionContext, materialNode .getName (), physicalMaterialNode);
@@ -2686,25 +2686,25 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2686
2686
  element = $(event .currentTarget) .closest (".field", this .sceneGraph),
2687
2687
  field = this .getField (element),
2688
2688
  sceneElement = element .closest (".scene"),
2689
- executionContext = this .getNode (sceneElement)
2689
+ executionContext = this .getNode (sceneElement);
2690
2690
 
2691
2691
  if (!this .isEditable (element .parent ()))
2692
- return
2692
+ return;
2693
2693
 
2694
2694
  if (this .connector)
2695
2695
  {
2696
2696
  if (this .connector .type === type)
2697
- return
2697
+ return;
2698
2698
 
2699
2699
  if (this .connector .executionContext !== executionContext)
2700
- return
2700
+ return;
2701
2701
 
2702
2702
  if (this .connector .field .getType () !== field .getType ())
2703
- return
2703
+ return;
2704
2704
  }
2705
2705
 
2706
2706
  element .find ("> .item .access-type img.active." + type)
2707
- .addClass ("activated")
2707
+ .addClass ("activated");
2708
2708
  }
2709
2709
 
2710
2710
  hoverOutConnector (type, event)
@@ -2713,44 +2713,44 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2713
2713
 
2714
2714
  const
2715
2715
  element = $(event .currentTarget) .closest (".field", this .sceneGraph),
2716
- field = this .getField (element)
2716
+ field = this .getField (element);
2717
2717
 
2718
2718
  if (!this .isEditable (element .parent ()))
2719
- return
2719
+ return;
2720
2720
 
2721
2721
  if (this .connector)
2722
2722
  {
2723
2723
  if (this .connector .type === type)
2724
2724
  {
2725
2725
  if (this .connector .field === field)
2726
- return
2726
+ return;
2727
2727
  }
2728
2728
  }
2729
2729
 
2730
2730
  element .find ("> .item .access-type img.active." + type)
2731
- .removeClass ("activated")
2731
+ .removeClass ("activated");
2732
2732
  }
2733
2733
 
2734
2734
  hoverInSingleConnector (type, event)
2735
2735
  {
2736
- const element = $(event .currentTarget) .closest (".route", this .sceneGraph)
2736
+ const element = $(event .currentTarget) .closest (".route", this .sceneGraph);
2737
2737
 
2738
2738
  if (!this .isEditable (element .parent ()))
2739
- return
2739
+ return;
2740
2740
 
2741
2741
  element .find (".access-type img")
2742
- .addClass ("activated")
2742
+ .addClass ("activated");
2743
2743
  }
2744
2744
 
2745
2745
  hoverOutSingleConnector (type, event)
2746
2746
  {
2747
- const element = $(event .currentTarget) .closest (".route", this .sceneGraph)
2747
+ const element = $(event .currentTarget) .closest (".route", this .sceneGraph);
2748
2748
 
2749
2749
  if (!this .isEditable (element .parent ()))
2750
- return
2750
+ return;
2751
2751
 
2752
2752
  element .find (".access-type img")
2753
- .removeClass ("activated")
2753
+ .removeClass ("activated");
2754
2754
  }
2755
2755
 
2756
2756
  selectConnector (type, event)
@@ -2780,7 +2780,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2780
2780
  {
2781
2781
  case 0:
2782
2782
  {
2783
- break
2783
+ break;
2784
2784
  }
2785
2785
  case 1:
2786
2786
  {
@@ -2801,7 +2801,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2801
2801
  }
2802
2802
  }
2803
2803
 
2804
- break
2804
+ break;
2805
2805
  }
2806
2806
  case "output":
2807
2807
  {
@@ -2811,7 +2811,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2811
2811
  {
2812
2812
  case 0:
2813
2813
  {
2814
- break
2814
+ break;
2815
2815
  }
2816
2816
  case 1:
2817
2817
  {
@@ -2877,7 +2877,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2877
2877
  this .connector = { type, executionContext, node, field, element };
2878
2878
  }
2879
2879
 
2880
- break
2880
+ break;
2881
2881
  }
2882
2882
  case "output":
2883
2883
  {
@@ -2941,7 +2941,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2941
2941
  {
2942
2942
  case "input":
2943
2943
  {
2944
- const route = this .getRoute (element, field .getInputRoutes ())
2944
+ const route = this .getRoute (element, field .getInputRoutes ());
2945
2945
 
2946
2946
  Editor .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField);
2947
2947
  break;
@@ -2966,7 +2966,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2966
2966
  element = $(event .target) .closest (".externproto", this .sceneGraph),
2967
2967
  selected = this .sceneGraph .find (".externproto.manually"),
2968
2968
  selection = selected .filter (element) .length ? selected : element,
2969
- ids = selection .map (function () { return this .id }) .get ();
2969
+ ids = selection .map (function () { return this .id; }) .get ();
2970
2970
 
2971
2971
  this .selectPrimaryElement (element);
2972
2972
 
@@ -2979,7 +2979,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2979
2979
  element = $(event .target) .closest (".proto", this .sceneGraph),
2980
2980
  selected = this .sceneGraph .find (".proto.manually"),
2981
2981
  selection = selected .filter (element) .length ? selected : element,
2982
- ids = selection .map (function () { return this .id }) .get ();
2982
+ ids = selection .map (function () { return this .id; }) .get ();
2983
2983
 
2984
2984
  this .selectPrimaryElement (element);
2985
2985
 
@@ -2992,7 +2992,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2992
2992
  element = $(event .target) .closest (".node", this .sceneGraph),
2993
2993
  selected = this .sceneGraph .find (".node.manually"),
2994
2994
  selection = selected .filter (element) .length ? selected : element,
2995
- ids = selection .map (function () { return this .id }) .get ();
2995
+ ids = selection .map (function () { return this .id; }) .get ();
2996
2996
 
2997
2997
  this .selectPrimaryElement (element);
2998
2998
 
@@ -3024,7 +3024,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
3024
3024
  element = $(event .target) .closest (".imported-node", this .sceneGraph),
3025
3025
  selected = this .sceneGraph .find (".imported-node.manually"),
3026
3026
  selection = selected .filter (element) .length ? selected : element,
3027
- ids = selection .map (function () { return this .id }) .get ();
3027
+ ids = selection .map (function () { return this .id; }) .get ();
3028
3028
 
3029
3029
  if (element .closest (".imported-nodes") .length)
3030
3030
  {
@@ -3706,7 +3706,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
3706
3706
  destinationElement = $(event .target) .closest (".field", this .sceneGraph),
3707
3707
  destinationField = this .getField (destinationElement);
3708
3708
 
3709
- let destinationIndex = sourceFields .indexOf (destinationField)
3709
+ let destinationIndex = sourceFields .indexOf (destinationField);
3710
3710
 
3711
3711
  if (destinationElement .data ("drag-type") ==="drag-after")
3712
3712
  ++ destinationIndex;
@@ -3779,4 +3779,4 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
3779
3779
 
3780
3780
  return modelMatrix;
3781
3781
  }
3782
- }
3782
+ };
@@ -178,7 +178,7 @@ module .exports = class OutlineRouteGraph extends OutlineView
178
178
  context .stroke ();
179
179
  }
180
180
 
181
- break
181
+ break;
182
182
  }
183
183
  case X3D .X3DConstants .outputOnly:
184
184
  {
@@ -192,7 +192,7 @@ module .exports = class OutlineRouteGraph extends OutlineView
192
192
  context .stroke ();
193
193
  }
194
194
 
195
- break
195
+ break;
196
196
  }
197
197
  case X3D .X3DConstants .inputOutput:
198
198
  {