sunrize 2.7.2 → 2.8.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 (47) hide show
  1. package/package.json +5 -5
  2. package/src/Application/Document.js +123 -1
  3. package/src/Application/Footer.js +1 -3
  4. package/src/Application/Registry.js +29 -22
  5. package/src/Controls/AddPrototypePopover.js +1 -1
  6. package/src/Controls/AnimationPropertiesPopover.js +3 -3
  7. package/src/Controls/EditNodePopover.js +3 -3
  8. package/src/Controls/EditUserDefinedFieldPopover.js +3 -3
  9. package/src/Controls/ExportNodePopover.js +2 -2
  10. package/src/Controls/ImportNodePopover.js +2 -2
  11. package/src/Controls/SetOrientationPopover.js +1 -1
  12. package/src/Controls/Splitter.js +3 -3
  13. package/src/Editors/AnimationEditor.js +16 -8
  14. package/src/Editors/AnimationMemberList.js +1 -0
  15. package/src/Editors/BrowserFrame.js +10 -10
  16. package/src/Editors/Console.js +1 -1
  17. package/src/Editors/Library.js +1 -1
  18. package/src/Editors/MaterialsLibrary.js +9 -4
  19. package/src/Editors/OutlineEditor.js +84 -64
  20. package/src/Editors/OutlineRouteGraph.js +2 -1
  21. package/src/Editors/OutlineView.js +2 -2
  22. package/src/Editors/SceneProperties.js +12 -12
  23. package/src/Editors/ScriptEditor.js +1 -1
  24. package/src/Editors/VideoRecorder.js +415 -51
  25. package/src/Tools/Core/X3DNodeTool.js +4 -5
  26. package/src/Tools/EnvironmentalSensor/X3DEnvironmentalSensorNodeTool.x3d +5 -1
  27. package/src/Tools/Geometry2D/Arc2DTool.js +1 -0
  28. package/src/Tools/Geometry2D/ArcClose2DTool.js +1 -0
  29. package/src/Tools/Geometry2D/Circle2DTool.js +1 -0
  30. package/src/Tools/Geometry2D/Disk2DTool.js +2 -0
  31. package/src/Tools/Geometry2D/Rectangle2DTool.js +1 -0
  32. package/src/Tools/Geometry3D/BoxTool.js +1 -0
  33. package/src/Tools/Geometry3D/ConeTool.js +1 -0
  34. package/src/Tools/Geometry3D/CylinderTool.js +1 -0
  35. package/src/Tools/Geometry3D/SphereTool.js +1 -0
  36. package/src/Tools/Grouping/X3DTransformNodeTool.js +7 -5
  37. package/src/Tools/Grouping/X3DTransformNodeTool.x3d +11 -3
  38. package/src/Tools/Lighting/X3DLightNodeTool.x3d +18 -12
  39. package/src/Tools/Navigation/X3DViewpointNodeTool.x3d +2 -0
  40. package/src/Tools/Rendering/X3DGeometryNodeTool.x3d +1 -1
  41. package/src/Tools/Sound/ListenerPointSourceTool.x3d +8 -2
  42. package/src/Tools/Sound/SoundTool.x3d +10 -0
  43. package/src/Tools/Sound/SpatialSoundTool.x3d +8 -2
  44. package/src/Tools/TextureProjection/X3DTextureProjectorNodeTool.x3d +2 -0
  45. package/src/Undo/Editor.js +33 -21
  46. package/src/assets/html/window.html +1 -1
  47. package/src/assets/themes/default.css +91 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "2.7.2",
4
+ "version": "2.8.0",
5
5
  "description": "Sunrize — A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -98,7 +98,7 @@
98
98
  "@electron-forge/publisher-github": "^8.0.1",
99
99
  "@eslint/js": "^10.0.1",
100
100
  "@reforged/maker-appimage": "^6.0.0",
101
- "eslint": "^10.15.0",
101
+ "eslint": "^10.16.0",
102
102
  "globals": "^17.14.0",
103
103
  "shell-tools": "^1.1.9"
104
104
  },
@@ -106,7 +106,7 @@
106
106
  "@vscode/codicons": "^0.0.45",
107
107
  "capitalize": "^2.0.4",
108
108
  "console": "^0.7.2",
109
- "electron": "^45.4.1",
109
+ "electron": "^45.5.0",
110
110
  "electron-prompt": "^1.7.0",
111
111
  "electron-squirrel-startup": "^1.0.1",
112
112
  "electron-tabs": "^1.0.4",
@@ -124,12 +124,12 @@
124
124
  "string-similarity": "^4.0.4",
125
125
  "tweakpane": "^4.0.5",
126
126
  "update-electron-app": "^3.3.0",
127
- "x_ite": "^16.8.1",
127
+ "x_ite": "^16.9.0",
128
128
  "x_ite-off-parser": "^1.4.0",
129
129
  "x_ite-sog-parser": "^2.2.0",
130
130
  "x_ite-spz-parser": "^2.2.0",
131
131
  "x_ite-vrml1-parser": "^1.1.0",
132
- "x3d-traverse": "^3.0.3"
132
+ "x3d-traverse": "^3.1.0"
133
133
  },
134
134
  "allowScripts": {
135
135
  "electron-winstaller@5.4.4": true,
@@ -193,6 +193,7 @@ module .exports = class Document extends Interface
193
193
  // Connect for Snap Target and Snap Source.
194
194
 
195
195
  $(this .browser .element)
196
+ .on ("keydown", event => this .onnudge (event))
196
197
  .on ("mousedown", event => this .onmousedown (event))
197
198
  .on ("mouseup", event => this .onsnaptool (event))
198
199
  .on ("mouseup", event => this .onselect (event));
@@ -461,6 +462,124 @@ module .exports = class Document extends Interface
461
462
  }
462
463
  }
463
464
 
465
+ static NUDGE_STEP = 0.001; // in meters
466
+ static NUDGE_FACTOR = 10;
467
+
468
+ onnudge (event)
469
+ {
470
+ if (!this .secondaryToolbar .arrowButton .hasClass ("active"))
471
+ return;
472
+
473
+ const nudge = Document .NUDGE_STEP * (event .shiftKey ? Document .NUDGE_FACTOR : 1);
474
+
475
+ switch (event .key)
476
+ {
477
+ case "ArrowUp":
478
+ {
479
+ event .preventDefault ();
480
+ event .stopPropagation ();
481
+
482
+ if (event .altKey)
483
+ this .nudgeSelection (new X3D .Vector3 (0, 0, -nudge));
484
+ else
485
+ this .nudgeSelection (new X3D .Vector3 (0, nudge, 0));
486
+
487
+ break;
488
+ }
489
+ case "ArrowDown":
490
+ {
491
+ event .preventDefault ();
492
+ event .stopPropagation ();
493
+
494
+ if (event .altKey)
495
+ this .nudgeSelection (new X3D .Vector3 (0, 0, nudge));
496
+ else
497
+ this .nudgeSelection (new X3D .Vector3 (0, -nudge, 0));
498
+
499
+ break;
500
+ }
501
+ case "ArrowLeft":
502
+ {
503
+ event .preventDefault ();
504
+ event .stopPropagation ();
505
+
506
+ this .nudgeSelection (new X3D .Vector3 (-nudge, 0, 0));
507
+ break;
508
+ }
509
+ case "ArrowRight":
510
+ {
511
+ event .preventDefault ();
512
+ event .stopPropagation ();
513
+
514
+ this .nudgeSelection (new X3D .Vector3 (nudge, 0, 0));
515
+ break;
516
+ }
517
+ }
518
+ }
519
+
520
+ nudgeSelection (nudge)
521
+ {
522
+ const
523
+ selection = require ("./Selection"),
524
+ outlineEditor = this .sidebar .outlineEditor,
525
+ node = selection .nodes .at (-1);
526
+
527
+ if (!node)
528
+ return;
529
+
530
+ let field;
531
+
532
+ const type = node .getType ();
533
+
534
+ for (let t = type .length - 1; t >= 0; -- t)
535
+ {
536
+ switch (type [t])
537
+ {
538
+ case X3D .X3DConstants .X3DEnvironmentalSensorNode:
539
+ field = node ._center;
540
+ break;
541
+ case X3D .X3DConstants .ListenerPointSource:
542
+ case X3D .X3DConstants .OrthoViewpoint:
543
+ case X3D .X3DConstants .Viewpoint:
544
+ field = node ._position;
545
+ break;
546
+ case X3D .X3DConstants .Sound:
547
+ case X3D .X3DConstants .SpatialSound:
548
+ case X3D .X3DConstants .X3DLightNode:
549
+ field = node ._location;
550
+ break;
551
+ case X3D .X3DConstants .X3DNBodyCollidableNode:
552
+ case X3D .X3DConstants .X3DTransformNode:
553
+ field = node ._translation;
554
+ break;
555
+ default:
556
+ continue;
557
+ }
558
+
559
+ break;
560
+ }
561
+
562
+ if (!field)
563
+ return;
564
+
565
+ try
566
+ {
567
+ nudge .add (field .getValue ());
568
+
569
+ outlineEditor .beginUndoSetFieldValue (node, field);
570
+
571
+ Editor .setFieldValue (node .getExecutionContext (), node, field, nudge);
572
+ }
573
+ catch
574
+ {
575
+ electron .shell .beep ();
576
+ }
577
+ finally
578
+ {
579
+ outlineEditor .endUndoSetFieldValue (node, field);
580
+ }
581
+ }
582
+
464
583
  /*
465
584
  * File Menu
466
585
  */
@@ -571,7 +690,7 @@ module .exports = class Document extends Interface
571
690
  return;
572
691
  }
573
692
 
574
- fs .writeFileSync (this .filePath, Editor .getContents (scene, path .extname (this .filePath)));
693
+ $.try (() => fs .writeFileSync (this .filePath, Editor .getContents (scene, path .extname (this .filePath))), true);
575
694
  }
576
695
  else
577
696
  {
@@ -1292,7 +1411,10 @@ module .exports = class Document extends Interface
1292
1411
  let elements = outlineEditor .sceneGraph .find (`.node[node-id=${node .getId ()}]`);
1293
1412
 
1294
1413
  if (!elements .length)
1414
+ {
1415
+ outlineEditor .deselectAll ();
1295
1416
  return;
1417
+ }
1296
1418
 
1297
1419
  if (!outlineEditor .isEditable (elements))
1298
1420
  {
@@ -35,9 +35,7 @@ module .exports = class Footer extends Tabs
35
35
  this .addIconTextTab ("script-editor", "data_array", _("Script Editor"));
36
36
  this .addIconTextTab ("animation-editor", "animation", _("Keyframe Animation"));
37
37
  this .addIconTextTab ("route-graph", "route", _("Route Graph"));
38
-
39
- if (process .env .SUNRISE_ENVIRONMENT === "DEVELOPMENT")
40
- this .addIconTextTab ("video-recorder", "videocam", _("Video Recorder"));
38
+ this .addIconTextTab ("video-recorder", "videocam", _("Video Recorder"));
41
39
 
42
40
  this .activateTab (3);
43
41
  this .activateTab (0);
@@ -8,36 +8,43 @@ module .exports = class Registry
8
8
  {
9
9
  static addWindowsFileTypes ()
10
10
  {
11
- if (!electron .app .isPackaged)
12
- return;
11
+ try
12
+ {
13
+ if (!electron .app .isPackaged)
14
+ return;
13
15
 
14
- if (process .platform !== "win32")
15
- return;
16
+ if (process .platform !== "win32")
17
+ return;
16
18
 
17
- const
18
- exe = electron .app .getPath ("exe"),
19
- reg = fs .readFileSync (path .join (__dirname, "../assets/X3D.reg"), { encoding: "utf-8" }),
20
- tmp = path .join (electron .app .getAppPath ("temp"), "Sunrize-X3D.reg");
19
+ const
20
+ exe = electron .app .getPath ("exe"),
21
+ reg = fs .readFileSync (path .join (__dirname, "../assets/X3D.reg"), { encoding: "utf-8" }),
22
+ tmp = path .join (electron .app .getAppPath ("temp"), "Sunrize-X3D.reg");
21
23
 
22
- const out = reg .replaceAll ("SUNRIZE_EXE", exe .replaceAll ("\\", "\\\\"));
24
+ const out = reg .replaceAll ("SUNRIZE_EXE", exe .replaceAll ("\\", "\\\\"));
23
25
 
24
- fs .writeFileSync (tmp, out);
26
+ fs .writeFileSync (tmp, out);
25
27
 
26
- const ls = child_process .spawn ("reg", ["import", tmp]);
28
+ const ls = child_process .spawn ("reg", ["import", tmp]);
27
29
 
28
- ls .stdout .on ('data', (data) =>
29
- {
30
- // console .log (`stdout: ${data}`);
31
- });
30
+ ls .stdout .on ('data', (data) =>
31
+ {
32
+ // console .log (`stdout: ${data}`);
33
+ });
32
34
 
33
- ls .stderr .on ('data', (data) =>
34
- {
35
- // console .error (`stderr: ${data}`);
36
- });
35
+ ls .stderr .on ('data', (data) =>
36
+ {
37
+ // console .error (`stderr: ${data}`);
38
+ });
37
39
 
38
- ls .on ("close", (code) =>
40
+ ls .on ("close", (code) =>
41
+ {
42
+ fs .unlinkSync (tmp);
43
+ });
44
+ }
45
+ catch (error)
39
46
  {
40
- fs .unlinkSync (tmp);
41
- });
47
+ console .error (error);
48
+ }
42
49
  }
43
50
  };
@@ -39,7 +39,7 @@ $.fn.addPrototypePopover = function (executionContext, type)
39
39
  .text (_("Name"))
40
40
  .appendTo (content);
41
41
 
42
- const nameInput = $("<input></input>")
42
+ const nameInput = $("<input>")
43
43
  .attr ("placeholder", _("Enter a name"))
44
44
  .attr ("spellcheck", "true")
45
45
  .appendTo (content);
@@ -18,7 +18,7 @@ $.fn.animationPropertiesPopover = function (editor)
18
18
  .text (_("Frames"))
19
19
  .appendTo (content);
20
20
 
21
- const durationInput = $("<input></input>")
21
+ const durationInput = $("<input>")
22
22
  .attr ("type", "number")
23
23
  .attr ("step", 1)
24
24
  .attr ("min", 1)
@@ -31,7 +31,7 @@ $.fn.animationPropertiesPopover = function (editor)
31
31
  .text (_("Frame Rate (fps)"))
32
32
  .appendTo (content);
33
33
 
34
- const frameRateInput = $("<input></input>")
34
+ const frameRateInput = $("<input>")
35
35
  .attr ("type", "number")
36
36
  .attr ("step", 1)
37
37
  .attr ("min", 1)
@@ -41,7 +41,7 @@ $.fn.animationPropertiesPopover = function (editor)
41
41
  .on ("change input", updateTime)
42
42
  .appendTo (content);
43
43
 
44
- const scaleInput = $("<input></input>")
44
+ const scaleInput = $("<input>")
45
45
  .attr ("type", "checkbox")
46
46
  .attr ("id", "keyframe-scale")
47
47
  .appendTo (content);
@@ -18,7 +18,7 @@ $.fn.editNodePopover = function (node)
18
18
  .text (_("Name"))
19
19
  .appendTo (content);
20
20
 
21
- const nameInput = $("<input></input>")
21
+ const nameInput = $("<input>")
22
22
  .attr ("placeholder", _("Enter a name"))
23
23
  .attr ("spellcheck", "true")
24
24
  .appendTo (content);
@@ -29,7 +29,7 @@ $.fn.editNodePopover = function (node)
29
29
  .text (_("Application Information"))
30
30
  .appendTo (content);
31
31
 
32
- $("<input></input>")
32
+ $("<input>")
33
33
  .addClass ("appinfo")
34
34
  .attr ("placeholder", _("Enter application information"))
35
35
  .attr ("spellcheck", "true")
@@ -40,7 +40,7 @@ $.fn.editNodePopover = function (node)
40
40
  .text (_("Documentation"))
41
41
  .appendTo (content);
42
42
 
43
- $("<input></input>")
43
+ $("<input>")
44
44
  .addClass ("documentation")
45
45
  .attr ("placeholder", _("Enter documentation"))
46
46
  .attr ("spellcheck", "true")
@@ -64,7 +64,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
64
64
  .text (_("Name"))
65
65
  .appendTo (content);
66
66
 
67
- const nameInput = $("<input></input>")
67
+ const nameInput = $("<input>")
68
68
  .attr ("placeholder", _("Enter a name"))
69
69
  .attr ("spellcheck", "true")
70
70
  .appendTo (content);
@@ -87,7 +87,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
87
87
  .text (_("Application Information"))
88
88
  .appendTo (content);
89
89
 
90
- $("<input></input>")
90
+ $("<input>")
91
91
  .addClass ("appinfo")
92
92
  .attr ("placeholder", _("Enter application information"))
93
93
  .attr ("spellcheck", "true")
@@ -98,7 +98,7 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
98
98
  .text (_("Documentation"))
99
99
  .appendTo (content);
100
100
 
101
- $("<input></input>")
101
+ $("<input>")
102
102
  .addClass ("documentation")
103
103
  .attr ("placeholder", _("Enter documentation"))
104
104
  .attr ("spellcheck", "true")
@@ -21,7 +21,7 @@ $.fn.exportNodePopover = function (node, oldExportedName, oldDescription = "")
21
21
  .text ("Exported Name")
22
22
  .appendTo (content);
23
23
 
24
- const nameInput = $("<input></input>")
24
+ const nameInput = $("<input>")
25
25
  .attr ("placeholder", _("Enter exported name"))
26
26
  .attr ("spellcheck", "true")
27
27
  .val (oldExportedName || scene .getUniqueExportName (node .getName ()))
@@ -31,7 +31,7 @@ $.fn.exportNodePopover = function (node, oldExportedName, oldDescription = "")
31
31
  .text ("Description")
32
32
  .appendTo (content);
33
33
 
34
- const descriptionInput = $("<input></input>")
34
+ const descriptionInput = $("<input>")
35
35
  .attr ("placeholder", _("Enter description"))
36
36
  .attr ("spellcheck", "true")
37
37
  .val (oldDescription)
@@ -21,7 +21,7 @@ $.fn.importNodePopover = function (inlineNode, exportedName, oldImportedName, ol
21
21
  .text ("Imported Name")
22
22
  .appendTo (content);
23
23
 
24
- const nameInput = $("<input></input>")
24
+ const nameInput = $("<input>")
25
25
  .attr ("placeholder", _("Enter imported name"))
26
26
  .attr ("spellcheck", "true")
27
27
  .val (oldImportedName || executionContext .getUniqueImportName (exportedName))
@@ -31,7 +31,7 @@ $.fn.importNodePopover = function (inlineNode, exportedName, oldImportedName, ol
31
31
  .text ("Description")
32
32
  .appendTo (content);
33
33
 
34
- const descriptionInput = $("<input></input>")
34
+ const descriptionInput = $("<input>")
35
35
  .attr ("placeholder", _("Enter description"))
36
36
  .attr ("spellcheck", "true")
37
37
  .val (oldDescription)
@@ -19,7 +19,7 @@ $.fn.setOrientationPopover = function (executionContext, textureProjectorNode)
19
19
  .text (_("Orientation"))
20
20
  .appendTo (content);
21
21
 
22
- const orientationInput = $("<input></input>")
22
+ const orientationInput = $("<input>")
23
23
  .attr ("placeholder", _("Enter orientation values"))
24
24
  .appendTo (content);
25
25
 
@@ -65,7 +65,7 @@ module .exports = class Splitter extends Interface
65
65
  if (!this .isInitialScene && this .config .file .position !== undefined)
66
66
  this .position = this .config .file .position;
67
67
  else
68
- this .handle .trigger ("position");
68
+ setTimeout (() => this .handle .trigger ("position"));
69
69
  }
70
70
 
71
71
  get position ()
@@ -128,7 +128,7 @@ module .exports = class Splitter extends Interface
128
128
  }
129
129
  }
130
130
 
131
- this .handle .trigger ("position");
131
+ setTimeout (() => this .handle .trigger ("position"));
132
132
  }
133
133
 
134
134
  start (event)
@@ -195,7 +195,7 @@ module .exports = class Splitter extends Interface
195
195
  break;
196
196
  }
197
197
 
198
- this .handle .trigger ("position");
198
+ setTimeout (() => this .handle .trigger ("position"));
199
199
  }
200
200
  else
201
201
  {
@@ -160,7 +160,7 @@ module .exports = class AnimationEditor extends Interface
160
160
  .appendTo (this .controls)
161
161
  .on ("click", () => this .toggleReverse ());
162
162
 
163
- this .frameInput = $("<input></input>")
163
+ this .frameInput = $("<input>")
164
164
  .addClass ("input")
165
165
  .css ("width", "70px")
166
166
  .attr ("type", "number")
@@ -246,7 +246,7 @@ module .exports = class AnimationEditor extends Interface
246
246
  .appendTo (this .verticalSplitterLeft)
247
247
  .on ("scroll mousemove", () => this .drawTimeline ());
248
248
 
249
- this .animationName = $("<input></input>")
249
+ this .animationName = $("<input>")
250
250
  .addClass ("node-name")
251
251
  .attr ("title", _("Rename animation."))
252
252
  .attr ("placeholder", _("Enter animation name."))
@@ -731,6 +731,7 @@ module .exports = class AnimationEditor extends Interface
731
731
  X3D .X3DConstants .OrientationInterpolator,
732
732
  X3D .X3DConstants .PositionInterpolator2D,
733
733
  X3D .X3DConstants .PositionInterpolator,
734
+ X3D .X3DConstants .CoordinateInterpolator1D,
734
735
  X3D .X3DConstants .CoordinateInterpolator2D,
735
736
  X3D .X3DConstants .CoordinateInterpolator,
736
737
  X3D .X3DConstants .NormalInterpolator,
@@ -798,6 +799,7 @@ module .exports = class AnimationEditor extends Interface
798
799
  [X3D .X3DConstants .SFRotation, "OrientationInterpolator"],
799
800
  [X3D .X3DConstants .SFVec2f, "PositionInterpolator2D"],
800
801
  [X3D .X3DConstants .SFVec3f, "PositionInterpolator"],
802
+ [X3D .X3DConstants .MFFloat, "CoordinateInterpolator1D"],
801
803
  [X3D .X3DConstants .MFVec2f, "CoordinateInterpolator2D"],
802
804
  [X3D .X3DConstants .MFVec3f, "CoordinateInterpolator"],
803
805
  // NormalInterpolator
@@ -811,6 +813,7 @@ module .exports = class AnimationEditor extends Interface
811
813
  [X3D .X3DConstants .OrientationInterpolator, 4],
812
814
  [X3D .X3DConstants .PositionInterpolator2D, 2],
813
815
  [X3D .X3DConstants .PositionInterpolator, 3],
816
+ [X3D .X3DConstants .CoordinateInterpolator1D, 1],
814
817
  [X3D .X3DConstants .CoordinateInterpolator2D, 2],
815
818
  [X3D .X3DConstants .CoordinateInterpolator, 3],
816
819
  [X3D .X3DConstants .NormalInterpolator, 3],
@@ -964,6 +967,7 @@ module .exports = class AnimationEditor extends Interface
964
967
  this .addKeyframeToInterpolator (interpolator, frame, type, field);
965
968
  break;
966
969
  }
970
+ case X3D .X3DConstants .MFFloat:
967
971
  case X3D .X3DConstants .MFVec2f:
968
972
  case X3D .X3DConstants .MFVec3f:
969
973
  {
@@ -982,7 +986,9 @@ module .exports = class AnimationEditor extends Interface
982
986
 
983
987
  Editor .setNodeMetaData (interpolator, "Interpolator/keySize", keySize);
984
988
 
985
- const value = Array .from (field) .flatMap (value => Array .from (value));
989
+ const value = typeof field [0] === "object"
990
+ ? Array .from (field) .flatMap (value => Array .from (value))
991
+ : Array .from (field);
986
992
 
987
993
  this .addKeyframeToInterpolator (interpolator, frame, type, value);
988
994
  break;
@@ -1050,7 +1056,7 @@ module .exports = class AnimationEditor extends Interface
1050
1056
  destinationField = route .getDestinationField (),
1051
1057
  nodeName = destinationNode .getDisplayName () || destinationNode .getTypeName (),
1052
1058
  fieldName = capitalize (destinationField .replace (/^set_|_changed$/g, ""), true),
1053
- typeName = interpolator .getTypeName () .match (/(Sequencer|Interpolator)$/) [1];
1059
+ typeName = interpolator .getTypeName () .match (/(Sequencer|Interpolator)/) [1];
1054
1060
 
1055
1061
  return `${nodeName}${fieldName}${typeName}`;
1056
1062
  }
@@ -1103,6 +1109,7 @@ module .exports = class AnimationEditor extends Interface
1103
1109
  this .updateScalarInterpolator (interpolator);
1104
1110
  break;
1105
1111
  }
1112
+ case X3D .X3DConstants .CoordinateInterpolator1D:
1106
1113
  case X3D .X3DConstants .CoordinateInterpolator2D:
1107
1114
  case X3D .X3DConstants .CoordinateInterpolator:
1108
1115
  case X3D .X3DConstants .NormalInterpolator:
@@ -1580,11 +1587,12 @@ module .exports = class AnimationEditor extends Interface
1580
1587
  // Use slice and concat instead of splice to support very large arrays.
1581
1588
 
1582
1589
  const
1583
- before = keyValue .slice (0, indexN),
1584
- after = keyValue .slice (indexN + deleteCountN),
1585
- insert = new X3D .MFDouble ();
1590
+ isArray = interpolator ._value_changed instanceof X3D .X3DArrayField,
1591
+ before = keyValue .slice (0, indexN),
1592
+ after = keyValue .slice (indexN + deleteCountN),
1593
+ insert = new X3D .MFDouble ();
1586
1594
 
1587
- insert .setValue (components === 1 ? [value] : Array .from (value));
1595
+ insert .setValue (isArray ? Array .from (value) : [value]);
1588
1596
 
1589
1597
  const newKeyValue = before .concat (insert) .concat (after);
1590
1598
 
@@ -223,6 +223,7 @@ module .exports = class AnimationMembersList extends Interface
223
223
  X3D .X3DConstants .SFRotation,
224
224
  X3D .X3DConstants .SFVec2f,
225
225
  X3D .X3DConstants .SFVec3f,
226
+ X3D .X3DConstants .MFFloat,
226
227
  X3D .X3DConstants .MFVec2f,
227
228
  X3D .X3DConstants .MFVec3f
228
229
  ]);
@@ -35,7 +35,7 @@ module .exports = new class BrowserFrame extends Dialog
35
35
  .text (_("Browser Frame")))
36
36
  .appendTo (this .table .header);
37
37
 
38
- this .width = $("<input></input>")
38
+ this .width = $("<input>")
39
39
  .attr ("type", "number")
40
40
  .attr ("min", 1)
41
41
  .attr ("step", "1")
@@ -46,12 +46,12 @@ module .exports = new class BrowserFrame extends Dialog
46
46
  .css ({ "display": "inline-block", "width": "20px", "text-align": "center" })
47
47
  .text ("✕");
48
48
 
49
- this .height = $("<input></input>")
50
- .attr ("type", "number")
49
+ this .height = $("<input>")
50
+ .attr ("type", "number")
51
51
  .attr ("min", 1)
52
- .attr ("step", "1")
53
- .css ("width", "calc((100% - 20px) / 2)")
54
- .on ("change", () => this .onsize ());
52
+ .attr ("step", "1")
53
+ .css ("width", "calc((100% - 20px) / 2)")
54
+ .on ("change", () => this .onsize ());
55
55
 
56
56
  $("<tr></tr>")
57
57
  .append ($("<th></th>")
@@ -62,7 +62,7 @@ module .exports = new class BrowserFrame extends Dialog
62
62
  .append (this .height))
63
63
  .appendTo (this .table .body);
64
64
 
65
- this .fixedSize = $("<input></input>")
65
+ this .fixedSize = $("<input>")
66
66
  .attr ("id", "browser-frame-fixed-size")
67
67
  .attr ("type", "checkbox")
68
68
  .on ("change", () => this .onchange ());
@@ -76,7 +76,7 @@ module .exports = new class BrowserFrame extends Dialog
76
76
  .text (_("Fixed Size"))))
77
77
  .appendTo (this .table .body);
78
78
 
79
- this .numerator = $("<input></input>")
79
+ this .numerator = $("<input>")
80
80
  .attr ("type", "number")
81
81
  .attr ("min", 1)
82
82
  .attr ("step", "1")
@@ -87,7 +87,7 @@ module .exports = new class BrowserFrame extends Dialog
87
87
  .css ({ "display": "inline-block", "width": "20px", "text-align": "center" })
88
88
  .text ("/");
89
89
 
90
- this .denominator = $("<input></input>")
90
+ this .denominator = $("<input>")
91
91
  .attr ("type", "number")
92
92
  .attr ("min", 1)
93
93
  .attr ("step", "1")
@@ -103,7 +103,7 @@ module .exports = new class BrowserFrame extends Dialog
103
103
  .append (this .denominator))
104
104
  .appendTo (this .table .body);
105
105
 
106
- this .backgroundColor = $("<input></input>")
106
+ this .backgroundColor = $("<input>")
107
107
  .attr ("title", _("A background color which is applied to the <x3d-canvas> element."))
108
108
  .attr ("placeholder", "Enter a CSS color here.")
109
109
  .on ("change", () => this .onchange ());
@@ -54,7 +54,7 @@ module .exports = class Console extends Interface
54
54
  .addClass ("console-search-input-elements")
55
55
  .appendTo (this .search);
56
56
 
57
- this .searchInput = $("<input></input>")
57
+ this .searchInput = $("<input>")
58
58
  .attr ("type", "text")
59
59
  .attr ("placeholder", _("Find"))
60
60
  .addClass ("console-search-input")
@@ -41,7 +41,7 @@ module .exports = new class Library extends Dialog
41
41
 
42
42
  // Input
43
43
 
44
- this .input = $("<input></input>")
44
+ this .input = $("<input>")
45
45
  .appendTo (this .element)
46
46
  .addClass ("library-input")
47
47
  .attr ("placeholder", _("Search a node"))
@@ -44,8 +44,7 @@ module .exports = class MaterialsLibrary extends LibraryPane
44
44
  const buttons = $("<li></li>")
45
45
  .appendTo (this .#list);
46
46
 
47
- this .#physicalButton = $("<input></input>")
48
- .attr ("title", _("Requires an EnvironmentLight node."))
47
+ this .#physicalButton = $("<input>")
49
48
  .attr ("type", "checkbox")
50
49
  .attr ("id", "use-physical-material")
51
50
  .prop ("checked", this .config .global .convertToPhysical)
@@ -53,11 +52,17 @@ module .exports = class MaterialsLibrary extends LibraryPane
53
52
  .appendTo (buttons);
54
53
 
55
54
  $("<label></label>")
56
- .attr ("title", _("Requires an EnvironmentLight node."))
57
55
  .attr ("for", "use-physical-material")
58
- .text (_("Create Physical Material"))
56
+ .text (_("Create Physical Material*"))
59
57
  .appendTo (buttons);
60
58
 
59
+ const hint = $("<li></li>")
60
+ .appendTo (this .#list);
61
+
62
+ $("<small></small>")
63
+ .text (_("* Requires an EnvironmentLight node."))
64
+ .appendTo (hint);
65
+
61
66
  // Materials
62
67
 
63
68
  const materials = scene .getExportedNode ("Materials");