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.
- package/.vscode/tasks.json +1 -1
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +21 -23
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +35 -36
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +18 -18
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +37 -32
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +22 -22
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +20 -20
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +25 -25
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +28 -28
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +26 -27
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +15 -15
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +30 -30
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +19 -19
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +1187 -1686
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/_includes/scripts.html +0 -1
- package/docs/_posts/components/CADGeometry/QuadSet.md +1 -1
- package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +1 -1
- package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +1 -1
- package/docs/_posts/components/EnvironmentalEffects/Background.md +1 -1
- package/docs/_posts/components/EnvironmentalEffects/Fog.md +1 -1
- package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +1 -1
- package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +1 -1
- package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +1 -1
- package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +1 -1
- package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +1 -1
- package/docs/_posts/components/EventUtilities/IntegerSequencer.md +1 -1
- package/docs/_posts/components/Followers/ColorChaser.md +1 -1
- package/docs/_posts/components/Followers/ColorDamper.md +1 -1
- package/docs/_posts/components/Followers/CoordinateChaser.md +1 -1
- package/docs/_posts/components/Followers/ScalarChaser.md +1 -1
- package/docs/_posts/components/Geometry2D/Arc2D.md +1 -1
- package/docs/_posts/components/Geometry2D/ArcClose2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Circle2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Disk2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Polyline2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Polypoint2D.md +1 -1
- package/docs/_posts/components/Geometry2D/Rectangle2D.md +1 -1
- package/docs/_posts/components/Geometry2D/TriangleSet2D.md +1 -1
- package/docs/_posts/components/Geometry3D/Box.md +1 -1
- package/docs/_posts/components/Geometry3D/Cone.md +1 -1
- package/docs/_posts/components/Geometry3D/Cylinder.md +1 -1
- package/docs/_posts/components/Geometry3D/ElevationGrid.md +1 -1
- package/docs/_posts/components/Geometry3D/Extrusion.md +1 -1
- package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +1 -1
- package/docs/_posts/components/Geometry3D/Sphere.md +1 -1
- package/docs/_posts/components/Geospatial/GeoElevationGrid.md +1 -1
- package/docs/_posts/components/Geospatial/GeoLOD.md +1 -1
- package/docs/_posts/components/Geospatial/GeoViewpoint.md +1 -1
- package/docs/_posts/components/Grouping/Group.md +1 -1
- package/docs/_posts/components/Grouping/Switch.md +1 -1
- package/docs/_posts/components/Grouping/Transform.md +1 -1
- package/docs/_posts/components/HAnim/HAnimHumanoid.md +1 -1
- package/docs/_posts/components/Interpolation/ColorInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/OrientationInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/PositionInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +1 -1
- package/docs/_posts/components/Interpolation/ScalarInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/SplineScalarInterpolator.md +1 -1
- package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.md +1 -1
- package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +1 -1
- package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +1 -1
- package/docs/_posts/components/Layering/LayerSet.md +1 -1
- package/docs/_posts/components/Layering/Viewport.md +1 -1
- package/docs/_posts/components/Lighting/DirectionalLight.md +1 -1
- package/docs/_posts/components/Lighting/PointLight.md +1 -1
- package/docs/_posts/components/Lighting/SpotLight.md +1 -1
- package/docs/_posts/components/NURBS/NurbsCurve.md +1 -1
- package/docs/_posts/components/NURBS/NurbsPatchSurface.md +1 -1
- package/docs/_posts/components/NURBS/NurbsSweptSurface.md +1 -1
- package/docs/_posts/components/Navigation/Billboard.md +1 -1
- package/docs/_posts/components/Navigation/Collision.md +1 -1
- package/docs/_posts/components/Navigation/NavigationInfo.md +1 -1
- package/docs/_posts/components/Navigation/OrthoViewpoint.md +1 -1
- package/docs/_posts/components/Navigation/Viewpoint.md +1 -1
- package/docs/_posts/components/Networking/Anchor.md +1 -1
- package/docs/_posts/components/Networking/Inline.md +1 -1
- package/docs/_posts/components/Networking/LoadSensor.md +1 -1
- package/docs/_posts/components/ParticleSystems/ConeEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +1 -1
- package/docs/_posts/components/ParticleSystems/ParticleSystem.md +1 -1
- package/docs/_posts/components/ParticleSystems/PointEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +1 -1
- package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +1 -1
- package/docs/_posts/components/Picking/LinePickSensor.md +1 -1
- package/docs/_posts/components/Picking/PointPickSensor.md +1 -1
- package/docs/_posts/components/Picking/PrimitivePickSensor.md +1 -1
- package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +1 -1
- package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +1 -1
- package/docs/_posts/components/Rendering/ClipPlane.md +1 -1
- package/docs/_posts/components/Rendering/Color.md +1 -1
- package/docs/_posts/components/Rendering/ColorRGBA.md +1 -1
- package/docs/_posts/components/Rendering/Coordinate.md +1 -1
- package/docs/_posts/components/Rendering/IndexedLineSet.md +1 -1
- package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +1 -1
- package/docs/_posts/components/Rendering/IndexedTriangleSet.md +1 -1
- package/docs/_posts/components/Rendering/LineSet.md +1 -1
- package/docs/_posts/components/Rendering/PointSet.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +1 -1
- package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +1 -1
- package/docs/_posts/components/Shaders/ComposedShader.md +1 -1
- package/docs/_posts/components/Shaders/FloatVertexAttribute.md +1 -1
- package/docs/_posts/components/Shaders/ShaderPart.md +1 -1
- package/docs/_posts/components/Shape/Appearance.md +1 -1
- package/docs/_posts/components/Shape/FillProperties.md +1 -1
- package/docs/_posts/components/Shape/LineProperties.md +1 -1
- package/docs/_posts/components/Shape/Material.md +1 -1
- package/docs/_posts/components/Shape/TwoSidedMaterial.md +1 -1
- package/docs/_posts/components/Sound/AudioClip.md +1 -1
- package/docs/_posts/components/Text/FontStyle.md +1 -1
- package/docs/_posts/components/Text/Text.md +1 -1
- package/docs/_posts/components/Texturing/ImageTexture.md +1 -1
- package/docs/_posts/components/Texturing/MovieTexture.md +1 -1
- package/docs/_posts/components/Texturing/MultiTexture.md +1 -1
- package/docs/_posts/components/Texturing/PixelTexture.md +1 -1
- package/docs/_posts/components/Texturing3D/ImageTexture3D.md +1 -1
- package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +1 -1
- package/docs/_posts/components/Time/TimeSensor.md +1 -1
- package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +1 -1
- package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +1 -1
- package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +1 -1
- package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +1 -1
- package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +1 -1
- package/docs/_posts/components/VolumeRendering/VolumeData.md +1 -1
- package/docs/_posts/components/X_ITE/BlendMode.md +1 -1
- package/docs/_posts/custom-shaders.md +1 -1
- package/docs/_posts/getting-started.md +7 -2
- package/docs/_posts/reference/browser-services.md +6 -0
- package/docs/_posts/reference/field-services-and-objects.md +26 -6
- package/docs/_posts/tutorials/adding-backgrounds.md +2 -2
- package/docs/_posts/tutorials/adding-sound.md +1 -1
- package/docs/_posts/tutorials/building-a-x3d-world.md +1 -1
- package/docs/_posts/tutorials/building-elevation-grids.md +1 -1
- package/docs/_posts/tutorials/building-primitive-shapes.md +2 -2
- package/docs/_posts/tutorials/controlling-appearance-with-materials.md +1 -1
- package/docs/_posts/tutorials/controlling-detail.md +1 -1
- package/docs/_posts/tutorials/hello-world.md +1 -1
- package/docs/_posts/tutorials/naming-nodes.md +1 -1
- package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +1 -1
- package/package.json +3 -3
- package/src/lib/jquery.js +13 -0
- package/src/standard/Geospatial/UniversalTransverseMercator.js +0 -1
- package/src/standard/Math/Algorithms/eigen_decomposition.js +9 -9
- package/src/standard/Math/Geometry/Box2.js +37 -24
- package/src/standard/Math/Geometry/Box3.js +37 -24
- package/src/standard/Math/Geometry/Cylinder3.js +1 -1
- package/src/standard/Math/Geometry/Line2.js +1 -1
- package/src/standard/Math/Geometry/Line3.js +1 -1
- package/src/standard/Math/Geometry/Plane3.js +1 -1
- package/src/standard/Math/Geometry/Sphere3.js +14 -14
- package/src/standard/Math/Numbers/Color3.js +10 -18
- package/src/standard/Math/Numbers/Color4.js +12 -23
- package/src/standard/Math/Numbers/Complex.js +59 -58
- package/src/standard/Math/Numbers/Matrix2.js +31 -45
- package/src/standard/Math/Numbers/Matrix3.js +59 -94
- package/src/standard/Math/Numbers/Matrix4.js +73 -114
- package/src/standard/Math/Numbers/Quaternion.js +70 -132
- package/src/standard/Math/Numbers/Rotation4.js +15 -42
- package/src/standard/Math/Numbers/Vector2.js +12 -78
- package/src/standard/Math/Numbers/Vector3.js +17 -94
- package/src/standard/Math/Numbers/Vector4.js +22 -94
- package/src/x_ite/Base/X3DInfoArray.js +9 -7
- package/src/x_ite/Base/X3DObject.js +9 -32
- package/src/x_ite/Base/X3DObjectArrayField.js +35 -64
- package/src/x_ite/Browser/Core/BrowserOptions.js +37 -0
- package/src/x_ite/Browser/Core/X3DCoreContext.js +21 -3
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +4 -4
- package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +12 -7
- package/src/x_ite/Browser/Layout/ScreenText.js +9 -4
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +9 -9
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -3
- package/src/x_ite/Browser/Navigation/WalkViewer.js +2 -2
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +7 -7
- package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +0 -1
- package/src/x_ite/Browser/Text/X3DTextGeometry.js +2 -3
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +61 -68
- package/src/x_ite/Browser/X3DBrowserContext.js +8 -8
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +1 -1
- package/src/x_ite/Components/Followers/OrientationChaser.js +3 -3
- package/src/x_ite/Components/Followers/OrientationDamper.js +3 -3
- package/src/x_ite/Components/Geometry2D/Rectangle2D.js +2 -3
- package/src/x_ite/Components/Geometry3D/Box.js +3 -10
- package/src/x_ite/Components/Geometry3D/Cone.js +1 -1
- package/src/x_ite/Components/Geometry3D/Cylinder.js +2 -2
- package/src/x_ite/Components/Geometry3D/Extrusion.js +3 -3
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +2 -2
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +2 -2
- package/src/x_ite/Components/Layering/X3DLayerNode.js +1 -1
- package/src/x_ite/Components/Layout/Layout.js +1 -1
- package/src/x_ite/Components/Navigation/Billboard.js +1 -1
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +12 -13
- package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +7 -7
- package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +9 -9
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +2 -2
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +3 -3
- package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +1 -1
- package/src/x_ite/Execution/X3DExecutionContext.js +52 -58
- package/src/x_ite/Execution/X3DExportedNode.js +13 -11
- package/src/x_ite/Execution/X3DImportedNode.js +25 -25
- package/src/x_ite/Execution/X3DScene.js +129 -53
- package/src/x_ite/Fields/ArrayFields.js +1 -1
- package/src/x_ite/Fields/SFColor.js +10 -15
- package/src/x_ite/Fields/SFColorRGBA.js +11 -18
- package/src/x_ite/Fields/SFImage.js +38 -33
- package/src/x_ite/Fields/SFMatrix3.js +1 -3
- package/src/x_ite/Fields/SFMatrix4.js +1 -5
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +6 -5
- package/src/x_ite/Fields/SFNodeCache.js +2 -2
- package/src/x_ite/Fields/SFRotation.js +14 -21
- package/src/x_ite/Fields/SFString.js +0 -1
- package/src/x_ite/Fields/SFVec2.js +8 -15
- package/src/x_ite/Fields/SFVec3.js +11 -18
- package/src/x_ite/Fields/SFVec4.js +12 -23
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +17 -16
- package/src/x_ite/Parser/SVGParser.js +3 -3
- package/src/x_ite/Parser/X3DOptimizer.js +1 -1
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +26 -27
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +16 -15
- package/src/x_ite/Rendering/X3DRenderObject.js +3 -3
- package/src/x_ite/Routing/X3DRoute.js +26 -25
- package/src/x_ite/X3DCanvasElement.js +1 -0
- package/docs/assets/js/autoupdate.js +0 -25
- 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 .
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
Object .
|
|
210
|
-
|
|
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 .
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
Object .
|
|
174
|
-
|
|
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
|
-
|
|
160
|
-
return this .real + " " + this .imag + "i";
|
|
158
|
+
let string = "";
|
|
161
159
|
|
|
162
|
-
|
|
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 .
|
|
178
|
+
Object .defineProperties (Complex .prototype,
|
|
167
179
|
{
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
return this .real;
|
|
171
|
-
},
|
|
172
|
-
set: function (value)
|
|
180
|
+
length: { value: 2 },
|
|
181
|
+
0:
|
|
173
182
|
{
|
|
174
|
-
|
|
183
|
+
get: function ()
|
|
184
|
+
{
|
|
185
|
+
return this .real;
|
|
186
|
+
},
|
|
187
|
+
set: function (value)
|
|
188
|
+
{
|
|
189
|
+
this .real = value;
|
|
190
|
+
},
|
|
175
191
|
},
|
|
176
|
-
|
|
177
|
-
configurable: false
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
Object .defineProperty (Complex .prototype, "1",
|
|
181
|
-
{
|
|
182
|
-
get: function ()
|
|
192
|
+
1:
|
|
183
193
|
{
|
|
184
|
-
|
|
194
|
+
get: function ()
|
|
195
|
+
{
|
|
196
|
+
return this .imag;
|
|
197
|
+
},
|
|
198
|
+
set: function (value)
|
|
199
|
+
{
|
|
200
|
+
this .imag = value;
|
|
201
|
+
},
|
|
185
202
|
},
|
|
186
|
-
|
|
203
|
+
magnitude:
|
|
187
204
|
{
|
|
188
|
-
|
|
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 .
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
}
|
|
207
|
+
if (this .real)
|
|
208
|
+
{
|
|
209
|
+
if (this .imag)
|
|
210
|
+
return Math .hypot (this .real, this .imag);
|
|
205
211
|
|
|
206
|
-
|
|
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
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
215
|
+
return Math .abs (this .imag);
|
|
216
|
+
},
|
|
217
|
+
set: function (magnitude)
|
|
218
|
+
{
|
|
219
|
+
this .setPolar (magnitude, this .angle);
|
|
220
|
+
},
|
|
221
221
|
},
|
|
222
|
-
|
|
222
|
+
angle:
|
|
223
223
|
{
|
|
224
|
-
|
|
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
|
|
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
|
-
|
|
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 .
|
|
234
|
+
Object .defineProperties (Matrix2 .prototype,
|
|
240
235
|
{
|
|
241
|
-
|
|
236
|
+
order: { value: 2 },
|
|
237
|
+
length: { value: 4 },
|
|
238
|
+
x:
|
|
242
239
|
{
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
})(),
|
|
247
|
-
enumerable: false,
|
|
248
|
-
configurable: false
|
|
249
|
-
});
|
|
240
|
+
get: (function ()
|
|
241
|
+
{
|
|
242
|
+
const vector = new Vector2 (0, 0);
|
|
250
243
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
244
|
+
return function () { return vector .set (this [0], this [1]); };
|
|
245
|
+
})(),
|
|
246
|
+
},
|
|
247
|
+
y:
|
|
254
248
|
{
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
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
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
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
|
-
|
|
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
|
|
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 .
|
|
577
|
+
Object .defineProperties (Matrix3 .prototype,
|
|
582
578
|
{
|
|
583
|
-
|
|
579
|
+
order: { value: 3 },
|
|
580
|
+
length: { value: 9 },
|
|
581
|
+
x:
|
|
584
582
|
{
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
})(),
|
|
589
|
-
enumerable: false,
|
|
590
|
-
configurable: false
|
|
591
|
-
});
|
|
583
|
+
get: (function ()
|
|
584
|
+
{
|
|
585
|
+
const vector = new Vector3 (0, 0, 0);
|
|
592
586
|
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
587
|
+
return function () { return vector .set (this [0], this [1], this [2]); };
|
|
588
|
+
})(),
|
|
589
|
+
},
|
|
590
|
+
y:
|
|
596
591
|
{
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
})(),
|
|
601
|
-
enumerable: false,
|
|
602
|
-
configurable: false
|
|
603
|
-
});
|
|
592
|
+
get: (function ()
|
|
593
|
+
{
|
|
594
|
+
const vector = new Vector3 (0, 0, 0);
|
|
604
595
|
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
596
|
+
return function () { return vector .set (this [3], this [4], this [5]); };
|
|
597
|
+
})(),
|
|
598
|
+
},
|
|
599
|
+
z:
|
|
608
600
|
{
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
})(),
|
|
613
|
-
enumerable: false,
|
|
614
|
-
configurable: false
|
|
615
|
-
});
|
|
601
|
+
get: (function ()
|
|
602
|
+
{
|
|
603
|
+
const vector = new Vector3 (0, 0, 0);
|
|
616
604
|
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
605
|
+
return function () { return vector .set (this [6], this [7], this [8]); };
|
|
606
|
+
})(),
|
|
607
|
+
},
|
|
608
|
+
xAxis:
|
|
620
609
|
{
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
})(),
|
|
625
|
-
enumerable: false,
|
|
626
|
-
configurable: false
|
|
627
|
-
});
|
|
610
|
+
get: (function ()
|
|
611
|
+
{
|
|
612
|
+
const vector = new Vector2 (0, 0);
|
|
628
613
|
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
614
|
+
return function () { return vector .set (this [0], this [1]); };
|
|
615
|
+
})(),
|
|
616
|
+
},
|
|
617
|
+
yAxis:
|
|
632
618
|
{
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
})(),
|
|
637
|
-
enumerable: false,
|
|
638
|
-
configurable: false
|
|
639
|
-
});
|
|
619
|
+
get: (function ()
|
|
620
|
+
{
|
|
621
|
+
const vector = new Vector2 (0, 0);
|
|
640
622
|
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
623
|
+
return function () { return vector .set (this [3], this [4]); };
|
|
624
|
+
})(),
|
|
625
|
+
},
|
|
626
|
+
origin:
|
|
644
627
|
{
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
})(),
|
|
649
|
-
enumerable: false,
|
|
650
|
-
configurable: false
|
|
651
|
-
});
|
|
628
|
+
get: (function ()
|
|
629
|
+
{
|
|
630
|
+
const vector = new Vector2 (0, 0);
|
|
652
631
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
632
|
+
return function () { return vector .set (this [6], this [7]); };
|
|
633
|
+
})(),
|
|
634
|
+
},
|
|
635
|
+
submatrix:
|
|
656
636
|
{
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
return function ()
|
|
637
|
+
get: (function ()
|
|
660
638
|
{
|
|
661
|
-
matrix
|
|
662
|
-
|
|
663
|
-
return
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
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 ();
|