sunrize 2.1.5 → 2.1.7
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 +8 -6
- package/src/Application/Application.js +2 -2
- package/src/Application/Document.js +8 -2
- package/src/Editors/BrowserFrame.js +50 -5
- package/src/Editors/OutlineView.js +3 -3
- package/src/Tools/EnvironmentalSensor/X3DEnvironmentalSensorNodeTool.x3d +9 -8
- package/src/Tools/Grids/AxonometricGrid.x3d +3 -1
- package/src/Tools/Grids/X3DGridNodeTool.js +1 -1
- package/src/Tools/Grouping/X3DBoundedObjectTool.x3d +4 -4
- package/src/Tools/Grouping/X3DTransformNodeTool.x3d +11 -8
- package/src/Tools/Lighting/X3DLightNodeTool.x3d +2 -1
- package/src/Tools/NURBS/X3DParametricGeometryNodeTool.x3d +4 -2
- package/src/Tools/Navigation/X3DViewpointNodeTool.x3d +2 -1
- package/src/Tools/Rendering/X3DGeometryNodeTool.x3d +4 -2
- package/src/Tools/SnapTool/SnapTarget.js +2 -2
- package/src/Tools/SnapTool/SnapTool.x3d +8 -4
- package/src/Tools/Sound/CylinderMan.x3d +2 -1
- package/src/Tools/Sound/ListenerPointSourceTool.x3d +2 -1
- package/src/Tools/Sound/SoundTool.x3d +4 -2
- package/src/Tools/Sound/SpatialSoundTool.x3d +10 -5
- package/src/Tools/TextureProjection/X3DTextureProjectorNodeTool.x3d +2 -1
- package/src/Undo/Editor.js +4 -4
- package/src/assets/html/application-template.html +1 -1
- package/src/assets/html/application.html +1 -1
- package/src/assets/html/window-template.html +1 -1
- package/src/assets/html/window.html +1 -1
- package/src/assets/themes/default.css +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sunrize",
|
|
3
3
|
"productName": "Sunrize X3D Editor",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.7",
|
|
5
5
|
"description": "Sunrize — A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"@electron-forge/maker-zip": "^7.11.2",
|
|
89
89
|
"@electron-forge/publisher-github": "^7.11.2",
|
|
90
90
|
"@eslint/js": "^10.0.1",
|
|
91
|
-
"eslint": "^10.
|
|
91
|
+
"eslint": "^10.5.0",
|
|
92
92
|
"globals": "^17.6.0",
|
|
93
93
|
"shell-tools": "^1.1.9"
|
|
94
94
|
},
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"@vscode/codicons": "^0.0.45",
|
|
97
97
|
"capitalize": "^2.0.4",
|
|
98
98
|
"console": "^0.7.2",
|
|
99
|
-
"electron": "
|
|
99
|
+
"electron": "43.0.0-beta.3",
|
|
100
100
|
"electron-prompt": "^1.7.0",
|
|
101
101
|
"electron-squirrel-startup": "^1.0.1",
|
|
102
102
|
"electron-tabs": "^1.0.4",
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
"jquery-ui-dist": "^1.13.3",
|
|
106
106
|
"jstree": "^3.3.17",
|
|
107
107
|
"material-icons": "^1.13.14",
|
|
108
|
-
"material-symbols": "^0.
|
|
108
|
+
"material-symbols": "^0.45.1",
|
|
109
109
|
"md5": "^2.3.0",
|
|
110
110
|
"mime-types": "^3.0.2",
|
|
111
111
|
"monaco-editor": "^0.55.1",
|
|
@@ -115,8 +115,10 @@
|
|
|
115
115
|
"string-similarity": "^4.0.4",
|
|
116
116
|
"tweakpane": "^4.0.5",
|
|
117
117
|
"update-electron-app": "^3.2.0",
|
|
118
|
-
"x_ite": "^15.1.
|
|
119
|
-
"x_ite-off-parser": "^1.0.
|
|
118
|
+
"x_ite": "^15.1.4",
|
|
119
|
+
"x_ite-off-parser": "^1.0.7",
|
|
120
|
+
"x_ite-sog-parser": "^1.0.3",
|
|
121
|
+
"x_ite-spz-parser": "^1.1.3",
|
|
120
122
|
"x3d-traverse": "^2.0.1"
|
|
121
123
|
}
|
|
122
124
|
}
|
|
@@ -1030,7 +1030,7 @@ module .exports = class Application
|
|
|
1030
1030
|
},
|
|
1031
1031
|
{
|
|
1032
1032
|
name: _("3D"),
|
|
1033
|
-
extensions: ["gltf", "glb", "vrm", "obj", "stl", "ply", "off", "svg"],
|
|
1033
|
+
extensions: ["gltf", "glb", "vrm", "obj", "stl", "ply", "sog", "spz", "off", "svg"],
|
|
1034
1034
|
},
|
|
1035
1035
|
{
|
|
1036
1036
|
name: _("Audio"),
|
|
@@ -1038,7 +1038,7 @@ module .exports = class Application
|
|
|
1038
1038
|
},
|
|
1039
1039
|
{
|
|
1040
1040
|
name: _("Images"),
|
|
1041
|
-
extensions: ["png", "jpg", "jpeg", "gif", "webp", "ktx2"],
|
|
1041
|
+
extensions: ["png", "jpg", "jpeg", "gif", "webp", "avif", "ktx2"],
|
|
1042
1042
|
},
|
|
1043
1043
|
{
|
|
1044
1044
|
name: _("Video"),
|
|
@@ -18,9 +18,13 @@ const
|
|
|
18
18
|
ImageParser = require ("../Parser/ImageParser"),
|
|
19
19
|
VideoParser = require ("../Parser/VideoParser"),
|
|
20
20
|
AudioParser = require ("../Parser/AudioParser"),
|
|
21
|
-
OffParser = require ("x_ite-off-parser"),
|
|
22
21
|
_ = require ("./GetText");
|
|
23
22
|
|
|
23
|
+
require ("x_ite-sog-parser");
|
|
24
|
+
require ("x_ite-spz-parser/x_ite-spz-parser-123.js");
|
|
25
|
+
require ("x_ite-spz-parser/x_ite-spz-parser-4.js");
|
|
26
|
+
require ("x_ite-off-parser");
|
|
27
|
+
|
|
24
28
|
module .exports = class Document extends Interface
|
|
25
29
|
{
|
|
26
30
|
#replaceWorld;
|
|
@@ -322,12 +326,14 @@ module .exports = class Document extends Interface
|
|
|
322
326
|
|
|
323
327
|
activeElementIsInputOrOutput ()
|
|
324
328
|
{
|
|
329
|
+
// console .log (this .activeElement ?.prop ("nodeName"))
|
|
330
|
+
|
|
325
331
|
if (!this .activeElement)
|
|
326
332
|
return false;
|
|
327
333
|
|
|
328
334
|
const activeElement = this .activeElement;
|
|
329
335
|
|
|
330
|
-
if (activeElement .is ("input:not([type]),
|
|
336
|
+
if (activeElement .is ("input:is(:not([type]),[type=text],[type=number],[type=url])"))
|
|
331
337
|
return true;
|
|
332
338
|
|
|
333
339
|
if (activeElement .is ("textarea"))
|
|
@@ -35,6 +35,33 @@ module .exports = new class BrowserFrame extends Dialog
|
|
|
35
35
|
.text (_("Browser Frame")))
|
|
36
36
|
.appendTo (this .table .header);
|
|
37
37
|
|
|
38
|
+
this .width = $("<input></input>")
|
|
39
|
+
.attr ("type", "number")
|
|
40
|
+
.attr ("min", 1)
|
|
41
|
+
.attr ("step", "1")
|
|
42
|
+
.css ("width", "calc((100% - 20px) / 2)")
|
|
43
|
+
.on ("change", () => this .onsize ());
|
|
44
|
+
|
|
45
|
+
const x = $("<span></span>")
|
|
46
|
+
.css ({ "display": "inline-block", "width": "20px", "text-align": "center" })
|
|
47
|
+
.text ("✕");
|
|
48
|
+
|
|
49
|
+
this .height = $("<input></input>")
|
|
50
|
+
.attr ("type", "number")
|
|
51
|
+
.attr ("min", 1)
|
|
52
|
+
.attr ("step", "1")
|
|
53
|
+
.css ("width", "calc((100% - 20px) / 2)")
|
|
54
|
+
.on ("change", () => this .onsize ());
|
|
55
|
+
|
|
56
|
+
$("<tr></tr>")
|
|
57
|
+
.append ($("<th></th>")
|
|
58
|
+
.text (_("Size")))
|
|
59
|
+
.append ($("<td></td>")
|
|
60
|
+
.append (this .width)
|
|
61
|
+
.append (x)
|
|
62
|
+
.append (this .height))
|
|
63
|
+
.appendTo (this .table .body);
|
|
64
|
+
|
|
38
65
|
this .fixedSize = $("<input></input>")
|
|
39
66
|
.attr ("id", "browser-frame-fixed-size")
|
|
40
67
|
.attr ("type", "checkbox")
|
|
@@ -54,7 +81,7 @@ module .exports = new class BrowserFrame extends Dialog
|
|
|
54
81
|
.attr ("min", 1)
|
|
55
82
|
.attr ("step", "1")
|
|
56
83
|
.css ("width", "calc((100% - 20px) / 2)")
|
|
57
|
-
.on ("change
|
|
84
|
+
.on ("change", () => this .onchange ());
|
|
58
85
|
|
|
59
86
|
const slash = $("<span></span>")
|
|
60
87
|
.css ({ "display": "inline-block", "width": "20px", "text-align": "center" })
|
|
@@ -65,7 +92,7 @@ module .exports = new class BrowserFrame extends Dialog
|
|
|
65
92
|
.attr ("min", 1)
|
|
66
93
|
.attr ("step", "1")
|
|
67
94
|
.css ("width", "calc((100% - 20px) / 2)")
|
|
68
|
-
.on ("change
|
|
95
|
+
.on ("change", () => this .onchange ());
|
|
69
96
|
|
|
70
97
|
$("<tr></tr>")
|
|
71
98
|
.append ($("<th></th>")
|
|
@@ -86,14 +113,16 @@ module .exports = new class BrowserFrame extends Dialog
|
|
|
86
113
|
.append ($("<td></td>") .append (this .backgroundColor))
|
|
87
114
|
.appendTo (this .table .body);
|
|
88
115
|
|
|
89
|
-
this .
|
|
116
|
+
this .paneObserver = new ResizeObserver (() => this .updateSize ());
|
|
117
|
+
this .paneObserver .observe ($("#browser-pane") [0]);
|
|
90
118
|
|
|
91
|
-
this .
|
|
119
|
+
this .frameObserver = new ResizeObserver (() => this .onresize ());
|
|
120
|
+
this .frameObserver .observe ($("#browser-frame") [0]);
|
|
92
121
|
}
|
|
93
122
|
|
|
94
123
|
configure ()
|
|
95
124
|
{
|
|
96
|
-
super .configure ({ size: [388,
|
|
125
|
+
super .configure ({ size: [388, 175] });
|
|
97
126
|
|
|
98
127
|
this .connect (Editor .getWorldInfo (this .browser .currentScene));
|
|
99
128
|
this .updateInputs ();
|
|
@@ -115,12 +144,20 @@ module .exports = new class BrowserFrame extends Dialog
|
|
|
115
144
|
[numerator = 1, denominator = 1] = worldInfoNode ?.getMetaData ("Sunrize/BrowserFrame/aspectRatio") ?? [ ],
|
|
116
145
|
[backgroundColor = ""] = worldInfoNode ?.getMetaData ("Sunrize/BrowserFrame/backgroundColor") ?? [ ];
|
|
117
146
|
|
|
147
|
+
this .updateSize ();
|
|
148
|
+
|
|
118
149
|
this .fixedSize .prop ("checked", fixedSize);
|
|
119
150
|
this .numerator .val (numerator);
|
|
120
151
|
this .denominator .val (denominator);
|
|
121
152
|
this .backgroundColor .val (backgroundColor);
|
|
122
153
|
}
|
|
123
154
|
|
|
155
|
+
updateSize ()
|
|
156
|
+
{
|
|
157
|
+
this .width .val ($("#browser-pane") .width ());
|
|
158
|
+
this .height .val ($("#browser-pane") .height ());
|
|
159
|
+
}
|
|
160
|
+
|
|
124
161
|
onchange ()
|
|
125
162
|
{
|
|
126
163
|
const
|
|
@@ -171,4 +208,12 @@ module .exports = new class BrowserFrame extends Dialog
|
|
|
171
208
|
|
|
172
209
|
element .css ("background-color", `${backgroundColor}` .replace (/\b(?:transparent|unset|initial)\b/g, ""));
|
|
173
210
|
}
|
|
211
|
+
|
|
212
|
+
onsize ()
|
|
213
|
+
{
|
|
214
|
+
const document = require ("../Application/Window");
|
|
215
|
+
|
|
216
|
+
document .verticalSplitter .position = this .width .val () / $("body") .width ();
|
|
217
|
+
document .horizontalSplitter .position = this .height .val () / $("body") .height ();
|
|
218
|
+
}
|
|
174
219
|
};
|
|
@@ -2413,7 +2413,7 @@ module .exports = class OutlineView extends Interface
|
|
|
2413
2413
|
|
|
2414
2414
|
$("<div></div>")
|
|
2415
2415
|
.addClass (type + "-value-container")
|
|
2416
|
-
.append ($("<input></input>")
|
|
2416
|
+
.append ($("<input></input>"))
|
|
2417
2417
|
.appendTo (li);
|
|
2418
2418
|
|
|
2419
2419
|
// Make jsTree.
|
|
@@ -2460,7 +2460,7 @@ module .exports = class OutlineView extends Interface
|
|
|
2460
2460
|
}
|
|
2461
2461
|
else
|
|
2462
2462
|
{
|
|
2463
|
-
input .attr ("
|
|
2463
|
+
input .attr ("readonly", "");
|
|
2464
2464
|
}
|
|
2465
2465
|
|
|
2466
2466
|
this .connectField (input, node, field, false);
|
|
@@ -2523,7 +2523,7 @@ module .exports = class OutlineView extends Interface
|
|
|
2523
2523
|
|
|
2524
2524
|
$("<div></div>")
|
|
2525
2525
|
.addClass (type + "-value-container")
|
|
2526
|
-
.append ($("<textarea></textarea>")
|
|
2526
|
+
.append ($("<textarea></textarea>"))
|
|
2527
2527
|
.appendTo (li)
|
|
2528
2528
|
|
|
2529
2529
|
// Make jsTree.
|
|
@@ -56,14 +56,15 @@
|
|
|
56
56
|
<connect nodeField='scale' protoField='size'/>
|
|
57
57
|
<connect nodeField='visible' protoField='selected'/>
|
|
58
58
|
</IS>
|
|
59
|
-
<Shape
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
<Shape
|
|
60
|
+
castShadow='false'>
|
|
61
|
+
<Appearance>
|
|
62
|
+
<UnlitMaterial
|
|
63
|
+
transparency='1'/>
|
|
64
|
+
</Appearance>
|
|
65
|
+
<Box
|
|
66
|
+
size='1 1 1'/>
|
|
67
|
+
</Shape>
|
|
67
68
|
</Transform>
|
|
68
69
|
</Collision>
|
|
69
70
|
<Script DEF='Tool'
|
|
@@ -256,7 +256,7 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
|
|
|
256
256
|
vectorOnGrid = rotationPlane .copy () .inverse () .multRight (gridRotation) .multRight (gridPlane .copy () .inverse ()) .multVecMatrix (vectorToSnap .copy ()) .normalize (), // Vector inside grid space.
|
|
257
257
|
snapVector = rotationPlane .multVecMatrix (gridRotation .copy () .inverse () .multVecMatrix (gridPlane .multVecMatrix (this .getSnapPosition (vectorOnGrid .copy (), false)))),
|
|
258
258
|
invModelMatrix = transformTool .getModelMatrix () .copy () .inverse (),
|
|
259
|
-
snapRotation =
|
|
259
|
+
snapRotation = X3D .Rotation4 .fromVectors (
|
|
260
260
|
invModelMatrix .multDirMatrix (vectorToSnap .copy ()),
|
|
261
261
|
invModelMatrix .multDirMatrix (snapVector .copy ())
|
|
262
262
|
);
|
|
@@ -7,14 +7,13 @@
|
|
|
7
7
|
<component name='Navigation' level='2'/>
|
|
8
8
|
<component name='Networking' level='2'/>
|
|
9
9
|
<component name='Scripting' level='1'/>
|
|
10
|
-
<component name='Shaders' level='1'/>
|
|
11
10
|
<component name='X_ITE' level='1'/>
|
|
12
11
|
<unit category='angle' name='degree' conversionFactor='0.017453292519943295'/>
|
|
13
12
|
<meta name='comment' content='Rise and Shine'/>
|
|
14
13
|
<meta name='created' content='Fri, 29 Aug 2014 13:13:27 GMT'/>
|
|
15
14
|
<meta name='creator' content='Holger Seelig'/>
|
|
16
|
-
<meta name='generator' content='Sunrize X3D Editor V2.1.
|
|
17
|
-
<meta name='modified' content='
|
|
15
|
+
<meta name='generator' content='Sunrize X3D Editor V2.1.5, https://create3000.github.io/sunrize/'/>
|
|
16
|
+
<meta name='modified' content='Thu, 11 Jun 2026 20:46:09 GMT'/>
|
|
18
17
|
</head>
|
|
19
18
|
<Scene>
|
|
20
19
|
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
@@ -47,7 +46,8 @@
|
|
|
47
46
|
<connect nodeField='scale' protoField='bboxSize'/>
|
|
48
47
|
<connect nodeField='visible' protoField='bboxEvents'/>
|
|
49
48
|
</IS>
|
|
50
|
-
<Shape
|
|
49
|
+
<Shape
|
|
50
|
+
castShadow='false'>
|
|
51
51
|
<Appearance
|
|
52
52
|
alphaMode='MASK'>
|
|
53
53
|
<UnlitMaterial
|
|
@@ -1,18 +1,19 @@
|
|
|
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='Geometry2D' level='2'/>
|
|
6
7
|
<component name='Layout' level='2'/>
|
|
8
|
+
<component name='Navigation' level='2'/>
|
|
7
9
|
<component name='PointingDeviceSensor' level='1'/>
|
|
8
10
|
<component name='Scripting' level='1'/>
|
|
9
11
|
<component name='X_ITE' level='1'/>
|
|
10
12
|
<unit category='angle' name='degree' conversionFactor='0.017453292519943295'/>
|
|
11
|
-
<meta name='comment' content='Rise and Shine'/>
|
|
12
13
|
<meta name='created' content='Fri, 29 Aug 2014 13:13:27 GMT'/>
|
|
13
14
|
<meta name='creator' content='Holger Seelig'/>
|
|
14
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
15
|
-
<meta name='modified' content='
|
|
15
|
+
<meta name='generator' content='Sunrize X3D Editor V2.1.5, https://create3000.github.io/sunrize/'/>
|
|
16
|
+
<meta name='modified' content='Thu, 11 Jun 2026 09:06:42 GMT'/>
|
|
16
17
|
</head>
|
|
17
18
|
<Scene>
|
|
18
19
|
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
@@ -83,7 +84,8 @@
|
|
|
83
84
|
<connect nodeField='scale' protoField='bboxSize'/>
|
|
84
85
|
<connect nodeField='visible' protoField='bboxEvents'/>
|
|
85
86
|
</IS>
|
|
86
|
-
<Shape
|
|
87
|
+
<Shape
|
|
88
|
+
castShadow='false'>
|
|
87
89
|
<Appearance
|
|
88
90
|
alphaMode='MASK'>
|
|
89
91
|
<UnlitMaterial
|
|
@@ -718,7 +720,8 @@
|
|
|
718
720
|
<connect nodeField='translation' protoField='center'/>
|
|
719
721
|
</IS>
|
|
720
722
|
<ScreenGroup>
|
|
721
|
-
<Shape
|
|
723
|
+
<Shape
|
|
724
|
+
castShadow='false'>
|
|
722
725
|
<Appearance>
|
|
723
726
|
<UnlitMaterial
|
|
724
727
|
transparency='1'/>
|
|
@@ -996,7 +999,7 @@ function set_bboxSize ()
|
|
|
996
999
|
<field accessType='outputOnly' type='SFBool' name='scale'/>
|
|
997
1000
|
<field accessType='outputOnly' type='SFInt32' name='whichChoice_changed'/>
|
|
998
1001
|
<field accessType='outputOnly' type='SFString' name='activeTool'/>
|
|
999
|
-
<field accessType='initializeOnly' type='SFTime' name='time'
|
|
1002
|
+
<field accessType='initializeOnly' type='SFTime' name='time'/>
|
|
1000
1003
|
<field accessType='initializeOnly' type='SFInt32' name='tool'/>
|
|
1001
1004
|
<IS>
|
|
1002
1005
|
<connect nodeField='tools' protoField='tools'/>
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
</ProtoInterface>
|
|
29
29
|
<ProtoBody>
|
|
30
30
|
<Group>
|
|
31
|
-
<Shape DEF='Hull'
|
|
31
|
+
<Shape DEF='Hull'
|
|
32
|
+
castShadow='false'>
|
|
32
33
|
<Appearance>
|
|
33
34
|
<LineProperties
|
|
34
35
|
linetype='3'
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
</IS>
|
|
49
50
|
</IndexedLineSet>
|
|
50
51
|
</Shape>
|
|
51
|
-
<Shape DEF='ControlPoints'
|
|
52
|
+
<Shape DEF='ControlPoints'
|
|
53
|
+
castShadow='false'>
|
|
52
54
|
<Appearance>
|
|
53
55
|
<PointProperties
|
|
54
56
|
pointSizeScaleFactor='5'
|
|
@@ -43,7 +43,8 @@
|
|
|
43
43
|
<IS>
|
|
44
44
|
<connect nodeField='scale' protoField='size'/>
|
|
45
45
|
</IS>
|
|
46
|
-
<Shape DEF='Lines'
|
|
46
|
+
<Shape DEF='Lines'
|
|
47
|
+
castShadow='false'>
|
|
47
48
|
<IS>
|
|
48
49
|
<connect nodeField='visible' protoField='linesDisplay'/>
|
|
49
50
|
</IS>
|
|
@@ -70,7 +71,8 @@
|
|
|
70
71
|
</IS>
|
|
71
72
|
</IndexedLineSet>
|
|
72
73
|
</Shape>
|
|
73
|
-
<Shape DEF='Points'
|
|
74
|
+
<Shape DEF='Points'
|
|
75
|
+
castShadow='false'>
|
|
74
76
|
<IS>
|
|
75
77
|
<connect nodeField='visible' protoField='pointsDisplay'/>
|
|
76
78
|
</IS>
|
|
@@ -235,7 +235,7 @@ class SnapTarget extends X3DSnapNodeTool
|
|
|
235
235
|
from = invModelMatrix .multDirMatrix (distance1a < distance1b ? axis1 : axis1 .negate ()),
|
|
236
236
|
to = invModelMatrix .multDirMatrix (snapVector);
|
|
237
237
|
|
|
238
|
-
snapRotation .
|
|
238
|
+
snapRotation .setVectors (from, to);
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
else
|
|
@@ -247,7 +247,7 @@ class SnapTarget extends X3DSnapNodeTool
|
|
|
247
247
|
from = invModelMatrix .multDirMatrix (distance2a < distance2b ? axis2 : axis2 .negate ()),
|
|
248
248
|
to = invModelMatrix .multDirMatrix (snapVector);
|
|
249
249
|
|
|
250
|
-
snapRotation .
|
|
250
|
+
snapRotation .setVectors (from, to);
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
<Transform DEF='Cone'
|
|
34
34
|
translation='0 60 0'
|
|
35
35
|
scale='6 9 6'>
|
|
36
|
-
<Shape
|
|
36
|
+
<Shape
|
|
37
|
+
castShadow='false'>
|
|
37
38
|
<Appearance DEF='_3'>
|
|
38
39
|
<Material DEF='TargetMaterial'
|
|
39
40
|
diffuseColor='0.8 0.8 0.16'/>
|
|
@@ -45,14 +46,16 @@
|
|
|
45
46
|
<Transform DEF='Cylinder'
|
|
46
47
|
translation='0 30 0'
|
|
47
48
|
scale='2 30 2'>
|
|
48
|
-
<Shape
|
|
49
|
+
<Shape
|
|
50
|
+
castShadow='false'>
|
|
49
51
|
<Appearance USE='_3'/>
|
|
50
52
|
<Cylinder/>
|
|
51
53
|
</Shape>
|
|
52
54
|
</Transform>
|
|
53
55
|
<Transform DEF='Sphere'
|
|
54
56
|
scale='6 6 6'>
|
|
55
|
-
<Shape
|
|
57
|
+
<Shape
|
|
58
|
+
castShadow='false'>
|
|
56
59
|
<Appearance USE='_3'/>
|
|
57
60
|
<Sphere/>
|
|
58
61
|
</Shape>
|
|
@@ -60,7 +63,8 @@
|
|
|
60
63
|
<Transform DEF='Grid_4'
|
|
61
64
|
translation='0 1 0'
|
|
62
65
|
scale='12 1 12'>
|
|
63
|
-
<Shape
|
|
66
|
+
<Shape
|
|
67
|
+
castShadow='false'>
|
|
64
68
|
<IndexedLineSet
|
|
65
69
|
colorPerVertex='false'
|
|
66
70
|
colorIndex='0, 1, 2'
|
|
@@ -188,7 +188,8 @@
|
|
|
188
188
|
rotation='0 1 0 90'
|
|
189
189
|
visible='false'>
|
|
190
190
|
<ScreenGroup>
|
|
191
|
-
<Shape DEF='_26'
|
|
191
|
+
<Shape DEF='_26'
|
|
192
|
+
castShadow='false'>
|
|
192
193
|
<Appearance>
|
|
193
194
|
<UnlitMaterial DEF='_111'
|
|
194
195
|
transparency='1'/>
|
|
@@ -274,7 +275,8 @@
|
|
|
274
275
|
<connect nodeField='visible' protoField='selected'/>
|
|
275
276
|
</IS>
|
|
276
277
|
<ScreenGroup>
|
|
277
|
-
<Shape
|
|
278
|
+
<Shape
|
|
279
|
+
castShadow='false'>
|
|
278
280
|
<Appearance>
|
|
279
281
|
<UnlitMaterial USE='_111'/>
|
|
280
282
|
</Appearance>
|
|
@@ -181,7 +181,8 @@ function eventsProcessed ()
|
|
|
181
181
|
rotation='1 0 0 90'>
|
|
182
182
|
<ProtoInstance name='BooleanSwitch'>
|
|
183
183
|
<fieldValue name='children'>
|
|
184
|
-
<Shape
|
|
184
|
+
<Shape
|
|
185
|
+
castShadow='false'>
|
|
185
186
|
<Appearance>
|
|
186
187
|
<LineProperties DEF='_5'
|
|
187
188
|
linewidthScaleFactor='1'/>
|
|
@@ -198,7 +199,8 @@ function eventsProcessed ()
|
|
|
198
199
|
</IS>
|
|
199
200
|
</ProtoInstance>
|
|
200
201
|
</Shape>
|
|
201
|
-
<Shape
|
|
202
|
+
<Shape
|
|
203
|
+
castShadow='false'>
|
|
202
204
|
<Appearance>
|
|
203
205
|
<LineProperties USE='_5'/>
|
|
204
206
|
<Material
|
|
@@ -218,7 +220,8 @@ function eventsProcessed ()
|
|
|
218
220
|
rotation='1 0 0 90'>
|
|
219
221
|
<ProtoInstance name='BooleanSwitch'>
|
|
220
222
|
<fieldValue name='children'>
|
|
221
|
-
<Shape
|
|
223
|
+
<Shape
|
|
224
|
+
castShadow='false'>
|
|
222
225
|
<Appearance>
|
|
223
226
|
<LineProperties USE='_5'/>
|
|
224
227
|
<Material
|
|
@@ -234,7 +237,8 @@ function eventsProcessed ()
|
|
|
234
237
|
</IS>
|
|
235
238
|
</ProtoInstance>
|
|
236
239
|
</Shape>
|
|
237
|
-
<Shape
|
|
240
|
+
<Shape
|
|
241
|
+
castShadow='false'>
|
|
238
242
|
<Appearance>
|
|
239
243
|
<LineProperties USE='_5'/>
|
|
240
244
|
<Material
|
|
@@ -257,7 +261,8 @@ function eventsProcessed ()
|
|
|
257
261
|
<connect nodeField='visible' protoField='selected'/>
|
|
258
262
|
</IS>
|
|
259
263
|
<ScreenGroup>
|
|
260
|
-
<Shape
|
|
264
|
+
<Shape
|
|
265
|
+
castShadow='false'>
|
|
261
266
|
<Appearance>
|
|
262
267
|
<UnlitMaterial
|
|
263
268
|
transparency='1'/>
|
package/src/Undo/Editor.js
CHANGED
|
@@ -2681,7 +2681,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2681
2681
|
const
|
|
2682
2682
|
center = (moveCenter ? bboxCenter .copy () : (sourcePosition ?.copy () ?? bboxCenter .copy () .add (axis))) .subtract (modelMatrices [0] .origin),
|
|
2683
2683
|
translation = targetPosition .copy () .subtract (center),
|
|
2684
|
-
rotation =
|
|
2684
|
+
rotation = X3D .Rotation4 .fromVectors (sourceNormal ?? axis, targetNormal .copy () .negate ()),
|
|
2685
2685
|
snapMatrix = X3D .Matrix4 .fromTransform (translation, rotation, null, null, center);
|
|
2686
2686
|
|
|
2687
2687
|
const
|
|
@@ -2809,7 +2809,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2809
2809
|
const position = localSnapMatrix
|
|
2810
2810
|
.multVecMatrix (node ._position .getValue () .copy ());
|
|
2811
2811
|
|
|
2812
|
-
const orientation =
|
|
2812
|
+
const orientation = X3D .Rotation4 .fromMatrix (localSnapMatrix
|
|
2813
2813
|
.submatrix .multLeft (node ._orientation .getValue () .getMatrix ()));
|
|
2814
2814
|
|
|
2815
2815
|
this .setFieldValue (executionContext, node, node ._position, position, undoManager);
|
|
@@ -2860,7 +2860,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2860
2860
|
{
|
|
2861
2861
|
case X3D .X3DConstants .DirectionalLight:
|
|
2862
2862
|
return new X3D .Box3 (X3D .Vector3 .ONE, innerNode .getMetaData ("DirectionalLight/location", new X3D .Vector3 ()))
|
|
2863
|
-
.multLeft (new X3D .Matrix4 () .setRotation (
|
|
2863
|
+
.multLeft (new X3D .Matrix4 () .setRotation (X3D .Rotation4 .fromVectors (X3D .Vector3 .Z_AXIS, innerNode ._direction .getValue ())))
|
|
2864
2864
|
.multRight (modelMatrix);
|
|
2865
2865
|
case X3D .X3DConstants .PointLight:
|
|
2866
2866
|
return new X3D .Box3 (X3D .Vector3 .ONE, innerNode ._location .getValue ())
|
|
@@ -2869,7 +2869,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2869
2869
|
case X3D .X3DConstants .Sound:
|
|
2870
2870
|
case X3D .X3DConstants .X3DTextureProjectorNode:
|
|
2871
2871
|
return new X3D .Box3 (X3D .Vector3 .ONE, innerNode ._location .getValue ())
|
|
2872
|
-
.multLeft (new X3D .Matrix4 () .setRotation (
|
|
2872
|
+
.multLeft (new X3D .Matrix4 () .setRotation (X3D .Rotation4 .fromVectors (X3D .Vector3 .Z_AXIS, innerNode ._direction .getValue ())))
|
|
2873
2873
|
.multRight (modelMatrix);
|
|
2874
2874
|
case X3D .X3DConstants .X3DBoundedObject:
|
|
2875
2875
|
return innerNode .getBBox (new X3D .Box3 ()) .multRight (modelMatrix);
|
|
@@ -1797,9 +1797,9 @@ body.light .console-output .selected {
|
|
|
1797
1797
|
resize: vertical;
|
|
1798
1798
|
}
|
|
1799
1799
|
|
|
1800
|
-
.scene-graph .field-value input[disabled],
|
|
1801
|
-
.scene-graph .field-value textarea[disabled],
|
|
1802
|
-
.scene-graph .special-value textarea[disabled] {
|
|
1800
|
+
.scene-graph .field-value input:is([disabled],[readonly]),
|
|
1801
|
+
.scene-graph .field-value textarea:is([disabled],[readonly]),
|
|
1802
|
+
.scene-graph .special-value textarea:is([disabled],[readonly]) {
|
|
1803
1803
|
background: var(--background-disabled);
|
|
1804
1804
|
}
|
|
1805
1805
|
|