sunrize 1.0.36 → 1.0.38
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/bin/sunrize.js +4 -2
- package/package.json +2 -2
- package/src/sunrize/Application/DataStorage.js +1 -0
- package/src/sunrize/Editors/Library.js +6 -7
- package/src/sunrize/Tools/Grouping/TransformTool.x3d +6 -5
- package/src/sunrize/Tools/Grouping/Vector.x3d +17 -10
- package/src/sunrize/Tools/Grouping/X3DBoundedObjectTool.x3d +19 -11
- package/src/sunrize/Undo/Editor.js +3 -3
package/bin/sunrize.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
"use strict"
|
|
3
|
+
|
|
2
4
|
const { execFile } = require ("child_process")
|
|
3
5
|
|
|
4
|
-
execFile ("npm", ["start"
|
|
6
|
+
execFile ("npm", ["start", ... process .argv .slice (2)], (error, stdout, stderr) =>
|
|
5
7
|
{
|
|
6
8
|
if (error)
|
|
7
|
-
process .stderr .write (error .message)
|
|
9
|
+
return process .stderr .write (error .message)
|
|
8
10
|
|
|
9
11
|
if (stdout)
|
|
10
12
|
process .stdout .write (stdout)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.38",
|
|
5
5
|
"description": "A Multi Platform X3D Editor",
|
|
6
6
|
"homepage": "https://create3000.github.io/sunrize/",
|
|
7
7
|
"author": "Holger Seelig",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"qtip2": "^3.0.3",
|
|
60
60
|
"spectrum-colorpicker2": "^2.0.10",
|
|
61
61
|
"string-similarity": "^4.0.4",
|
|
62
|
-
"x_ite": "^8.7.
|
|
62
|
+
"x_ite": "^8.7.8"
|
|
63
63
|
},
|
|
64
64
|
"main": "src/main.js",
|
|
65
65
|
"bin": {
|
|
@@ -118,10 +118,9 @@ module .exports = new class Library extends Dialog
|
|
|
118
118
|
return
|
|
119
119
|
|
|
120
120
|
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
Type = SupportedNodes .getType (HTMLSupport .getNodeTypeName (input))
|
|
121
|
+
HTMLSupport = X3D .require ("x_ite/Parser/HTMLSupport"),
|
|
122
|
+
input = this .input .val () .toUpperCase () .trim (),
|
|
123
|
+
Type = this .browser .getSupportedNode (HTMLSupport .getNodeTypeName (input))
|
|
125
124
|
|
|
126
125
|
if (Type)
|
|
127
126
|
this .createNode (Type .prototype .getTypeName (), Type .prototype .getComponentName ())
|
|
@@ -155,15 +154,15 @@ module .exports = new class Library extends Dialog
|
|
|
155
154
|
const input = this .input .val () .toLowerCase () .trim ()
|
|
156
155
|
|
|
157
156
|
if (input)
|
|
158
|
-
var filter =
|
|
157
|
+
var filter = Type => StringSimilarity .compareTwoStrings (Type .prototype .getTypeName () .toLowerCase (), input) > 0.4
|
|
159
158
|
else
|
|
160
159
|
var filter = () => true
|
|
161
160
|
|
|
162
161
|
// Get supported nodes.
|
|
163
162
|
|
|
164
|
-
const nodes = this .browser .getSupportedNodes ()
|
|
163
|
+
const nodes = [... this .browser .getSupportedNodes ()]
|
|
165
164
|
.filter (filter)
|
|
166
|
-
.map (
|
|
165
|
+
.map (Type => ({ component: Type .prototype .getComponentName (), typeName: Type .prototype .getTypeName () }))
|
|
167
166
|
.sort ((a, b) => cmp (a .typeName, b .typeName))
|
|
168
167
|
.sort ((a, b) => cmp (a .component, b .component))
|
|
169
168
|
|
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
<meta name='created' content='Sat, 11 Mar 2023 10:55:09 GMT'/>
|
|
6
6
|
<meta name='comment' content='Rise and Shine'/>
|
|
7
7
|
<meta name='creator' content='Holger Seelig'/>
|
|
8
|
-
<meta name='generator' content='Sunrize X3D Editor V1.0.
|
|
8
|
+
<meta name='generator' content='Sunrize X3D Editor V1.0.36, https://create3000.github.io/sunrize/'/>
|
|
9
9
|
<meta name='identifier' content='file:///Users/holger/Desktop/X_ITE/sunrize/src/sunrize/Tools/Grouping/TransformTool.x3d'/>
|
|
10
|
-
<meta name='modified' content='
|
|
10
|
+
<meta name='modified' content='Mon, 29 May 2023 16:22:43 GMT'/>
|
|
11
11
|
</head>
|
|
12
12
|
<Scene>
|
|
13
13
|
<ProtoDeclare name='Tool'>
|
|
14
14
|
<ProtoInterface>
|
|
15
|
-
<field accessType='inputOnly' type='SFColor' name='bboxColor'
|
|
15
|
+
<field accessType='inputOnly' type='SFColor' name='bboxColor'/>
|
|
16
16
|
</ProtoInterface>
|
|
17
17
|
<ProtoBody>
|
|
18
18
|
<Transform DEF='IndexedLineSet'>
|
|
19
|
-
<Shape
|
|
19
|
+
<Shape
|
|
20
|
+
castShadow='false'>
|
|
20
21
|
<Appearance>
|
|
21
22
|
<UnlitMaterial>
|
|
22
23
|
<IS>
|
|
@@ -34,4 +35,4 @@
|
|
|
34
35
|
</ProtoBody>
|
|
35
36
|
</ProtoDeclare>
|
|
36
37
|
</Scene>
|
|
37
|
-
</X3D>
|
|
38
|
+
</X3D>
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
<meta name='comment' content='Rise and Shine'/>
|
|
8
8
|
<meta name='created' content='Sun, 03 Aug 2014 14:43:17 GMT'/>
|
|
9
9
|
<meta name='creator' content='Holger Seelig'/>
|
|
10
|
-
<meta name='generator' content='Sunrize X3D Editor V1.0.
|
|
10
|
+
<meta name='generator' content='Sunrize X3D Editor V1.0.36, https://create3000.github.io/sunrize/'/>
|
|
11
11
|
<meta name='identifier' content='file:///Users/holger/Desktop/X_ITE/sunrize/src/sunrize/Tools/Grouping/Vector.x3d'/>
|
|
12
|
-
<meta name='modified' content='
|
|
12
|
+
<meta name='modified' content='Mon, 29 May 2023 16:22:15 GMT'/>
|
|
13
13
|
</head>
|
|
14
14
|
<Scene>
|
|
15
15
|
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
<Transform DEF='Cone'
|
|
21
21
|
translation='0 60 0'
|
|
22
22
|
scale='6 9 6'>
|
|
23
|
-
<Shape
|
|
23
|
+
<Shape
|
|
24
|
+
castShadow='false'>
|
|
24
25
|
<Appearance DEF='_1'>
|
|
25
26
|
<Material
|
|
26
27
|
diffuseColor='0.8 0.8 0.16'/>
|
|
@@ -32,14 +33,16 @@
|
|
|
32
33
|
<Transform DEF='Cylinder'
|
|
33
34
|
translation='0 30 0'
|
|
34
35
|
scale='2 30 2'>
|
|
35
|
-
<Shape
|
|
36
|
+
<Shape
|
|
37
|
+
castShadow='false'>
|
|
36
38
|
<Appearance USE='_1'/>
|
|
37
39
|
<Cylinder/>
|
|
38
40
|
</Shape>
|
|
39
41
|
</Transform>
|
|
40
42
|
<Transform DEF='Sphere'
|
|
41
43
|
scale='6 6 6'>
|
|
42
|
-
<Shape
|
|
44
|
+
<Shape
|
|
45
|
+
castShadow='false'>
|
|
43
46
|
<Appearance USE='_1'/>
|
|
44
47
|
<Sphere/>
|
|
45
48
|
</Shape>
|
|
@@ -48,7 +51,8 @@
|
|
|
48
51
|
whichChoice='1'>
|
|
49
52
|
<Transform DEF='Grid'
|
|
50
53
|
scale='15 1 15'>
|
|
51
|
-
<Shape
|
|
54
|
+
<Shape
|
|
55
|
+
castShadow='false'>
|
|
52
56
|
<Appearance>
|
|
53
57
|
<ProtoInstance name='ToolShader' containerField='shaders'/>
|
|
54
58
|
</Appearance>
|
|
@@ -65,7 +69,8 @@
|
|
|
65
69
|
</Transform>
|
|
66
70
|
<Transform DEF='Circles'
|
|
67
71
|
rotation='1 0 0 4.71239'>
|
|
68
|
-
<Shape
|
|
72
|
+
<Shape
|
|
73
|
+
castShadow='false'>
|
|
69
74
|
<Appearance DEF='_3'>
|
|
70
75
|
<Material
|
|
71
76
|
emissiveColor='1 0.2 0.2'/>
|
|
@@ -74,12 +79,14 @@
|
|
|
74
79
|
<Circle2D
|
|
75
80
|
radius='18'/>
|
|
76
81
|
</Shape>
|
|
77
|
-
<Shape
|
|
82
|
+
<Shape
|
|
83
|
+
castShadow='false'>
|
|
78
84
|
<Appearance USE='_3'/>
|
|
79
85
|
<Circle2D
|
|
80
86
|
radius='12'/>
|
|
81
87
|
</Shape>
|
|
82
|
-
<Shape
|
|
88
|
+
<Shape
|
|
89
|
+
castShadow='false'>
|
|
83
90
|
<IndexedLineSet
|
|
84
91
|
colorPerVertex='false'
|
|
85
92
|
colorIndex='0, 1, 2'
|
|
@@ -95,4 +102,4 @@
|
|
|
95
102
|
</Transform>
|
|
96
103
|
</ScreenGroup>
|
|
97
104
|
</Scene>
|
|
98
|
-
</X3D>
|
|
105
|
+
</X3D>
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
<meta name='comment' content='Rise and Shine'/>
|
|
8
8
|
<meta name='created' content='Fri, 29 Aug 2014 13:13:27 GMT'/>
|
|
9
9
|
<meta name='creator' content='Holger Seelig'/>
|
|
10
|
-
<meta name='generator' content='Sunrize X3D Editor V1.0.
|
|
10
|
+
<meta name='generator' content='Sunrize X3D Editor V1.0.36, https://create3000.github.io/sunrize/'/>
|
|
11
11
|
<meta name='identifier' content='file:///Users/holger/Desktop/X_ITE/sunrize/src/sunrize/Tools/Grouping/X3DBoundedObjectTool.x3d'/>
|
|
12
|
-
<meta name='modified' content='
|
|
12
|
+
<meta name='modified' content='Mon, 29 May 2023 16:20:46 GMT'/>
|
|
13
13
|
</head>
|
|
14
14
|
<Scene>
|
|
15
15
|
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
@@ -34,7 +34,8 @@
|
|
|
34
34
|
<IS>
|
|
35
35
|
<connect nodeField='translation' protoField='bboxCenter'/>
|
|
36
36
|
</IS>
|
|
37
|
-
<Shape DEF='Box'
|
|
37
|
+
<Shape DEF='Box'
|
|
38
|
+
castShadow='false'>
|
|
38
39
|
<Appearance>
|
|
39
40
|
<LineProperties
|
|
40
41
|
linewidthScaleFactor='2'>
|
|
@@ -54,7 +55,8 @@
|
|
|
54
55
|
point='-0.5 0.5 0.5, -0.5 -0.5 0.5, 0.5 -0.5 0.5, 0.5 0.5 0.5, -0.5 0.5 -0.5, -0.5 -0.5 -0.5, 0.5 -0.5 -0.5, 0.5 0.5 -0.5'/>
|
|
55
56
|
</IndexedLineSet>
|
|
56
57
|
</Shape>
|
|
57
|
-
<Shape DEF='Axes_1'
|
|
58
|
+
<Shape DEF='Axes_1'
|
|
59
|
+
castShadow='false'>
|
|
58
60
|
<IndexedLineSet
|
|
59
61
|
colorPerVertex='false'
|
|
60
62
|
coordIndex='0, 1, -1, 0, 2, -1, 0, 3, -1'>
|
|
@@ -75,7 +77,8 @@
|
|
|
75
77
|
<Transform
|
|
76
78
|
translation='6 0 0'
|
|
77
79
|
rotation='0 0 -1 1.5708'>
|
|
78
|
-
<Shape
|
|
80
|
+
<Shape
|
|
81
|
+
castShadow='false'>
|
|
79
82
|
<Appearance DEF='Red'>
|
|
80
83
|
<Material
|
|
81
84
|
diffuseColor='1 0 0'/>
|
|
@@ -93,7 +96,8 @@
|
|
|
93
96
|
<ScreenGroup>
|
|
94
97
|
<Transform
|
|
95
98
|
translation='0 6 0'>
|
|
96
|
-
<Shape
|
|
99
|
+
<Shape
|
|
100
|
+
castShadow='false'>
|
|
97
101
|
<Appearance DEF='Green'>
|
|
98
102
|
<Material
|
|
99
103
|
diffuseColor='0 1 0'/>
|
|
@@ -110,7 +114,8 @@
|
|
|
110
114
|
<Transform
|
|
111
115
|
translation='0 0 6'
|
|
112
116
|
rotation='1 0 0 1.5708'>
|
|
113
|
-
<Shape
|
|
117
|
+
<Shape
|
|
118
|
+
castShadow='false'>
|
|
114
119
|
<Appearance DEF='Blue'>
|
|
115
120
|
<Material
|
|
116
121
|
diffuseColor='0 0 1'/>
|
|
@@ -126,7 +131,8 @@
|
|
|
126
131
|
<IS>
|
|
127
132
|
<connect nodeField='visible' protoField='centerDisplay'/>
|
|
128
133
|
</IS>
|
|
129
|
-
<Shape DEF='CenterLine'
|
|
134
|
+
<Shape DEF='CenterLine'
|
|
135
|
+
castShadow='false'>
|
|
130
136
|
<Appearance>
|
|
131
137
|
<LineProperties
|
|
132
138
|
linetype='3'
|
|
@@ -145,7 +151,8 @@
|
|
|
145
151
|
<connect nodeField='translation' protoField='center'/>
|
|
146
152
|
</IS>
|
|
147
153
|
<ScreenGroup DEF='CenterPoint'>
|
|
148
|
-
<Shape
|
|
154
|
+
<Shape
|
|
155
|
+
castShadow='false'>
|
|
149
156
|
<Appearance>
|
|
150
157
|
<Material
|
|
151
158
|
diffuseColor='1 1 0'/>
|
|
@@ -167,7 +174,8 @@
|
|
|
167
174
|
<connect nodeField='translation' protoField='rectangleCenter'/>
|
|
168
175
|
<connect nodeField='visible' protoField='rectangleDisplay'/>
|
|
169
176
|
</IS>
|
|
170
|
-
<Shape DEF='Box_1'
|
|
177
|
+
<Shape DEF='Box_1'
|
|
178
|
+
castShadow='false'>
|
|
171
179
|
<Appearance>
|
|
172
180
|
<LineProperties
|
|
173
181
|
linewidthScaleFactor='2'/>
|
|
@@ -327,4 +335,4 @@ function eventsProcessed ()
|
|
|
327
335
|
</ProtoBody>
|
|
328
336
|
</ProtoDeclare>
|
|
329
337
|
</Scene>
|
|
330
|
-
</X3D>
|
|
338
|
+
</X3D>
|
|
@@ -89,17 +89,17 @@ module .exports = class Editor
|
|
|
89
89
|
// Add protos.
|
|
90
90
|
|
|
91
91
|
for (const externproto of externprotos)
|
|
92
|
-
scene .
|
|
92
|
+
scene .externprotos .add (externproto .getName (), externproto)
|
|
93
93
|
|
|
94
94
|
for (const proto of protos)
|
|
95
|
-
scene .
|
|
95
|
+
scene .protos .add (proto .getName (), proto)
|
|
96
96
|
|
|
97
97
|
// Set nodes.
|
|
98
98
|
|
|
99
99
|
scene .rootNodes = nodes
|
|
100
100
|
|
|
101
101
|
for (const route of routes)
|
|
102
|
-
scene .
|
|
102
|
+
scene .routes .add (X3D .X3DRoute .getId (route .getSourceField (), route .getDestinationField ()), route)
|
|
103
103
|
|
|
104
104
|
// Return VRML string.
|
|
105
105
|
|