sunrize 1.7.29 → 1.7.31
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 +6 -45
- package/src/Application/Document.js +12 -0
- package/src/Editors/Library.js +5 -3
- package/src/Editors/NodeList.js +2 -6
- package/src/Editors/OutlineView.js +93 -53
- package/src/Tools/Core/X3DNodeTool.js +5 -2
- package/src/Undo/Editor.js +166 -88
- package/src/assets/Entitlements.plist +24 -0
- package/src/assets/Info.plist +8 -8
- package/src/assets/themes/default-template.css +5 -3
- package/src/assets/themes/default.css +5 -3
- package/src/Application/Traverse.js +0 -368
package/src/Undo/Editor.js
CHANGED
|
@@ -7,7 +7,7 @@ const
|
|
|
7
7
|
fs = require ("fs"),
|
|
8
8
|
zlib = require ("zlib"),
|
|
9
9
|
X3D = require ("../X3D"),
|
|
10
|
-
Traverse = require ("
|
|
10
|
+
Traverse = require ("x3d-traverse") (X3D),
|
|
11
11
|
UndoManager = require ("./UndoManager"),
|
|
12
12
|
_ = require ("../Application/GetText")
|
|
13
13
|
|
|
@@ -90,13 +90,20 @@ module .exports = class Editor
|
|
|
90
90
|
|
|
91
91
|
const protoNodes = new Set ()
|
|
92
92
|
|
|
93
|
-
Traverse .traverse (objects, Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES | Traverse .PROTOTYPE_INSTANCES
|
|
93
|
+
for (const object of Traverse .traverse (objects, Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES | Traverse .PROTOTYPE_INSTANCES))
|
|
94
94
|
{
|
|
95
|
-
if (
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
if (object instanceof X3D .X3DProtoDeclarationNode)
|
|
96
|
+
{
|
|
97
|
+
protoNodes .add (object);
|
|
98
|
+
}
|
|
99
|
+
else if (object instanceof X3D .SFNode)
|
|
100
|
+
{
|
|
101
|
+
const node = object .getValue ();
|
|
102
|
+
|
|
103
|
+
if (node .getType () .includes (X3D .X3DConstants .X3DPrototypeInstance))
|
|
104
|
+
protoNodes .add (node .getProtoNode ());
|
|
105
|
+
}
|
|
106
|
+
}
|
|
100
107
|
|
|
101
108
|
for (const protoNode of protoNodes)
|
|
102
109
|
{
|
|
@@ -125,8 +132,10 @@ module .exports = class Editor
|
|
|
125
132
|
childRoutes = new Set (),
|
|
126
133
|
inlineNodes = new Set ();
|
|
127
134
|
|
|
128
|
-
|
|
135
|
+
for (const object of nodes .traverse (Traverse .ROOT_NODES))
|
|
129
136
|
{
|
|
137
|
+
const node = object .getValue ();
|
|
138
|
+
|
|
130
139
|
componentNames .add (node .getComponentInfo () .name);
|
|
131
140
|
children .add (node .valueOf ());
|
|
132
141
|
|
|
@@ -141,7 +150,7 @@ module .exports = class Editor
|
|
|
141
150
|
|
|
142
151
|
if (node .getType () .includes (X3D .X3DConstants .Inline))
|
|
143
152
|
inlineNodes .add (node .valueOf ());
|
|
144
|
-
}
|
|
153
|
+
}
|
|
145
154
|
|
|
146
155
|
// Add exported nodes.
|
|
147
156
|
|
|
@@ -295,13 +304,18 @@ module .exports = class Editor
|
|
|
295
304
|
updatedProtos = new Map (),
|
|
296
305
|
removedProtoNodes = new Set ();
|
|
297
306
|
|
|
298
|
-
Traverse .traverse ([... newProtos, ... nodes], Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES
|
|
307
|
+
for (const object of Traverse .traverse ([... newProtos, ... nodes], Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
299
308
|
{
|
|
309
|
+
if (!(object instanceof X3D .SFNode))
|
|
310
|
+
continue;
|
|
311
|
+
|
|
312
|
+
const node = object .getValue ();
|
|
313
|
+
|
|
300
314
|
if (!node .getType () .includes (X3D .X3DConstants .X3DPrototypeInstance))
|
|
301
|
-
|
|
315
|
+
continue;
|
|
302
316
|
|
|
303
317
|
if (node .getProtoNode () .getExecutionContext () !== executionContext)
|
|
304
|
-
|
|
318
|
+
continue;
|
|
305
319
|
|
|
306
320
|
const proto = protos .get (node .getTypeName ());
|
|
307
321
|
|
|
@@ -309,7 +323,7 @@ module .exports = class Editor
|
|
|
309
323
|
{
|
|
310
324
|
updatedProtos .set (node .getTypeName (), proto);
|
|
311
325
|
this .setProtoNode (executionContext, node, proto, undoManager);
|
|
312
|
-
|
|
326
|
+
continue;
|
|
313
327
|
}
|
|
314
328
|
|
|
315
329
|
const externproto = externprotos .get (node .getTypeName ());
|
|
@@ -318,7 +332,7 @@ module .exports = class Editor
|
|
|
318
332
|
{
|
|
319
333
|
updatedExternProtos .set (node .getTypeName (), externproto);
|
|
320
334
|
this .setProtoNode (executionContext, node, externproto, undoManager);
|
|
321
|
-
|
|
335
|
+
continue;
|
|
322
336
|
}
|
|
323
337
|
|
|
324
338
|
const available = this .getNextAvailableProtoNode (executionContext, node .getTypeName ());
|
|
@@ -327,9 +341,9 @@ module .exports = class Editor
|
|
|
327
341
|
{
|
|
328
342
|
removedProtoNodes .add (node .getProtoNode ());
|
|
329
343
|
this .setProtoNode (executionContext, node, available, undoManager);
|
|
330
|
-
|
|
344
|
+
continue;
|
|
331
345
|
}
|
|
332
|
-
}
|
|
346
|
+
}
|
|
333
347
|
|
|
334
348
|
for (const [name, externproto] of updatedExternProtos)
|
|
335
349
|
this .updateExternProtoDeclaration (executionContext, name, externproto, undoManager);
|
|
@@ -398,9 +412,8 @@ module .exports = class Editor
|
|
|
398
412
|
|
|
399
413
|
fs .writeFileSync (filePath, this .getContents (scene, path .extname (filePath)));
|
|
400
414
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
scene .dispose ();
|
|
415
|
+
for (const object of scene .traverse (Traverse .ROOT_NODES | Traverse .PROTOTYPE_INSTANCES))
|
|
416
|
+
object .dispose ();
|
|
404
417
|
|
|
405
418
|
browser .setBrowserOption ("LoadUrlObjects", loadUrlObjects);
|
|
406
419
|
}
|
|
@@ -486,14 +499,18 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
486
499
|
{
|
|
487
500
|
undoManager .beginUndo (_("Rewrite URLs"))
|
|
488
501
|
|
|
489
|
-
Traverse .traverse (objects, Traverse .EXTERNPROTO_DECLARATIONS | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES
|
|
502
|
+
for (const object of Traverse .traverse (objects, Traverse .EXTERNPROTO_DECLARATIONS | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
490
503
|
{
|
|
504
|
+
if (!(object instanceof X3D .SFNode))
|
|
505
|
+
continue;
|
|
506
|
+
|
|
491
507
|
const
|
|
508
|
+
node = object .getValue (),
|
|
492
509
|
urlObject = node .getType () .includes (X3D .X3DConstants .X3DUrlObject),
|
|
493
510
|
fontStyleNode = node .getType () .includes (X3D .X3DConstants .X3DFontStyleNode);
|
|
494
511
|
|
|
495
512
|
if (!(urlObject || fontStyleNode))
|
|
496
|
-
|
|
513
|
+
continue;
|
|
497
514
|
|
|
498
515
|
const newURL = new X3D .MFString ();
|
|
499
516
|
|
|
@@ -557,7 +574,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
557
574
|
const uniqueURL = new X3D .MFString (... new Set (newURL));
|
|
558
575
|
|
|
559
576
|
this .setFieldValue (executionContext, node, node ._url, uniqueURL, undoManager);
|
|
560
|
-
}
|
|
577
|
+
}
|
|
561
578
|
|
|
562
579
|
undoManager .endUndo ();
|
|
563
580
|
}
|
|
@@ -616,13 +633,17 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
616
633
|
{
|
|
617
634
|
// Add nodes and child nodes.
|
|
618
635
|
|
|
619
|
-
const children = new Set ()
|
|
636
|
+
const children = new Set ();
|
|
620
637
|
|
|
621
|
-
Traverse .traverse (nodesToRemove, Traverse .ROOT_NODES | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY
|
|
638
|
+
Array .from (Traverse .traverse (nodesToRemove, Traverse .ROOT_NODES | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY))
|
|
639
|
+
.filter (object => object instanceof X3D .SFNode)
|
|
640
|
+
.forEach (node => children .add (node .getValue () .valueOf ()));
|
|
622
641
|
|
|
623
642
|
// Remove nodes still in scene graph.
|
|
624
643
|
|
|
625
|
-
Traverse .traverse (executionContext, Traverse .ROOT_NODES | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY
|
|
644
|
+
Array .from (Traverse .traverse (executionContext, Traverse .ROOT_NODES | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY))
|
|
645
|
+
.filter (object => object instanceof X3D .SFNode)
|
|
646
|
+
.forEach (node => children .delete (node .getValue () .valueOf ()));
|
|
626
647
|
|
|
627
648
|
if (children .size === 0)
|
|
628
649
|
continue;
|
|
@@ -755,16 +776,18 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
755
776
|
{
|
|
756
777
|
const components = new Set ();
|
|
757
778
|
|
|
758
|
-
|
|
779
|
+
for (const object of scene .traverse (Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES | Traverse .PROTOTYPE_INSTANCES))
|
|
759
780
|
{
|
|
760
|
-
if (!
|
|
761
|
-
|
|
781
|
+
if (!(object instanceof X3D .SFNode))
|
|
782
|
+
continue;
|
|
783
|
+
|
|
784
|
+
const node = object .getValue ();
|
|
762
785
|
|
|
763
786
|
if (node .getScene () !== scene)
|
|
764
|
-
|
|
787
|
+
continue;
|
|
765
788
|
|
|
766
789
|
components .add (node .getComponentInfo () .name);
|
|
767
|
-
}
|
|
790
|
+
}
|
|
768
791
|
|
|
769
792
|
return components;
|
|
770
793
|
}
|
|
@@ -1361,11 +1384,21 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1361
1384
|
*/
|
|
1362
1385
|
static protoIsUsedInProto (proto, parent)
|
|
1363
1386
|
{
|
|
1364
|
-
|
|
1387
|
+
for (const object of parent .traverse (Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODE))
|
|
1365
1388
|
{
|
|
1366
|
-
if (
|
|
1367
|
-
|
|
1368
|
-
|
|
1389
|
+
if (!(object instanceof X3D .SFNode))
|
|
1390
|
+
continue;
|
|
1391
|
+
|
|
1392
|
+
const node = object .getValue ();
|
|
1393
|
+
|
|
1394
|
+
if (!node .getType () .includes (X3D .X3DConstants .X3DPrototypeInstance))
|
|
1395
|
+
continue;
|
|
1396
|
+
|
|
1397
|
+
if (node .getProtoNode () === proto)
|
|
1398
|
+
return true;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
return false;
|
|
1369
1402
|
}
|
|
1370
1403
|
|
|
1371
1404
|
/**
|
|
@@ -1529,11 +1562,21 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1529
1562
|
*/
|
|
1530
1563
|
static isProtoNodeUsed (executionContext, protoNode)
|
|
1531
1564
|
{
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1565
|
+
for (const object of executionContext .traverse (Traverse .ROOT_NODES | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY))
|
|
1566
|
+
{
|
|
1567
|
+
if (!(object instanceof X3D .SFNode))
|
|
1568
|
+
continue;
|
|
1569
|
+
|
|
1570
|
+
const node = object .getValue ();
|
|
1571
|
+
|
|
1572
|
+
if (!node .getType () .includes (X3D .X3DConstants .X3DPrototypeInstance))
|
|
1573
|
+
continue;
|
|
1574
|
+
|
|
1575
|
+
if (node .getProtoNode () === protoNode)
|
|
1576
|
+
return true;
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1579
|
+
return false;
|
|
1537
1580
|
}
|
|
1538
1581
|
|
|
1539
1582
|
/**
|
|
@@ -1707,14 +1750,19 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1707
1750
|
{
|
|
1708
1751
|
undoManager .beginUndo (_("Replace Proto Node %s"), protoNode .getName ());
|
|
1709
1752
|
|
|
1710
|
-
|
|
1753
|
+
for (const object of executionContext .traverse (Traverse .ROOT_NODES | Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY))
|
|
1711
1754
|
{
|
|
1755
|
+
if (!(object instanceof X3D .SFNode))
|
|
1756
|
+
continue;
|
|
1757
|
+
|
|
1758
|
+
const node = object .getValue ();
|
|
1759
|
+
|
|
1712
1760
|
if (node .getType () .includes (X3D .X3DConstants .X3DPrototypeInstance))
|
|
1713
1761
|
{
|
|
1714
1762
|
if (node .getProtoNode () === protoNode)
|
|
1715
1763
|
this .setProtoNode (node .getExecutionContext (), node, by, undoManager);
|
|
1716
1764
|
}
|
|
1717
|
-
}
|
|
1765
|
+
}
|
|
1718
1766
|
|
|
1719
1767
|
this .requestUpdateInstances (executionContext, undoManager);
|
|
1720
1768
|
|
|
@@ -1953,8 +2001,10 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1953
2001
|
|
|
1954
2002
|
undoManager .beginUndo (_("Remove Node"));
|
|
1955
2003
|
|
|
1956
|
-
|
|
2004
|
+
for (const object of executionContext .traverse (Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
1957
2005
|
{
|
|
2006
|
+
const node = object instanceof X3D .SFNode ? object .getValue () : object;
|
|
2007
|
+
|
|
1958
2008
|
if (node instanceof X3D .X3DExecutionContext)
|
|
1959
2009
|
{
|
|
1960
2010
|
for (let i = node .rootNodes .length - 1; i >= 0; -- i)
|
|
@@ -1989,7 +2039,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
1989
2039
|
}
|
|
1990
2040
|
}
|
|
1991
2041
|
}
|
|
1992
|
-
}
|
|
2042
|
+
}
|
|
1993
2043
|
|
|
1994
2044
|
undoManager .endUndo ();
|
|
1995
2045
|
}
|
|
@@ -2051,8 +2101,13 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2051
2101
|
proto = node,
|
|
2052
2102
|
updatedField = field;
|
|
2053
2103
|
|
|
2054
|
-
|
|
2104
|
+
for (const object of proto .traverse (Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
2055
2105
|
{
|
|
2106
|
+
if (!(object instanceof X3D .SFNode))
|
|
2107
|
+
continue;
|
|
2108
|
+
|
|
2109
|
+
const node = object .getValue ();
|
|
2110
|
+
|
|
2056
2111
|
for (const field of node .getFields ())
|
|
2057
2112
|
{
|
|
2058
2113
|
// Remove references.
|
|
@@ -2063,33 +2118,41 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2063
2118
|
this .removeReference (proto, updatedField, node, field, undoManager);
|
|
2064
2119
|
}
|
|
2065
2120
|
}
|
|
2066
|
-
}
|
|
2121
|
+
}
|
|
2067
2122
|
|
|
2068
2123
|
// Remove routes.
|
|
2069
2124
|
|
|
2070
|
-
|
|
2125
|
+
for (const object of executionContext .traverse (Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
2071
2126
|
{
|
|
2072
|
-
if (
|
|
2073
|
-
|
|
2074
|
-
|
|
2127
|
+
if (!(object instanceof X3D .SFNode))
|
|
2128
|
+
continue;
|
|
2129
|
+
|
|
2130
|
+
const node = object .getValue ();
|
|
2131
|
+
|
|
2132
|
+
if (!node .getType () .includes (X3D .X3DConstants .X3DPrototypeInstance))
|
|
2133
|
+
continue;
|
|
2134
|
+
|
|
2135
|
+
if (node .getProtoNode () !== proto)
|
|
2136
|
+
continue;
|
|
2137
|
+
|
|
2138
|
+
const field = node .getField (oldName);
|
|
2075
2139
|
|
|
2076
|
-
|
|
2140
|
+
if (!updatedField .isInput ())
|
|
2141
|
+
{
|
|
2142
|
+
for (const route of field .getInputRoutes ())
|
|
2077
2143
|
{
|
|
2078
|
-
|
|
2079
|
-
{
|
|
2080
|
-
this .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField, undoManager);
|
|
2081
|
-
}
|
|
2144
|
+
this .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField, undoManager);
|
|
2082
2145
|
}
|
|
2146
|
+
}
|
|
2083
2147
|
|
|
2084
|
-
|
|
2148
|
+
if (!updatedField .isOutput ())
|
|
2149
|
+
{
|
|
2150
|
+
for (const route of field .getOutputRoutes ())
|
|
2085
2151
|
{
|
|
2086
|
-
|
|
2087
|
-
{
|
|
2088
|
-
this .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField, undoManager);
|
|
2089
|
-
}
|
|
2152
|
+
this .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField, undoManager);
|
|
2090
2153
|
}
|
|
2091
2154
|
}
|
|
2092
|
-
}
|
|
2155
|
+
}
|
|
2093
2156
|
|
|
2094
2157
|
this .updateInstances (proto, undoManager);
|
|
2095
2158
|
}
|
|
@@ -2176,8 +2239,13 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2176
2239
|
|
|
2177
2240
|
// Remove references.
|
|
2178
2241
|
|
|
2179
|
-
|
|
2242
|
+
for (const object of proto .traverse (Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
2180
2243
|
{
|
|
2244
|
+
if (!(object instanceof X3D .SFNode))
|
|
2245
|
+
continue;
|
|
2246
|
+
|
|
2247
|
+
const node = object .getValue ();
|
|
2248
|
+
|
|
2181
2249
|
for (const field of node .getFields ())
|
|
2182
2250
|
{
|
|
2183
2251
|
for (const removedField of removedFields)
|
|
@@ -2192,42 +2260,50 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2192
2260
|
this .removeReference (proto, reference, node, field, undoManager);
|
|
2193
2261
|
}
|
|
2194
2262
|
}
|
|
2195
|
-
}
|
|
2263
|
+
}
|
|
2196
2264
|
|
|
2197
2265
|
// Remove routes, and undo set value.
|
|
2198
2266
|
|
|
2199
|
-
|
|
2267
|
+
for (const object of executionContext .traverse (Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
2200
2268
|
{
|
|
2201
|
-
if (
|
|
2269
|
+
if (!(object instanceof X3D .SFNode))
|
|
2270
|
+
continue;
|
|
2271
|
+
|
|
2272
|
+
const node = object .getValue ();
|
|
2273
|
+
|
|
2274
|
+
if (!node .getType () .includes (X3D .X3DConstants .X3DPrototypeInstance))
|
|
2275
|
+
continue;
|
|
2276
|
+
|
|
2277
|
+
if (node .getProtoNode () !== proto)
|
|
2278
|
+
continue;
|
|
2279
|
+
|
|
2280
|
+
for (const removedField of removedFields)
|
|
2202
2281
|
{
|
|
2203
|
-
|
|
2282
|
+
const field = node .getField (removedField .getName ());
|
|
2283
|
+
|
|
2284
|
+
if (field .isInitializable ())
|
|
2204
2285
|
{
|
|
2205
|
-
const
|
|
2286
|
+
const
|
|
2287
|
+
name = field .getName (),
|
|
2288
|
+
oldValue = field .copy ();
|
|
2206
2289
|
|
|
2207
|
-
|
|
2290
|
+
undoManager .registerUndo (() =>
|
|
2208
2291
|
{
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
undoManager .registerUndo (() =>
|
|
2214
|
-
{
|
|
2215
|
-
this .setFieldValue (node .getExecutionContext (), node, name, oldValue, undoManager);
|
|
2216
|
-
});
|
|
2217
|
-
}
|
|
2292
|
+
this .setFieldValue (node .getExecutionContext (), node, name, oldValue, undoManager);
|
|
2293
|
+
});
|
|
2294
|
+
}
|
|
2218
2295
|
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2296
|
+
for (const route of field .getInputRoutes ())
|
|
2297
|
+
{
|
|
2298
|
+
this .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField, undoManager);
|
|
2299
|
+
}
|
|
2223
2300
|
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
}
|
|
2301
|
+
for (const route of field .getOutputRoutes ())
|
|
2302
|
+
{
|
|
2303
|
+
this .deleteRoute (route .getExecutionContext (), route .sourceNode, route .sourceField, route .destinationNode, route .destinationField, undoManager);
|
|
2228
2304
|
}
|
|
2229
2305
|
}
|
|
2230
|
-
}
|
|
2306
|
+
}
|
|
2231
2307
|
|
|
2232
2308
|
this .updateInstances (proto, undoManager);
|
|
2233
2309
|
}
|
|
@@ -2843,9 +2919,11 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2843
2919
|
|
|
2844
2920
|
undoManager .beginUndo (_("Replace All Occurrences of %s by %s"), original .getTypeName (), replacement .getTypeName ());
|
|
2845
2921
|
|
|
2846
|
-
|
|
2922
|
+
for (const object of executionContext .traverse (Traverse .PROTO_DECLARATIONS | Traverse .PROTO_DECLARATION_BODY | Traverse .ROOT_NODES))
|
|
2847
2923
|
{
|
|
2848
|
-
const
|
|
2924
|
+
const
|
|
2925
|
+
node = object instanceof X3D .SFNode ? object .getValue () : object,
|
|
2926
|
+
fields = node instanceof X3D .X3DExecutionContext ? [node .getRootNodes ()] : node .getFields ()
|
|
2849
2927
|
|
|
2850
2928
|
for (const field of fields)
|
|
2851
2929
|
{
|
|
@@ -2870,7 +2948,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2870
2948
|
}
|
|
2871
2949
|
}
|
|
2872
2950
|
}
|
|
2873
|
-
}
|
|
2951
|
+
}
|
|
2874
2952
|
|
|
2875
2953
|
undoManager .endUndo ();
|
|
2876
2954
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>com.apple.security.cs.allow-jit</key>
|
|
6
|
+
<true/>
|
|
7
|
+
<key>com.apple.security.device.audio-input</key>
|
|
8
|
+
<true/>
|
|
9
|
+
<key>com.apple.security.device.bluetooth</key>
|
|
10
|
+
<true/>
|
|
11
|
+
<key>com.apple.security.device.camera</key>
|
|
12
|
+
<true/>
|
|
13
|
+
<key>com.apple.security.device.print</key>
|
|
14
|
+
<true/>
|
|
15
|
+
<key>com.apple.security.device.usb</key>
|
|
16
|
+
<true/>
|
|
17
|
+
<key>com.apple.security.personal-information.location</key>
|
|
18
|
+
<true/>
|
|
19
|
+
<key>com.apple.security.personal-information.addressbook</key>
|
|
20
|
+
<true/>
|
|
21
|
+
<key>com.apple.security.personal-information.calendars</key>
|
|
22
|
+
<true/>
|
|
23
|
+
</dict>
|
|
24
|
+
</plist>
|
package/src/assets/Info.plist
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<string>Owner</string>
|
|
25
25
|
<key>LSIsAppleDefaultForType</key>
|
|
26
26
|
<true/>
|
|
27
|
-
<key>
|
|
27
|
+
<key>UTTypeConformsTo</key>
|
|
28
28
|
<array>
|
|
29
29
|
<string>io.github.create3000.x3d</string>
|
|
30
30
|
<string>io.castleengine.view3dscene.x3d</string>
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
<string>Owner</string>
|
|
55
55
|
<key>LSIsAppleDefaultForType</key>
|
|
56
56
|
<true/>
|
|
57
|
-
<key>
|
|
57
|
+
<key>UTTypeConformsTo</key>
|
|
58
58
|
<array>
|
|
59
59
|
<string>io.github.create3000.x3d</string>
|
|
60
60
|
<string>io.castleengine.view3dscene.x3d</string>
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
<string>Owner</string>
|
|
82
82
|
<key>LSIsAppleDefaultForType</key>
|
|
83
83
|
<true/>
|
|
84
|
-
<key>
|
|
84
|
+
<key>UTTypeConformsTo</key>
|
|
85
85
|
<array>
|
|
86
86
|
<string>io.github.create3000.x3dv</string>
|
|
87
87
|
<string>io.castleengine.view3dscene.x3dv</string>
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
<string>Owner</string>
|
|
112
112
|
<key>LSIsAppleDefaultForType</key>
|
|
113
113
|
<true/>
|
|
114
|
-
<key>
|
|
114
|
+
<key>UTTypeConformsTo</key>
|
|
115
115
|
<array>
|
|
116
116
|
<string>io.github.create3000.x3dv</string>
|
|
117
117
|
<string>io.castleengine.view3dscene.x3dv</string>
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
<string>Owner</string>
|
|
139
139
|
<key>LSIsAppleDefaultForType</key>
|
|
140
140
|
<true/>
|
|
141
|
-
<key>
|
|
141
|
+
<key>UTTypeConformsTo</key>
|
|
142
142
|
<array>
|
|
143
143
|
<string>io.github.create3000.x3dj</string>
|
|
144
144
|
<string>io.castleengine.view3dscene.x3dj</string>
|
|
@@ -168,7 +168,7 @@
|
|
|
168
168
|
<string>Owner</string>
|
|
169
169
|
<key>LSIsAppleDefaultForType</key>
|
|
170
170
|
<true/>
|
|
171
|
-
<key>
|
|
171
|
+
<key>UTTypeConformsTo</key>
|
|
172
172
|
<array>
|
|
173
173
|
<string>io.github.create3000.x3dj</string>
|
|
174
174
|
<string>io.castleengine.view3dscene.x3dj</string>
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
<string>Owner</string>
|
|
199
199
|
<key>LSIsAppleDefaultForType</key>
|
|
200
200
|
<true/>
|
|
201
|
-
<key>
|
|
201
|
+
<key>UTTypeConformsTo</key>
|
|
202
202
|
<array>
|
|
203
203
|
<string>io.github.create3000.vrml</string>
|
|
204
204
|
<string>io.castleengine.view3dscene.vrml</string>
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
<string>Owner</string>
|
|
230
230
|
<key>LSIsAppleDefaultForType</key>
|
|
231
231
|
<true/>
|
|
232
|
-
<key>
|
|
232
|
+
<key>UTTypeConformsTo</key>
|
|
233
233
|
<array>
|
|
234
234
|
<string>io.github.create3000.vrml</string>
|
|
235
235
|
<string>io.castleengine.view3dscene.vrml</string>
|
|
@@ -983,6 +983,7 @@ body.dark .ui-widget .library-list .component {
|
|
|
983
983
|
.tree-view .item {
|
|
984
984
|
display: flex;
|
|
985
985
|
flex-direction: row;
|
|
986
|
+
white-space: nowrap;
|
|
986
987
|
}
|
|
987
988
|
|
|
988
989
|
.tree-view .item > * {
|
|
@@ -1056,7 +1057,7 @@ body.dark .ui-widget .library-list .component {
|
|
|
1056
1057
|
display: none;
|
|
1057
1058
|
}
|
|
1058
1059
|
|
|
1059
|
-
.scene-graph .description {
|
|
1060
|
+
.scene-graph .description .jstree-anchor {
|
|
1060
1061
|
padding: 2px 0;
|
|
1061
1062
|
font-size: smaller;
|
|
1062
1063
|
}
|
|
@@ -1077,11 +1078,12 @@ body.dark .ui-widget .library-list .component {
|
|
|
1077
1078
|
color: var(--system-red);
|
|
1078
1079
|
}
|
|
1079
1080
|
|
|
1081
|
+
/* make drag & drop work */
|
|
1080
1082
|
.scene-graph .last {
|
|
1081
|
-
height:
|
|
1083
|
+
height: 2px;
|
|
1082
1084
|
}
|
|
1083
1085
|
|
|
1084
|
-
.scene-graph .last
|
|
1086
|
+
.scene-graph .last .item *:not(.route-curves-wrapper, .route-curves) {
|
|
1085
1087
|
visibility: hidden;
|
|
1086
1088
|
}
|
|
1087
1089
|
|
|
@@ -983,6 +983,7 @@ body.dark .ui-widget .library-list .component {
|
|
|
983
983
|
.tree-view .item {
|
|
984
984
|
display: flex;
|
|
985
985
|
flex-direction: row;
|
|
986
|
+
white-space: nowrap;
|
|
986
987
|
}
|
|
987
988
|
|
|
988
989
|
.tree-view .item > * {
|
|
@@ -1056,7 +1057,7 @@ body.dark .ui-widget .library-list .component {
|
|
|
1056
1057
|
display: none;
|
|
1057
1058
|
}
|
|
1058
1059
|
|
|
1059
|
-
.scene-graph .description {
|
|
1060
|
+
.scene-graph .description .jstree-anchor {
|
|
1060
1061
|
padding: 2px 0;
|
|
1061
1062
|
font-size: smaller;
|
|
1062
1063
|
}
|
|
@@ -1078,10 +1079,11 @@ body.dark .ui-widget .library-list .component {
|
|
|
1078
1079
|
}
|
|
1079
1080
|
|
|
1080
1081
|
.scene-graph .last {
|
|
1081
|
-
|
|
1082
|
+
/* make drag & drop work */
|
|
1083
|
+
height: 2px;
|
|
1082
1084
|
}
|
|
1083
1085
|
|
|
1084
|
-
.scene-graph .last
|
|
1086
|
+
.scene-graph .last .item *:not(.route-curves-wrapper, .route-curves) {
|
|
1085
1087
|
visibility: hidden;
|
|
1086
1088
|
}
|
|
1087
1089
|
|