x_ite 8.7.4 → 8.7.6

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 (271) hide show
  1. package/.vscode/tasks.json +1 -1
  2. package/dist/assets/components/Annotation.js +13 -13
  3. package/dist/assets/components/Annotation.min.js +1 -1
  4. package/dist/assets/components/CADGeometry.js +13 -13
  5. package/dist/assets/components/CADGeometry.min.js +1 -1
  6. package/dist/assets/components/CubeMapTexturing.js +25 -25
  7. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  8. package/dist/assets/components/DIS.js +13 -13
  9. package/dist/assets/components/DIS.min.js +1 -1
  10. package/dist/assets/components/EventUtilities.js +9 -9
  11. package/dist/assets/components/EventUtilities.min.js +1 -1
  12. package/dist/assets/components/Geometry2D.js +21 -23
  13. package/dist/assets/components/Geometry2D.min.js +1 -1
  14. package/dist/assets/components/Geospatial.js +35 -36
  15. package/dist/assets/components/Geospatial.min.js +1 -1
  16. package/dist/assets/components/HAnim.js +18 -18
  17. package/dist/assets/components/HAnim.min.js +1 -1
  18. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  19. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  20. package/dist/assets/components/Layout.js +37 -32
  21. package/dist/assets/components/Layout.min.js +1 -1
  22. package/dist/assets/components/NURBS.js +24 -24
  23. package/dist/assets/components/NURBS.min.js +1 -1
  24. package/dist/assets/components/ParticleSystems.js +22 -22
  25. package/dist/assets/components/ParticleSystems.min.js +1 -1
  26. package/dist/assets/components/Picking.js +20 -20
  27. package/dist/assets/components/Picking.min.js +1 -1
  28. package/dist/assets/components/RigidBodyPhysics.js +25 -25
  29. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  30. package/dist/assets/components/Scripting.js +28 -28
  31. package/dist/assets/components/Scripting.min.js +1 -1
  32. package/dist/assets/components/Text.js +26 -27
  33. package/dist/assets/components/Text.min.js +1 -1
  34. package/dist/assets/components/TextureProjector.js +15 -15
  35. package/dist/assets/components/TextureProjector.min.js +1 -1
  36. package/dist/assets/components/Texturing3D.js +30 -30
  37. package/dist/assets/components/Texturing3D.min.js +1 -1
  38. package/dist/assets/components/VolumeRendering.js +19 -19
  39. package/dist/assets/components/VolumeRendering.min.js +1 -1
  40. package/dist/assets/components/X_ITE.js +9 -9
  41. package/dist/assets/components/X_ITE.min.js +1 -1
  42. package/dist/x_ite.css +1 -1
  43. package/dist/x_ite.js +1187 -1686
  44. package/dist/x_ite.min.js +1 -1
  45. package/dist/x_ite.zip +0 -0
  46. package/docs/_config.yml +1 -1
  47. package/docs/_includes/scripts.html +0 -1
  48. package/docs/_posts/components/CADGeometry/QuadSet.md +1 -1
  49. package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +1 -1
  50. package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +1 -1
  51. package/docs/_posts/components/EnvironmentalEffects/Background.md +1 -1
  52. package/docs/_posts/components/EnvironmentalEffects/Fog.md +1 -1
  53. package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +1 -1
  54. package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +1 -1
  55. package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +1 -1
  56. package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +1 -1
  57. package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +1 -1
  58. package/docs/_posts/components/EventUtilities/IntegerSequencer.md +1 -1
  59. package/docs/_posts/components/Followers/ColorChaser.md +1 -1
  60. package/docs/_posts/components/Followers/ColorDamper.md +1 -1
  61. package/docs/_posts/components/Followers/CoordinateChaser.md +1 -1
  62. package/docs/_posts/components/Followers/ScalarChaser.md +1 -1
  63. package/docs/_posts/components/Geometry2D/Arc2D.md +1 -1
  64. package/docs/_posts/components/Geometry2D/ArcClose2D.md +1 -1
  65. package/docs/_posts/components/Geometry2D/Circle2D.md +1 -1
  66. package/docs/_posts/components/Geometry2D/Disk2D.md +1 -1
  67. package/docs/_posts/components/Geometry2D/Polyline2D.md +1 -1
  68. package/docs/_posts/components/Geometry2D/Polypoint2D.md +1 -1
  69. package/docs/_posts/components/Geometry2D/Rectangle2D.md +1 -1
  70. package/docs/_posts/components/Geometry2D/TriangleSet2D.md +1 -1
  71. package/docs/_posts/components/Geometry3D/Box.md +1 -1
  72. package/docs/_posts/components/Geometry3D/Cone.md +1 -1
  73. package/docs/_posts/components/Geometry3D/Cylinder.md +1 -1
  74. package/docs/_posts/components/Geometry3D/ElevationGrid.md +1 -1
  75. package/docs/_posts/components/Geometry3D/Extrusion.md +1 -1
  76. package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +1 -1
  77. package/docs/_posts/components/Geometry3D/Sphere.md +1 -1
  78. package/docs/_posts/components/Geospatial/GeoElevationGrid.md +1 -1
  79. package/docs/_posts/components/Geospatial/GeoLOD.md +1 -1
  80. package/docs/_posts/components/Geospatial/GeoViewpoint.md +1 -1
  81. package/docs/_posts/components/Grouping/Group.md +1 -1
  82. package/docs/_posts/components/Grouping/Switch.md +1 -1
  83. package/docs/_posts/components/Grouping/Transform.md +1 -1
  84. package/docs/_posts/components/HAnim/HAnimHumanoid.md +1 -1
  85. package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
  86. package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +1 -1
  87. package/docs/_posts/components/Interpolation/OrientationInterpolator.md +1 -1
  88. package/docs/_posts/components/Interpolation/PositionInterpolator.md +1 -1
  89. package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +1 -1
  90. package/docs/_posts/components/Interpolation/ScalarInterpolator.md +1 -1
  91. package/docs/_posts/components/Interpolation/SplineScalarInterpolator.md +1 -1
  92. package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.md +1 -1
  93. package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +1 -1
  94. package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +1 -1
  95. package/docs/_posts/components/Layering/LayerSet.md +1 -1
  96. package/docs/_posts/components/Layering/Viewport.md +1 -1
  97. package/docs/_posts/components/Lighting/DirectionalLight.md +1 -1
  98. package/docs/_posts/components/Lighting/PointLight.md +1 -1
  99. package/docs/_posts/components/Lighting/SpotLight.md +1 -1
  100. package/docs/_posts/components/NURBS/NurbsCurve.md +1 -1
  101. package/docs/_posts/components/NURBS/NurbsPatchSurface.md +1 -1
  102. package/docs/_posts/components/NURBS/NurbsSweptSurface.md +1 -1
  103. package/docs/_posts/components/Navigation/Billboard.md +1 -1
  104. package/docs/_posts/components/Navigation/Collision.md +1 -1
  105. package/docs/_posts/components/Navigation/NavigationInfo.md +1 -1
  106. package/docs/_posts/components/Navigation/OrthoViewpoint.md +1 -1
  107. package/docs/_posts/components/Navigation/Viewpoint.md +1 -1
  108. package/docs/_posts/components/Networking/Anchor.md +1 -1
  109. package/docs/_posts/components/Networking/Inline.md +1 -1
  110. package/docs/_posts/components/Networking/LoadSensor.md +1 -1
  111. package/docs/_posts/components/ParticleSystems/ConeEmitter.md +1 -1
  112. package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +1 -1
  113. package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +1 -1
  114. package/docs/_posts/components/ParticleSystems/ParticleSystem.md +1 -1
  115. package/docs/_posts/components/ParticleSystems/PointEmitter.md +1 -1
  116. package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +1 -1
  117. package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +1 -1
  118. package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +1 -1
  119. package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +1 -1
  120. package/docs/_posts/components/Picking/LinePickSensor.md +1 -1
  121. package/docs/_posts/components/Picking/PointPickSensor.md +1 -1
  122. package/docs/_posts/components/Picking/PrimitivePickSensor.md +1 -1
  123. package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +1 -1
  124. package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +1 -1
  125. package/docs/_posts/components/Rendering/ClipPlane.md +1 -1
  126. package/docs/_posts/components/Rendering/Color.md +1 -1
  127. package/docs/_posts/components/Rendering/ColorRGBA.md +1 -1
  128. package/docs/_posts/components/Rendering/Coordinate.md +1 -1
  129. package/docs/_posts/components/Rendering/IndexedLineSet.md +1 -1
  130. package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +1 -1
  131. package/docs/_posts/components/Rendering/IndexedTriangleSet.md +1 -1
  132. package/docs/_posts/components/Rendering/LineSet.md +1 -1
  133. package/docs/_posts/components/Rendering/PointSet.md +1 -1
  134. package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +1 -1
  135. package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +1 -1
  136. package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +1 -1
  137. package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +1 -1
  138. package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +1 -1
  139. package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +1 -1
  140. package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +1 -1
  141. package/docs/_posts/components/Shaders/ComposedShader.md +1 -1
  142. package/docs/_posts/components/Shaders/FloatVertexAttribute.md +1 -1
  143. package/docs/_posts/components/Shaders/ShaderPart.md +1 -1
  144. package/docs/_posts/components/Shape/Appearance.md +1 -1
  145. package/docs/_posts/components/Shape/FillProperties.md +1 -1
  146. package/docs/_posts/components/Shape/LineProperties.md +1 -1
  147. package/docs/_posts/components/Shape/Material.md +1 -1
  148. package/docs/_posts/components/Shape/TwoSidedMaterial.md +1 -1
  149. package/docs/_posts/components/Sound/AudioClip.md +1 -1
  150. package/docs/_posts/components/Text/FontStyle.md +1 -1
  151. package/docs/_posts/components/Text/Text.md +1 -1
  152. package/docs/_posts/components/Texturing/ImageTexture.md +1 -1
  153. package/docs/_posts/components/Texturing/MovieTexture.md +1 -1
  154. package/docs/_posts/components/Texturing/MultiTexture.md +1 -1
  155. package/docs/_posts/components/Texturing/PixelTexture.md +1 -1
  156. package/docs/_posts/components/Texturing3D/ImageTexture3D.md +1 -1
  157. package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +1 -1
  158. package/docs/_posts/components/Time/TimeSensor.md +1 -1
  159. package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +1 -1
  160. package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +1 -1
  161. package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +1 -1
  162. package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +1 -1
  163. package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +1 -1
  164. package/docs/_posts/components/VolumeRendering/VolumeData.md +1 -1
  165. package/docs/_posts/components/X_ITE/BlendMode.md +1 -1
  166. package/docs/_posts/custom-shaders.md +1 -1
  167. package/docs/_posts/getting-started.md +7 -2
  168. package/docs/_posts/reference/browser-services.md +6 -0
  169. package/docs/_posts/reference/field-services-and-objects.md +26 -6
  170. package/docs/_posts/tutorials/adding-backgrounds.md +2 -2
  171. package/docs/_posts/tutorials/adding-sound.md +1 -1
  172. package/docs/_posts/tutorials/building-a-x3d-world.md +1 -1
  173. package/docs/_posts/tutorials/building-elevation-grids.md +1 -1
  174. package/docs/_posts/tutorials/building-primitive-shapes.md +2 -2
  175. package/docs/_posts/tutorials/controlling-appearance-with-materials.md +1 -1
  176. package/docs/_posts/tutorials/controlling-detail.md +1 -1
  177. package/docs/_posts/tutorials/hello-world.md +1 -1
  178. package/docs/_posts/tutorials/naming-nodes.md +1 -1
  179. package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +1 -1
  180. package/package.json +3 -3
  181. package/src/lib/jquery.js +13 -0
  182. package/src/standard/Geospatial/UniversalTransverseMercator.js +0 -1
  183. package/src/standard/Math/Algorithms/eigen_decomposition.js +9 -9
  184. package/src/standard/Math/Geometry/Box2.js +37 -24
  185. package/src/standard/Math/Geometry/Box3.js +37 -24
  186. package/src/standard/Math/Geometry/Cylinder3.js +1 -1
  187. package/src/standard/Math/Geometry/Line2.js +1 -1
  188. package/src/standard/Math/Geometry/Line3.js +1 -1
  189. package/src/standard/Math/Geometry/Plane3.js +1 -1
  190. package/src/standard/Math/Geometry/Sphere3.js +14 -14
  191. package/src/standard/Math/Numbers/Color3.js +10 -18
  192. package/src/standard/Math/Numbers/Color4.js +12 -23
  193. package/src/standard/Math/Numbers/Complex.js +59 -58
  194. package/src/standard/Math/Numbers/Matrix2.js +31 -45
  195. package/src/standard/Math/Numbers/Matrix3.js +59 -94
  196. package/src/standard/Math/Numbers/Matrix4.js +73 -114
  197. package/src/standard/Math/Numbers/Quaternion.js +70 -132
  198. package/src/standard/Math/Numbers/Rotation4.js +15 -42
  199. package/src/standard/Math/Numbers/Vector2.js +12 -78
  200. package/src/standard/Math/Numbers/Vector3.js +17 -94
  201. package/src/standard/Math/Numbers/Vector4.js +22 -94
  202. package/src/x_ite/Base/X3DInfoArray.js +9 -7
  203. package/src/x_ite/Base/X3DObject.js +9 -32
  204. package/src/x_ite/Base/X3DObjectArrayField.js +35 -64
  205. package/src/x_ite/Browser/Core/BrowserOptions.js +37 -0
  206. package/src/x_ite/Browser/Core/X3DCoreContext.js +21 -3
  207. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +4 -4
  208. package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +12 -7
  209. package/src/x_ite/Browser/Layout/ScreenText.js +9 -4
  210. package/src/x_ite/Browser/Navigation/ExamineViewer.js +9 -9
  211. package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -3
  212. package/src/x_ite/Browser/Navigation/WalkViewer.js +2 -2
  213. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +7 -7
  214. package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
  215. package/src/x_ite/Browser/Shaders/X3DShadersContext.js +0 -1
  216. package/src/x_ite/Browser/Text/X3DTextGeometry.js +2 -3
  217. package/src/x_ite/Browser/VERSION.js +1 -1
  218. package/src/x_ite/Browser/X3DBrowser.js +61 -68
  219. package/src/x_ite/Browser/X3DBrowserContext.js +8 -8
  220. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +1 -1
  221. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +1 -1
  222. package/src/x_ite/Components/Followers/OrientationChaser.js +3 -3
  223. package/src/x_ite/Components/Followers/OrientationDamper.js +3 -3
  224. package/src/x_ite/Components/Geometry2D/Rectangle2D.js +2 -3
  225. package/src/x_ite/Components/Geometry3D/Box.js +3 -10
  226. package/src/x_ite/Components/Geometry3D/Cone.js +1 -1
  227. package/src/x_ite/Components/Geometry3D/Cylinder.js +2 -2
  228. package/src/x_ite/Components/Geometry3D/Extrusion.js +3 -3
  229. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
  230. package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +2 -2
  231. package/src/x_ite/Components/Layering/X3DLayerNode.js +1 -1
  232. package/src/x_ite/Components/Layout/Layout.js +1 -1
  233. package/src/x_ite/Components/Navigation/Billboard.js +1 -1
  234. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +12 -13
  235. package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
  236. package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +7 -7
  237. package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +1 -1
  238. package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +9 -9
  239. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +1 -1
  240. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +2 -2
  241. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +1 -1
  242. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +1 -1
  243. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +3 -3
  244. package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +1 -1
  245. package/src/x_ite/Execution/X3DExecutionContext.js +52 -58
  246. package/src/x_ite/Execution/X3DExportedNode.js +13 -11
  247. package/src/x_ite/Execution/X3DImportedNode.js +25 -25
  248. package/src/x_ite/Execution/X3DScene.js +129 -53
  249. package/src/x_ite/Fields/ArrayFields.js +1 -1
  250. package/src/x_ite/Fields/SFColor.js +10 -15
  251. package/src/x_ite/Fields/SFColorRGBA.js +11 -18
  252. package/src/x_ite/Fields/SFImage.js +38 -33
  253. package/src/x_ite/Fields/SFMatrix3.js +1 -3
  254. package/src/x_ite/Fields/SFMatrix4.js +1 -5
  255. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +6 -5
  256. package/src/x_ite/Fields/SFNodeCache.js +2 -2
  257. package/src/x_ite/Fields/SFRotation.js +14 -21
  258. package/src/x_ite/Fields/SFString.js +0 -1
  259. package/src/x_ite/Fields/SFVec2.js +8 -15
  260. package/src/x_ite/Fields/SFVec3.js +11 -18
  261. package/src/x_ite/Fields/SFVec4.js +12 -23
  262. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +17 -16
  263. package/src/x_ite/Parser/SVGParser.js +3 -3
  264. package/src/x_ite/Parser/X3DOptimizer.js +1 -1
  265. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +26 -27
  266. package/src/x_ite/Prototype/X3DProtoDeclaration.js +16 -15
  267. package/src/x_ite/Rendering/X3DRenderObject.js +3 -3
  268. package/src/x_ite/Routing/X3DRoute.js +26 -25
  269. package/src/x_ite/X3DCanvasElement.js +1 -0
  270. package/docs/assets/js/autoupdate.js +0 -25
  271. package/src/x_ite/Execution/Scene.js +0 -145
@@ -64,7 +64,6 @@ function Color3 (r, g, b)
64
64
  Color3 .prototype =
65
65
  {
66
66
  constructor: Color3,
67
- length: 3,
68
67
  [Symbol .iterator]: function* ()
69
68
  {
70
69
  yield this [_r];
@@ -180,35 +179,28 @@ Color3 .prototype =
180
179
  const r = {
181
180
  get: function () { return this [_r]; },
182
181
  set: function (value) { this [_r] = clamp (value, 0, 1); },
183
- enumerable: true,
184
- configurable: false
185
182
  };
186
183
 
187
184
  const g = {
188
185
  get: function () { return this [_g]; },
189
186
  set: function (value) { this [_g] = clamp (value, 0, 1); },
190
- enumerable: true,
191
- configurable: false
192
187
  };
193
188
 
194
189
  const b = {
195
190
  get: function () { return this [_b]; },
196
191
  set: function (value) { this [_b] = clamp (value, 0, 1); },
197
- enumerable: true,
198
- configurable: false
199
192
  };
200
193
 
201
- Object .defineProperty (Color3 .prototype, "r", r);
202
- Object .defineProperty (Color3 .prototype, "g", g);
203
- Object .defineProperty (Color3 .prototype, "b", b);
204
-
205
- r .enumerable = false;
206
- g .enumerable = false;
207
- b .enumerable = false;
208
-
209
- Object .defineProperty (Color3 .prototype, "0", r);
210
- Object .defineProperty (Color3 .prototype, "1", g);
211
- Object .defineProperty (Color3 .prototype, "2", b);
194
+ Object .defineProperties (Color3 .prototype,
195
+ {
196
+ length: { value: 3 },
197
+ 0: r,
198
+ 1: g,
199
+ 2: b,
200
+ r: Object .assign ({ enumerable: true }, r),
201
+ g: Object .assign ({ enumerable: true }, g),
202
+ b: Object .assign ({ enumerable: true }, b),
203
+ });
212
204
 
213
205
  Object .assign (Color3,
214
206
  {
@@ -67,7 +67,6 @@ function Color4 (r, g, b, a)
67
67
  Color4 .prototype =
68
68
  {
69
69
  constructor: Color4,
70
- length: 4,
71
70
  [Symbol .iterator]: function* ()
72
71
  {
73
72
  yield this [_r];
@@ -135,45 +134,35 @@ Color4 .prototype =
135
134
  const r = {
136
135
  get: function () { return this [_r]; },
137
136
  set: function (value) { this [_r] = clamp (value, 0, 1); },
138
- enumerable: true,
139
- configurable: false
140
137
  };
141
138
 
142
139
  const g = {
143
140
  get: function () { return this [_g]; },
144
141
  set: function (value) { this [_g] = clamp (value, 0, 1); },
145
- enumerable: true,
146
- configurable: false
147
142
  };
148
143
 
149
144
  const b = {
150
145
  get: function () { return this [_b]; },
151
146
  set: function (value) { this [_b] = clamp (value, 0, 1); },
152
- enumerable: true,
153
- configurable: false
154
147
  };
155
148
 
156
149
  const a = {
157
150
  get: function () { return this [_a]; },
158
151
  set: function (value) { this [_a] = clamp (value, 0, 1); },
159
- enumerable: true,
160
- configurable: false
161
152
  };
162
153
 
163
- Object .defineProperty (Color4 .prototype, "r", r);
164
- Object .defineProperty (Color4 .prototype, "g", g);
165
- Object .defineProperty (Color4 .prototype, "b", b);
166
- Object .defineProperty (Color4 .prototype, "a", a);
167
-
168
- r .enumerable = false;
169
- g .enumerable = false;
170
- b .enumerable = false;
171
- a .enumerable = false;
172
-
173
- Object .defineProperty (Color4 .prototype, "0", r);
174
- Object .defineProperty (Color4 .prototype, "1", g);
175
- Object .defineProperty (Color4 .prototype, "2", b);
176
- Object .defineProperty (Color4 .prototype, "3", a);
154
+ Object .defineProperties (Color4 .prototype,
155
+ {
156
+ length: { value: 4 },
157
+ 0: r,
158
+ 1: g,
159
+ 2: b,
160
+ 3: a,
161
+ r: Object .assign ({ enumerable: true }, r),
162
+ g: Object .assign ({ enumerable: true }, g),
163
+ b: Object .assign ({ enumerable: true }, b),
164
+ a: Object .assign ({ enumerable: true }, a),
165
+ });
177
166
 
178
167
  Object .assign (Color4,
179
168
  {
@@ -54,7 +54,6 @@ function Complex (real, imag)
54
54
  Complex .prototype =
55
55
  {
56
56
  constructor: Complex,
57
- length: 2,
58
57
  [Symbol .iterator]: function* ()
59
58
  {
60
59
  yield this .real;
@@ -156,75 +155,81 @@ Complex .prototype =
156
155
  },
157
156
  toString: function ()
158
157
  {
159
- if (this .imag)
160
- return this .real + " " + this .imag + "i";
158
+ let string = "";
161
159
 
162
- return String (this .real);
160
+ string += this .real;
161
+
162
+ if (this .imag < 0)
163
+ {
164
+ string += this .imag;
165
+ string += "i";
166
+ }
167
+ else if (this .imag > 0)
168
+ {
169
+ string += "+";
170
+ string += this .imag;
171
+ string += "i";
172
+ }
173
+
174
+ return string;
163
175
  },
164
176
  };
165
177
 
166
- Object .defineProperty (Complex .prototype, "0",
178
+ Object .defineProperties (Complex .prototype,
167
179
  {
168
- get: function ()
169
- {
170
- return this .real;
171
- },
172
- set: function (value)
180
+ length: { value: 2 },
181
+ 0:
173
182
  {
174
- this .real = value;
183
+ get: function ()
184
+ {
185
+ return this .real;
186
+ },
187
+ set: function (value)
188
+ {
189
+ this .real = value;
190
+ },
175
191
  },
176
- enumerable: false,
177
- configurable: false
178
- });
179
-
180
- Object .defineProperty (Complex .prototype, "1",
181
- {
182
- get: function ()
192
+ 1:
183
193
  {
184
- return this .imag;
194
+ get: function ()
195
+ {
196
+ return this .imag;
197
+ },
198
+ set: function (value)
199
+ {
200
+ this .imag = value;
201
+ },
185
202
  },
186
- set: function (value)
203
+ magnitude:
187
204
  {
188
- this .imag = value;
189
- },
190
- enumerable: false,
191
- configurable: false
192
- });
193
-
194
- Object .defineProperty (Complex .prototype, "magnitude",
195
- {
196
- get: function ()
197
- {
198
- if (this .real)
205
+ get: function ()
199
206
  {
200
- if (this .imag)
201
- return Math .hypot (this .real, this .imag);
202
-
203
- return Math .abs (this .real);
204
- }
207
+ if (this .real)
208
+ {
209
+ if (this .imag)
210
+ return Math .hypot (this .real, this .imag);
205
211
 
206
- return Math .abs (this .imag);
207
- },
208
- set: function (magnitude)
209
- {
210
- this .setPolar (magnitude, this .angle);
211
- },
212
- enumerable: false,
213
- configurable: false
214
- });
212
+ return Math .abs (this .real);
213
+ }
215
214
 
216
- Object .defineProperty (Complex .prototype, "angle",
217
- {
218
- get: function ()
219
- {
220
- return Math .atan2 (this .imag, this .real);
215
+ return Math .abs (this .imag);
216
+ },
217
+ set: function (magnitude)
218
+ {
219
+ this .setPolar (magnitude, this .angle);
220
+ },
221
221
  },
222
- set: function (angle)
222
+ angle:
223
223
  {
224
- this .setPolar (this .magnitude, angle);
224
+ get: function ()
225
+ {
226
+ return Math .atan2 (this .imag, this .real);
227
+ },
228
+ set: function (angle)
229
+ {
230
+ this .setPolar (this .magnitude, angle);
231
+ },
225
232
  },
226
- enumerable: false,
227
- configurable: false
228
233
  });
229
234
 
230
235
  Object .assign (Complex,
@@ -237,10 +242,6 @@ Object .assign (Complex,
237
242
  {
238
243
  return lhs .copy () .multiply (rhs);
239
244
  },
240
- multComp: function (lhs, rhs)
241
- {
242
- return lhs .copy () .multComp (rhs);
243
- },
244
245
  });
245
246
 
246
247
  export default Complex;
@@ -45,8 +45,7 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
- import Vector2 from "./Vector2.js";
49
- import Algorithm from "../Algorithm.js";
48
+ import Vector2 from "./Vector2.js";
50
49
 
51
50
  function Matrix2 ()
52
51
  {
@@ -64,13 +63,9 @@ function Matrix2 ()
64
63
  Matrix2 .prototype =
65
64
  {
66
65
  constructor: Matrix2,
67
- order: 2,
68
- length: 4,
69
66
  [Symbol .iterator]: function* ()
70
67
  {
71
- const length = this .length;
72
-
73
- for (let i = 0; i < length; ++ i)
68
+ for (let i = 0; i < 4; ++ i)
74
69
  yield this [i];
75
70
  },
76
71
  copy: function ()
@@ -236,49 +231,40 @@ Matrix2 .prototype =
236
231
  },
237
232
  };
238
233
 
239
- Object .defineProperty (Matrix2 .prototype, "x",
234
+ Object .defineProperties (Matrix2 .prototype,
240
235
  {
241
- get: (function ()
236
+ order: { value: 2 },
237
+ length: { value: 4 },
238
+ x:
242
239
  {
243
- const vector = new Vector2 (0, 0);
244
-
245
- return function () { return vector .set (this [0], this [1]); };
246
- })(),
247
- enumerable: false,
248
- configurable: false
249
- });
240
+ get: (function ()
241
+ {
242
+ const vector = new Vector2 (0, 0);
250
243
 
251
- Object .defineProperty (Matrix2 .prototype, "y",
252
- {
253
- get: (function ()
244
+ return function () { return vector .set (this [0], this [1]); };
245
+ })(),
246
+ },
247
+ y:
254
248
  {
255
- const vector = new Vector2 (0, 0);
256
-
257
- return function () { return vector .set (this [2], this [3]); };
258
- })(),
259
- enumerable: false,
260
- configurable: false
261
- });
262
-
263
- Object .defineProperty (Matrix2 .prototype, "xAxis",
264
- {
265
- get: function () { return this [0]; },
266
- enumerable: false,
267
- configurable: false
268
- });
269
-
270
- Object .defineProperty (Matrix2 .prototype, "origin",
271
- {
272
- get: function () { return this [2]; },
273
- enumerable: false,
274
- configurable: false
275
- });
249
+ get: (function ()
250
+ {
251
+ const vector = new Vector2 (0, 0);
276
252
 
277
- Object .defineProperty (Matrix2 .prototype, "submatrix",
278
- {
279
- get: function () { return this [0]; },
280
- enumerable: false,
281
- configurable: false
253
+ return function () { return vector .set (this [2], this [3]); };
254
+ })(),
255
+ },
256
+ xAxis:
257
+ {
258
+ get: function () { return this [0]; },
259
+ },
260
+ origin:
261
+ {
262
+ get: function () { return this [2]; },
263
+ },
264
+ submatrix:
265
+ {
266
+ get: function () { return this [0]; },
267
+ },
282
268
  });
283
269
 
284
270
  Object .assign (Matrix2,
@@ -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 ();