sunrize 2.0.8 → 2.0.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "2.0.8",
4
+ "version": "2.0.10",
5
5
  "description": "Sunrize — A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -89,10 +89,10 @@
89
89
  "shell-tools": "^1.1.9"
90
90
  },
91
91
  "dependencies": {
92
- "@vscode/codicons": "^0.0.44",
92
+ "@vscode/codicons": "^0.0.45",
93
93
  "capitalize": "^2.0.4",
94
94
  "console": "^0.7.2",
95
- "electron": "^41.0.0",
95
+ "electron": "^41.0.3",
96
96
  "electron-prompt": "^1.7.0",
97
97
  "electron-squirrel-startup": "^1.0.1",
98
98
  "electron-tabs": "^1.0.4",
@@ -101,7 +101,7 @@
101
101
  "jquery-ui-dist": "^1.13.3",
102
102
  "jstree": "^3.3.17",
103
103
  "material-icons": "^1.13.14",
104
- "material-symbols": "^0.40.2",
104
+ "material-symbols": "^0.42.3",
105
105
  "md5": "^2.3.0",
106
106
  "mime-types": "^3.0.2",
107
107
  "monaco-editor": "^0.55.1",
@@ -111,7 +111,7 @@
111
111
  "string-similarity": "^4.0.4",
112
112
  "tweakpane": "^4.0.5",
113
113
  "update-electron-app": "^3.1.2",
114
- "x_ite": "^14.0.9",
114
+ "x_ite": "^14.1.0",
115
115
  "x3d-traverse": "^1.0.22"
116
116
  }
117
117
  }
@@ -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);
@@ -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 ();
@@ -937,7 +939,11 @@ main ()
937
939
  value = this .node ._url .toSpliced (0, 1, Editor .encodeURI (string));
938
940
 
939
941
  if (!this .node ._url .equals (value))
942
+ {
943
+ this .node ._url .addFieldCallback (this, () => this .node ._url .addFieldCallback (this, this .set_url .bind (this)));
944
+
940
945
  Editor .setFieldValue (this .node .getExecutionContext (), this .node, this .node ._url, value);
946
+ }
941
947
 
942
948
  if (!force)
943
949
  return;
@@ -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]