sunrize 2.6.7 → 2.7.0
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 +40 -1
- package/src/Application/Dashboard.js +1 -1
- package/src/Application/Document.js +12 -29
- package/src/Editors/AnimationEditor.js +28 -0
- package/src/Editors/OutlineEditor.js +13 -0
- package/src/Editors/OutlineView.js +29 -0
- package/src/Tools/SnapTool/X3DSnapNodeTool.js +3 -2
- package/src/Undo/Editor.js +8 -5
- package/src/assets/X3DUOM.xml +4 -4
- package/src/assets/html/window.html +1 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"description": "Sunrize — A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"@electron-forge/publisher-github": "^8.0.1",
|
|
99
99
|
"@eslint/js": "^10.0.1",
|
|
100
100
|
"@reforged/maker-appimage": "^6.0.0",
|
|
101
|
-
"eslint": "^10.
|
|
101
|
+
"eslint": "^10.15.0",
|
|
102
102
|
"globals": "^17.14.0",
|
|
103
103
|
"shell-tools": "^1.1.9"
|
|
104
104
|
},
|
|
@@ -106,7 +106,7 @@
|
|
|
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.3.2",
|
|
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.
|
|
117
|
+
"material-symbols": "^0.49.0",
|
|
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.
|
|
127
|
+
"x_ite": "^16.8.0",
|
|
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",
|
|
@@ -77,6 +77,7 @@ module .exports = class Application
|
|
|
77
77
|
recentDocuments: [ ],
|
|
78
78
|
recentLocations: [ ],
|
|
79
79
|
size: [1100, 680],
|
|
80
|
+
zoomFactor: 1,
|
|
80
81
|
});
|
|
81
82
|
|
|
82
83
|
electron .nativeTheme .themeSource = this .config .themeSource;
|
|
@@ -645,6 +646,22 @@ module .exports = class Application
|
|
|
645
646
|
},
|
|
646
647
|
],
|
|
647
648
|
},
|
|
649
|
+
{ type: "separator" },
|
|
650
|
+
{
|
|
651
|
+
label: _("Zoom In"),
|
|
652
|
+
accelerator: "CmdOrCtrl+Plus",
|
|
653
|
+
click: () => this .zoomIn (),
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
label: _("Zoom Out"),
|
|
657
|
+
accelerator: "CmdOrCtrl+-",
|
|
658
|
+
click: () => this .zoomOut (),
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
label: _("Reset Zoom"),
|
|
662
|
+
accelerator: "CmdOrCtrl+0",
|
|
663
|
+
click: () => this .resetZoom (),
|
|
664
|
+
},
|
|
648
665
|
],
|
|
649
666
|
},
|
|
650
667
|
{
|
|
@@ -825,7 +842,7 @@ module .exports = class Application
|
|
|
825
842
|
},
|
|
826
843
|
{
|
|
827
844
|
label: _("Display Timings"),
|
|
828
|
-
accelerator: "CmdOrCtrl+Plus",
|
|
845
|
+
accelerator: "Alt+CmdOrCtrl+Plus",
|
|
829
846
|
type: "checkbox",
|
|
830
847
|
checked: this .menuOptions .timings,
|
|
831
848
|
click: () => this .mainWindow .webContents .send ("display-timings", !this .menuOptions .timings),
|
|
@@ -995,6 +1012,7 @@ module .exports = class Application
|
|
|
995
1012
|
nodeIntegration: true,
|
|
996
1013
|
contextIsolation: false,
|
|
997
1014
|
webviewTag: true,
|
|
1015
|
+
zoomFactor: this .config .zoomFactor,
|
|
998
1016
|
},
|
|
999
1017
|
});
|
|
1000
1018
|
|
|
@@ -1021,6 +1039,27 @@ module .exports = class Application
|
|
|
1021
1039
|
this .ready = true;
|
|
1022
1040
|
}
|
|
1023
1041
|
|
|
1042
|
+
zoomIn ()
|
|
1043
|
+
{
|
|
1044
|
+
this .config .zoomFactor = Math .min (this .config .zoomFactor + 1/64, 5);
|
|
1045
|
+
|
|
1046
|
+
this .mainWindow .webContents .setZoomFactor (this .config .zoomFactor);
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
zoomOut ()
|
|
1050
|
+
{
|
|
1051
|
+
this .config .zoomFactor = Math .max (this .config .zoomFactor - 1/64, 0.5);
|
|
1052
|
+
|
|
1053
|
+
this .mainWindow .webContents .setZoomFactor (this .config .zoomFactor);
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
resetZoom ()
|
|
1057
|
+
{
|
|
1058
|
+
this .config .zoomFactor = 1;
|
|
1059
|
+
|
|
1060
|
+
this .mainWindow .webContents .setZoomFactor (this .config .zoomFactor);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1024
1063
|
onactivate ()
|
|
1025
1064
|
{
|
|
1026
1065
|
if (electron .BrowserWindow .getAllWindows () .length)
|
|
@@ -269,7 +269,7 @@ module .exports = class Dashboard extends Interface
|
|
|
269
269
|
viewpointNode = this .browser .getActiveViewpoint (),
|
|
270
270
|
straighten = this .browser .getBrowserOption ("StraightenHorizon");
|
|
271
271
|
|
|
272
|
-
const [, bbox] = Editor .getModelMatricesAndBBoxes (executionContext, layerNode, nodes);
|
|
272
|
+
const [, bbox] = Editor .getModelMatricesAndBBoxes (executionContext, layerNode, nodes, true);
|
|
273
273
|
|
|
274
274
|
viewpointNode .lookAtBBox ({ layerNode, bbox, straighten });
|
|
275
275
|
}
|
|
@@ -1190,7 +1190,7 @@ module .exports = class Document extends Interface
|
|
|
1190
1190
|
|
|
1191
1191
|
this .#pointer .assign (this .browser .getPointerFromEvent (event));
|
|
1192
1192
|
|
|
1193
|
-
if (this .browser .touch (... this .#pointer))
|
|
1193
|
+
if (this .browser .touch (X3D .PointingType .TOUCH, ... this .#pointer))
|
|
1194
1194
|
{
|
|
1195
1195
|
if (this .browser .getHit () .sensors .size)
|
|
1196
1196
|
return;
|
|
@@ -1272,7 +1272,7 @@ module .exports = class Document extends Interface
|
|
|
1272
1272
|
|
|
1273
1273
|
const outlineEditor = this .sidebar .outlineEditor;
|
|
1274
1274
|
|
|
1275
|
-
if (!this .browser .touch (... pointer))
|
|
1275
|
+
if (!this .browser .touch (X3D .PointingType .TOUCH, ... pointer))
|
|
1276
1276
|
{
|
|
1277
1277
|
outlineEditor .deselectAll ();
|
|
1278
1278
|
return;
|
|
@@ -1281,44 +1281,27 @@ module .exports = class Document extends Interface
|
|
|
1281
1281
|
// Select.
|
|
1282
1282
|
|
|
1283
1283
|
const
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
tool
|
|
1287
|
-
|
|
1284
|
+
hit = this .browser .getHit (),
|
|
1285
|
+
parentNode = hit .parentNode,
|
|
1286
|
+
tool = parentNode .getExecutionContext () .getOuterNode () ?.getTool () ?.valueOf (),
|
|
1287
|
+
parent = tool ?? parentNode .getExecutionContext () .getOuterNode () ?? parentNode,
|
|
1288
|
+
node = parent .isPrivate () ? hit .shapeNode : parent;
|
|
1288
1289
|
|
|
1289
|
-
outlineEditor .expandTo (node, { expandObject: true, expandInlineNodes: true, expandAll:
|
|
1290
|
+
outlineEditor .expandTo (node, { expandObject: true, expandInlineNodes: true, expandAll: false });
|
|
1290
1291
|
|
|
1291
1292
|
let elements = outlineEditor .sceneGraph .find (`.node[node-id=${node .getId ()}]`);
|
|
1292
1293
|
|
|
1293
1294
|
if (!elements .length)
|
|
1294
1295
|
return;
|
|
1295
1296
|
|
|
1296
|
-
if (outlineEditor .isEditable (elements))
|
|
1297
|
-
{
|
|
1298
|
-
if (tool)
|
|
1299
|
-
{
|
|
1300
|
-
elements = Array .from (elements);
|
|
1301
|
-
}
|
|
1302
|
-
else
|
|
1303
|
-
{
|
|
1304
|
-
const parentElements = Array .from (elements) .flatMap (element =>
|
|
1305
|
-
{
|
|
1306
|
-
const parentElements = Array .from ($(element) .parent () .closest (".node", outlineEditor .sceneGraph));
|
|
1307
|
-
|
|
1308
|
-
return parentElements .length ? parentElements : element;
|
|
1309
|
-
});
|
|
1310
|
-
|
|
1311
|
-
elements = parentElements .map ((element, i) => outlineEditor .getNode ($(element)) .getType () .includes (X3D .X3DConstants .X3DGroupingNode) ? parentElements [i] : elements [i]);
|
|
1312
|
-
}
|
|
1313
|
-
}
|
|
1314
|
-
else
|
|
1297
|
+
if (!outlineEditor .isEditable (elements))
|
|
1315
1298
|
{
|
|
1316
1299
|
while (!outlineEditor .isEditable (elements))
|
|
1317
1300
|
elements = elements .parent () .closest (".node, .scene", outlineEditor .sceneGraph);
|
|
1318
|
-
|
|
1319
|
-
elements = Array .from (elements);
|
|
1320
1301
|
}
|
|
1321
1302
|
|
|
1303
|
+
elements = Array .from (elements);
|
|
1304
|
+
|
|
1322
1305
|
for (const [i, element] of elements .entries ())
|
|
1323
1306
|
outlineEditor .selectNodeElement ($(element), { add: (event .shiftKey || event .metaKey) || i > 0, target: true });
|
|
1324
1307
|
|
|
@@ -1359,7 +1342,7 @@ module .exports = class Document extends Interface
|
|
|
1359
1342
|
executionContext = this .browser .currentScene,
|
|
1360
1343
|
layerNode = this .browser .getActiveLayer (),
|
|
1361
1344
|
nodes = selection .nodes,
|
|
1362
|
-
[, bbox] = Editor .getModelMatricesAndBBoxes (executionContext, layerNode, nodes);
|
|
1345
|
+
[, bbox] = Editor .getModelMatricesAndBBoxes (executionContext, layerNode, nodes, true);
|
|
1363
1346
|
|
|
1364
1347
|
if (!bbox .size .norm ())
|
|
1365
1348
|
return;
|
|
@@ -151,6 +151,15 @@ module .exports = class AnimationEditor extends Interface
|
|
|
151
151
|
.appendTo (this .controls)
|
|
152
152
|
.on ("click", () => this .toggleLoop ());
|
|
153
153
|
|
|
154
|
+
this .reverseIcon = $("<span></span>")
|
|
155
|
+
.addClass ("material-symbols-outlined")
|
|
156
|
+
.css ("translate", "0 -1px")
|
|
157
|
+
.css ("scale", "0.7 -0.7")
|
|
158
|
+
.attr ("title", _("Reverse animation."))
|
|
159
|
+
.text ("keyboard_return")
|
|
160
|
+
.appendTo (this .controls)
|
|
161
|
+
.on ("click", () => this .toggleReverse ());
|
|
162
|
+
|
|
154
163
|
this .frameInput = $("<input></input>")
|
|
155
164
|
.addClass ("input")
|
|
156
165
|
.css ("width", "70px")
|
|
@@ -335,6 +344,7 @@ module .exports = class AnimationEditor extends Interface
|
|
|
335
344
|
if (this .timeSensor)
|
|
336
345
|
{
|
|
337
346
|
this .timeSensor ._loop .removeInterest ("set_loop", this);
|
|
347
|
+
this .timeSensor ._reverse .removeInterest ("set_reverse", this);
|
|
338
348
|
this .timeSensor ._isActive .removeInterest ("set_active", this);
|
|
339
349
|
this .timeSensor ._fraction_changed .removeInterest ("set_fraction", this);
|
|
340
350
|
|
|
@@ -374,6 +384,7 @@ module .exports = class AnimationEditor extends Interface
|
|
|
374
384
|
.find (node => node .getValue () .getType () .includes (X3D .X3DConstants .TimeSensor)) .getValue ();
|
|
375
385
|
|
|
376
386
|
this .timeSensor ._loop .addInterest ("set_loop", this);
|
|
387
|
+
this .timeSensor ._reverse .addInterest ("set_reverse", this);
|
|
377
388
|
this .timeSensor ._isActive .addInterest ("set_active", this);
|
|
378
389
|
this .timeSensor ._fraction_changed .addInterest ("set_fraction", this);
|
|
379
390
|
|
|
@@ -381,6 +392,7 @@ module .exports = class AnimationEditor extends Interface
|
|
|
381
392
|
this .timeSensor ._range = [0, 0, 1];
|
|
382
393
|
|
|
383
394
|
this .set_loop (this .timeSensor ._loop);
|
|
395
|
+
this .set_reverse (this .timeSensor ._reverse);
|
|
384
396
|
this .set_active (this .timeSensor ._isActive);
|
|
385
397
|
|
|
386
398
|
// Show Member List
|
|
@@ -448,6 +460,7 @@ module .exports = class AnimationEditor extends Interface
|
|
|
448
460
|
this .toggleAnimationIcon,
|
|
449
461
|
this .lastFrameIcon,
|
|
450
462
|
this .loopIcon,
|
|
463
|
+
this .reverseIcon,
|
|
451
464
|
this .frameInput,
|
|
452
465
|
this .propertiesIcon,
|
|
453
466
|
this .keyTypeElement,
|
|
@@ -1946,6 +1959,13 @@ module .exports = class AnimationEditor extends Interface
|
|
|
1946
1959
|
node ._evenLive = true;
|
|
1947
1960
|
}
|
|
1948
1961
|
|
|
1962
|
+
toggleReverse ()
|
|
1963
|
+
{
|
|
1964
|
+
const node = this .timeSensor;
|
|
1965
|
+
|
|
1966
|
+
Editor .setFieldValue (this .browser .currentScene, node, node ._reverse, !node ._reverse .getValue ());
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1949
1969
|
showProperties ()
|
|
1950
1970
|
{
|
|
1951
1971
|
require ("../Controls/AnimationPropertiesPopover");
|
|
@@ -2013,6 +2033,14 @@ module .exports = class AnimationEditor extends Interface
|
|
|
2013
2033
|
this .loopIcon .removeClass ("active");
|
|
2014
2034
|
}
|
|
2015
2035
|
|
|
2036
|
+
set_reverse (reverse)
|
|
2037
|
+
{
|
|
2038
|
+
if (reverse .getValue ())
|
|
2039
|
+
this .reverseIcon .addClass ("active");
|
|
2040
|
+
else
|
|
2041
|
+
this .reverseIcon .removeClass ("active");
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2016
2044
|
set_active (active)
|
|
2017
2045
|
{
|
|
2018
2046
|
if (!active .getValue ())
|
|
@@ -2376,6 +2376,19 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
2376
2376
|
node ._evenLive = true;
|
|
2377
2377
|
}
|
|
2378
2378
|
|
|
2379
|
+
reverseNode (event)
|
|
2380
|
+
{
|
|
2381
|
+
const
|
|
2382
|
+
target = $(event .target),
|
|
2383
|
+
element = target .closest (".node, .imported-node, .exported-node", this .sceneGraph),
|
|
2384
|
+
node = this .getNode (element);
|
|
2385
|
+
|
|
2386
|
+
event .preventDefault ();
|
|
2387
|
+
event .stopImmediatePropagation ();
|
|
2388
|
+
|
|
2389
|
+
Editor .setFieldValue (this .browser .currentScene, node, node ._reverse, !node ._reverse .getValue ());
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2379
2392
|
addBooleanField (button)
|
|
2380
2393
|
{
|
|
2381
2394
|
const
|
|
@@ -334,6 +334,10 @@ module .exports = class OutlineView extends Interface
|
|
|
334
334
|
this .loopNode (event);
|
|
335
335
|
break;
|
|
336
336
|
|
|
337
|
+
case "reverse-node":
|
|
338
|
+
this .reverseNode (event);
|
|
339
|
+
break;
|
|
340
|
+
|
|
337
341
|
case "reload-node":
|
|
338
342
|
this .reloadNode (event);
|
|
339
343
|
break;
|
|
@@ -1188,6 +1192,7 @@ module .exports = class OutlineView extends Interface
|
|
|
1188
1192
|
node ._isActive .addFieldCallback (this .#updateNodePlaySymbol, this .updateNodePlay .bind (this, node));
|
|
1189
1193
|
node ._isPaused .addFieldCallback (this .#updateNodePlaySymbol, this .updateNodePlay .bind (this, node));
|
|
1190
1194
|
node ._loop .addFieldCallback (this .#updateNodePlaySymbol, this .updateNodePlay .bind (this, node));
|
|
1195
|
+
node ._reverse .addFieldCallback (this .#updateNodePlaySymbol, this .updateNodePlay .bind (this, node));
|
|
1191
1196
|
|
|
1192
1197
|
buttons .push ($("<span></span>")
|
|
1193
1198
|
.attr ("order", "5")
|
|
@@ -1216,6 +1221,19 @@ module .exports = class OutlineView extends Interface
|
|
|
1216
1221
|
.text ("repeat"));
|
|
1217
1222
|
}
|
|
1218
1223
|
|
|
1224
|
+
if (node .getFieldDefinitions () .get ("reverse"))
|
|
1225
|
+
{
|
|
1226
|
+
buttons .push ($("<span></span>")
|
|
1227
|
+
.attr ("order", "8")
|
|
1228
|
+
.attr ("title", _("Toggle reverse."))
|
|
1229
|
+
.attr ("action", "reverse-node")
|
|
1230
|
+
.css ("translate", "0 -1px")
|
|
1231
|
+
.css ("scale", "1 -1")
|
|
1232
|
+
.addClass (["button", "material-symbols-outlined"])
|
|
1233
|
+
.addClass (node ._reverse .getValue () ? "on" : "off")
|
|
1234
|
+
.text ("keyboard_return"));
|
|
1235
|
+
}
|
|
1236
|
+
|
|
1219
1237
|
if (!node ._enabled .getValue ())
|
|
1220
1238
|
buttons .slice (-3) .forEach (button => button .hide ());
|
|
1221
1239
|
|
|
@@ -1416,6 +1434,14 @@ module .exports = class OutlineView extends Interface
|
|
|
1416
1434
|
.removeClass (["on", "off"])
|
|
1417
1435
|
.addClass (node ._loop .getValue () ? "on" : "off"));
|
|
1418
1436
|
|
|
1437
|
+
buttons .push (this .sceneGraph
|
|
1438
|
+
.find (`.node[node-id=${node .getId ()}],
|
|
1439
|
+
.imported-node[node-id=${node .getId ()}],
|
|
1440
|
+
.exported-node[node-id=${node .getId ()}]`)
|
|
1441
|
+
.find ("> .item [action=reverse-node]")
|
|
1442
|
+
.removeClass (["on", "off"])
|
|
1443
|
+
.addClass (node ._reverse .getValue () ? "on" : "off"));
|
|
1444
|
+
|
|
1419
1445
|
if (node ._enabled .getValue ())
|
|
1420
1446
|
buttons .slice (-3) .forEach (button => button .show ());
|
|
1421
1447
|
else
|
|
@@ -3154,6 +3180,7 @@ module .exports = class OutlineView extends Interface
|
|
|
3154
3180
|
node ._isActive .removeFieldCallback (this .#updateNodePlaySymbol);
|
|
3155
3181
|
node ._isPaused .removeFieldCallback (this .#updateNodePlaySymbol);
|
|
3156
3182
|
node ._loop .removeFieldCallback (this .#updateNodePlaySymbol);
|
|
3183
|
+
node ._reverse .removeFieldCallback (this .#updateNodePlaySymbol);
|
|
3157
3184
|
continue;
|
|
3158
3185
|
}
|
|
3159
3186
|
case X3D .X3DConstants .X3DBindableNode:
|
|
@@ -3396,6 +3423,8 @@ module .exports = class OutlineView extends Interface
|
|
|
3396
3423
|
|
|
3397
3424
|
loopNode (event) { }
|
|
3398
3425
|
|
|
3426
|
+
reverseNode (event) { }
|
|
3427
|
+
|
|
3399
3428
|
reloadNode (event)
|
|
3400
3429
|
{
|
|
3401
3430
|
const
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
const
|
|
4
4
|
X3DActiveLayerNodeTool = require ("../Layering/X3DActiveLayerNodeTool"),
|
|
5
5
|
ActionKeys = require ("../../Application/ActionKeys"),
|
|
6
|
+
X3D = require ("../../X3D"),
|
|
6
7
|
$ = require ("jquery");
|
|
7
8
|
|
|
8
9
|
class X3DSnapNodeTool extends X3DActiveLayerNodeTool
|
|
@@ -42,7 +43,7 @@ class X3DSnapNodeTool extends X3DActiveLayerNodeTool
|
|
|
42
43
|
|
|
43
44
|
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
44
45
|
|
|
45
|
-
if (!this .getBrowser () .touch (x, y))
|
|
46
|
+
if (!this .getBrowser () .touch (X3D .PointingType .TOUCH, x, y))
|
|
46
47
|
{
|
|
47
48
|
this ._visible = false;
|
|
48
49
|
return;
|
|
@@ -70,7 +71,7 @@ class X3DSnapNodeTool extends X3DActiveLayerNodeTool
|
|
|
70
71
|
{
|
|
71
72
|
const { x, y } = this .getBrowser () .getPointerFromEvent (event);
|
|
72
73
|
|
|
73
|
-
if (!this .getBrowser () .touch (x, y))
|
|
74
|
+
if (!this .getBrowser () .touch (X3D .PointingType .TOUCH, x, y))
|
|
74
75
|
return;
|
|
75
76
|
|
|
76
77
|
// Stop event propagation.
|
package/src/Undo/Editor.js
CHANGED
|
@@ -2759,7 +2759,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2759
2759
|
static moveNodesToTarget (executionContext, layerNode, nodes, targetPosition, targetNormal, sourcePosition, sourceNormal, moveCenter, undoManager = UndoManager .shared)
|
|
2760
2760
|
{
|
|
2761
2761
|
const
|
|
2762
|
-
[values, bbox] = this .getModelMatricesAndBBoxes (executionContext, layerNode, nodes),
|
|
2762
|
+
[values, bbox] = this .getModelMatricesAndBBoxes (executionContext, layerNode, nodes, true),
|
|
2763
2763
|
bboxCenter = bbox .center;
|
|
2764
2764
|
|
|
2765
2765
|
if (moveCenter)
|
|
@@ -2947,7 +2947,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2947
2947
|
* @param {Array<X3DNode>} nodes
|
|
2948
2948
|
* @returns {[Map<X3DNode,Box3[]>,Box3]}
|
|
2949
2949
|
*/
|
|
2950
|
-
static getModelMatricesAndBBoxes (executionContext, layerNode, nodes)
|
|
2950
|
+
static getModelMatricesAndBBoxes (executionContext, layerNode, nodes, visible)
|
|
2951
2951
|
{
|
|
2952
2952
|
const
|
|
2953
2953
|
values = new Map (),
|
|
@@ -2957,7 +2957,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2957
2957
|
{
|
|
2958
2958
|
const
|
|
2959
2959
|
innerNode = $.try (() => node .getInnerNode ()),
|
|
2960
|
-
modelMatrices = this .getModelMatrices (executionContext, layerNode, node, false);
|
|
2960
|
+
modelMatrices = this .getModelMatrices (executionContext, layerNode, node, false, visible);
|
|
2961
2961
|
|
|
2962
2962
|
if (!innerNode)
|
|
2963
2963
|
continue;
|
|
@@ -3021,7 +3021,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
3021
3021
|
* @param {boolean} addSelf
|
|
3022
3022
|
* @returns {Array<Matrix4>}
|
|
3023
3023
|
*/
|
|
3024
|
-
static getModelMatrices (executionContext, layerNode, node, addSelf
|
|
3024
|
+
static getModelMatrices (executionContext, layerNode, node, addSelf, visible)
|
|
3025
3025
|
{
|
|
3026
3026
|
node = node .valueOf ();
|
|
3027
3027
|
|
|
@@ -3029,7 +3029,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
3029
3029
|
hierarchies = Traverse .find (executionContext, node, Traverse .ROOT_NODES),
|
|
3030
3030
|
modelMatrices = [ ];
|
|
3031
3031
|
|
|
3032
|
-
for (const hierarchy of hierarchies)
|
|
3032
|
+
HIERARCHY: for (const hierarchy of hierarchies)
|
|
3033
3033
|
{
|
|
3034
3034
|
const modelMatrix = new X3D .Matrix4 ();
|
|
3035
3035
|
|
|
@@ -3046,6 +3046,9 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
3046
3046
|
continue;
|
|
3047
3047
|
}
|
|
3048
3048
|
|
|
3049
|
+
if (visible && object .getType () .includes (X3D .X3DConstants .X3DBoundedObject) && !object ._visible .getValue ())
|
|
3050
|
+
continue HIERARCHY;
|
|
3051
|
+
|
|
3049
3052
|
if (!object .getType () .includes (X3D .X3DConstants .X3DTransformMatrix3DNode))
|
|
3050
3053
|
continue;
|
|
3051
3054
|
|
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-
|
|
5
|
+
<!-- Generated 2026-11-08-08:00 08:49:21.9672839-08: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">
|
|
@@ -291,7 +291,7 @@
|
|
|
291
291
|
appinfo="containerFieldChoicesAudioClip lists the allowed containerField enumeration values for AudioClip node: default "source" if parent node is Sound node, "inputs" if parent is part of audio graph, otherwise "children" if parent node is LoadSensor."
|
|
292
292
|
documentation="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#containerField">
|
|
293
293
|
<enumeration value="children"
|
|
294
|
-
appinfo="parent node is X3DSoundChannelNode, X3DSoundDestinationNode, or
|
|
294
|
+
appinfo="parent node is X3DSoundChannelNode, X3DSoundDestinationNode, X3DSoundProcessingNode or LoadSensor"/>
|
|
295
295
|
<enumeration value="source"
|
|
296
296
|
appinfo="parent node is Sound node (legacy X3D3 SFNode source is allowed content model, prefer X3D4 MFNode children)"/>
|
|
297
297
|
<enumeration value="watchList"
|
|
@@ -299,7 +299,7 @@
|
|
|
299
299
|
</SimpleType>
|
|
300
300
|
<SimpleType name="containerFieldChoicesAudioGraph"
|
|
301
301
|
baseType="xs:NMTOKEN"
|
|
302
|
-
appinfo="
|
|
302
|
+
appinfo="containerFieldChoicesAudioGraph lists the allowed containerField enumeration values for audio graph nodes: default "children" if parent is part of audio graph, "source" if parent node is Sound node, otherwise "outputs" signal is provided to this node by parent ChannelSplitter node."
|
|
303
303
|
documentation="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#containerField">
|
|
304
304
|
<enumeration value="children"
|
|
305
305
|
appinfo="provide inputs to parent (X3DSoundChannelNode, X3DSoundDestinationNode, X3DSoundProcessingNode) as part of audio graph, otherwise standalone as childe in scene graph"/>
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
appinfo="containerFieldChoicesSoundSource lists the allowed containerField enumeration values for X3DSoundSourceNode elements: default "source" if parent node is Sound node, otherwise "inputs" if parent node is another node in audio graph."
|
|
411
411
|
documentation="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html#containerField">
|
|
412
412
|
<enumeration value="children"
|
|
413
|
-
appinfo="parent node is X3DSoundChannelNode, X3DSoundDestinationNode, or
|
|
413
|
+
appinfo="parent node is X3DSoundChannelNode, X3DSoundDestinationNode, X3DSoundProcessingNode or LoadSensor"/>
|
|
414
414
|
<enumeration value="source"
|
|
415
415
|
appinfo="parent node is Sound node (legacy X3D3 SFNode source is allowed content model, prefer X3D4 MFNode children)"/>
|
|
416
416
|
</SimpleType>
|