sunrize 2.1.8 → 2.1.10
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 +22 -14
- package/src/Application/ActionKeys.js +1 -1
- package/src/Application/DataStorage.js +1 -1
- package/src/Application/Document.js +1 -1
- package/src/Application/Footer.js +15 -15
- package/src/Application/Hierarchy.js +1 -1
- package/src/Application/Registry.js +1 -1
- package/src/Application/Selection.js +1 -1
- package/src/Application/Sidebar.js +16 -16
- package/src/Application/Tabs.js +2 -2
- package/src/Bits/MimeTypes.js +1 -1
- package/src/Controls/AnimationPropertiesPopover.js +3 -3
- package/src/Controls/Dialog.js +2 -2
- package/src/Controls/EditNodePopover.js +1 -1
- package/src/Controls/EditUserDefinedFieldPopover.js +13 -45
- package/src/Controls/ExportNodePopover.js +1 -1
- package/src/Controls/ImportNodePopover.js +1 -1
- package/src/Controls/RenameNodeInput.js +1 -1
- package/src/Controls/Splitter.js +2 -2
- package/src/Controls/Tabs.js +25 -25
- package/src/Controls/TexturePreviewPopover.js +3 -3
- package/src/Controls/VideoPreviewPopover.js +3 -3
- package/src/Editors/AnimationEditor.js +10 -10
- package/src/Editors/AnimationMemberList.js +1 -1
- package/src/Editors/FileManager.js +7 -7
- package/src/Editors/Library.js +2 -2
- package/src/Editors/OutlineEditor.js +37 -37
- package/src/Editors/OutlineRouteGraph.js +2 -2
- package/src/Editors/OutlineView.js +99 -97
- package/src/Editors/Panel.js +17 -10
- package/src/Editors/SceneProperties.js +8 -8
- package/src/Editors/ScriptEditor.js +7 -7
- package/src/Editors/Units.js +1 -1
- package/src/Parser/AudioParser.js +1 -1
- package/src/Parser/ImageParser.js +1 -1
- package/src/Parser/VideoParser.js +1 -1
- package/src/Tools/CADGeometry/CADAssemblyTool.js +4 -4
- package/src/Tools/CADGeometry/CADFaceTool.js +4 -4
- package/src/Tools/CADGeometry/CADLayerTool.js +4 -4
- package/src/Tools/CADGeometry/CADPartTool.js +4 -4
- package/src/Tools/Core/X3DBaseTool.js +1 -1
- package/src/Tools/Core/X3DNodeTool.js +3 -1
- package/src/Tools/Core/X3DPrototypeInstanceTool.js +1 -1
- package/src/Tools/Grouping/GroupTool.js +1 -1
- package/src/Tools/Grouping/StaticGroupTool.js +4 -4
- package/src/Tools/Grouping/SwitchTool.js +4 -4
- package/src/Tools/Grouping/TransformTool.js +4 -4
- package/src/Tools/Grouping/X3DTransformNodeTool.js +1 -1
- package/src/Tools/HAnim/HAnimHumanoidTool.js +4 -4
- package/src/Tools/HAnim/HAnimJointTool.js +4 -4
- package/src/Tools/HAnim/HAnimSegmentTool.js +4 -4
- package/src/Tools/HAnim/HAnimSiteTool.js +4 -4
- package/src/Tools/Layering/LayerTool.js +3 -3
- package/src/Tools/Layering/ViewportTool.js +1 -1
- package/src/Tools/Networking/AnchorTool.js +4 -4
- package/src/Tools/Networking/InlineGeometryTool.js +1 -1
- package/src/Tools/Networking/InlineTool.js +4 -4
- package/src/Undo/Editor.js +68 -68
- package/src/Undo/UndoManager.js +1 -1
- package/src/assets/X3DUOM.xml +30 -50
- package/src/assets/images/OutlineEditor/Fields/MFQuaternion.svg +199 -0
- package/src/assets/images/OutlineEditor/Fields/SFQuaternion.svg +199 -0
|
@@ -566,82 +566,82 @@ module .exports = class OutlineView extends Interface
|
|
|
566
566
|
expandSceneExportedNodes (parent, scene)
|
|
567
567
|
{
|
|
568
568
|
if (!(scene instanceof X3D .X3DScene))
|
|
569
|
-
return $("<div></div>")
|
|
569
|
+
return $("<div></div>");
|
|
570
570
|
|
|
571
571
|
const child = $("<div></div>")
|
|
572
|
-
.addClass (["exported-nodes", "subtree"])
|
|
572
|
+
.addClass (["exported-nodes", "subtree"]);
|
|
573
573
|
|
|
574
|
-
scene .exportedNodes .addInterest ("updateSceneSubtree", this, parent, scene, "exported-nodes", "expandSceneExportedNodes")
|
|
574
|
+
scene .exportedNodes .addInterest ("updateSceneSubtree", this, parent, scene, "exported-nodes", "expandSceneExportedNodes");
|
|
575
575
|
|
|
576
576
|
if (!scene .exportedNodes .length)
|
|
577
|
-
return child .appendTo (parent)
|
|
577
|
+
return child .appendTo (parent);
|
|
578
578
|
|
|
579
579
|
const exportedNodes = Array .from (scene .exportedNodes) .sort ((a, b) =>
|
|
580
580
|
{
|
|
581
|
-
return this .naturalCompare (a .getExportedName (), b .getExportedName ())
|
|
581
|
+
return this .naturalCompare (a .getExportedName (), b .getExportedName ());
|
|
582
582
|
})
|
|
583
583
|
.sort ((a, b) =>
|
|
584
584
|
{
|
|
585
|
-
return this .naturalCompare (a .getLocalNode () .getTypeName (), b .getLocalNode () .getTypeName ())
|
|
586
|
-
})
|
|
585
|
+
return this .naturalCompare (a .getLocalNode () .getTypeName (), b .getLocalNode () .getTypeName ());
|
|
586
|
+
});
|
|
587
587
|
|
|
588
588
|
const ul = $("<ul></ul>")
|
|
589
|
-
.appendTo (child)
|
|
589
|
+
.appendTo (child);
|
|
590
590
|
|
|
591
591
|
$("<li></li>")
|
|
592
592
|
.addClass (["exported-nodes", "description", "no-select"])
|
|
593
593
|
.text ("Exported Nodes")
|
|
594
|
-
.appendTo (ul)
|
|
594
|
+
.appendTo (ul);
|
|
595
595
|
|
|
596
596
|
for (const exportedNode of exportedNodes)
|
|
597
597
|
{
|
|
598
|
-
ul .append (this .createExportedNodeElement ("exported-node", parent, exportedNode) .prop ("outerHTML"))
|
|
598
|
+
ul .append (this .createExportedNodeElement ("exported-node", parent, exportedNode) .prop ("outerHTML"));
|
|
599
599
|
}
|
|
600
600
|
|
|
601
601
|
// Added to prevent bug, that last route is not drawn right.
|
|
602
602
|
$("<li></li>")
|
|
603
603
|
.addClass (["last", "no-select"])
|
|
604
|
-
.appendTo (ul)
|
|
604
|
+
.appendTo (ul);
|
|
605
605
|
|
|
606
|
-
this .connectSceneSubtree (parent, child)
|
|
606
|
+
this .connectSceneSubtree (parent, child);
|
|
607
607
|
|
|
608
|
-
return child
|
|
608
|
+
return child;
|
|
609
609
|
}
|
|
610
610
|
|
|
611
611
|
createSceneElement (scene, typeName, classes)
|
|
612
612
|
{
|
|
613
|
-
this .objects .set (scene .getId (), scene)
|
|
613
|
+
this .objects .set (scene .getId (), scene);
|
|
614
614
|
|
|
615
615
|
// Scene
|
|
616
616
|
|
|
617
617
|
const child = $("<li></li>")
|
|
618
618
|
.addClass ("scene")
|
|
619
619
|
.addClass (classes)
|
|
620
|
-
.attr ("node-id", scene .getId ())
|
|
620
|
+
.attr ("node-id", scene .getId ());
|
|
621
621
|
|
|
622
622
|
// Icon
|
|
623
623
|
|
|
624
624
|
const icon = $("<img></img>")
|
|
625
625
|
.addClass ("icon")
|
|
626
626
|
.attr ("src", "../images/OutlineEditor/Node/X3DExecutionContext.svg")
|
|
627
|
-
.appendTo (child)
|
|
627
|
+
.appendTo (child);
|
|
628
628
|
|
|
629
629
|
// Name
|
|
630
630
|
|
|
631
631
|
const name = $("<div></div>")
|
|
632
632
|
.addClass ("name")
|
|
633
|
-
.appendTo (child)
|
|
633
|
+
.appendTo (child);
|
|
634
634
|
|
|
635
635
|
$("<span></span>")
|
|
636
636
|
.addClass ("field-name")
|
|
637
637
|
.text (typeName)
|
|
638
|
-
.appendTo (name)
|
|
638
|
+
.appendTo (name);
|
|
639
639
|
|
|
640
640
|
// Append empty tree to enable expander.
|
|
641
641
|
|
|
642
|
-
$("<ul><li></li></ul>") .appendTo (child)
|
|
642
|
+
$("<ul><li></li></ul>") .appendTo (child);
|
|
643
643
|
|
|
644
|
-
return child
|
|
644
|
+
return child;
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
updateNode (parent, node, full)
|
|
@@ -765,7 +765,7 @@ module .exports = class OutlineView extends Interface
|
|
|
765
765
|
|
|
766
766
|
if (node .checkLoadState () === X3D .X3DConstants .COMPLETE_STATE && this .expandInlineNodes && node .getType () .includes (X3D .X3DConstants .Inline))
|
|
767
767
|
{
|
|
768
|
-
ul .append (this .createSceneElement (node .getInternalScene (), "Scene", "internal-scene"))
|
|
768
|
+
ul .append (this .createSceneElement (node .getInternalScene (), "Scene", "internal-scene"));
|
|
769
769
|
}
|
|
770
770
|
else
|
|
771
771
|
{
|
|
@@ -804,7 +804,7 @@ module .exports = class OutlineView extends Interface
|
|
|
804
804
|
.find (".item") .append ("<div class=\"route-curves-wrapper\"><canvas class=\"route-curves\"></canvas></div>");
|
|
805
805
|
|
|
806
806
|
child .find (".field .name, .field .icon, .special .name, .special .icon")
|
|
807
|
-
.on ("click", this .selectField .bind (this))
|
|
807
|
+
.on ("click", this .selectField .bind (this));
|
|
808
808
|
|
|
809
809
|
child .find (".field .name, .special .name")
|
|
810
810
|
.on ("mouseenter", this .updateFieldTitle .bind (this));
|
|
@@ -1059,7 +1059,7 @@ module .exports = class OutlineView extends Interface
|
|
|
1059
1059
|
|
|
1060
1060
|
name .append (document .createTextNode (" "));
|
|
1061
1061
|
|
|
1062
|
-
const cloneCount = node .getCloneCount ?.() ?? 0
|
|
1062
|
+
const cloneCount = node .getCloneCount ?.() ?? 0;
|
|
1063
1063
|
|
|
1064
1064
|
$("<span></span>")
|
|
1065
1065
|
.addClass ("clone-count")
|
|
@@ -1265,7 +1265,7 @@ module .exports = class OutlineView extends Interface
|
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
1267
|
|
|
1268
|
-
buttons .sort ((a, b) => a .attr ("order") - b .attr ("order"))
|
|
1268
|
+
buttons .sort ((a, b) => a .attr ("order") - b .attr ("order"));
|
|
1269
1269
|
|
|
1270
1270
|
for (const button of buttons)
|
|
1271
1271
|
{
|
|
@@ -1279,7 +1279,7 @@ module .exports = class OutlineView extends Interface
|
|
|
1279
1279
|
this .sceneGraph
|
|
1280
1280
|
.find (`.node[node-id=${node .getId ()}], .exported-node[node-id=${node .getId ()}]`)
|
|
1281
1281
|
.find ("> .item .node-type-name")
|
|
1282
|
-
.text (node .getTypeName ())
|
|
1282
|
+
.text (node .getTypeName ());
|
|
1283
1283
|
}
|
|
1284
1284
|
|
|
1285
1285
|
updateNodeName (node)
|
|
@@ -1287,7 +1287,7 @@ module .exports = class OutlineView extends Interface
|
|
|
1287
1287
|
this .sceneGraph
|
|
1288
1288
|
.find (`.node[node-id=${node .getId ()}], .exported-node[node-id=${node .getId ()}]`)
|
|
1289
1289
|
.find ("> .item .node-name")
|
|
1290
|
-
.text (node .getDisplayName ())
|
|
1290
|
+
.text (node .getDisplayName ());
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
1293
|
updateExportedNodeName (exportedNode)
|
|
@@ -1495,7 +1495,7 @@ module .exports = class OutlineView extends Interface
|
|
|
1495
1495
|
|
|
1496
1496
|
name .append (document .createTextNode (" "));
|
|
1497
1497
|
|
|
1498
|
-
const cloneCount = node .getCloneCount ?.() ?? 0
|
|
1498
|
+
const cloneCount = node .getCloneCount ?.() ?? 0;
|
|
1499
1499
|
|
|
1500
1500
|
$("<span></span>")
|
|
1501
1501
|
.addClass ("clone-count")
|
|
@@ -1946,14 +1946,14 @@ module .exports = class OutlineView extends Interface
|
|
|
1946
1946
|
{
|
|
1947
1947
|
case 0:
|
|
1948
1948
|
title += `Number of Points: ${(numVertices) .toLocaleString (_.locale)}`;
|
|
1949
|
-
break
|
|
1949
|
+
break;
|
|
1950
1950
|
case 1:
|
|
1951
1951
|
title += `Number of Lines: ${(numVertices / 2) .toLocaleString (_.locale)}`;
|
|
1952
|
-
break
|
|
1952
|
+
break;
|
|
1953
1953
|
case 2:
|
|
1954
1954
|
case 3:
|
|
1955
1955
|
title += `Number of Triangles: ${(numVertices / 3) .toLocaleString (_.locale)}`;
|
|
1956
|
-
break
|
|
1956
|
+
break;
|
|
1957
1957
|
}
|
|
1958
1958
|
|
|
1959
1959
|
continue;
|
|
@@ -1999,12 +1999,12 @@ module .exports = class OutlineView extends Interface
|
|
|
1999
1999
|
|
|
2000
2000
|
updateReferences (parent, node, field)
|
|
2001
2001
|
{
|
|
2002
|
-
const element = parent .find (`.field[field-id=${field .getId ()}]`)
|
|
2002
|
+
const element = parent .find (`.field[field-id=${field .getId ()}]`);
|
|
2003
2003
|
|
|
2004
2004
|
if (field .getReferences () .size)
|
|
2005
|
-
element .addClass ("references")
|
|
2005
|
+
element .addClass ("references");
|
|
2006
2006
|
else
|
|
2007
|
-
element .removeClass ("references")
|
|
2007
|
+
element .removeClass ("references");
|
|
2008
2008
|
}
|
|
2009
2009
|
|
|
2010
2010
|
updateBoolean (parent, node, field)
|
|
@@ -2012,19 +2012,19 @@ module .exports = class OutlineView extends Interface
|
|
|
2012
2012
|
if (field .isInitializable ())
|
|
2013
2013
|
{
|
|
2014
2014
|
parent .find (`.field[field-id=${field .getId ()}] > .item .boolean-button`)
|
|
2015
|
-
.attr ("src", `../images/OutlineEditor/Values/${field .getValue () ? "TRUE" : "FALSE"}.svg`)
|
|
2015
|
+
.attr ("src", `../images/OutlineEditor/Values/${field .getValue () ? "TRUE" : "FALSE"}.svg`);
|
|
2016
2016
|
}
|
|
2017
2017
|
else if (field .isOutput ())
|
|
2018
2018
|
{
|
|
2019
2019
|
parent .find (`.field[field-id=${field .getId ()}] > .item .boolean-out-button`)
|
|
2020
|
-
.attr ("src", `../images/OutlineEditor/Values/${field .getValue () ? "TRUE" : "FALSE"}-out.svg`)
|
|
2020
|
+
.attr ("src", `../images/OutlineEditor/Values/${field .getValue () ? "TRUE" : "FALSE"}-out.svg`);
|
|
2021
2021
|
}
|
|
2022
2022
|
}
|
|
2023
2023
|
|
|
2024
2024
|
updateColor (parent, node, field)
|
|
2025
2025
|
{
|
|
2026
2026
|
parent .find (`.field[field-id=${field .getId ()}] > .item .color-button`)
|
|
2027
|
-
.css ("background-color", this .getColorFromField (node, field))
|
|
2027
|
+
.css ("background-color", this .getColorFromField (node, field));
|
|
2028
2028
|
}
|
|
2029
2029
|
|
|
2030
2030
|
getColorFromField (node, field, colorSpace = this .browser .getBrowserOption ("ColorSpace"))
|
|
@@ -2059,31 +2059,31 @@ module .exports = class OutlineView extends Interface
|
|
|
2059
2059
|
{
|
|
2060
2060
|
case "input":
|
|
2061
2061
|
{
|
|
2062
|
-
return "../images/OutlineEditor/AccessTypes/inputOnly.active.png"
|
|
2062
|
+
return "../images/OutlineEditor/AccessTypes/inputOnly.active.png";
|
|
2063
2063
|
}
|
|
2064
2064
|
case "output":
|
|
2065
2065
|
{
|
|
2066
|
-
return "../images/OutlineEditor/AccessTypes/outputOnly.active.png"
|
|
2066
|
+
return "../images/OutlineEditor/AccessTypes/outputOnly.active.png";
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
2069
|
}
|
|
2070
2070
|
else
|
|
2071
2071
|
{
|
|
2072
|
-
let accessTypeImage = this .accessTypes [field .getAccessType ()]
|
|
2072
|
+
let accessTypeImage = this .accessTypes [field .getAccessType ()];
|
|
2073
2073
|
|
|
2074
2074
|
if (field .isInput ())
|
|
2075
2075
|
{
|
|
2076
2076
|
switch (field .getInputRoutes () .size)
|
|
2077
2077
|
{
|
|
2078
2078
|
case 0:
|
|
2079
|
-
accessTypeImage += ".0"
|
|
2080
|
-
break
|
|
2079
|
+
accessTypeImage += ".0";
|
|
2080
|
+
break;
|
|
2081
2081
|
case 1:
|
|
2082
|
-
accessTypeImage += ".1"
|
|
2083
|
-
break
|
|
2082
|
+
accessTypeImage += ".1";
|
|
2083
|
+
break;
|
|
2084
2084
|
default:
|
|
2085
|
-
accessTypeImage += ".2"
|
|
2086
|
-
break
|
|
2085
|
+
accessTypeImage += ".2";
|
|
2086
|
+
break;
|
|
2087
2087
|
}
|
|
2088
2088
|
}
|
|
2089
2089
|
|
|
@@ -2092,20 +2092,20 @@ module .exports = class OutlineView extends Interface
|
|
|
2092
2092
|
switch (field .getOutputRoutes () .size)
|
|
2093
2093
|
{
|
|
2094
2094
|
case 0:
|
|
2095
|
-
accessTypeImage += ".0"
|
|
2096
|
-
break
|
|
2095
|
+
accessTypeImage += ".0";
|
|
2096
|
+
break;
|
|
2097
2097
|
case 1:
|
|
2098
|
-
accessTypeImage += ".1"
|
|
2099
|
-
break
|
|
2098
|
+
accessTypeImage += ".1";
|
|
2099
|
+
break;
|
|
2100
2100
|
default:
|
|
2101
|
-
accessTypeImage += ".2"
|
|
2102
|
-
break
|
|
2101
|
+
accessTypeImage += ".2";
|
|
2102
|
+
break;
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
2105
|
|
|
2106
|
-
accessTypeImage = "../images/OutlineEditor/AccessTypes/" + accessTypeImage + ".png"
|
|
2106
|
+
accessTypeImage = "../images/OutlineEditor/AccessTypes/" + accessTypeImage + ".png";
|
|
2107
2107
|
|
|
2108
|
-
return accessTypeImage
|
|
2108
|
+
return accessTypeImage;
|
|
2109
2109
|
}
|
|
2110
2110
|
}
|
|
2111
2111
|
|
|
@@ -2165,6 +2165,7 @@ module .exports = class OutlineView extends Interface
|
|
|
2165
2165
|
case X3D .X3DConstants .SFMatrix3f:
|
|
2166
2166
|
case X3D .X3DConstants .SFMatrix4d:
|
|
2167
2167
|
case X3D .X3DConstants .SFMatrix4f:
|
|
2168
|
+
case X3D .X3DConstants .SFQuaternion:
|
|
2168
2169
|
case X3D .X3DConstants .SFRotation:
|
|
2169
2170
|
case X3D .X3DConstants .SFString:
|
|
2170
2171
|
case X3D .X3DConstants .SFTime:
|
|
@@ -2189,6 +2190,7 @@ module .exports = class OutlineView extends Interface
|
|
|
2189
2190
|
case X3D .X3DConstants .MFMatrix3f:
|
|
2190
2191
|
case X3D .X3DConstants .MFMatrix4d:
|
|
2191
2192
|
case X3D .X3DConstants .MFMatrix4f:
|
|
2193
|
+
case X3D .X3DConstants .MFQuaternion:
|
|
2192
2194
|
case X3D .X3DConstants .MFRotation:
|
|
2193
2195
|
case X3D .X3DConstants .MFString:
|
|
2194
2196
|
case X3D .X3DConstants .MFTime:
|
|
@@ -2476,12 +2478,12 @@ module .exports = class OutlineView extends Interface
|
|
|
2476
2478
|
onkeydownField (input, event)
|
|
2477
2479
|
{
|
|
2478
2480
|
if (event .key === "Enter")
|
|
2479
|
-
input .blur ()
|
|
2481
|
+
input .blur ();
|
|
2480
2482
|
}
|
|
2481
2483
|
|
|
2482
2484
|
disconnectField (field)
|
|
2483
2485
|
{
|
|
2484
|
-
field .removeFieldCallback (this .#fieldSymbol)
|
|
2486
|
+
field .removeFieldCallback (this .#fieldSymbol);
|
|
2485
2487
|
}
|
|
2486
2488
|
|
|
2487
2489
|
#fieldValueSymbol = Symbol ();
|
|
@@ -2491,9 +2493,9 @@ module .exports = class OutlineView extends Interface
|
|
|
2491
2493
|
field .addFieldCallback (this .#fieldValueSymbol, () =>
|
|
2492
2494
|
{
|
|
2493
2495
|
if (field .getType () === X3D .X3DConstants .SFString)
|
|
2494
|
-
input .val (field .getValue ())
|
|
2496
|
+
input .val (field .getValue ());
|
|
2495
2497
|
else
|
|
2496
|
-
input .val (field .toString ({ scene: node .getExecutionContext () }))
|
|
2498
|
+
input .val (field .toString ({ scene: node .getExecutionContext () }));
|
|
2497
2499
|
});
|
|
2498
2500
|
|
|
2499
2501
|
if (assign)
|
|
@@ -2507,24 +2509,24 @@ module .exports = class OutlineView extends Interface
|
|
|
2507
2509
|
// Generate tree.
|
|
2508
2510
|
|
|
2509
2511
|
const child = $("<div></div>")
|
|
2510
|
-
.addClass ("subtree")
|
|
2512
|
+
.addClass ("subtree");
|
|
2511
2513
|
|
|
2512
2514
|
const ul = $("<ul></ul>")
|
|
2513
|
-
.appendTo (child)
|
|
2515
|
+
.appendTo (child);
|
|
2514
2516
|
|
|
2515
2517
|
if (full)
|
|
2516
|
-
ul .append (this .createRouteElements (node, field))
|
|
2518
|
+
ul .append (this .createRouteElements (node, field));
|
|
2517
2519
|
|
|
2518
2520
|
const li = $("<li></li>")
|
|
2519
2521
|
.addClass (type + "-value no-expand")
|
|
2520
2522
|
.attr ("node-id", node .getId ())
|
|
2521
2523
|
.attr ("field-id", field .getId ())
|
|
2522
|
-
.appendTo (ul)
|
|
2524
|
+
.appendTo (ul);
|
|
2523
2525
|
|
|
2524
2526
|
$("<div></div>")
|
|
2525
2527
|
.addClass (type + "-value-container")
|
|
2526
2528
|
.append ($("<textarea></textarea>"))
|
|
2527
|
-
.appendTo (li)
|
|
2529
|
+
.appendTo (li);
|
|
2528
2530
|
|
|
2529
2531
|
// Make jsTree.
|
|
2530
2532
|
|
|
@@ -2532,46 +2534,46 @@ module .exports = class OutlineView extends Interface
|
|
|
2532
2534
|
.jstree ()
|
|
2533
2535
|
.off ("keypress.jstree dblclick.jstree")
|
|
2534
2536
|
.appendTo (parent)
|
|
2535
|
-
.hide ()
|
|
2537
|
+
.hide ();
|
|
2536
2538
|
|
|
2537
2539
|
child
|
|
2538
2540
|
.removeAttr ("tabindex")
|
|
2539
2541
|
.find (".jstree-anchor > *")
|
|
2540
|
-
.unwrap ()
|
|
2542
|
+
.unwrap ();
|
|
2541
2543
|
|
|
2542
2544
|
child .find (".jstree-ocl")
|
|
2543
2545
|
.addClass ("material-icons")
|
|
2544
2546
|
.text ("arrow_right")
|
|
2545
2547
|
.on ("click", this .selectExpander .bind (this))
|
|
2546
|
-
.on ("dblclick", this .activateExpander .bind (this))
|
|
2548
|
+
.on ("dblclick", this .activateExpander .bind (this));
|
|
2547
2549
|
|
|
2548
2550
|
child .find (".jstree-node")
|
|
2549
2551
|
.wrapInner ("<div class=\"item no-select\"/>")
|
|
2550
|
-
.find (".item") .append ("<div class=\"route-curves-wrapper\"><canvas class=\"route-curves\"></canvas></div>")
|
|
2552
|
+
.find (".item") .append ("<div class=\"route-curves-wrapper\"><canvas class=\"route-curves\"></canvas></div>");
|
|
2551
2553
|
|
|
2552
2554
|
this .connectFieldActions (child);
|
|
2553
2555
|
|
|
2554
2556
|
// Textarea
|
|
2555
2557
|
|
|
2556
|
-
const textarea = child .find ("textarea")
|
|
2558
|
+
const textarea = child .find ("textarea");
|
|
2557
2559
|
|
|
2558
|
-
this .setTextAreaTabs (textarea)
|
|
2559
|
-
this .setTextArea (textarea, node, field)
|
|
2560
|
+
this .setTextAreaTabs (textarea);
|
|
2561
|
+
this .setTextArea (textarea, node, field);
|
|
2560
2562
|
|
|
2561
|
-
textarea .on ("mouseenter", this .updateFieldTitle .bind (this))
|
|
2563
|
+
textarea .on ("mouseenter", this .updateFieldTitle .bind (this));
|
|
2562
2564
|
|
|
2563
2565
|
if ((field .isInput () || field .isInitializable ()) && this .isEditable (parent))
|
|
2564
2566
|
{
|
|
2565
|
-
textarea .on ("keydown", this .onkeydownArrayField .bind (this, textarea))
|
|
2566
|
-
textarea .on ("focusin", this .disconnectField .bind (this, field))
|
|
2567
|
-
textarea .on ("focusout", this .connectArrayField .bind (this, textarea, node, field, true))
|
|
2567
|
+
textarea .on ("keydown", this .onkeydownArrayField .bind (this, textarea));
|
|
2568
|
+
textarea .on ("focusin", this .disconnectField .bind (this, field));
|
|
2569
|
+
textarea .on ("focusout", this .connectArrayField .bind (this, textarea, node, field, true));
|
|
2568
2570
|
}
|
|
2569
2571
|
else
|
|
2570
2572
|
{
|
|
2571
|
-
textarea .attr ("disabled", "disabled")
|
|
2573
|
+
textarea .attr ("disabled", "disabled");
|
|
2572
2574
|
}
|
|
2573
2575
|
|
|
2574
|
-
this .connectArrayField (textarea, node, field, false)
|
|
2576
|
+
this .connectArrayField (textarea, node, field, false);
|
|
2575
2577
|
|
|
2576
2578
|
// Expand children.
|
|
2577
2579
|
|
|
@@ -2584,34 +2586,34 @@ module .exports = class OutlineView extends Interface
|
|
|
2584
2586
|
onkeydownArrayField (textarea, event)
|
|
2585
2587
|
{
|
|
2586
2588
|
if ((event .ctrlKey || event .metaKey) && event .key === "Enter")
|
|
2587
|
-
textarea .blur ()
|
|
2589
|
+
textarea .blur ();
|
|
2588
2590
|
}
|
|
2589
2591
|
|
|
2590
2592
|
connectArrayField (textarea, node, field, assign)
|
|
2591
2593
|
{
|
|
2592
|
-
field .addFieldCallback (this .#fieldValueSymbol, this .setTextArea .bind (this, textarea, node, field))
|
|
2594
|
+
field .addFieldCallback (this .#fieldValueSymbol, this .setTextArea .bind (this, textarea, node, field));
|
|
2593
2595
|
|
|
2594
2596
|
if (assign)
|
|
2595
|
-
this .onArrayFieldEdited (textarea, node, field)
|
|
2597
|
+
this .onArrayFieldEdited (textarea, node, field);
|
|
2596
2598
|
}
|
|
2597
2599
|
|
|
2598
2600
|
onArrayFieldEdited (textarea, node, field) { }
|
|
2599
2601
|
|
|
2600
2602
|
createRouteElements (node, field)
|
|
2601
2603
|
{
|
|
2602
|
-
const elements = [ ]
|
|
2604
|
+
const elements = [ ];
|
|
2603
2605
|
|
|
2604
2606
|
field .getInputRoutes () .forEach ((route) =>
|
|
2605
2607
|
{
|
|
2606
|
-
elements .push (this .createRouteElement ("input", node, field, route) .get (0))
|
|
2607
|
-
})
|
|
2608
|
+
elements .push (this .createRouteElement ("input", node, field, route) .get (0));
|
|
2609
|
+
});
|
|
2608
2610
|
|
|
2609
2611
|
field .getOutputRoutes () .forEach ((route) =>
|
|
2610
2612
|
{
|
|
2611
|
-
elements .push (this .createRouteElement ("output", node, field, route) .get (0))
|
|
2612
|
-
})
|
|
2613
|
+
elements .push (this .createRouteElement ("output", node, field, route) .get (0));
|
|
2614
|
+
});
|
|
2613
2615
|
|
|
2614
|
-
return $(elements)
|
|
2616
|
+
return $(elements);
|
|
2615
2617
|
}
|
|
2616
2618
|
|
|
2617
2619
|
createRouteElement (type, node, field, route)
|
|
@@ -2761,23 +2763,23 @@ module .exports = class OutlineView extends Interface
|
|
|
2761
2763
|
textarea .on ("keydown", (event) =>
|
|
2762
2764
|
{
|
|
2763
2765
|
if (event .key !== "Tab")
|
|
2764
|
-
return
|
|
2766
|
+
return;
|
|
2765
2767
|
|
|
2766
2768
|
// Tab was pressed, get caret position/selection.
|
|
2767
2769
|
const
|
|
2768
2770
|
start = textarea .prop ("selectionStart"),
|
|
2769
|
-
end = textarea .prop ("selectionEnd")
|
|
2771
|
+
end = textarea .prop ("selectionEnd");
|
|
2770
2772
|
|
|
2771
2773
|
// Set textarea value to: text before caret + tab + text after caret.
|
|
2772
|
-
textarea .val (textarea .val () .substring (0, start) + "\t" + textarea .val () .substring (end))
|
|
2774
|
+
textarea .val (textarea .val () .substring (0, start) + "\t" + textarea .val () .substring (end));
|
|
2773
2775
|
|
|
2774
2776
|
// Put caret at right position again.
|
|
2775
|
-
textarea .prop ("selectionStart", start + 1)
|
|
2776
|
-
textarea .prop ("selectionEnd", start + 1)
|
|
2777
|
+
textarea .prop ("selectionStart", start + 1);
|
|
2778
|
+
textarea .prop ("selectionEnd", start + 1);
|
|
2777
2779
|
|
|
2778
2780
|
// Prevent the focus lose.
|
|
2779
|
-
return false
|
|
2780
|
-
})
|
|
2781
|
+
return false;
|
|
2782
|
+
});
|
|
2781
2783
|
}
|
|
2782
2784
|
|
|
2783
2785
|
setTextArea (textarea, node, field)
|
|
@@ -2812,7 +2814,7 @@ module .exports = class OutlineView extends Interface
|
|
|
2812
2814
|
case X3D .X3DConstants .MFString:
|
|
2813
2815
|
{
|
|
2814
2816
|
textarea .val (field .getValue () .map (value => value .toString ()) .join (",\n"));
|
|
2815
|
-
break
|
|
2817
|
+
break;
|
|
2816
2818
|
}
|
|
2817
2819
|
default:
|
|
2818
2820
|
{
|
|
@@ -3402,7 +3404,7 @@ module .exports = class OutlineView extends Interface
|
|
|
3402
3404
|
.addClass (parent .getEditChild () !== node ? "on" : "off");
|
|
3403
3405
|
|
|
3404
3406
|
if (parent .getEditChild () === node)
|
|
3405
|
-
parent .setEditChild (null)
|
|
3407
|
+
parent .setEditChild (null);
|
|
3406
3408
|
else
|
|
3407
3409
|
parent .setEditChild (node);
|
|
3408
3410
|
}
|
|
@@ -3447,7 +3449,7 @@ module .exports = class OutlineView extends Interface
|
|
|
3447
3449
|
|
|
3448
3450
|
showSelectedObjects ()
|
|
3449
3451
|
{
|
|
3450
|
-
const selection = require ("../Application/Selection")
|
|
3452
|
+
const selection = require ("../Application/Selection");
|
|
3451
3453
|
|
|
3452
3454
|
for (const object of Traverse .traverse (selection .nodes .length ? selection .nodes : this .executionContext, Traverse .INLINE_SCENE | Traverse .PROTOTYPE_INSTANCES | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
3453
3455
|
{
|
|
@@ -4061,7 +4063,7 @@ module .exports = class OutlineView extends Interface
|
|
|
4061
4063
|
this .saveExpandedNodes (element .find ("> div > ul > li"), path, expanded);
|
|
4062
4064
|
|
|
4063
4065
|
path .pop ();
|
|
4064
|
-
})
|
|
4066
|
+
});
|
|
4065
4067
|
|
|
4066
4068
|
return expanded;
|
|
4067
4069
|
}
|
|
@@ -4104,6 +4106,6 @@ module .exports = class OutlineView extends Interface
|
|
|
4104
4106
|
}
|
|
4105
4107
|
|
|
4106
4108
|
path .pop ();
|
|
4107
|
-
})
|
|
4109
|
+
});
|
|
4108
4110
|
}
|
|
4109
|
-
}
|
|
4111
|
+
};
|
package/src/Editors/Panel.js
CHANGED
|
@@ -338,7 +338,7 @@ module .exports = new class Panel extends Interface
|
|
|
338
338
|
|
|
339
339
|
// Update expanded state of folder.
|
|
340
340
|
|
|
341
|
-
folder .on ("fold", () => this .config .global [`${title}.expanded`] = folder .expanded)
|
|
341
|
+
folder .on ("fold", () => this .config .global [`${title}.expanded`] = folder .expanded);
|
|
342
342
|
|
|
343
343
|
// Add fields.
|
|
344
344
|
|
|
@@ -380,14 +380,14 @@ module .exports = new class Panel extends Interface
|
|
|
380
380
|
{
|
|
381
381
|
case 0:
|
|
382
382
|
this .numPrimitives .monitor = folder .addBinding (this .numPrimitives, "numberOfPoints", { readonly: true });
|
|
383
|
-
break
|
|
383
|
+
break;
|
|
384
384
|
case 1:
|
|
385
385
|
this .numPrimitives .monitor = folder .addBinding (this .numPrimitives, "numberOfLines", { readonly: true });
|
|
386
|
-
break
|
|
386
|
+
break;
|
|
387
387
|
case 2:
|
|
388
388
|
case 3:
|
|
389
389
|
this .numPrimitives .monitor = folder .addBinding (this .numPrimitives, "numberOfTriangles", { readonly: true });
|
|
390
|
-
break
|
|
390
|
+
break;
|
|
391
391
|
}
|
|
392
392
|
|
|
393
393
|
break;
|
|
@@ -454,6 +454,7 @@ module .exports = new class Panel extends Interface
|
|
|
454
454
|
case X3D .X3DConstants .SFMatrix3f:
|
|
455
455
|
case X3D .X3DConstants .SFMatrix4d:
|
|
456
456
|
case X3D .X3DConstants .SFMatrix4f:
|
|
457
|
+
case X3D .X3DConstants .SFQuaternion:
|
|
457
458
|
case X3D .X3DConstants .SFRotation:
|
|
458
459
|
case X3D .X3DConstants .SFString:
|
|
459
460
|
case X3D .X3DConstants .SFTime:
|
|
@@ -529,6 +530,7 @@ module .exports = new class Panel extends Interface
|
|
|
529
530
|
case X3D .X3DConstants .MFMatrix3f:
|
|
530
531
|
case X3D .X3DConstants .MFMatrix4d:
|
|
531
532
|
case X3D .X3DConstants .MFMatrix4f:
|
|
533
|
+
case X3D .X3DConstants .MFQuaternion:
|
|
532
534
|
case X3D .X3DConstants .MFRotation:
|
|
533
535
|
case X3D .X3DConstants .MFString:
|
|
534
536
|
case X3D .X3DConstants .MFTime:
|
|
@@ -609,6 +611,7 @@ module .exports = new class Panel extends Interface
|
|
|
609
611
|
case X3D .X3DConstants .SFDouble:
|
|
610
612
|
case X3D .X3DConstants .SFMatrix3d:
|
|
611
613
|
case X3D .X3DConstants .SFMatrix4d:
|
|
614
|
+
case X3D .X3DConstants .SFQuaternion:
|
|
612
615
|
case X3D .X3DConstants .SFRotation:
|
|
613
616
|
case X3D .X3DConstants .SFTime:
|
|
614
617
|
case X3D .X3DConstants .SFVec2d:
|
|
@@ -670,6 +673,7 @@ module .exports = new class Panel extends Interface
|
|
|
670
673
|
|
|
671
674
|
// falls through
|
|
672
675
|
}
|
|
676
|
+
case X3D .X3DConstants .SFQuaternion:
|
|
673
677
|
case X3D .X3DConstants .SFVec2d:
|
|
674
678
|
case X3D .X3DConstants .SFVec2f:
|
|
675
679
|
case X3D .X3DConstants .SFVec3d:
|
|
@@ -715,6 +719,7 @@ module .exports = new class Panel extends Interface
|
|
|
715
719
|
}
|
|
716
720
|
case X3D .X3DConstants .MFColor:
|
|
717
721
|
case X3D .X3DConstants .MFColorRGBA:
|
|
722
|
+
case X3D .X3DConstants .MFQuaternion:
|
|
718
723
|
case X3D .X3DConstants .MFRotation:
|
|
719
724
|
case X3D .X3DConstants .MFVec2d:
|
|
720
725
|
case X3D .X3DConstants .MFVec2f:
|
|
@@ -816,6 +821,7 @@ module .exports = new class Panel extends Interface
|
|
|
816
821
|
this .assign (executionContext, node, field, value);
|
|
817
822
|
break;
|
|
818
823
|
}
|
|
824
|
+
case X3D .X3DConstants .SFQuaternion:
|
|
819
825
|
case X3D .X3DConstants .SFVec4d:
|
|
820
826
|
case X3D .X3DConstants .SFVec4f:
|
|
821
827
|
{
|
|
@@ -855,6 +861,7 @@ module .exports = new class Panel extends Interface
|
|
|
855
861
|
case X3D .X3DConstants .MFMatrix3f:
|
|
856
862
|
case X3D .X3DConstants .MFMatrix4d:
|
|
857
863
|
case X3D .X3DConstants .MFMatrix4f:
|
|
864
|
+
case X3D .X3DConstants .MFQuaternion:
|
|
858
865
|
case X3D .X3DConstants .MFRotation:
|
|
859
866
|
case X3D .X3DConstants .MFString:
|
|
860
867
|
case X3D .X3DConstants .MFTime:
|
|
@@ -918,13 +925,13 @@ module .exports = new class Panel extends Interface
|
|
|
918
925
|
this .#vector .setName ("calculatedSize");
|
|
919
926
|
this .#vector .setUnit ("length");
|
|
920
927
|
|
|
921
|
-
this .refresh (this .bbox, this .node, this .#vector)
|
|
928
|
+
this .refresh (this .bbox, this .node, this .#vector);
|
|
922
929
|
|
|
923
930
|
this .#vector .setValue (bbox .center);
|
|
924
931
|
this .#vector .setName ("calculatedCenter");
|
|
925
932
|
this .#vector .setUnit ("length");
|
|
926
933
|
|
|
927
|
-
this .refresh (this .bbox, this .node, this .#vector)
|
|
934
|
+
this .refresh (this .bbox, this .node, this .#vector);
|
|
928
935
|
|
|
929
936
|
this .bbox .bboxSizeInput ?.refresh ();
|
|
930
937
|
this .bbox .bboxCenterInput ?.refresh ();
|
|
@@ -935,7 +942,7 @@ module .exports = new class Panel extends Interface
|
|
|
935
942
|
numberOfLines: "0",
|
|
936
943
|
numberOfTriangles: "0",
|
|
937
944
|
monitor: null,
|
|
938
|
-
}
|
|
945
|
+
};
|
|
939
946
|
|
|
940
947
|
refreshGeometry ()
|
|
941
948
|
{
|
|
@@ -947,14 +954,14 @@ module .exports = new class Panel extends Interface
|
|
|
947
954
|
{
|
|
948
955
|
case 0:
|
|
949
956
|
this .numPrimitives .numberOfPoints = (numVertices) .toLocaleString (_.locale);
|
|
950
|
-
break
|
|
957
|
+
break;
|
|
951
958
|
case 1:
|
|
952
959
|
this .numPrimitives .numberOfLines = (numVertices / 2) .toLocaleString (_.locale);
|
|
953
|
-
break
|
|
960
|
+
break;
|
|
954
961
|
case 2:
|
|
955
962
|
case 3:
|
|
956
963
|
this .numPrimitives .numberOfTriangles = (numVertices / 3) .toLocaleString (_.locale);
|
|
957
|
-
break
|
|
964
|
+
break;
|
|
958
965
|
}
|
|
959
966
|
|
|
960
967
|
this .numPrimitives .monitor ?.refresh ();
|