sunrize 1.1.7 → 1.1.9
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/Application.js +47 -22
- package/src/Components/Grouping/StaticGroup.js +3 -3
- package/src/Editors/Library.js +11 -11
- package/src/Editors/OutlineEditor.js +3 -3
- package/src/Editors/Primitives.js +25 -25
- package/src/Tools.js +1 -1
- package/src/Undo/Editor.js +2 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.9",
|
|
5
5
|
"description": "A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@electron-forge/maker-rpm": "^6.4.2",
|
|
62
62
|
"@electron-forge/maker-squirrel": "^6.4.2",
|
|
63
63
|
"@electron-forge/maker-zip": "^6.4.2",
|
|
64
|
-
"electron": "^27.0.
|
|
64
|
+
"electron": "^27.0.4"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"capitalize": "^2.0.4",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"jquery-ui-dist": "^1.13.2",
|
|
75
75
|
"jstree": "^3.3.16",
|
|
76
76
|
"material-icons": "^1.13.12",
|
|
77
|
-
"material-symbols": "^0.
|
|
77
|
+
"material-symbols": "^0.14.0",
|
|
78
78
|
"md5": "^2.3.0",
|
|
79
79
|
"monaco-editor": "^0.44.0",
|
|
80
80
|
"node-clipboardy": "^1.0.3",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"qtip2": "^3.0.3",
|
|
83
83
|
"spectrum-colorpicker2": "^2.0.10",
|
|
84
84
|
"string-similarity": "^4.0.4",
|
|
85
|
-
"x_ite": "^9.0.
|
|
85
|
+
"x_ite": "^9.0.3"
|
|
86
86
|
},
|
|
87
87
|
"config": {
|
|
88
88
|
"forge": {
|
|
@@ -651,57 +651,82 @@ module .exports = class Application
|
|
|
651
651
|
contextIsolation: false,
|
|
652
652
|
webviewTag: true,
|
|
653
653
|
},
|
|
654
|
-
})
|
|
654
|
+
});
|
|
655
655
|
|
|
656
|
-
this .mainWindow = window
|
|
656
|
+
this .mainWindow = window;
|
|
657
657
|
|
|
658
|
-
window .setVisibleOnAllWorkspaces (true)
|
|
659
|
-
window .once ("ready-to-show", () => window .show ())
|
|
658
|
+
window .setVisibleOnAllWorkspaces (true);
|
|
659
|
+
window .once ("ready-to-show", () => window .show ());
|
|
660
660
|
|
|
661
|
-
window .on ("maximize", () => this .maximize ())
|
|
662
|
-
window .on ("unmaximize", () => this .unmaximize ())
|
|
663
|
-
window .on ("enter-full-screen", () => this .enterFullscreen ())
|
|
664
|
-
window .on ("leave-full-screen", () => this .leaveFullscreen ())
|
|
665
|
-
window .on ("blur", () => this .blur ())
|
|
666
|
-
window .on ("close", (event) => this .close (event))
|
|
661
|
+
window .on ("maximize", () => this .maximize ());
|
|
662
|
+
window .on ("unmaximize", () => this .unmaximize ());
|
|
663
|
+
window .on ("enter-full-screen", () => this .enterFullscreen ());
|
|
664
|
+
window .on ("leave-full-screen", () => this .leaveFullscreen ());
|
|
665
|
+
window .on ("blur", () => this .blur ());
|
|
666
|
+
window .on ("close", (event) => this .close (event));
|
|
667
667
|
|
|
668
668
|
if (this .config .maximized)
|
|
669
|
-
window .maximize ()
|
|
669
|
+
window .maximize ();
|
|
670
670
|
|
|
671
|
-
window .setFullScreen (this .config .fullscreen)
|
|
671
|
+
window .setFullScreen (this .config .fullscreen);
|
|
672
672
|
|
|
673
|
-
await window .loadFile (path .join (__dirname, "../assets/html/application.html"))
|
|
673
|
+
await window .loadFile (path .join (__dirname, "../assets/html/application.html"));
|
|
674
674
|
}
|
|
675
675
|
|
|
676
676
|
activate ()
|
|
677
677
|
{
|
|
678
678
|
if (electron .BrowserWindow .getAllWindows () .length)
|
|
679
|
-
return
|
|
679
|
+
return;
|
|
680
680
|
|
|
681
|
-
this .createWindow ()
|
|
681
|
+
this .createWindow ();
|
|
682
682
|
}
|
|
683
683
|
|
|
684
684
|
contextMenu (id, menu)
|
|
685
685
|
{
|
|
686
686
|
electron .Menu .buildFromTemplate (this .createMenuTemplate (id, menu))
|
|
687
|
-
.popup ({ window: this .mainWindow })
|
|
687
|
+
.popup ({ window: this .mainWindow });
|
|
688
688
|
}
|
|
689
689
|
|
|
690
690
|
createMenuTemplate (id, menu)
|
|
691
691
|
{
|
|
692
|
-
const template = [ ]
|
|
692
|
+
const template = [ ];
|
|
693
693
|
|
|
694
|
-
for (const menuItem of menu)
|
|
694
|
+
for (const menuItem of this .filterSeparators (menu))
|
|
695
695
|
{
|
|
696
696
|
if (menuItem .submenu)
|
|
697
|
-
menuItem .submenu = this .createMenuTemplate (id, menuItem .submenu)
|
|
697
|
+
menuItem .submenu = this .createMenuTemplate (id, menuItem .submenu);
|
|
698
698
|
else
|
|
699
|
-
menuItem .click = () => this .mainWindow .webContents .send (id, ...menuItem .args)
|
|
699
|
+
menuItem .click = () => this .mainWindow .webContents .send (id, ... menuItem .args);
|
|
700
|
+
|
|
701
|
+
template .push (menuItem);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
return template;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
filterSeparators (menu)
|
|
708
|
+
{
|
|
709
|
+
const filtered = [ ];
|
|
710
|
+
|
|
711
|
+
let separator = false;
|
|
712
|
+
|
|
713
|
+
for (const menuItem of menu .filter (menuItem => menuItem .visible ?? true))
|
|
714
|
+
{
|
|
715
|
+
if (separator && menuItem .type === "separator")
|
|
716
|
+
continue;
|
|
700
717
|
|
|
701
|
-
|
|
718
|
+
separator = menuItem .type === "separator";
|
|
719
|
+
|
|
720
|
+
filtered .push (menuItem);
|
|
702
721
|
}
|
|
703
722
|
|
|
704
|
-
|
|
723
|
+
if (filtered .at (0) ?.type === "separator")
|
|
724
|
+
filtered .shift ();
|
|
725
|
+
|
|
726
|
+
if (filtered .at (-1) ?.type === "separator")
|
|
727
|
+
filtered .pop ();
|
|
728
|
+
|
|
729
|
+
return filtered;
|
|
705
730
|
}
|
|
706
731
|
|
|
707
732
|
/**
|
|
@@ -58,9 +58,9 @@ Object .defineProperties (StaticGroup,
|
|
|
58
58
|
{
|
|
59
59
|
value: "StaticGroup",
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
componentInfo:
|
|
62
62
|
{
|
|
63
|
-
value: "Grouping",
|
|
63
|
+
value: Object .freeze ({ name: "Grouping", level: 3 }),
|
|
64
64
|
},
|
|
65
65
|
containerField:
|
|
66
66
|
{
|
|
@@ -68,7 +68,7 @@ Object .defineProperties (StaticGroup,
|
|
|
68
68
|
},
|
|
69
69
|
specificationRange:
|
|
70
70
|
{
|
|
71
|
-
value: Object .freeze (
|
|
71
|
+
value: Object .freeze ({ from: "3.0", to: "Infinity" }),
|
|
72
72
|
},
|
|
73
73
|
fieldDefinitions:
|
|
74
74
|
{
|
package/src/Editors/Library.js
CHANGED
|
@@ -125,7 +125,7 @@ module .exports = new class Library extends Dialog
|
|
|
125
125
|
{
|
|
126
126
|
const ConcreteNode = this .browser .getConcreteNode (X3D .HTMLSupport .getNodeTypeName (input))
|
|
127
127
|
|
|
128
|
-
this .createNode (ConcreteNode .typeName, ConcreteNode .
|
|
128
|
+
this .createNode (ConcreteNode .typeName, ConcreteNode .componentInfo .name)
|
|
129
129
|
}
|
|
130
130
|
catch
|
|
131
131
|
{
|
|
@@ -167,7 +167,7 @@ module .exports = new class Library extends Dialog
|
|
|
167
167
|
const nodes = [... this .browser .getConcreteNodes ()]
|
|
168
168
|
.filter (filter)
|
|
169
169
|
.sort ((a, b) => cmp (a .typeName, b .typeName))
|
|
170
|
-
.sort ((a, b) => cmp (a .
|
|
170
|
+
.sort ((a, b) => cmp (a .componentInfo .name, b .componentInfo .name))
|
|
171
171
|
|
|
172
172
|
// Create list elements.
|
|
173
173
|
|
|
@@ -175,14 +175,14 @@ module .exports = new class Library extends Dialog
|
|
|
175
175
|
|
|
176
176
|
for (const node of nodes)
|
|
177
177
|
{
|
|
178
|
-
if (node .
|
|
178
|
+
if (node .componentInfo .name !== componentName)
|
|
179
179
|
{
|
|
180
|
-
componentName = node .
|
|
180
|
+
componentName = node .componentInfo .name
|
|
181
181
|
|
|
182
182
|
$("<li></li>")
|
|
183
183
|
.addClass ("component")
|
|
184
|
-
.attr ("name", node .
|
|
185
|
-
.text (this .browser .getSupportedComponents () .get (node .
|
|
184
|
+
.attr ("name", node .componentInfo .name)
|
|
185
|
+
.text (this .browser .getSupportedComponents () .get (node .componentInfo .name) .title)
|
|
186
186
|
.appendTo (this .list)
|
|
187
187
|
}
|
|
188
188
|
|
|
@@ -190,7 +190,7 @@ module .exports = new class Library extends Dialog
|
|
|
190
190
|
.addClass ("node")
|
|
191
191
|
.text (node .typeName)
|
|
192
192
|
.appendTo (this .list)
|
|
193
|
-
.on ("dblclick", () => this .createNode (node .typeName, node .
|
|
193
|
+
.on ("dblclick", () => this .createNode (node .typeName, node .componentInfo .name))
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -229,7 +229,7 @@ module .exports = new class Library extends Dialog
|
|
|
229
229
|
const nodes = Primitives
|
|
230
230
|
.filter (filter)
|
|
231
231
|
.sort ((a, b) => cmp (a .typeName, b .typeName))
|
|
232
|
-
.sort ((a, b) => cmp (a .
|
|
232
|
+
.sort ((a, b) => cmp (a .componentInfo .name, b .componentInfo .name))
|
|
233
233
|
|
|
234
234
|
// Create list elements.
|
|
235
235
|
|
|
@@ -237,13 +237,13 @@ module .exports = new class Library extends Dialog
|
|
|
237
237
|
|
|
238
238
|
for (const node of nodes)
|
|
239
239
|
{
|
|
240
|
-
if (node .
|
|
240
|
+
if (node .componentInfo .name !== componentName)
|
|
241
241
|
{
|
|
242
|
-
componentName = node .
|
|
242
|
+
componentName = node .componentInfo .name
|
|
243
243
|
|
|
244
244
|
$("<li></li>")
|
|
245
245
|
.addClass ("component")
|
|
246
|
-
.text (node .
|
|
246
|
+
.text (node .componentInfo .name)
|
|
247
247
|
.appendTo (this .list)
|
|
248
248
|
}
|
|
249
249
|
|
|
@@ -145,9 +145,9 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
145
145
|
args: ["resetToDefaultValue", element .attr ("id"), executionContext .getId (), node .getId (), field .getId ()],
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
|
-
label: "
|
|
148
|
+
label: "Trigger Event",
|
|
149
149
|
visible: field .getAccessType () !== X3D .X3DConstants .outputOnly,
|
|
150
|
-
args: ["
|
|
150
|
+
args: ["triggerEvent", element .attr ("id"), node .getId (), field .getId ()],
|
|
151
151
|
},
|
|
152
152
|
]
|
|
153
153
|
}
|
|
@@ -458,7 +458,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
458
458
|
Editor .setFieldValue (executionContext, node, field, fieldDefinition .value)
|
|
459
459
|
}
|
|
460
460
|
|
|
461
|
-
|
|
461
|
+
triggerEvent (id, nodeId, fieldId)
|
|
462
462
|
{
|
|
463
463
|
const field = this .objects .get (fieldId)
|
|
464
464
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
module .exports = [
|
|
4
4
|
{
|
|
5
|
-
|
|
5
|
+
componentInfo: { name: "EnvironmentalEffects" },
|
|
6
6
|
typeName: "Background Gray",
|
|
7
7
|
x3dSyntax: `
|
|
8
8
|
DEF Gray Background {
|
|
@@ -11,7 +11,7 @@ DEF Gray Background {
|
|
|
11
11
|
`
|
|
12
12
|
},
|
|
13
13
|
{
|
|
14
|
-
|
|
14
|
+
componentInfo: { name: "EnvironmentalEffects" },
|
|
15
15
|
typeName: "Background Summer",
|
|
16
16
|
x3dSyntax: `
|
|
17
17
|
DEF Summer Background {
|
|
@@ -44,7 +44,7 @@ DEF Summer Background {
|
|
|
44
44
|
}`
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
|
|
47
|
+
componentInfo: { name: "EnvironmentalEffects" },
|
|
48
48
|
typeName: "Background Sunny",
|
|
49
49
|
x3dSyntax: `
|
|
50
50
|
DEF Sunny Background {
|
|
@@ -70,7 +70,7 @@ DEF Sunny Background {
|
|
|
70
70
|
`
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
|
-
|
|
73
|
+
componentInfo: { name: "EnvironmentalEffects" },
|
|
74
74
|
typeName: "Background White",
|
|
75
75
|
x3dSyntax: `
|
|
76
76
|
DEF White Background {
|
|
@@ -79,7 +79,7 @@ DEF White Background {
|
|
|
79
79
|
`
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
|
-
|
|
82
|
+
componentInfo: { name: "EnvironmentalSensor" },
|
|
83
83
|
typeName: "ProximitySensor",
|
|
84
84
|
x3dSyntax: `
|
|
85
85
|
DEF ProximitySensor Transform {
|
|
@@ -90,7 +90,7 @@ DEF ProximitySensor Transform {
|
|
|
90
90
|
`
|
|
91
91
|
},
|
|
92
92
|
{
|
|
93
|
-
|
|
93
|
+
componentInfo: { name: "EnvironmentalSensor" },
|
|
94
94
|
typeName: "TransformSensor",
|
|
95
95
|
x3dSyntax: `
|
|
96
96
|
DEF TransformSensor Transform {
|
|
@@ -101,7 +101,7 @@ DEF TransformSensor Transform {
|
|
|
101
101
|
`
|
|
102
102
|
},
|
|
103
103
|
{
|
|
104
|
-
|
|
104
|
+
componentInfo: { name: "EnvironmentalSensor" },
|
|
105
105
|
typeName: "VisibilitySensor",
|
|
106
106
|
x3dSyntax: `
|
|
107
107
|
DEF VisibilitySensor Transform {
|
|
@@ -112,7 +112,7 @@ DEF VisibilitySensor Transform {
|
|
|
112
112
|
`
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
|
-
|
|
115
|
+
componentInfo: { name: "Geometry2D" },
|
|
116
116
|
typeName: "Arc2D",
|
|
117
117
|
x3dSyntax: `
|
|
118
118
|
DEF Arc2D Transform {
|
|
@@ -128,7 +128,7 @@ DEF Arc2D Transform {
|
|
|
128
128
|
`
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
|
-
|
|
131
|
+
componentInfo: { name: "Geometry2D" },
|
|
132
132
|
typeName: "ArcClose2D",
|
|
133
133
|
x3dSyntax: `
|
|
134
134
|
DEF ArcClose2D Transform {
|
|
@@ -142,7 +142,7 @@ DEF ArcClose2D Transform {
|
|
|
142
142
|
`
|
|
143
143
|
},
|
|
144
144
|
{
|
|
145
|
-
|
|
145
|
+
componentInfo: { name: "Geometry2D" },
|
|
146
146
|
typeName: "Circle2D",
|
|
147
147
|
x3dSyntax: `
|
|
148
148
|
DEF Circle2D Transform {
|
|
@@ -158,7 +158,7 @@ DEF Circle2D Transform {
|
|
|
158
158
|
`
|
|
159
159
|
},
|
|
160
160
|
{
|
|
161
|
-
|
|
161
|
+
componentInfo: { name: "Geometry2D" },
|
|
162
162
|
typeName: "Disk2D",
|
|
163
163
|
x3dSyntax: `
|
|
164
164
|
DEF Disk2D Transform {
|
|
@@ -172,7 +172,7 @@ DEF Disk2D Transform {
|
|
|
172
172
|
`
|
|
173
173
|
},
|
|
174
174
|
{
|
|
175
|
-
|
|
175
|
+
componentInfo: { name: "Geometry2D" },
|
|
176
176
|
typeName: "Polyline2D",
|
|
177
177
|
x3dSyntax: `
|
|
178
178
|
DEF Polyline2D Transform {
|
|
@@ -196,7 +196,7 @@ DEF Polyline2D Transform {
|
|
|
196
196
|
`
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
|
-
|
|
199
|
+
componentInfo: { name: "Geometry2D" },
|
|
200
200
|
typeName: "Polypoint2D",
|
|
201
201
|
x3dSyntax: `
|
|
202
202
|
DEF Polypoint2D Transform {
|
|
@@ -220,7 +220,7 @@ DEF Polypoint2D Transform {
|
|
|
220
220
|
`
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
|
-
|
|
223
|
+
componentInfo: { name: "Geometry2D" },
|
|
224
224
|
typeName: "Rectangle2D",
|
|
225
225
|
x3dSyntax: `
|
|
226
226
|
DEF Rectangle2D Transform {
|
|
@@ -234,7 +234,7 @@ DEF Rectangle2D Transform {
|
|
|
234
234
|
`
|
|
235
235
|
},
|
|
236
236
|
{
|
|
237
|
-
|
|
237
|
+
componentInfo: { name: "Geometry2D" },
|
|
238
238
|
typeName: "TriangleSet2D",
|
|
239
239
|
x3dSyntax: `
|
|
240
240
|
DEF TriangleSet2D Transform {
|
|
@@ -257,7 +257,7 @@ DEF TriangleSet2D Transform {
|
|
|
257
257
|
`
|
|
258
258
|
},
|
|
259
259
|
{
|
|
260
|
-
|
|
260
|
+
componentInfo: { name: "Geometry3D" },
|
|
261
261
|
typeName: "Box",
|
|
262
262
|
x3dSyntax: `
|
|
263
263
|
DEF Box Transform {
|
|
@@ -271,7 +271,7 @@ DEF Box Transform {
|
|
|
271
271
|
`
|
|
272
272
|
},
|
|
273
273
|
{
|
|
274
|
-
|
|
274
|
+
componentInfo: { name: "Geometry3D" },
|
|
275
275
|
typeName: "Cone",
|
|
276
276
|
x3dSyntax: `
|
|
277
277
|
DEF Cone Transform {
|
|
@@ -285,7 +285,7 @@ DEF Cone Transform {
|
|
|
285
285
|
`
|
|
286
286
|
},
|
|
287
287
|
{
|
|
288
|
-
|
|
288
|
+
componentInfo: { name: "Geometry3D" },
|
|
289
289
|
typeName: "Cylinder",
|
|
290
290
|
x3dSyntax: `
|
|
291
291
|
DEF Cylinder Transform {
|
|
@@ -299,7 +299,7 @@ DEF Cylinder Transform {
|
|
|
299
299
|
`
|
|
300
300
|
},
|
|
301
301
|
{
|
|
302
|
-
|
|
302
|
+
componentInfo: { name: "Geometry3D" },
|
|
303
303
|
typeName: "ElevationGrid",
|
|
304
304
|
x3dSyntax: `
|
|
305
305
|
DEF ElevationGrid Transform {
|
|
@@ -316,7 +316,7 @@ DEF ElevationGrid Transform {
|
|
|
316
316
|
`
|
|
317
317
|
},
|
|
318
318
|
{
|
|
319
|
-
|
|
319
|
+
componentInfo: { name: "Geometry3D" },
|
|
320
320
|
typeName: "Extrusion",
|
|
321
321
|
x3dSyntax: `
|
|
322
322
|
DEF Extrusion Transform {
|
|
@@ -330,7 +330,7 @@ DEF Extrusion Transform {
|
|
|
330
330
|
`
|
|
331
331
|
},
|
|
332
332
|
{
|
|
333
|
-
|
|
333
|
+
componentInfo: { name: "Geometry3D" },
|
|
334
334
|
typeName: "IndexedFaceSet",
|
|
335
335
|
x3dSyntax: `
|
|
336
336
|
DEF IndexedFaceSet Transform {
|
|
@@ -344,7 +344,7 @@ DEF IndexedFaceSet Transform {
|
|
|
344
344
|
`
|
|
345
345
|
},
|
|
346
346
|
{
|
|
347
|
-
|
|
347
|
+
componentInfo: { name: "Geometry3D" },
|
|
348
348
|
typeName: "Sphere",
|
|
349
349
|
x3dSyntax: `
|
|
350
350
|
DEF Sphere Transform {
|
|
@@ -358,7 +358,7 @@ DEF Sphere Transform {
|
|
|
358
358
|
`
|
|
359
359
|
},
|
|
360
360
|
{
|
|
361
|
-
|
|
361
|
+
componentInfo: { name: "Text" },
|
|
362
362
|
typeName: "Text",
|
|
363
363
|
x3dSyntax: `
|
|
364
364
|
DEF Text Transform {
|
|
@@ -374,7 +374,7 @@ DEF Text Transform {
|
|
|
374
374
|
`
|
|
375
375
|
},
|
|
376
376
|
{
|
|
377
|
-
|
|
377
|
+
componentInfo: { name: "Rendering" },
|
|
378
378
|
typeName: "IndexedLineSet",
|
|
379
379
|
x3dSyntax: `
|
|
380
380
|
DEF IndexedLineSet Transform {
|
|
@@ -427,7 +427,7 @@ DEF IndexedLineSet Transform {
|
|
|
427
427
|
`
|
|
428
428
|
},
|
|
429
429
|
{
|
|
430
|
-
|
|
430
|
+
componentInfo: { name: "Rendering" },
|
|
431
431
|
typeName: "PointSet",
|
|
432
432
|
x3dSyntax: `
|
|
433
433
|
DEF PointSet Transform {
|
package/src/Tools.js
CHANGED
|
@@ -15,7 +15,7 @@ Object .assign (X3D .X3DNode .prototype,
|
|
|
15
15
|
},
|
|
16
16
|
addTool (action = "createOnDemand")
|
|
17
17
|
{
|
|
18
|
-
const module = path .resolve (__dirname, "Tools", this .constructor .
|
|
18
|
+
const module = path .resolve (__dirname, "Tools", this .constructor .componentInfo .name, this .constructor .typeName + "Tool.js");
|
|
19
19
|
|
|
20
20
|
if (!fs .existsSync (module))
|
|
21
21
|
return this;
|
package/src/Undo/Editor.js
CHANGED
|
@@ -69,7 +69,7 @@ module .exports = class Editor
|
|
|
69
69
|
|
|
70
70
|
Traverse .traverse (nodes, 0, node =>
|
|
71
71
|
{
|
|
72
|
-
componentNames .add (node .
|
|
72
|
+
componentNames .add (node .getComponentInfo () .name)
|
|
73
73
|
children .add (node)
|
|
74
74
|
|
|
75
75
|
for (const field of node .getFields ())
|
|
@@ -558,7 +558,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
558
558
|
if (node .getScene () !== scene)
|
|
559
559
|
return
|
|
560
560
|
|
|
561
|
-
components .add (node .
|
|
561
|
+
components .add (node .getComponentInfo () .name)
|
|
562
562
|
})
|
|
563
563
|
|
|
564
564
|
return components
|