sunrize 2.0.0 → 2.0.2
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 +10 -10
- package/src/Components/Rendering/X3DGeometryNode.js +1 -0
- package/src/Editors/OutlineView.js +2 -1
- package/src/Tools/Core/X3DNodeTool.js +2 -2
- package/src/Tools/Geometry2D/Polypoint2DTool.js +2 -2
- package/src/Tools/Grids/AngleGridTool.js +1 -1
- package/src/Tools/Grids/X3DGridNodeTool.js +8 -8
- package/src/Tools/Lighting/EnvironmentLightTool.js +23 -0
- package/src/Tools/Lighting/X3DLightNodeTool.x3d +64 -27
- package/src/Tools/Rendering/PointSetTool.js +2 -2
- package/src/Tools/Rendering/X3DGeometryNodeTool.js +13 -0
- package/src/Tools/SnapTool/SnapTarget.js +3 -3
- package/src/Tools/Sound/ListenerPointSourceTool.x3d +5 -5
- package/src/Tools/Sound/SoundTool.x3d +5 -5
- package/src/Tools/Sound/SpatialSoundTool.x3d +12 -10
- package/src/Tools/Text/TextTool.js +14 -1
- package/src/Undo/Editor.js +3 -3
- package/src/assets/themes/default.css +1 -1
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.0.2",
|
|
5
5
|
"description": "A Multi-Platform X3D Editor",
|
|
6
6
|
"main": "src/main.js",
|
|
7
7
|
"bin": {
|
|
@@ -78,20 +78,20 @@
|
|
|
78
78
|
"url": "https://patreon.com/X_ITE"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
|
-
"@electron-forge/cli": "^7.
|
|
82
|
-
"@electron-forge/maker-deb": "^7.
|
|
83
|
-
"@electron-forge/maker-dmg": "^7.
|
|
84
|
-
"@electron-forge/maker-rpm": "^7.
|
|
85
|
-
"@electron-forge/maker-squirrel": "^7.
|
|
86
|
-
"@electron-forge/maker-zip": "^7.
|
|
87
|
-
"@electron-forge/publisher-github": "^7.
|
|
81
|
+
"@electron-forge/cli": "^7.11.1",
|
|
82
|
+
"@electron-forge/maker-deb": "^7.11.1",
|
|
83
|
+
"@electron-forge/maker-dmg": "^7.11.1",
|
|
84
|
+
"@electron-forge/maker-rpm": "^7.11.1",
|
|
85
|
+
"@electron-forge/maker-squirrel": "^7.11.1",
|
|
86
|
+
"@electron-forge/maker-zip": "^7.11.1",
|
|
87
|
+
"@electron-forge/publisher-github": "^7.11.1",
|
|
88
88
|
"shell-tools": "^1.1.9"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
91
|
"@vscode/codicons": "^0.0.44",
|
|
92
92
|
"capitalize": "^2.0.4",
|
|
93
93
|
"console": "^0.7.2",
|
|
94
|
-
"electron": "^40.
|
|
94
|
+
"electron": "^40.2.1",
|
|
95
95
|
"electron-prompt": "^1.7.0",
|
|
96
96
|
"electron-squirrel-startup": "^1.0.1",
|
|
97
97
|
"electron-tabs": "^1.0.4",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"string-similarity": "^4.0.4",
|
|
111
111
|
"tweakpane": "^3.1.10",
|
|
112
112
|
"update-electron-app": "^3.1.2",
|
|
113
|
-
"x_ite": "^14.0.
|
|
113
|
+
"x_ite": "^14.0.2",
|
|
114
114
|
"x3d-traverse": "^1.0.22"
|
|
115
115
|
}
|
|
116
116
|
}
|
|
@@ -148,11 +148,12 @@ module .exports = class OutlineView extends Interface
|
|
|
148
148
|
{
|
|
149
149
|
this .onDemandToolNodes = new Set ([
|
|
150
150
|
X3D .X3DConstants .DirectionalLight,
|
|
151
|
+
X3D .X3DConstants .EnvironmentLight,
|
|
151
152
|
X3D .X3DConstants .ListenerPointSource,
|
|
152
153
|
X3D .X3DConstants .PointLight,
|
|
153
|
-
X3D .X3DConstants .SpotLight,
|
|
154
154
|
X3D .X3DConstants .Sound,
|
|
155
155
|
X3D .X3DConstants .SpatialSound,
|
|
156
|
+
X3D .X3DConstants .SpotLight,
|
|
156
157
|
X3D .X3DConstants .ViewpointGroup,
|
|
157
158
|
X3D .X3DConstants .X3DEnvironmentalSensorNode,
|
|
158
159
|
X3D .X3DConstants .X3DTextureProjectorNode,
|
|
@@ -222,7 +222,7 @@ class X3DNodeTool extends X3DBaseTool
|
|
|
222
222
|
{
|
|
223
223
|
if (!this [tool])
|
|
224
224
|
continue;
|
|
225
|
-
|
|
225
|
+
|
|
226
226
|
for (const node of Traverse .traverse (this [tool], Traverse .ROOT_NODES | Traverse .INLINE_SCENE | Traverse .PROTOTYPE_INSTANCES))
|
|
227
227
|
{
|
|
228
228
|
nodesToDispose .push (node instanceof X3D .SFNode ? node .getValue () : node);
|
|
@@ -480,7 +480,7 @@ class X3DNodeTool extends X3DBaseTool
|
|
|
480
480
|
traverse (type, renderObject = this .node)
|
|
481
481
|
{
|
|
482
482
|
if (this .isNodeTraversable (type))
|
|
483
|
-
this .node .traverse (type, renderObject);
|
|
483
|
+
this .node .traverse ?.(type, renderObject);
|
|
484
484
|
|
|
485
485
|
switch (type)
|
|
486
486
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const X3DPointGeometryNodeTool = require ("../Rendering/X3DPointGeometryNodeTool");
|
|
4
4
|
|
|
5
|
-
class Polypoint2DTool extends
|
|
5
|
+
class Polypoint2DTool extends X3DPointGeometryNodeTool { }
|
|
6
6
|
|
|
7
7
|
module .exports = Polypoint2DTool;
|
|
@@ -35,7 +35,7 @@ class AngleGridTool extends X3DGridNodeTool
|
|
|
35
35
|
if (Math .abs (snapAngle - angle) > Math .abs (this .tool .snapDistance * phi) || this .tool .dimension [1] === 0)
|
|
36
36
|
snapAngle = angle;
|
|
37
37
|
|
|
38
|
-
const snapPolar = X3D .Complex .
|
|
38
|
+
const snapPolar = X3D .Complex .fromPolar (snapRadius, snapAngle);
|
|
39
39
|
|
|
40
40
|
translation .x = snapPolar .real;
|
|
41
41
|
translation .z = snapPolar .imag;
|
|
@@ -220,22 +220,22 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
|
|
|
220
220
|
index2 = (index0 + 2) % 3;
|
|
221
221
|
|
|
222
222
|
const y = [
|
|
223
|
-
absoluteMatrix .
|
|
224
|
-
absoluteMatrix .
|
|
225
|
-
absoluteMatrix .
|
|
223
|
+
absoluteMatrix .xAxis .copy (),
|
|
224
|
+
absoluteMatrix .yAxis .copy (),
|
|
225
|
+
absoluteMatrix .zAxis .copy (),
|
|
226
226
|
]; // Rotation axis, equates to grid normal
|
|
227
227
|
|
|
228
228
|
const z = [
|
|
229
|
-
absoluteMatrix .
|
|
230
|
-
absoluteMatrix .
|
|
231
|
-
absoluteMatrix .
|
|
229
|
+
absoluteMatrix .yAxis .copy (),
|
|
230
|
+
absoluteMatrix .zAxis .copy (),
|
|
231
|
+
absoluteMatrix .yAxis .copy (),
|
|
232
232
|
]; // Axis which snaps, later transformed to grid space
|
|
233
233
|
|
|
234
234
|
const gridMatrix = this .getGridMatrix ();
|
|
235
235
|
|
|
236
236
|
const
|
|
237
237
|
Y = y [index1] .copy () .cross (y [index2]) .normalize (), // Normal of rotation plane
|
|
238
|
-
X = gridMatrix .
|
|
238
|
+
X = gridMatrix .yAxis .copy () .cross (Y), // Intersection between both planes
|
|
239
239
|
Z = X .copy () .cross (Y), // Front vector
|
|
240
240
|
gridPlane = gridMatrix .submatrix .copy ();
|
|
241
241
|
|
|
@@ -245,7 +245,7 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
|
|
|
245
245
|
|
|
246
246
|
// If X or Z are near 0 then Y is collinear to the y-axis.
|
|
247
247
|
|
|
248
|
-
if (1 - Math .abs (gridMatrix .
|
|
248
|
+
if (1 - Math .abs (gridMatrix .yAxis .normalize () .dot (Y)) < 1e-6)
|
|
249
249
|
{
|
|
250
250
|
rotationPlane = new X3D .Matrix3 ();
|
|
251
251
|
gridRotation = new X3D .Matrix3 ();
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const X3DLightNodeTool = require ("./X3DLightNodeTool");
|
|
4
|
+
|
|
5
|
+
class EnvironmentLightTool extends X3DLightNodeTool
|
|
6
|
+
{
|
|
7
|
+
async initializeTool ()
|
|
8
|
+
{
|
|
9
|
+
await super .initializeTool ();
|
|
10
|
+
|
|
11
|
+
this .tool .getField ("location") .addReference (this .node ._origin);
|
|
12
|
+
this .tool .getField ("rotation") .addReference (this .node ._rotation);
|
|
13
|
+
|
|
14
|
+
this .tool .type = 3;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
beginUndo ()
|
|
18
|
+
{
|
|
19
|
+
this .undoSaveInitialValues (["origin", "rotation"]);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module .exports = EnvironmentLightTool;
|
|
@@ -1,6 +1,6 @@
|
|
|
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
5
|
<component name='Layout' level='2'/>
|
|
6
6
|
<component name='Scripting' level='1'/>
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
<meta name='comment' content='Rise and Shine'/>
|
|
9
9
|
<meta name='created' content='Fri, 01 Aug 2014 17:41:58 GMT'/>
|
|
10
10
|
<meta name='creator' content='Holger Seelig'/>
|
|
11
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
11
|
+
<meta name='generator' content='Sunrize X3D Editor V2.0.0, https://create3000.github.io/sunrize/'/>
|
|
12
12
|
<meta name='identifier' content='file:///Users/holger/Desktop/X_ITE/sunrize/src/sunrize/Tools/Lighting/X3DLightNodeTool.x3d'/>
|
|
13
|
-
<meta name='modified' content='
|
|
13
|
+
<meta name='modified' content='Sat, 31 Jan 2026 23:04:56 GMT'/>
|
|
14
14
|
</head>
|
|
15
15
|
<Scene>
|
|
16
16
|
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
<field accessType='inputOutput' type='SFColor' name='color' value='1 1 1'/>
|
|
28
28
|
<field accessType='inputOutput' type='SFFloat' name='intensity' value='1'/>
|
|
29
29
|
<field accessType='inputOutput' type='SFVec3f' name='location'/>
|
|
30
|
+
<field accessType='inputOutput' type='SFRotation' name='rotation'/>
|
|
30
31
|
<field accessType='inputOutput' type='SFVec3f' name='direction' value='0 0 -1'/>
|
|
31
32
|
<field accessType='inputOutput' type='SFFloat' name='beamWidth'/>
|
|
32
33
|
<field accessType='inputOutput' type='SFFloat' name='cutOffAngle'/>
|
|
@@ -37,8 +38,7 @@
|
|
|
37
38
|
<ProtoBody>
|
|
38
39
|
<Collision
|
|
39
40
|
enabled='false'>
|
|
40
|
-
<Transform DEF='_1'
|
|
41
|
-
rotation='0 1 0 3.14159265358979'>
|
|
41
|
+
<Transform DEF='_1'>
|
|
42
42
|
<ScreenGroup>
|
|
43
43
|
<Transform DEF='Lights'
|
|
44
44
|
translation='0 0 1.26218e-29'
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
<Transform DEF='Rays'>
|
|
55
55
|
<Shape
|
|
56
56
|
castShadow='false'>
|
|
57
|
-
<Appearance DEF='
|
|
57
|
+
<Appearance DEF='_7'>
|
|
58
58
|
<LineProperties
|
|
59
59
|
linewidthScaleFactor='2'/>
|
|
60
|
-
<Material DEF='
|
|
60
|
+
<Material DEF='_8'
|
|
61
61
|
ambientIntensity='0.1'
|
|
62
62
|
diffuseColor='1 1 1'
|
|
63
63
|
specularColor='0.8 0.8 0.8'
|
|
64
64
|
emissiveColor='0.67 0.67 0.67'
|
|
65
65
|
shininess='1'/>
|
|
66
|
-
<ProtoInstance name='ToolShader' DEF='
|
|
66
|
+
<ProtoInstance name='ToolShader' DEF='_9' containerField='shaders'/>
|
|
67
67
|
</Appearance>
|
|
68
68
|
<IndexedLineSet
|
|
69
69
|
coordIndex='0, 1, -1, 2, 3, -1, 4, 5, -1, 6, 7, -1, 8, 9, -1, 10, 11, -1, 12, 13, -1, 14, 15, -1, 16, 17, -1'>
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
scale='1 0.61803 0.1'>
|
|
77
77
|
<Shape
|
|
78
78
|
castShadow='false'>
|
|
79
|
-
<Appearance DEF='
|
|
80
|
-
<Material USE='
|
|
81
|
-
<ProtoInstance name='ToolShader' USE='
|
|
79
|
+
<Appearance DEF='_10'>
|
|
80
|
+
<Material USE='_8'/>
|
|
81
|
+
<ProtoInstance name='ToolShader' USE='_9' containerField='shaders'/>
|
|
82
82
|
</Appearance>
|
|
83
83
|
<Box/>
|
|
84
84
|
</Shape>
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
scaleOrientation='0.999999999986306 2.43262999996669e-6 4.63356999993655e-6 0.785354'>
|
|
92
92
|
<Shape DEF='_6'
|
|
93
93
|
castShadow='false'>
|
|
94
|
-
<Appearance USE='
|
|
94
|
+
<Appearance USE='_10'/>
|
|
95
95
|
<Cone
|
|
96
96
|
height='3'/>
|
|
97
97
|
</Shape>
|
|
@@ -155,11 +155,11 @@
|
|
|
155
155
|
</Transform>
|
|
156
156
|
</Transform>
|
|
157
157
|
<Transform DEF='PointLight'>
|
|
158
|
-
<Transform DEF='
|
|
158
|
+
<Transform DEF='Rays_3'
|
|
159
159
|
scale='2 2 2'>
|
|
160
160
|
<Shape
|
|
161
161
|
castShadow='false'>
|
|
162
|
-
<Appearance USE='
|
|
162
|
+
<Appearance USE='_7'/>
|
|
163
163
|
<IndexedLineSet
|
|
164
164
|
coordIndex='0, 1, -1, 2, 3, -1, 4, 5, -1, 6, 7, -1, 8, 9, -1, 10, 11, -1, 12, 13, -1, 14, 15, -1, 16, 17, -1'>
|
|
165
165
|
<Coordinate
|
|
@@ -167,10 +167,10 @@
|
|
|
167
167
|
</IndexedLineSet>
|
|
168
168
|
</Shape>
|
|
169
169
|
</Transform>
|
|
170
|
-
<Shape DEF='
|
|
170
|
+
<Shape DEF='Sphere_2'
|
|
171
171
|
castShadow='false'>
|
|
172
|
-
<Appearance USE='
|
|
173
|
-
<Sphere/>
|
|
172
|
+
<Appearance USE='_10'/>
|
|
173
|
+
<Sphere DEF='_2'/>
|
|
174
174
|
</Shape>
|
|
175
175
|
</Transform>
|
|
176
176
|
<Transform DEF='SpotLight'>
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
scale='1.70236 1.70236 1.70236'>
|
|
182
182
|
<Shape
|
|
183
183
|
castShadow='false'>
|
|
184
|
-
<Appearance USE='
|
|
184
|
+
<Appearance USE='_7'/>
|
|
185
185
|
<IndexedLineSet
|
|
186
186
|
coordIndex='0, 1, 2, 0, -1, 2, 3, 0, -1, 3, 4, 0, -1, 4, 5, 0, -1, 5, 6, 0, -1, 6, 7, 0, -1, 7, 8, 0, -1, 8, 9, 0, -1, 9, 10, 0, -1, 10, 11, 0, -1, 11, 12, 0, -1, 12, 13, 0, -1, 13, 14, 0, -1, 14, 15, 0, -1, 15, 16, 0, -1, 16, 17, 0, -1, 17, 18, 0, -1, 18, 19, 0, -1, 19, 20, 0, -1, 20, 21, 0, -1, 21, 22, 0, -1, 22, 23, 0, -1, 23, 24, 0, -1, 24, 25, 0, -1, 25, 26, 0, -1, 26, 27, 0, -1, 27, 28, 0, -1, 28, 29, 0, -1, 29, 30, 0, -1, 30, 31, 0, -1, 31, 32, 0, -1, 32, 1, -1'>
|
|
187
187
|
<Coordinate
|
|
@@ -194,14 +194,14 @@
|
|
|
194
194
|
translation='0 0 1.46147'>
|
|
195
195
|
<Shape DEF='Sphere_1'
|
|
196
196
|
castShadow='false'>
|
|
197
|
-
<Appearance USE='
|
|
198
|
-
<Sphere/>
|
|
197
|
+
<Appearance USE='_10'/>
|
|
198
|
+
<Sphere USE='_2'/>
|
|
199
199
|
</Shape>
|
|
200
200
|
<Transform DEF='Rays_2'
|
|
201
201
|
scale='2 2 2'>
|
|
202
202
|
<Shape
|
|
203
203
|
castShadow='false'>
|
|
204
|
-
<Appearance USE='
|
|
204
|
+
<Appearance USE='_7'/>
|
|
205
205
|
<IndexedLineSet
|
|
206
206
|
coordIndex='0, 1, -1, 2, 3, -1, 4, 5, -1, 6, 7, -1, 8, 9, -1, 10, 11, -1, 12, 13, -1, 14, 15, -1, 16, 17, -1'>
|
|
207
207
|
<Coordinate
|
|
@@ -211,14 +211,49 @@
|
|
|
211
211
|
</Transform>
|
|
212
212
|
</Transform>
|
|
213
213
|
</Transform>
|
|
214
|
+
<Transform DEF='EnvironmentLight'
|
|
215
|
+
scale='2 2 2'>
|
|
216
|
+
<Transform DEF='Rays_1'
|
|
217
|
+
scale='2 2 2'>
|
|
218
|
+
<Shape
|
|
219
|
+
castShadow='false'>
|
|
220
|
+
<Appearance>
|
|
221
|
+
<LineProperties
|
|
222
|
+
linewidthScaleFactor='2'/>
|
|
223
|
+
<Material
|
|
224
|
+
ambientIntensity='0.1'
|
|
225
|
+
diffuseColor='1 1 1'
|
|
226
|
+
specularColor='0.8 0.8 0.8'
|
|
227
|
+
emissiveColor='0.67 0.67 0.67'
|
|
228
|
+
shininess='1'/>
|
|
229
|
+
<ProtoInstance name='ToolShader' containerField='shaders'/>
|
|
230
|
+
</Appearance>
|
|
231
|
+
<IndexedLineSet
|
|
232
|
+
coordIndex='0, 1, -1, 2, 3, -1, 4, 5, -1, 6, 7, -1, 8, 9, -1, 10, 11, -1, 12, 13, -1, 14, 15, -1, 16, 17, -1'>
|
|
233
|
+
<Coordinate
|
|
234
|
+
point='-1 0 0, 1 0 0, 0 -1 0, 0 1 0, 0 0 -1, 0 0 1, -0.5 0.7071068 -0.5, 0.5 -0.7071068 0.5, -0.5 -0.7071068 -0.5, 0.5 0.7071068 0.5, 0.7071068 0 -0.7071068, -0.7071068 0 0.7071068, -0.5 0.7071068 0.5, 0.5 -0.7071068 -0.5, -0.5 -0.7071068 0.5, 0.5 0.7071068 -0.5, -0.7071068 0 -0.7071068, 0.7071068 0 0.7071068'/>
|
|
235
|
+
</IndexedLineSet>
|
|
236
|
+
</Shape>
|
|
237
|
+
</Transform>
|
|
238
|
+
<Shape DEF='Sphere'
|
|
239
|
+
castShadow='false'>
|
|
240
|
+
<Appearance>
|
|
241
|
+
<PhysicalMaterial
|
|
242
|
+
roughness='0'/>
|
|
243
|
+
<TextureTransform
|
|
244
|
+
scale='-1 1'/>
|
|
245
|
+
</Appearance>
|
|
246
|
+
<Sphere USE='_2'/>
|
|
247
|
+
</Shape>
|
|
248
|
+
</Transform>
|
|
214
249
|
</Switch>
|
|
215
250
|
</Transform>
|
|
216
251
|
</ScreenGroup>
|
|
217
252
|
</Transform>
|
|
218
|
-
<Transform DEF='TransformTool'
|
|
219
|
-
rotation='0 1 0 3.14159265358979'>
|
|
253
|
+
<Transform DEF='TransformTool'>
|
|
220
254
|
<IS>
|
|
221
255
|
<connect nodeField='translation' protoField='location'/>
|
|
256
|
+
<connect nodeField='rotation' protoField='rotation'/>
|
|
222
257
|
<connect nodeField='visible' protoField='selected'/>
|
|
223
258
|
</IS>
|
|
224
259
|
<ScreenGroup>
|
|
@@ -243,7 +278,7 @@
|
|
|
243
278
|
<field accessType='inputOutput' type='SFFloat' name='intensity'/>
|
|
244
279
|
<field accessType='inputOutput' type='SFVec3f' name='direction'/>
|
|
245
280
|
<field accessType='initializeOnly' type='SFVec3f' name='upVector' value='0 1 0'/>
|
|
246
|
-
<field accessType='
|
|
281
|
+
<field accessType='inputOutput' type='SFRotation' name='rotation'/>
|
|
247
282
|
<field accessType='inputOutput' type='SFFloat' name='beamWidth'/>
|
|
248
283
|
<field accessType='inputOutput' type='SFFloat' name='cutOffAngle'/>
|
|
249
284
|
<field accessType='inputOutput' type='SFString' name='activeTool'/>
|
|
@@ -252,7 +287,7 @@
|
|
|
252
287
|
<Transform USE='TransformTool'/>
|
|
253
288
|
</field>
|
|
254
289
|
<field accessType='initializeOnly' type='SFNode' name='material'>
|
|
255
|
-
<Material USE='
|
|
290
|
+
<Material USE='_8'/>
|
|
256
291
|
</field>
|
|
257
292
|
<field accessType='initializeOnly' type='SFNode' name='cone'>
|
|
258
293
|
<Transform USE='Cone'/>
|
|
@@ -399,6 +434,8 @@ function set_angle ()
|
|
|
399
434
|
<ROUTE fromNode='TransformTool' fromField='rotation_changed' toNode='Tool' toField='set_rotation'/>
|
|
400
435
|
</ProtoBody>
|
|
401
436
|
</ProtoDeclare>
|
|
402
|
-
<ProtoInstance name='X3DLightNodeTool'
|
|
437
|
+
<ProtoInstance name='X3DLightNodeTool'>
|
|
438
|
+
<fieldValue name='type' value='3'/>
|
|
439
|
+
</ProtoInstance>
|
|
403
440
|
</Scene>
|
|
404
441
|
</X3D>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const X3DPointGeometryNodeTool = require ("./X3DPointGeometryNodeTool");
|
|
4
4
|
|
|
5
|
-
class PointSetTool extends
|
|
5
|
+
class PointSetTool extends X3DPointGeometryNodeTool { }
|
|
6
6
|
|
|
7
7
|
module .exports = PointSetTool;
|
|
@@ -47,6 +47,19 @@ class X3DGeometryNodeTool extends X3DNodeTool
|
|
|
47
47
|
|
|
48
48
|
this .tool .linesCoord .point = points;
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
traverseBefore (type, renderObject)
|
|
52
|
+
{
|
|
53
|
+
this .node .traverseBefore ?.(type, renderObject);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
traverseAfter (type, renderObject)
|
|
57
|
+
{
|
|
58
|
+
if (this .isNodeTraversable (type))
|
|
59
|
+
this .node .traverseAfter ?.(type, renderObject);
|
|
60
|
+
|
|
61
|
+
this .traverse (type, renderObject);
|
|
62
|
+
}
|
|
50
63
|
}
|
|
51
64
|
|
|
52
65
|
module .exports = X3DGeometryNodeTool;
|
|
@@ -185,9 +185,9 @@ class SnapTarget extends X3DSnapNodeTool
|
|
|
185
185
|
index2 = (index0 + 2) % 3;
|
|
186
186
|
|
|
187
187
|
const axes = [
|
|
188
|
-
absoluteMatrix .
|
|
189
|
-
absoluteMatrix .
|
|
190
|
-
absoluteMatrix .
|
|
188
|
+
absoluteMatrix .xAxis .copy (),
|
|
189
|
+
absoluteMatrix .yAxis .copy (),
|
|
190
|
+
absoluteMatrix .zAxis .copy (),
|
|
191
191
|
]; // Rotation axis, equates to grid normal.
|
|
192
192
|
|
|
193
193
|
const
|
|
@@ -1,13 +1,13 @@
|
|
|
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
5
|
<component name='Layout' level='2'/>
|
|
6
6
|
<component name='Scripting' level='1'/>
|
|
7
7
|
<meta name='created' content='Tue, 26 Mar 2024 07:12:19 GMT'/>
|
|
8
8
|
<meta name='creator' content='Holger Seelig'/>
|
|
9
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
10
|
-
<meta name='modified' content='
|
|
9
|
+
<meta name='generator' content='Sunrize X3D Editor V2.0.1, https://create3000.github.io/sunrize/'/>
|
|
10
|
+
<meta name='modified' content='Sun, 01 Feb 2026 19:11:34 GMT'/>
|
|
11
11
|
</head>
|
|
12
12
|
<Scene>
|
|
13
13
|
<ProtoDeclare name='ListenerPointSourceTool'>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</Collision>
|
|
59
59
|
<Script DEF='ListenerPointSourceScript'>
|
|
60
60
|
<field accessType='inputOutput' type='SFBool' name='active'/>
|
|
61
|
-
<field accessType='
|
|
61
|
+
<field accessType='inputOutput' type='SFString' name='activeTool'/>
|
|
62
62
|
<field accessType='inputOutput' type='SFNode' name='transform'>
|
|
63
63
|
<Transform USE='TransformTool'/>
|
|
64
64
|
</field>
|
|
@@ -1,6 +1,6 @@
|
|
|
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
5
|
<component name='Layout' level='2'/>
|
|
6
6
|
<component name='PointingDeviceSensor' level='1'/>
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
<meta name='comment' content='Rise and Shine'/>
|
|
11
11
|
<meta name='created' content='Thu, 18 Feb 2016 08:47:54 GMT'/>
|
|
12
12
|
<meta name='creator' content='Holger Seelig'/>
|
|
13
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
13
|
+
<meta name='generator' content='Sunrize X3D Editor V2.0.1, https://create3000.github.io/sunrize/'/>
|
|
14
14
|
<meta name='identifier' content='file:///Users/holger/Desktop/X_ITE/sunrize/src/sunrize/Tools/Sound/SoundTool.x3d'/>
|
|
15
|
-
<meta name='modified' content='
|
|
15
|
+
<meta name='modified' content='Sun, 01 Feb 2026 19:09:41 GMT'/>
|
|
16
16
|
</head>
|
|
17
17
|
<Scene>
|
|
18
18
|
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
@@ -315,7 +315,7 @@
|
|
|
315
315
|
<field accessType='outputOnly' type='SFVec3f' name='maxTranslation_changed'/>
|
|
316
316
|
<field accessType='outputOnly' type='SFVec3f' name='minScale_changed'/>
|
|
317
317
|
<field accessType='outputOnly' type='SFVec3f' name='maxScale_changed'/>
|
|
318
|
-
<field accessType='
|
|
318
|
+
<field accessType='inputOutput' type='SFString' name='activeTool'/>
|
|
319
319
|
<field accessType='inputOutput' type='SFNode' name='transform'>
|
|
320
320
|
<Transform USE='TransformTool'/>
|
|
321
321
|
</field>
|
|
@@ -1,6 +1,6 @@
|
|
|
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
5
|
<component name='Layout' level='2'/>
|
|
6
6
|
<component name='Scripting' level='1'/>
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
<meta name='comment' content='Rise and Shine'/>
|
|
9
9
|
<meta name='created' content='Thu, 18 Feb 2016 08:47:54 GMT'/>
|
|
10
10
|
<meta name='creator' content='Holger Seelig'/>
|
|
11
|
-
<meta name='generator' content='Sunrize X3D Editor
|
|
12
|
-
<meta name='modified' content='
|
|
11
|
+
<meta name='generator' content='Sunrize X3D Editor V2.0.1, https://create3000.github.io/sunrize/'/>
|
|
12
|
+
<meta name='modified' content='Sun, 01 Feb 2026 19:10:05 GMT'/>
|
|
13
13
|
</head>
|
|
14
14
|
<Scene>
|
|
15
|
-
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'
|
|
15
|
+
<ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
|
|
16
|
+
<field accessType='inputOutput' type='SFBool' name='instanced'/>
|
|
17
|
+
</ExternProtoDeclare>
|
|
16
18
|
<ExternProtoDeclare name='BooleanSwitch' url='"../Grouping/BooleanSwitch.x3d"'>
|
|
17
19
|
<field accessType='inputOutput' type='SFBool' name='whichChoice'/>
|
|
18
20
|
<field accessType='inputOutput' type='SFBool' name='visible'/>
|
|
@@ -179,7 +181,7 @@ function eventsProcessed ()
|
|
|
179
181
|
rotation='1 0 0 90'>
|
|
180
182
|
<ProtoInstance name='BooleanSwitch'>
|
|
181
183
|
<fieldValue name='children'>
|
|
182
|
-
<Shape
|
|
184
|
+
<Shape>
|
|
183
185
|
<Appearance>
|
|
184
186
|
<LineProperties DEF='_5'
|
|
185
187
|
linewidthScaleFactor='1'/>
|
|
@@ -196,7 +198,7 @@ function eventsProcessed ()
|
|
|
196
198
|
</IS>
|
|
197
199
|
</ProtoInstance>
|
|
198
200
|
</Shape>
|
|
199
|
-
<Shape
|
|
201
|
+
<Shape>
|
|
200
202
|
<Appearance>
|
|
201
203
|
<LineProperties USE='_5'/>
|
|
202
204
|
<Material
|
|
@@ -216,7 +218,7 @@ function eventsProcessed ()
|
|
|
216
218
|
rotation='1 0 0 90'>
|
|
217
219
|
<ProtoInstance name='BooleanSwitch'>
|
|
218
220
|
<fieldValue name='children'>
|
|
219
|
-
<Shape
|
|
221
|
+
<Shape>
|
|
220
222
|
<Appearance>
|
|
221
223
|
<LineProperties USE='_5'/>
|
|
222
224
|
<Material
|
|
@@ -232,7 +234,7 @@ function eventsProcessed ()
|
|
|
232
234
|
</IS>
|
|
233
235
|
</ProtoInstance>
|
|
234
236
|
</Shape>
|
|
235
|
-
<Shape
|
|
237
|
+
<Shape>
|
|
236
238
|
<Appearance>
|
|
237
239
|
<LineProperties USE='_5'/>
|
|
238
240
|
<Material
|
|
@@ -272,7 +274,7 @@ function eventsProcessed ()
|
|
|
272
274
|
<field accessType='inputOutput' type='SFVec3f' name='direction'/>
|
|
273
275
|
<field accessType='initializeOnly' type='SFVec3f' name='upVector' value='0 1 0'/>
|
|
274
276
|
<field accessType='inputOnly' type='SFRotation' name='set_rotation'/>
|
|
275
|
-
<field accessType='
|
|
277
|
+
<field accessType='inputOutput' type='SFString' name='activeTool'/>
|
|
276
278
|
<field accessType='inputOutput' type='SFNode' name='transform'>
|
|
277
279
|
<Transform USE='TransformTool'/>
|
|
278
280
|
</field>
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
const X3DGeometryNodeTool = require ("../Rendering/X3DGeometryNodeTool");
|
|
4
4
|
|
|
5
|
-
class TextTool extends X3DGeometryNodeTool
|
|
5
|
+
class TextTool extends X3DGeometryNodeTool
|
|
6
|
+
{
|
|
7
|
+
traverseAfter (type, renderObject)
|
|
8
|
+
{
|
|
9
|
+
const modelViewMatrix = renderObject .getModelViewMatrix ();
|
|
10
|
+
|
|
11
|
+
modelViewMatrix .push ();
|
|
12
|
+
modelViewMatrix .multLeft (this .node .getMatrix ());
|
|
13
|
+
|
|
14
|
+
super .traverseAfter (type, renderObject);
|
|
15
|
+
|
|
16
|
+
modelViewMatrix .pop ();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
6
19
|
|
|
7
20
|
module .exports = TextTool;
|
package/src/Undo/Editor.js
CHANGED
|
@@ -2585,9 +2585,9 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
|
|
|
2585
2585
|
{
|
|
2586
2586
|
const
|
|
2587
2587
|
bboxMatrix = subBBoxes [0] .matrix,
|
|
2588
|
-
bboxXAxes = bboxMatrix .
|
|
2589
|
-
bboxYAxes = bboxMatrix .
|
|
2590
|
-
bboxZAxes = bboxMatrix .
|
|
2588
|
+
bboxXAxes = bboxMatrix .xAxis .norm () ? bboxMatrix .xAxis : X3D .Vector3 .X_AXIS,
|
|
2589
|
+
bboxYAxes = bboxMatrix .yAxis .norm () ? bboxMatrix .yAxis : X3D .Vector3 .Y_AXIS,
|
|
2590
|
+
bboxZAxes = bboxMatrix .zAxis .norm () ? bboxMatrix .zAxis : X3D .Vector3 .Z_AXIS;
|
|
2591
2591
|
|
|
2592
2592
|
const axes = [
|
|
2593
2593
|
bboxXAxes .copy (), // right
|