sunrize 1.7.17 → 1.7.19

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 (29) hide show
  1. package/package.json +4 -4
  2. package/src/Application/Application.js +21 -1
  3. package/src/Application/Document.js +2 -2
  4. package/src/Editors/OutlineView.js +1 -1
  5. package/src/Editors/Primitives.js +430 -0
  6. package/src/Tools/Core/ToolColors.js +3 -2
  7. package/src/Tools/Core/X3DChildNodeTool.js +0 -5
  8. package/src/Tools/Core/X3DNodeTool.js +50 -30
  9. package/src/Tools/EnvironmentalSensor/X3DEnvironmentalSensorNodeTool.js +1 -1
  10. package/src/Tools/Grouping/X3DBoundedObjectTool.js +1 -1
  11. package/src/Tools/Grouping/X3DTransformNodeTool.js +1 -1
  12. package/src/Tools/Layering/X3DActiveLayerNodeTool.js +1 -3
  13. package/src/Tools/Lighting/X3DLightNodeTool.js +1 -1
  14. package/src/Tools/NURBS/NurbsCurveTool.js +20 -2
  15. package/src/Tools/NURBS/NurbsPatchSurfaceTool.js +2 -2
  16. package/src/Tools/NURBS/NurbsTrimmedSurfaceTool.js +2 -2
  17. package/src/Tools/NURBS/X3DNurbsSurfaceGeometryNodeTool.js +21 -0
  18. package/src/Tools/NURBS/X3DParametricGeometryNodeTool.js +68 -0
  19. package/src/Tools/NURBS/X3DParametricGeometryNodeTool.x3d +92 -0
  20. package/src/Tools/Navigation/X3DViewpointNodeTool.js +1 -1
  21. package/src/Tools/Rendering/X3DGeometryNodeTool.js +9 -9
  22. package/src/Tools/Rendering/X3DLineGeometryNodeTool.js +6 -6
  23. package/src/Tools/Rendering/X3DPointGeometryNodeTool.js +6 -6
  24. package/src/Tools/Sound/ListenerPointSourceTool.js +1 -1
  25. package/src/Tools/Sound/SoundTool.js +1 -1
  26. package/src/Tools/Sound/SpatialSoundTool.js +1 -1
  27. package/src/Tools/TextureProjection/X3DTextureProjectorNodeTool.js +1 -1
  28. package/src/Tools/TextureProjection/X3DTextureProjectorNodeTool.x3d +2 -2
  29. package/src/Undo/Editor.js +3 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sunrize",
3
3
  "productName": "Sunrize X3D Editor",
4
- "version": "1.7.17",
4
+ "version": "1.7.19",
5
5
  "description": "A Multi-Platform X3D Editor",
6
6
  "main": "src/main.js",
7
7
  "bin": {
@@ -90,14 +90,14 @@
90
90
  "dependencies": {
91
91
  "capitalize": "^2.0.4",
92
92
  "console": "^0.7.2",
93
- "electron": "^32.0.2",
93
+ "electron": "^32.1.0",
94
94
  "electron-prompt": "^1.7.0",
95
95
  "electron-squirrel-startup": "^1.0.1",
96
96
  "electron-tabs": "^1.0.4",
97
97
  "fullname": "^5.0.0",
98
98
  "jquery": "^3.7.1",
99
99
  "jquery-ui-dist": "^1.13.3",
100
- "jstree": "^3.3.16",
100
+ "jstree": "^3.3.17",
101
101
  "material-icons": "^1.13.12",
102
102
  "material-symbols": "^0.23.0",
103
103
  "md5": "^2.3.0",
@@ -109,7 +109,7 @@
109
109
  "string-similarity": "^4.0.4",
110
110
  "tweakpane": "^3.1.10",
111
111
  "update-electron-app": "^3.0.0",
112
- "x_ite": "^10.5.0"
112
+ "x_ite": "^10.5.2"
113
113
  },
114
114
  "config": {
115
115
  "forge": {
@@ -137,7 +137,22 @@ module .exports = class Application
137
137
 
138
138
  set currentFile (currentFile)
139
139
  {
140
- this .#currentFile = currentFile .startsWith ("file:") ? url .fileURLToPath (currentFile) : "";
140
+ const protocol = currentFile .match (/^(.+?:)/);
141
+
142
+ switch (protocol ?.[1])
143
+ {
144
+ default:
145
+ this .#currentFile = new URL (currentFile) .pathname .split ("/") .at (-1);
146
+ break;
147
+ case "file:":
148
+ this .#currentFile = url .fileURLToPath (currentFile);
149
+ break;
150
+ case "data:":
151
+ case "id:":
152
+ case undefined:
153
+ this .#currentFile = "";
154
+ break;
155
+ }
141
156
 
142
157
  this .mainWindow .setRepresentedFilename (this .#currentFile);
143
158
  }
@@ -802,6 +817,11 @@ module .exports = class Application
802
817
  label: _("Using the Script Editor"),
803
818
  click: () => electron .shell .openExternal ("https://create3000.github.io/sunrize/documentation/using-the-script-editor/"),
804
819
  },
820
+ { type: "separator" },
821
+ {
822
+ label: _("Report a Bug"),
823
+ click: () => electron .shell .openExternal ("https://github.com/create3000/sunrize/issues"),
824
+ },
805
825
  ],
806
826
  },
807
827
  ]));
@@ -108,7 +108,7 @@ module .exports = class Document extends Interface
108
108
  // Layout Menu
109
109
 
110
110
  electron .ipcRenderer .on ("browser-frame", () => this .browserFrame .open ());
111
- electron .ipcRenderer .on ("grid-tool", (event, typeName, visible) => this .activateGridTool (typeName, visible));
111
+ electron .ipcRenderer .on ("grid-tool", (event, typeName, visible) => this .activateGridTool (typeName, visible, true));
112
112
  electron .ipcRenderer .on ("grid-options", () => this .showGridOptions ());
113
113
 
114
114
  electron .ipcRenderer .on ("activate-snap-target", (event, visible) => this .activateSnapTarget (visible));
@@ -342,7 +342,7 @@ Viewpoint {
342
342
  }
343
343
  `));
344
344
 
345
- this .activateGridTool ("GridTool", true);
345
+ this .activateGridTool ("GridTool", true, false);
346
346
  }
347
347
  }
348
348
  else
@@ -2968,7 +2968,7 @@ module .exports = class OutlineView extends Interface
2968
2968
  const elements = this .sceneGraph .find ("> .root-nodes > ul > li[node-id]");
2969
2969
 
2970
2970
  for (const element of elements)
2971
- this .selectNodeElement ($(element));
2971
+ this .selectNodeElement ($(element), true);
2972
2972
  }
2973
2973
 
2974
2974
  deselectAll ()
@@ -381,6 +381,436 @@ EnvironmentLight {
381
381
  }
382
382
  }
383
383
  `
384
+ },
385
+ {
386
+ componentInfo: { name: "NURBS" },
387
+ typeName: "NurbsCircle2D",
388
+ x3dSyntax: `
389
+ DEF NurbsCircle2D Transform {
390
+ children Shape {
391
+ appearance Appearance {
392
+ material UnlitMaterial { }
393
+ }
394
+ geometry NurbsCurve {
395
+ closed TRUE
396
+ knot [
397
+ 0,
398
+ 0,
399
+ 0,
400
+ 0.25,
401
+ 0.25,
402
+ 0.5,
403
+ 0.5,
404
+ 0.75,
405
+ 0.75,
406
+ 1,
407
+ 1,
408
+ 1
409
+ ]
410
+ weight [
411
+ 1,
412
+ 0.7071067811865476,
413
+ 1,
414
+ 0.7071067811865476,
415
+ 1,
416
+ 0.7071067811865476,
417
+ 1,
418
+ 0.7071067811865476,
419
+ 1
420
+ ]
421
+ controlPoint CoordinateDouble {
422
+ point [
423
+ 1 0 0,
424
+ 0.7071067811865476 -0.7071067811865476 0,
425
+ 0 -1 0,
426
+ -0.7071067811865476 -0.7071067811865476 0,
427
+ -1 0 0,
428
+ -0.7071067811865476 0.7071067811865476 0,
429
+ 0 1 0,
430
+ 0.7071067811865476 0.7071067811865476 0,
431
+ 1 0 0
432
+ ]
433
+ }
434
+ }
435
+ }
436
+ }`
437
+ },
438
+ {
439
+ componentInfo: { name: "NURBS" },
440
+ typeName: "NurbsCylinder",
441
+ x3dSyntax: `
442
+ DEF NurbsCylinder Transform {
443
+ children Shape {
444
+ appearance Appearance {
445
+ material Material { }
446
+ }
447
+ geometry NurbsPatchSurface {
448
+ uClosed TRUE
449
+ vOrder 2
450
+ uDimension 9
451
+ vDimension 2
452
+ uKnot [
453
+ 0,
454
+ 0,
455
+ 0,
456
+ 0.25,
457
+ 0.25,
458
+ 0.5,
459
+ 0.5,
460
+ 0.75,
461
+ 0.75,
462
+ 1,
463
+ 1,
464
+ 1
465
+ ]
466
+ vKnot [
467
+ 0,
468
+ 0,
469
+ 1,
470
+ 1
471
+ ]
472
+ weight [
473
+ 1,
474
+ 0.707106781186548,
475
+ 1,
476
+ 0.707106781186548,
477
+ 1,
478
+ 0.707106781186548,
479
+ 1,
480
+ 0.707106781186548,
481
+ 1,
482
+ 1,
483
+ 0.707106781186548,
484
+ 1,
485
+ 0.707106781186548,
486
+ 1,
487
+ 0.707106781186548,
488
+ 1,
489
+ 0.707106781186548,
490
+ 1
491
+ ]
492
+ controlPoint CoordinateDouble {
493
+ point [
494
+ 1 -1 0,
495
+ 0.707106781186548 -0.707106781186548 -0.707106781186548,
496
+ 0 -1 -1,
497
+ -0.707106781186548 -0.707106781186548 -0.707106781186548,
498
+ -1 -1 0,
499
+ -0.707106781186548 -0.707106781186548 0.707106781186548,
500
+ 0 -1 1,
501
+ 0.707106781186548 -0.707106781186548 0.707106781186548,
502
+ 1 -1 0,
503
+ 1 1 0,
504
+ 0.707106781186548 0.707106781186548 -0.707106781186548,
505
+ 0 1 -1,
506
+ -0.707106781186548 0.707106781186548 -0.707106781186548,
507
+ -1 1 0,
508
+ -0.707106781186548 0.707106781186548 0.707106781186548,
509
+ 0 1 1,
510
+ 0.707106781186548 0.707106781186548 0.707106781186548,
511
+ 1 1 0
512
+ ]
513
+ }
514
+ }
515
+ }
516
+ }`
517
+ },
518
+ {
519
+ componentInfo: { name: "NURBS" },
520
+ typeName: "NurbsDisk2D",
521
+ x3dSyntax: `
522
+ DEF NurbsDisk2D Transform {
523
+ children Shape {
524
+ appearance Appearance {
525
+ material Material { }
526
+ }
527
+ geometry NurbsPatchSurface {
528
+ solid FALSE
529
+ uDimension 3
530
+ vDimension 3
531
+ weight [
532
+ 1,
533
+ 0.707106781186548,
534
+ 1,
535
+ 0.707106781186548,
536
+ 1,
537
+ 0.707106781186548,
538
+ 1,
539
+ 0.707106781186548,
540
+ 1
541
+ ]
542
+ controlPoint CoordinateDouble {
543
+ point [
544
+ -0.707106781186548 -0.707106781186548 0,
545
+ 0 -1 0,
546
+ 0.707106781186548 -0.707106781186548 0,
547
+ -1 0 0,
548
+ 0 0 0,
549
+ 1 0 0,
550
+ -0.707106781186548 0.707106781186548 0,
551
+ 0 1 0,
552
+ 0.707106781186548 0.707106781186548 0
553
+ ]
554
+ }
555
+ }
556
+ }
557
+ }`,
558
+ },
559
+ {
560
+ componentInfo: { name: "NURBS" },
561
+ typeName: "NurbsCone",
562
+ x3dSyntax: `
563
+ DEF NurbsCone Transform {
564
+ children Shape {
565
+ appearance Appearance {
566
+ material Material { }
567
+ }
568
+ geometry NurbsPatchSurface {
569
+ uClosed TRUE
570
+ vOrder 2
571
+ uDimension 9
572
+ vDimension 2
573
+ uKnot [
574
+ 0,
575
+ 0,
576
+ 0,
577
+ 0.25,
578
+ 0.25,
579
+ 0.5,
580
+ 0.5,
581
+ 0.75,
582
+ 0.75,
583
+ 1,
584
+ 1,
585
+ 1
586
+ ]
587
+ vKnot [
588
+ 0,
589
+ 0,
590
+ 1,
591
+ 1
592
+ ]
593
+ weight [
594
+ 1,
595
+ 0.707106781186548,
596
+ 1,
597
+ 0.707106781186548,
598
+ 1,
599
+ 0.707106781186548,
600
+ 1,
601
+ 0.707106781186548,
602
+ 1,
603
+ 1,
604
+ 0.707106781186548,
605
+ 1,
606
+ 0.707106781186548,
607
+ 1,
608
+ 0.707106781186548,
609
+ 1,
610
+ 0.707106781186548,
611
+ 1
612
+ ]
613
+ controlPoint CoordinateDouble {
614
+ point [
615
+ 1 -1 0,
616
+ 0.707106781186548 -0.707106781186548 -0.707106781186548,
617
+ 0 -1 -1,
618
+ -0.707106781186548 -0.707106781186548 -0.707106781186548,
619
+ -1 -1 0,
620
+ -0.707106781186548 -0.707106781186548 0.707106781186548,
621
+ 0 -1 1,
622
+ 0.707106781186548 -0.707106781186548 0.707106781186548,
623
+ 1 -1 0,
624
+ 0 1 0,
625
+ 0 0.707106781186548 0,
626
+ 0 1 0,
627
+ 0 0.707106781186548 0,
628
+ 0 1 0,
629
+ 0 0.707106781186548 0,
630
+ 0 1 0,
631
+ 0 0.707106781186548 0,
632
+ 0 1 0
633
+ ]
634
+ }
635
+ }
636
+ }
637
+ }`
638
+ },
639
+ {
640
+ componentInfo: { name: "NURBS" },
641
+ typeName: "NurbsRectangle2D",
642
+ x3dSyntax: `
643
+ DEF NurbsRectangle2D Transform {
644
+ children Shape {
645
+ appearance Appearance {
646
+ material Material { }
647
+ }
648
+ geometry NurbsPatchSurface {
649
+ solid FALSE
650
+ uOrder 2
651
+ vOrder 2
652
+ uDimension 2
653
+ vDimension 2
654
+ uKnot [
655
+ -1,
656
+ -1,
657
+ 1,
658
+ 1
659
+ ]
660
+ vKnot [
661
+ -1,
662
+ -1,
663
+ 1,
664
+ 1
665
+ ]
666
+ controlPoint CoordinateDouble {
667
+ point [
668
+ -1 -1 0,
669
+ 1 -1 0,
670
+ -1 1 0,
671
+ 1 1 0
672
+ ]
673
+ }
674
+ }
675
+ }
676
+ }`
677
+ },
678
+ {
679
+ componentInfo: { name: "NURBS" },
680
+ typeName: "NurbsSphere",
681
+ x3dSyntax: `
682
+ DEF NurbsSphere Transform {
683
+ children Shape {
684
+ appearance Appearance {
685
+ material Material { }
686
+ }
687
+ geometry NurbsPatchSurface {
688
+ uClosed TRUE
689
+ uDimension 9
690
+ vDimension 5
691
+ uKnot [
692
+ 0,
693
+ 0,
694
+ 0,
695
+ 0.25,
696
+ 0.25,
697
+ 0.5,
698
+ 0.5,
699
+ 0.75,
700
+ 0.75,
701
+ 1,
702
+ 1,
703
+ 1
704
+ ]
705
+ vKnot [
706
+ 0,
707
+ 0,
708
+ 0,
709
+ 0.5,
710
+ 0.5,
711
+ 1,
712
+ 1,
713
+ 1
714
+ ]
715
+ weight [
716
+ 1,
717
+ 0.707106781186548,
718
+ 1,
719
+ 0.707106781186548,
720
+ 1,
721
+ 0.707106781186548,
722
+ 1,
723
+ 0.707106781186548,
724
+ 1,
725
+ 0.707106781186548,
726
+ 0.5,
727
+ 0.707106781186548,
728
+ 0.5,
729
+ 0.707106781186548,
730
+ 0.5,
731
+ 0.707106781186548,
732
+ 0.5,
733
+ 0.707106781186548,
734
+ 1,
735
+ 0.707106781186548,
736
+ 1,
737
+ 0.707106781186548,
738
+ 1,
739
+ 0.707106781186548,
740
+ 1,
741
+ 0.707106781186548,
742
+ 1,
743
+ 0.707106781186548,
744
+ 0.5,
745
+ 0.707106781186548,
746
+ 0.5,
747
+ 0.707106781186548,
748
+ 0.5,
749
+ 0.707106781186548,
750
+ 0.5,
751
+ 0.707106781186548,
752
+ 1,
753
+ 0.707106781186548,
754
+ 1,
755
+ 0.707106781186548,
756
+ 1,
757
+ 0.707106781186548,
758
+ 1,
759
+ 0.707106781186548,
760
+ 1
761
+ ]
762
+ controlPoint CoordinateDouble {
763
+ point [
764
+ 0 -1 0,
765
+ 0 -0.707106781186548 0,
766
+ 0 -1 0,
767
+ 0 -0.707106781186548 0,
768
+ 0 -1 0,
769
+ 0 -0.707106781186548 0,
770
+ 0 -1 0,
771
+ 0 -0.707106781186548 0,
772
+ 0 -1 0,
773
+ 0 -0.707106781186548 -0.707106781186548,
774
+ -0.5 -0.5 -0.5,
775
+ -0.707106781186548 -0.707106781186548 0,
776
+ -0.5 -0.5 0.5,
777
+ 0 -0.707106781186548 0.707106781186548,
778
+ 0.5 -0.5 0.5,
779
+ 0.707106781186548 -0.707106781186548 0,
780
+ 0.5 -0.5 -0.5,
781
+ 0 -0.707106781186548 -0.707106781186548,
782
+ 0 0 -1,
783
+ -0.707106781186548 0 -0.707106781186548,
784
+ -1 0 0,
785
+ -0.707106781186548 0 0.707106781186548,
786
+ 0 0 1,
787
+ 0.707106781186548 0 0.707106781186548,
788
+ 1 0 0,
789
+ 0.707106781186548 0 -0.707106781186548,
790
+ 0 0 -1,
791
+ 0 0.707106781186548 -0.707106781186548,
792
+ -0.5 0.5 -0.5,
793
+ -0.707106781186548 0.707106781186548 0,
794
+ -0.5 0.5 0.5,
795
+ 0 0.707106781186548 0.707106781186548,
796
+ 0.5 0.5 0.5,
797
+ 0.707106781186548 0.707106781186548 0,
798
+ 0.5 0.5 -0.5,
799
+ 0 0.707106781186548 -0.707106781186548,
800
+ 0 1 0,
801
+ 0 0.707106781186548 0,
802
+ 0 1 0,
803
+ 0 0.707106781186548 0,
804
+ 0 1 0,
805
+ 0 0.707106781186548 0,
806
+ 0 1 0,
807
+ 0 0.707106781186548 0,
808
+ 0 1 0
809
+ ]
810
+ }
811
+ }
812
+ }
813
+ }`,
384
814
  },
385
815
  {
386
816
  componentInfo: { name: "Text" },
@@ -26,8 +26,9 @@ module .exports = class ToolColors
26
26
  static DARK_RED = new X3D .Color3 (0.5, 0.175, 0.175); //
27
27
  static DARK_ORANGE = new X3D .Color3 (0.5, 0.35, 0.175); // VolumeData
28
28
 
29
- static GREY = new X3D .Color3 (0.7, 0.7, 0.7); //
30
- static DARK_GREY = new X3D .Color3 (0.35, 0.35, 0.35); // StaticGroup
29
+ static LIGHT_GREY = new X3D .Color3 (0.90, 0.90, 0.90); // Hull
30
+ static GREY = new X3D .Color3 (0.7, 0.7, 0.7); //
31
+ static DARK_GREY = new X3D .Color3 (0.35, 0.35, 0.35); // StaticGroup
31
32
 
32
33
  static PROXIMITY_SENSOR = new X3D .Color3 (0.5, 0, 1);
33
34
  static TRANSFORM_SENSOR = new X3D .Color3 (0, 1, 0);
@@ -8,11 +8,6 @@ class X3DChildNodeTool extends X3DNodeTool
8
8
  {
9
9
  return true;
10
10
  }
11
-
12
- async initializeTool (... args)
13
- {
14
- await super .loadTool (... args);
15
- }
16
11
  }
17
12
 
18
13
  module .exports = X3DChildNodeTool;
@@ -30,10 +30,11 @@ class X3DNodeTool extends X3DBaseTool
30
30
  static #sensors = [ ]; // Always empty
31
31
 
32
32
  tool = null;
33
+ #tools = new Set ();
33
34
  #proxy = null;
34
35
  #selected = false;
35
- #promise = null;
36
- #innerNode = null;
36
+ #promise = new Map ();
37
+ #innerNodes = [ ];
37
38
  #externalNodes = new Map ();
38
39
  #groupedTools = new Set ();
39
40
  #initialValues = new Map ();
@@ -68,25 +69,28 @@ class X3DNodeTool extends X3DBaseTool
68
69
  {
69
70
  this .#selected = value;
70
71
 
71
- if (!this .tool)
72
- return;
72
+ for (const tool of this .#tools)
73
+ {
74
+ if (!this [tool])
75
+ continue;
73
76
 
74
- if (this .tool .hasOwnProperty ("selected"))
75
- this .tool .selected = value;
77
+ if (this [tool] .hasOwnProperty ("selected"))
78
+ this [tool] .selected = value;
79
+ }
76
80
  }
77
81
 
78
82
  // Tool Loading
79
83
 
80
- async getToolInstance ()
84
+ async getToolInstance (tool = "tool")
81
85
  {
82
- await this .#promise;
86
+ await this .#promise .get (tool);
83
87
 
84
- return this .tool;
88
+ return this [tool];
85
89
  }
86
90
 
87
- getToolScene ()
91
+ getToolScene (tool = "tool")
88
92
  {
89
- return this .tool .getValue () .getExecutionContext ();
93
+ return this [tool] .getValue () .getExecutionContext ();
90
94
  }
91
95
 
92
96
  addTool ()
@@ -109,15 +113,18 @@ class X3DNodeTool extends X3DBaseTool
109
113
  {
110
114
  await this .initializeTool ();
111
115
 
112
- // X3DLayerNodeTool and X3DPrototypeInstanceTool have no own tool.
116
+ for (const tool of this .#tools)
117
+ {
118
+ // X3DLayerNodeTool and X3DPrototypeInstanceTool have no own tool.
113
119
 
114
- if (!this .tool)
115
- return;
120
+ if (!this [tool])
121
+ continue;
116
122
 
117
- this .#innerNode = this .tool .getValue () .getInnerNode ();
123
+ this .#innerNodes .push (this [tool] .getValue () .getInnerNode ());
118
124
 
119
- if (this .tool .hasOwnProperty ("selected"))
120
- this .tool .selected = this .#selected;
125
+ if (this [tool] .hasOwnProperty ("selected"))
126
+ this [tool] .selected = this .#selected;
127
+ }
121
128
  }
122
129
  catch (error)
123
130
  {
@@ -125,9 +132,9 @@ class X3DNodeTool extends X3DBaseTool
125
132
  }
126
133
  }
127
134
 
128
- async initializeTool () { }
135
+ initializeTool () { }
129
136
 
130
- loadTool (... args)
137
+ loadTool (tool, ... args)
131
138
  {
132
139
  const
133
140
  filePath = path .resolve (... args),
@@ -135,9 +142,11 @@ class X3DNodeTool extends X3DBaseTool
135
142
  protoURL = url .pathToFileURL (filePath),
136
143
  promise = X3DNodeTool .#scenes .get (protoURL .href);
137
144
 
145
+ this .#tools .add (tool);
146
+
138
147
  if (promise)
139
148
  {
140
- this .#promise = promise;
149
+ this .#promise .set (tool, promise);
141
150
  }
142
151
  else
143
152
  {
@@ -163,22 +172,22 @@ class X3DNodeTool extends X3DBaseTool
163
172
 
164
173
  X3DNodeTool .#scenes .set (protoURL .href, promise);
165
174
 
166
- this .#promise = promise;
175
+ this .#promise .set (tool, promise);
167
176
  }
168
177
 
169
178
  if (this .#disposed)
170
179
  return Promise .reject (new Error ("Tool is already disposed."));
171
180
 
172
- this .#promise .then (scene => this .createTool (scene, protoName));
181
+ this .#promise .get (tool) .then (scene => this .createTool (tool, scene, protoName));
173
182
 
174
- return this .#promise;
183
+ return this .#promise .get (tool);
175
184
  }
176
185
 
177
- createTool (scene, protoName)
186
+ createTool (tool, scene, protoName)
178
187
  {
179
- this .tool = scene .createProto (protoName);
188
+ this [tool] = scene .createProto (protoName);
180
189
 
181
- this .tool .getValue () .setPrivate (true);
190
+ this [tool] .getValue () .setPrivate (true);
182
191
 
183
192
  X3DNodeTool .tools .add (this);
184
193
  X3DNodeTool .processToolInterests ();
@@ -207,7 +216,10 @@ class X3DNodeTool extends X3DBaseTool
207
216
 
208
217
  const nodesToDispose = [ ]
209
218
 
210
- Traverse .traverse (this .tool, Traverse .ROOT_NODES | Traverse .INLINE_SCENE | Traverse .PROTOTYPE_INSTANCES, node => nodesToDispose .push (node));
219
+ for (const tool of this .#tools)
220
+ {
221
+ Traverse .traverse (this [tool], Traverse .ROOT_NODES | Traverse .INLINE_SCENE | Traverse .PROTOTYPE_INSTANCES, node => nodesToDispose .push (node));
222
+ }
211
223
 
212
224
  for (const node of nodesToDispose .filter (node => !this .#externalNodes .has (node)))
213
225
  node .dispose ();
@@ -435,12 +447,19 @@ class X3DNodeTool extends X3DBaseTool
435
447
 
436
448
  // Traverse
437
449
 
450
+ #childBBox = new X3D .Box3 ();
451
+
438
452
  getToolBBox (bbox, shadows)
439
453
  {
454
+ bbox .set ();
455
+
440
456
  if (shadows)
441
- return bbox .set ();
457
+ return bbox;
458
+
459
+ for (const innerNode of this .#innerNodes)
460
+ bbox .add (innerNode .getBBox (this .#childBBox, shadows));
442
461
 
443
- return this .#innerNode ?.getBBox (bbox, shadows) ?? bbox .set ();
462
+ return bbox;
444
463
  }
445
464
 
446
465
  toolPointingEnabled = true;
@@ -463,7 +482,8 @@ class X3DNodeTool extends X3DBaseTool
463
482
  renderObject .getHumanoids () .push (null);
464
483
  renderObject .getSensors () .push (X3DNodeTool .#sensors);
465
484
 
466
- this .#innerNode ?.traverse (type, renderObject);
485
+ for (const innerNode of this .#innerNodes)
486
+ innerNode ?.traverse (type, renderObject);
467
487
 
468
488
  renderObject .getSensors () .pop ();
469
489
  renderObject .getHumanoids () .pop ();
@@ -10,7 +10,7 @@ class X3DEnvironmentalSensorNodeTool extends X3DChildNodeTool
10
10
 
11
11
  async initializeTool ()
12
12
  {
13
- await super .initializeTool (__dirname, "X3DEnvironmentalSensorNodeTool.x3d");
13
+ await super .loadTool ("tool", __dirname, "X3DEnvironmentalSensorNodeTool.x3d");
14
14
 
15
15
  this .tool .getField ("size") .addReference (this .node ._size);
16
16
  this .tool .getField ("center") .addReference (this .node ._center);
@@ -8,7 +8,7 @@ class X3DBoundedObjectTool extends X3DChildNodeTool
8
8
  {
9
9
  async initializeTool ()
10
10
  {
11
- await super .initializeTool (__dirname, "X3DBoundedObjectTool.x3d");
11
+ await super .loadTool ("tool", __dirname, "X3DBoundedObjectTool.x3d");
12
12
 
13
13
  this .getBrowser () .displayEvents () .addInterest ("reshapeTool", this);
14
14
 
@@ -14,7 +14,7 @@ class X3DTransformNodeTool extends X3DChildNodeTool
14
14
 
15
15
  async initializeTool ()
16
16
  {
17
- await super .initializeTool (__dirname, "X3DTransformNodeTool.x3d");
17
+ await super .loadTool ("tool", __dirname, "X3DTransformNodeTool.x3d");
18
18
 
19
19
  X3DTransformNodeTool .#transformTools .add (this);
20
20
 
@@ -10,8 +10,6 @@ class X3DActiveLayerNodeTool extends X3DChildNodeTool
10
10
  {
11
11
  const node = executionContext .createNode ("Group", false);
12
12
 
13
- node ._visible = false;
14
-
15
13
  node .setup ();
16
14
 
17
15
  super (node);
@@ -19,7 +17,7 @@ class X3DActiveLayerNodeTool extends X3DChildNodeTool
19
17
 
20
18
  async initializeTool (... args)
21
19
  {
22
- await super .initializeTool (... args);
20
+ await super .loadTool ("tool", ... args);
23
21
 
24
22
  this .getBrowser () ._activeLayer .addInterest ("set_activeLayer", this);
25
23
 
@@ -8,7 +8,7 @@ class X3DLightNodeTool extends X3DChildNodeTool
8
8
 
9
9
  async initializeTool ()
10
10
  {
11
- await super .initializeTool (__dirname, "X3DLightNodeTool.x3d");
11
+ await super .loadTool ("tool", __dirname, "X3DLightNodeTool.x3d");
12
12
 
13
13
  this .tool .getField ("on") .addReference (this .node ._on);
14
14
  this .tool .getField ("color") .addReference (this .node ._color);
@@ -1,7 +1,25 @@
1
1
  "use strict";
2
2
 
3
- const X3DLineGeometryNodeTool = require ("../Rendering/X3DLineGeometryNodeTool");
3
+ const
4
+ X3DParametricGeometryNodeTool = require ("./X3DParametricGeometryNodeTool"),
5
+ X3DLineGeometryNodeTool = require ("../Rendering/X3DLineGeometryNodeTool");
4
6
 
5
- class NurbsCurveTool extends X3DLineGeometryNodeTool { }
7
+ class NurbsCurveTool extends X3DParametricGeometryNodeTool (X3DLineGeometryNodeTool)
8
+ {
9
+ async initializeTool ()
10
+ {
11
+ await super .initializeTool ();
12
+
13
+ this .set_toolRebuildParametricGeometry ();
14
+ }
15
+
16
+ set_toolRebuildParametricGeometry ()
17
+ {
18
+ this .parametricGeometryNodeTool .uDimension = this .node ._controlPoint .getValue () ?._point .length ?? 0;
19
+ this .parametricGeometryNodeTool .vDimension = 1;
20
+
21
+ super .set_toolRebuildParametricGeometry ();
22
+ }
23
+ }
6
24
 
7
25
  module .exports = NurbsCurveTool;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
- const X3DGeometryNodeTool = require ("../Rendering/X3DGeometryNodeTool");
3
+ const X3DNurbsSurfaceGeometryNodeTool = require ("./X3DNurbsSurfaceGeometryNodeTool");
4
4
 
5
- class NurbsPatchSurfaceTool extends X3DGeometryNodeTool { }
5
+ class NurbsPatchSurfaceTool extends X3DNurbsSurfaceGeometryNodeTool { }
6
6
 
7
7
  module .exports = NurbsPatchSurfaceTool;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
- const X3DGeometryNodeTool = require ("../Rendering/X3DGeometryNodeTool");
3
+ const X3DNurbsSurfaceGeometryNodeTool = require ("./X3DNurbsSurfaceGeometryNodeTool");
4
4
 
5
- class NurbsTrimmedSurfaceTool extends X3DGeometryNodeTool { }
5
+ class NurbsTrimmedSurfaceTool extends X3DNurbsSurfaceGeometryNodeTool { }
6
6
 
7
7
  module .exports = NurbsTrimmedSurfaceTool;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ const
4
+ X3DGeometryNodeTool = require ("../Rendering/X3DGeometryNodeTool"),
5
+ X3DParametricGeometryNodeTool = require ("./X3DParametricGeometryNodeTool");;
6
+
7
+ class X3DNurbsSurfaceGeometryNodeTool extends X3DParametricGeometryNodeTool (X3DGeometryNodeTool)
8
+ {
9
+ async initializeTool ()
10
+ {
11
+ await super .initializeTool ();
12
+
13
+ this .parametricGeometryNodeTool .getField ("uDimension") .addReference (this .node ._uDimension);
14
+ this .parametricGeometryNodeTool .getField ("vDimension") .addReference (this .node ._vDimension);
15
+
16
+ this .set_toolRebuildParametricGeometry ();
17
+ }
18
+ }
19
+
20
+
21
+ module .exports = X3DNurbsSurfaceGeometryNodeTool;
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+
3
+ const ToolColors = require ("../Core/ToolColors");
4
+
5
+ const X3DParametricGeometryNodeTool = Base => class extends Base
6
+ {
7
+ async initializeTool ()
8
+ {
9
+ await Promise .all ([
10
+ super .initializeTool (),
11
+ super .loadTool ("parametricGeometryNodeTool", __dirname, "X3DParametricGeometryNodeTool.x3d"),
12
+ ]);
13
+
14
+ this .node ._rebuild .addInterest ("set_toolRebuildParametricGeometry", this);
15
+
16
+ this .parametricGeometryNodeTool .hullColor = ToolColors .LIGHT_GREY;
17
+ this .parametricGeometryNodeTool .controlPointColor = ToolColors .DARK_BLUE;
18
+
19
+ this .parametricGeometryNodeTool .getField ("controlPoint") .addReference (this .node ._controlPoint);
20
+
21
+ this .addExternalNode (this .node ._controlPoint);
22
+ }
23
+
24
+ disposeTool ()
25
+ {
26
+ this .node ._rebuild .removeInterest ("set_toolRebuildParametricGeometry", this);
27
+
28
+ super .disposeTool ();
29
+ }
30
+
31
+ set_toolRebuildParametricGeometry ()
32
+ {
33
+ const
34
+ uDimension = this .parametricGeometryNodeTool .uDimension,
35
+ vDimension = this .parametricGeometryNodeTool .vDimension,
36
+ hullIndex = [ ];
37
+
38
+ // Generate u connections.
39
+
40
+ if (uDimension > 1)
41
+ {
42
+ for (let v = 0; v < vDimension; ++ v)
43
+ {
44
+ for (let u = 0; u < uDimension; ++ u)
45
+ hullIndex .push (v * uDimension + u);
46
+
47
+ hullIndex .push (-1);
48
+ }
49
+ }
50
+
51
+ // Generate v connections.
52
+
53
+ if (vDimension > 1)
54
+ {
55
+ for (let u = 0; u < uDimension; ++ u)
56
+ {
57
+ for (let v = 0; v < vDimension; ++ v)
58
+ hullIndex .push (v * uDimension + u);
59
+
60
+ hullIndex .push (-1);
61
+ }
62
+ }
63
+
64
+ this .parametricGeometryNodeTool .set_hullIndex = hullIndex;
65
+ }
66
+ };
67
+
68
+ module .exports = X3DParametricGeometryNodeTool;
@@ -0,0 +1,92 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "http://www.web3d.org/specifications/x3d-4.0.dtd">
3
+ <X3D profile='Interchange' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
4
+ <head>
5
+ <component name='Scripting' level='1'/>
6
+ <component name='X_ITE' level='1'/>
7
+ <meta name='created' content='Tue, 28 Nov 2023 21:59:27 GMT'/>
8
+ <meta name='comment' content='Rise and Shine'/>
9
+ <meta name='creator' content='Holger Seelig'/>
10
+ <meta name='generator' content='Sunrize X3D Editor V1.7.17, https://create3000.github.io/sunrize/'/>
11
+ <meta name='modified' content='Sun, 08 Sep 2024 13:04:14 GMT'/>
12
+ </head>
13
+ <Scene>
14
+ <ExternProtoDeclare name='ToolShader' url='"../Shaders/ToolShader.x3d"'>
15
+ <field accessType='inputOutput' type='SFBool' name='instanced'/>
16
+ </ExternProtoDeclare>
17
+ <ProtoDeclare name='X3DParametricGeometryNodeTool'>
18
+ <ProtoInterface>
19
+ <field accessType='inputOutput' type='SFBool' name='selected'/>
20
+ <field accessType='inputOutput' type='SFString' name='group' value='NONE'/>
21
+ <field accessType='inputOutput' type='SFBool' name='undo'/>
22
+ <field accessType='inputOutput' type='SFInt32' name='uDimension'/>
23
+ <field accessType='inputOutput' type='SFInt32' name='vDimension'/>
24
+ <field accessType='inputOnly' type='MFInt32' name='set_hullIndex'/>
25
+ <field accessType='inputOutput' type='SFColor' name='hullColor' value='1 1 1'/>
26
+ <field accessType='inputOutput' type='SFColor' name='controlPointColor' value='1 1 1'/>
27
+ <field accessType='inputOutput' type='SFNode' name='controlPoint'/>
28
+ </ProtoInterface>
29
+ <ProtoBody>
30
+ <Group>
31
+ <Shape DEF='Hull'>
32
+ <Appearance>
33
+ <LineProperties
34
+ linetype='3'
35
+ linewidthScaleFactor='2'/>
36
+ <UnlitMaterial>
37
+ <IS>
38
+ <connect nodeField='emissiveColor' protoField='hullColor'/>
39
+ </IS>
40
+ </UnlitMaterial>
41
+ <DepthMode DEF='_4'
42
+ depthRange='0 0'/>
43
+ </Appearance>
44
+ <IndexedLineSet DEF='_3'>
45
+ <IS>
46
+ <connect nodeField='set_coordIndex' protoField='set_hullIndex'/>
47
+ <connect nodeField='coord' protoField='controlPoint'/>
48
+ </IS>
49
+ </IndexedLineSet>
50
+ </Shape>
51
+ <Shape DEF='ControlPoints'>
52
+ <Appearance>
53
+ <PointProperties
54
+ pointSizeScaleFactor='5'
55
+ pointSizeMinValue='5'
56
+ pointSizeMaxValue='5'/>
57
+ <Material
58
+ diffuseColor='0 0 0'>
59
+ <IS>
60
+ <connect nodeField='emissiveColor' protoField='controlPointColor'/>
61
+ </IS>
62
+ </Material>
63
+ <ProtoInstance name='ToolShader' containerField='shaders'/>
64
+ <DepthMode USE='_4'/>
65
+ </Appearance>
66
+ <PointSet DEF='_2'>
67
+ <IS>
68
+ <connect nodeField='coord' protoField='controlPoint'/>
69
+ </IS>
70
+ </PointSet>
71
+ </Shape>
72
+ </Group>
73
+ <Script DEF='CloneCountScript'>
74
+ <field accessType='initializeOnly' type='SFNode' name='points'>
75
+ <PointSet USE='_2'/>
76
+ </field>
77
+ <field accessType='initializeOnly' type='SFNode' name='lines'>
78
+ <IndexedLineSet USE='_3'/>
79
+ </field>
80
+ <![CDATA[ecmascript:
81
+
82
+ function initialize ()
83
+ {
84
+ points .getValue () .setPrivate (true);
85
+ lines .getValue () .setPrivate (true);
86
+ }
87
+ ]]>
88
+ </Script>
89
+ </ProtoBody>
90
+ </ProtoDeclare>
91
+ </Scene>
92
+ </X3D>
@@ -10,7 +10,7 @@ class X3DViewpointNodeTool extends X3DChildNodeTool
10
10
 
11
11
  async initializeTool ()
12
12
  {
13
- await super .initializeTool (__dirname, "X3DViewpointNodeTool.x3d");
13
+ await super .loadTool ("tool", __dirname, "X3DViewpointNodeTool.x3d");
14
14
 
15
15
  this .tool .getField ("isActive") .addInterest ("handleUndo", this);
16
16
 
@@ -8,38 +8,38 @@ class X3DGeometryNodeTool extends X3DNodeTool
8
8
  {
9
9
  async initializeTool (type)
10
10
  {
11
- await super .loadTool (__dirname, "X3DGeometryNodeTool.x3d");
11
+ await super .loadTool ("tool", __dirname, "X3DGeometryNodeTool.x3d");
12
12
 
13
13
  this .tool .linesColor = ToolColors .BLUE;
14
14
 
15
15
  if (type === "CUSTOM")
16
16
  return;
17
17
 
18
- this .node ._rebuild .addInterest ("set_toolGeometry", this);
18
+ this .node ._rebuild .addInterest ("set_toolRebuildGeometry", this);
19
19
 
20
20
  this .tool .linesCoord = this .getToolScene () .createNode ("CoordinateDouble");
21
21
 
22
- this .set_toolGeometry ();
22
+ this .set_toolRebuildGeometry ();
23
23
  }
24
24
 
25
25
  disposeTool ()
26
26
  {
27
- this .node ._rebuild .removeInterest ("set_toolGeometry", this);
27
+ this .node ._rebuild .removeInterest ("set_toolRebuildGeometry", this);
28
28
 
29
29
  super .disposeTool ();
30
30
  }
31
31
 
32
- set_toolGeometry ()
32
+ set_toolRebuildGeometry ()
33
33
  {
34
34
  const
35
- points = this .node .getVertices () .filter ((_, i) => i % 4 !== 3),
36
- length = points .length / 3;
35
+ points = this .node .getVertices () .filter ((_, i) => i % 4 < 3),
36
+ numPoints = points .length / 3;
37
37
 
38
- if (length !== this .tool .linesCoord .point .length)
38
+ if (numPoints !== this .tool .linesCoord .point .length)
39
39
  {
40
40
  const coordIndex = [ ];
41
41
 
42
- for (let i = 0; i < length; i += 3)
42
+ for (let i = 0; i < numPoints; i += 3)
43
43
  coordIndex .push (i, i + 1, i + 2, i, -1);
44
44
 
45
45
  this .tool .set_linesCoordIndex = coordIndex;
@@ -8,30 +8,30 @@ class X3DLineGeometryNodeTool extends X3DGeometryNodeTool
8
8
  {
9
9
  async initializeTool (type)
10
10
  {
11
- await super .loadTool (__dirname, "X3DLineGeometryNodeTool.x3d");
11
+ await super .loadTool ("tool", __dirname, "X3DLineGeometryNodeTool.x3d");
12
12
 
13
13
  this .tool .pointsColor = ToolColors .BLUE;
14
14
 
15
15
  if (type === "CUSTOM")
16
16
  return;
17
17
 
18
- this .node ._rebuild .addInterest ("set_toolGeometry", this);
18
+ this .node ._rebuild .addInterest ("set_toolRebuildGeometry", this);
19
19
 
20
20
  this .tool .pointsCoord = this .getToolScene () .createNode ("CoordinateDouble");
21
21
 
22
- this .set_toolGeometry ();
22
+ this .set_toolRebuildGeometry ();
23
23
  }
24
24
 
25
25
  disposeTool ()
26
26
  {
27
- this .node ._rebuild .removeInterest ("set_toolGeometry", this);
27
+ this .node ._rebuild .removeInterest ("set_toolRebuildGeometry", this);
28
28
 
29
29
  super .disposeTool ();
30
30
  }
31
31
 
32
- set_toolGeometry ()
32
+ set_toolRebuildGeometry ()
33
33
  {
34
- const points = this .node .getVertices () .filter ((_, i) => i % 4 !== 3);
34
+ const points = this .node .getVertices () .filter ((_, i) => i % 4 < 3);
35
35
 
36
36
  this .tool .pointsCoord .point = points;
37
37
  }
@@ -8,30 +8,30 @@ class X3DPointGeometryNodeTool extends X3DGeometryNodeTool
8
8
  {
9
9
  async initializeTool (type)
10
10
  {
11
- await super .loadTool (__dirname, "X3DPointGeometryNodeTool.x3d");
11
+ await super .loadTool ("tool", __dirname, "X3DPointGeometryNodeTool.x3d");
12
12
 
13
13
  this .tool .pointsColor = ToolColors .BLUE;
14
14
 
15
15
  if (type === "CUSTOM")
16
16
  return;
17
17
 
18
- this .node ._rebuild .addInterest ("set_toolGeometry", this);
18
+ this .node ._rebuild .addInterest ("set_toolRebuildGeometry", this);
19
19
 
20
20
  this .tool .pointsCoord = this .getToolScene () .createNode ("CoordinateDouble");
21
21
 
22
- this .set_toolGeometry ();
22
+ this .set_toolRebuildGeometry ();
23
23
  }
24
24
 
25
25
  disposeTool ()
26
26
  {
27
- this .node ._rebuild .removeInterest ("set_toolGeometry", this);
27
+ this .node ._rebuild .removeInterest ("set_toolRebuildGeometry", this);
28
28
 
29
29
  super .disposeTool ();
30
30
  }
31
31
 
32
- set_toolGeometry ()
32
+ set_toolRebuildGeometry ()
33
33
  {
34
- const points = this .node .getVertices () .filter ((_, i) => i % 4 !== 3);
34
+ const points = this .node .getVertices () .filter ((_, i) => i % 4 < 3);
35
35
 
36
36
  this .tool .pointsCoord .point = points;
37
37
  }
@@ -8,7 +8,7 @@ class ListenerPointSourceTool extends X3DChildNodeTool
8
8
 
9
9
  async initializeTool ()
10
10
  {
11
- await super .initializeTool (__dirname, "ListenerPointSourceTool.x3d");
11
+ await super .loadTool ("tool", __dirname, "ListenerPointSourceTool.x3d");
12
12
 
13
13
  this .tool .getField ("position") .addReference (this .node ._position);
14
14
  this .tool .getField ("orientation") .addReference (this .node ._orientation);
@@ -10,7 +10,7 @@ class SoundTool extends X3DChildNodeTool
10
10
 
11
11
  async initializeTool ()
12
12
  {
13
- await super .initializeTool (__dirname, "SoundTool.x3d");
13
+ await super .loadTool ("tool", __dirname, "SoundTool.x3d");
14
14
 
15
15
  this .tool .getField ("location") .addReference (this .node ._location);
16
16
  this .tool .getField ("direction") .addReference (this .node ._direction);
@@ -8,7 +8,7 @@ class SpatialSoundTool extends X3DChildNodeTool
8
8
 
9
9
  async initializeTool ()
10
10
  {
11
- await super .initializeTool (__dirname, "SpatialSoundTool.x3d");
11
+ await super .loadTool ("tool", __dirname, "SpatialSoundTool.x3d");
12
12
 
13
13
  this .tool .getField ("location") .addReference (this .node ._location);
14
14
  this .tool .getField ("direction") .addReference (this .node ._direction);
@@ -8,7 +8,7 @@ class X3DTextureProjectorNodeTool extends X3DChildNodeTool
8
8
 
9
9
  async initializeTool ()
10
10
  {
11
- await super .initializeTool (__dirname, "X3DTextureProjectorNodeTool.x3d");
11
+ await super .loadTool ("tool", __dirname, "X3DTextureProjectorNodeTool.x3d");
12
12
 
13
13
  this .tool .getField ("on") .addReference (this .node ._on);
14
14
  this .tool .getField ("location") .addReference (this .node ._location);
@@ -220,8 +220,8 @@
220
220
 
221
221
  async function initialize ()
222
222
  {
223
- this .getValue () .collectCloneCount = () => 0;
224
- textureAppearance .getValue () .collectCloneCount = () => 0;
223
+ this .getValue () .setPrivate (true);
224
+ textureAppearance .getValue () .setPrivate (true);
225
225
 
226
226
  const tool = await transform .getValue () .addTool () .getToolInstance ();
227
227
 
@@ -2700,6 +2700,8 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
2700
2700
  return new X3D .Box3 (X3D .Vector3 .One, innerNode ._position .getValue ())
2701
2701
  .multLeft (new X3D .Matrix4 () .setRotation (innerNode ._orientation .getValue ()))
2702
2702
  .multRight (modelMatrix);
2703
+ case X3D .X3DConstants .X3DLayerNode:
2704
+ return innerNode .getBBox (new X3D .Box3 ());
2703
2705
  default:
2704
2706
  continue;
2705
2707
  }
@@ -3335,6 +3337,7 @@ ${scene .toXMLString ({ html: true, indent: " " .repeat (6) }) .trimEnd () }
3335
3337
  break;
3336
3338
  }
3337
3339
  case X3D .X3DConstants .Coordinate:
3340
+ case X3D .X3DConstants .CoordinateDouble:
3338
3341
  {
3339
3342
  const point = node ._point
3340
3343
  .map (p => this .roundToIntegerIfAlmostEqual (modelMatrix .multVecMatrix (p .getValue () .copy ())));