sunrize 2.3.5 → 2.4.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 +13 -13
- package/src/Application/Application.js +3 -3
- package/src/Application/Document.js +1 -1
- package/src/Application/Footer.js +10 -5
- package/src/Application/Tabs.js +13 -5
- package/src/Bits/X3DUOM.js +0 -3
- package/src/Controls/Tabs.js +4 -3
- package/src/Editors/AnimationEditor.js +61 -47
- package/src/Editors/OutlineEditor.js +51 -55
- package/src/Editors/OutlineView.js +89 -53
- package/src/Editors/RouteGraph.js +2368 -0
- package/src/Tools/Rendering/X3DGeometryNodeTool.js +2 -3
- package/src/Tools/Text/TextTool.js +1 -14
- package/src/Tools.js +3 -0
- package/src/Undo/Editor.js +39 -10
- package/src/Undo/UndoManager.js +18 -7
- package/src/assets/X3DUOM.xml +11 -9
- package/src/assets/html/application-template.html +1 -1
- package/src/assets/html/application.html +1 -1
- package/src/assets/themes/default.css +360 -36
- package/src/assets/themes/system-colors.css +17 -3
|
@@ -79,10 +79,9 @@ class X3DGeometryNodeTool extends X3DNodeTool
|
|
|
79
79
|
|
|
80
80
|
traverseAfter (type, renderObject)
|
|
81
81
|
{
|
|
82
|
-
if (this .isNodeTraversable (type))
|
|
83
|
-
this .node .traverseAfter ?.(type, renderObject);
|
|
84
|
-
|
|
85
82
|
this .traverse (type, renderObject);
|
|
83
|
+
|
|
84
|
+
this .node .traverseAfter ?.(type, renderObject);
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
|
|
@@ -2,19 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
const X3DGeometryNodeTool = require ("../Rendering/X3DGeometryNodeTool");
|
|
4
4
|
|
|
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
|
-
}
|
|
5
|
+
class TextTool extends X3DGeometryNodeTool { }
|
|
19
6
|
|
|
20
7
|
module .exports = TextTool;
|
package/src/Tools.js
CHANGED
|
@@ -19,6 +19,9 @@ Object .assign (X3D .X3DNode .prototype,
|
|
|
19
19
|
if (this .getExecutionContext () .getOuterNode () instanceof X3D .X3DProtoDeclaration)
|
|
20
20
|
return this;
|
|
21
21
|
|
|
22
|
+
if (this instanceof X3D .X3DImportedNodeProxy)
|
|
23
|
+
return this;
|
|
24
|
+
|
|
22
25
|
const module = path .resolve (__dirname, "Tools", this .constructor .componentInfo .name, this .constructor .typeName + "Tool.js");
|
|
23
26
|
|
|
24
27
|
if (!fs .existsSync (module))
|
package/src/Undo/Editor.js
CHANGED
|
@@ -1020,10 +1020,10 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1020
1020
|
|
|
1021
1021
|
const routes = executionContext .getRoutes () .filter (route =>
|
|
1022
1022
|
{
|
|
1023
|
-
if (route .
|
|
1023
|
+
if (route .getSourceNode () === exportedNode)
|
|
1024
1024
|
return true;
|
|
1025
1025
|
|
|
1026
|
-
if (route .
|
|
1026
|
+
if (route .getDestinationNode () === exportedNode)
|
|
1027
1027
|
return true;
|
|
1028
1028
|
|
|
1029
1029
|
return false;
|
|
@@ -1086,13 +1086,13 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1086
1086
|
|
|
1087
1087
|
for (let { sourceNode, sourceField, destinationNode, destinationField } of routes)
|
|
1088
1088
|
{
|
|
1089
|
-
if (sourceNode ===
|
|
1089
|
+
if (sourceNode === exportedNode)
|
|
1090
1090
|
sourceNode = newImportedNode;
|
|
1091
1091
|
|
|
1092
|
-
if (destinationNode ===
|
|
1092
|
+
if (destinationNode === exportedNode)
|
|
1093
1093
|
destinationNode = newImportedNode;
|
|
1094
1094
|
|
|
1095
|
-
|
|
1095
|
+
this .addRoute (executionContext, sourceNode, sourceField, destinationNode, destinationField, undoManager);
|
|
1096
1096
|
}
|
|
1097
1097
|
});
|
|
1098
1098
|
|
|
@@ -1234,12 +1234,31 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1234
1234
|
*/
|
|
1235
1235
|
static removeProtoDeclaration (executionContext, name, undoManager = UndoManager .shared)
|
|
1236
1236
|
{
|
|
1237
|
-
const
|
|
1237
|
+
const
|
|
1238
|
+
oldProto = executionContext .getProtoDeclaration (name),
|
|
1239
|
+
oldProtos = new Map (Array .from (executionContext .protos, p => [p .getName (), p]));
|
|
1238
1240
|
|
|
1239
1241
|
undoManager .beginUndo (_("Remove Proto Declaration »%s«"), name);
|
|
1240
1242
|
|
|
1241
1243
|
executionContext .removeProtoDeclaration (name);
|
|
1242
1244
|
|
|
1245
|
+
for (const field of oldProto .getFields ())
|
|
1246
|
+
{
|
|
1247
|
+
switch (field .getType ())
|
|
1248
|
+
{
|
|
1249
|
+
case X3D .X3DConstants .SFNode:
|
|
1250
|
+
{
|
|
1251
|
+
this .setFieldValue (executionContext, oldProto, field, null, undoManager);
|
|
1252
|
+
break;
|
|
1253
|
+
}
|
|
1254
|
+
case X3D .X3DConstants .MFNode:
|
|
1255
|
+
{
|
|
1256
|
+
this .setFieldValue (executionContext, oldProto, field, new X3D .MFNode (), undoManager);
|
|
1257
|
+
break;
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1243
1262
|
undoManager .registerUndo (() =>
|
|
1244
1263
|
{
|
|
1245
1264
|
this .setProtoDeclarations (executionContext, oldProtos, undoManager);
|
|
@@ -2336,6 +2355,20 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2336
2355
|
|
|
2337
2356
|
undoManager .beginUndo (_("Remove Field »%s«"), field .getName ());
|
|
2338
2357
|
|
|
2358
|
+
switch (field .getType ())
|
|
2359
|
+
{
|
|
2360
|
+
case X3D .X3DConstants .SFNode:
|
|
2361
|
+
{
|
|
2362
|
+
this .setFieldValue (executionContext, node, field, null, undoManager);
|
|
2363
|
+
break;
|
|
2364
|
+
}
|
|
2365
|
+
case X3D .X3DConstants .MFNode:
|
|
2366
|
+
{
|
|
2367
|
+
this .setFieldValue (executionContext, node, field, new X3D .MFNode (), undoManager);
|
|
2368
|
+
break;
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2339
2372
|
this .setUserDefinedFields (executionContext, node, fields, undoManager);
|
|
2340
2373
|
|
|
2341
2374
|
undoManager .endUndo ();
|
|
@@ -3641,13 +3674,9 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
3641
3674
|
switch (field .getType ())
|
|
3642
3675
|
{
|
|
3643
3676
|
case X3D .X3DConstants .SFNode:
|
|
3644
|
-
{
|
|
3645
3677
|
return !field .getValue ();
|
|
3646
|
-
}
|
|
3647
3678
|
case X3D .X3DConstants .MFNode:
|
|
3648
|
-
{
|
|
3649
3679
|
return this .#removeEmptyGroupsFromArray (node, field, undoManager);
|
|
3650
|
-
}
|
|
3651
3680
|
default:
|
|
3652
3681
|
return true;
|
|
3653
3682
|
}
|
package/src/Undo/UndoManager.js
CHANGED
|
@@ -8,7 +8,6 @@ module .exports = class UndoManager
|
|
|
8
8
|
{
|
|
9
9
|
static shared = new UndoManager (true);
|
|
10
10
|
|
|
11
|
-
saveNeeded = false;
|
|
12
11
|
undoStack = [ ];
|
|
13
12
|
undoFunctions = [ ];
|
|
14
13
|
deferFunctions = new Map ();
|
|
@@ -17,6 +16,21 @@ module .exports = class UndoManager
|
|
|
17
16
|
undoLabel = _("Undo");
|
|
18
17
|
redoLabel = _("Redo");
|
|
19
18
|
|
|
19
|
+
#saveNeeded = false;
|
|
20
|
+
|
|
21
|
+
get saveNeeded ()
|
|
22
|
+
{
|
|
23
|
+
return this .#saveNeeded;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
set saveNeeded (value)
|
|
27
|
+
{
|
|
28
|
+
this .#saveNeeded = value;
|
|
29
|
+
|
|
30
|
+
if (value)
|
|
31
|
+
this .#processInterests ();
|
|
32
|
+
}
|
|
33
|
+
|
|
20
34
|
undo ()
|
|
21
35
|
{
|
|
22
36
|
if (this .undoIndex < 0)
|
|
@@ -46,7 +60,6 @@ module .exports = class UndoManager
|
|
|
46
60
|
this .undoFunctions = [ ];
|
|
47
61
|
this .deferFunctions = new Map ();
|
|
48
62
|
this .undoIndex -= 1;
|
|
49
|
-
this .saveNeeded = true;
|
|
50
63
|
|
|
51
64
|
// Make labels.
|
|
52
65
|
|
|
@@ -59,7 +72,7 @@ module .exports = class UndoManager
|
|
|
59
72
|
|
|
60
73
|
// Propagate change.
|
|
61
74
|
|
|
62
|
-
this
|
|
75
|
+
this .saveNeeded = true;
|
|
63
76
|
}
|
|
64
77
|
|
|
65
78
|
redo ()
|
|
@@ -92,7 +105,6 @@ module .exports = class UndoManager
|
|
|
92
105
|
undoItem .undoFunctions = this .undoFunctions;
|
|
93
106
|
this .undoFunctions = [ ];
|
|
94
107
|
this .deferFunctions = new Map ();
|
|
95
|
-
this .saveNeeded = true;
|
|
96
108
|
|
|
97
109
|
// Make labels.
|
|
98
110
|
|
|
@@ -105,7 +117,7 @@ module .exports = class UndoManager
|
|
|
105
117
|
|
|
106
118
|
// Propagate change.
|
|
107
119
|
|
|
108
|
-
this
|
|
120
|
+
this .saveNeeded = true;
|
|
109
121
|
}
|
|
110
122
|
|
|
111
123
|
/**
|
|
@@ -150,7 +162,6 @@ module .exports = class UndoManager
|
|
|
150
162
|
this .undoFunctions = [ ];
|
|
151
163
|
this .deferFunctions = new Map ();
|
|
152
164
|
this .undoIndex = this .undoList .length - 1;
|
|
153
|
-
this .saveNeeded = true;
|
|
154
165
|
|
|
155
166
|
// Make labels.
|
|
156
167
|
|
|
@@ -159,7 +170,7 @@ module .exports = class UndoManager
|
|
|
159
170
|
|
|
160
171
|
// Propagate change.
|
|
161
172
|
|
|
162
|
-
this
|
|
173
|
+
this .saveNeeded = true;
|
|
163
174
|
}
|
|
164
175
|
|
|
165
176
|
/**
|
package/src/assets/X3DUOM.xml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<!-- X3D Unified Object Model (X3DUOM) X3dUnifiedObjectModel-4.1.xml -->
|
|
3
3
|
<!-- Online at https://www.web3d.org/specifications/X3dUnifiedObjectModel-4.1.xml -->
|
|
4
4
|
<!-- This file contains a listing of all abstract and concrete nodes in version 4.1 of X3D -->
|
|
5
|
-
<!-- Generated 2026-
|
|
5
|
+
<!-- Generated 2026-09-27-07:00 13:37:43.7598179-07:00 -->
|
|
6
6
|
<X3dUnifiedObjectModel xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
|
|
7
7
|
version="4.1"
|
|
8
8
|
xsd:noNamespaceSchemaLocation="https://www.web3d.org/specifications/X3dUnifiedObjectModel.xsd">
|
|
@@ -647,7 +647,7 @@
|
|
|
647
647
|
<enumeration value="SFMatrix4d"
|
|
648
648
|
appinfo="Single Field (singleton) 4×4 matrix of double-precision floating point numbers"/>
|
|
649
649
|
<enumeration value="MFMatrix4d"
|
|
650
|
-
appinfo="Multiple Field (list) 4×4
|
|
650
|
+
appinfo="Multiple Field (list) 4×4 matrix of double-precision floating point numbers"/>
|
|
651
651
|
<enumeration value="SFMatrix4f"
|
|
652
652
|
appinfo="Single Field (singleton) 4×4 matrix of single-precision floating point numbers"/>
|
|
653
653
|
<enumeration value="MFMatrix4f"
|
|
@@ -11597,7 +11597,6 @@
|
|
|
11597
11597
|
type="SFFloat"
|
|
11598
11598
|
accessType="inputOutput"
|
|
11599
11599
|
default="0"
|
|
11600
|
-
minInclusive="0"
|
|
11601
11600
|
description="The detune field, measured in cents, modulates the speed at which the the audio stream is rendered."/>
|
|
11602
11601
|
<field name="elapsedTime"
|
|
11603
11602
|
type="SFTime"
|
|
@@ -12461,7 +12460,6 @@
|
|
|
12461
12460
|
type="SFFloat"
|
|
12462
12461
|
accessType="inputOutput"
|
|
12463
12462
|
default="0"
|
|
12464
|
-
minInclusive="0"
|
|
12465
12463
|
description="The detune field, measured in cents, modulates the speed at which the the audio stream is rendered."/>
|
|
12466
12464
|
<field name="elapsedTime"
|
|
12467
12465
|
type="SFTime"
|
|
@@ -20994,13 +20992,13 @@
|
|
|
20994
20992
|
</ConcreteNode>
|
|
20995
20993
|
<ConcreteNode name="HAnimDisplacer">
|
|
20996
20994
|
<InterfaceDefinition specificationUrl="https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4.1-CD/Part01/components/hanim.html#HAnimDisplacer"
|
|
20997
|
-
appinfo="HAnimDisplacer nodes alter the shape of coordinate-based geometry within parent
|
|
20995
|
+
appinfo="HAnimDisplacer nodes alter the shape of coordinate-based geometry within parent HAnimSegment or ancestor HAnimHumanoid nodes.">
|
|
20998
20996
|
<componentInfo name="HAnim" level="1"/>
|
|
20999
20997
|
<Inheritance baseType="X3DGeometricPropertyNode"/>
|
|
21000
20998
|
<field name="coordIndex"
|
|
21001
20999
|
type="MFInt32"
|
|
21002
21000
|
accessType="inputOutput"
|
|
21003
|
-
description="Defines index values into the parent HAnimSegment or
|
|
21001
|
+
description="Defines index values into the parent HAnimSegment or ancestor HAnimHumanoid coordinate array for the mesh of vertices affected by this HAnimDisplacer."/>
|
|
21004
21002
|
<field name="description"
|
|
21005
21003
|
type="SFString"
|
|
21006
21004
|
accessType="inputOutput"
|
|
@@ -21854,6 +21852,10 @@
|
|
|
21854
21852
|
type="SFString"
|
|
21855
21853
|
accessType="inputOutput"
|
|
21856
21854
|
description="Author-provided prose that describes intended purpose of this node."/>
|
|
21855
|
+
<field name="displacers"
|
|
21856
|
+
type="MFNode"
|
|
21857
|
+
accessType="inputOutput"
|
|
21858
|
+
acceptableNodeTypes="HAnimDisplacer"/>
|
|
21857
21859
|
<field name="info"
|
|
21858
21860
|
type="MFString"
|
|
21859
21861
|
accessType="inputOutput"
|
|
@@ -21987,7 +21989,7 @@
|
|
|
21987
21989
|
additionalEnumerationValuesAllowed="false"
|
|
21988
21990
|
simpleType="hanimVersionChoices"
|
|
21989
21991
|
baseType="xs:NMTOKEN"
|
|
21990
|
-
description="HAnimHumanoid version, where allowed value is 2.">
|
|
21992
|
+
description="HAnimHumanoid version is required, where allowed value is 2.">
|
|
21991
21993
|
<enumeration value="2.0"
|
|
21992
21994
|
appinfo="Revised standard HAnim 19774 version 2 (parts 1 and 2) were approved by ISO in November 2019, published by Web3D Consortium May 2020."
|
|
21993
21995
|
documentation="https://www.web3d.org/documents/specifications/19774/V2.0"/>
|
|
@@ -22038,6 +22040,7 @@
|
|
|
22038
22040
|
<containerField default="children" type="xs:NMTOKEN"/>
|
|
22039
22041
|
<ContentModel>
|
|
22040
22042
|
<GroupContentModel name="ChildContentModelCore" minOccurs="0"/>
|
|
22043
|
+
<NodeContentModel name="HAnimDisplacer" minOccurs="0" maxOccurs="unbounded"/>
|
|
22041
22044
|
<NodeContentModel name="HAnimJoint" minOccurs="0" maxOccurs="unbounded"/>
|
|
22042
22045
|
<NodeContentModel name="HAnimSegment" minOccurs="0" maxOccurs="unbounded"/>
|
|
22043
22046
|
<NodeContentModel name="HAnimSite" minOccurs="0" maxOccurs="unbounded"/>
|
|
@@ -31621,7 +31624,6 @@
|
|
|
31621
31624
|
type="SFFloat"
|
|
31622
31625
|
accessType="inputOutput"
|
|
31623
31626
|
default="0"
|
|
31624
|
-
minInclusive="0"
|
|
31625
31627
|
description="The detune field, measured in cents, modulates the speed at which the the audio stream is rendered."/>
|
|
31626
31628
|
<field name="elapsedTime"
|
|
31627
31629
|
type="SFTime"
|
|
@@ -43560,7 +43562,7 @@
|
|
|
43560
43562
|
<enumeration value="SFMatrix4d"
|
|
43561
43563
|
appinfo="Single Field (singleton) 4×4 matrix of double-precision floating point numbers."/>
|
|
43562
43564
|
<enumeration value="MFMatrix4d"
|
|
43563
|
-
appinfo="Multiple Field (list) 4×4
|
|
43565
|
+
appinfo="Multiple Field (list) 4×4 matrix of double-precision floating point numbers."/>
|
|
43564
43566
|
<enumeration value="SFMatrix4f"
|
|
43565
43567
|
appinfo="Single Field (singleton) 4×4 matrix of single-precision floating point numbers."/>
|
|
43566
43568
|
<enumeration value="MFMatrix4f"
|