sunrize 1.0.22 → 1.0.23
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": "1.0.
|
|
4
|
+
"version": "1.0.23",
|
|
5
5
|
"description": "A Multi Platform X3D Editor",
|
|
6
6
|
"homepage": "https://create3000.github.io/sunrize/",
|
|
7
7
|
"author": "Holger Seelig",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@electron-forge/maker-rpm": "^6.1.1",
|
|
41
41
|
"@electron-forge/maker-squirrel": "^6.1.1",
|
|
42
42
|
"@electron-forge/maker-zip": "^6.1.1",
|
|
43
|
-
"electron": "^24.1.
|
|
43
|
+
"electron": "^24.1.3"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"capitalize": "^2.0.4",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"jquery": "^3.6.4",
|
|
52
52
|
"jquery-ui-dist": "^1.13.2",
|
|
53
53
|
"jstree": "^3.3.15",
|
|
54
|
-
"material-icons": "^1.13.
|
|
54
|
+
"material-icons": "^1.13.6",
|
|
55
55
|
"material-symbols": "^0.5.5",
|
|
56
56
|
"md5": "^2.3.0",
|
|
57
57
|
"monaco-editor": "^0.37.1",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"qtip2": "^3.0.3",
|
|
60
60
|
"spectrum-colorpicker2": "^2.0.10",
|
|
61
61
|
"string-similarity": "^4.0.4",
|
|
62
|
-
"x_ite": "^8.6.
|
|
62
|
+
"x_ite": "^8.6.20"
|
|
63
63
|
},
|
|
64
64
|
"main": "src/main.js",
|
|
65
65
|
"bin": {
|
|
@@ -42,6 +42,7 @@ module .exports = class Application
|
|
|
42
42
|
size: [1100, 680],
|
|
43
43
|
maximized: false,
|
|
44
44
|
fullscreen: false,
|
|
45
|
+
autoSave: false,
|
|
45
46
|
expandExternProtoDeclarations: true,
|
|
46
47
|
expandPrototypeInstances: true,
|
|
47
48
|
expandInlineNodes: true,
|
|
@@ -196,6 +197,18 @@ module .exports = class Application
|
|
|
196
197
|
},
|
|
197
198
|
},
|
|
198
199
|
{ type: "separator" },
|
|
200
|
+
{
|
|
201
|
+
label: _ ("Auto Save"),
|
|
202
|
+
type: "checkbox",
|
|
203
|
+
checked: this .config .autoSave,
|
|
204
|
+
click: () =>
|
|
205
|
+
{
|
|
206
|
+
this .config .autoSave = !this .config .autoSave
|
|
207
|
+
this .mainWindow .webContents .send ("auto-save", this .config .autoSave)
|
|
208
|
+
},
|
|
209
|
+
|
|
210
|
+
},
|
|
211
|
+
{ type: "separator" },
|
|
199
212
|
{
|
|
200
213
|
label: _ ("Scene Properties..."),
|
|
201
214
|
accelerator: "CmdOrCtrl+I",
|
|
@@ -55,6 +55,7 @@ module .exports = new class Document extends Interface
|
|
|
55
55
|
|
|
56
56
|
// Actions
|
|
57
57
|
|
|
58
|
+
electron .ipcRenderer .on ("auto-save", (event, value) => this .autoSave = value)
|
|
58
59
|
electron .ipcRenderer .on ("scene-properties", () => require ("../Editors/SceneProperties") .open ())
|
|
59
60
|
electron .ipcRenderer .on ("show-library", () => require ("../Editors/Library") .open (this .browser .currentScene))
|
|
60
61
|
|
|
@@ -252,10 +253,26 @@ module .exports = new class Document extends Interface
|
|
|
252
253
|
this .filePath = oldFilePath
|
|
253
254
|
}
|
|
254
255
|
|
|
256
|
+
get autoSave ()
|
|
257
|
+
{
|
|
258
|
+
return this .config .global .autoSave
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
set autoSave (value)
|
|
262
|
+
{
|
|
263
|
+
this .config .global .autoSave = value
|
|
264
|
+
|
|
265
|
+
if (value)
|
|
266
|
+
this .registerAutoSave ()
|
|
267
|
+
}
|
|
268
|
+
|
|
255
269
|
#saveTimeoutId = undefined
|
|
256
270
|
|
|
257
|
-
|
|
271
|
+
registerAutoSave ()
|
|
258
272
|
{
|
|
273
|
+
if (!this .autoSave)
|
|
274
|
+
return
|
|
275
|
+
|
|
259
276
|
clearTimeout (this .#saveTimeoutId)
|
|
260
277
|
|
|
261
278
|
this .#saveTimeoutId = setTimeout (() => this .saveFile (), 3000)
|
|
@@ -321,7 +338,7 @@ module .exports = new class Document extends Interface
|
|
|
321
338
|
electron .ipcRenderer .sendToHost ("saved", !UndoManager .shared .saveNeeded)
|
|
322
339
|
|
|
323
340
|
if (UndoManager .shared .saveNeeded)
|
|
324
|
-
this .
|
|
341
|
+
this .registerAutoSave ()
|
|
325
342
|
}
|
|
326
343
|
}
|
|
327
344
|
|
|
@@ -178,20 +178,20 @@ module .exports = class Editor
|
|
|
178
178
|
if (node .getProtoNode () .getExecutionContext () !== executionContext)
|
|
179
179
|
return
|
|
180
180
|
|
|
181
|
-
const proto = protos .get (node .
|
|
181
|
+
const proto = protos .get (node .getTypeName ())
|
|
182
182
|
|
|
183
183
|
if (proto)
|
|
184
184
|
{
|
|
185
|
-
updatedProtos .set (node .
|
|
185
|
+
updatedProtos .set (node .getTypeName (), proto)
|
|
186
186
|
this .setProtoNode (executionContext, node, proto, undoManager)
|
|
187
187
|
return
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
const externproto = externprotos .get (node .
|
|
190
|
+
const externproto = externprotos .get (node .getTypeName ())
|
|
191
191
|
|
|
192
192
|
if (externproto)
|
|
193
193
|
{
|
|
194
|
-
updatedExternProtos .set (node .
|
|
194
|
+
updatedExternProtos .set (node .getTypeName (), externproto)
|
|
195
195
|
this .setProtoNode (executionContext, node, externproto, undoManager)
|
|
196
196
|
return
|
|
197
197
|
}
|