sunrize 1.11.13 → 1.11.15
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.11.
|
|
4
|
+
"version": "1.11.15",
|
|
5
5
|
"description": "A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
"shell-tools": "^1.1.9"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"@vscode/codicons": "^0.0.
|
|
91
|
+
"@vscode/codicons": "^0.0.44",
|
|
92
92
|
"capitalize": "^2.0.4",
|
|
93
93
|
"console": "^0.7.2",
|
|
94
|
-
"electron": "^39.2.
|
|
94
|
+
"electron": "^39.2.7",
|
|
95
95
|
"electron-prompt": "^1.7.0",
|
|
96
96
|
"electron-squirrel-startup": "^1.0.1",
|
|
97
97
|
"electron-tabs": "^1.0.4",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"jquery-ui-dist": "^1.13.3",
|
|
101
101
|
"jstree": "^3.3.17",
|
|
102
102
|
"material-icons": "^1.13.14",
|
|
103
|
-
"material-symbols": "^0.40.
|
|
103
|
+
"material-symbols": "^0.40.2",
|
|
104
104
|
"md5": "^2.3.0",
|
|
105
105
|
"mime-types": "^3.0.2",
|
|
106
106
|
"monaco-editor": "^0.55.1",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"spectrum-colorpicker2": "^2.0.10",
|
|
110
110
|
"string-similarity": "^4.0.4",
|
|
111
111
|
"tweakpane": "^3.1.10",
|
|
112
|
-
"update-electron-app": "^3.1.
|
|
113
|
-
"x_ite": "^12.2.
|
|
112
|
+
"update-electron-app": "^3.1.2",
|
|
113
|
+
"x_ite": "^12.2.3",
|
|
114
114
|
"x3d-traverse": "^1.0.22"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -94,10 +94,6 @@ module .exports = class Document extends Interface
|
|
|
94
94
|
|
|
95
95
|
electron .ipcRenderer .on ("delete", () => this .delete ());
|
|
96
96
|
|
|
97
|
-
// Selection Menu
|
|
98
|
-
|
|
99
|
-
electron .ipcRenderer .on ("select-all", () => this .selectAll ());
|
|
100
|
-
|
|
101
97
|
// View Menu
|
|
102
98
|
|
|
103
99
|
electron .ipcRenderer .on ("primitive-quality", (event, value) => this .setPrimitiveQuality (value));
|
|
@@ -168,9 +164,12 @@ module .exports = class Document extends Interface
|
|
|
168
164
|
// Connect for Snap Target and Snap Source.
|
|
169
165
|
|
|
170
166
|
$(this .browser .element)
|
|
171
|
-
.on ("mousedown",
|
|
172
|
-
.on ("mouseup",
|
|
173
|
-
.on ("mouseup",
|
|
167
|
+
.on ("mousedown", event => this .onmousedown (event))
|
|
168
|
+
.on ("mouseup", event => this .onsnaptool (event))
|
|
169
|
+
.on ("mouseup", event => this .onselect (event))
|
|
170
|
+
.on ("contextmenu", event => this .showBrowserContextMenu (event));
|
|
171
|
+
|
|
172
|
+
electron .ipcRenderer .on ("document", (event, key, ... args) => this [key] (... args));
|
|
174
173
|
|
|
175
174
|
// Load components.
|
|
176
175
|
|
|
@@ -356,7 +355,7 @@ module .exports = class Document extends Interface
|
|
|
356
355
|
return true;
|
|
357
356
|
}
|
|
358
357
|
|
|
359
|
-
// Menu Accelerators
|
|
358
|
+
// Menu Accelerators Fix for Windows.
|
|
360
359
|
|
|
361
360
|
onkeydown (event)
|
|
362
361
|
{
|
|
@@ -367,9 +366,9 @@ module .exports = class Document extends Interface
|
|
|
367
366
|
if (this .activeElementIsInputOrOutput ())
|
|
368
367
|
break;
|
|
369
368
|
|
|
370
|
-
if (
|
|
369
|
+
if (event .ctrlKey)
|
|
371
370
|
{
|
|
372
|
-
this .selectAll ();
|
|
371
|
+
this .sidebar .outlineEditor .selectAll ();
|
|
373
372
|
return false;
|
|
374
373
|
}
|
|
375
374
|
|
|
@@ -661,15 +660,6 @@ Viewpoint {
|
|
|
661
660
|
this .sidebar .outlineEditor .deleteNodes ();
|
|
662
661
|
}
|
|
663
662
|
|
|
664
|
-
/*
|
|
665
|
-
* Selection Menu
|
|
666
|
-
*/
|
|
667
|
-
|
|
668
|
-
selectAll ()
|
|
669
|
-
{
|
|
670
|
-
this .sidebar .outlineEditor .selectAll ();
|
|
671
|
-
}
|
|
672
|
-
|
|
673
663
|
/*
|
|
674
664
|
* View Menu
|
|
675
665
|
*/
|
|
@@ -1027,7 +1017,7 @@ Viewpoint {
|
|
|
1027
1017
|
{
|
|
1028
1018
|
switch (ActionKeys .value)
|
|
1029
1019
|
{
|
|
1030
|
-
case ActionKeys .
|
|
1020
|
+
case ActionKeys .Shift:
|
|
1031
1021
|
{
|
|
1032
1022
|
if (this .#snapTarget ?._visible .getValue ())
|
|
1033
1023
|
break;
|
|
@@ -1039,7 +1029,7 @@ Viewpoint {
|
|
|
1039
1029
|
this .#snapTarget .onmousedown (event, true);
|
|
1040
1030
|
break;
|
|
1041
1031
|
}
|
|
1042
|
-
case ActionKeys .Option:
|
|
1032
|
+
case ActionKeys .Shift | ActionKeys .Option:
|
|
1043
1033
|
{
|
|
1044
1034
|
if (this .#snapSource ?._visible .getValue ())
|
|
1045
1035
|
break;
|
|
@@ -1087,10 +1077,6 @@ Viewpoint {
|
|
|
1087
1077
|
if (this .#pointer .distance (pointer) > this .browser .getRenderingProperty ("ContentScale"))
|
|
1088
1078
|
return;
|
|
1089
1079
|
|
|
1090
|
-
// Stop event propagation.
|
|
1091
|
-
|
|
1092
|
-
event .preventDefault ();
|
|
1093
|
-
|
|
1094
1080
|
// Select or deselect.
|
|
1095
1081
|
|
|
1096
1082
|
const outlineEditor = this .sidebar .outlineEditor;
|
|
@@ -1262,4 +1248,43 @@ Viewpoint {
|
|
|
1262
1248
|
menu .SnapTarget = this .#snapTarget ?._visible .getValue () ?? false;
|
|
1263
1249
|
menu .SnapSource = this .#snapSource ?._visible .getValue () ?? false;
|
|
1264
1250
|
}
|
|
1251
|
+
|
|
1252
|
+
/**
|
|
1253
|
+
* Context Menu
|
|
1254
|
+
*/
|
|
1255
|
+
|
|
1256
|
+
showBrowserContextMenu (event)
|
|
1257
|
+
{
|
|
1258
|
+
if (event .shiftKey || event .ctrlKey || event .metaKey)
|
|
1259
|
+
return;
|
|
1260
|
+
|
|
1261
|
+
const
|
|
1262
|
+
activeLayer = this .browser .getActiveLayer (),
|
|
1263
|
+
viewpoints = activeLayer .getViewpoints () .get ();
|
|
1264
|
+
|
|
1265
|
+
const menu = [
|
|
1266
|
+
{
|
|
1267
|
+
label: _("Viewpoints"),
|
|
1268
|
+
submenu: viewpoints .filter ((_, index) => index > 0) .map ((viewpointNode, index) => ({
|
|
1269
|
+
label: `${viewpointNode ._description .getValue () || viewpointNode .getDisplayName () || `VP${index + 1}}`}`,
|
|
1270
|
+
args: ["bindViewpoint", index + 1],
|
|
1271
|
+
})),
|
|
1272
|
+
},
|
|
1273
|
+
];
|
|
1274
|
+
|
|
1275
|
+
electron .ipcRenderer .send ("context-menu", "document", menu);
|
|
1276
|
+
}
|
|
1277
|
+
|
|
1278
|
+
bindViewpoint (index)
|
|
1279
|
+
{
|
|
1280
|
+
const
|
|
1281
|
+
activeLayer = this .browser .getActiveLayer (),
|
|
1282
|
+
viewpoints = activeLayer .getViewpoints () .get (),
|
|
1283
|
+
viewpointNode = viewpoints [index];
|
|
1284
|
+
|
|
1285
|
+
if (!viewpointNode)
|
|
1286
|
+
return;
|
|
1287
|
+
|
|
1288
|
+
viewpointNode ._set_bind = true;
|
|
1289
|
+
}
|
|
1265
1290
|
};
|
package/src/Application/Tabs.js
CHANGED
|
@@ -108,6 +108,7 @@ module .exports = new class Tabs
|
|
|
108
108
|
this .forwardToActiveTab ("move-selection-to-snap-target");
|
|
109
109
|
this .forwardToActiveTab ("move-selection-center-to-snap-target");
|
|
110
110
|
|
|
111
|
+
this .forwardToActiveTab ("document");
|
|
111
112
|
this .forwardToActiveTab ("script-editor");
|
|
112
113
|
this .forwardToActiveTab ("animation-members-list");
|
|
113
114
|
this .forwardToActiveTab ("outline-editor");
|
|
@@ -54,6 +54,7 @@ module .exports = class OutlineView extends Interface
|
|
|
54
54
|
this .browser .getBrowserOptions () ._ColorSpace .addInterest ("updateSceneGraph", this);
|
|
55
55
|
this .browser ._activeLayer .addInterest ("updateActiveLayer", this);
|
|
56
56
|
|
|
57
|
+
electron .ipcRenderer .on ("select-all", () => this .selectAll ());
|
|
57
58
|
electron .ipcRenderer .on ("deselect-all", () => this .deselectAll ());
|
|
58
59
|
electron .ipcRenderer .on ("hide-unselected-objects", () => this .hideUnselectedObjects ());
|
|
59
60
|
electron .ipcRenderer .on ("show-selected-objects", () => this .showSelectedObjects ());
|