sunrize 2.0.1 → 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 +10 -10
- package/src/Components/Rendering/X3DGeometryNode.js +1 -0
- package/src/Editors/OutlineEditor.js +25 -0
- package/src/Editors/OutlineView.js +31 -0
- package/src/Editors/SceneProperties.js +1 -1
- package/src/Tools/Core/X3DNodeTool.js +2 -2
- package/src/Tools/Geometry2D/Polypoint2DTool.js +2 -2
- package/src/Tools/Grids/AngleGridTool.js +1 -1
- package/src/Tools/Rendering/PointSetTool.js +2 -2
- package/src/Tools/Rendering/X3DGeometryNodeTool.js +13 -0
- package/src/Tools/Sound/ListenerPointSourceTool.x3d +5 -5
- package/src/Tools/Sound/SoundTool.x3d +5 -5
- package/src/Tools/Sound/SpatialSoundTool.x3d +12 -10
- package/src/Tools/Text/TextTool.js +14 -1
- package/src/Undo/Editor.js +1 -1
- package/src/assets/themes/default.css +1 -1
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": {
|
|
@@ -78,20 +78,20 @@
|
|
|
78
78
|
"url": "https://patreon.com/X_ITE"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@electron-forge/cli": "^7.
|
|
82
|
-
"@electron-forge/maker-deb": "^7.
|
|
83
|
-
"@electron-forge/maker-dmg": "^7.
|
|
84
|
-
"@electron-forge/maker-rpm": "^7.
|
|
85
|
-
"@electron-forge/maker-squirrel": "^7.
|
|
86
|
-
"@electron-forge/maker-zip": "^7.
|
|
87
|
-
"@electron-forge/publisher-github": "^7.
|
|
81
|
+
"@electron-forge/cli": "^7.11.1",
|
|
82
|
+
"@electron-forge/maker-deb": "^7.11.1",
|
|
83
|
+
"@electron-forge/maker-dmg": "^7.11.1",
|
|
84
|
+
"@electron-forge/maker-rpm": "^7.11.1",
|
|
85
|
+
"@electron-forge/maker-squirrel": "^7.11.1",
|
|
86
|
+
"@electron-forge/maker-zip": "^7.11.1",
|
|
87
|
+
"@electron-forge/publisher-github": "^7.11.1",
|
|
88
88
|
"shell-tools": "^1.1.9"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
91
|
"@vscode/codicons": "^0.0.44",
|
|
92
92
|
"capitalize": "^2.0.4",
|
|
93
93
|
"console": "^0.7.2",
|
|
94
|
-
"electron": "^40.1
|
|
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 ();
|
|
@@ -222,7 +222,7 @@ class X3DNodeTool extends X3DBaseTool
|
|
|
222
222
|
{
|
|
223
223
|
if (!this [tool])
|
|
224
224
|
continue;
|
|
225
|
-
|
|
225
|
+
|
|
226
226
|
for (const node of Traverse .traverse (this [tool], Traverse .ROOT_NODES | Traverse .INLINE_SCENE | Traverse .PROTOTYPE_INSTANCES))
|
|
227
227
|
{
|
|
228
228
|
nodesToDispose .push (node instanceof X3D .SFNode ? node .getValue () : node);
|
|
@@ -480,7 +480,7 @@ class X3DNodeTool extends X3DBaseTool
|
|
|
480
480
|
traverse (type, renderObject = this .node)
|
|
481
481
|
{
|
|
482
482
|
if (this .isNodeTraversable (type))
|
|
483
|
-
this .node .traverse (type, renderObject);
|
|
483
|
+
this .node .traverse ?.(type, renderObject);
|
|
484
484
|
|
|
485
485
|
switch (type)
|
|
486
486
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const X3DPointGeometryNodeTool = require ("../Rendering/X3DPointGeometryNodeTool");
|
|
4
4
|
|
|
5
|
-
class Polypoint2DTool extends
|
|
5
|
+
class Polypoint2DTool extends X3DPointGeometryNodeTool { }
|
|
6
6
|
|
|
7
7
|
module .exports = Polypoint2DTool;
|
|
@@ -35,7 +35,7 @@ class AngleGridTool extends X3DGridNodeTool
|
|
|
35
35
|
if (Math .abs (snapAngle - angle) > Math .abs (this .tool .snapDistance * phi) || this .tool .dimension [1] === 0)
|
|
36
36
|
snapAngle = angle;
|
|
37
37
|
|
|
38
|
-
const snapPolar = X3D .Complex .
|
|
38
|
+
const snapPolar = X3D .Complex .fromPolar (snapRadius, snapAngle);
|
|
39
39
|
|
|
40
40
|
translation .x = snapPolar .real;
|
|
41
41
|
translation .z = snapPolar .imag;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const X3DPointGeometryNodeTool = require ("./X3DPointGeometryNodeTool");
|
|
4
4
|
|
|
5
|
-
class PointSetTool extends
|
|
5
|
+
class PointSetTool extends X3DPointGeometryNodeTool { }
|
|
6
6
|
|
|
7
7
|
module .exports = PointSetTool;
|
|
@@ -47,6 +47,19 @@ class X3DGeometryNodeTool extends X3DNodeTool
|
|
|
47
47
|
|
|
48
48
|
this .tool .linesCoord .point = points;
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
traverseBefore (type, renderObject)
|
|
52
|
+
{
|
|
53
|
+
this .node .traverseBefore ?.(type, renderObject);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
traverseAfter (type, renderObject)
|
|
57
|
+
{
|
|
58
|
+
if (this .isNodeTraversable (type))
|
|
59
|
+
this .node .traverseAfter ?.(type, renderObject);
|
|
60
|
+
|
|
61
|
+
this .traverse (type, renderObject);
|
|
62
|
+
}
|
|
50
63
|
}
|
|
51
64
|
|
|
52
65
|
module .exports = X3DGeometryNodeTool;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.
|
|
3
|
-
<X3D profile='Interchange' version='4.
|
|
2
|
+
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.1//EN" "https://www.web3d.org/specifications/x3d-4.1.dtd">
|
|
3
|
+
<X3D profile='Interchange' version='4.1' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.1.xsd'>
|
|
4
4
|
<head>
|
|
5
5
|
<component name='Layout' level='2'/>
|
|
6
6
|
<component name='Scripting' level='1'/>
|
|
7
7
|
<meta name='created' content='Tue, 26 Mar 2024 07:12:19 GMT'/>
|
|
8
8
|
<meta name='creator' content='Holger Seelig'/>
|
|
9
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
10
|
-
<meta name='modified' content='
|
|
9
|
+
<meta name='generator' content='Sunrize X3D Editor V2.0.1, https://create3000.github.io/sunrize/'/>
|
|
10
|
+
<meta name='modified' content='Sun, 01 Feb 2026 19:11:34 GMT'/>
|
|
11
11
|
</head>
|
|
12
12
|
<Scene>
|
|
13
13
|
<ProtoDeclare name='ListenerPointSourceTool'>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</Collision>
|
|
59
59
|
<Script DEF='ListenerPointSourceScript'>
|
|
60
60
|
<field accessType='inputOutput' type='SFBool' name='active'/>
|
|
61
|
-
<field accessType='
|
|
61
|
+
<field accessType='inputOutput' type='SFString' name='activeTool'/>
|
|
62
62
|
<field accessType='inputOutput' type='SFNode' name='transform'>
|
|
63
63
|
<Transform USE='TransformTool'/>
|
|
64
64
|
</field>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.
|
|
3
|
-
<X3D profile='Interchange' version='4.
|
|
2
|
+
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.1//EN" "https://www.web3d.org/specifications/x3d-4.1.dtd">
|
|
3
|
+
<X3D profile='Interchange' version='4.1' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.1.xsd'>
|
|
4
4
|
<head>
|
|
5
5
|
<component name='Layout' level='2'/>
|
|
6
6
|
<component name='PointingDeviceSensor' level='1'/>
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
<meta name='comment' content='Rise and Shine'/>
|
|
11
11
|
<meta name='created' content='Thu, 18 Feb 2016 08:47:54 GMT'/>
|
|
12
12
|
<meta name='creator' content='Holger Seelig'/>
|
|
13
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
13
|
+
<meta name='generator' content='Sunrize X3D Editor V2.0.1, https://create3000.github.io/sunrize/'/>
|
|
14
14
|
<meta name='identifier' content='file:///Users/holger/Desktop/X_ITE/sunrize/src/sunrize/Tools/Sound/SoundTool.x3d'/>
|
|
15
|
-
<meta name='modified' content='
|
|
15
|
+
<meta name='modified' content='Sun, 01 Feb 2026 19:09:41 GMT'/>
|
|
16
16
|
</head>
|
|
17
17
|
<Scene>
|
|
18
18
|
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
<field accessType='outputOnly' type='SFVec3f' name='maxTranslation_changed'/>
|
|
316
316
|
<field accessType='outputOnly' type='SFVec3f' name='minScale_changed'/>
|
|
317
317
|
<field accessType='outputOnly' type='SFVec3f' name='maxScale_changed'/>
|
|
318
|
-
<field accessType='
|
|
318
|
+
<field accessType='inputOutput' type='SFString' name='activeTool'/>
|
|
319
319
|
<field accessType='inputOutput' type='SFNode' name='transform'>
|
|
320
320
|
<Transform USE='TransformTool'/>
|
|
321
321
|
</field>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.
|
|
3
|
-
<X3D profile='Interchange' version='4.
|
|
2
|
+
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.1//EN" "https://www.web3d.org/specifications/x3d-4.1.dtd">
|
|
3
|
+
<X3D profile='Interchange' version='4.1' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.1.xsd'>
|
|
4
4
|
<head>
|
|
5
5
|
<component name='Layout' level='2'/>
|
|
6
6
|
<component name='Scripting' level='1'/>
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
<meta name='comment' content='Rise and Shine'/>
|
|
9
9
|
<meta name='created' content='Thu, 18 Feb 2016 08:47:54 GMT'/>
|
|
10
10
|
<meta name='creator' content='Holger Seelig'/>
|
|
11
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
12
|
-
<meta name='modified' content='
|
|
11
|
+
<meta name='generator' content='Sunrize X3D Editor V2.0.1, https://create3000.github.io/sunrize/'/>
|
|
12
|
+
<meta name='modified' content='Sun, 01 Feb 2026 19:10:05 GMT'/>
|
|
13
13
|
</head>
|
|
14
14
|
<Scene>
|
|
15
|
-
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'
|
|
15
|
+
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
16
|
+
<field accessType='inputOutput' type='SFBool' name='instanced'/>
|
|
17
|
+
</ExternProtoDeclare>
|
|
16
18
|
<ExternProtoDeclare name='BooleanSwitch' url='"../Grouping/BooleanSwitch.x3d"'>
|
|
17
19
|
<field accessType='inputOutput' type='SFBool' name='whichChoice'/>
|
|
18
20
|
<field accessType='inputOutput' type='SFBool' name='visible'/>
|
|
@@ -179,7 +181,7 @@ function eventsProcessed ()
|
|
|
179
181
|
rotation='1 0 0 90'>
|
|
180
182
|
<ProtoInstance name='BooleanSwitch'>
|
|
181
183
|
<fieldValue name='children'>
|
|
182
|
-
<Shape
|
|
184
|
+
<Shape>
|
|
183
185
|
<Appearance>
|
|
184
186
|
<LineProperties DEF='_5'
|
|
185
187
|
linewidthScaleFactor='1'/>
|
|
@@ -196,7 +198,7 @@ function eventsProcessed ()
|
|
|
196
198
|
</IS>
|
|
197
199
|
</ProtoInstance>
|
|
198
200
|
</Shape>
|
|
199
|
-
<Shape
|
|
201
|
+
<Shape>
|
|
200
202
|
<Appearance>
|
|
201
203
|
<LineProperties USE='_5'/>
|
|
202
204
|
<Material
|
|
@@ -216,7 +218,7 @@ function eventsProcessed ()
|
|
|
216
218
|
rotation='1 0 0 90'>
|
|
217
219
|
<ProtoInstance name='BooleanSwitch'>
|
|
218
220
|
<fieldValue name='children'>
|
|
219
|
-
<Shape
|
|
221
|
+
<Shape>
|
|
220
222
|
<Appearance>
|
|
221
223
|
<LineProperties USE='_5'/>
|
|
222
224
|
<Material
|
|
@@ -232,7 +234,7 @@ function eventsProcessed ()
|
|
|
232
234
|
</IS>
|
|
233
235
|
</ProtoInstance>
|
|
234
236
|
</Shape>
|
|
235
|
-
<Shape
|
|
237
|
+
<Shape>
|
|
236
238
|
<Appearance>
|
|
237
239
|
<LineProperties USE='_5'/>
|
|
238
240
|
<Material
|
|
@@ -272,7 +274,7 @@ function eventsProcessed ()
|
|
|
272
274
|
<field accessType='inputOutput' type='SFVec3f' name='direction'/>
|
|
273
275
|
<field accessType='initializeOnly' type='SFVec3f' name='upVector' value='0 1 0'/>
|
|
274
276
|
<field accessType='inputOnly' type='SFRotation' name='set_rotation'/>
|
|
275
|
-
<field accessType='
|
|
277
|
+
<field accessType='inputOutput' type='SFString' name='activeTool'/>
|
|
276
278
|
<field accessType='inputOutput' type='SFNode' name='transform'>
|
|
277
279
|
<Transform USE='TransformTool'/>
|
|
278
280
|
</field>
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
const X3DGeometryNodeTool = require ("../Rendering/X3DGeometryNodeTool");
|
|
4
4
|
|
|
5
|
-
class TextTool extends X3DGeometryNodeTool
|
|
5
|
+
class TextTool extends X3DGeometryNodeTool
|
|
6
|
+
{
|
|
7
|
+
traverseAfter (type, renderObject)
|
|
8
|
+
{
|
|
9
|
+
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
10
|
+
|
|
11
|
+
modelViewMatrix .push ();
|
|
12
|
+
modelViewMatrix .multLeft (this .node .getMatrix ());
|
|
13
|
+
|
|
14
|
+
super .traverseAfter (type, renderObject);
|
|
15
|
+
|
|
16
|
+
modelViewMatrix .pop ();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
6
19
|
|
|
7
20
|
module .exports = TextTool;
|
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
|
});
|