sunrize 2.1.21 → 2.3.0

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 (58) hide show
  1. package/package.json +7 -7
  2. package/src/Application/Application.js +42 -27
  3. package/src/Application/Dashboard.js +33 -0
  4. package/src/Application/Document.js +122 -67
  5. package/src/Application/Footer.js +8 -3
  6. package/src/Application/GetText.js +20 -2
  7. package/src/Application/Interface.js +1 -1
  8. package/src/Application/Tabs.js +384 -49
  9. package/src/Application/TopBar.js +32 -0
  10. package/src/Controls/AddPrototypePopover.js +2 -1
  11. package/src/Controls/AnimationPropertiesPopover.js +3 -4
  12. package/src/Controls/AudioPreviewPopover.js +2 -8
  13. package/src/Controls/EditNodePopover.js +4 -1
  14. package/src/Controls/EditUserDefinedFieldPopover.js +4 -1
  15. package/src/Controls/ExportNodePopover.js +3 -1
  16. package/src/Controls/ImportNodePopover.js +3 -1
  17. package/src/Controls/Tabs.js +28 -2
  18. package/src/Controls/TexturePreviewPopover.js +5 -5
  19. package/src/Controls/VideoPreviewPopover.js +5 -8
  20. package/src/Controls/VolumeSliderPopover.js +41 -0
  21. package/src/Editors/AnimationEditor.js +19 -5
  22. package/src/Editors/BrowserFrame.js +40 -26
  23. package/src/Editors/Console.js +4 -1
  24. package/src/Editors/NodeList.js +2 -2
  25. package/src/Editors/SceneProperties.js +7 -3
  26. package/src/Editors/ScriptEditor.js +2 -1
  27. package/src/Parser/AudioParser.js +2 -2
  28. package/src/Parser/VideoParser.js +2 -3
  29. package/src/Tools/Core/X3DNodeTool.js +3 -3
  30. package/src/Tools/Core/X3DPrototypeInstanceTool.js +2 -0
  31. package/src/Tools/Grids/AxonometricGridTool.js +1 -1
  32. package/src/Tools/Grids/X3DGridNodeTool.js +7 -13
  33. package/src/Tools/Grouping/X3DBoundedObjectTool.x3d +4 -2
  34. package/src/Tools/Grouping/X3DTransformNodeTool.x3d +4 -2
  35. package/src/Tools/Rendering/X3DGeometryNodeTool.x3d +4 -3
  36. package/src/Tools/Shaders/ToolShader.x3d +6 -6
  37. package/src/Undo/Editor.js +81 -79
  38. package/src/assets/html/application-template.html +95 -27
  39. package/src/assets/html/application.html +95 -27
  40. package/src/assets/html/window-template.html +2 -1
  41. package/src/assets/html/window.html +2 -1
  42. package/src/assets/images/seti/audio.svg +44 -0
  43. package/src/assets/images/seti/default.svg +36 -0
  44. package/src/assets/images/seti/html.svg +37 -0
  45. package/src/assets/images/seti/image.svg +37 -0
  46. package/src/assets/images/seti/json.svg +37 -0
  47. package/src/assets/images/seti/obj.svg +50 -0
  48. package/src/assets/images/seti/others.svg +50 -0
  49. package/src/assets/images/seti/ply.svg +50 -0
  50. package/src/assets/images/seti/sog.svg +57 -0
  51. package/src/assets/images/seti/spz.svg +57 -0
  52. package/src/assets/images/seti/stl.svg +50 -0
  53. package/src/assets/images/seti/svg.svg +41 -0
  54. package/src/assets/images/seti/video.svg +36 -0
  55. package/src/assets/images/seti/vrml.svg +34 -0
  56. package/src/assets/locale/dictionary.json +43 -0
  57. package/src/assets/themes/default.css +312 -216
  58. package/src/assets/themes/system-colors.css +11 -11
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  const
4
- X3D = require ("../X3D"),
5
4
  util = require ("util"),
6
5
  $ = require ("jquery"),
7
6
  _ = require ("../Application/GetText");
@@ -50,7 +49,7 @@ $.fn.animationPropertiesPopover = function (editor)
50
49
  if (editor .config .file .scaleKeyframes)
51
50
  scaleInput .attr ("checked", "");
52
51
 
53
- const scaleLabel = $("<label></label>")
52
+ $("<label></label>")
54
53
  .attr ("for", "keyframe-scale")
55
54
  .text (_("Scale Keyframes"))
56
55
  .appendTo (content);
@@ -77,7 +76,7 @@ $.fn.animationPropertiesPopover = function (editor)
77
76
 
78
77
  // Create tooltip.
79
78
 
80
- const tooltip = this .popover ({
79
+ this .popover ({
81
80
  position: {
82
81
  my: "bottom right",
83
82
  at: "top left",
@@ -95,7 +94,7 @@ $.fn.animationPropertiesPopover = function (editor)
95
94
  api .toggle (false);
96
95
  });
97
96
 
98
- applyButton .on ("click", (event) =>
97
+ applyButton .on ("click", (/* event */) =>
99
98
  {
100
99
  api .toggle (false);
101
100
  editor .resizeAnimation (parseInt (durationInput .val ()), parseInt (frameRateInput .val ()), scaleInput .prop ("checked"));
@@ -1,12 +1,6 @@
1
1
  "use strict";
2
2
 
3
- const
4
- $ = require ("jquery"),
5
- path = require ("path"),
6
- X3D = require ("../X3D"),
7
- Editor = require ("../Undo/Editor"),
8
- UndoManager = require("../Undo/UndoManager"),
9
- _ = require ("../Application/GetText");
3
+ const $ = require ("jquery");
10
4
 
11
5
  require ("./Popover");
12
6
 
@@ -44,7 +38,7 @@ $.fn.audioPreviewPopover = async function (node)
44
38
 
45
39
  // Create tooltip.
46
40
 
47
- const tooltip = this .popover ({
41
+ this .popover ({
48
42
  preview: true,
49
43
  content: preview,
50
44
  show: {
@@ -20,6 +20,7 @@ $.fn.editNodePopover = function (node)
20
20
 
21
21
  const nameInput = $("<input></input>")
22
22
  .attr ("placeholder", _("Enter a name"))
23
+ .attr ("spellcheck", "true")
23
24
  .appendTo (content);
24
25
 
25
26
  if (node instanceof X3D .X3DProtoDeclaration)
@@ -31,6 +32,7 @@ $.fn.editNodePopover = function (node)
31
32
  $("<input></input>")
32
33
  .addClass ("appinfo")
33
34
  .attr ("placeholder", _("Enter application information"))
35
+ .attr ("spellcheck", "true")
34
36
  .val (node .getAppInfo ())
35
37
  .appendTo (content);
36
38
 
@@ -41,6 +43,7 @@ $.fn.editNodePopover = function (node)
41
43
  $("<input></input>")
42
44
  .addClass ("documentation")
43
45
  .attr ("placeholder", _("Enter documentation"))
46
+ .attr ("spellcheck", "true")
44
47
  .val (node .getDocumentation ())
45
48
  .appendTo (content);
46
49
  }
@@ -50,7 +53,7 @@ $.fn.editNodePopover = function (node)
50
53
 
51
54
  // Create tooltip.
52
55
 
53
- const tooltip = this .popover ({
56
+ this .popover ({
54
57
  content: content,
55
58
  extension:
56
59
  {
@@ -66,6 +66,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
66
66
 
67
67
  const nameInput = $("<input></input>")
68
68
  .attr ("placeholder", _("Enter a name"))
69
+ .attr ("spellcheck", "true")
69
70
  .appendTo (content);
70
71
 
71
72
  if (field instanceof X3D .X3DField)
@@ -89,6 +90,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
89
90
  $("<input></input>")
90
91
  .addClass ("appinfo")
91
92
  .attr ("placeholder", _("Enter application information"))
93
+ .attr ("spellcheck", "true")
92
94
  .val (field .getAppInfo ())
93
95
  .appendTo (content);
94
96
 
@@ -99,6 +101,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
99
101
  $("<input></input>")
100
102
  .addClass ("documentation")
101
103
  .attr ("placeholder", _("Enter documentation"))
104
+ .attr ("spellcheck", "true")
102
105
  .val (field .getDocumentation ())
103
106
  .appendTo (content);
104
107
  }
@@ -129,7 +132,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
129
132
  wide: field instanceof X3D .X3DField,
130
133
  },
131
134
  events: {
132
- show (event, api)
135
+ show (/* event, api */)
133
136
  {
134
137
  nameInput .off () .validate (Editor .Id, () =>
135
138
  {
@@ -23,6 +23,7 @@ $.fn.exportNodePopover = function (node, oldExportedName, oldDescription = "")
23
23
 
24
24
  const nameInput = $("<input></input>")
25
25
  .attr ("placeholder", _("Enter exported name"))
26
+ .attr ("spellcheck", "true")
26
27
  .val (oldExportedName || scene .getUniqueExportName (node .getName ()))
27
28
  .appendTo (content);
28
29
 
@@ -32,12 +33,13 @@ $.fn.exportNodePopover = function (node, oldExportedName, oldDescription = "")
32
33
 
33
34
  const descriptionInput = $("<input></input>")
34
35
  .attr ("placeholder", _("Enter description"))
36
+ .attr ("spellcheck", "true")
35
37
  .val (oldDescription)
36
38
  .appendTo (content);
37
39
 
38
40
  // Create tooltip.
39
41
 
40
- const tooltip = this .popover ({
42
+ this .popover ({
41
43
  content: content,
42
44
  extension:
43
45
  {
@@ -23,6 +23,7 @@ $.fn.importNodePopover = function (inlineNode, exportedName, oldImportedName, ol
23
23
 
24
24
  const nameInput = $("<input></input>")
25
25
  .attr ("placeholder", _("Enter imported name"))
26
+ .attr ("spellcheck", "true")
26
27
  .val (oldImportedName || executionContext .getUniqueImportName (exportedName))
27
28
  .appendTo (content);
28
29
 
@@ -32,12 +33,13 @@ $.fn.importNodePopover = function (inlineNode, exportedName, oldImportedName, ol
32
33
 
33
34
  const descriptionInput = $("<input></input>")
34
35
  .attr ("placeholder", _("Enter description"))
36
+ .attr ("spellcheck", "true")
35
37
  .val (oldDescription)
36
38
  .appendTo (content);
37
39
 
38
40
  // Create tooltip.
39
41
 
40
- const tooltip = this .popover ({
42
+ this .popover ({
41
43
  content: content,
42
44
  extension:
43
45
  {
@@ -55,18 +55,22 @@ module .exports = class Tabs extends Interface
55
55
  {
56
56
  const tab = $("<li></li>")
57
57
  .append ($("<a></a>")
58
+ .addClass ("text")
58
59
  .attr ("href", `#${id}-tab`)
59
60
  .attr ("title", title)
60
61
  .text (title))
61
62
  .appendTo (this .tabs);
62
63
 
63
64
  this .addPanel (id);
65
+
66
+ return tab;
64
67
  }
65
68
 
66
69
  addIconTab (id, icon, title)
67
70
  {
68
- $("<li></li>")
71
+ const tab = $("<li></li>")
69
72
  .append ($("<a></a>")
73
+ .addClass ("icon")
70
74
  .attr ("href", `#${id}-tab`)
71
75
  .attr ("title", title)
72
76
  .append ($("<span></span>")
@@ -75,6 +79,27 @@ module .exports = class Tabs extends Interface
75
79
  .appendTo (this .tabs);
76
80
 
77
81
  this .addPanel (id);
82
+
83
+ return tab;
84
+ }
85
+
86
+ addIconTextTab (id, icon, title)
87
+ {
88
+ const tab = $("<li></li>")
89
+ .append ($("<a></a>")
90
+ .addClass ("icon-text")
91
+ .attr ("href", `#${id}-tab`)
92
+ .attr ("title", title)
93
+ .attr ("ondragstart", "return false;")
94
+ .text (title)
95
+ .prepend ($("<span></span>")
96
+ .addClass ("material-icons")
97
+ .text (icon)))
98
+ .appendTo (this .tabs);
99
+
100
+ this .addPanel (id);
101
+
102
+ return tab;
78
103
  }
79
104
 
80
105
  addPanel (id)
@@ -92,5 +117,6 @@ module .exports = class Tabs extends Interface
92
117
  return this .element .find (`.tabs-panel.${id}`);
93
118
  }
94
119
 
95
- initTab (panel) { }
120
+ initTab ()
121
+ { }
96
122
  };
@@ -114,22 +114,22 @@ $.fn.texturePreviewPopover = async function (node)
114
114
  {
115
115
  case X3D .X3DConstants .MovieTexture:
116
116
  {
117
- sizes .text (`${node .getWidth ()} × ${node .getHeight ()}, ${formatTime (node ._duration_changed .getValue ())}, ${format}`);
117
+ sizes .text (`${node .getWidth ()} × ${node .getHeight ()} px, ${formatTime (node ._duration_changed .getValue ())}, ${format}`);
118
118
  break;
119
119
  }
120
120
  case X3D .X3DConstants .X3DEnvironmentTextureNode:
121
121
  {
122
- sizes .text (`${node .getSize ()} × ${node .getSize ()}, ${format}`);
122
+ sizes .text (`${node .getSize ()} × ${node .getSize ()} px, ${format}`);
123
123
  break;
124
124
  }
125
125
  case X3D .X3DConstants .X3DTexture2DNode:
126
126
  {
127
- sizes .text (`${node .getWidth ()} × ${node .getHeight ()}, ${format}`);
127
+ sizes .text (`${node .getWidth ()} × ${node .getHeight ()} px, ${format}`);
128
128
  break;
129
129
  }
130
130
  case X3D .X3DConstants .X3DTexture3DNode:
131
131
  {
132
- sizes .text (`${node .getWidth ()} × ${node .getHeight ()} × ${node .getDepth ()}, ${format}`);
132
+ sizes .text (`${node .getWidth ()} × ${node .getHeight ()} × ${node .getDepth ()} px, ${format}`);
133
133
  break;
134
134
  }
135
135
  default:
@@ -152,7 +152,7 @@ $.fn.texturePreviewPopover = async function (node)
152
152
 
153
153
  // Create tooltip.
154
154
 
155
- const tooltip = this .popover ({
155
+ this .popover ({
156
156
  preview: true,
157
157
  content: preview,
158
158
  show: {
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  const
4
- $ = require ("jquery"),
5
- path = require ("path"),
6
- X3D = require ("../X3D"),
7
- Editor = require ("../Undo/Editor"),
8
- UndoManager = require("../Undo/UndoManager"),
9
- _ = require ("../Application/GetText");
4
+ $ = require ("jquery"),
5
+ X3D = require ("../X3D"),
6
+ _ = require ("../Application/GetText");
10
7
 
11
8
  require ("./Popover");
12
9
 
@@ -64,7 +61,7 @@ $.fn.videoPreviewPopover = async function (node)
64
61
  }
65
62
  case X3D .X3DConstants .COMPLETE_STATE:
66
63
  {
67
- sizes .text (`${node .getWidth ()} × ${node .getHeight ()}`);
64
+ sizes .text (`${node .getWidth ()} × ${node .getHeight ()} px`);
68
65
  break;
69
66
  }
70
67
  }
@@ -86,7 +83,7 @@ $.fn.videoPreviewPopover = async function (node)
86
83
 
87
84
  // Create tooltip.
88
85
 
89
- const tooltip = this .popover ({
86
+ this .popover ({
90
87
  preview: true,
91
88
  content: preview,
92
89
  show: {
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ const $ = require ("jquery");
4
+
5
+ require ("./Popover");
6
+
7
+ $.fn.volumeSliderPopover = function (browser)
8
+ {
9
+ // Create content.
10
+
11
+ const input = $("<input>")
12
+ .attr ("type", "range")
13
+ .attr ("min", 0)
14
+ .attr ("max", 1)
15
+ .attr ("step", "any")
16
+ .val (browser .getBrowserOption ("SoundIntensity"))
17
+ .css ({ "height": 120, "writing-mode": "vertical-lr", "direction": "rtl" })
18
+ .on ("input", () => browser .setBrowserOption ("SoundIntensity", input .val ()));
19
+
20
+ // Create tooltip.
21
+
22
+ this .popover ({
23
+ content: input,
24
+ position: {
25
+ my: "right top",
26
+ at: "bottom left",
27
+ },
28
+ style: {
29
+ classes: "qtip-tipsy qtip-preview qtip-sound-intensity",
30
+ },
31
+ events: {
32
+ hide: (event, api) =>
33
+ {
34
+ api .destroy (true);
35
+ },
36
+ },
37
+ });
38
+
39
+ return this;
40
+ };
41
+
@@ -175,7 +175,7 @@ module .exports = class AnimationEditor extends Interface
175
175
 
176
176
  this .navigation = $("<div></div>")
177
177
  .attr ("id", "animation-editor-navigation")
178
- .addClass (["animation-editor-navigation", "toolbar", "vertical-toolbar"])
178
+ .addClass (["animation-editor-navigation", "toolbar", "vertical-toolbar", "secondary-toolbar"])
179
179
  .appendTo (this .animationEditor);
180
180
 
181
181
  this .zoomOutIcon = $("<span></span>")
@@ -229,6 +229,7 @@ module .exports = class AnimationEditor extends Interface
229
229
  .addClass ("node-name")
230
230
  .attr ("title", _("Rename animation."))
231
231
  .attr ("placeholder", _("Enter animation name."))
232
+ .attr ("spellcheck", "true")
232
233
  .appendTo (this .verticalSplitterLeft)
233
234
  .validate (Editor .Id, () =>
234
235
  {
@@ -279,7 +280,7 @@ module .exports = class AnimationEditor extends Interface
279
280
  this .keyTypeElement .val (this .config .file .keyType);
280
281
  }
281
282
 
282
- colorScheme (shouldUseDarkColors)
283
+ colorScheme (/* shouldUseDarkColors */)
283
284
  {
284
285
  this .requestDrawTimeline ();
285
286
  }
@@ -425,6 +426,10 @@ module .exports = class AnimationEditor extends Interface
425
426
  this .propertiesIcon,
426
427
  this .keyTypeElement,
427
428
  this .timeElement,
429
+ this .zoomOutIcon,
430
+ this .zoomInIcon,
431
+ this .zoomFitIcon,
432
+ this .zoom100Icon,
428
433
  ]
429
434
  .flatMap (object => [... object]))
430
435
  .removeClass (enabled ? "disabled" : [ ])
@@ -494,7 +499,16 @@ module .exports = class AnimationEditor extends Interface
494
499
  animation .setMetaData ("Animation/duration", new X3D .SFInt32 (10));
495
500
  animation .setMetaData ("Animation/frameRate", new X3D .SFInt32 (10));
496
501
 
497
- Editor .insertValueIntoArray (executionContext, node, field, 0, animation);
502
+ if (group)
503
+ {
504
+ const index = node ._children .findIndex (node => node .metadata ?.name !== "Animation");
505
+
506
+ Editor .insertValueIntoArray (executionContext, node, field, index >= 0 ? index : 0, animation);
507
+ }
508
+ else
509
+ {
510
+ Editor .appendValueToArray (executionContext, node, field, animation);
511
+ }
498
512
 
499
513
  Editor .undoManager .endUndo ();
500
514
 
@@ -818,7 +832,7 @@ module .exports = class AnimationEditor extends Interface
818
832
  }
819
833
 
820
834
  const keyType = Object .entries (keyTypes)
821
- .find (([key, value]) => value === this .getSelectedKeyframes () .length);
835
+ .find (([, value]) => value === this .getSelectedKeyframes () .length);
822
836
 
823
837
  this .keyTypeElement .val (keyType ?.[0] ?? "MIXED");
824
838
  }
@@ -2737,7 +2751,7 @@ module .exports = class AnimationEditor extends Interface
2737
2751
  event .stopPropagation ();
2738
2752
  }
2739
2753
 
2740
- on_mouseup_scrollbar (event)
2754
+ on_mouseup_scrollbar ()
2741
2755
  {
2742
2756
  $(document) .off ("mouseup.AnimationEditorScrollbar");
2743
2757
 
@@ -1,9 +1,12 @@
1
1
  "use strict";
2
2
 
3
3
  const
4
- $ = require ("jquery"),
5
- Dialog = require ("../Controls/Dialog"),
6
- _ = require ("../Application/GetText");
4
+ $ = require ("jquery"),
5
+ X3D = require ("../X3D"),
6
+ Dialog = require ("../Controls/Dialog"),
7
+ Editor = require ("../Undo/Editor"),
8
+ UndoManager = require ("../Undo/UndoManager"),
9
+ _ = require ("../Application/GetText");
7
10
 
8
11
  module .exports = new class BrowserFrame extends Dialog
9
12
  {
@@ -121,24 +124,25 @@ module .exports = new class BrowserFrame extends Dialog
121
124
  {
122
125
  super .configure ({ size: [388, 175] });
123
126
 
124
- this .config .file .setDefaultValues ({
125
- fixedSize: false,
126
- numerator: 1,
127
- denominator: 1,
128
- backgroundColor: "",
129
- });
130
-
127
+ this .connect (Editor .getConfigNode (this .browser .currentScene));
131
128
  this .updateInputs ();
132
129
  this .onresize ();
133
130
  }
134
131
 
132
+ connect (configNode)
133
+ {
134
+ configNode ?.addMetaDataCallback (this, "Sunrize/BrowserFrame/fixedSize", () => this .updateInputs ());
135
+ configNode ?.addMetaDataCallback (this, "Sunrize/BrowserFrame/aspectRatio", () => this .updateInputs ());
136
+ configNode ?.addMetaDataCallback (this, "Sunrize/BrowserFrame/backgroundColor", () => this .updateInputs ());
137
+ }
138
+
135
139
  updateInputs ()
136
140
  {
137
141
  const
138
- fixedSize = this .config .file .fixedSize,
139
- numerator = this .config .file .numerator,
140
- denominator = this .config .file .denominator,
141
- backgroundColor = this .config .file .backgroundColor;
142
+ configNode = Editor .getConfigNode (this .browser .currentScene),
143
+ [fixedSize = false] = configNode ?.getMetaData ("Sunrize/BrowserFrame/fixedSize") ?? [ ],
144
+ [numerator = 1, denominator = 1] = configNode ?.getMetaData ("Sunrize/BrowserFrame/aspectRatio") ?? [ ],
145
+ [backgroundColor = ""] = configNode ?.getMetaData ("Sunrize/BrowserFrame/backgroundColor") ?? [ ];
142
146
 
143
147
  this .updateSize ();
144
148
 
@@ -156,12 +160,22 @@ module .exports = new class BrowserFrame extends Dialog
156
160
 
157
161
  onchange ()
158
162
  {
159
- this .config .file .fixedSize = this .fixedSize .prop ("checked");
160
- this .config .file .numerator = this .numerator .val ();
161
- this .config .file .denominator = this .denominator .val ();
162
- this .config .file .backgroundColor = this .backgroundColor .val ();
163
+ const
164
+ configNode = Editor .getConfigNode (this .browser .currentScene, true),
165
+ fixedSize = new X3D .SFBool (this .fixedSize .prop ("checked")),
166
+ aspectRatio = new X3D .MFDouble (this .numerator .val (), this .denominator .val ()),
167
+ backgroundColor = new X3D .SFString (this .backgroundColor .val ());
163
168
 
164
- this .onresize ();
169
+ this .connect (configNode);
170
+
171
+ UndoManager .shared .beginUndo (_("Change Browser Frame"));
172
+
173
+ Editor .setNodeMetaData (configNode, "Sunrize/BrowserFrame/fixedSize", fixedSize);
174
+ Editor .setNodeMetaData (configNode, "Sunrize/BrowserFrame/aspectRatio", aspectRatio);
175
+ Editor .setNodeMetaData (configNode, "Sunrize/BrowserFrame/backgroundColor", backgroundColor);
176
+ Editor .deferFunction (() => this .onresize ());
177
+
178
+ UndoManager .shared .endUndo ();
165
179
  }
166
180
 
167
181
  /**
@@ -170,13 +184,13 @@ module .exports = new class BrowserFrame extends Dialog
170
184
  onresize ()
171
185
  {
172
186
  const
173
- fixedSize = this .config .file .fixedSize,
174
- numerator = this .config .file .numerator,
175
- denominator = this .config .file .denominator,
176
- backgroundColor = this .config .file .backgroundColor,
177
- aspectRatio = numerator / denominator,
178
- frameAspectRatio = $("#browser-frame") .width () / $("#browser-frame") .height (),
179
- element = $(this .browser .element);
187
+ configNode = Editor .getConfigNode (this .browser .currentScene),
188
+ [fixedSize = false] = configNode ?.getMetaData ("Sunrize/BrowserFrame/fixedSize") ?? [ ],
189
+ [numerator = 1, denominator = 1] = configNode ?.getMetaData ("Sunrize/BrowserFrame/aspectRatio") ?? [ ],
190
+ [backgroundColor = ""] = configNode ?.getMetaData ("Sunrize/BrowserFrame/backgroundColor") ?? [ ],
191
+ aspectRatio = numerator / denominator,
192
+ frameAspectRatio = $("#browser-frame") .width () / $("#browser-frame") .height (),
193
+ element = $(this .browser .element);
180
194
 
181
195
  if (fixedSize && aspectRatio)
182
196
  {
@@ -23,7 +23,10 @@ module .exports = class Console extends Interface
23
23
 
24
24
  this .console = element;
25
25
  this .left = $("<div></div>") .addClass ("console-left") .appendTo (this .console);
26
- this .toolbar = $("<div></div>") .addClass (["toolbar", "vertical-toolbar", "console-toolbar"]) .appendTo (this .console);
26
+
27
+ this .toolbar = $("<div></div>")
28
+ .addClass (["toolbar", "vertical-toolbar", "secondary-toolbar", "console-toolbar"])
29
+ .appendTo (this .console);
27
30
 
28
31
  this .output = $("<div></div>")
29
32
  .addClass (["console-output", "output"])
@@ -54,8 +54,8 @@ module .exports = class NodeList extends Interface
54
54
  .filter (this .filter);
55
55
 
56
56
  // this .nodes = this .nodes
57
- // .sort ((a, b) => Algorithm .cmp (this .getName (a), this .getName (b)))
58
- // .sort ((a, b) => Algorithm .cmp (a .getTypeName (), b .getTypeName ()))
57
+ // .sort ((a, b) => this .getName (a) .localeCompare (this .getName (b), "en"))
58
+ // .sort ((a, b) => a .getTypeName () .localeCompare (b .getTypeName (), "en"));
59
59
 
60
60
  for (const node of this .nodes)
61
61
  {
@@ -213,7 +213,7 @@ module .exports = new class SceneProperties extends Dialog
213
213
 
214
214
  return helper;
215
215
  },
216
- update: (event, ui) =>
216
+ update: (/* event, ui */) =>
217
217
  {
218
218
  this .changeMetaData ();
219
219
  },
@@ -248,8 +248,8 @@ module .exports = new class SceneProperties extends Dialog
248
248
  .attr ("type", "checkbox")
249
249
  .on ("click", () => this .toggleWorldInfo ());
250
250
 
251
- this .worldInfo .inputs .title = $("<input></input>");
252
- this .worldInfo .inputs .info = $("<textarea></textarea>") .height ("100%") .css ("resize", "none");
251
+ this .worldInfo .inputs .title = $("<input></input>") .attr ("spellcheck", "true");
252
+ this .worldInfo .inputs .info = $("<textarea></textarea>") .attr ("spellcheck", "true") .height ("100%") .css ("resize", "none");
253
253
 
254
254
  this .worldInfo .checkboxRow = $("<tr></tr>")
255
255
  .height ("19.5px")
@@ -494,12 +494,14 @@ module .exports = new class SceneProperties extends Dialog
494
494
  .append ($("<input></input>")
495
495
  .attr ("index", 0)
496
496
  .attr ("placeholder", _("Insert meta key here."))
497
+ .attr ("spellcheck", "true")
497
498
  .val (key) .on ("change", (event) => this .changeMetaData (event, key))))
498
499
  .append ($("<td></td>")
499
500
  .addClass ("meta-value")
500
501
  .append ($("<input></input>")
501
502
  .attr ("index", 1)
502
503
  .attr ("placeholder", _("Insert meta value here."))
504
+ .attr ("spellcheck", "true")
503
505
  .val (value)
504
506
  .on ("change", (event) => this .changeMetaData (event, key))))
505
507
  .append ($("<td></td>")
@@ -562,10 +564,12 @@ module .exports = new class SceneProperties extends Dialog
562
564
  .append ($("<td></td>")
563
565
  .append ($("<input></input>")
564
566
  .attr ("placeholder", _("Add new meta key."))
567
+ .attr ("spellcheck", "true")
565
568
  .on ("change", event => this .changeMetaData (event, ""))))
566
569
  .append ($("<td></td>")
567
570
  .append ($("<input></input>")
568
571
  .prop ("readonly", true)
572
+ .attr ("spellcheck", "true")
569
573
  .on ("change", event => this .changeMetaData (event, ""))))
570
574
  .append ($("<td></td>"))
571
575
  .appendTo (this .metaData .table .foot .empty ());
@@ -50,7 +50,7 @@ module .exports = class ScriptEditor extends Interface
50
50
  this .verticalSplitter .on ("position", () => this .onSplitterPosition ());
51
51
 
52
52
  this .toolbar = $("<div></div>")
53
- .addClass (["toolbar", "vertical-toolbar", "script-editor-toolbar"])
53
+ .addClass (["toolbar", "vertical-toolbar", "secondary-toolbar", "script-editor-toolbar"])
54
54
  .appendTo (this .scriptEditor);
55
55
 
56
56
  this .toggleSidebarButton = $("<span></span>")
@@ -119,6 +119,7 @@ module .exports = class ScriptEditor extends Interface
119
119
  .addClass ("node-name")
120
120
  .attr ("title", _("Rename node."))
121
121
  .attr ("placeholder", _("Enter node name."))
122
+ .attr ("spellcheck", "true")
122
123
  .appendTo (this .horizontalSplitterTop)
123
124
  .renameNodeInput (null);
124
125
 
@@ -17,7 +17,7 @@ class AudioParser extends X3D .X3DParser
17
17
  return "ARRAY_BUFFER";
18
18
  }
19
19
 
20
- setInput (input)
20
+ setInput ()
21
21
  { }
22
22
 
23
23
  isValid ()
@@ -58,7 +58,7 @@ class AudioParser extends X3D .X3DParser
58
58
  audioClipNode .url = new X3D .MFString (this .getURL (scene .worldURL));
59
59
  audioClipNode .loop = true;
60
60
 
61
- soundNode .source = audioClipNode;
61
+ soundNode .children = [audioClipNode];
62
62
 
63
63
  scene .rootNodes .push (soundNode);
64
64
 
@@ -17,7 +17,7 @@ class VideoParser extends X3D .X3DParser
17
17
  return "ARRAY_BUFFER";
18
18
  }
19
19
 
20
- setInput (input)
20
+ setInput ()
21
21
  { }
22
22
 
23
23
  isValid ()
@@ -74,8 +74,7 @@ class VideoParser extends X3D .X3DParser
74
74
 
75
75
  shapeNode .appearance = appearanceNode;
76
76
  shapeNode .geometry = rectangleNode;
77
-
78
- soundNode .source = textureNode;
77
+ soundNode .children = [textureNode];
79
78
 
80
79
  transformNode .children .push (shapeNode, soundNode);
81
80