sunrize 2.0.9 → 2.0.11

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.0.9",
4
+ "version": "2.0.11",
5
5
  "description": "Sunrize — A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -48,6 +48,7 @@
48
48
  "PLY",
49
49
  "STL",
50
50
  "SVG",
51
+ "VRM",
51
52
  "VRML",
52
53
  "Wavefront-OBJ",
53
54
  "WebGL",
@@ -92,7 +93,7 @@
92
93
  "@vscode/codicons": "^0.0.45",
93
94
  "capitalize": "^2.0.4",
94
95
  "console": "^0.7.2",
95
- "electron": "^41.0.2",
96
+ "electron": "^41.1.0",
96
97
  "electron-prompt": "^1.7.0",
97
98
  "electron-squirrel-startup": "^1.0.1",
98
99
  "electron-tabs": "^1.0.4",
@@ -101,7 +102,7 @@
101
102
  "jquery-ui-dist": "^1.13.3",
102
103
  "jstree": "^3.3.17",
103
104
  "material-icons": "^1.13.14",
104
- "material-symbols": "^0.40.2",
105
+ "material-symbols": "^0.42.3",
105
106
  "md5": "^2.3.0",
106
107
  "mime-types": "^3.0.2",
107
108
  "monaco-editor": "^0.55.1",
@@ -111,7 +112,7 @@
111
112
  "string-similarity": "^4.0.4",
112
113
  "tweakpane": "^4.0.5",
113
114
  "update-electron-app": "^3.1.2",
114
- "x_ite": "^14.0.9",
115
+ "x_ite": "^14.1.2",
115
116
  "x3d-traverse": "^1.0.22"
116
117
  }
117
118
  }
@@ -33,8 +33,7 @@ module .exports = class Application
33
33
  return;
34
34
  }
35
35
 
36
- if (process .platform === "win32")
37
- require ("update-electron-app") .updateElectronApp ({ updateInterval: "1 hour" });
36
+ require ("update-electron-app") .updateElectronApp ({ updateInterval: "1 hour" });
38
37
 
39
38
  Registry .addWindowsFileTypes ();
40
39
 
@@ -1031,7 +1030,7 @@ module .exports = class Application
1031
1030
  },
1032
1031
  {
1033
1032
  name: _("3D"),
1034
- extensions: ["gltf", "glb", "obj", "stl", "ply", "svg"],
1033
+ extensions: ["gltf", "glb", "vrm", "obj", "stl", "ply", "svg"],
1035
1034
  },
1036
1035
  {
1037
1036
  name: _("Audio"),
@@ -175,6 +175,7 @@ module .exports = class NodesLibrary extends LibraryPane
175
175
 
176
176
  const node = this .executionContext .createNode (typeName);
177
177
 
178
+ this .initializeNode (node);
178
179
  this .addNode (node);
179
180
 
180
181
  UndoManager .shared .endUndo ();
@@ -182,6 +183,27 @@ module .exports = class NodesLibrary extends LibraryPane
182
183
  await this .expandToAndSelectNode (node .getValue ());
183
184
  }
184
185
 
186
+ initializeNode (node)
187
+ {
188
+ for (const type of node .getNodeType () .reverse ())
189
+ {
190
+ switch (type)
191
+ {
192
+ case X3D .X3DConstants .ElevationGrid:
193
+ {
194
+ node .xDimension = 10;
195
+ node .zDimension = 10;
196
+ break;
197
+ }
198
+ case X3D .X3DConstants .X3DEnvironmentalSensorNode:
199
+ {
200
+ node .size = new X3D .SFVec3f (2, 2, 2);
201
+ break;
202
+ }
203
+ }
204
+ }
205
+ }
206
+
185
207
  async createProto (proto)
186
208
  {
187
209
  UndoManager .shared .beginUndo (_("Create Proto Instance %s"), proto .name);
@@ -328,7 +328,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
328
328
  },
329
329
  {
330
330
  label: _("Fold InlineGeometry Back into Scene"),
331
- enabled: node .checkLoadState () === X3D .X3DConstants .COMPLETE_STATE && !!node .getGeometry (),
331
+ enabled: node .checkLoadState () === X3D .X3DConstants .COMPLETE_STATE && !!$.try (() => node .getInnerNode ()),
332
332
  args: ["foldInlineGeometryBackIntoScene", element .attr ("id"), executionContext .getId (), node .getId ()],
333
333
  });
334
334
 
@@ -1624,7 +1624,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
1624
1624
 
1625
1625
  const
1626
1626
  rootNodes = executionContext .rootNodes .copy (),
1627
- nodesToExport = [inlineGeometryNode .getGeometry ()],
1627
+ nodesToExport = [inlineGeometryNode .getInnerNode ()],
1628
1628
  x3dSyntax = await Editor .exportX3D (inlineGeometryNode .getInternalScene (), nodesToExport),
1629
1629
  nodes = await Editor .importX3D (executionContext, x3dSyntax),
1630
1630
  geometryNode = nodes [0];
@@ -576,13 +576,15 @@ module .exports = class ScriptEditor extends Interface
576
576
 
577
577
  const editor = monaco .editor .create (element .get (0),
578
578
  {
579
- language: this .languages [node .getTypeName ()],
580
- contextmenu: false,
581
579
  automaticLayout: true,
580
+ bracketPairColorization: { enabled: true },
581
+ contextmenu: false,
582
+ detectIndentation: true,
583
+ language: this .languages [node .getTypeName ()],
584
+ minimap: { enabled: false },
585
+ tabSize: 3,
582
586
  wordWrap: "on",
583
587
  wrappingIndent: "indent",
584
- minimap: { enabled: false },
585
- bracketPairColorization: { enabled: true },
586
588
  });
587
589
 
588
590
  editor .viewState = editor .saveViewState ();
@@ -303,8 +303,8 @@ module .exports = class Editor
303
303
 
304
304
  const
305
305
  nodes = [... executionContext .rootNodes] .slice (rootNodes .length) .map (n => n ?.getValue ()),
306
- newExternProtos = [... executionContext .externprotos] .slice (externprotos .size),
307
- newProtos = [... executionContext .protos] .slice (protos .size),
306
+ newExternProtos = [... executionContext .externprotos] .slice (externprotos .length),
307
+ newProtos = [... executionContext .protos] .slice (protos .length),
308
308
  updatedExternProtos = new Map (),
309
309
  updatedProtos = new Map (),
310
310
  removedProtoNodes = new Set ();
@@ -2129,6 +2129,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
2129
2129
  node = node .valueOf ();
2130
2130
 
2131
2131
  const
2132
+ fieldName = field .getName (),
2132
2133
  oldAccessType = field .getAccessType (),
2133
2134
  fields = Array .from (node .getUserDefinedFields ());
2134
2135
 
@@ -2182,7 +2183,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
2182
2183
  if (node .getProtoNode () !== proto)
2183
2184
  continue;
2184
2185
 
2185
- const field = node .getField (oldName);
2186
+ const field = node .getField (fieldName);
2186
2187
 
2187
2188
  if (!updatedField .isInput ())
2188
2189
  {
@@ -257,6 +257,24 @@
257
257
  <key>LSIsAppleDefaultForType</key>
258
258
  <true/>
259
259
  </dict>
260
+ <dict>
261
+ <key>CFBundleTypeExtensions</key>
262
+ <array>
263
+ <string>vrm</string>
264
+ </array>
265
+ <key>CFBundleTypeMIMETypes</key>
266
+ <array>
267
+ <string>model/vrm</string>
268
+ </array>
269
+ <key>CFBundleTypeName</key>
270
+ <string>VRM Model</string>
271
+ <key>CFBundleTypeRole</key>
272
+ <string>Editor</string>
273
+ <key>LSHandlerRank</key>
274
+ <string>Alternate</string>
275
+ <key>LSIsAppleDefaultForType</key>
276
+ <true/>
277
+ </dict>
260
278
  <dict>
261
279
  <key>CFBundleTypeExtensions</key>
262
280
  <array>
@@ -30,6 +30,9 @@ Windows Registry Editor Version 5.00
30
30
  [HKEY_CURRENT_USER\Software\Classes\.glb\OpenWithProgids]
31
31
  "Sunrize.glb"=""
32
32
 
33
+ [HKEY_CURRENT_USER\Software\Classes\.vrm\OpenWithProgids]
34
+ "Sunrize.vrm"=""
35
+
33
36
  [HKEY_CURRENT_USER\Software\Classes\.obj\OpenWithProgids]
34
37
  "Sunrize.obj"=""
35
38
 
@@ -112,6 +115,13 @@ Windows Registry Editor Version 5.00
112
115
  [HKEY_CURRENT_USER\Software\Classes\Sunrize.glb\shell\open\command]
113
116
  @="\"SUNRIZE_EXE\" \"%1\""
114
117
 
118
+ [HKEY_CURRENT_USER\Software\Classes\Sunrize.vrm]
119
+ @="VRM Model"
120
+ [HKEY_CURRENT_USER\Software\Classes\Sunrize.vrm\DefaultIcon]
121
+ @="\"SUNRIZE_EXE\",0"
122
+ [HKEY_CURRENT_USER\Software\Classes\Sunrize.vrm\shell\open\command]
123
+ @="\"SUNRIZE_EXE\" \"%1\""
124
+
115
125
  [HKEY_CURRENT_USER\Software\Classes\Sunrize.obj]
116
126
  @="Wavefront OBJ Model"
117
127
  [HKEY_CURRENT_USER\Software\Classes\Sunrize.obj\DefaultIcon]