sunrize 1.7.63 → 1.8.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 +4 -4
- package/src/Application/ActionKeys.js +3 -3
- package/src/Application/Application.js +1 -1
- package/src/Application/Dashboard.js +87 -6
- package/src/Application/Document.js +144 -24
- package/src/Application/Hierarchy.js +268 -0
- package/src/Application/Selection.js +6 -6
- package/src/Components/Grouping/StaticGroup.js +1 -1
- package/src/Components/Grouping/Switch.js +34 -0
- package/src/Components/Navigation/Collision.js +70 -0
- package/src/Components/Navigation/LOD.js +34 -0
- package/src/Editors/Library.js +1 -1
- package/src/Editors/OutlineEditor.js +6 -2
- package/src/Editors/OutlineRouteGraph.js +4 -4
- package/src/Editors/OutlineView.js +210 -63
- package/src/Tools/Core/X3DNodeTool.js +2 -0
- package/src/Tools/EnvironmentalSensor/X3DEnvironmentalSensorNodeTool.x3d +1 -0
- package/src/Tools/Geometry2D/Arc2DTool.js +1 -0
- package/src/Tools/Geometry2D/ArcClose2DTool.js +1 -0
- package/src/Tools/Geometry2D/Circle2DTool.js +1 -0
- package/src/Tools/Geometry2D/Disk2DTool.js +2 -0
- package/src/Tools/Geometry2D/Rectangle2DTool.js +1 -0
- package/src/Tools/Geometry3D/BoxTool.js +1 -0
- package/src/Tools/Geometry3D/ConeTool.js +1 -0
- package/src/Tools/Geometry3D/CylinderTool.js +1 -0
- package/src/Tools/Geometry3D/SphereTool.js +1 -0
- package/src/Tools/Grouping/X3DBoundedObjectTool.x3d +28 -12
- package/src/Tools/Grouping/X3DTransformNodeTool.x3d +30 -12
- package/src/Tools/Lighting/X3DLightNodeTool.x3d +1 -0
- package/src/Tools/Navigation/X3DViewpointNodeTool.x3d +1 -0
- package/src/Tools/SnapTool/X3DSnapNodeTool.js +8 -6
- package/src/Tools/Sound/ListenerPointSourceTool.x3d +1 -0
- package/src/Tools/Sound/SoundTool.x3d +5 -0
- package/src/Tools/Sound/SpatialSoundTool.x3d +2 -1
- package/src/Tools/TextureProjection/X3DTextureProjectorNodeTool.x3d +1 -0
- package/src/Undo/Editor.js +1 -1
- package/src/Undo/UndoManager.js +4 -4
- package/src/X3D.js +1 -1
- package/src/assets/themes/default-template.css +6 -0
- package/src/assets/themes/default.css +6 -0
|
@@ -37,7 +37,7 @@ module .exports = new class Selection extends Interface
|
|
|
37
37
|
// this .nodes = this .nodes .map (n => n .isLive ()); // Leave tool working.
|
|
38
38
|
|
|
39
39
|
if (length !== this .nodes .length)
|
|
40
|
-
this
|
|
40
|
+
this .#processInterests ();
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
has (node)
|
|
@@ -51,7 +51,7 @@ module .exports = new class Selection extends Interface
|
|
|
51
51
|
clear ()
|
|
52
52
|
{
|
|
53
53
|
this .#clear ();
|
|
54
|
-
this
|
|
54
|
+
this .#processInterests ();
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
set (node)
|
|
@@ -61,7 +61,7 @@ module .exports = new class Selection extends Interface
|
|
|
61
61
|
|
|
62
62
|
this .#clear (node);
|
|
63
63
|
this .#add (node);
|
|
64
|
-
this
|
|
64
|
+
this .#processInterests ();
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
add (node)
|
|
@@ -70,7 +70,7 @@ module .exports = new class Selection extends Interface
|
|
|
70
70
|
return;
|
|
71
71
|
|
|
72
72
|
this .#add (node);
|
|
73
|
-
this
|
|
73
|
+
this .#processInterests ();
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
remove (node)
|
|
@@ -79,7 +79,7 @@ module .exports = new class Selection extends Interface
|
|
|
79
79
|
return;
|
|
80
80
|
|
|
81
81
|
this .#remove (node);
|
|
82
|
-
this
|
|
82
|
+
this .#processInterests ();
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
#clear (exclude)
|
|
@@ -132,7 +132,7 @@ module .exports = new class Selection extends Interface
|
|
|
132
132
|
this .#interest .delete (key);
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
processInterests ()
|
|
135
|
+
#processInterests ()
|
|
136
136
|
{
|
|
137
137
|
for (const callback of this .#interest .values ())
|
|
138
138
|
callback (this .nodes);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const X3D = require ("../../X3D");
|
|
4
|
+
|
|
5
|
+
function Switch (executionContext)
|
|
6
|
+
{
|
|
7
|
+
X3D .Switch .call (this, executionContext);
|
|
8
|
+
|
|
9
|
+
this .editChild = null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Object .assign (Object .setPrototypeOf (Switch .prototype, X3D .Switch .prototype),
|
|
13
|
+
{
|
|
14
|
+
getEditChild ()
|
|
15
|
+
{
|
|
16
|
+
return this .editChild;
|
|
17
|
+
},
|
|
18
|
+
setEditChild (childNode)
|
|
19
|
+
{
|
|
20
|
+
this .editChild = childNode;
|
|
21
|
+
|
|
22
|
+
this .set_children__ ();
|
|
23
|
+
|
|
24
|
+
this .getBrowser () .addBrowserEvent ();
|
|
25
|
+
},
|
|
26
|
+
setChild (childNode)
|
|
27
|
+
{
|
|
28
|
+
X3D .Switch .prototype .setChild .call (this, this .editChild ?.getTool () ?? this .editChild ?? childNode);
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
Object .assign (Switch, X3D .Switch);
|
|
33
|
+
|
|
34
|
+
module .exports = Switch;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const X3D = require ("../../X3D");
|
|
4
|
+
|
|
5
|
+
function Collision (executionContext)
|
|
6
|
+
{
|
|
7
|
+
X3D .Collision .call (this, executionContext);
|
|
8
|
+
|
|
9
|
+
this .proxyDisplay = false;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Object .assign (Object .setPrototypeOf (Collision .prototype, X3D .Collision .prototype),
|
|
13
|
+
{
|
|
14
|
+
getProxyDisplay ()
|
|
15
|
+
{
|
|
16
|
+
return this .proxyDisplay;
|
|
17
|
+
},
|
|
18
|
+
setProxyDisplay (proxyDisplay)
|
|
19
|
+
{
|
|
20
|
+
this .proxyDisplay = proxyDisplay;
|
|
21
|
+
|
|
22
|
+
this .set_collisionObjects__ ();
|
|
23
|
+
},
|
|
24
|
+
set_proxy__ ()
|
|
25
|
+
{
|
|
26
|
+
this .pointingObjects .delete (this .proxyNode);
|
|
27
|
+
this .visibleObjects .delete (this .proxyNode);
|
|
28
|
+
|
|
29
|
+
X3D .Collision .prototype .set_proxy__ .call (this);
|
|
30
|
+
},
|
|
31
|
+
set_pointingObjects__ ()
|
|
32
|
+
{
|
|
33
|
+
if (this .proxyNode)
|
|
34
|
+
{
|
|
35
|
+
if (this .proxyDisplay)
|
|
36
|
+
this .pointingObjects .add (this .proxyNode);
|
|
37
|
+
else
|
|
38
|
+
this .pointingObjects .delete (this .proxyNode);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
X3D .Collision .prototype .set_pointingObjects__ .call (this);
|
|
42
|
+
|
|
43
|
+
this .getBrowser () .addBrowserEvent ();
|
|
44
|
+
},
|
|
45
|
+
set_collisionObjects__ ()
|
|
46
|
+
{
|
|
47
|
+
this .set_pointingObjects__ ();
|
|
48
|
+
this .set_visibleObjects__ ();
|
|
49
|
+
|
|
50
|
+
X3D .Collision .prototype .set_collisionObjects__ .call (this);
|
|
51
|
+
},
|
|
52
|
+
set_visibleObjects__ ()
|
|
53
|
+
{
|
|
54
|
+
if (this .proxyNode)
|
|
55
|
+
{
|
|
56
|
+
if (this .proxyDisplay)
|
|
57
|
+
this .visibleObjects .add (this .proxyNode);
|
|
58
|
+
else
|
|
59
|
+
this .visibleObjects .delete (this .proxyNode);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
X3D .Collision .prototype .set_visibleObjects__ .call (this);
|
|
63
|
+
|
|
64
|
+
this .getBrowser () .addBrowserEvent ();
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
Object .assign (Collision, X3D .Collision);
|
|
69
|
+
|
|
70
|
+
module .exports = Collision;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const X3D = require ("../../X3D");
|
|
4
|
+
|
|
5
|
+
function LOD (executionContext)
|
|
6
|
+
{
|
|
7
|
+
X3D .LOD .call (this, executionContext);
|
|
8
|
+
|
|
9
|
+
this .editChild = null;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
Object .assign (Object .setPrototypeOf (LOD .prototype, X3D .LOD .prototype),
|
|
13
|
+
{
|
|
14
|
+
getEditChild ()
|
|
15
|
+
{
|
|
16
|
+
return this .editChild;
|
|
17
|
+
},
|
|
18
|
+
setEditChild (childNode)
|
|
19
|
+
{
|
|
20
|
+
this .editChild = childNode;
|
|
21
|
+
|
|
22
|
+
this .set_children__ ();
|
|
23
|
+
|
|
24
|
+
this .getBrowser () .addBrowserEvent ();
|
|
25
|
+
},
|
|
26
|
+
setChild (childNode)
|
|
27
|
+
{
|
|
28
|
+
X3D .LOD .prototype .setChild .call (this, this .editChild ?.getTool () ?? this .editChild ?? childNode);
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
Object .assign (LOD, X3D .LOD);
|
|
33
|
+
|
|
34
|
+
module .exports = LOD;
|
package/src/Editors/Library.js
CHANGED
|
@@ -263,6 +263,6 @@ module .exports = new class Library extends Dialog
|
|
|
263
263
|
const outlineEditor = require ("../Application/Window") .sidebar .outlineEditor;
|
|
264
264
|
|
|
265
265
|
outlineEditor .expandTo (node);
|
|
266
|
-
outlineEditor .selectNodeElement ($(`.node[node-id=${node .getId ()}]`));
|
|
266
|
+
outlineEditor .selectNodeElement ($(`.node[node-id=${node .getId ()}]`), { target: true });
|
|
267
267
|
}
|
|
268
268
|
}
|
|
@@ -1199,7 +1199,11 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
1199
1199
|
|
|
1200
1200
|
await this .browser .nextFrame ();
|
|
1201
1201
|
|
|
1202
|
-
this .expandTo (node, true);
|
|
1202
|
+
this .expandTo (node, { expandObject: true });
|
|
1203
|
+
|
|
1204
|
+
const groupElement = this .sceneGraph .find (`.node[node-id=${node .getId ()}]`);
|
|
1205
|
+
|
|
1206
|
+
this .selectNodeElement (groupElement, { target: true });
|
|
1203
1207
|
}
|
|
1204
1208
|
|
|
1205
1209
|
removeParent (id, executionContextId, nodeId)
|
|
@@ -1467,7 +1471,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
1467
1471
|
|
|
1468
1472
|
await this .browser .nextFrame ();
|
|
1469
1473
|
|
|
1470
|
-
this .expandTo (childNode, true);
|
|
1474
|
+
this .expandTo (childNode, { expandObject: true });
|
|
1471
1475
|
}
|
|
1472
1476
|
|
|
1473
1477
|
protocolToMimeType = new Map ([
|
|
@@ -38,7 +38,7 @@ module .exports = class OutlineRouteGraph extends OutlineView
|
|
|
38
38
|
for (const route of field .getInputRoutes ())
|
|
39
39
|
{
|
|
40
40
|
this .selectedRoutes .add (route);
|
|
41
|
-
this .expandTo (route .getSourceNode (), true);
|
|
41
|
+
this .expandTo (route .getSourceNode (), { expandObject: true });
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
break;
|
|
@@ -48,7 +48,7 @@ module .exports = class OutlineRouteGraph extends OutlineView
|
|
|
48
48
|
for (const route of field .getOutputRoutes ())
|
|
49
49
|
{
|
|
50
50
|
this .selectedRoutes .add (route);
|
|
51
|
-
this .expandTo (route .getDestinationNode (), true);
|
|
51
|
+
this .expandTo (route .getDestinationNode (), { expandObject: true });
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
break;
|
|
@@ -78,7 +78,7 @@ module .exports = class OutlineRouteGraph extends OutlineView
|
|
|
78
78
|
const route = this .getRoute (element, field .getInputRoutes ());
|
|
79
79
|
|
|
80
80
|
this .selectedRoutes .add (route);
|
|
81
|
-
this .expandTo (route .getSourceNode (), true);
|
|
81
|
+
this .expandTo (route .getSourceNode (), { expandObject: true });
|
|
82
82
|
break;
|
|
83
83
|
}
|
|
84
84
|
case "output":
|
|
@@ -86,7 +86,7 @@ module .exports = class OutlineRouteGraph extends OutlineView
|
|
|
86
86
|
const route = this .getRoute (element, field .getOutputRoutes ());
|
|
87
87
|
|
|
88
88
|
this .selectedRoutes .add (route);
|
|
89
|
-
this .expandTo (route .getDestinationNode (), true);
|
|
89
|
+
this .expandTo (route .getDestinationNode (), { expandObject: true });
|
|
90
90
|
break;
|
|
91
91
|
}
|
|
92
92
|
}
|