x_ite 8.7.3 → 8.7.5

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 (112) hide show
  1. package/.vscode/tasks.json +1 -1
  2. package/build/bin/bump.pl +2 -0
  3. package/dist/assets/components/Annotation.js +13 -13
  4. package/dist/assets/components/Annotation.min.js +1 -1
  5. package/dist/assets/components/CADGeometry.js +13 -13
  6. package/dist/assets/components/CADGeometry.min.js +1 -1
  7. package/dist/assets/components/CubeMapTexturing.js +25 -25
  8. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  9. package/dist/assets/components/DIS.js +13 -13
  10. package/dist/assets/components/DIS.min.js +1 -1
  11. package/dist/assets/components/EventUtilities.js +9 -9
  12. package/dist/assets/components/EventUtilities.min.js +1 -1
  13. package/dist/assets/components/Geometry2D.js +19 -19
  14. package/dist/assets/components/Geometry2D.min.js +1 -1
  15. package/dist/assets/components/Geospatial.js +33 -33
  16. package/dist/assets/components/Geospatial.min.js +1 -1
  17. package/dist/assets/components/HAnim.js +18 -18
  18. package/dist/assets/components/HAnim.min.js +1 -1
  19. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  20. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  21. package/dist/assets/components/Layout.js +36 -31
  22. package/dist/assets/components/Layout.min.js +1 -1
  23. package/dist/assets/components/NURBS.js +24 -24
  24. package/dist/assets/components/NURBS.min.js +1 -1
  25. package/dist/assets/components/ParticleSystems.js +22 -22
  26. package/dist/assets/components/ParticleSystems.min.js +1 -1
  27. package/dist/assets/components/Picking.js +20 -20
  28. package/dist/assets/components/Picking.min.js +1 -1
  29. package/dist/assets/components/RigidBodyPhysics.js +18 -18
  30. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  31. package/dist/assets/components/Scripting.js +28 -28
  32. package/dist/assets/components/Scripting.min.js +1 -1
  33. package/dist/assets/components/Text.js +24 -24
  34. package/dist/assets/components/Text.min.js +1 -1
  35. package/dist/assets/components/TextureProjector.js +14 -14
  36. package/dist/assets/components/TextureProjector.min.js +1 -1
  37. package/dist/assets/components/Texturing3D.js +31 -31
  38. package/dist/assets/components/Texturing3D.min.js +1 -1
  39. package/dist/assets/components/VolumeRendering.js +19 -19
  40. package/dist/assets/components/VolumeRendering.min.js +1 -1
  41. package/dist/assets/components/X_ITE.js +9 -9
  42. package/dist/assets/components/X_ITE.min.js +1 -1
  43. package/dist/x_ite.css +1 -1
  44. package/dist/x_ite.js +1297 -1436
  45. package/dist/x_ite.min.js +1 -1
  46. package/dist/x_ite.zip +0 -0
  47. package/docs/_config.yml +1 -1
  48. package/docs/_posts/reference/field-services-and-objects.md +27 -7
  49. package/package.json +2 -2
  50. package/src/standard/Math/Algorithms/eigen_decomposition.js +9 -9
  51. package/src/standard/Math/Geometry/Box2.js +20 -20
  52. package/src/standard/Math/Geometry/Box3.js +20 -20
  53. package/src/standard/Math/Numbers/Color3.js +10 -18
  54. package/src/standard/Math/Numbers/Color4.js +12 -23
  55. package/src/standard/Math/Numbers/Complex.js +59 -54
  56. package/src/standard/Math/Numbers/Matrix2.js +31 -45
  57. package/src/standard/Math/Numbers/Matrix3.js +59 -94
  58. package/src/standard/Math/Numbers/Matrix4.js +73 -114
  59. package/src/standard/Math/Numbers/Quaternion.js +49 -65
  60. package/src/standard/Math/Numbers/Rotation4.js +15 -13
  61. package/src/standard/Math/Numbers/Vector2.js +12 -14
  62. package/src/standard/Math/Numbers/Vector3.js +17 -22
  63. package/src/standard/Math/Numbers/Vector4.js +22 -30
  64. package/src/x_ite/Base/FieldArray.js +3 -2
  65. package/src/x_ite/Base/FieldDefinitionArray.js +3 -2
  66. package/src/x_ite/Base/X3DArrayField.js +27 -3
  67. package/src/x_ite/Base/X3DInfoArray.js +73 -14
  68. package/src/x_ite/Base/X3DObject.js +5 -0
  69. package/src/x_ite/Browser/Core/X3DCoreContext.js +3 -3
  70. package/src/x_ite/Browser/Layout/ScreenText.js +9 -4
  71. package/src/x_ite/Browser/VERSION.js +1 -1
  72. package/src/x_ite/Browser/X3DBrowser.js +60 -67
  73. package/src/x_ite/Browser/X3DBrowserContext.js +8 -8
  74. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +4 -4
  75. package/src/x_ite/Components/Layering/X3DLayerNode.js +1 -1
  76. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +2 -3
  77. package/src/x_ite/Components/Picking/X3DPickSensorNode.js +2 -2
  78. package/src/x_ite/Configuration/ComponentInfoArray.js +2 -2
  79. package/src/x_ite/Configuration/ProfileInfoArray.js +2 -2
  80. package/src/x_ite/Configuration/UnitInfoArray.js +15 -1
  81. package/src/x_ite/Execution/BindableList.js +1 -1
  82. package/src/x_ite/Execution/ExportedNodesArray.js +4 -3
  83. package/src/x_ite/Execution/ImportedNodesArray.js +4 -3
  84. package/src/x_ite/Execution/NamedNodesArray.js +16 -2
  85. package/src/x_ite/Execution/X3DExecutionContext.js +52 -58
  86. package/src/x_ite/Execution/X3DExportedNode.js +13 -11
  87. package/src/x_ite/Execution/X3DImportedNode.js +25 -25
  88. package/src/x_ite/Execution/X3DScene.js +130 -54
  89. package/src/x_ite/Fields/SFColor.js +10 -15
  90. package/src/x_ite/Fields/SFColorRGBA.js +11 -18
  91. package/src/x_ite/Fields/SFImage.js +38 -33
  92. package/src/x_ite/Fields/SFMatrix3.js +1 -3
  93. package/src/x_ite/Fields/SFMatrix4.js +1 -5
  94. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +6 -5
  95. package/src/x_ite/Fields/SFNode.js +1 -1
  96. package/src/x_ite/Fields/SFRotation.js +14 -21
  97. package/src/x_ite/Fields/SFString.js +0 -1
  98. package/src/x_ite/Fields/SFVec2.js +8 -15
  99. package/src/x_ite/Fields/SFVec3.js +10 -17
  100. package/src/x_ite/Fields/SFVec4.js +12 -23
  101. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +15 -14
  102. package/src/x_ite/InputOutput/FileLoader.js +2 -2
  103. package/src/x_ite/Parser/SVGParser.js +2 -2
  104. package/src/x_ite/Parser/X3DOptimizer.js +1 -1
  105. package/src/x_ite/Parser/XMLParser.js +18 -18
  106. package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +3 -2
  107. package/src/x_ite/Prototype/ProtoDeclarationArray.js +4 -3
  108. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +26 -27
  109. package/src/x_ite/Prototype/X3DProtoDeclaration.js +16 -15
  110. package/src/x_ite/Routing/RouteArray.js +3 -2
  111. package/src/x_ite/Routing/X3DRoute.js +26 -25
  112. package/src/x_ite/Execution/Scene.js +0 -145
@@ -66,13 +66,9 @@ function Matrix3 ()
66
66
  Matrix3 .prototype =
67
67
  {
68
68
  constructor: Matrix3,
69
- order: 3,
70
- length: 9,
71
69
  [Symbol .iterator]: function* ()
72
70
  {
73
- const length = this .length;
74
-
75
- for (let i = 0; i < length; ++ i)
71
+ for (let i = 0; i < 9; ++ i)
76
72
  yield this [i];
77
73
  },
78
74
  copy: function ()
@@ -105,7 +101,7 @@ Matrix3 .prototype =
105
101
  },
106
102
  rotation: function ()
107
103
  {
108
- return math .atan2 (this [1], this [0]);
104
+ return Math .atan2 (this [1], this [0]);
109
105
  },
110
106
  set1: function (r, c, value)
111
107
  {
@@ -578,93 +574,78 @@ Matrix3 .prototype =
578
574
  },
579
575
  };
580
576
 
581
- Object .defineProperty (Matrix3 .prototype, "x",
577
+ Object .defineProperties (Matrix3 .prototype,
582
578
  {
583
- get: (function ()
579
+ order: { value: 3 },
580
+ length: { value: 9 },
581
+ x:
584
582
  {
585
- const vector = new Vector3 (0, 0, 0);
586
-
587
- return function () { return vector .set (this [0], this [1], this [2]); };
588
- })(),
589
- enumerable: false,
590
- configurable: false
591
- });
583
+ get: (function ()
584
+ {
585
+ const vector = new Vector3 (0, 0, 0);
592
586
 
593
- Object .defineProperty (Matrix3 .prototype, "y",
594
- {
595
- get: (function ()
587
+ return function () { return vector .set (this [0], this [1], this [2]); };
588
+ })(),
589
+ },
590
+ y:
596
591
  {
597
- const vector = new Vector3 (0, 0, 0);
598
-
599
- return function () { return vector .set (this [3], this [4], this [5]); };
600
- })(),
601
- enumerable: false,
602
- configurable: false
603
- });
592
+ get: (function ()
593
+ {
594
+ const vector = new Vector3 (0, 0, 0);
604
595
 
605
- Object .defineProperty (Matrix3 .prototype, "z",
606
- {
607
- get: (function ()
596
+ return function () { return vector .set (this [3], this [4], this [5]); };
597
+ })(),
598
+ },
599
+ z:
608
600
  {
609
- const vector = new Vector3 (0, 0, 0);
610
-
611
- return function () { return vector .set (this [6], this [7], this [8]); };
612
- })(),
613
- enumerable: false,
614
- configurable: false
615
- });
601
+ get: (function ()
602
+ {
603
+ const vector = new Vector3 (0, 0, 0);
616
604
 
617
- Object .defineProperty (Matrix3 .prototype, "xAxis",
618
- {
619
- get: (function ()
605
+ return function () { return vector .set (this [6], this [7], this [8]); };
606
+ })(),
607
+ },
608
+ xAxis:
620
609
  {
621
- const vector = new Vector2 (0, 0);
622
-
623
- return function () { return vector .set (this [0], this [1]); };
624
- })(),
625
- enumerable: false,
626
- configurable: false
627
- });
610
+ get: (function ()
611
+ {
612
+ const vector = new Vector2 (0, 0);
628
613
 
629
- Object .defineProperty (Matrix3 .prototype, "yAxis",
630
- {
631
- get: (function ()
614
+ return function () { return vector .set (this [0], this [1]); };
615
+ })(),
616
+ },
617
+ yAxis:
632
618
  {
633
- const vector = new Vector2 (0, 0);
634
-
635
- return function () { return vector .set (this [3], this [4]); };
636
- })(),
637
- enumerable: false,
638
- configurable: false
639
- });
619
+ get: (function ()
620
+ {
621
+ const vector = new Vector2 (0, 0);
640
622
 
641
- Object .defineProperty (Matrix3 .prototype, "origin",
642
- {
643
- get: (function ()
623
+ return function () { return vector .set (this [3], this [4]); };
624
+ })(),
625
+ },
626
+ origin:
644
627
  {
645
- const vector = new Vector2 (0, 0);
646
-
647
- return function () { return vector .set (this [6], this [7]); };
648
- })(),
649
- enumerable: false,
650
- configurable: false
651
- });
628
+ get: (function ()
629
+ {
630
+ const vector = new Vector2 (0, 0);
652
631
 
653
- Object .defineProperty (Matrix3 .prototype, "submatrix",
654
- {
655
- get: (function ()
632
+ return function () { return vector .set (this [6], this [7]); };
633
+ })(),
634
+ },
635
+ submatrix:
656
636
  {
657
- const matrix = new Matrix2 ();
658
-
659
- return function ()
637
+ get: (function ()
660
638
  {
661
- matrix [0] = this [0]; matrix [1] = this [1];
662
- matrix [2] = this [3]; matrix [3] = this [4];
663
- return matrix;
664
- };
665
- })(),
666
- enumerable: false,
667
- configurable: false
639
+ const matrix = new Matrix2 ();
640
+
641
+ return function ()
642
+ {
643
+ matrix [0] = this [0]; matrix [1] = this [1];
644
+ matrix [2] = this [3]; matrix [3] = this [4];
645
+ return matrix;
646
+ };
647
+ })(),
648
+ },
668
649
  });
669
650
 
670
651
  Object .assign (Matrix3,
@@ -686,22 +667,6 @@ Object .assign (Matrix3,
686
667
  matrix [2], matrix [3], 0,
687
668
  0, 0, 1);
688
669
  },
689
- transpose: function (matrix)
690
- {
691
- return matrix .copy () .transpose ();
692
- },
693
- inverse: function (matrix)
694
- {
695
- return matrix .copy () .inverse ();
696
- },
697
- multLeft: function (lhs, rhs)
698
- {
699
- return lhs .copy () .multLeft (rhs);
700
- },
701
- multRight: function (lhs, rhs)
702
- {
703
- return lhs .copy () .multRight (rhs);
704
- },
705
670
  });
706
671
 
707
672
  const m = new Matrix3 ();
@@ -68,13 +68,9 @@ function Matrix4 ()
68
68
  Matrix4 .prototype =
69
69
  {
70
70
  constructor: Matrix4,
71
- order: 4,
72
- length: 16,
73
71
  [Symbol .iterator]: function* ()
74
72
  {
75
- const length = this .length;
76
-
77
- for (let i = 0; i < length; ++ i)
73
+ for (let i = 0; i < 16; ++ i)
78
74
  yield this [i];
79
75
  },
80
76
  copy: function ()
@@ -672,118 +668,97 @@ Matrix4 .prototype =
672
668
  },
673
669
  };
674
670
 
675
- Object .defineProperty (Matrix4 .prototype, "x",
671
+ Object .defineProperties (Matrix4 .prototype,
676
672
  {
677
- get: (function ()
673
+ order: { value: 4 },
674
+ length: { value: 16 },
675
+ x:
678
676
  {
679
- const vector = new Vector4 (0, 0, 0, 0);
680
-
681
- return function () { return vector .set (this [0], this [1], this [2], this [3]); };
682
- })(),
683
- enumerable: false,
684
- configurable: false
685
- });
677
+ get: (function ()
678
+ {
679
+ const vector = new Vector4 (0, 0, 0, 0);
686
680
 
687
- Object .defineProperty (Matrix4 .prototype, "y",
688
- {
689
- get: (function ()
681
+ return function () { return vector .set (this [0], this [1], this [2], this [3]); };
682
+ })(),
683
+ },
684
+ y:
690
685
  {
691
- const vector = new Vector4 (0, 0, 0, 0);
692
-
693
- return function () { return vector .set (this [4], this [5], this [6], this [7]); };
694
- })(),
695
- enumerable: false,
696
- configurable: false
697
- });
686
+ get: (function ()
687
+ {
688
+ const vector = new Vector4 (0, 0, 0, 0);
698
689
 
699
- Object .defineProperty (Matrix4 .prototype, "z",
700
- {
701
- get: (function ()
690
+ return function () { return vector .set (this [4], this [5], this [6], this [7]); };
691
+ })(),
692
+ },
693
+ z:
702
694
  {
703
- const vector = new Vector4 (0, 0, 0, 0);
704
-
705
- return function () { return vector .set (this [8], this [9], this [10], this [11]); };
706
- })(),
707
- enumerable: false,
708
- configurable: false
709
- });
695
+ get: (function ()
696
+ {
697
+ const vector = new Vector4 (0, 0, 0, 0);
710
698
 
711
- Object .defineProperty (Matrix4 .prototype, "w",
712
- {
713
- get: (function ()
699
+ return function () { return vector .set (this [8], this [9], this [10], this [11]); };
700
+ })(),
701
+ },
702
+ w:
714
703
  {
715
- const vector = new Vector4 (0, 0, 0, 0);
716
-
717
- return function () { return vector .set (this [12], this [13], this [14], this [15]); };
718
- })(),
719
- enumerable: false,
720
- configurable: false
721
- });
704
+ get: (function ()
705
+ {
706
+ const vector = new Vector4 (0, 0, 0, 0);
722
707
 
723
- Object .defineProperty (Matrix4 .prototype, "xAxis",
724
- {
725
- get: (function ()
708
+ return function () { return vector .set (this [12], this [13], this [14], this [15]); };
709
+ })(),
710
+ },
711
+ xAxis:
726
712
  {
727
- const vector = new Vector3 (0, 0, 0);
728
-
729
- return function () { return vector .set (this [0], this [1], this [2]); };
730
- })(),
731
- enumerable: false,
732
- configurable: false
733
- });
713
+ get: (function ()
714
+ {
715
+ const vector = new Vector3 (0, 0, 0);
734
716
 
735
- Object .defineProperty (Matrix4 .prototype, "yAxis",
736
- {
737
- get: (function ()
717
+ return function () { return vector .set (this [0], this [1], this [2]); };
718
+ })(),
719
+ },
720
+ yAxis:
738
721
  {
739
- const vector = new Vector3 (0, 0, 0);
740
-
741
- return function () { return vector .set (this [4], this [5], this [6]); };
742
- })(),
743
- enumerable: false,
744
- configurable: false
745
- });
722
+ get: (function ()
723
+ {
724
+ const vector = new Vector3 (0, 0, 0);
746
725
 
747
- Object .defineProperty (Matrix4 .prototype, "zAxis",
748
- {
749
- get: (function ()
726
+ return function () { return vector .set (this [4], this [5], this [6]); };
727
+ })(),
728
+ },
729
+ zAxis:
750
730
  {
751
- const vector = new Vector3 (0, 0, 0);
752
-
753
- return function () { return vector .set (this [8], this [9], this [10]); };
754
- })(),
755
- enumerable: false,
756
- configurable: false
757
- });
731
+ get: (function ()
732
+ {
733
+ const vector = new Vector3 (0, 0, 0);
758
734
 
759
- Object .defineProperty (Matrix4 .prototype, "origin",
760
- {
761
- get: (function ()
735
+ return function () { return vector .set (this [8], this [9], this [10]); };
736
+ })(),
737
+ },
738
+ origin:
762
739
  {
763
- const vector = new Vector3 (0, 0, 0);
764
-
765
- return function () { return vector .set (this [12], this [13], this [14]); };
766
- })(),
767
- enumerable: false,
768
- configurable: false
769
- });
740
+ get: (function ()
741
+ {
742
+ const vector = new Vector3 (0, 0, 0);
770
743
 
771
- Object .defineProperty (Matrix4 .prototype, "submatrix",
772
- {
773
- get: (function ()
744
+ return function () { return vector .set (this [12], this [13], this [14]); };
745
+ })(),
746
+ },
747
+ submatrix:
774
748
  {
775
- const matrix = new Matrix3 ();
776
-
777
- return function ()
749
+ get: (function ()
778
750
  {
779
- matrix [0] = this [0]; matrix [1] = this [1]; matrix [2] = this [ 2];
780
- matrix [3] = this [4]; matrix [4] = this [5]; matrix [5] = this [ 6];
781
- matrix [6] = this [8]; matrix [7] = this [9]; matrix [8] = this [10];
782
- return matrix;
783
- };
784
- })(),
785
- enumerable: false,
786
- configurable: false
751
+ const matrix = new Matrix3 ();
752
+
753
+ return function ()
754
+ {
755
+ matrix [0] = this [0]; matrix [1] = this [1]; matrix [2] = this [ 2];
756
+ matrix [3] = this [4]; matrix [4] = this [5]; matrix [5] = this [ 6];
757
+ matrix [6] = this [8]; matrix [7] = this [9]; matrix [8] = this [10];
758
+ return matrix;
759
+ };
760
+ })(),
761
+ },
787
762
  });
788
763
 
789
764
  Object .assign (Matrix4,
@@ -811,22 +786,6 @@ Object .assign (Matrix4,
811
786
  matrix [6], matrix [7], matrix [8], 0,
812
787
  0, 0, 0, 1);
813
788
  },
814
- transpose: function (matrix)
815
- {
816
- return matrix .copy () .transpose ();
817
- },
818
- inverse: function (matrix)
819
- {
820
- return matrix .copy () .inverse ();
821
- },
822
- multLeft: function (lhs, rhs)
823
- {
824
- return lhs .copy () .multLeft (rhs);
825
- },
826
- multRight: function (lhs, rhs)
827
- {
828
- return lhs .copy () .multRight (rhs);
829
- },
830
789
  });
831
790
 
832
791
  const
@@ -60,7 +60,6 @@ function Quaternion (x, y, z, w)
60
60
  Quaternion .prototype =
61
61
  {
62
62
  constructor: Quaternion,
63
- length: 4,
64
63
  [Symbol .iterator]: function* ()
65
64
  {
66
65
  yield this .x;
@@ -95,24 +94,22 @@ Quaternion .prototype =
95
94
  },
96
95
  setMatrix: function (matrix)
97
96
  {
98
- let i;
99
-
100
97
  // First, find largest diagonal in matrix:
101
98
  if (matrix [0] > matrix [4])
102
99
  {
103
- i = matrix [0] > matrix [8] ? 0 : 2;
100
+ var i = matrix [0] > matrix [8] ? 0 : 2;
104
101
  }
105
102
  else
106
103
  {
107
- i = matrix [4] > matrix [8] ? 1 : 2;
104
+ var i = matrix [4] > matrix [8] ? 1 : 2;
108
105
  }
109
106
 
110
- const scalerow = matrix [0] + matrix [4] + matrix [8];
107
+ const scaleRow = matrix [0] + matrix [4] + matrix [8];
111
108
 
112
- if (scalerow > matrix [i * 3 + i])
109
+ if (scaleRow > matrix [i * 3 + i])
113
110
  {
114
111
  // Compute w first:
115
- this [3] = Math .sqrt (scalerow + 1) / 2;
112
+ this [3] = Math .sqrt (scaleRow + 1) / 2;
116
113
 
117
114
  // And compute other values:
118
115
  const d = 4 * this [3];
@@ -260,9 +257,9 @@ Quaternion .prototype =
260
257
  const
261
258
  { x: qx, y: qy, z: qz, w: qw } = this,
262
259
  { x: vx, y: vy, z: vz } = vector,
263
- a = qw * qw - qx * qx - qy * qy - qz * qz,
264
- b = 2 * (vx * qx + vy * qy + vz * qz),
265
- c = 2 * qw;
260
+ a = qw * qw - qx * qx - qy * qy - qz * qz,
261
+ b = 2 * (vx * qx + vy * qy + vz * qz),
262
+ c = 2 * qw;
266
263
 
267
264
  vector .x = a * vx + b * qx + c * (qy * vz - qz * vy);
268
265
  vector .y = a * vy + b * qy + c * (qz * vx - qx * vz);
@@ -275,9 +272,9 @@ Quaternion .prototype =
275
272
  const
276
273
  { x: qx, y: qy, z: qz, w: qw } = this,
277
274
  { x: vx, y: vy, z: vz } = vector,
278
- a = qw * qw - qx * qx - qy * qy - qz * qz,
279
- b = 2 * (vx * qx + vy * qy + vz * qz),
280
- c = 2 * qw;
275
+ a = qw * qw - qx * qx - qy * qy - qz * qz,
276
+ b = 2 * (vx * qx + vy * qy + vz * qz),
277
+ c = 2 * qw;
281
278
 
282
279
  vector .x = a * vx + b * qx - c * (qy * vz - qz * vy);
283
280
  vector .y = a * vy + b * qy - c * (qz * vx - qx * vz);
@@ -402,60 +399,47 @@ Quaternion .prototype =
402
399
  },
403
400
  };
404
401
 
405
- Object .defineProperty (Quaternion .prototype, "0",
406
- {
407
- get: function () { return this .x; },
408
- set: function (value) { this .x = value; },
409
- enumerable: false,
410
- configurable: false
411
- });
412
-
413
- Object .defineProperty (Quaternion .prototype, "1",
402
+ Object .defineProperties (Quaternion .prototype,
414
403
  {
415
- get: function () { return this .y; },
416
- set: function (value) { this .y = value; },
417
- enumerable: false,
418
- configurable: false
419
- });
420
-
421
- Object .defineProperty (Quaternion .prototype, "2",
422
- {
423
- get: function () { return this .z; },
424
- set: function (value) { this .z = value; },
425
- enumerable: false,
426
- configurable: false
427
- });
428
-
429
- Object .defineProperty (Quaternion .prototype, "3",
430
- {
431
- get: function () { return this .w; },
432
- set: function (value) { this .w = value; },
433
- enumerable: false,
434
- configurable: false
435
- });
436
-
437
- Object .defineProperty (Quaternion .prototype, "real",
438
- {
439
- get: function () { return this .w; },
440
- enumerable: false,
441
- configurable: false
442
- });
443
-
444
- Object .defineProperty (Quaternion .prototype, "imag",
445
- {
446
- get: (function ()
404
+ length: { value: 4 },
405
+ 0:
447
406
  {
448
- const result = new Vector3 (0, 0, 0);
449
-
450
- return function ()
407
+ get: function () { return this .x; },
408
+ set: function (value) { this .x = value; },
409
+ },
410
+ 1:
411
+ {
412
+ get: function () { return this .y; },
413
+ set: function (value) { this .y = value; },
414
+ },
415
+ 2:
416
+ {
417
+ get: function () { return this .z; },
418
+ set: function (value) { this .z = value; },
419
+ },
420
+ 3:
421
+ {
422
+ get: function () { return this .w; },
423
+ set: function (value) { this .w = value; },
424
+ },
425
+ real:
426
+ {
427
+ get: function () { return this .w; },
428
+ },
429
+ imag:
430
+ {
431
+ get: (function ()
451
432
  {
452
- return result .set (this .x,
453
- this .y,
454
- this .z);
455
- };
456
- })(),
457
- enumerable: false,
458
- configurable: false
433
+ const result = new Vector3 (0, 0, 0);
434
+
435
+ return function ()
436
+ {
437
+ return result .set (this .x,
438
+ this .y,
439
+ this .z);
440
+ };
441
+ })(),
442
+ },
459
443
  });
460
444
 
461
445
  Object .assign (Quaternion,
@@ -108,7 +108,6 @@ function Rotation4 (x, y, z, angle)
108
108
  Rotation4 .prototype =
109
109
  {
110
110
  constructor: Rotation4,
111
- length: 4,
112
111
  [Symbol .iterator]: function* ()
113
112
  {
114
113
  yield this [_x];
@@ -379,7 +378,6 @@ const x = {
379
378
  this .set (x, this [_y], this [_z], this [_angle]);
380
379
  },
381
380
  enumerable: true,
382
- configurable: false
383
381
  };
384
382
 
385
383
  const y = {
@@ -393,7 +391,6 @@ const y = {
393
391
  this .set (this [_x], y, this [_z], this [_angle]);
394
392
  },
395
393
  enumerable: true,
396
- configurable: false
397
394
  };
398
395
 
399
396
  const z = {
@@ -407,7 +404,6 @@ const z = {
407
404
  this .set (this [_x], this [_y], z, this [_angle]);
408
405
  },
409
406
  enumerable: true,
410
- configurable: false
411
407
  };
412
408
 
413
409
  const angle = {
@@ -421,23 +417,29 @@ const angle = {
421
417
  this .set (this [_x], this [_y], this [_z], angle);
422
418
  },
423
419
  enumerable: true,
424
- configurable: false
425
420
  };
426
421
 
427
- Object .defineProperty (Rotation4 .prototype, "x", x);
428
- Object .defineProperty (Rotation4 .prototype, "y", y);
429
- Object .defineProperty (Rotation4 .prototype, "z", z);
430
- Object .defineProperty (Rotation4 .prototype, "angle", angle);
422
+ Object .defineProperties (Rotation4 .prototype,
423
+ {
424
+ length: { value: 4 },
425
+ x: x,
426
+ y: y,
427
+ z: z,
428
+ angle: angle,
429
+ });
431
430
 
432
431
  x .enumerable = false;
433
432
  y .enumerable = false;
434
433
  z .enumerable = false;
435
434
  angle .enumerable = false;
436
435
 
437
- Object .defineProperty (Rotation4 .prototype, "0", x);
438
- Object .defineProperty (Rotation4 .prototype, "1", y);
439
- Object .defineProperty (Rotation4 .prototype, "2", z);
440
- Object .defineProperty (Rotation4 .prototype, "3", angle);
436
+ Object .defineProperties (Rotation4 .prototype,
437
+ {
438
+ 0: x,
439
+ 1: y,
440
+ 2: z,
441
+ 3: angle,
442
+ });
441
443
 
442
444
  Object .assign (Rotation4,
443
445
  {