sunrize 2.6.5 → 2.6.7
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 +5 -5
- package/src/Application/Application.js +38 -0
- package/src/Application/CheckReleases.js +86 -0
- package/src/Application/Document.js +8 -50
- package/src/Application/Tabs.js +5 -0
- package/src/Editors/AnimationEditor.js +22 -16
- package/src/Editors/Console.js +83 -6
- package/src/Editors/OutlineEditor.js +4 -2
- package/src/Editors/RouteGraph.js +2 -1
- package/src/Tools/Core/X3DNodeTool.js +2 -1
- package/src/Tools/Grids/X3DGridNodeTool.js +3 -2
- package/src/Tools/Lighting/DirectionalLightTool.js +4 -2
- package/src/Undo/Editor.js +2 -1
- package/src/assets/X3DUOM.xml +10 -7
- package/src/assets/themes/default.css +2 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "2.6.
|
|
4
|
+
"version": "2.6.7",
|
|
5
5
|
"description": "Sunrize — A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -99,14 +99,14 @@
|
|
|
99
99
|
"@eslint/js": "^10.0.1",
|
|
100
100
|
"@reforged/maker-appimage": "^6.0.0",
|
|
101
101
|
"eslint": "^10.14.0",
|
|
102
|
-
"globals": "^17.
|
|
102
|
+
"globals": "^17.14.0",
|
|
103
103
|
"shell-tools": "^1.1.9"
|
|
104
104
|
},
|
|
105
105
|
"dependencies": {
|
|
106
106
|
"@vscode/codicons": "^0.0.45",
|
|
107
107
|
"capitalize": "^2.0.4",
|
|
108
108
|
"console": "^0.7.2",
|
|
109
|
-
"electron": "^45.2.
|
|
109
|
+
"electron": "^45.2.3",
|
|
110
110
|
"electron-prompt": "^1.7.0",
|
|
111
111
|
"electron-squirrel-startup": "^1.0.1",
|
|
112
112
|
"electron-tabs": "^1.0.4",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"jquery": "^3.7.1",
|
|
115
115
|
"jquery-ui-dist": "^1.13.3",
|
|
116
116
|
"jstree": "^3.3.17",
|
|
117
|
-
"material-symbols": "^0.48.
|
|
117
|
+
"material-symbols": "^0.48.3",
|
|
118
118
|
"md5": "^2.3.0",
|
|
119
119
|
"mime-types": "^3.0.2",
|
|
120
120
|
"monaco-editor": "^0.55.1",
|
|
@@ -124,7 +124,7 @@
|
|
|
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.7.
|
|
127
|
+
"x_ite": "^16.7.1",
|
|
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",
|
|
@@ -1009,6 +1009,8 @@ module .exports = class Application
|
|
|
1009
1009
|
window .on ("leave-full-screen", () => this .onleavefullscreen ());
|
|
1010
1010
|
window .on ("close", (event) => this .onclose (event));
|
|
1011
1011
|
|
|
1012
|
+
window .webContents .session .on ("will-download", (event, item) => this .willDownload (item));
|
|
1013
|
+
|
|
1012
1014
|
if (this .config .fullscreen)
|
|
1013
1015
|
window .setFullScreen (this .config .fullscreen);
|
|
1014
1016
|
else if (this .config .maximized)
|
|
@@ -1027,6 +1029,42 @@ module .exports = class Application
|
|
|
1027
1029
|
this .createWindow ();
|
|
1028
1030
|
}
|
|
1029
1031
|
|
|
1032
|
+
willDownload (item)
|
|
1033
|
+
{
|
|
1034
|
+
item .on ("updated", (event, state) =>
|
|
1035
|
+
{
|
|
1036
|
+
if (state === "interrupted")
|
|
1037
|
+
{
|
|
1038
|
+
this .mainWindow .webContents .send ("download-item", "interrupted", item .getSavePath ());
|
|
1039
|
+
}
|
|
1040
|
+
else if (state === "progressing")
|
|
1041
|
+
{
|
|
1042
|
+
if (item .isPaused ())
|
|
1043
|
+
{
|
|
1044
|
+
this .mainWindow .webContents .send ("download-item", "paused", item .getSavePath ());
|
|
1045
|
+
}
|
|
1046
|
+
else
|
|
1047
|
+
{
|
|
1048
|
+
const fractions = item .getReceivedBytes () / item .getTotalBytes ();
|
|
1049
|
+
|
|
1050
|
+
this .mainWindow .webContents .send ("download-item", "progress", item .getSavePath (), fractions);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
});
|
|
1054
|
+
|
|
1055
|
+
item .once ("done", (event, state) =>
|
|
1056
|
+
{
|
|
1057
|
+
if (state === "completed")
|
|
1058
|
+
{
|
|
1059
|
+
this .mainWindow .webContents .send ("download-item", "completed", item .getSavePath ());
|
|
1060
|
+
}
|
|
1061
|
+
else
|
|
1062
|
+
{
|
|
1063
|
+
this .mainWindow .webContents .send ("download-item", "failed", item .getSavePath ());
|
|
1064
|
+
}
|
|
1065
|
+
});
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1030
1068
|
contextMenu (id, menu, menuId)
|
|
1031
1069
|
{
|
|
1032
1070
|
const contextMenu = electron .Menu .buildFromTemplate (this .addMenuItemHandlers (id, this .filterSeparators (menu)));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
const
|
|
2
|
+
$ = require ("jquery"),
|
|
3
|
+
util = require ("util"),
|
|
4
|
+
Package = require ("../../package.json"),
|
|
5
|
+
_ = require ("./GetText");
|
|
6
|
+
|
|
7
|
+
module .exports = class CheckReleases
|
|
8
|
+
{
|
|
9
|
+
static #instance;
|
|
10
|
+
|
|
11
|
+
static run (console)
|
|
12
|
+
{
|
|
13
|
+
return this .#instance ??= new CheckReleases (console);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#console;
|
|
17
|
+
|
|
18
|
+
constructor (console)
|
|
19
|
+
{
|
|
20
|
+
this .#console = console;
|
|
21
|
+
|
|
22
|
+
this .checkReleases ();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
async checkReleases ()
|
|
26
|
+
{
|
|
27
|
+
try
|
|
28
|
+
{
|
|
29
|
+
const
|
|
30
|
+
response = await fetch ("https://api.github.com/repos/create3000/sunrize/releases/latest"),
|
|
31
|
+
latest = await response .json ();
|
|
32
|
+
|
|
33
|
+
if (latest .name === `v${Package .version}`)
|
|
34
|
+
return this .waitForRelease ();
|
|
35
|
+
|
|
36
|
+
let filename;
|
|
37
|
+
|
|
38
|
+
switch (process .platform)
|
|
39
|
+
{
|
|
40
|
+
case "win32":
|
|
41
|
+
filename = `Sunrize.X3D.Editor-${latest .name .substring (1)}.Setup.exe`;
|
|
42
|
+
break;
|
|
43
|
+
case "darwin":
|
|
44
|
+
filename = `Sunrize.X3D.Editor-darwin-arm64-${latest .name .substring (1)}.zip`;
|
|
45
|
+
break;
|
|
46
|
+
default:
|
|
47
|
+
filename = `Sunrize.X3D.Editor-${latest .name .substring (1)}-x64.AppImage`;
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const fileURL = `https://github.com/create3000/sunrize/releases/download/${latest .name}/${filename}`;
|
|
52
|
+
|
|
53
|
+
if (!await this .fileExists (fileURL))
|
|
54
|
+
return this .waitForRelease ();
|
|
55
|
+
|
|
56
|
+
this .#console .addSplitter ();
|
|
57
|
+
this .#console .addMessage ("info", "", 0, util .format (_(`A new Sunrize version %s is now available on GitHub.`), latest .name));
|
|
58
|
+
this .#console .addMessage ("info", "", 0, $(util .format (_(`<span>Download new version: <span><a download href="%s">%s</a>`), fileURL, filename)));
|
|
59
|
+
this .#console .addSplitter ();
|
|
60
|
+
}
|
|
61
|
+
catch (error)
|
|
62
|
+
{
|
|
63
|
+
if (process .env .SUNRISE_ENVIRONMENT === "DEVELOPMENT")
|
|
64
|
+
console .error (error);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
waitForRelease ()
|
|
69
|
+
{
|
|
70
|
+
setTimeout (() => this .checkReleases (), 24 * 60 * 60 * 1_000);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async fileExists (url)
|
|
74
|
+
{
|
|
75
|
+
try
|
|
76
|
+
{
|
|
77
|
+
const response = await fetch (url, { method: "HEAD" });
|
|
78
|
+
|
|
79
|
+
return response .ok;
|
|
80
|
+
}
|
|
81
|
+
catch
|
|
82
|
+
{
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
@@ -18,6 +18,8 @@ const
|
|
|
18
18
|
ImageParser = require ("../Parser/ImageParser"),
|
|
19
19
|
VideoParser = require ("../Parser/VideoParser"),
|
|
20
20
|
AudioParser = require ("../Parser/AudioParser"),
|
|
21
|
+
CheckReleases = require ("./CheckReleases"),
|
|
22
|
+
Package = require ("../../package.json"),
|
|
21
23
|
_ = require ("./GetText");
|
|
22
24
|
|
|
23
25
|
require ("jquery-ui-dist/jquery-ui");
|
|
@@ -182,7 +184,6 @@ module .exports = class Document extends Interface
|
|
|
182
184
|
this .browser .getBrowserOptions () .getField (option) .addInterest (`set_${option}`, this);
|
|
183
185
|
|
|
184
186
|
this .browser .setBrowserOption ("AlwaysUpdateGeometries", true);
|
|
185
|
-
this .browser .setBrowserOption ("MetadataReference", require ("../../package.json") .homepage);
|
|
186
187
|
|
|
187
188
|
// Connect browser events.
|
|
188
189
|
|
|
@@ -215,13 +216,13 @@ module .exports = class Document extends Interface
|
|
|
215
216
|
|
|
216
217
|
require ("../Components");
|
|
217
218
|
|
|
218
|
-
//
|
|
219
|
+
// Info
|
|
219
220
|
|
|
220
|
-
|
|
221
|
+
console .info (`Welcome to ${Package .productName} v${Package .version}.`);
|
|
221
222
|
|
|
222
|
-
|
|
223
|
+
CheckReleases .run (this .footer .console);
|
|
223
224
|
|
|
224
|
-
|
|
225
|
+
// Restore
|
|
225
226
|
|
|
226
227
|
await this .restoreFile ();
|
|
227
228
|
|
|
@@ -460,47 +461,6 @@ module .exports = class Document extends Interface
|
|
|
460
461
|
}
|
|
461
462
|
}
|
|
462
463
|
|
|
463
|
-
async checkReleases ()
|
|
464
|
-
{
|
|
465
|
-
try
|
|
466
|
-
{
|
|
467
|
-
const
|
|
468
|
-
response = await fetch ("https://api.github.com/repos/create3000/sunrize/releases/latest"),
|
|
469
|
-
latest = await response .json (),
|
|
470
|
-
pkg = require ("../../package.json");
|
|
471
|
-
|
|
472
|
-
if (latest .name === `v${pkg .version}`)
|
|
473
|
-
return setTimeout (() => this .checkReleases (), 24 * 60 * 60 * 1_000);
|
|
474
|
-
|
|
475
|
-
let filename;
|
|
476
|
-
|
|
477
|
-
switch (process .platform)
|
|
478
|
-
{
|
|
479
|
-
case "win32":
|
|
480
|
-
filename = `Sunrize.X3D.Editor-${latest .name .substring (1)}.Setup.exe`;
|
|
481
|
-
break;
|
|
482
|
-
case "darwin":
|
|
483
|
-
filename = `Sunrize.X3D.Editor-darwin-arm64-${latest .name .substring (1)}.zip`;
|
|
484
|
-
break;
|
|
485
|
-
default:
|
|
486
|
-
filename = `Sunrize.X3D.Editor-${latest .name .substring (1)}-x64.AppImage`;
|
|
487
|
-
break;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
const fileURL = `https://github.com/create3000/sunrize/releases/download/${latest .name}/${filename}`;
|
|
491
|
-
|
|
492
|
-
this .footer .console .addSplitter ();
|
|
493
|
-
this .footer .console .addMessage ("info", "", 0, `A new Sunrize version ${latest .name} is now available on GitHub.`);
|
|
494
|
-
this .footer .console .addMessage ("info", "", 0, `Download new version: <a download href="${fileURL}">${filename}</a>`, true);
|
|
495
|
-
this .footer .console .addSplitter ();
|
|
496
|
-
}
|
|
497
|
-
catch (error)
|
|
498
|
-
{
|
|
499
|
-
if (process .env .SUNRISE_ENVIRONMENT === "DEVELOPMENT")
|
|
500
|
-
console .error (error);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
|
|
504
464
|
/*
|
|
505
465
|
* File Menu
|
|
506
466
|
*/
|
|
@@ -584,11 +544,9 @@ module .exports = class Document extends Interface
|
|
|
584
544
|
|
|
585
545
|
if (this .config .file .commonMetaData ?? true)
|
|
586
546
|
{
|
|
587
|
-
const
|
|
588
|
-
pkg = require ("../../package.json"),
|
|
589
|
-
generator = scene .getMetaData ("generator") ?.filter (value => !value .startsWith (pkg .productName)) ?? [ ];
|
|
547
|
+
const generator = scene .getMetaData ("generator") ?.filter (value => !value .startsWith (Package .productName)) ?? [ ];
|
|
590
548
|
|
|
591
|
-
generator .unshift (`${
|
|
549
|
+
generator .unshift (`${Package .productName} V${Package .version}, ${Package .homepage}`);
|
|
592
550
|
|
|
593
551
|
if (!scene .getMetaData ("creator") ?.some (value => value .includes (this .fullname)))
|
|
594
552
|
scene .addMetaData ("creator", this .fullname);
|
package/src/Application/Tabs.js
CHANGED
|
@@ -39,6 +39,8 @@ class Tabs
|
|
|
39
39
|
["SVG", "../images/seti/svg.svg"],
|
|
40
40
|
]);
|
|
41
41
|
|
|
42
|
+
scrollOptions = { behavior: "instant", inline: "center" };
|
|
43
|
+
|
|
42
44
|
constructor ()
|
|
43
45
|
{
|
|
44
46
|
this .config .setDefaultValues ({
|
|
@@ -143,6 +145,7 @@ class Tabs
|
|
|
143
145
|
this .forwardToActiveTab ("route-graph");
|
|
144
146
|
this .forwardToActiveTab ("outline-editor");
|
|
145
147
|
this .forwardToActiveTab ("context-menu-will-close");
|
|
148
|
+
this .forwardToActiveTab ("download-item");
|
|
146
149
|
|
|
147
150
|
// Restore tabs.
|
|
148
151
|
this .restoreTabs (this .config .activeTab);
|
|
@@ -174,6 +177,7 @@ class Tabs
|
|
|
174
177
|
const tab = this .getTabByURL (activeTab) ?? this .tabs .getTabByPosition (0);
|
|
175
178
|
|
|
176
179
|
tab .activate ();
|
|
180
|
+
tab .element .scrollIntoView (this .scrollOptions);
|
|
177
181
|
}
|
|
178
182
|
else
|
|
179
183
|
{
|
|
@@ -328,6 +332,7 @@ class Tabs
|
|
|
328
332
|
?? this .tabs .getTabByPosition (this .tabs .getTabs () .length - 1);
|
|
329
333
|
|
|
330
334
|
tab .activate ();
|
|
335
|
+
tab .element .scrollIntoView (this .scrollOptions);
|
|
331
336
|
}
|
|
332
337
|
|
|
333
338
|
this .saveTabs ();
|
|
@@ -10,6 +10,7 @@ const
|
|
|
10
10
|
NodeList = require ("./NodeList"),
|
|
11
11
|
MemberList = require ("./AnimationMemberList"),
|
|
12
12
|
Editor = require ("../Undo/Editor"),
|
|
13
|
+
Package = require ("../../package.json"),
|
|
13
14
|
_ = require ("../Application/GetText");
|
|
14
15
|
|
|
15
16
|
require ("../Bits/Validate");
|
|
@@ -521,8 +522,8 @@ module .exports = class AnimationEditor extends Interface
|
|
|
521
522
|
executionContext .addNamedNode (executionContext .getUniqueName ("NewAnimation"), animation);
|
|
522
523
|
executionContext .addNamedNode (executionContext .getUniqueName ("NewAnimationTimer"), timeSensor);
|
|
523
524
|
|
|
524
|
-
animation .setMetaData ("Animation/duration", new X3D .SFInt32 (10));
|
|
525
|
-
animation .setMetaData ("Animation/frameRate", new X3D .SFInt32 (10));
|
|
525
|
+
animation .setMetaData ("Animation/duration", Package .homepage, new X3D .SFInt32 (10));
|
|
526
|
+
animation .setMetaData ("Animation/frameRate", Package .homepage, new X3D .SFInt32 (10));
|
|
526
527
|
|
|
527
528
|
if (group)
|
|
528
529
|
{
|
|
@@ -586,14 +587,16 @@ module .exports = class AnimationEditor extends Interface
|
|
|
586
587
|
|
|
587
588
|
for (const interpolator of this .interpolators)
|
|
588
589
|
{
|
|
589
|
-
const
|
|
590
|
-
const
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
const
|
|
590
|
+
const components = this .#components .get (interpolator .getType () .at (-1));
|
|
591
|
+
const key = interpolator .getMetaData ("Interpolator/key", new X3D .MFInt32 ());
|
|
592
|
+
const keyValue = interpolator .getMetaData ("Interpolator/keyValue", new X3D .MFDouble ());
|
|
593
|
+
const keyType = interpolator .getMetaData ("Interpolator/keyType", new X3D .MFString ());
|
|
594
|
+
const keySize = interpolator .getMetaData ("Interpolator/keySize", new X3D .SFInt32 (1));
|
|
595
|
+
const index = X3D .Algorithm .upperBound (key, 0, key .length, newDuration);
|
|
596
|
+
const indexN = index * components * keySize;
|
|
594
597
|
|
|
595
598
|
Editor .setNodeMetaData (interpolator, "Interpolator/key", key .slice (0, index));
|
|
596
|
-
Editor .setNodeMetaData (interpolator, "Interpolator/keyValue", keyValue .slice (0,
|
|
599
|
+
Editor .setNodeMetaData (interpolator, "Interpolator/keyValue", keyValue .slice (0, indexN));
|
|
597
600
|
Editor .setNodeMetaData (interpolator, "Interpolator/keyType", keyType .slice (0, index));
|
|
598
601
|
}
|
|
599
602
|
|
|
@@ -1921,13 +1924,16 @@ module .exports = class AnimationEditor extends Interface
|
|
|
1921
1924
|
{
|
|
1922
1925
|
require ("../Application/Window") .requestAutoSave ();
|
|
1923
1926
|
|
|
1924
|
-
this .timeSensor ._stopTime = Date .now () / 1000;
|
|
1925
|
-
|
|
1926
1927
|
if (this .timeSensor ._isActive .getValue ())
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1928
|
+
{
|
|
1929
|
+
this .timeSensor ._evenLive = false;
|
|
1930
|
+
this .timeSensor ._stopTime = Date .now () / 1000;
|
|
1931
|
+
}
|
|
1932
|
+
else
|
|
1933
|
+
{
|
|
1934
|
+
this .timeSensor ._evenLive = true;
|
|
1935
|
+
this .timeSensor ._startTime = Date .now () / 1000;
|
|
1936
|
+
}
|
|
1931
1937
|
}
|
|
1932
1938
|
|
|
1933
1939
|
toggleLoop ()
|
|
@@ -1969,7 +1975,7 @@ module .exports = class AnimationEditor extends Interface
|
|
|
1969
1975
|
begin = selectionRange [0] / duration,
|
|
1970
1976
|
end = selectionRange [1] / duration;
|
|
1971
1977
|
|
|
1972
|
-
if (this .timeSensor ._range [1]
|
|
1978
|
+
if (!(this .timeSensor ._range [1] === begin && this .timeSensor ._range [2] === end))
|
|
1973
1979
|
{
|
|
1974
1980
|
this .timeSensor ._range [1] = begin;
|
|
1975
1981
|
this .timeSensor ._range [2] = end;
|
|
@@ -2703,7 +2709,7 @@ module .exports = class AnimationEditor extends Interface
|
|
|
2703
2709
|
|
|
2704
2710
|
this .updateRange ();
|
|
2705
2711
|
this .selectKeyframesInRange ();
|
|
2706
|
-
this .
|
|
2712
|
+
this .drawTimeline ();
|
|
2707
2713
|
}
|
|
2708
2714
|
|
|
2709
2715
|
expandSelectionRange (frame)
|
package/src/Editors/Console.js
CHANGED
|
@@ -6,6 +6,7 @@ const
|
|
|
6
6
|
electron = require ("electron"),
|
|
7
7
|
Interface = require ("../Application/Interface"),
|
|
8
8
|
util = require ("util"),
|
|
9
|
+
md5 = require ("md5"),
|
|
9
10
|
_ = require ("../Application/GetText");
|
|
10
11
|
|
|
11
12
|
module .exports = class Console extends Interface
|
|
@@ -130,6 +131,7 @@ module .exports = class Console extends Interface
|
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
electron .ipcRenderer .on ("console-message", this .addMessageCallback);
|
|
134
|
+
electron .ipcRenderer .on ("download-item", (event, ... args) => this .downloadItem (... args));
|
|
133
135
|
|
|
134
136
|
this .setup ();
|
|
135
137
|
}
|
|
@@ -188,17 +190,19 @@ module .exports = class Console extends Interface
|
|
|
188
190
|
"error",
|
|
189
191
|
];
|
|
190
192
|
|
|
191
|
-
|
|
193
|
+
#scrollOptions = { behavior: "instant", block: "end" };
|
|
194
|
+
|
|
195
|
+
addMessage (level, sourceId, line, message)
|
|
192
196
|
{
|
|
193
|
-
if (this .excludes .some (exclude => message .includes (exclude)))
|
|
197
|
+
if (typeof message === "string" && this .excludes .some (exclude => message .includes (exclude)))
|
|
194
198
|
return;
|
|
195
199
|
|
|
196
200
|
const text = $("<p></p>")
|
|
197
201
|
.addClass (typeof level === "string" ? level : (this .logLevels [level] ?? "log"))
|
|
198
202
|
.attr ("title", sourceId ? `${sourceId}:${line}`: "");
|
|
199
203
|
|
|
200
|
-
if (
|
|
201
|
-
text .
|
|
204
|
+
if (message instanceof $)
|
|
205
|
+
text .append (message);
|
|
202
206
|
else
|
|
203
207
|
text .text (message);
|
|
204
208
|
|
|
@@ -209,14 +213,18 @@ module .exports = class Console extends Interface
|
|
|
209
213
|
|
|
210
214
|
this .output .children (`:not(:nth-last-child(-n+${this .CONSOLE_MAX}))`) .remove ();
|
|
211
215
|
this .output .append (text);
|
|
212
|
-
|
|
216
|
+
text .get (0) .scrollIntoView (this .#scrollOptions);
|
|
213
217
|
|
|
214
218
|
this .findElements (text, this .currentElement, false);
|
|
215
219
|
}
|
|
216
220
|
|
|
217
221
|
addSplitter ()
|
|
218
222
|
{
|
|
219
|
-
|
|
223
|
+
const splitter = $("<p></p>") .addClass ("splitter");
|
|
224
|
+
|
|
225
|
+
this .output .append (splitter);
|
|
226
|
+
|
|
227
|
+
splitter .get (0) .scrollIntoView (this .#scrollOptions);
|
|
220
228
|
}
|
|
221
229
|
|
|
222
230
|
setSuspendConsole (value)
|
|
@@ -310,6 +318,75 @@ module .exports = class Console extends Interface
|
|
|
310
318
|
div .remove ();
|
|
311
319
|
}
|
|
312
320
|
|
|
321
|
+
downloadItem (state, filePath, ... args)
|
|
322
|
+
{
|
|
323
|
+
if (!filePath)
|
|
324
|
+
return;
|
|
325
|
+
|
|
326
|
+
const id = `download-item-${md5 (filePath)}`;
|
|
327
|
+
|
|
328
|
+
if (!$(`#${id}`) .length)
|
|
329
|
+
this .addMessage ("info", "", 0, $(`<span id="${id}"></span>`));
|
|
330
|
+
|
|
331
|
+
switch (state)
|
|
332
|
+
{
|
|
333
|
+
case "interrupted":
|
|
334
|
+
{
|
|
335
|
+
$(`#${id}`) .text (util .format (_(`Downloading "%s" interrupted.`), filePath));
|
|
336
|
+
break;
|
|
337
|
+
}
|
|
338
|
+
case "paused":
|
|
339
|
+
{
|
|
340
|
+
$(`#${id}`) .text (util .format (_(`Downloading "%s" paused.`), filePath));
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
case "progress":
|
|
344
|
+
{
|
|
345
|
+
const percent = args [0] * 100;
|
|
346
|
+
|
|
347
|
+
$(`#${id}`) .text (util .format (_(`Downloading "%s": %s %%.`), filePath, percent .toFixed (1)));
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
case "completed":
|
|
351
|
+
{
|
|
352
|
+
const title = (() =>
|
|
353
|
+
{
|
|
354
|
+
switch (process .platform)
|
|
355
|
+
{
|
|
356
|
+
case "darwin": return _("Reveal file in Finder.");
|
|
357
|
+
case "win32": return _("Reveal file in File Explorer.");
|
|
358
|
+
default: return _("Reveal file in File Manager.");
|
|
359
|
+
}
|
|
360
|
+
})();
|
|
361
|
+
|
|
362
|
+
const element = $(util .format (_(`<span>Downloading <a href="#" title="%s">%s</a> completed.</span>`), title, filePath));
|
|
363
|
+
|
|
364
|
+
element .find ("a") .on ("click", event =>
|
|
365
|
+
{
|
|
366
|
+
event .preventDefault ();
|
|
367
|
+
event .stopPropagation ();
|
|
368
|
+
|
|
369
|
+
electron .shell .showItemInFolder (filePath);
|
|
370
|
+
});
|
|
371
|
+
|
|
372
|
+
$(`#${id}`)
|
|
373
|
+
.removeAttr ("id")
|
|
374
|
+
.empty ()
|
|
375
|
+
.append (element);
|
|
376
|
+
|
|
377
|
+
break;
|
|
378
|
+
}
|
|
379
|
+
case "failed":
|
|
380
|
+
{
|
|
381
|
+
$(`#${id}`)
|
|
382
|
+
.removeAttr ("id")
|
|
383
|
+
.text (util .format (_(`Downloading "%s" failed.`), filePath));
|
|
384
|
+
|
|
385
|
+
break;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
313
390
|
evaluateSourceCode (event)
|
|
314
391
|
{
|
|
315
392
|
event .preventDefault ();
|
|
@@ -2339,9 +2339,9 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
2339
2339
|
}
|
|
2340
2340
|
else
|
|
2341
2341
|
{
|
|
2342
|
-
Editor .setFieldValue (this .browser .currentScene, node, node ._startTime, Date .now () / 1000);
|
|
2343
|
-
|
|
2344
2342
|
node ._evenLive = true;
|
|
2343
|
+
|
|
2344
|
+
Editor .setFieldValue (this .browser .currentScene, node, node ._startTime, Date .now () / 1000);
|
|
2345
2345
|
}
|
|
2346
2346
|
}
|
|
2347
2347
|
|
|
@@ -2355,6 +2355,8 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
2355
2355
|
event .preventDefault ();
|
|
2356
2356
|
event .stopImmediatePropagation ();
|
|
2357
2357
|
|
|
2358
|
+
node ._evenLive = false;
|
|
2359
|
+
|
|
2358
2360
|
Editor .setFieldValue (this .browser .currentScene, node, node ._stopTime, Date .now () / 1000);
|
|
2359
2361
|
}
|
|
2360
2362
|
|
|
@@ -8,6 +8,7 @@ const
|
|
|
8
8
|
Editor = require ("../Undo/Editor"),
|
|
9
9
|
UndoManager = require ("../Undo/UndoManager"),
|
|
10
10
|
util = require ("util"),
|
|
11
|
+
Package = require ("../../package.json"),
|
|
11
12
|
_ = require ("../Application/GetText");
|
|
12
13
|
|
|
13
14
|
module .exports = class RouteGraph extends Interface
|
|
@@ -428,7 +429,7 @@ module .exports = class RouteGraph extends Interface
|
|
|
428
429
|
{
|
|
429
430
|
const configNode = readConfig ?? Editor .getConfigNode (this .browser .currentScene, true);
|
|
430
431
|
|
|
431
|
-
configNode .setMetaData ("Sunrize/RouteGraph/pages", string);
|
|
432
|
+
configNode .setMetaData ("Sunrize/RouteGraph/pages", Package .homepage, string);
|
|
432
433
|
|
|
433
434
|
UndoManager .shared .saveNeeded = true;
|
|
434
435
|
}
|
|
@@ -8,6 +8,7 @@ const
|
|
|
8
8
|
Traverse = require ("x3d-traverse"),
|
|
9
9
|
path = require ("path"),
|
|
10
10
|
url = require ("url"),
|
|
11
|
+
Package = require ("../../../package.json"),
|
|
11
12
|
_ = require ("../../Application/GetText");
|
|
12
13
|
|
|
13
14
|
const _tool = Symbol .for ("Sunrize.tool");
|
|
@@ -450,7 +451,7 @@ class X3DNodeTool extends X3DBaseTool
|
|
|
450
451
|
break;
|
|
451
452
|
}
|
|
452
453
|
|
|
453
|
-
this .setMetaData (`${this .getTypeName ()}/${name}`, initialValue);
|
|
454
|
+
this .setMetaData (`${this .getTypeName ()}/${name}`, Package .homepage, initialValue);
|
|
454
455
|
|
|
455
456
|
Editor .setNodeMetaData (this .node, `${this .getTypeName ()}/${name}`, value);
|
|
456
457
|
}
|
|
@@ -4,7 +4,8 @@ const
|
|
|
4
4
|
X3DActiveLayerNodeTool = require ("../Layering/X3DActiveLayerNodeTool"),
|
|
5
5
|
X3D = require ("../../X3D"),
|
|
6
6
|
ActionKeys = require ("../../Application/ActionKeys"),
|
|
7
|
-
Editor = require ("../../Undo/Editor.js")
|
|
7
|
+
Editor = require ("../../Undo/Editor.js"),
|
|
8
|
+
Package = require ("../../../package.json");
|
|
8
9
|
|
|
9
10
|
class X3DGridNodeTool extends X3DActiveLayerNodeTool
|
|
10
11
|
{
|
|
@@ -99,7 +100,7 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
|
|
|
99
100
|
{
|
|
100
101
|
const configNode = Editor .getLayerConfigNode (this .getBrowser (), true);
|
|
101
102
|
|
|
102
|
-
configNode ?.setMetaData (path, field);
|
|
103
|
+
configNode ?.setMetaData (path, Package .homepage, field);
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const
|
|
4
|
+
X3DLightNodeTool = require ("./X3DLightNodeTool"),
|
|
5
|
+
Package = require ("../../../package.json");
|
|
4
6
|
|
|
5
7
|
class DirectionalLightTool extends X3DLightNodeTool
|
|
6
8
|
{
|
|
@@ -35,7 +37,7 @@ class DirectionalLightTool extends X3DLightNodeTool
|
|
|
35
37
|
{
|
|
36
38
|
this .#changing = true;
|
|
37
39
|
|
|
38
|
-
this .setMetaData ("DirectionalLight/location", this .tool .location);
|
|
40
|
+
this .setMetaData ("DirectionalLight/location", Package .homepage, this .tool .location);
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
set_meta_location ()
|
package/src/Undo/Editor.js
CHANGED
|
@@ -9,6 +9,7 @@ const
|
|
|
9
9
|
X3D = require ("../X3D"),
|
|
10
10
|
Traverse = require ("x3d-traverse"),
|
|
11
11
|
UndoManager = require ("./UndoManager"),
|
|
12
|
+
Package = require ("../../package.json"),
|
|
12
13
|
_ = require ("../Application/GetText");
|
|
13
14
|
|
|
14
15
|
module .exports = class Editor
|
|
@@ -1979,7 +1980,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1979
1980
|
|
|
1980
1981
|
undoManager .beginUndo (_("Change Metadata of Node %s"), node .getTypeName ());
|
|
1981
1982
|
|
|
1982
|
-
node .setMetaData (path, value);
|
|
1983
|
+
node .setMetaData (path, Package .homepage, value);
|
|
1983
1984
|
|
|
1984
1985
|
undoManager .registerUndo (() =>
|
|
1985
1986
|
{
|
package/src/assets/X3DUOM.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!-- X3D Unified Object Model (X3DUOM) X3dUnifiedObjectModel-4.1.xml -->
|
|
3
3
|
<!-- Online at https://www.web3d.org/specifications/X3dUnifiedObjectModel-4.1.xml -->
|
|
4
4
|
<!-- This file contains a listing of all abstract and concrete nodes in version 4.1 of X3D -->
|
|
5
|
-
<!-- Generated 2026-10-
|
|
5
|
+
<!-- Generated 2026-10-31-07:00 13:20:31.8989519-07:00 -->
|
|
6
6
|
<X3dUnifiedObjectModel xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
|
|
7
7
|
version="4.1"
|
|
8
8
|
xsd:noNamespaceSchemaLocation="https://www.web3d.org/specifications/X3dUnifiedObjectModel.xsd">
|
|
@@ -21855,7 +21855,8 @@
|
|
|
21855
21855
|
<field name="displacers"
|
|
21856
21856
|
type="MFNode"
|
|
21857
21857
|
accessType="inputOutput"
|
|
21858
|
-
acceptableNodeTypes="HAnimDisplacer"
|
|
21858
|
+
acceptableNodeTypes="HAnimDisplacer"
|
|
21859
|
+
description="Contains zero or more HAnimDisplacer nodes that can animate the HAnimHumanoid skinCoord field."/>
|
|
21859
21860
|
<field name="info"
|
|
21860
21861
|
type="MFString"
|
|
21861
21862
|
accessType="inputOutput"
|
|
@@ -21882,7 +21883,7 @@
|
|
|
21882
21883
|
type="MFNode"
|
|
21883
21884
|
accessType="inputOutput"
|
|
21884
21885
|
acceptableNodeTypes="HAnimJoint"
|
|
21885
|
-
description="The joints field contains a list of USE references for all HAnimJoint node instances found within the preceding skeleton hierarchy."/>
|
|
21886
|
+
description="(Deprecated) The joints field contains a list of USE references for all HAnimJoint node instances found within the preceding skeleton hierarchy."/>
|
|
21886
21887
|
<field name="loa"
|
|
21887
21888
|
type="SFInt32"
|
|
21888
21889
|
accessType="inputOutput"
|
|
@@ -21932,12 +21933,12 @@
|
|
|
21932
21933
|
type="MFNode"
|
|
21933
21934
|
accessType="inputOutput"
|
|
21934
21935
|
acceptableNodeTypes="HAnimSegment"
|
|
21935
|
-
description="The segments field contains a list of USE references for all HAnimSegment node instances found within the preceding skeleton hierarchy."/>
|
|
21936
|
+
description="(Deprecated) The segments field contains a list of USE references for all HAnimSegment node instances found within the preceding skeleton hierarchy."/>
|
|
21936
21937
|
<field name="sites"
|
|
21937
21938
|
type="MFNode"
|
|
21938
21939
|
accessType="inputOutput"
|
|
21939
21940
|
acceptableNodeTypes="HAnimSite"
|
|
21940
|
-
description="sites field contains a list of USE references for all HAnimSite node instances found within the preceding skeleton hierarchy."/>
|
|
21941
|
+
description="(Deprecated) sites field contains a list of USE references for all HAnimSite node instances found within the preceding skeleton hierarchy."/>
|
|
21941
21942
|
<field name="skeletalConfiguration"
|
|
21942
21943
|
type="SFString"
|
|
21943
21944
|
accessType="inputOutput"
|
|
@@ -24354,7 +24355,8 @@
|
|
|
24354
24355
|
type="SFNode"
|
|
24355
24356
|
accessType="inputOutput"
|
|
24356
24357
|
default="NULL"
|
|
24357
|
-
acceptableNodeTypes="X3DCoordinateNode"
|
|
24358
|
+
acceptableNodeTypes="X3DCoordinateNode"
|
|
24359
|
+
description="the coord field is used for HAnimSite objects that have deformable meshes and shall contain coordinates referenced from the mesh in the current object."/>
|
|
24358
24360
|
<field name="description"
|
|
24359
24361
|
type="SFString"
|
|
24360
24362
|
accessType="inputOutput"
|
|
@@ -24362,7 +24364,8 @@
|
|
|
24362
24364
|
<field name="displacers"
|
|
24363
24365
|
type="MFNode"
|
|
24364
24366
|
accessType="inputOutput"
|
|
24365
|
-
acceptableNodeTypes="HAnimDisplacer"
|
|
24367
|
+
acceptableNodeTypes="HAnimDisplacer"
|
|
24368
|
+
description="the displacers field stores HAnimDisplacer objects for a particular HAnimJoint object."/>
|
|
24366
24369
|
<field name="IS"
|
|
24367
24370
|
type="SFNode"
|
|
24368
24371
|
accessType="inputOutput"
|