sunrize 2.1.0 → 2.1.1

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.1.0",
4
+ "version": "2.1.1",
5
5
  "description": "Sunrize — A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -80,20 +80,20 @@
80
80
  "url": "https://patreon.com/X_ITE"
81
81
  },
82
82
  "devDependencies": {
83
- "@electron-forge/cli": "^7.11.1",
84
- "@electron-forge/maker-deb": "^7.11.1",
85
- "@electron-forge/maker-dmg": "^7.11.1",
86
- "@electron-forge/maker-rpm": "^7.11.1",
87
- "@electron-forge/maker-squirrel": "^7.11.1",
88
- "@electron-forge/maker-zip": "^7.11.1",
89
- "@electron-forge/publisher-github": "^7.11.1",
83
+ "@electron-forge/cli": "^7.11.2",
84
+ "@electron-forge/maker-deb": "^7.11.2",
85
+ "@electron-forge/maker-dmg": "^7.11.2",
86
+ "@electron-forge/maker-rpm": "^7.11.2",
87
+ "@electron-forge/maker-squirrel": "^7.11.2",
88
+ "@electron-forge/maker-zip": "^7.11.2",
89
+ "@electron-forge/publisher-github": "^7.11.2",
90
90
  "shell-tools": "^1.1.9"
91
91
  },
92
92
  "dependencies": {
93
93
  "@vscode/codicons": "^0.0.45",
94
94
  "capitalize": "^2.0.4",
95
95
  "console": "^0.7.2",
96
- "electron": "^42.1.0",
96
+ "electron": "^42.2.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.8",
105
+ "material-symbols": "^0.44.9",
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.2",
115
+ "x_ite": "^15.0.3",
116
116
  "x3d-traverse": "^1.0.22"
117
117
  }
118
118
  }
@@ -185,7 +185,7 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
185
185
  invGridMatrix = gridMatrix .copy () .inverse ();
186
186
 
187
187
  const
188
- snapMatrix = new X3D .Matrix4 () .set (gridMatrix .multVecMatrix (this .getSnapPosition (invGridMatrix .multVecMatrix (position .copy ()), true)) .subtract (position)),
188
+ snapMatrix = X3D .Matrix4 .fromTransform (gridMatrix .multVecMatrix (this .getSnapPosition (invGridMatrix .multVecMatrix (position .copy ()), true)) .subtract (position)),
189
189
  currentMatrix = absoluteMatrix .multRight (snapMatrix) .multRight (transformTool .getModelMatrix () .copy () .inverse ());
190
190
 
191
191
  transformTool .setUserData (this .#changing, true);
@@ -261,12 +261,12 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
261
261
  invModelMatrix .multDirMatrix (snapVector .copy ())
262
262
  );
263
263
 
264
- const currentMatrix = new X3D .Matrix4 ()
265
- .set (transformTool ._translation .getValue (),
266
- transformTool ._rotation .getValue () .copy () .multRight (snapRotation),
267
- transformTool ._scale .getValue (),
268
- transformTool ._scaleOrientation .getValue (),
269
- transformTool ._center .getValue ());
264
+ const currentMatrix = X3D .Matrix4
265
+ .fromTransform (transformTool ._translation .getValue (),
266
+ transformTool ._rotation .getValue () .copy () .multRight (snapRotation),
267
+ transformTool ._scale .getValue (),
268
+ transformTool ._scaleOrientation .getValue (),
269
+ transformTool ._center .getValue ());
270
270
 
271
271
  transformTool .setUserData (this .#changing, true);
272
272
 
@@ -515,8 +515,8 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
515
515
  if (transformTool .tool .scaleMode === "SCALE_FROM_OPPOSITE_HANDLE")
516
516
  distanceFromCenter .subtract (offset);
517
517
 
518
- const translation = new X3D .Matrix4 ()
519
- .set (distanceFromCenter .subtract (scaleMatrix .multDirMatrix (distanceFromCenter .copy ())));
518
+ const translation = X3D .Matrix4
519
+ .fromTransform (distanceFromCenter .subtract (scaleMatrix .multDirMatrix (distanceFromCenter .copy ())));
520
520
 
521
521
  return translation;
522
522
  }
@@ -528,8 +528,8 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
528
528
  {
529
529
  const tool = this .tool;
530
530
 
531
- return new X3D .Matrix4 ()
532
- .set (tool .translation .getValue (), tool .rotation .getValue (), tool .scale .getValue ());
531
+ return X3D .Matrix4
532
+ .fromTransform (tool .translation .getValue (), tool .rotation .getValue (), tool .scale .getValue ());
533
533
  }
534
534
  }
535
535
 
@@ -189,7 +189,7 @@ class X3DTransformNodeTool extends X3DChildNodeTool
189
189
  scale = new X3D .Vector3 (1, 1, 1),
190
190
  scaleOrientation = new X3D .Rotation4 ();
191
191
 
192
- matrix .get (translation, rotation, scale, scaleOrientation);
192
+ matrix .getTransform (translation, rotation, scale, scaleOrientation);
193
193
 
194
194
  if (!this .tool .tools .includes ("TRANSLATE"))
195
195
  translation .set (0, 0, 0);
@@ -203,7 +203,7 @@ class X3DTransformNodeTool extends X3DChildNodeTool
203
203
  scaleOrientation .set (0, 0, 1, 0);
204
204
  }
205
205
 
206
- matrix .set (translation, rotation, scale, scaleOrientation);
206
+ matrix .setTransform (translation, rotation, scale, scaleOrientation);
207
207
 
208
208
  if (keepCenter)
209
209
  this .setMatrixKeepCenter (matrix);
@@ -230,7 +230,7 @@ class X3DTransformNodeTool extends X3DChildNodeTool
230
230
  scale = new X3D .Vector3 (1, 1, 1),
231
231
  scaleOrientation = new X3D .Rotation4 ();
232
232
 
233
- matrix .get (translation, rotation, scale, scaleOrientation, center);
233
+ matrix .getTransform (translation, rotation, scale, scaleOrientation, center);
234
234
 
235
235
  this ._translation = translation;
236
236
  this ._rotation = rotation;
@@ -241,13 +241,12 @@ class X3DTransformNodeTool extends X3DChildNodeTool
241
241
 
242
242
  getCurrentMatrix ()
243
243
  {
244
- const matrix = new X3D .Matrix4 ();
245
-
246
- matrix .set (this ._translation .getValue (),
247
- this ._rotation .getValue (),
248
- this ._scale .getValue (),
249
- this ._scaleOrientation .getValue (),
250
- this ._center .getValue ());
244
+ const matrix = X3D .Matrix4
245
+ .fromTransform (this ._translation .getValue (),
246
+ this ._rotation .getValue (),
247
+ this ._scale .getValue (),
248
+ this ._scaleOrientation .getValue (),
249
+ this ._center .getValue ());
251
250
 
252
251
  return matrix;
253
252
  }
@@ -1715,7 +1715,7 @@ function scaleTransform (value, centerOffset)
1715
1715
  }
1716
1716
 
1717
1717
  const scaleMatrix = new SFMatrix4f ();
1718
- scaleMatrix .setTransform (new SFVec3f (), new SFRotation (), value);
1718
+ scaleMatrix .setTransform (null, null, value);
1719
1719
 
1720
1720
  const
1721
1721
  scaledMatrix = initialMatrix .multLeft (scaleMatrix),
@@ -22,7 +22,7 @@ class LayoutGroupTool extends X3DBoundedObjectTool
22
22
  if (!this .tool .layoutDisplay)
23
23
  this .tool .layoutDisplay = true;
24
24
 
25
- renderObject .modelViewMatrix .get () .get (null, null, this .#scale);
25
+ renderObject .modelViewMatrix .get () .getTransform (null, null, this .#scale);
26
26
  this .#rectangleScale .set (this .#scale .x, this .#scale .y, this .#scale .x, this .#scale .y);
27
27
 
28
28
  this .layoutNode .push (type, renderObject);
@@ -146,7 +146,7 @@ class SnapTarget extends X3DSnapNodeTool
146
146
  // Snap translation.
147
147
 
148
148
  const
149
- snapMatrix = new X3D .Matrix4 () .set (snapTranslation),
149
+ snapMatrix = X3D .Matrix4 .fromTransform (snapTranslation),
150
150
  currentMatrix = absoluteMatrix .multRight (snapMatrix) .multRight (transformTool .getModelMatrix () .copy () .inverse ());
151
151
 
152
152
  transformTool .setUserData (this .#changing, true);
@@ -258,12 +258,12 @@ class SnapTarget extends X3DSnapNodeTool
258
258
 
259
259
  // Snap rotation.
260
260
 
261
- const currentMatrix = new X3D .Matrix4 ()
262
- .set (transformTool ._translation .getValue (),
263
- transformTool ._rotation .getValue () .copy () .multRight (snapRotation),
264
- transformTool ._scale .getValue (),
265
- transformTool ._scaleOrientation .getValue (),
266
- transformTool ._center .getValue ());
261
+ const currentMatrix = X3D .Matrix4
262
+ .fromTransform (transformTool ._translation .getValue (),
263
+ transformTool ._rotation .getValue () .copy () .multRight (snapRotation),
264
+ transformTool ._scale .getValue (),
265
+ transformTool ._scaleOrientation .getValue (),
266
+ transformTool ._center .getValue ());
267
267
 
268
268
  transformTool .setUserData (this .#changing, true);
269
269
 
@@ -402,7 +402,7 @@ class SnapTarget extends X3DSnapNodeTool
402
402
 
403
403
  const
404
404
  center = subAABBox .center,
405
- snapMatrix = new X3D .Matrix4 () .set (null, null, snapScale, null, center);
405
+ snapMatrix = X3D .Matrix4 .fromTransform (null, null, snapScale, null, center);
406
406
 
407
407
  snapMatrix .multRight (transformTool .getCurrentMatrix ());
408
408
 
@@ -443,7 +443,7 @@ class SnapTarget extends X3DSnapNodeTool
443
443
  const
444
444
  subAABBoxAxes = subAABBox .getAxes (SnapTarget .#axes),
445
445
  center = subAABBoxAxes [axis] .multiply (-sgn) .add (subAABBox .center),
446
- snapMatrix = new X3D .Matrix4 () .set (null, null, snapScale, null, center);
446
+ snapMatrix = X3D .Matrix4 .fromTransform (null, null, snapScale, null, center);
447
447
 
448
448
  snapMatrix .multRight (transformTool .getCurrentMatrix ());
449
449
 
@@ -546,7 +546,7 @@ class SnapTarget extends X3DSnapNodeTool
546
546
  const
547
547
  snapScale = new X3D .Vector3 (aRatio, aRatio, aRatio),
548
548
  center = subAABBox .center,
549
- snapMatrix = new X3D .Matrix4 () .set (null, null, snapScale, null, center);
549
+ snapMatrix = X3D .Matrix4 .fromTransform (null, null, snapScale, null, center);
550
550
 
551
551
  snapMatrix .multRight (transformTool .getCurrentMatrix ());
552
552
 
@@ -606,7 +606,7 @@ class SnapTarget extends X3DSnapNodeTool
606
606
  snapScale = new X3D .Vector3 (aRatio, aRatio, aRatio),
607
607
  subAABBoxPoints = subAABBox .getPoints (SnapTarget .#points),
608
608
  center = subAABBoxPoints [SnapTarget .#oppositePoints [handle]],
609
- snapMatrix = new X3D .Matrix4 () .set (null, null, snapScale, null, center);
609
+ snapMatrix = X3D .Matrix4 .fromTransform (null, null, snapScale, null, center);
610
610
 
611
611
  snapMatrix .multRight (transformTool .getCurrentMatrix ());
612
612
 
@@ -2495,11 +2495,11 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
2495
2495
  scale = new X3D .Vector3 (1, 1, 1),
2496
2496
  scaleOrientation = new X3D .Rotation4 ();
2497
2497
 
2498
- matrix .get (translation,
2499
- rotation,
2500
- scale,
2501
- scaleOrientation,
2502
- center);
2498
+ matrix .getTransform (translation,
2499
+ rotation,
2500
+ scale,
2501
+ scaleOrientation,
2502
+ center);
2503
2503
 
2504
2504
  this .roundToIntegerIfAlmostEqual (translation);
2505
2505
  this .roundToIntegerIfAlmostEqual (rotation);
@@ -2682,7 +2682,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
2682
2682
  center = (moveCenter ? bboxCenter .copy () : (sourcePosition ?.copy () ?? bboxCenter .copy () .add (axis))) .subtract (modelMatrices [0] .origin),
2683
2683
  translation = targetPosition .copy () .subtract (center),
2684
2684
  rotation = new X3D .Rotation4 (sourceNormal ?? axis, targetNormal .copy () .negate ()),
2685
- snapMatrix = new X3D .Matrix4 () .set (translation, rotation, null, null, center);
2685
+ snapMatrix = X3D .Matrix4 .fromTransform (translation, rotation, null, null, center);
2686
2686
 
2687
2687
  const
2688
2688
  invModelMatrix = modelMatrices [0] .copy () .inverse (),
@@ -3395,7 +3395,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
3395
3395
  {
3396
3396
  const rotation = new X3D .Rotation4 ();
3397
3397
 
3398
- modelMatrix .get (null, rotation);
3398
+ modelMatrix .getTransform (null, rotation);
3399
3399
 
3400
3400
  const
3401
3401
  position = modelMatrix .multVecMatrix (node .getPosition () .copy ()),
@@ -3413,7 +3413,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
3413
3413
  {
3414
3414
  const rotation = new X3D .Rotation4 ();
3415
3415
 
3416
- modelMatrix .get (null, rotation);
3416
+ modelMatrix .getTransform (null, rotation);
3417
3417
 
3418
3418
  const
3419
3419
  position = modelMatrix .multVecMatrix (node ._position .getValue () .copy ()),
@@ -3440,7 +3440,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
3440
3440
 
3441
3441
  const rotation = new X3D .Rotation4 ();
3442
3442
 
3443
- modelMatrix .get (null, rotation);
3443
+ modelMatrix .getTransform (null, rotation);
3444
3444
 
3445
3445
  if (node ._direction)
3446
3446
  {
@@ -3464,7 +3464,8 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
3464
3464
  }
3465
3465
  case X3D .X3DConstants .X3DEnvironmentalSensorNode:
3466
3466
  {
3467
- const matrix = new X3D .Matrix4 () .set (node ._center .getValue (), null, node ._size .getValue ());
3467
+ const matrix = X3D .Matrix4
3468
+ .fromTransform (node ._center .getValue (), null, node ._size .getValue ());
3468
3469
 
3469
3470
  modelMatrix .multLeft (matrix);
3470
3471
 
@@ -3472,7 +3473,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
3472
3473
  center = new X3D .Vector3 (),
3473
3474
  size = new X3D .Vector3 ();
3474
3475
 
3475
- modelMatrix .get (center, null, size);
3476
+ modelMatrix .getTransform (center, null, size);
3476
3477
 
3477
3478
  this .roundToIntegerIfAlmostEqual (center);
3478
3479
  this .roundToIntegerIfAlmostEqual (size);