sunrize 1.7.58 → 1.7.60
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/Components/Grouping/StaticGroup.js +8 -1
- package/src/Editors/OutlineEditor.js +2 -2
- package/src/Editors/OutlineView.js +7 -3
- package/src/Tools/EnvironmentalSensor/X3DEnvironmentalSensorNodeTool.js +6 -3
- package/src/Tools/Lighting/X3DLightNodeTool.js +5 -0
- package/src/Tools/Navigation/ViewpointGroupTool.js +12 -0
- package/src/Tools/Navigation/X3DViewpointNodeTool.js +5 -0
- package/src/Tools/Sound/ListenerPointSourceTool.js +5 -0
- package/src/Tools/Sound/SoundTool.js +5 -0
- package/src/Tools/Sound/SpatialSoundTool.js +5 -0
- package/src/Tools/TextureProjection/X3DTextureProjectorNodeTool.js +5 -0
- package/src/Undo/Editor.js +4 -13
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.60",
|
|
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.0.
|
|
93
|
+
"electron": "^35.0.3",
|
|
94
94
|
"electron-prompt": "^1.7.0",
|
|
95
95
|
"electron-squirrel-startup": "^1.0.1",
|
|
96
96
|
"electron-tabs": "^1.0.4",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"jquery-ui-dist": "^1.13.3",
|
|
100
100
|
"jstree": "^3.3.17",
|
|
101
101
|
"material-icons": "^1.13.14",
|
|
102
|
-
"material-symbols": "^0.29.
|
|
102
|
+
"material-symbols": "^0.29.1",
|
|
103
103
|
"md5": "^2.3.0",
|
|
104
104
|
"mime-types": "^2.1.35",
|
|
105
105
|
"monaco-editor": "^0.50.0",
|
|
@@ -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.
|
|
113
|
-
"x3d-traverse": "^1.0.
|
|
112
|
+
"x_ite": "^11.4.0",
|
|
113
|
+
"x3d-traverse": "^1.0.10"
|
|
114
114
|
}
|
|
115
115
|
}
|
|
@@ -9,6 +9,8 @@ function StaticGroup (executionContext)
|
|
|
9
9
|
|
|
10
10
|
this .addType (X3D .X3DConstants .StaticGroup);
|
|
11
11
|
|
|
12
|
+
// Private properties
|
|
13
|
+
|
|
12
14
|
this .groupNode = new X3D .Group (this .getExecutionContext ());
|
|
13
15
|
}
|
|
14
16
|
|
|
@@ -30,7 +32,7 @@ Object .assign (Object .setPrototypeOf (StaticGroup .prototype, X3D .X3DChildNod
|
|
|
30
32
|
this .groupNode .setPrivate (true);
|
|
31
33
|
this .groupNode .setup ();
|
|
32
34
|
|
|
33
|
-
this .connectChildNode (this .groupNode);
|
|
35
|
+
this .connectChildNode (this .groupNode, [X3D .TraverseType .CAMERA]);
|
|
34
36
|
},
|
|
35
37
|
getBBox (bbox, shadows)
|
|
36
38
|
{
|
|
@@ -52,22 +54,27 @@ Object .defineProperties (StaticGroup,
|
|
|
52
54
|
typeName:
|
|
53
55
|
{
|
|
54
56
|
value: X3D .StaticGroup .typeName,
|
|
57
|
+
enumerable: true,
|
|
55
58
|
},
|
|
56
59
|
componentInfo:
|
|
57
60
|
{
|
|
58
61
|
value: X3D .StaticGroup .componentInfo,
|
|
62
|
+
enumerable: true,
|
|
59
63
|
},
|
|
60
64
|
containerField:
|
|
61
65
|
{
|
|
62
66
|
value: X3D .StaticGroup .containerField,
|
|
67
|
+
enumerable: true,
|
|
63
68
|
},
|
|
64
69
|
specificationRange:
|
|
65
70
|
{
|
|
66
71
|
value: X3D .StaticGroup .specificationRange,
|
|
72
|
+
enumerable: true,
|
|
67
73
|
},
|
|
68
74
|
fieldDefinitions:
|
|
69
75
|
{
|
|
70
76
|
value: X3D .StaticGroup .fieldDefinitions,
|
|
77
|
+
enumerable: true,
|
|
71
78
|
},
|
|
72
79
|
});
|
|
73
80
|
|
|
@@ -577,12 +577,12 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
577
577
|
var menu = [
|
|
578
578
|
{
|
|
579
579
|
label: _("Rename Imported Node..."),
|
|
580
|
-
visible:
|
|
580
|
+
visible: importedNode .getExecutionContext () .getLocalScene () === this .executionContext,
|
|
581
581
|
args: ["renameImportedNode", element .attr ("id")],
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
584
|
label: _("Remove Imported Node"),
|
|
585
|
-
visible:
|
|
585
|
+
visible: importedNode .getExecutionContext () .getLocalScene () === this .executionContext,
|
|
586
586
|
args: ["removeImportedNode", element .attr ("id")],
|
|
587
587
|
},
|
|
588
588
|
];
|
|
@@ -153,6 +153,7 @@ module .exports = class OutlineView extends Interface
|
|
|
153
153
|
X3D .X3DConstants .SpotLight,
|
|
154
154
|
X3D .X3DConstants .Sound,
|
|
155
155
|
X3D .X3DConstants .SpatialSound,
|
|
156
|
+
X3D .X3DConstants .ViewpointGroup,
|
|
156
157
|
X3D .X3DConstants .X3DEnvironmentalSensorNode,
|
|
157
158
|
X3D .X3DConstants .X3DTextureProjectorNode,
|
|
158
159
|
X3D .X3DConstants .X3DViewpointNode,
|
|
@@ -274,9 +275,12 @@ module .exports = class OutlineView extends Interface
|
|
|
274
275
|
.attr ("draggable", "true")
|
|
275
276
|
.on ("dragstart", this .onDragStartProto .bind (this));
|
|
276
277
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
.
|
|
278
|
+
if (this .getField (parent) ?.getAccessType () !== X3D .X3DConstants .outputOnly)
|
|
279
|
+
{
|
|
280
|
+
child .find (".node > .item")
|
|
281
|
+
.attr ("draggable", "true")
|
|
282
|
+
.on ("dragstart", this .onDragStartNode .bind (this));
|
|
283
|
+
}
|
|
280
284
|
}
|
|
281
285
|
|
|
282
286
|
child .find (".externproto .name, .externproto .icon, .proto .name, .proto .icon, .node .name, .node .icon")
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
X3DChildNodeTool = require ("../Core/X3DChildNodeTool"),
|
|
5
|
-
Editor = require ("../../Undo/Editor");
|
|
3
|
+
const X3DChildNodeTool = require ("../Core/X3DChildNodeTool");
|
|
6
4
|
|
|
7
5
|
class X3DEnvironmentalSensorNodeTool extends X3DChildNodeTool
|
|
8
6
|
{
|
|
@@ -25,6 +23,11 @@ class X3DEnvironmentalSensorNodeTool extends X3DChildNodeTool
|
|
|
25
23
|
this .undoSaveInitialValues (["size", "center"]);
|
|
26
24
|
}
|
|
27
25
|
|
|
26
|
+
isBoundedObject ()
|
|
27
|
+
{
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
|
|
28
31
|
getBBox (bbox, shadows)
|
|
29
32
|
{
|
|
30
33
|
if (shadows)
|
|
@@ -17,6 +17,11 @@ class X3DLightNodeTool extends X3DChildNodeTool
|
|
|
17
17
|
this .tool .getField ("isActive") .addInterest ("handleUndo", this);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
isBoundedObject ()
|
|
21
|
+
{
|
|
22
|
+
return true;
|
|
23
|
+
}
|
|
24
|
+
|
|
20
25
|
getBBox (bbox, shadows)
|
|
21
26
|
{
|
|
22
27
|
return this .getToolBBox (bbox, shadows);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const
|
|
4
|
+
X3DEnvironmentalSensorNodeTool = require ("../EnvironmentalSensor/X3DEnvironmentalSensorNodeTool"),
|
|
5
|
+
ToolColors = require ("../Core/ToolColors");
|
|
6
|
+
|
|
7
|
+
class ViewpointGroupTool extends X3DEnvironmentalSensorNodeTool
|
|
8
|
+
{
|
|
9
|
+
toolBoxColor = ToolColors .PROXIMITY_SENSOR;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
module .exports = ViewpointGroupTool;
|
|
@@ -26,6 +26,11 @@ class X3DTextureProjectorNodeTool extends X3DChildNodeTool
|
|
|
26
26
|
this .undoSaveInitialValues (["location", "direction", "upVector"]);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
isBoundedObject ()
|
|
30
|
+
{
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
getBBox (bbox, shadows)
|
|
30
35
|
{
|
|
31
36
|
return this .getToolBBox (bbox, shadows);
|
package/src/Undo/Editor.js
CHANGED
|
@@ -18,16 +18,6 @@ module .exports = class Editor
|
|
|
18
18
|
*/
|
|
19
19
|
static Id = /(?:^[^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*$|^$)/
|
|
20
20
|
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @param {X3DExecutionContext} executionContext source execution context
|
|
24
|
-
* @returns {X3DScene} corresponding scene
|
|
25
|
-
*/
|
|
26
|
-
static getScene (executionContext)
|
|
27
|
-
{
|
|
28
|
-
return executionContext instanceof X3D .X3DScene ? executionContext : executionContext .getScene ();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
21
|
/**
|
|
32
22
|
*
|
|
33
23
|
* @param {X3DExecutionContext} executionContext source execution context
|
|
@@ -240,7 +230,7 @@ module .exports = class Editor
|
|
|
240
230
|
|
|
241
231
|
const
|
|
242
232
|
browser = executionContext .getBrowser (),
|
|
243
|
-
scene =
|
|
233
|
+
scene = executionContext .getLocalScene (),
|
|
244
234
|
profile = scene .getProfile (),
|
|
245
235
|
x_ite = scene .hasComponent ("X_ITE"),
|
|
246
236
|
externprotos = new Map (Array .from (executionContext .externprotos, p => [p .getName (), p])),
|
|
@@ -742,7 +732,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
742
732
|
*/
|
|
743
733
|
static addComponent (scene, name, undoManager = UndoManager .shared)
|
|
744
734
|
{
|
|
745
|
-
scene =
|
|
735
|
+
scene = scene .getLocalScene ();
|
|
746
736
|
name = name instanceof X3D .ComponentInfo ? name .name : name;
|
|
747
737
|
|
|
748
738
|
if (scene .hasComponent (name))
|
|
@@ -770,7 +760,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
770
760
|
*/
|
|
771
761
|
static removeComponent (scene, name, undoManager = UndoManager .shared)
|
|
772
762
|
{
|
|
773
|
-
scene =
|
|
763
|
+
scene = scene .getLocalScene ();
|
|
774
764
|
name = name instanceof X3D .ComponentInfo ? name .name : name;
|
|
775
765
|
|
|
776
766
|
if (!scene .hasComponent (name))
|
|
@@ -2630,6 +2620,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2630
2620
|
return innerNode .getBBox (new X3D .Box3 ()) .multRight (modelMatrix);
|
|
2631
2621
|
case X3D .X3DConstants .X3DGeometryNode:
|
|
2632
2622
|
return innerNode .getBBox () .copy () .multRight (modelMatrix);
|
|
2623
|
+
case X3D .X3DConstants .ViewpointGroup:
|
|
2633
2624
|
case X3D .X3DConstants .X3DEnvironmentalSensorNode:
|
|
2634
2625
|
return new X3D .Box3 (innerNode ._size .getValue (), innerNode ._center .getValue ())
|
|
2635
2626
|
.multRight (modelMatrix);
|