sunrize 2.0.2 → 2.0.3
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.
|
|
4
|
+
"version": "2.0.3",
|
|
5
5
|
"description": "A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"@vscode/codicons": "^0.0.44",
|
|
92
92
|
"capitalize": "^2.0.4",
|
|
93
93
|
"console": "^0.7.2",
|
|
94
|
-
"electron": "^40.
|
|
94
|
+
"electron": "^40.4.1",
|
|
95
95
|
"electron-prompt": "^1.7.0",
|
|
96
96
|
"electron-squirrel-startup": "^1.0.1",
|
|
97
97
|
"electron-tabs": "^1.0.4",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"string-similarity": "^4.0.4",
|
|
111
111
|
"tweakpane": "^3.1.10",
|
|
112
112
|
"update-electron-app": "^3.1.2",
|
|
113
|
-
"x_ite": "^14.0.
|
|
113
|
+
"x_ite": "^14.0.3",
|
|
114
114
|
"x3d-traverse": "^1.0.22"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -351,6 +351,15 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
351
351
|
|
|
352
352
|
continue;
|
|
353
353
|
}
|
|
354
|
+
case X3D .X3DConstants .Normal:
|
|
355
|
+
{
|
|
356
|
+
menu .push ({
|
|
357
|
+
label: _("Negate Normal Vectors"),
|
|
358
|
+
args: ["negateNormalVectors", element .attr ("id"), executionContext .getId (), node .getId ()],
|
|
359
|
+
});
|
|
360
|
+
|
|
361
|
+
continue;
|
|
362
|
+
}
|
|
354
363
|
case X3D .X3DConstants .X3DPrototypeInstance:
|
|
355
364
|
{
|
|
356
365
|
if (!$.try (() => node .getInnerNode ()))
|
|
@@ -1413,6 +1422,22 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
1413
1422
|
UndoManager .shared .endUndo ();
|
|
1414
1423
|
}
|
|
1415
1424
|
|
|
1425
|
+
async negateNormalVectors (id, executionContextId, nodeId)
|
|
1426
|
+
{
|
|
1427
|
+
const
|
|
1428
|
+
executionContext = this .objects .get (executionContextId),
|
|
1429
|
+
normalNode = this .objects .get (nodeId),
|
|
1430
|
+
normals = normalNode ._vector .map (v => v .negate ());
|
|
1431
|
+
|
|
1432
|
+
// Add undo step.
|
|
1433
|
+
|
|
1434
|
+
UndoManager .shared .beginUndo (_("Negate Normal Vectors"));
|
|
1435
|
+
|
|
1436
|
+
Editor .setFieldValue (executionContext, normalNode, normalNode ._vector, normals);
|
|
1437
|
+
|
|
1438
|
+
UndoManager .shared .endUndo ();
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1416
1441
|
async convertPixelTextureToImageTexture (id, executionContextId, nodeId)
|
|
1417
1442
|
{
|
|
1418
1443
|
const
|
|
@@ -1917,6 +1917,37 @@ module .exports = class OutlineView extends Interface
|
|
|
1917
1917
|
if (description)
|
|
1918
1918
|
title += `Description:\n\n${description}`;
|
|
1919
1919
|
|
|
1920
|
+
for (const type of node .getType () .toReversed ())
|
|
1921
|
+
{
|
|
1922
|
+
switch (type)
|
|
1923
|
+
{
|
|
1924
|
+
case X3D .X3DConstants .X3DGeometryNode:
|
|
1925
|
+
{
|
|
1926
|
+
const numVertices = node .getVertices () .length / 4;
|
|
1927
|
+
|
|
1928
|
+
title += "\n\n";
|
|
1929
|
+
|
|
1930
|
+
switch (node .getGeometryType ())
|
|
1931
|
+
{
|
|
1932
|
+
case 0:
|
|
1933
|
+
title += `Number of Points: ${(numVertices) .toLocaleString (_.locale)}`;
|
|
1934
|
+
break
|
|
1935
|
+
case 1:
|
|
1936
|
+
title += `Number of Lines: ${(numVertices / 2) .toLocaleString (_.locale)}`;
|
|
1937
|
+
break
|
|
1938
|
+
case 2:
|
|
1939
|
+
case 3:
|
|
1940
|
+
title += `Number of Triangles: ${(numVertices / 3) .toLocaleString (_.locale)}`;
|
|
1941
|
+
break
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
continue;
|
|
1945
|
+
}
|
|
1946
|
+
default:
|
|
1947
|
+
continue;
|
|
1948
|
+
}
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1920
1951
|
return title;
|
|
1921
1952
|
}
|
|
1922
1953
|
|
|
@@ -37,7 +37,7 @@ module .exports = new class SceneProperties extends Dialog
|
|
|
37
37
|
|
|
38
38
|
this .tabs .addTextTab ("profile-and-components", _("Profile & Components"));
|
|
39
39
|
this .tabs .addTextTab ("units", _("Units"));
|
|
40
|
-
this .tabs .addTextTab ("meta-data", _("
|
|
40
|
+
this .tabs .addTextTab ("meta-data", _("Metadata"));
|
|
41
41
|
this .tabs .addTextTab ("world-info", _("World Info"));
|
|
42
42
|
|
|
43
43
|
this .tabs .setup ();
|
package/src/Undo/Editor.js
CHANGED
|
@@ -692,7 +692,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
692
692
|
|
|
693
693
|
static getProfileAndComponentsFromUsedComponents (browser, usedComponents)
|
|
694
694
|
{
|
|
695
|
-
const profiles = ["Interactive", "Interchange", "Immersive"] .map (name =>
|
|
695
|
+
const profiles = ["Interactive", "Interchange", "Immersive", "Full"] .map (name =>
|
|
696
696
|
{
|
|
697
697
|
return { profile: browser .getProfile (name), components: new Set (usedComponents) };
|
|
698
698
|
});
|