sunrize 1.8.2 → 1.8.4
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 +3 -3
- package/src/Application/CSS.js +6 -6
- package/src/Editors/OutlineEditor.js +7 -12
- package/src/Editors/Primitives.js +45 -1
- package/src/X3D.js +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.4",
|
|
5
5
|
"description": "A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
"dependencies": {
|
|
91
91
|
"capitalize": "^2.0.4",
|
|
92
92
|
"console": "^0.7.2",
|
|
93
|
-
"electron": "^35.2.
|
|
93
|
+
"electron": "^35.2.1",
|
|
94
94
|
"electron-prompt": "^1.7.0",
|
|
95
95
|
"electron-squirrel-startup": "^1.0.1",
|
|
96
96
|
"electron-tabs": "^1.0.4",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"string-similarity": "^4.0.4",
|
|
110
110
|
"tweakpane": "^3.1.10",
|
|
111
111
|
"update-electron-app": "^3.1.1",
|
|
112
|
-
"x_ite": "^11.5.
|
|
112
|
+
"x_ite": "^11.5.5",
|
|
113
113
|
"x3d-traverse": "^1.0.12"
|
|
114
114
|
}
|
|
115
115
|
}
|
package/src/Application/CSS.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict"
|
|
1
|
+
"use strict";
|
|
2
2
|
|
|
3
|
-
const $ = require ("jquery")
|
|
3
|
+
const $ = require ("jquery");
|
|
4
4
|
|
|
5
5
|
// CSS
|
|
6
6
|
|
|
7
|
-
const colorScheme = window .matchMedia ("(prefers-color-scheme: dark)")
|
|
7
|
+
const colorScheme = window .matchMedia ("(prefers-color-scheme: dark)");
|
|
8
8
|
|
|
9
9
|
colorScheme .addEventListener ("change", event => changeColorScheme (event));
|
|
10
10
|
|
|
11
|
-
changeColorScheme (colorScheme)
|
|
11
|
+
changeColorScheme (colorScheme);
|
|
12
12
|
|
|
13
13
|
function changeColorScheme (event)
|
|
14
14
|
{
|
|
15
15
|
$("body")
|
|
16
16
|
.removeClass (["light", "dark"])
|
|
17
|
-
.addClass (event .matches ? "dark" : "light")
|
|
17
|
+
.addClass (event .matches ? "dark" : "light");
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
module .exports = { colorScheme }
|
|
20
|
+
module .exports = { colorScheme };
|
|
@@ -1084,7 +1084,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
1084
1084
|
UndoManager .shared .endUndo ();
|
|
1085
1085
|
|
|
1086
1086
|
if (element .hasClass ("selected"))
|
|
1087
|
-
require ("../Application/Selection") .add (
|
|
1087
|
+
require ("../Application/Selection") .add (copy);
|
|
1088
1088
|
}
|
|
1089
1089
|
|
|
1090
1090
|
async addParentGroup (id, executionContextId, nodeId, component, typeName, fieldName)
|
|
@@ -1783,18 +1783,13 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
1783
1783
|
}
|
|
1784
1784
|
case X3D .X3DConstants .X3DComposedGeometryNode:
|
|
1785
1785
|
{
|
|
1786
|
-
let
|
|
1787
|
-
verticesPerPolygon = node .getVerticesPerPolygon (),
|
|
1788
|
-
numVertices = node .getNumVertices ();
|
|
1789
|
-
|
|
1790
|
-
// Set size to a multiple of vertexCount.
|
|
1791
|
-
numVertices -= numVertices % verticesPerPolygon;
|
|
1792
|
-
|
|
1793
1786
|
const
|
|
1794
|
-
normalPerVertex
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1787
|
+
normalPerVertex = node ._normalPerVertex .getValue (),
|
|
1788
|
+
verticesPerPolygon = node .getVerticesPerPolygon (),
|
|
1789
|
+
numVertices = node .getNumVertices (),
|
|
1790
|
+
normals = node .createNormals (verticesPerPolygon, numVertices),
|
|
1791
|
+
normalNode = executionContext .createNode ("Normal") .getValue (),
|
|
1792
|
+
vector = normalNode ._vector;
|
|
1798
1793
|
|
|
1799
1794
|
for (let i = 0; i < numVertices; ++ i)
|
|
1800
1795
|
{
|
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
module .exports = [
|
|
4
|
+
{
|
|
5
|
+
componentInfo: { name: "EnvironmentalEffects" },
|
|
6
|
+
typeName: "Background CityNight",
|
|
7
|
+
x3dSyntax: `
|
|
8
|
+
DEF CityNight Background {
|
|
9
|
+
skyAngle [
|
|
10
|
+
0.8,
|
|
11
|
+
1.3,
|
|
12
|
+
1.4,
|
|
13
|
+
1.5708
|
|
14
|
+
]
|
|
15
|
+
skyColor [
|
|
16
|
+
0.0392 0.0392 0.0471,
|
|
17
|
+
0.0588 0.0745 0.1098,
|
|
18
|
+
0.051 0.0667 0.0588,
|
|
19
|
+
0.0471 0.0627 0.0275,
|
|
20
|
+
0.12 0.0902 0.05098
|
|
21
|
+
]
|
|
22
|
+
groundAngle [
|
|
23
|
+
0.6,
|
|
24
|
+
1.2,
|
|
25
|
+
1.3,
|
|
26
|
+
1.5708
|
|
27
|
+
]
|
|
28
|
+
groundColor [
|
|
29
|
+
0 0 0,
|
|
30
|
+
0 0 0,
|
|
31
|
+
0 0 0,
|
|
32
|
+
0 0 0,
|
|
33
|
+
0 0 0
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
`
|
|
37
|
+
},
|
|
4
38
|
{
|
|
5
39
|
componentInfo: { name: "EnvironmentalEffects" },
|
|
6
40
|
typeName: "Background Gray",
|
|
@@ -41,7 +75,8 @@ DEF Summer Background {
|
|
|
41
75
|
0.3612 0.469145 0.602,
|
|
42
76
|
0.39471 0.522059 0.669
|
|
43
77
|
]
|
|
44
|
-
|
|
78
|
+
}
|
|
79
|
+
`
|
|
45
80
|
},
|
|
46
81
|
{
|
|
47
82
|
componentInfo: { name: "EnvironmentalEffects" },
|
|
@@ -67,6 +102,15 @@ DEF Sunny Background {
|
|
|
67
102
|
0.48 0.48 0.45
|
|
68
103
|
]
|
|
69
104
|
}
|
|
105
|
+
`
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
componentInfo: { name: "EnvironmentalEffects" },
|
|
109
|
+
typeName: "Background Transparent",
|
|
110
|
+
x3dSyntax: `
|
|
111
|
+
DEF Transparent Background {
|
|
112
|
+
transparency 1
|
|
113
|
+
}
|
|
70
114
|
`
|
|
71
115
|
},
|
|
72
116
|
{
|