sunrize 2.1.7 → 2.1.9

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": "2.1.7",
4
+ "version": "2.1.9",
5
5
  "description": "Sunrize — A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -21,13 +21,13 @@
21
21
  "premake": "npm i -D electron",
22
22
  "make": "electron-forge make",
23
23
  "postmake": "npm i -P electron",
24
- "publish-to-github": "node build/publish-to-github.js",
24
+ "publish:github": "node build/publish-to-github.js",
25
25
  "predocs": "rm -f -r docs/_site/",
26
26
  "docs": "cd docs && bundle exec jekyll serve --ssl-key ssl/server.key --ssl-cert ssl/server.crt --incremental --host=`ipconfig getifaddr en0`",
27
- "predocs-install": "cd docs && ln -s -f ../../ssl ./",
28
- "docs-install": "cd docs && gem install bundler && bundle install",
29
- "docs-update": "cd docs && bundle update",
30
- "merge-development": "sh build/merge-development.sh",
27
+ "predocs:install": "cd docs && ln -s -f ../../ssl ./",
28
+ "docs:install": "cd docs && gem install bundler && bundle install",
29
+ "docs:update": "cd docs && bundle update",
30
+ "merge:development": "sh build/merge-development.sh",
31
31
  "make-x_ite-for-sunrize": "sh build/make-x_ite-for-sunrize.sh",
32
32
  "loading-gif": "node build/loading-gif.js"
33
33
  },
@@ -88,8 +88,8 @@
88
88
  "@electron-forge/maker-zip": "^7.11.2",
89
89
  "@electron-forge/publisher-github": "^7.11.2",
90
90
  "@eslint/js": "^10.0.1",
91
- "eslint": "^10.5.0",
92
- "globals": "^17.6.0",
91
+ "eslint": "^10.6.0",
92
+ "globals": "^17.7.0",
93
93
  "shell-tools": "^1.1.9"
94
94
  },
95
95
  "dependencies": {
@@ -105,7 +105,7 @@
105
105
  "jquery-ui-dist": "^1.13.3",
106
106
  "jstree": "^3.3.17",
107
107
  "material-icons": "^1.13.14",
108
- "material-symbols": "^0.45.1",
108
+ "material-symbols": "^0.45.4",
109
109
  "md5": "^2.3.0",
110
110
  "mime-types": "^3.0.2",
111
111
  "monaco-editor": "^0.55.1",
@@ -115,10 +115,10 @@
115
115
  "string-similarity": "^4.0.4",
116
116
  "tweakpane": "^4.0.5",
117
117
  "update-electron-app": "^3.2.0",
118
- "x_ite": "^15.1.4",
119
- "x_ite-off-parser": "^1.0.7",
120
- "x_ite-sog-parser": "^1.0.3",
121
- "x_ite-spz-parser": "^1.1.3",
118
+ "x_ite": "^15.1.8",
119
+ "x_ite-off-parser": "^1.2.4",
120
+ "x_ite-sog-parser": "^2.0.0",
121
+ "x_ite-spz-parser": "^2.0.0",
122
122
  "x3d-traverse": "^2.0.1"
123
123
  }
124
124
  }
@@ -1034,7 +1034,7 @@ module .exports = class Application
1034
1034
  },
1035
1035
  {
1036
1036
  name: _("Audio"),
1037
- extensions: ["mp3", "wav", "oga", "ogg"],
1037
+ extensions: ["mp3", "mp4", "m4a", "aac", "wav", "webm", "oga", "ogg"],
1038
1038
  },
1039
1039
  {
1040
1040
  name: _("Images"),
@@ -35,56 +35,24 @@ $.fn.editUserDefinedFieldPopover = function (executionContext, node, field = -1)
35
35
  const typeNameMenu = $("<select></select>")
36
36
  .appendTo (content);
37
37
 
38
- $("<optgroup></optgroup>")
38
+ const singleGroup = $("<optgroup></optgroup>")
39
39
  .attr ("label", "Single Fields")
40
- .append ($("<option></option>") .text ("SFBool"))
41
- .append ($("<option></option>") .text ("SFColor"))
42
- .append ($("<option></option>") .text ("SFColorRGBA"))
43
- .append ($("<option></option>") .text ("SFDouble"))
44
- .append ($("<option></option>") .text ("SFFloat"))
45
- .append ($("<option></option>") .text ("SFImage"))
46
- .append ($("<option></option>") .text ("SFInt32"))
47
- .append ($("<option></option>") .text ("SFMatrix3d"))
48
- .append ($("<option></option>") .text ("SFMatrix3f"))
49
- .append ($("<option></option>") .text ("SFMatrix4d"))
50
- .append ($("<option></option>") .text ("SFMatrix4f"))
51
- .append ($("<option></option>") .text ("SFNode"))
52
- .append ($("<option></option>") .text ("SFRotation"))
53
- .append ($("<option></option>") .text ("SFString"))
54
- .append ($("<option></option>") .text ("SFTime"))
55
- .append ($("<option></option>") .text ("SFVec2d"))
56
- .append ($("<option></option>") .text ("SFVec2f"))
57
- .append ($("<option></option>") .text ("SFVec3d"))
58
- .append ($("<option></option>") .text ("SFVec3f"))
59
- .append ($("<option></option>") .text ("SFVec4d"))
60
- .append ($("<option></option>") .text ("SFVec4f"))
61
40
  .appendTo (typeNameMenu);
62
41
 
63
- $("<optgroup></optgroup>")
42
+ Object .keys (X3D .Fields)
43
+ .filter (typeName => typeName .startsWith ("SF"))
44
+ .sort ()
45
+ .forEach (typeName => singleGroup .append ($("<option></option>") .text (typeName)));
46
+
47
+ const multiGroup = $("<optgroup></optgroup>")
64
48
  .attr ("label", "Multi Fields")
65
- .append ($("<option></option>") .text ("MFBool"))
66
- .append ($("<option></option>") .text ("MFColor"))
67
- .append ($("<option></option>") .text ("MFColorRGBA"))
68
- .append ($("<option></option>") .text ("MFDouble"))
69
- .append ($("<option></option>") .text ("MFFloat"))
70
- .append ($("<option></option>") .text ("MFImage"))
71
- .append ($("<option></option>") .text ("MFInt32"))
72
- .append ($("<option></option>") .text ("MFMatrix3d"))
73
- .append ($("<option></option>") .text ("MFMatrix3f"))
74
- .append ($("<option></option>") .text ("MFMatrix4d"))
75
- .append ($("<option></option>") .text ("MFMatrix4f"))
76
- .append ($("<option></option>") .text ("MFNode"))
77
- .append ($("<option></option>") .text ("MFRotation"))
78
- .append ($("<option></option>") .text ("MFString"))
79
- .append ($("<option></option>") .text ("MFTime"))
80
- .append ($("<option></option>") .text ("MFVec2d"))
81
- .append ($("<option></option>") .text ("MFVec2f"))
82
- .append ($("<option></option>") .text ("MFVec3d"))
83
- .append ($("<option></option>") .text ("MFVec3f"))
84
- .append ($("<option></option>") .text ("MFVec4d"))
85
- .append ($("<option></option>") .text ("MFVec4f"))
86
49
  .appendTo (typeNameMenu);
87
50
 
51
+ Object .keys (X3D .Fields)
52
+ .filter (typeName => typeName .startsWith ("MF"))
53
+ .sort ()
54
+ .forEach (typeName => multiGroup .append ($("<option></option>") .text (typeName)));
55
+
88
56
  const accessTypeMenu = $("<select></select>")
89
57
  .append ($("<option></option>") .text ("initializeOnly"))
90
58
  .append ($("<option></option>") .text ("inputOnly"))
@@ -2165,6 +2165,7 @@ module .exports = class OutlineView extends Interface
2165
2165
  case X3D .X3DConstants .SFMatrix3f:
2166
2166
  case X3D .X3DConstants .SFMatrix4d:
2167
2167
  case X3D .X3DConstants .SFMatrix4f:
2168
+ case X3D .X3DConstants .SFQuaternion:
2168
2169
  case X3D .X3DConstants .SFRotation:
2169
2170
  case X3D .X3DConstants .SFString:
2170
2171
  case X3D .X3DConstants .SFTime:
@@ -2189,6 +2190,7 @@ module .exports = class OutlineView extends Interface
2189
2190
  case X3D .X3DConstants .MFMatrix3f:
2190
2191
  case X3D .X3DConstants .MFMatrix4d:
2191
2192
  case X3D .X3DConstants .MFMatrix4f:
2193
+ case X3D .X3DConstants .MFQuaternion:
2192
2194
  case X3D .X3DConstants .MFRotation:
2193
2195
  case X3D .X3DConstants .MFString:
2194
2196
  case X3D .X3DConstants .MFTime:
@@ -454,6 +454,7 @@ module .exports = new class Panel extends Interface
454
454
  case X3D .X3DConstants .SFMatrix3f:
455
455
  case X3D .X3DConstants .SFMatrix4d:
456
456
  case X3D .X3DConstants .SFMatrix4f:
457
+ case X3D .X3DConstants .SFQuaternion:
457
458
  case X3D .X3DConstants .SFRotation:
458
459
  case X3D .X3DConstants .SFString:
459
460
  case X3D .X3DConstants .SFTime:
@@ -529,6 +530,7 @@ module .exports = new class Panel extends Interface
529
530
  case X3D .X3DConstants .MFMatrix3f:
530
531
  case X3D .X3DConstants .MFMatrix4d:
531
532
  case X3D .X3DConstants .MFMatrix4f:
533
+ case X3D .X3DConstants .MFQuaternion:
532
534
  case X3D .X3DConstants .MFRotation:
533
535
  case X3D .X3DConstants .MFString:
534
536
  case X3D .X3DConstants .MFTime:
@@ -609,6 +611,7 @@ module .exports = new class Panel extends Interface
609
611
  case X3D .X3DConstants .SFDouble:
610
612
  case X3D .X3DConstants .SFMatrix3d:
611
613
  case X3D .X3DConstants .SFMatrix4d:
614
+ case X3D .X3DConstants .SFQuaternion:
612
615
  case X3D .X3DConstants .SFRotation:
613
616
  case X3D .X3DConstants .SFTime:
614
617
  case X3D .X3DConstants .SFVec2d:
@@ -670,6 +673,7 @@ module .exports = new class Panel extends Interface
670
673
 
671
674
  // falls through
672
675
  }
676
+ case X3D .X3DConstants .SFQuaternion:
673
677
  case X3D .X3DConstants .SFVec2d:
674
678
  case X3D .X3DConstants .SFVec2f:
675
679
  case X3D .X3DConstants .SFVec3d:
@@ -715,6 +719,7 @@ module .exports = new class Panel extends Interface
715
719
  }
716
720
  case X3D .X3DConstants .MFColor:
717
721
  case X3D .X3DConstants .MFColorRGBA:
722
+ case X3D .X3DConstants .MFQuaternion:
718
723
  case X3D .X3DConstants .MFRotation:
719
724
  case X3D .X3DConstants .MFVec2d:
720
725
  case X3D .X3DConstants .MFVec2f:
@@ -816,6 +821,7 @@ module .exports = new class Panel extends Interface
816
821
  this .assign (executionContext, node, field, value);
817
822
  break;
818
823
  }
824
+ case X3D .X3DConstants .SFQuaternion:
819
825
  case X3D .X3DConstants .SFVec4d:
820
826
  case X3D .X3DConstants .SFVec4f:
821
827
  {
@@ -855,6 +861,7 @@ module .exports = new class Panel extends Interface
855
861
  case X3D .X3DConstants .MFMatrix3f:
856
862
  case X3D .X3DConstants .MFMatrix4d:
857
863
  case X3D .X3DConstants .MFMatrix4f:
864
+ case X3D .X3DConstants .MFQuaternion:
858
865
  case X3D .X3DConstants .MFRotation:
859
866
  case X3D .X3DConstants .MFString:
860
867
  case X3D .X3DConstants .MFTime:
@@ -412,6 +412,7 @@ class X3DNodeTool extends X3DBaseTool
412
412
 
413
413
  switch (value .getType ())
414
414
  {
415
+ case X3D .X3DConstants .SFQuaternion:
415
416
  case X3D .X3DConstants .SFRotation:
416
417
  case X3D .X3DConstants .SFVec2d:
417
418
  case X3D .X3DConstants .SFVec2f:
@@ -433,6 +434,7 @@ class X3DNodeTool extends X3DBaseTool
433
434
 
434
435
  switch (value .getType ())
435
436
  {
437
+ case X3D .X3DConstants .SFQuaternion:
436
438
  case X3D .X3DConstants .SFRotation:
437
439
  case X3D .X3DConstants .SFVec2d:
438
440
  case X3D .X3DConstants .SFVec2f:
@@ -121,7 +121,7 @@ class X3DTransformNodeTool extends X3DChildNodeTool
121
121
  Editor .roundToIntegerIfAlmostEqual (center);
122
122
 
123
123
  if (Editor .almostEqual (scale .x, scale .y) && Editor .almostEqual (scale .x, scale .z))
124
- scaleOrientation .assign (new X3D .SFRotation ());
124
+ scaleOrientation .assign (X3D .SFRotation .IDENTITY);
125
125
 
126
126
  Editor .setFieldValue (this .getExecutionContext (), this .node, this ._translation, translation);
127
127
  Editor .setFieldValue (this .getExecutionContext (), this .node, this ._rotation, rotation);
@@ -3105,10 +3105,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
3105
3105
  auxiliary .fromString (string, executionContext);
3106
3106
 
3107
3107
  if (auxiliary .equals (field))
3108
- {
3109
- field .addEvent ();
3110
3108
  return;
3111
- }
3112
3109
 
3113
3110
  if (node .getDisplayName ())
3114
3111
  undoManager .beginUndo (_("Change Field »%s« of Node %s »%s«"), field .getName (), node .getTypeName (), node .getDisplayName ());
@@ -3152,16 +3149,14 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
3152
3149
  {
3153
3150
  const auxiliary = field .create ();
3154
3151
 
3152
+ auxiliary .setUnit (field .getUnit ());
3155
3153
  auxiliary .setValue (value);
3156
3154
 
3157
3155
  value = auxiliary;
3158
3156
  }
3159
3157
 
3160
3158
  if (value .equals (field))
3161
- {
3162
- field .addEvent ();
3163
3159
  return;
3164
- }
3165
3160
 
3166
3161
  if (node .getDisplayName ())
3167
3162
  undoManager .beginUndo (_("Change Field »%s« of Node %s »%s«"), field .getName (), node .getTypeName (), node .getDisplayName ());