sunrize 2.0.17 → 2.1.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"description": "Sunrize — A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"@vscode/codicons": "^0.0.45",
|
|
94
94
|
"capitalize": "^2.0.4",
|
|
95
95
|
"console": "^0.7.2",
|
|
96
|
-
"electron": "^42.
|
|
96
|
+
"electron": "^42.1.0",
|
|
97
97
|
"electron-prompt": "^1.7.0",
|
|
98
98
|
"electron-squirrel-startup": "^1.0.1",
|
|
99
99
|
"electron-tabs": "^1.0.4",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"jquery-ui-dist": "^1.13.3",
|
|
103
103
|
"jstree": "^3.3.17",
|
|
104
104
|
"material-icons": "^1.13.14",
|
|
105
|
-
"material-symbols": "^0.44.
|
|
105
|
+
"material-symbols": "^0.44.8",
|
|
106
106
|
"md5": "^2.3.0",
|
|
107
107
|
"mime-types": "^3.0.2",
|
|
108
108
|
"monaco-editor": "^0.55.1",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"string-similarity": "^4.0.4",
|
|
113
113
|
"tweakpane": "^4.0.5",
|
|
114
114
|
"update-electron-app": "^3.2.0",
|
|
115
|
-
"x_ite": "^15.0.
|
|
115
|
+
"x_ite": "^15.0.2",
|
|
116
116
|
"x3d-traverse": "^1.0.22"
|
|
117
117
|
}
|
|
118
118
|
}
|
|
@@ -688,6 +688,10 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
|
|
|
688
688
|
label: "LayoutLayer",
|
|
689
689
|
args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layout", "LayoutLayer", "children"],
|
|
690
690
|
},
|
|
691
|
+
{
|
|
692
|
+
label: "LayoutGroup",
|
|
693
|
+
args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layout", "LayoutGroup", "children"],
|
|
694
|
+
},
|
|
691
695
|
{
|
|
692
696
|
label: "ScreenGroup",
|
|
693
697
|
args: ["addParentGroup", element .attr ("id"), executionContext .getId (), node .getId (), "Layout", "ScreenGroup", "children"],
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.
|
|
3
|
-
<X3D profile='Interchange' version='4.
|
|
2
|
+
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.1//EN" "https://www.web3d.org/specifications/x3d-4.1.dtd">
|
|
3
|
+
<X3D profile='Interchange' version='4.1' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.1.xsd'>
|
|
4
4
|
<head>
|
|
5
|
+
<component name='Core' level='2'/>
|
|
5
6
|
<component name='Layout' level='2'/>
|
|
7
|
+
<component name='Navigation' level='2'/>
|
|
8
|
+
<component name='Networking' level='2'/>
|
|
6
9
|
<component name='Scripting' level='1'/>
|
|
10
|
+
<component name='Shaders' level='1'/>
|
|
7
11
|
<component name='X_ITE' level='1'/>
|
|
8
12
|
<unit category='angle' name='degree' conversionFactor='0.017453292519943295'/>
|
|
9
13
|
<meta name='comment' content='Rise and Shine'/>
|
|
10
14
|
<meta name='created' content='Fri, 29 Aug 2014 13:13:27 GMT'/>
|
|
11
15
|
<meta name='creator' content='Holger Seelig'/>
|
|
12
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
13
|
-
<meta name='modified' content='
|
|
16
|
+
<meta name='generator' content='Sunrize X3D Editor V2.1.0, https://create3000.github.io/sunrize/'/>
|
|
17
|
+
<meta name='modified' content='Mon, 11 May 2026 14:22:17 GMT'/>
|
|
14
18
|
</head>
|
|
15
19
|
<Scene>
|
|
16
20
|
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
@@ -22,8 +26,8 @@
|
|
|
22
26
|
<field accessType='inputOutput' type='SFVec3f' name='center'/>
|
|
23
27
|
<field accessType='inputOutput' type='SFBool' name='centerDisplay'/>
|
|
24
28
|
<field accessType='inputOutput' type='SFVec3f' name='axisOfRotation'/>
|
|
25
|
-
<field accessType='inputOutput' type='SFBool' name='
|
|
26
|
-
<field accessType='inputOutput' type='
|
|
29
|
+
<field accessType='inputOutput' type='SFBool' name='layoutDisplay'/>
|
|
30
|
+
<field accessType='inputOutput' type='SFVec4f' name='layoutRectangle' value='0 0 0 0'/>
|
|
27
31
|
<field accessType='inputOutput' type='SFBool' name='bboxEvents' value='true'/>
|
|
28
32
|
<field accessType='inputOutput' type='SFBool' name='bboxDisplay'/>
|
|
29
33
|
<field accessType='inputOutput' type='SFInt32' name='bboxStyle' value='1'/>
|
|
@@ -245,16 +249,15 @@
|
|
|
245
249
|
</Group>
|
|
246
250
|
<Transform DEF='Rectangle'>
|
|
247
251
|
<IS>
|
|
248
|
-
<connect nodeField='visible' protoField='
|
|
252
|
+
<connect nodeField='visible' protoField='layoutDisplay'/>
|
|
249
253
|
</IS>
|
|
250
254
|
<Shape DEF='Box_1'
|
|
251
255
|
castShadow='false'>
|
|
252
256
|
<Appearance>
|
|
253
257
|
<LineProperties
|
|
254
258
|
linewidthScaleFactor='2'/>
|
|
255
|
-
<
|
|
259
|
+
<UnlitMaterial
|
|
256
260
|
emissiveColor='0 1 0'/>
|
|
257
|
-
<ProtoInstance name='ToolShader' USE='_11' containerField='shaders'/>
|
|
258
261
|
<DepthMode USE='_12'/>
|
|
259
262
|
</Appearance>
|
|
260
263
|
<IndexedLineSet
|
|
@@ -267,8 +270,8 @@
|
|
|
267
270
|
</Collision>
|
|
268
271
|
<Script DEF='BBoxScript'
|
|
269
272
|
directOutput='true'>
|
|
270
|
-
<field accessType='inputOutput' type='SFBool' name='
|
|
271
|
-
<field accessType='inputOutput' type='
|
|
273
|
+
<field accessType='inputOutput' type='SFBool' name='layoutDisplay'/>
|
|
274
|
+
<field accessType='inputOutput' type='SFVec4f' name='layoutRectangle'/>
|
|
272
275
|
<field accessType='inputOutput' type='SFVec3f' name='bboxSize'/>
|
|
273
276
|
<field accessType='initializeOnly' type='SFNode' name='rectangle'>
|
|
274
277
|
<Coordinate USE='Rectangle_1'/>
|
|
@@ -280,8 +283,8 @@
|
|
|
280
283
|
<Coordinate USE='AxesCoord'/>
|
|
281
284
|
</field>
|
|
282
285
|
<IS>
|
|
283
|
-
<connect nodeField='
|
|
284
|
-
<connect nodeField='
|
|
286
|
+
<connect nodeField='layoutDisplay' protoField='layoutDisplay'/>
|
|
287
|
+
<connect nodeField='layoutRectangle' protoField='layoutRectangle'/>
|
|
285
288
|
<connect nodeField='bboxSize' protoField='bboxSize'/>
|
|
286
289
|
</IS>
|
|
287
290
|
<![CDATA[ecmascript:
|
|
@@ -293,39 +296,39 @@ function initialize ()
|
|
|
293
296
|
|
|
294
297
|
function eventsProcessed ()
|
|
295
298
|
{
|
|
296
|
-
const
|
|
299
|
+
const { x, y, z } = bboxSize .divide (2);
|
|
297
300
|
|
|
298
301
|
// Axes
|
|
299
302
|
|
|
300
|
-
axes .point = new MFVec3f (new SFVec3f (-
|
|
301
|
-
new SFVec3f (
|
|
302
|
-
new SFVec3f (0, -
|
|
303
|
-
new SFVec3f (0,
|
|
304
|
-
new SFVec3f (0,
|
|
305
|
-
new SFVec3f (0,
|
|
303
|
+
axes .point = new MFVec3f (new SFVec3f (-x, 0, 0),
|
|
304
|
+
new SFVec3f ( x, 0, 0),
|
|
305
|
+
new SFVec3f ( 0, -y, 0),
|
|
306
|
+
new SFVec3f ( 0, y, 0),
|
|
307
|
+
new SFVec3f ( 0, 0, -z),
|
|
308
|
+
new SFVec3f ( 0, 0, z));
|
|
306
309
|
|
|
307
310
|
|
|
308
311
|
// BBox
|
|
309
312
|
|
|
310
|
-
bbox .point = new MFVec3f (new SFVec3f (-
|
|
311
|
-
new SFVec3f (-
|
|
312
|
-
new SFVec3f (
|
|
313
|
-
new SFVec3f (
|
|
314
|
-
new SFVec3f (-
|
|
315
|
-
new SFVec3f (-
|
|
316
|
-
new SFVec3f (
|
|
317
|
-
new SFVec3f (
|
|
313
|
+
bbox .point = new MFVec3f (new SFVec3f (-x, y, z),
|
|
314
|
+
new SFVec3f (-x, -y, z),
|
|
315
|
+
new SFVec3f ( x, -y, z),
|
|
316
|
+
new SFVec3f ( x, y, z),
|
|
317
|
+
new SFVec3f (-x, y, -z),
|
|
318
|
+
new SFVec3f (-x, -y, -z),
|
|
319
|
+
new SFVec3f ( x, -y, -z),
|
|
320
|
+
new SFVec3f ( x, y, -z));
|
|
318
321
|
|
|
319
|
-
if (
|
|
322
|
+
if (layoutDisplay)
|
|
320
323
|
{
|
|
321
|
-
const
|
|
324
|
+
const [x, y, w, h] = layoutRectangle;
|
|
322
325
|
|
|
323
326
|
// BBox
|
|
324
327
|
|
|
325
|
-
rectangle .point = new MFVec3f (new SFVec3f (-
|
|
326
|
-
new SFVec3f (-
|
|
327
|
-
new SFVec3f (
|
|
328
|
-
new SFVec3f (
|
|
328
|
+
rectangle .point = new MFVec3f (new SFVec3f (x - w / 2, y + h / 2, 0),
|
|
329
|
+
new SFVec3f (x - w / 2, y - h / 2, 0),
|
|
330
|
+
new SFVec3f (x + w / 2, y - h / 2, 0),
|
|
331
|
+
new SFVec3f (x + w / 2, y + h / 2, 0));
|
|
329
332
|
}
|
|
330
333
|
}
|
|
331
334
|
]]>
|
|
@@ -365,14 +368,14 @@ function eventsProcessed ()
|
|
|
365
368
|
{
|
|
366
369
|
// Position the arrows.
|
|
367
370
|
|
|
368
|
-
const
|
|
371
|
+
const { x, y, z } = bboxSize .divide (2);
|
|
369
372
|
|
|
370
|
-
xBack .translation = new SFVec3f (-
|
|
371
|
-
xFront .translation = new SFVec3f (
|
|
372
|
-
yBack .translation = new SFVec3f (0, -
|
|
373
|
-
yFront .translation = new SFVec3f (0,
|
|
374
|
-
zBack .translation = new SFVec3f (0, 0, -
|
|
375
|
-
zFront .translation = new SFVec3f (0, 0,
|
|
373
|
+
xBack .translation = new SFVec3f (-x, 0, 0);
|
|
374
|
+
xFront .translation = new SFVec3f ( x, 0, 0);
|
|
375
|
+
yBack .translation = new SFVec3f (0, -y, 0);
|
|
376
|
+
yFront .translation = new SFVec3f (0, y, 0);
|
|
377
|
+
zBack .translation = new SFVec3f (0, 0, -z);
|
|
378
|
+
zFront .translation = new SFVec3f (0, 0, z);
|
|
376
379
|
}
|
|
377
380
|
]]>
|
|
378
381
|
</Script>
|
|
@@ -425,7 +428,7 @@ function initialize ()
|
|
|
425
428
|
|
|
426
429
|
function eventsProcessed ()
|
|
427
430
|
{
|
|
428
|
-
if (vector .
|
|
431
|
+
if (vector .equals (SFVec3f .ZERO))
|
|
429
432
|
{
|
|
430
433
|
inline .visible = false;
|
|
431
434
|
}
|
|
@@ -847,29 +847,29 @@ function initialize ()
|
|
|
847
847
|
|
|
848
848
|
function eventsProcessed ()
|
|
849
849
|
{
|
|
850
|
-
const
|
|
850
|
+
const { x, y, z } = bboxSize .divide (2);
|
|
851
851
|
|
|
852
852
|
// Axes
|
|
853
853
|
|
|
854
854
|
axes .point = new MFVec3f (new SFVec3f (),
|
|
855
|
-
new SFVec3f (
|
|
856
|
-
new SFVec3f (-
|
|
857
|
-
new SFVec3f (0,
|
|
858
|
-
new SFVec3f (0, -
|
|
859
|
-
new SFVec3f (0,
|
|
860
|
-
new SFVec3f (0,
|
|
855
|
+
new SFVec3f ( x, 0, 0),
|
|
856
|
+
new SFVec3f (-x, 0, 0),
|
|
857
|
+
new SFVec3f ( 0, y, 0),
|
|
858
|
+
new SFVec3f ( 0, -y, 0),
|
|
859
|
+
new SFVec3f ( 0, 0, z),
|
|
860
|
+
new SFVec3f ( 0, 0, -z));
|
|
861
861
|
|
|
862
862
|
|
|
863
863
|
// BBox
|
|
864
864
|
|
|
865
|
-
bbox .point = new MFVec3f (new SFVec3f (-
|
|
866
|
-
new SFVec3f (-
|
|
867
|
-
new SFVec3f (
|
|
868
|
-
new SFVec3f (
|
|
869
|
-
new SFVec3f (-
|
|
870
|
-
new SFVec3f (-
|
|
871
|
-
new SFVec3f (
|
|
872
|
-
new SFVec3f (
|
|
865
|
+
bbox .point = new MFVec3f (new SFVec3f (-x, y, z),
|
|
866
|
+
new SFVec3f (-x, -y, z),
|
|
867
|
+
new SFVec3f ( x, -y, z),
|
|
868
|
+
new SFVec3f ( x, y, z),
|
|
869
|
+
new SFVec3f (-x, y, -z),
|
|
870
|
+
new SFVec3f (-x, -y, -z),
|
|
871
|
+
new SFVec3f ( x, -y, -z),
|
|
872
|
+
new SFVec3f ( x, y, -z));
|
|
873
873
|
}
|
|
874
874
|
]]>
|
|
875
875
|
</Script>
|
|
@@ -959,27 +959,27 @@ function set_bboxSize ()
|
|
|
959
959
|
{
|
|
960
960
|
// Position the axis handles.
|
|
961
961
|
|
|
962
|
-
const
|
|
962
|
+
const { x, y, z } = bboxSize .divide (2);
|
|
963
963
|
|
|
964
|
-
axisHandles [0] .translation = new SFVec3f (
|
|
965
|
-
axisHandles [1] .translation = new SFVec3f (0,
|
|
966
|
-
axisHandles [2] .translation = new SFVec3f (0, 0,
|
|
964
|
+
axisHandles [0] .translation = new SFVec3f (x, 0, 0);
|
|
965
|
+
axisHandles [1] .translation = new SFVec3f (0, y, 0);
|
|
966
|
+
axisHandles [2] .translation = new SFVec3f (0, 0, z);
|
|
967
967
|
|
|
968
|
-
axisHandles [3] .translation = new SFVec3f (-
|
|
969
|
-
axisHandles [4] .translation = new SFVec3f (0, -
|
|
970
|
-
axisHandles [5] .translation = new SFVec3f (0, 0, -
|
|
968
|
+
axisHandles [3] .translation = new SFVec3f (-x, 0, 0);
|
|
969
|
+
axisHandles [4] .translation = new SFVec3f (0, -y, 0);
|
|
970
|
+
axisHandles [5] .translation = new SFVec3f (0, 0, -z);
|
|
971
971
|
|
|
972
972
|
// Position uniform scale handles and set axis rotation of corresponding sensor.
|
|
973
973
|
|
|
974
|
-
scaleHandles [0] .translation = new SFVec3f (
|
|
975
|
-
scaleHandles [1] .translation = new SFVec3f (-
|
|
976
|
-
scaleHandles [2] .translation = new SFVec3f (-
|
|
977
|
-
scaleHandles [3] .translation = new SFVec3f (
|
|
974
|
+
scaleHandles [0] .translation = new SFVec3f ( x, y, z);
|
|
975
|
+
scaleHandles [1] .translation = new SFVec3f (-x, y, z);
|
|
976
|
+
scaleHandles [2] .translation = new SFVec3f (-x, -y, z);
|
|
977
|
+
scaleHandles [3] .translation = new SFVec3f ( x, -y, z);
|
|
978
978
|
|
|
979
|
-
scaleHandles [4] .translation = new SFVec3f (
|
|
980
|
-
scaleHandles [5] .translation = new SFVec3f (-
|
|
981
|
-
scaleHandles [6] .translation = new SFVec3f (-
|
|
982
|
-
scaleHandles [7] .translation = new SFVec3f (
|
|
979
|
+
scaleHandles [4] .translation = new SFVec3f ( x, y, -z);
|
|
980
|
+
scaleHandles [5] .translation = new SFVec3f (-x, y, -z);
|
|
981
|
+
scaleHandles [6] .translation = new SFVec3f (-x, -y, -z);
|
|
982
|
+
scaleHandles [7] .translation = new SFVec3f ( x, -y, -z);
|
|
983
983
|
|
|
984
984
|
for (let i = 0; i < 8; ++ i)
|
|
985
985
|
scaleSensors [i] .axisRotation = new SFRotation (xAxis, scaleHandles [i] .translation);
|
|
@@ -2,11 +2,49 @@
|
|
|
2
2
|
|
|
3
3
|
const
|
|
4
4
|
X3DBoundedObjectTool = require ("../Grouping/X3DBoundedObjectTool"),
|
|
5
|
-
ToolColors = require ("../Core/ToolColors")
|
|
5
|
+
ToolColors = require ("../Core/ToolColors"),
|
|
6
|
+
X3D = require ("../../X3D");
|
|
6
7
|
|
|
7
8
|
class LayoutGroupTool extends X3DBoundedObjectTool
|
|
8
9
|
{
|
|
9
10
|
toolBBoxColor = ToolColors .DARK_GREEN;
|
|
11
|
+
|
|
12
|
+
#scale = new X3D .Vector3 ();
|
|
13
|
+
#rectangleScale = new X3D .Vector4 ();
|
|
14
|
+
#rectangle = new X3D .Vector4 ();
|
|
15
|
+
|
|
16
|
+
traverse (type, renderObject)
|
|
17
|
+
{
|
|
18
|
+
if (this .tool)
|
|
19
|
+
{
|
|
20
|
+
if (this .layoutNode)
|
|
21
|
+
{
|
|
22
|
+
if (!this .tool .layoutDisplay)
|
|
23
|
+
this .tool .layoutDisplay = true;
|
|
24
|
+
|
|
25
|
+
renderObject .modelViewMatrix .get () .get (null, null, this .#scale);
|
|
26
|
+
this .#rectangleScale .set (this .#scale .x, this .#scale .y, this .#scale .x, this .#scale .y);
|
|
27
|
+
|
|
28
|
+
this .layoutNode .push (type, renderObject);
|
|
29
|
+
|
|
30
|
+
const rectangle = this .#rectangle
|
|
31
|
+
.assign (renderObject .getLayoutRectangles () .at (-1))
|
|
32
|
+
.divVec (this .#rectangleScale);
|
|
33
|
+
|
|
34
|
+
if (!this .tool .layoutRectangle .getValue () .equals (rectangle))
|
|
35
|
+
this .tool .layoutRectangle = rectangle;
|
|
36
|
+
|
|
37
|
+
this .layoutNode .pop (type, renderObject);
|
|
38
|
+
}
|
|
39
|
+
else
|
|
40
|
+
{
|
|
41
|
+
if (this .tool .layoutDisplay)
|
|
42
|
+
this .tool .layoutDisplay = false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
super .traverse (type, renderObject);
|
|
47
|
+
}
|
|
10
48
|
}
|
|
11
49
|
|
|
12
50
|
module .exports = LayoutGroupTool;
|