sunrize 2.1.0 → 2.1.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.
Files changed (48) hide show
  1. package/package.json +13 -12
  2. package/src/Application/Application.js +1 -1
  3. package/src/Application/Document.js +2 -1
  4. package/src/Application/Hierarchy.js +1 -1
  5. package/src/Editors/Library.js +1 -1
  6. package/src/Editors/NodeList.js +1 -1
  7. package/src/Editors/OutlineEditor.js +10 -10
  8. package/src/Editors/OutlineView.js +1 -1
  9. package/src/Tools/Core/ToolColors.js +1 -1
  10. package/src/Tools/Core/X3DChildNodeTool.js +9 -7
  11. package/src/Tools/Core/X3DNodeTool.js +2 -2
  12. package/src/Tools/EnvironmentalSensor/X3DEnvironmentalSensorNodeTool.js +3 -3
  13. package/src/Tools/Geometry2D/Arc2DTool.js +1 -1
  14. package/src/Tools/Geometry2D/ArcClose2DTool.js +1 -1
  15. package/src/Tools/Geometry2D/Circle2DTool.js +1 -1
  16. package/src/Tools/Geometry2D/Disk2DTool.js +4 -4
  17. package/src/Tools/Geometry2D/Rectangle2DTool.js +1 -1
  18. package/src/Tools/Geometry3D/BoxTool.js +1 -1
  19. package/src/Tools/Geometry3D/ConeTool.js +1 -1
  20. package/src/Tools/Geometry3D/CylinderTool.js +1 -1
  21. package/src/Tools/Geometry3D/SphereTool.js +1 -1
  22. package/src/Tools/Geospatial/GeoViewpointTool.js +6 -6
  23. package/src/Tools/Grids/AxonometricGridTool.js +1 -1
  24. package/src/Tools/Grids/X3DGridNodeTool.js +13 -13
  25. package/src/Tools/Grouping/X3DTransformNodeTool.js +15 -16
  26. package/src/Tools/Grouping/X3DTransformNodeTool.x3d +1 -1
  27. package/src/Tools/Layout/LayoutGroupTool.js +1 -1
  28. package/src/Tools/Lighting/DirectionalLightTool.js +2 -2
  29. package/src/Tools/Lighting/EnvironmentLightTool.js +2 -2
  30. package/src/Tools/Lighting/PointLightTool.js +1 -1
  31. package/src/Tools/Lighting/SpotLightTool.js +4 -4
  32. package/src/Tools/Lighting/X3DLightNodeTool.js +4 -4
  33. package/src/Tools/NURBS/X3DNurbsSurfaceGeometryNodeTool.js +2 -2
  34. package/src/Tools/NURBS/X3DParametricGeometryNodeTool.js +1 -1
  35. package/src/Tools/Navigation/BillboardTool.js +1 -1
  36. package/src/Tools/Navigation/LODTool.js +1 -1
  37. package/src/Tools/Navigation/OrthoViewpointTool.js +2 -2
  38. package/src/Tools/Navigation/ViewpointTool.js +2 -2
  39. package/src/Tools/Navigation/X3DViewpointNodeTool.js +3 -3
  40. package/src/Tools/SnapTool/SnapTarget.js +11 -11
  41. package/src/Tools/Sound/ListenerPointSourceTool.js +3 -3
  42. package/src/Tools/Sound/SoundTool.js +7 -7
  43. package/src/Tools/Sound/SpatialSoundTool.js +6 -6
  44. package/src/Tools/TextureProjection/TextureProjectorParallelTool.js +5 -5
  45. package/src/Tools/TextureProjection/TextureProjectorTool.js +5 -5
  46. package/src/Tools/TextureProjection/X3DTextureProjectorNodeTool.js +6 -6
  47. package/src/Tools/X_ITE/GaussianSplatsTool.js +12 -0
  48. package/src/Undo/Editor.js +13 -12
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.2",
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,8 @@
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",
116
- "x3d-traverse": "^1.0.22"
115
+ "x_ite": "^15.1.0",
116
+ "x_ite-off-parser": "^1.0.5",
117
+ "x3d-traverse": "^2.0.1"
117
118
  }
118
119
  }
@@ -1030,7 +1030,7 @@ module .exports = class Application
1030
1030
  },
1031
1031
  {
1032
1032
  name: _("3D"),
1033
- extensions: ["gltf", "glb", "vrm", "obj", "stl", "ply", "svg"],
1033
+ extensions: ["gltf", "glb", "vrm", "obj", "stl", "ply", "off", "svg"],
1034
1034
  },
1035
1035
  {
1036
1036
  name: _("Audio"),
@@ -18,6 +18,7 @@ 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"),
21
22
  _ = require ("./GetText");
22
23
 
23
24
  module .exports = class Document extends Interface
@@ -891,7 +892,7 @@ Viewpoint {
891
892
  tool = await grid .getToolInstance ();
892
893
 
893
894
  grid ._visible .addInterest ("updateMenu", this);
894
- tool .getField ("isActive") .addInterest ("handleUndoForGrid", this, typeName);
895
+ tool .getValue () .getField ("isActive") .addInterest ("handleUndoForGrid", this, typeName);
895
896
 
896
897
  UndoManager .shared .beginUndo (_ ("Change Visibility of %s"), typeName);
897
898
 
@@ -1,7 +1,7 @@
1
1
  const
2
2
  X3D = require ("../X3D"),
3
3
  Interface = require ("./Interface"),
4
- Traverse = require ("x3d-traverse") (X3D);
4
+ Traverse = require ("x3d-traverse");
5
5
 
6
6
  module .exports = new class Hierarchy extends Interface
7
7
  {
@@ -7,7 +7,7 @@ const
7
7
  Dialog = require ("../Controls/Dialog"),
8
8
  Editor = require ("../Undo/Editor"),
9
9
  UndoManager = require ("../Undo/UndoManager"),
10
- Traverse = require ("x3d-traverse") (X3D),
10
+ Traverse = require ("x3d-traverse"),
11
11
  _ = require ("../Application/GetText");
12
12
 
13
13
  module .exports = new class Library extends Dialog
@@ -4,7 +4,7 @@ const
4
4
  $ = require ("jquery"),
5
5
  X3D = require ("../X3D"),
6
6
  Interface = require ("../Application/Interface"),
7
- Traverse = require ("x3d-traverse") (X3D),
7
+ Traverse = require ("x3d-traverse"),
8
8
  _ = require ("../Application/GetText");
9
9
 
10
10
  module .exports = class NodeList extends Interface
@@ -2516,7 +2516,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2516
2516
  case "Cylinder":
2517
2517
  case "Sphere":
2518
2518
  {
2519
- toolNode .getTransformTool () .tool .getField ("active") .setValue (true);
2519
+ toolNode .getTransformTool () .tool .getValue () .getField ("active") .setValue (true);
2520
2520
  break;
2521
2521
  }
2522
2522
  case "Disk2D":
@@ -2524,13 +2524,13 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2524
2524
  if (field .getName () === "innerRadius")
2525
2525
  {
2526
2526
  toolNode .tool .group = `${node .getTypeName ()}.innerRadius`;
2527
- toolNode .getInnerRadiusTransformTool () .tool .getField ("active") .setValue (true);
2527
+ toolNode .getInnerRadiusTransformTool () .tool .getValue () .getField ("active") .setValue (true);
2528
2528
  }
2529
2529
 
2530
2530
  if (field .getName () === "outerRadius")
2531
2531
  {
2532
2532
  toolNode .tool .group = `${node .getTypeName ()}.outerRadius`;
2533
- toolNode .getOuterRadiusTransformTool () .tool .getField ("active") .setValue (true);
2533
+ toolNode .getOuterRadiusTransformTool () .tool .getValue () .getField ("active") .setValue (true);
2534
2534
  }
2535
2535
 
2536
2536
  break;
@@ -2543,9 +2543,9 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2543
2543
  const innerTool = toolNode .tool .transformTool ?.getValue () .getTool ();
2544
2544
 
2545
2545
  if (innerTool)
2546
- innerTool .tool .getField ("active") .setValue (true);
2546
+ innerTool .tool .getValue () .getField ("active") .setValue (true);
2547
2547
  else
2548
- toolNode .tool .getField ("active") .setValue (true);
2548
+ toolNode .tool .getValue () .getField ("active") .setValue (true);
2549
2549
 
2550
2550
  break;
2551
2551
  }
@@ -2580,7 +2580,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2580
2580
 
2581
2581
  toolNode .getTransformTool () .transformGroups ();
2582
2582
  toolNode .handleUndo (new X3D .SFBool ());
2583
- toolNode .getTransformTool () .tool .getField ("active") .setValue (false);
2583
+ toolNode .getTransformTool () .tool .getValue () .getField ("active") .setValue (false);
2584
2584
 
2585
2585
  UndoManager .shared .endUndo ();
2586
2586
  });
@@ -2602,10 +2602,10 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2602
2602
  toolNode .handleUndo (new X3D .SFBool ());
2603
2603
 
2604
2604
  if (field .getName () === "innerRadius")
2605
- toolNode .getInnerRadiusTransformTool () .tool .getField ("active") .setValue (false);
2605
+ toolNode .getInnerRadiusTransformTool () .tool .getValue () .getField ("active") .setValue (false);
2606
2606
 
2607
2607
  if (field .getName () === "outerRadius")
2608
- toolNode .getOuterRadiusTransformTool () .tool .getField ("active") .setValue (false);
2608
+ toolNode .getOuterRadiusTransformTool () .tool .getValue () .getField ("active") .setValue (false);
2609
2609
 
2610
2610
  UndoManager .shared .endUndo ();
2611
2611
  });
@@ -2629,7 +2629,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2629
2629
 
2630
2630
  innerTool .transformGroups ();
2631
2631
  toolNode .handleUndo (new X3D .SFBool ());
2632
- innerTool .tool .getField ("active") .setValue (false);
2632
+ innerTool .tool .getValue () .getField ("active") .setValue (false);
2633
2633
 
2634
2634
  UndoManager .shared .endUndo ();
2635
2635
  });
@@ -2640,7 +2640,7 @@ module .exports = class OutlineEditor extends OutlineRouteGraph
2640
2640
 
2641
2641
  toolNode .transformGroups ();
2642
2642
  toolNode .handleUndo (new X3D .SFBool ());
2643
- toolNode .tool .getField ("active") .setValue (true);
2643
+ toolNode .tool .getValue () .getField ("active") .setValue (true);
2644
2644
 
2645
2645
  UndoManager .shared .endUndo ();
2646
2646
  }
@@ -8,7 +8,7 @@ const
8
8
  X3D = require ("../X3D"),
9
9
  Interface = require ("../Application/Interface"),
10
10
  ActionKeys = require ("../Application/ActionKeys"),
11
- Traverse = require ("x3d-traverse") (X3D),
11
+ Traverse = require ("x3d-traverse"),
12
12
  X3DUOM = require ("../Bits/X3DUOM"),
13
13
  _ = require ("../Application/GetText");
14
14
 
@@ -8,7 +8,7 @@ module .exports = class ToolColors
8
8
  static YELLOW = new X3D .Color3 (1, 1, 0.35); // Switch
9
9
  static LILA = new X3D .Color3 (0.7, 0.35, 1); // Anchor
10
10
  static PINK = new X3D .Color3 (1, 0.35, 0.7); // Billboard
11
- static VIOLET = new X3D .Color3 (0.5, 0.175, 0.35); //
11
+ static VIOLET = new X3D .Color3 (0.5, 0.175, 0.35); // GaussianSplats
12
12
  static RED = new X3D .Color3 (1, 0.35, 0.35); // Collision
13
13
  static CYAN = new X3D .Color3 (0.35, 1, 1); // LOD
14
14
 
@@ -18,28 +18,30 @@ class X3DChildNodeTool extends X3DNodeTool
18
18
 
19
19
  isNodeTraversable (type)
20
20
  {
21
- if (!this .node .isVisible ())
21
+ const innerNode = this .node .getInnerNode ();
22
+
23
+ if (!innerNode .isVisible ())
22
24
  return false;
23
25
 
24
26
  switch (type)
25
27
  {
26
28
  case X3D .TraverseType .POINTER:
27
- return this .node .isPointingObject ();
29
+ return innerNode .isPointingObject ();
28
30
 
29
31
  case X3D .TraverseType .CAMERA:
30
- return this .node .isCameraObject ();
32
+ return innerNode .isCameraObject ();
31
33
 
32
34
  case X3D .TraverseType .PICKING:
33
- return this .node .isPickableObject ();
35
+ return innerNode .isPickableObject ();
34
36
 
35
37
  case X3D .TraverseType .COLLISION:
36
- return this .node .isCollisionObject ();
38
+ return innerNode .isCollisionObject ();
37
39
 
38
40
  case X3D .TraverseType .SHADOW:
39
- return this .node .isShadowObject ();
41
+ return innerNode .isShadowObject ();
40
42
 
41
43
  case X3D .TraverseType .DISPLAY:
42
- return this .node .isVisibleObject ();
44
+ return innerNode .isVisibleObject ();
43
45
  }
44
46
  }
45
47
  }
@@ -5,7 +5,7 @@ const
5
5
  X3D = require ("../../X3D"),
6
6
  Editor = require ("../../Undo/Editor"),
7
7
  UndoManager = require ("../../Undo/UndoManager"),
8
- Traverse = require ("x3d-traverse") (X3D),
8
+ Traverse = require ("x3d-traverse"),
9
9
  path = require ("path"),
10
10
  url = require ("url"),
11
11
  _ = require ("../../Application/GetText");
@@ -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 .getInnerNode () .traverse ?.(type, renderObject);
484
484
 
485
485
  switch (type)
486
486
  {
@@ -10,10 +10,10 @@ class X3DEnvironmentalSensorNodeTool extends X3DChildNodeTool
10
10
  {
11
11
  await super .loadTool ("tool", __dirname, "X3DEnvironmentalSensorNodeTool.x3d");
12
12
 
13
- this .tool .getField ("size") .addReference (this .node ._size);
14
- this .tool .getField ("center") .addReference (this .node ._center);
13
+ this .tool .getValue () .getField ("size") .addReference (this .node ._size);
14
+ this .tool .getValue () .getField ("center") .addReference (this .node ._center);
15
15
 
16
- this .tool .getField ("isActive") .addInterest ("handleUndo", this);
16
+ this .tool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
17
17
 
18
18
  this .tool .boxColor = this .toolBoxColor;
19
19
  }
@@ -25,7 +25,7 @@ class Arc2DTool extends X3DGeometryNodeTool
25
25
  this .#transformNode = transformNode;
26
26
 
27
27
  transformNode .scale .addInterest ("set_scale", this);
28
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
28
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
29
29
 
30
30
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 0);
31
31
  transformNode .children = [groupNode];
@@ -25,7 +25,7 @@ class ArcClose2DTool extends X3DGeometryNodeTool
25
25
  this .#transformNode = transformNode;
26
26
 
27
27
  transformNode .scale .addInterest ("set_scale", this);
28
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
28
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
29
29
 
30
30
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 0);
31
31
  transformNode .children = [groupNode];
@@ -25,7 +25,7 @@ class Circle2DTool extends X3DGeometryNodeTool
25
25
  this .#transformNode = transformNode;
26
26
 
27
27
  transformNode .scale .addInterest ("set_scale", this);
28
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
28
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
29
29
 
30
30
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 0);
31
31
  transformNode .children = [groupNode];
@@ -29,8 +29,8 @@ class Disk2DTool extends X3DGeometryNodeTool
29
29
  this .#outerRadiusTransformNode = transformNode;
30
30
 
31
31
  transformNode .scale .addInterest ("set_outerRadiusScale", this);
32
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
33
- transformTool .getField ("isActive") .addInterest ("set_outerRadiusActive", this);
32
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
33
+ transformTool .getValue () .getField ("isActive") .addInterest ("set_outerRadiusActive", this);
34
34
 
35
35
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 0);
36
36
  transformNode .children = [groupNode];
@@ -64,8 +64,8 @@ class Disk2DTool extends X3DGeometryNodeTool
64
64
  this .#innerRadiusTransformNode = transformNode;
65
65
 
66
66
  transformNode .scale .addInterest ("set_innerRadiusScale", this);
67
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
68
- transformTool .getField ("isActive") .addInterest ("set_innerRadiusActive", this);
67
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
68
+ transformTool .getValue () .getField ("isActive") .addInterest ("set_innerRadiusActive", this);
69
69
 
70
70
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 0);
71
71
  transformNode .children = [groupNode];
@@ -25,7 +25,7 @@ class Rectangle2DTool extends X3DGeometryNodeTool
25
25
 
26
26
  transformNode .scale .addInterest ("set_scale", this);
27
27
  transformNode .scale .addFieldInterest (this .tool .size);
28
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
28
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
29
29
 
30
30
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 0);
31
31
  transformNode .children = [groupNode];
@@ -25,7 +25,7 @@ class BoxTool extends X3DGeometryNodeTool
25
25
 
26
26
  transformNode .scale .addInterest ("set_scale", this);
27
27
  transformNode .scale .addFieldInterest (this .tool .size);
28
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
28
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
29
29
 
30
30
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 2);
31
31
  transformNode .children = [groupNode];
@@ -26,7 +26,7 @@ class ConeTool extends X3DGeometryNodeTool
26
26
 
27
27
  transformNode .scale .addInterest ("set_scale", this);
28
28
  transformNode .scale .addFieldInterest (this .tool .size);
29
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
29
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
30
30
 
31
31
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 2);
32
32
  transformNode .children = [groupNode];
@@ -26,7 +26,7 @@ class CylinderTool extends X3DGeometryNodeTool
26
26
 
27
27
  transformNode .scale .addInterest ("set_scale", this);
28
28
  transformNode .scale .addFieldInterest (this .tool .size);
29
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
29
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
30
30
 
31
31
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 2);
32
32
  transformNode .children = [groupNode];
@@ -26,7 +26,7 @@ class SphereTool extends X3DGeometryNodeTool
26
26
 
27
27
  transformNode .scale .addInterest ("set_scale", this);
28
28
  transformNode .scale .addFieldInterest (this .tool .size);
29
- transformTool .getField ("isActive") .addInterest ("handleUndo", this);
29
+ transformTool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
30
30
 
31
31
  groupNode .bboxSize = new X3D .Vector3 (2, 2, 2);
32
32
  transformNode .children = [groupNode];
@@ -10,11 +10,11 @@ class GeoViewpointTool extends X3DViewpointNodeTool
10
10
  {
11
11
  await super .initializeTool ();
12
12
 
13
- this .node ._position .addInterest ("set_node_position", this);
14
- this .tool .getField ("position") .addInterest ("set_tool_position", this);
13
+ this .node ._position .addInterest ("set_node_position", this);
14
+ this .tool .getValue () .getField ("position") .addInterest ("set_tool_position", this);
15
15
 
16
- this .node ._orientation .addInterest ("set_node_orientation", this);
17
- this .tool .getField ("orientation") .addInterest ("set_tool_orientation", this);
16
+ this .node ._orientation .addInterest ("set_node_orientation", this);
17
+ this .tool .getValue () .getField ("orientation") .addInterest ("set_tool_orientation", this);
18
18
 
19
19
  this .set_node_position ();
20
20
  this .set_node_orientation ();
@@ -43,7 +43,7 @@ class GeoViewpointTool extends X3DViewpointNodeTool
43
43
 
44
44
  this .#changing .position = true;
45
45
 
46
- this .node .setPosition (this .tool .getField ("position") .getValue ());
46
+ this .node .setPosition (this .tool .getValue () .getField ("position") .getValue ());
47
47
  }
48
48
 
49
49
  set_node_orientation ()
@@ -69,7 +69,7 @@ class GeoViewpointTool extends X3DViewpointNodeTool
69
69
 
70
70
  this .#changing .orientation = true;
71
71
 
72
- this .node .setOrientation (this .tool .getField ("orientation") .getValue ());
72
+ this .node .setOrientation (this .tool .getValue () .getField ("orientation") .getValue ());
73
73
  }
74
74
  }
75
75
 
@@ -11,7 +11,7 @@ class AxonometricGridTool extends X3DGridNodeTool
11
11
  {
12
12
  await super .initializeTool (__dirname, "AxonometricGridTool.x3d");
13
13
 
14
- this .tool .getField ("angles") .setUnit ("angle");
14
+ this .tool .getValue () .getField ("angles") .setUnit ("angle");
15
15
  }
16
16
 
17
17
  getSnapPosition (position)
@@ -15,8 +15,8 @@ class X3DGridNodeTool extends X3DActiveLayerNodeTool
15
15
  {
16
16
  await super .initializeTool (... args);
17
17
 
18
- this .tool .getField ("visible") .addReference (this ._visible);
19
- this .tool .getField ("translation") .setUnit ("length");
18
+ this .tool .getValue () .getField ("visible") .addReference (this ._visible);
19
+ this .tool .getValue () .getField ("translation") .setUnit ("length");
20
20
 
21
21
  for (const field of this .tool .getValue () .getFields ())
22
22
  {
@@ -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
 
@@ -24,13 +24,13 @@ class X3DTransformNodeTool extends X3DChildNodeTool
24
24
 
25
25
  this .node .addInterest ("transformGroups", this);
26
26
 
27
- this .tool .getField ("translation") .addReference (this .node ._translation);
28
- this .tool .getField ("rotation") .addReference (this .node ._rotation);
29
- this .tool .getField ("scale") .addReference (this .node ._scale);
30
- this .tool .getField ("scaleOrientation") .addReference (this .node ._scaleOrientation);
31
- this .tool .getField ("center") .addReference (this .node ._center);
27
+ this .tool .getValue () .getField ("translation") .addReference (this .node ._translation);
28
+ this .tool .getValue () .getField ("rotation") .addReference (this .node ._rotation);
29
+ this .tool .getValue () .getField ("scale") .addReference (this .node ._scale);
30
+ this .tool .getValue () .getField ("scaleOrientation") .addReference (this .node ._scaleOrientation);
31
+ this .tool .getValue () .getField ("center") .addReference (this .node ._center);
32
32
 
33
- this .tool .getField ("isActive") .addInterest ("handleUndo", this);
33
+ this .tool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
34
34
 
35
35
  this .tool .bboxColor = this .toolBBoxColor;
36
36
  }
@@ -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);
@@ -10,8 +10,8 @@ class DirectionalLightTool extends X3DLightNodeTool
10
10
  {
11
11
  await super .initializeTool ();
12
12
 
13
- this .tool .getField ("location") .addInterest ("set_location", this);
14
- this .tool .getField ("direction") .addReference (this .node ._direction);
13
+ this .tool .getValue () .getField ("location") .addInterest ("set_location", this);
14
+ this .tool .getValue () .getField ("direction") .addReference (this .node ._direction);
15
15
 
16
16
  this .addMetaDataCallback (this, "DirectionalLight/location", this .set_meta_location .bind (this));
17
17
  this .getMetaData ("DirectionalLight/location", this .tool .location);
@@ -8,8 +8,8 @@ class EnvironmentLightTool extends X3DLightNodeTool
8
8
  {
9
9
  await super .initializeTool ();
10
10
 
11
- this .tool .getField ("location") .addReference (this .node ._origin);
12
- this .tool .getField ("rotation") .addReference (this .node ._rotation);
11
+ this .tool .getValue () .getField ("location") .addReference (this .node ._origin);
12
+ this .tool .getValue () .getField ("rotation") .addReference (this .node ._rotation);
13
13
 
14
14
  this .tool .type = 3;
15
15
  }
@@ -8,7 +8,7 @@ class PointLightTool extends X3DLightNodeTool
8
8
  {
9
9
  await super .initializeTool ();
10
10
 
11
- this .tool .getField ("location") .addReference (this .node ._location);
11
+ this .tool .getValue () .getField ("location") .addReference (this .node ._location);
12
12
 
13
13
  this .tool .type = 1;
14
14
  }
@@ -8,10 +8,10 @@ class SpotLightTool extends X3DLightNodeTool
8
8
  {
9
9
  await super .initializeTool ();
10
10
 
11
- this .tool .getField ("location") .addReference (this .node ._location);
12
- this .tool .getField ("direction") .addReference (this .node ._direction);
13
- this .tool .getField ("beamWidth") .addReference (this .node ._beamWidth);
14
- this .tool .getField ("cutOffAngle") .addReference (this .node ._cutOffAngle);
11
+ this .tool .getValue () .getField ("location") .addReference (this .node ._location);
12
+ this .tool .getValue () .getField ("direction") .addReference (this .node ._direction);
13
+ this .tool .getValue () .getField ("beamWidth") .addReference (this .node ._beamWidth);
14
+ this .tool .getValue () .getField ("cutOffAngle") .addReference (this .node ._cutOffAngle);
15
15
 
16
16
  this .tool .type = 2;
17
17
  }
@@ -10,11 +10,11 @@ class X3DLightNodeTool extends X3DChildNodeTool
10
10
  {
11
11
  await super .loadTool ("tool", __dirname, "X3DLightNodeTool.x3d");
12
12
 
13
- this .tool .getField ("on") .addReference (this .node ._on);
14
- this .tool .getField ("color") .addReference (this .node ._color);
15
- this .tool .getField ("intensity") .addReference (this .node ._intensity);
13
+ this .tool .getValue () .getField ("on") .addReference (this .node ._on);
14
+ this .tool .getValue () .getField ("color") .addReference (this .node ._color);
15
+ this .tool .getValue () .getField ("intensity") .addReference (this .node ._intensity);
16
16
 
17
- this .tool .getField ("isActive") .addInterest ("handleUndo", this);
17
+ this .tool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
18
18
  }
19
19
 
20
20
  isBoundedObject ()
@@ -10,8 +10,8 @@ class X3DNurbsSurfaceGeometryNodeTool extends X3DParametricGeometryNodeTool (X3D
10
10
  {
11
11
  await super .initializeTool ();
12
12
 
13
- this .parametricGeometryNodeTool .getField ("uDimension") .addReference (this .node ._uDimension);
14
- this .parametricGeometryNodeTool .getField ("vDimension") .addReference (this .node ._vDimension);
13
+ this .parametricGeometryNodeTool .getValue () .getField ("uDimension") .addReference (this .node ._uDimension);
14
+ this .parametricGeometryNodeTool .getValue () .getField ("vDimension") .addReference (this .node ._vDimension);
15
15
 
16
16
  this .set_toolRebuildParametricGeometry ();
17
17
  }
@@ -16,7 +16,7 @@ const X3DParametricGeometryNodeTool = Base => class extends Base
16
16
  this .parametricGeometryNodeTool .hullColor = ToolColors .LIGHT_GREY;
17
17
  this .parametricGeometryNodeTool .controlPointColor = ToolColors .DARK_BLUE;
18
18
 
19
- this .parametricGeometryNodeTool .getField ("controlPoint") .addReference (this .node ._controlPoint);
19
+ this .parametricGeometryNodeTool .getValue () .getField ("controlPoint") .addReference (this .node ._controlPoint);
20
20
 
21
21
  this .addExternalNode (this .node ._controlPoint);
22
22
  }
@@ -12,7 +12,7 @@ class BillboardTool extends X3DBoundedObjectTool
12
12
  {
13
13
  await super .initializeTool ();
14
14
 
15
- this .tool .getField ("axisOfRotation") .addReference (this .node ._axisOfRotation);
15
+ this .tool .getValue () .getField ("axisOfRotation") .addReference (this .node ._axisOfRotation);
16
16
 
17
17
  this .tool .centerDisplay = true;
18
18
  }
@@ -12,7 +12,7 @@ class LODTool extends X3DBoundedObjectTool
12
12
  {
13
13
  await super .initializeTool ();
14
14
 
15
- this .tool .getField ("center") .addReference (this .node ._center);
15
+ this .tool .getValue () .getField ("center") .addReference (this .node ._center);
16
16
 
17
17
  this .tool .centerDisplay = true;
18
18
  }
@@ -10,8 +10,8 @@ class OrthoViewpointTool extends X3DViewpointNodeTool
10
10
  {
11
11
  await super .initializeTool ();
12
12
 
13
- this .tool .getField ("position") .addReference (this .node ._position);
14
- this .tool .getField ("orientation") .addReference (this .node ._orientation);
13
+ this .tool .getValue () .getField ("position") .addReference (this .node ._position);
14
+ this .tool .getValue () .getField ("orientation") .addReference (this .node ._orientation);
15
15
  }
16
16
  }
17
17
 
@@ -8,8 +8,8 @@ class ViewpointTool extends X3DViewpointNodeTool
8
8
  {
9
9
  await super .initializeTool ();
10
10
 
11
- this .tool .getField ("position") .addReference (this .node ._position);
12
- this .tool .getField ("orientation") .addReference (this .node ._orientation);
11
+ this .tool .getValue () .getField ("position") .addReference (this .node ._position);
12
+ this .tool .getValue () .getField ("orientation") .addReference (this .node ._orientation);
13
13
  }
14
14
  }
15
15
 
@@ -12,9 +12,9 @@ class X3DViewpointNodeTool extends X3DChildNodeTool
12
12
  {
13
13
  await super .loadTool ("tool", __dirname, "X3DViewpointNodeTool.x3d");
14
14
 
15
- this .tool .getField ("isActive") .addInterest ("handleUndo", this);
15
+ this .tool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
16
16
 
17
- this .node ._isBound .addFieldInterest (this .tool .getField ("bound"));
17
+ this .node ._isBound .addFieldInterest (this .tool .getValue () .getField ("bound"));
18
18
 
19
19
  this .tool .type = this .toolType;
20
20
  this .tool .bound = this .node ._isBound;
@@ -22,7 +22,7 @@ class X3DViewpointNodeTool extends X3DChildNodeTool
22
22
 
23
23
  disposeTool ()
24
24
  {
25
- this .node ._isBound .removeFieldInterest (this .tool .getField ("bound"));
25
+ this .node ._isBound .removeFieldInterest (this .tool .getValue () .getField ("bound"));
26
26
 
27
27
  super .disposeTool ();
28
28
  }
@@ -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
 
@@ -10,10 +10,10 @@ class ListenerPointSourceTool extends X3DChildNodeTool
10
10
  {
11
11
  await super .loadTool ("tool", __dirname, "ListenerPointSourceTool.x3d");
12
12
 
13
- this .tool .getField ("position") .addReference (this .node ._position);
14
- this .tool .getField ("orientation") .addReference (this .node ._orientation);
13
+ this .tool .getValue () .getField ("position") .addReference (this .node ._position);
14
+ this .tool .getValue () .getField ("orientation") .addReference (this .node ._orientation);
15
15
 
16
- this .tool .getField ("isActive") .addInterest ("handleUndo", this);
16
+ this .tool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
17
17
  }
18
18
 
19
19
  beginUndo ()
@@ -12,14 +12,14 @@ class SoundTool extends X3DChildNodeTool
12
12
  {
13
13
  await super .loadTool ("tool", __dirname, "SoundTool.x3d");
14
14
 
15
- this .tool .getField ("location") .addReference (this .node ._location);
16
- this .tool .getField ("direction") .addReference (this .node ._direction);
17
- this .tool .getField ("minBack") .addReference (this .node ._minBack);
18
- this .tool .getField ("minFront") .addReference (this .node ._minFront);
19
- this .tool .getField ("maxBack") .addReference (this .node ._maxBack);
20
- this .tool .getField ("maxFront") .addReference (this .node ._maxFront);
15
+ this .tool .getValue () .getField ("location") .addReference (this .node ._location);
16
+ this .tool .getValue () .getField ("direction") .addReference (this .node ._direction);
17
+ this .tool .getValue () .getField ("minBack") .addReference (this .node ._minBack);
18
+ this .tool .getValue () .getField ("minFront") .addReference (this .node ._minFront);
19
+ this .tool .getValue () .getField ("maxBack") .addReference (this .node ._maxBack);
20
+ this .tool .getValue () .getField ("maxFront") .addReference (this .node ._maxFront);
21
21
 
22
- this .tool .getField ("isActive") .addInterest ("handleUndo", this);
22
+ this .tool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
23
23
  }
24
24
 
25
25
  beginUndo ()
@@ -10,13 +10,13 @@ class SpatialSoundTool extends X3DChildNodeTool
10
10
  {
11
11
  await super .loadTool ("tool", __dirname, "SpatialSoundTool.x3d");
12
12
 
13
- this .tool .getField ("location") .addReference (this .node ._location);
14
- this .tool .getField ("direction") .addReference (this .node ._direction);
15
- this .tool .getField ("coneInnerAngle") .addReference (this .node ._coneInnerAngle);
16
- this .tool .getField ("coneOuterAngle") .addReference (this .node ._coneOuterAngle);
17
- this .tool .getField ("referenceDistance") .addReference (this .node ._referenceDistance);
13
+ this .tool .getValue () .getField ("location") .addReference (this .node ._location);
14
+ this .tool .getValue () .getField ("direction") .addReference (this .node ._direction);
15
+ this .tool .getValue () .getField ("coneInnerAngle") .addReference (this .node ._coneInnerAngle);
16
+ this .tool .getValue () .getField ("coneOuterAngle") .addReference (this .node ._coneOuterAngle);
17
+ this .tool .getValue () .getField ("referenceDistance") .addReference (this .node ._referenceDistance);
18
18
 
19
- this .tool .getField ("isActive") .addInterest ("handleUndo", this);
19
+ this .tool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
20
20
  }
21
21
 
22
22
  beginUndo ()
@@ -8,18 +8,18 @@ class TextureProjectorParallelTool extends X3DTextureProjectorNodeTool
8
8
  {
9
9
  await super .initializeTool ();
10
10
 
11
- this .tool .getField ("parallelFieldOfView") .addReference (this .node ._fieldOfView);
12
- this .tool .getField ("parallelNearDistance") .addReference (this .node ._nearDistance);
13
- this .tool .getField ("parallelFarDistance") .addReference (this .node ._farDistance);
11
+ this .tool .getValue () .getField ("parallelFieldOfView") .addReference (this .node ._fieldOfView);
12
+ this .tool .getValue () .getField ("parallelNearDistance") .addReference (this .node ._nearDistance);
13
+ this .tool .getValue () .getField ("parallelFarDistance") .addReference (this .node ._farDistance);
14
14
 
15
- this .node ._aspectRatio .addFieldInterest (this .tool .getField ("parallelAspectRatio"));
15
+ this .node ._aspectRatio .addFieldInterest (this .tool .getValue () .getField ("parallelAspectRatio"));
16
16
 
17
17
  this .tool .parallelAspectRatio = this .node ._aspectRatio;
18
18
  }
19
19
 
20
20
  disposeTool ()
21
21
  {
22
- this .node ._aspectRatio .removeFieldInterest (this .tool .getField ("parallelAspectRatio"));
22
+ this .node ._aspectRatio .removeFieldInterest (this .tool .getValue () .getField ("parallelAspectRatio"));
23
23
 
24
24
  super .disposeTool ();
25
25
  }
@@ -8,18 +8,18 @@ class TextureProjectorTool extends X3DTextureProjectorNodeTool
8
8
  {
9
9
  await super .initializeTool ();
10
10
 
11
- this .tool .getField ("perspectiveFieldOfView") .addReference (this .node ._fieldOfView);
12
- this .tool .getField ("perspectiveNearDistance") .addReference (this .node ._nearDistance);
13
- this .tool .getField ("perspectiveFarDistance") .addReference (this .node ._farDistance);
11
+ this .tool .getValue () .getField ("perspectiveFieldOfView") .addReference (this .node ._fieldOfView);
12
+ this .tool .getValue () .getField ("perspectiveNearDistance") .addReference (this .node ._nearDistance);
13
+ this .tool .getValue () .getField ("perspectiveFarDistance") .addReference (this .node ._farDistance);
14
14
 
15
- this .node ._aspectRatio .addFieldInterest (this .tool .getField ("perspectiveAspectRatio"));
15
+ this .node ._aspectRatio .addFieldInterest (this .tool .getValue () .getField ("perspectiveAspectRatio"));
16
16
 
17
17
  this .tool .perspectiveAspectRatio = this .node ._aspectRatio;
18
18
  }
19
19
 
20
20
  disposeTool ()
21
21
  {
22
- this .node ._aspectRatio .removeFieldInterest (this .tool .getField ("perspectiveAspectRatio"));
22
+ this .node ._aspectRatio .removeFieldInterest (this .tool .getValue () .getField ("perspectiveAspectRatio"));
23
23
 
24
24
  super .disposeTool ();
25
25
  }
@@ -10,13 +10,13 @@ class X3DTextureProjectorNodeTool extends X3DChildNodeTool
10
10
  {
11
11
  await super .loadTool ("tool", __dirname, "X3DTextureProjectorNodeTool.x3d");
12
12
 
13
- this .tool .getField ("on") .addReference (this .node ._on);
14
- this .tool .getField ("location") .addReference (this .node ._location);
15
- this .tool .getField ("direction") .addReference (this .node ._direction);
16
- this .tool .getField ("upVector") .addReference (this .node ._upVector);
17
- this .tool .getField ("texture") .addReference (this .node ._texture);
13
+ this .tool .getValue () .getField ("on") .addReference (this .node ._on);
14
+ this .tool .getValue () .getField ("location") .addReference (this .node ._location);
15
+ this .tool .getValue () .getField ("direction") .addReference (this .node ._direction);
16
+ this .tool .getValue () .getField ("upVector") .addReference (this .node ._upVector);
17
+ this .tool .getValue () .getField ("texture") .addReference (this .node ._texture);
18
18
 
19
- this .tool .getField ("isActive") .addInterest ("handleUndo", this);
19
+ this .tool .getValue () .getField ("isActive") .addInterest ("handleUndo", this);
20
20
 
21
21
  this .addExternalNode (this .node ._texture);
22
22
  }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ const
4
+ X3DBoundedObjectTool = require ("../Grouping/X3DBoundedObjectTool"),
5
+ ToolColors = require ("../Core/ToolColors");
6
+
7
+ class GaussianSplatsTool extends X3DBoundedObjectTool
8
+ {
9
+ toolBBoxColor = ToolColors .VIOLET;
10
+ }
11
+
12
+ module .exports = GaussianSplatsTool;
@@ -7,7 +7,7 @@ const
7
7
  fs = require ("fs"),
8
8
  zlib = require ("zlib"),
9
9
  X3D = require ("../X3D"),
10
- Traverse = require ("x3d-traverse") (X3D),
10
+ Traverse = require ("x3d-traverse"),
11
11
  UndoManager = require ("./UndoManager"),
12
12
  _ = require ("../Application/GetText")
13
13
 
@@ -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);