x_ite 4.7.12 → 5.0.0
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/settings.json +9 -2
- package/Makefile +27 -24
- package/build/bin/version-number.pl +1 -1
- package/build/bin/version.pl +3 -3
- package/build/parts/default.start.frag.js +2 -2
- package/build/parts/x_ite.end.frag.js +1 -2
- package/build/parts/x_ite.start.frag.js +4 -7
- package/dist/assets/components/annotation.js +312 -312
- package/dist/assets/components/annotation.min.js +1 -1
- package/dist/assets/components/cad-geometry.js +536 -538
- package/dist/assets/components/cad-geometry.min.js +1 -1
- package/dist/assets/components/cube-map-texturing.js +797 -796
- package/dist/assets/components/cube-map-texturing.min.js +1 -1
- package/dist/assets/components/dis.js +487 -472
- package/dist/assets/components/dis.min.js +1 -1
- package/dist/assets/components/event-utilities.js +486 -505
- package/dist/assets/components/event-utilities.min.js +1 -1
- package/dist/assets/components/geometry2d.js +1221 -1271
- package/dist/assets/components/geometry2d.min.js +1 -1
- package/dist/assets/components/geospatial.js +2657 -2653
- package/dist/assets/components/geospatial.min.js +1 -2
- package/dist/assets/components/h-anim.js +640 -640
- package/dist/assets/components/h-anim.min.js +1 -1
- package/dist/assets/components/key-device-sensor.js +547 -549
- package/dist/assets/components/key-device-sensor.min.js +1 -1
- package/dist/assets/components/layout.js +1435 -1433
- package/dist/assets/components/layout.min.js +1 -1
- package/dist/assets/components/nurbs.js +3942 -3964
- package/dist/assets/components/nurbs.min.js +1 -2
- package/dist/assets/components/particle-systems.js +3227 -3238
- package/dist/assets/components/particle-systems.min.js +1 -2
- package/dist/assets/components/picking.js +1704 -1712
- package/dist/assets/components/picking.min.js +1 -1
- package/dist/assets/components/projective-texture-mapping.js +553 -553
- package/dist/assets/components/projective-texture-mapping.min.js +1 -1
- package/dist/assets/components/rigid-body-physics.js +3255 -3265
- package/dist/assets/components/rigid-body-physics.min.js +1 -59
- package/dist/assets/components/scripting.js +544 -549
- package/dist/assets/components/scripting.min.js +1 -1
- package/dist/assets/components/texturing-3d.js +2716 -2651
- package/dist/assets/components/texturing-3d.min.js +131 -48
- package/dist/assets/components/volume-rendering.js +2815 -2804
- package/dist/assets/components/volume-rendering.min.js +1 -3
- package/dist/assets/components/x_ite.js +142 -144
- package/dist/assets/components/x_ite.min.js +1 -1
- package/dist/assets/shaders/webgl1/Gouraud.fs +52 -15
- package/dist/assets/shaders/webgl1/Gouraud.vs +8 -9
- package/dist/assets/shaders/webgl1/{Wireframe.fs → Line.fs} +0 -0
- package/dist/assets/shaders/webgl1/{Wireframe.vs → Line.vs} +1 -1
- package/dist/assets/shaders/webgl1/PBR.fs +785 -0
- package/dist/assets/shaders/webgl1/PBR.vs +37 -0
- package/dist/assets/shaders/webgl1/Phong.fs +204 -32
- package/dist/assets/shaders/webgl1/Phong.vs +2 -3
- package/dist/assets/shaders/webgl1/{PointSet.fs → Point.fs} +59 -33
- package/dist/assets/shaders/webgl1/{PointSet.vs → Point.vs} +2 -2
- package/dist/assets/shaders/webgl1/Unlit.fs +73 -18
- package/dist/assets/shaders/webgl1/Unlit.vs +2 -3
- package/dist/assets/shaders/webgl2/Gouraud.fs +31 -19
- package/dist/assets/shaders/webgl2/Gouraud.vs +8 -9
- package/dist/assets/shaders/webgl2/{Wireframe.fs → Line.fs} +0 -0
- package/dist/assets/shaders/webgl2/{Wireframe.vs → Line.vs} +1 -1
- package/dist/assets/shaders/webgl2/PBR.fs +913 -0
- package/dist/assets/shaders/webgl2/PBR.vs +37 -0
- package/dist/assets/shaders/webgl2/Phong.fs +196 -35
- package/dist/assets/shaders/webgl2/Phong.vs +2 -3
- package/dist/assets/shaders/webgl2/{PointSet.fs → Point.fs} +87 -86
- package/dist/assets/shaders/webgl2/{PointSet.vs → Point.vs} +2 -2
- package/dist/assets/shaders/webgl2/Unlit.fs +55 -22
- package/dist/assets/shaders/webgl2/Unlit.vs +2 -3
- package/dist/example.html +2 -2
- package/dist/x_ite.css +316 -328
- package/dist/x_ite.js +55663 -52034
- package/dist/x_ite.min.js +79 -41
- package/dist/x_ite.zip +0 -0
- package/docs/Custom-Shaders.md +4 -3
- package/docs/_config.yml +1 -1
- package/docs/index.md +60 -7
- package/package.json +20 -20
- package/src/assets/components/annotation.js +24 -24
- package/src/assets/components/cad-geometry.js +24 -25
- package/src/assets/components/cube-map-texturing.js +18 -19
- package/src/assets/components/dis.js +22 -23
- package/src/assets/components/event-utilities.js +28 -29
- package/src/assets/components/geometry2d.js +28 -29
- package/src/assets/components/geospatial.js +34 -35
- package/src/assets/components/h-anim.js +22 -22
- package/src/assets/components/key-device-sensor.js +18 -19
- package/src/assets/components/layout.js +24 -25
- package/src/assets/components/nurbs.js +44 -45
- package/src/assets/components/particle-systems.js +36 -37
- package/src/assets/components/picking.js +25 -25
- package/src/assets/components/projective-texture-mapping.js +16 -16
- package/src/assets/components/rigid-body-physics.js +48 -48
- package/src/assets/components/scripting.js +14 -15
- package/src/assets/components/texturing-3d.js +26 -27
- package/src/assets/components/volume-rendering.js +46 -46
- package/src/assets/components/x_ite.js +12 -12
- package/src/assets/shaders/Types.glsl +230 -51
- package/src/assets/shaders/webgl1/Background.fs +2 -2
- package/src/assets/shaders/webgl1/Background.vs +4 -4
- package/src/assets/shaders/webgl1/Depth.fs +2 -2
- package/src/assets/shaders/webgl1/Depth.vs +3 -3
- package/src/assets/shaders/webgl1/Fallback.fs +15 -15
- package/src/assets/shaders/webgl1/Fallback.vs +5 -5
- package/src/assets/shaders/webgl1/FallbackUnlit.fs +4 -4
- package/src/assets/shaders/webgl1/FallbackUnlit.vs +3 -3
- package/src/assets/shaders/webgl1/Gouraud.fs +14 -14
- package/src/assets/shaders/webgl1/Gouraud.vs +54 -69
- package/src/assets/shaders/webgl1/Line.fs +74 -0
- package/src/assets/shaders/webgl1/Line.vs +63 -0
- package/src/assets/shaders/webgl1/PBR.fs +364 -0
- package/src/assets/shaders/webgl1/PBR.vs +46 -0
- package/src/assets/shaders/webgl1/Phong.fs +207 -84
- package/src/assets/shaders/webgl1/Phong.vs +17 -18
- package/src/assets/shaders/webgl1/Point.fs +88 -0
- package/src/assets/shaders/webgl1/Point.vs +70 -0
- package/src/assets/shaders/webgl1/Unlit.fs +53 -28
- package/src/assets/shaders/webgl1/Unlit.vs +17 -18
- package/src/assets/shaders/webgl1/include/ClipPlanes.glsl +7 -7
- package/src/assets/shaders/webgl1/include/Colors.glsl +27 -0
- package/src/assets/shaders/webgl1/include/Fog.glsl +17 -17
- package/src/assets/shaders/webgl1/include/Hatch.glsl +8 -8
- package/src/assets/shaders/webgl1/include/Normal.glsl +44 -0
- package/src/assets/shaders/webgl1/include/Pack.glsl +11 -11
- package/src/assets/shaders/webgl1/include/Perlin.glsl +19 -19
- package/src/assets/shaders/webgl1/include/Shadow.glsl +212 -212
- package/src/assets/shaders/webgl1/include/SpotFactor.glsl +12 -0
- package/src/assets/shaders/webgl1/include/Texture.glsl +444 -393
- package/src/assets/shaders/webgl2/Background.fs +2 -2
- package/src/assets/shaders/webgl2/Background.vs +4 -4
- package/src/assets/shaders/webgl2/Depth.fs +2 -2
- package/src/assets/shaders/webgl2/Depth.vs +3 -3
- package/src/assets/shaders/webgl2/Gouraud.fs +14 -14
- package/src/assets/shaders/webgl2/Gouraud.vs +54 -69
- package/src/assets/shaders/webgl2/Line.fs +73 -0
- package/src/assets/shaders/webgl2/Line.vs +64 -0
- package/src/assets/shaders/webgl2/PBR.fs +370 -0
- package/src/assets/shaders/webgl2/PBR.vs +48 -0
- package/src/assets/shaders/webgl2/Phong.fs +219 -84
- package/src/assets/shaders/webgl2/Phong.vs +17 -18
- package/src/assets/shaders/webgl2/Point.fs +87 -0
- package/src/assets/shaders/webgl2/Point.vs +71 -0
- package/src/assets/shaders/webgl2/Unlit.fs +56 -28
- package/src/assets/shaders/webgl2/Unlit.vs +17 -18
- package/src/assets/shaders/webgl2/include/ClipPlanes.glsl +7 -7
- package/src/assets/shaders/webgl2/include/Colors.glsl +27 -0
- package/src/assets/shaders/webgl2/include/Fog.glsl +34 -34
- package/src/assets/shaders/webgl2/include/Hatch.glsl +8 -8
- package/src/assets/shaders/webgl2/include/Normal.glsl +46 -0
- package/src/assets/shaders/webgl2/include/Pack.glsl +11 -11
- package/src/assets/shaders/webgl2/include/Perlin.glsl +19 -20
- package/src/assets/shaders/webgl2/include/Shadow.glsl +226 -226
- package/src/assets/shaders/webgl2/include/SpotFactor.glsl +12 -0
- package/src/assets/shaders/webgl2/include/Texture.glsl +557 -537
- package/src/bookmarks.js +92 -92
- package/src/examples.js +147 -147
- package/src/lib/ammojs/AmmoJS.js +2 -2
- package/src/lib/ammojs/Makefile +14 -15
- package/src/lib/jquery.fullscreen-min.js +2 -2
- package/src/lib/nurbs/extras/sample.js +215 -215
- package/src/lib/nurbs/nurbs.js +326 -326
- package/src/lib/nurbs/src/evaluate.js +405 -405
- package/src/lib/nurbs/src/numerical-derivative.js +48 -48
- package/src/lib/nurbs/src/support.js +143 -143
- package/src/lib/nurbs/src/transform.js +70 -70
- package/src/lib/nurbs/src/utils/accessor-preamble.js +23 -23
- package/src/lib/nurbs/src/utils/bisection-search.js +18 -18
- package/src/lib/nurbs/src/utils/cache-key.js +49 -50
- package/src/lib/nurbs/src/utils/create-accessors.js +101 -101
- package/src/lib/nurbs/src/utils/infer-type.js +43 -43
- package/src/lib/nurbs/src/utils/is-array-like.js +5 -5
- package/src/lib/nurbs/src/utils/is-ndarray-like.js +11 -11
- package/src/lib/nurbs/src/utils/is-ndarray.js +13 -13
- package/src/lib/nurbs/src/utils/ndloop.js +18 -18
- package/src/lib/nurbs/src/utils/size-getter.js +15 -15
- package/src/lib/nurbs/src/utils/variable.js +25 -25
- package/src/lib/opentype.js/bin/ot +27 -27
- package/src/lib/opentype.js/dist/opentype.js +5 -5
- package/src/lib/opentype.js/font-inspector.html +1 -1
- package/src/lib/opentype.js/site.css +1 -3
- package/src/locale/gettext.js +73 -73
- package/src/spinner.css +40 -43
- package/src/standard/Geospatial/Geodetic.js +195 -195
- package/src/standard/Geospatial/ReferenceEllipsoids.js +43 -43
- package/src/standard/Geospatial/UniversalTransverseMercator.js +159 -159
- package/src/standard/Math/Algorithm.js +199 -187
- package/src/standard/Math/Algorithms/Bezier.js +80 -80
- package/src/standard/Math/Algorithms/MergeSort.js +49 -49
- package/src/standard/Math/Algorithms/PartialSort.js +36 -36
- package/src/standard/Math/Algorithms/QuickSort.js +51 -51
- package/src/standard/Math/Algorithms/SAT.js +62 -62
- package/src/standard/Math/Algorithms/eigendecomposition.js +141 -141
- package/src/standard/Math/Geometry/Box2.js +205 -205
- package/src/standard/Math/Geometry/Box3.js +624 -624
- package/src/standard/Math/Geometry/Camera.js +68 -68
- package/src/standard/Math/Geometry/Cylinder3.js +112 -112
- package/src/standard/Math/Geometry/Line3.js +188 -153
- package/src/standard/Math/Geometry/Plane3.js +120 -120
- package/src/standard/Math/Geometry/Sphere3.js +148 -148
- package/src/standard/Math/Geometry/Spheroid3.js +38 -38
- package/src/standard/Math/Geometry/Triangle2.js +19 -19
- package/src/standard/Math/Geometry/Triangle3.js +148 -148
- package/src/standard/Math/Geometry/ViewVolume.js +359 -359
- package/src/standard/Math/Numbers/Color3.js +219 -214
- package/src/standard/Math/Numbers/Color4.js +148 -142
- package/src/standard/Math/Numbers/Complex.js +139 -139
- package/src/standard/Math/Numbers/Matrix2.js +193 -193
- package/src/standard/Math/Numbers/Matrix3.js +679 -679
- package/src/standard/Math/Numbers/Matrix4.js +883 -883
- package/src/standard/Math/Numbers/Quaternion.js +496 -496
- package/src/standard/Math/Numbers/Rotation4.js +421 -415
- package/src/standard/Math/Numbers/Vector2.js +220 -220
- package/src/standard/Math/Numbers/Vector3.js +280 -280
- package/src/standard/Math/Numbers/Vector4.js +296 -296
- package/src/standard/Math/Utility/BVH.js +303 -303
- package/src/standard/Math/Utility/MatrixStack.js +64 -64
- package/src/standard/Networking/BinaryTransport.js +67 -67
- package/src/standard/Time/MicroTime.js +22 -22
- package/src/standard/Utility/DataStorage.js +85 -81
- package/src/standard/Utility/MapUtilities.js +14 -1
- package/src/standard/Utility/ObjectCache.js +24 -24
- package/src/standard/Utility/Shuffle.js +13 -13
- package/src/tests.js +355 -384
- package/src/x_ite/Base/Events.js +64 -55
- package/src/x_ite/{Basic/X3DArrayField.js → Base/FieldArray.js} +19 -12
- package/src/x_ite/Base/FieldDefinitionArray.js +75 -0
- package/src/x_ite/{Basic/FieldDefinitionArray.js → Base/X3DArrayField.js} +35 -59
- package/src/x_ite/Base/X3DBaseNode.js +588 -0
- package/src/x_ite/{Bits → Base}/X3DCast.js +23 -22
- package/src/x_ite/Base/X3DChildObject.js +68 -62
- package/src/x_ite/{Bits → Base}/X3DConstants.js +85 -85
- package/src/x_ite/Base/X3DEventObject.js +73 -68
- package/src/x_ite/Base/X3DField.js +450 -0
- package/src/x_ite/Base/X3DFieldDefinition.js +78 -0
- package/src/x_ite/Base/X3DInfoArray.js +291 -0
- package/src/x_ite/Base/X3DObject.js +152 -109
- package/src/x_ite/Base/X3DObjectArrayField.js +573 -0
- package/src/x_ite/Base/X3DTypedArrayField.js +866 -0
- package/src/x_ite/Browser/Core/BrowserOptions.js +376 -394
- package/src/x_ite/Browser/Core/BrowserProperties.js +38 -38
- package/src/x_ite/Browser/Core/BrowserTimings.js +173 -172
- package/src/x_ite/Browser/Core/ContextMenu.js +547 -551
- package/src/x_ite/Browser/Core/Notification.js +57 -56
- package/src/x_ite/Browser/Core/PrimitiveQuality.js +8 -8
- package/src/x_ite/Browser/Core/RenderingProperties.js +55 -55
- package/src/x_ite/Browser/Core/Shading.js +10 -10
- package/src/x_ite/Browser/Core/TextureQuality.js +8 -8
- package/src/x_ite/Browser/Core/X3DCoreContext.js +746 -724
- package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +33 -25
- package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +23 -23
- package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +127 -127
- package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +25 -25
- package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +25 -25
- package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +56 -55
- package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +116 -116
- package/src/x_ite/Browser/Geometry2D/Rectangle2DOptions.js +59 -59
- package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +80 -77
- package/src/x_ite/Browser/Geometry3D/BoxOptions.js +70 -70
- package/src/x_ite/Browser/Geometry3D/ConeOptions.js +26 -26
- package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +27 -27
- package/src/x_ite/Browser/Geometry3D/IcoSphere.js +357 -357
- package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +61 -61
- package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +243 -241
- package/src/x_ite/Browser/Geometry3D/X3DGeometry3DContext.js +37 -34
- package/src/x_ite/Browser/Geospatial/Geocentric.js +27 -27
- package/src/x_ite/Browser/Geospatial/Geospatial.js +157 -156
- package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +38 -33
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator.js +128 -130
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1.js +39 -41
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator2.js +3 -3
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator3.js +3 -3
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +54 -56
- package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +54 -56
- package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +44 -41
- package/src/x_ite/Browser/Layering/X3DLayeringContext.js +20 -18
- package/src/x_ite/Browser/Layout/ScreenText.js +406 -405
- package/src/x_ite/Browser/Layout/X3DLayoutContext.js +36 -30
- package/src/x_ite/Browser/Lighting/X3DLightingContext.js +54 -50
- package/src/x_ite/Browser/NURBS/NURBS.js +417 -417
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +753 -753
- package/src/x_ite/Browser/Navigation/FlyViewer.js +39 -39
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +461 -461
- package/src/x_ite/Browser/Navigation/NoneViewer.js +18 -18
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +193 -193
- package/src/x_ite/Browser/Navigation/WalkViewer.js +61 -61
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +709 -710
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +188 -182
- package/src/x_ite/Browser/Navigation/X3DViewer.js +160 -160
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +152 -143
- package/src/x_ite/Browser/Networking/urls.js +31 -31
- package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +17 -13
- package/src/x_ite/Browser/Picking/IntersectionType.js +7 -7
- package/src/x_ite/Browser/Picking/MatchCriterion.js +8 -8
- package/src/x_ite/Browser/Picking/SortOrder.js +9 -9
- package/src/x_ite/Browser/Picking/VolumePicker.js +138 -138
- package/src/x_ite/Browser/Picking/X3DPickingContext.js +80 -69
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +208 -209
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer.js +34 -34
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +269 -263
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +132 -119
- package/src/x_ite/Browser/RigidBodyPhysics/AppliedParametersType.js +14 -14
- package/src/x_ite/Browser/Scripting/X3DScriptingContext.js +20 -19
- package/src/x_ite/Browser/Scripting/evaluate.js +7 -7
- package/src/x_ite/Browser/Shaders/Shader.js +152 -159
- package/src/x_ite/Browser/Shaders/ShaderSource.js +81 -63
- package/src/x_ite/Browser/Shaders/ShaderTest.js +97 -98
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +256 -249
- package/src/x_ite/Browser/Shape/AlphaMode.js +9 -9
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +111 -89
- package/src/x_ite/Browser/Sound/X3DSoundContext.js +11 -11
- package/src/x_ite/Browser/Text/PolygonText.js +319 -319
- package/src/x_ite/Browser/Text/TextAlignment.js +9 -9
- package/src/x_ite/Browser/Text/X3DTextContext.js +72 -65
- package/src/x_ite/Browser/Text/X3DTextGeometry.js +506 -506
- package/src/x_ite/Browser/Texturing/MultiTextureFunctionType.js +8 -8
- package/src/x_ite/Browser/Texturing/MultiTextureModeType.js +25 -25
- package/src/x_ite/Browser/Texturing/MultiTextureSourceType.js +9 -9
- package/src/x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType.js +17 -17
- package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +259 -224
- package/src/x_ite/Browser/Texturing3D/DICOMParser.js +1066 -1066
- package/src/x_ite/Browser/Texturing3D/NRRDParser.js +641 -630
- package/src/x_ite/Browser/Time/X3DTimeContext.js +54 -37
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/VolumeStyle.fs +55 -55
- package/src/x_ite/Browser/VolumeRendering/VolumeStyle.vs +5 -5
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +52 -41
- package/src/x_ite/Browser/X3DBrowser.js +819 -755
- package/src/x_ite/Browser/X3DBrowserContext.js +253 -220
- package/src/x_ite/Components/Annotation/AnnotationLayer.js +43 -43
- package/src/x_ite/Components/Annotation/AnnotationTarget.js +38 -38
- package/src/x_ite/Components/Annotation/GroupAnnotation.js +48 -48
- package/src/x_ite/Components/Annotation/IconAnnotation.js +46 -46
- package/src/x_ite/Components/Annotation/TextAnnotation.js +39 -39
- package/src/x_ite/Components/Annotation/URLAnnotation.js +38 -38
- package/src/x_ite/Components/Annotation/X3DAnnotationNode.js +16 -16
- package/src/x_ite/Components/CADGeometry/CADAssembly.js +41 -41
- package/src/x_ite/Components/CADGeometry/CADFace.js +189 -189
- package/src/x_ite/Components/CADGeometry/CADLayer.js +38 -38
- package/src/x_ite/Components/CADGeometry/CADPart.js +46 -46
- package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +67 -67
- package/src/x_ite/Components/CADGeometry/QuadSet.js +64 -63
- package/src/x_ite/Components/CADGeometry/X3DProductStructureChildNode.js +13 -15
- package/src/x_ite/Components/Core/MetadataBoolean.js +38 -40
- package/src/x_ite/Components/Core/MetadataDouble.js +38 -40
- package/src/x_ite/Components/Core/MetadataFloat.js +38 -40
- package/src/x_ite/Components/Core/MetadataInteger.js +38 -40
- package/src/x_ite/Components/Core/MetadataSet.js +38 -40
- package/src/x_ite/Components/Core/MetadataString.js +38 -40
- package/src/x_ite/Components/Core/WorldInfo.js +42 -42
- package/src/x_ite/Components/Core/X3DBindableNode.js +20 -20
- package/src/x_ite/Components/Core/X3DChildNode.js +38 -40
- package/src/x_ite/Components/Core/X3DInfoNode.js +13 -15
- package/src/x_ite/Components/Core/X3DMetadataObject.js +11 -13
- package/src/x_ite/Components/Core/X3DNode.js +795 -14
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +585 -479
- package/src/x_ite/Components/Core/X3DSensorNode.js +13 -15
- package/src/x_ite/Components/Core.js +39 -39
- package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +193 -200
- package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +209 -206
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +213 -219
- package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +69 -60
- package/src/x_ite/Components/DIS/DISEntityManager.js +38 -40
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +59 -41
- package/src/x_ite/Components/DIS/EspduTransform.js +128 -128
- package/src/x_ite/Components/DIS/ReceiverPdu.js +68 -68
- package/src/x_ite/Components/DIS/SignalPdu.js +68 -68
- package/src/x_ite/Components/DIS/TransmitterPdu.js +84 -84
- package/src/x_ite/Components/EnvironmentalEffects/Background.js +87 -89
- package/src/x_ite/Components/EnvironmentalEffects/Fog.js +59 -59
- package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +78 -78
- package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +56 -56
- package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +86 -88
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +582 -589
- package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +105 -105
- package/src/x_ite/Components/EnvironmentalEffects.js +25 -25
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +229 -229
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +256 -256
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +114 -114
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +71 -71
- package/src/x_ite/Components/EnvironmentalSensor.js +19 -19
- package/src/x_ite/Components/EventUtilities/BooleanFilter.js +50 -52
- package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +50 -52
- package/src/x_ite/Components/EventUtilities/BooleanToggle.js +43 -45
- package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +42 -44
- package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +50 -52
- package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +43 -45
- package/src/x_ite/Components/EventUtilities/TimeTrigger.js +43 -45
- package/src/x_ite/Components/EventUtilities/X3DSequencerNode.js +92 -94
- package/src/x_ite/Components/EventUtilities/X3DTriggerNode.js +13 -15
- package/src/x_ite/Components/Followers/ColorChaser.js +78 -78
- package/src/x_ite/Components/Followers/ColorDamper.js +78 -78
- package/src/x_ite/Components/Followers/CoordinateChaser.js +46 -46
- package/src/x_ite/Components/Followers/CoordinateDamper.js +48 -48
- package/src/x_ite/Components/Followers/OrientationChaser.js +64 -64
- package/src/x_ite/Components/Followers/OrientationDamper.js +61 -61
- package/src/x_ite/Components/Followers/PositionChaser.js +42 -42
- package/src/x_ite/Components/Followers/PositionChaser2D.js +42 -42
- package/src/x_ite/Components/Followers/PositionDamper.js +44 -44
- package/src/x_ite/Components/Followers/PositionDamper2D.js +44 -44
- package/src/x_ite/Components/Followers/ScalarChaser.js +70 -70
- package/src/x_ite/Components/Followers/ScalarDamper.js +60 -60
- package/src/x_ite/Components/Followers/TexCoordChaser2D.js +46 -46
- package/src/x_ite/Components/Followers/TexCoordDamper2D.js +48 -48
- package/src/x_ite/Components/Followers/X3DChaserNode.js +194 -194
- package/src/x_ite/Components/Followers/X3DDamperNode.js +120 -120
- package/src/x_ite/Components/Followers/X3DFollowerNode.js +83 -83
- package/src/x_ite/Components/Followers.js +45 -45
- package/src/x_ite/Components/Geometry2D/Arc2D.js +99 -113
- package/src/x_ite/Components/Geometry2D/ArcClose2D.js +164 -166
- package/src/x_ite/Components/Geometry2D/Circle2D.js +59 -67
- package/src/x_ite/Components/Geometry2D/Disk2D.js +207 -211
- package/src/x_ite/Components/Geometry2D/Polyline2D.js +43 -52
- package/src/x_ite/Components/Geometry2D/Polypoint2D.js +43 -60
- package/src/x_ite/Components/Geometry2D/Rectangle2D.js +76 -73
- package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +69 -71
- package/src/x_ite/Components/Geometry3D/Box.js +90 -86
- package/src/x_ite/Components/Geometry3D/Cone.js +185 -187
- package/src/x_ite/Components/Geometry3D/Cylinder.js +246 -246
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +383 -384
- package/src/x_ite/Components/Geometry3D/Extrusion.js +653 -647
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +437 -445
- package/src/x_ite/Components/Geometry3D/Sphere.js +72 -74
- package/src/x_ite/Components/Geometry3D.js +25 -25
- package/src/x_ite/Components/Geospatial/GeoCoordinate.js +189 -191
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +381 -383
- package/src/x_ite/Components/Geospatial/GeoLOD.js +397 -397
- package/src/x_ite/Components/Geospatial/GeoLocation.js +56 -56
- package/src/x_ite/Components/Geospatial/GeoMetadata.js +54 -36
- package/src/x_ite/Components/Geospatial/GeoOrigin.js +50 -52
- package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +81 -83
- package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +95 -97
- package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +77 -79
- package/src/x_ite/Components/Geospatial/GeoTransform.js +79 -79
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +278 -278
- package/src/x_ite/Components/Geospatial/X3DGeospatialObject.js +216 -218
- package/src/x_ite/Components/Grouping/Group.js +37 -37
- package/src/x_ite/Components/Grouping/StaticGroup.js +245 -245
- package/src/x_ite/Components/Grouping/Switch.js +234 -234
- package/src/x_ite/Components/Grouping/Transform.js +42 -42
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +93 -93
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +654 -649
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +99 -99
- package/src/x_ite/Components/Grouping/X3DTransformNode.js +31 -31
- package/src/x_ite/Components/Grouping.js +27 -27
- package/src/x_ite/Components/HAnim/HAnimDisplacer.js +35 -35
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +293 -293
- package/src/x_ite/Components/HAnim/HAnimJoint.js +137 -137
- package/src/x_ite/Components/HAnim/HAnimMotion.js +50 -50
- package/src/x_ite/Components/HAnim/HAnimSegment.js +44 -44
- package/src/x_ite/Components/HAnim/HAnimSite.js +43 -43
- package/src/x_ite/Components/Interpolation/ColorInterpolator.js +61 -63
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +60 -62
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +57 -59
- package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +79 -80
- package/src/x_ite/Components/Interpolation/NormalInterpolator.js +96 -93
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +70 -70
- package/src/x_ite/Components/Interpolation/PositionInterpolator.js +57 -59
- package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +57 -59
- package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +53 -55
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +78 -80
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +77 -79
- package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +78 -80
- package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +66 -66
- package/src/x_ite/Components/Interpolation/X3DInterpolatorNode.js +67 -69
- package/src/x_ite/Components/Interpolation.js +39 -39
- package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +304 -306
- package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +102 -104
- package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +51 -51
- package/src/x_ite/Components/Layering/Layer.js +50 -50
- package/src/x_ite/Components/Layering/LayerSet.js +160 -161
- package/src/x_ite/Components/Layering/Viewport.js +118 -118
- package/src/x_ite/Components/Layering/X3DLayerNode.js +322 -322
- package/src/x_ite/Components/Layering/X3DViewportNode.js +13 -13
- package/src/x_ite/Components/Layering.js +21 -21
- package/src/x_ite/Components/Layout/Layout.js +576 -578
- package/src/x_ite/Components/Layout/LayoutGroup.js +126 -126
- package/src/x_ite/Components/Layout/LayoutLayer.js +53 -53
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +48 -48
- package/src/x_ite/Components/Layout/ScreenGroup.js +136 -136
- package/src/x_ite/Components/Layout/X3DLayoutNode.js +12 -14
- package/src/x_ite/Components/Lighting/DirectionalLight.js +239 -246
- package/src/x_ite/Components/Lighting/PointLight.js +296 -303
- package/src/x_ite/Components/Lighting/SpotLight.js +321 -316
- package/src/x_ite/Components/Lighting/X3DLightNode.js +153 -153
- package/src/x_ite/Components/Lighting.js +19 -19
- package/src/x_ite/Components/NURBS/Contour2D.js +81 -83
- package/src/x_ite/Components/NURBS/ContourPolyline2D.js +100 -102
- package/src/x_ite/Components/NURBS/CoordinateDouble.js +32 -34
- package/src/x_ite/Components/NURBS/NurbsCurve.js +167 -169
- package/src/x_ite/Components/NURBS/NurbsCurve2D.js +149 -149
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +166 -166
- package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +45 -47
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +154 -154
- package/src/x_ite/Components/NURBS/NurbsSet.js +125 -125
- package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +128 -130
- package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +120 -122
- package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +120 -122
- package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +93 -93
- package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +88 -90
- package/src/x_ite/Components/NURBS/X3DNurbsControlCurveNode.js +13 -15
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +339 -339
- package/src/x_ite/Components/NURBS/X3DParametricGeometryNode.js +18 -20
- package/src/x_ite/Components/Navigation/Billboard.js +132 -132
- package/src/x_ite/Components/Navigation/Collision.js +116 -116
- package/src/x_ite/Components/Navigation/LOD.js +308 -308
- package/src/x_ite/Components/Navigation/NavigationInfo.js +279 -285
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +258 -258
- package/src/x_ite/Components/Navigation/Viewpoint.js +137 -137
- package/src/x_ite/Components/Navigation/ViewpointGroup.js +169 -171
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +450 -453
- package/src/x_ite/Components/Navigation.js +27 -27
- package/src/x_ite/Components/Networking/Anchor.js +140 -128
- package/src/x_ite/Components/Networking/Inline.js +156 -197
- package/src/x_ite/Components/Networking/LoadSensor.js +193 -195
- package/src/x_ite/Components/Networking/X3DNetworkSensorNode.js +13 -15
- package/src/x_ite/Components/Networking/X3DUrlObject.js +170 -116
- package/src/x_ite/Components/Networking.js +21 -21
- package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +62 -64
- package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +81 -83
- package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +59 -61
- package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +42 -44
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +1433 -1433
- package/src/x_ite/Components/ParticleSystems/PointEmitter.js +77 -79
- package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +196 -196
- package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +195 -195
- package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +250 -250
- package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +69 -71
- package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +346 -346
- package/src/x_ite/Components/ParticleSystems/X3DParticlePhysicsModelNode.js +15 -17
- package/src/x_ite/Components/Picking/LinePickSensor.js +284 -286
- package/src/x_ite/Components/Picking/PickableGroup.js +155 -155
- package/src/x_ite/Components/Picking/PointPickSensor.js +272 -272
- package/src/x_ite/Components/Picking/PrimitivePickSensor.js +207 -209
- package/src/x_ite/Components/Picking/VolumePickSensor.js +182 -184
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +382 -382
- package/src/x_ite/Components/Picking/X3DPickableObject.js +28 -30
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +257 -259
- package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +245 -247
- package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +173 -175
- package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +61 -63
- package/src/x_ite/Components/PointingDeviceSensor/X3DDragSensorNode.js +14 -16
- package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +57 -59
- package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +19 -21
- package/src/x_ite/Components/PointingDeviceSensor.js +25 -25
- package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorParallel.js +191 -191
- package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorPerspective.js +162 -162
- package/src/x_ite/Components/ProjectiveTextureMapping/X3DTextureProjectorNode.js +156 -156
- package/src/x_ite/Components/Rendering/ClipPlane.js +120 -120
- package/src/x_ite/Components/Rendering/Color.js +112 -112
- package/src/x_ite/Components/Rendering/ColorRGBA.js +114 -114
- package/src/x_ite/Components/Rendering/Coordinate.js +33 -35
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +236 -243
- package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +102 -102
- package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +55 -55
- package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +110 -110
- package/src/x_ite/Components/Rendering/LineSet.js +172 -179
- package/src/x_ite/Components/Rendering/Normal.js +100 -100
- package/src/x_ite/Components/Rendering/PointSet.js +142 -154
- package/src/x_ite/Components/Rendering/TriangleFanSet.js +73 -73
- package/src/x_ite/Components/Rendering/TriangleSet.js +51 -53
- package/src/x_ite/Components/Rendering/TriangleStripSet.js +76 -76
- package/src/x_ite/Components/Rendering/X3DColorNode.js +25 -27
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +318 -321
- package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +132 -132
- package/src/x_ite/Components/Rendering/X3DGeometricPropertyNode.js +13 -15
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +1190 -1171
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +231 -189
- package/src/x_ite/Components/Rendering/X3DNormalNode.js +13 -15
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +267 -0
- package/src/x_ite/Components/Rendering.js +53 -53
- package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +149 -149
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +229 -229
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +465 -465
- package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +152 -154
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +223 -223
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +117 -117
- package/src/x_ite/Components/RigidBodyPhysics/Contact.js +54 -56
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +245 -245
- package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +68 -70
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +453 -453
- package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +326 -326
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +171 -171
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +169 -169
- package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +50 -52
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +101 -101
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +15 -15
- package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +161 -163
- package/src/x_ite/Components/Scripting/Script.js +506 -510
- package/src/x_ite/Components/Scripting/X3DScriptNode.js +15 -15
- package/src/x_ite/Components/Shaders/ComposedShader.js +215 -178
- package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +84 -83
- package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +74 -74
- package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +73 -73
- package/src/x_ite/Components/Shaders/PackagedShader.js +52 -49
- package/src/x_ite/Components/Shaders/ProgramShader.js +36 -38
- package/src/x_ite/Components/Shaders/ShaderPart.js +135 -147
- package/src/x_ite/Components/Shaders/ShaderProgram.js +49 -46
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +1259 -1255
- package/src/x_ite/Components/Shaders/X3DShaderNode.js +83 -93
- package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +13 -15
- package/src/x_ite/Components/Shaders.js +33 -33
- package/src/x_ite/{Execution/ExportedNode.js → Components/Shape/AcousticProperties.js} +41 -71
- package/src/x_ite/Components/Shape/Appearance.js +331 -318
- package/src/x_ite/Components/Shape/FillProperties.js +101 -98
- package/src/x_ite/Components/Shape/LineProperties.js +71 -69
- package/src/x_ite/Components/Shape/Material.js +344 -116
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +310 -0
- package/src/x_ite/Components/Shape/PointProperties.js +79 -95
- package/src/x_ite/Components/Shape/Shape.js +178 -181
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +200 -200
- package/src/x_ite/Components/Shape/UnlitMaterial.js +93 -46
- package/src/x_ite/Components/Shape/X3DAppearanceChildNode.js +13 -15
- package/src/x_ite/Components/Shape/X3DAppearanceNode.js +24 -24
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +24 -24
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +158 -54
- package/src/x_ite/Components/Shape/X3DShapeNode.js +147 -147
- package/src/x_ite/Components/Shape.js +43 -37
- package/src/x_ite/Components/Sound/AudioClip.js +135 -140
- package/src/x_ite/Components/Sound/Sound.js +246 -246
- package/src/x_ite/Components/Sound/X3DSoundNode.js +13 -15
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +165 -179
- package/src/x_ite/Components/Sound.js +19 -19
- package/src/x_ite/Components/Text/FontStyle.js +49 -49
- package/src/x_ite/Components/Text/Text.js +135 -135
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +207 -205
- package/src/x_ite/Components/Text.js +17 -17
- package/src/x_ite/Components/Texturing/ImageTexture.js +181 -194
- package/src/x_ite/Components/Texturing/MovieTexture.js +180 -190
- package/src/x_ite/Components/Texturing/MultiTexture.js +255 -262
- package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +124 -118
- package/src/x_ite/Components/Texturing/MultiTextureTransform.js +82 -76
- package/src/x_ite/Components/Texturing/PixelTexture.js +222 -221
- package/src/x_ite/Components/Texturing/TextureCoordinate.js +116 -116
- package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +90 -90
- package/src/x_ite/Components/Texturing/TextureProperties.js +158 -160
- package/src/x_ite/Components/Texturing/TextureTransform.js +99 -99
- package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +33 -28
- package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +54 -54
- package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +22 -17
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +135 -124
- package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +16 -16
- package/src/x_ite/Components/Texturing/X3DTextureNode.js +24 -24
- package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +22 -22
- package/src/x_ite/Components/Texturing.js +45 -45
- package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +125 -123
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +115 -131
- package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +158 -160
- package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +116 -116
- package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +116 -116
- package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +88 -88
- package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +46 -46
- package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +135 -121
- package/src/x_ite/Components/Time/TimeSensor.js +155 -152
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +299 -302
- package/src/x_ite/Components/Time.js +15 -15
- package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +338 -338
- package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +80 -80
- package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +228 -228
- package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +163 -163
- package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +117 -117
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +334 -334
- package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +116 -116
- package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +167 -167
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +247 -247
- package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +198 -198
- package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +116 -116
- package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +126 -126
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +173 -173
- package/src/x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode.js +12 -12
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +167 -167
- package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +70 -70
- package/src/x_ite/Components/X_ITE/BlendMode.js +143 -145
- package/src/x_ite/Components.js +47 -47
- package/src/x_ite/Configuration/ComponentInfo.js +47 -42
- package/src/x_ite/Configuration/ComponentInfoArray.js +21 -19
- package/src/x_ite/Configuration/ProfileInfo.js +33 -23
- package/src/x_ite/Configuration/ProfileInfoArray.js +26 -16
- package/src/x_ite/Configuration/SupportedComponents.js +311 -311
- package/src/x_ite/Configuration/SupportedNodes.js +53 -38
- package/src/x_ite/Configuration/SupportedProfiles.js +190 -190
- package/src/x_ite/Configuration/UnitInfo.js +60 -51
- package/src/x_ite/Configuration/UnitInfoArray.js +17 -10
- package/src/x_ite/DEBUG.js +2 -2
- package/src/x_ite/Execution/BindableList.js +146 -149
- package/src/x_ite/Execution/BindableStack.js +130 -123
- package/src/x_ite/Execution/ExportedNodesArray.js +75 -0
- package/src/x_ite/Execution/ImportedNodesArray.js +75 -0
- package/src/x_ite/{Basic/X3DFieldDefinition.js → Execution/NamedNodesArray.js} +20 -10
- package/src/x_ite/Execution/Scene.js +93 -90
- package/src/x_ite/Execution/X3DExecutionContext.js +957 -781
- package/src/x_ite/Execution/X3DExportedNode.js +152 -0
- package/src/x_ite/Execution/X3DImportedNode.js +393 -0
- package/src/x_ite/Execution/X3DScene.js +546 -493
- package/src/x_ite/Execution/X3DWorld.js +171 -0
- package/src/x_ite/Fallback.js +31 -31
- package/src/x_ite/Fields/ArrayFields.js +463 -443
- package/src/x_ite/Fields/SFBool.js +50 -47
- package/src/x_ite/Fields/SFColor.js +163 -160
- package/src/x_ite/Fields/SFColorRGBA.js +155 -152
- package/src/x_ite/Fields/SFDouble.js +51 -48
- package/src/x_ite/Fields/SFFloat.js +51 -48
- package/src/x_ite/Fields/SFImage.js +216 -213
- package/src/x_ite/Fields/SFInt32.js +47 -44
- package/src/x_ite/Fields/SFMatrix3.js +74 -71
- package/src/x_ite/Fields/SFMatrix4.js +68 -65
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +98 -98
- package/src/x_ite/Fields/SFNode.js +392 -299
- package/src/x_ite/Fields/SFNodeCache.js +22 -33
- package/src/x_ite/Fields/SFRotation.js +178 -175
- package/src/x_ite/Fields/SFString.js +71 -68
- package/src/x_ite/Fields/SFTime.js +47 -44
- package/src/x_ite/Fields/SFVec2.js +73 -70
- package/src/x_ite/Fields/SFVec3.js +105 -102
- package/src/x_ite/Fields/SFVec4.js +118 -115
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +94 -94
- package/src/x_ite/Fields.js +44 -44
- package/src/x_ite/InputOutput/FileLoader.js +426 -531
- package/src/x_ite/InputOutput/Generator.js +379 -376
- package/src/x_ite/{Configuration/X3DInfoArray.js → Parser/GoldenGate.js} +54 -86
- package/src/x_ite/Parser/HTMLSupport.js +28 -6
- package/src/x_ite/Parser/JSONParser.js +414 -388
- package/src/x_ite/Parser/VRMLParser.js +2964 -0
- package/src/x_ite/Parser/X3DParser.js +128 -128
- package/src/x_ite/Parser/XMLParser.js +1231 -1178
- package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +17 -27
- package/src/x_ite/Prototype/ProtoDeclarationArray.js +17 -27
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +279 -297
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +264 -263
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +58 -35
- package/src/x_ite/Rendering/DependentRenderer.js +83 -80
- package/src/x_ite/Rendering/TextureBuffer.js +171 -168
- package/src/x_ite/{Bits → Rendering}/TraverseType.js +11 -11
- package/src/x_ite/Rendering/X3DRenderObject.js +895 -906
- package/src/x_ite/Routing/RouteArray.js +19 -71
- package/src/x_ite/Routing/X3DRoute.js +185 -179
- package/src/x_ite/Routing/X3DRoutingContext.js +60 -54
- package/src/x_ite/X3D.js +191 -175
- package/src/x_ite.config.js +83 -83
- package/src/x_ite.css +279 -288
- package/src/x_ite.html +226 -193
- package/src/x_ite.js +100 -127
- package/x_ite.min.html +220 -187
- package/src/assets/shaders/webgl1/PointSet.fs +0 -100
- package/src/assets/shaders/webgl1/PointSet.vs +0 -70
- package/src/assets/shaders/webgl1/Wireframe.fs +0 -74
- package/src/assets/shaders/webgl1/Wireframe.vs +0 -63
- package/src/assets/shaders/webgl2/PointSet.fs +0 -99
- package/src/assets/shaders/webgl2/PointSet.vs +0 -71
- package/src/assets/shaders/webgl2/Wireframe.fs +0 -73
- package/src/assets/shaders/webgl2/Wireframe.vs +0 -64
- package/src/x_ite/Basic/X3DBaseNode.js +0 -1253
- package/src/x_ite/Basic/X3DField.js +0 -370
- package/src/x_ite/Basic/X3DObjectArrayField.js +0 -545
- package/src/x_ite/Basic/X3DTypedArrayField.js +0 -839
- package/src/x_ite/Browser/Core/X3DCoreContext.js.~1~ +0 -714
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js.~1~ +0 -209
- package/src/x_ite/Execution/ImportedNode.js +0 -375
- package/src/x_ite/Execution/World.js +0 -162
- package/src/x_ite/Parser/Parser.js +0 -2944
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
define ([
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
"standard/Math/Numbers/Vector3",
|
|
52
|
+
"standard/Math/Numbers/Vector4",
|
|
53
|
+
"standard/Math/Numbers/Rotation4",
|
|
54
|
+
"standard/Math/Numbers/Matrix3",
|
|
55
|
+
"standard/Math/Algorithms/eigendecomposition",
|
|
56
56
|
],
|
|
57
57
|
function (Vector3,
|
|
58
58
|
Vector4,
|
|
@@ -62,882 +62,882 @@ function (Vector3,
|
|
|
62
62
|
{
|
|
63
63
|
"use strict";
|
|
64
64
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
65
|
+
function Matrix4 ()
|
|
66
|
+
{
|
|
67
|
+
if (arguments .length)
|
|
68
|
+
{
|
|
69
|
+
this [ 0] = arguments [ 0];
|
|
70
|
+
this [ 1] = arguments [ 1];
|
|
71
|
+
this [ 2] = arguments [ 2];
|
|
72
|
+
this [ 3] = arguments [ 3];
|
|
73
|
+
this [ 4] = arguments [ 4];
|
|
74
|
+
this [ 5] = arguments [ 5];
|
|
75
|
+
this [ 6] = arguments [ 6];
|
|
76
|
+
this [ 7] = arguments [ 7];
|
|
77
|
+
this [ 8] = arguments [ 8];
|
|
78
|
+
this [ 9] = arguments [ 9];
|
|
79
|
+
this [10] = arguments [10];
|
|
80
|
+
this [11] = arguments [11];
|
|
81
|
+
this [12] = arguments [12];
|
|
82
|
+
this [13] = arguments [13];
|
|
83
|
+
this [14] = arguments [14];
|
|
84
|
+
this [15] = arguments [15];
|
|
85
|
+
}
|
|
86
|
+
else
|
|
87
|
+
{
|
|
88
|
+
this .identity ();
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Matrix4 .prototype =
|
|
93
|
+
{
|
|
94
|
+
constructor: Matrix4,
|
|
95
|
+
order: 4,
|
|
96
|
+
length: 16,
|
|
97
|
+
copy: function ()
|
|
98
|
+
{
|
|
99
|
+
const copy = Object .create (Matrix4 .prototype);
|
|
100
|
+
copy [ 0] = this [ 0];
|
|
101
|
+
copy [ 1] = this [ 1];
|
|
102
|
+
copy [ 2] = this [ 2];
|
|
103
|
+
copy [ 3] = this [ 3];
|
|
104
|
+
copy [ 4] = this [ 4];
|
|
105
|
+
copy [ 5] = this [ 5];
|
|
106
|
+
copy [ 6] = this [ 6];
|
|
107
|
+
copy [ 7] = this [ 7];
|
|
108
|
+
copy [ 8] = this [ 8];
|
|
109
|
+
copy [ 9] = this [ 9];
|
|
110
|
+
copy [10] = this [10];
|
|
111
|
+
copy [11] = this [11];
|
|
112
|
+
copy [12] = this [12];
|
|
113
|
+
copy [13] = this [13];
|
|
114
|
+
copy [14] = this [14];
|
|
115
|
+
copy [15] = this [15];
|
|
116
|
+
return copy;
|
|
117
|
+
},
|
|
118
|
+
assign: function (matrix)
|
|
119
|
+
{
|
|
120
|
+
this [ 0] = matrix [ 0];
|
|
121
|
+
this [ 1] = matrix [ 1];
|
|
122
|
+
this [ 2] = matrix [ 2];
|
|
123
|
+
this [ 3] = matrix [ 3];
|
|
124
|
+
this [ 4] = matrix [ 4];
|
|
125
|
+
this [ 5] = matrix [ 5];
|
|
126
|
+
this [ 6] = matrix [ 6];
|
|
127
|
+
this [ 7] = matrix [ 7];
|
|
128
|
+
this [ 8] = matrix [ 8];
|
|
129
|
+
this [ 9] = matrix [ 9];
|
|
130
|
+
this [10] = matrix [10];
|
|
131
|
+
this [11] = matrix [11];
|
|
132
|
+
this [12] = matrix [12];
|
|
133
|
+
this [13] = matrix [13];
|
|
134
|
+
this [14] = matrix [14];
|
|
135
|
+
this [15] = matrix [15];
|
|
136
|
+
return this;
|
|
137
|
+
},
|
|
138
|
+
equals: function (matrix)
|
|
139
|
+
{
|
|
140
|
+
return this [ 0] === matrix [ 0] &&
|
|
141
|
+
this [ 1] === matrix [ 1] &&
|
|
142
|
+
this [ 2] === matrix [ 2] &&
|
|
143
|
+
this [ 3] === matrix [ 3] &&
|
|
144
|
+
this [ 4] === matrix [ 4] &&
|
|
145
|
+
this [ 5] === matrix [ 5] &&
|
|
146
|
+
this [ 6] === matrix [ 6] &&
|
|
147
|
+
this [ 7] === matrix [ 7] &&
|
|
148
|
+
this [ 8] === matrix [ 8] &&
|
|
149
|
+
this [ 9] === matrix [ 9] &&
|
|
150
|
+
this [10] === matrix [10] &&
|
|
151
|
+
this [11] === matrix [11] &&
|
|
152
|
+
this [12] === matrix [12] &&
|
|
153
|
+
this [13] === matrix [13] &&
|
|
154
|
+
this [14] === matrix [14] &&
|
|
155
|
+
this [15] === matrix [15];
|
|
156
|
+
},
|
|
157
|
+
set1: function (r, c, value)
|
|
158
|
+
{
|
|
159
|
+
this [r * this .order + c] = value;
|
|
160
|
+
|
|
161
|
+
return this;
|
|
162
|
+
},
|
|
163
|
+
get1: function (r, c)
|
|
164
|
+
{
|
|
165
|
+
return this [r * this .order + c];
|
|
166
|
+
},
|
|
167
|
+
set: function (translation, rotation, scale, scaleOrientation, center)
|
|
168
|
+
{
|
|
169
|
+
switch (arguments .length)
|
|
170
|
+
{
|
|
171
|
+
case 0:
|
|
172
|
+
{
|
|
173
|
+
this .identity ();
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
case 1:
|
|
177
|
+
{
|
|
178
|
+
if (translation === null) translation = Vector3 .Zero;
|
|
179
|
+
|
|
180
|
+
this .identity ();
|
|
181
|
+
this .translate (translation);
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
case 2:
|
|
185
|
+
{
|
|
186
|
+
if (translation === null) translation = Vector3 .Zero;
|
|
187
|
+
if (rotation === null) rotation = Rotation4 .Identity;
|
|
188
|
+
|
|
189
|
+
this .identity ();
|
|
190
|
+
this .translate (translation);
|
|
191
|
+
|
|
192
|
+
if (! rotation .equals (Rotation4 .Identity))
|
|
193
|
+
this .rotate (rotation);
|
|
194
|
+
|
|
195
|
+
break;
|
|
196
|
+
}
|
|
197
|
+
case 3:
|
|
198
|
+
{
|
|
199
|
+
if (translation === null) translation = Vector3 .Zero;
|
|
200
|
+
if (rotation === null) rotation = Rotation4 .Identity;
|
|
201
|
+
if (scale === null) scale = Vector3 .One;
|
|
202
|
+
|
|
203
|
+
this .identity ();
|
|
204
|
+
this .translate (translation);
|
|
205
|
+
|
|
206
|
+
if (! rotation .equals (Rotation4 .Identity))
|
|
207
|
+
this .rotate (rotation);
|
|
208
|
+
|
|
209
|
+
if (! scale .equals (Vector3 .One))
|
|
210
|
+
this .scale (scale);
|
|
211
|
+
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
case 4:
|
|
215
|
+
{
|
|
216
|
+
if (translation === null) translation = Vector3 .Zero;
|
|
217
|
+
if (rotation === null) rotation = Rotation4 .Identity;
|
|
218
|
+
if (scale === null) scale = Vector3 .One;
|
|
219
|
+
if (scaleOrientation === null) scaleOrientation = Rotation4 .Identity;
|
|
220
|
+
|
|
221
|
+
this .identity ();
|
|
222
|
+
this .translate (translation);
|
|
223
|
+
|
|
224
|
+
if (! rotation .equals (Rotation4 .Identity))
|
|
225
|
+
this .rotate (rotation);
|
|
226
|
+
|
|
227
|
+
if (! scale .equals (Vector3 .One))
|
|
228
|
+
{
|
|
229
|
+
const hasScaleOrientation = ! scaleOrientation .equals (Rotation4 .Identity);
|
|
230
|
+
|
|
231
|
+
if (hasScaleOrientation)
|
|
232
|
+
{
|
|
233
|
+
this .rotate (scaleOrientation);
|
|
234
|
+
this .scale (scale);
|
|
235
|
+
this .rotate (Rotation4 .inverse (scaleOrientation));
|
|
236
|
+
}
|
|
237
|
+
else
|
|
238
|
+
this .scale (scale);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
break;
|
|
242
|
+
}
|
|
243
|
+
case 5:
|
|
244
|
+
{
|
|
245
|
+
if (translation === null) translation = Vector3 .Zero;
|
|
246
|
+
if (rotation === null) rotation = Rotation4 .Identity;
|
|
247
|
+
if (scale === null) scale = Vector3 .One;
|
|
248
|
+
if (scaleOrientation === null) scaleOrientation = Rotation4 .Identity;
|
|
249
|
+
if (center === null) center = Vector3 .Zero;
|
|
250
|
+
|
|
251
|
+
// P' = T * C * R * SR * S * -SR * -C * P
|
|
252
|
+
this .identity ();
|
|
253
|
+
this .translate (translation);
|
|
254
|
+
|
|
255
|
+
const hasCenter = ! center .equals (Vector3 .Zero);
|
|
256
|
+
|
|
257
|
+
if (hasCenter)
|
|
258
|
+
this .translate (center);
|
|
259
|
+
|
|
260
|
+
if (! rotation .equals (Rotation4 .Identity))
|
|
261
|
+
this .rotate (rotation);
|
|
262
|
+
|
|
263
|
+
if (! scale .equals (Vector3 .One))
|
|
264
|
+
{
|
|
265
|
+
if (! scaleOrientation .equals (Rotation4 .Identity))
|
|
266
|
+
{
|
|
267
|
+
this .rotate (scaleOrientation);
|
|
268
|
+
this .scale (scale);
|
|
269
|
+
this .rotate (Rotation4 .inverse (scaleOrientation));
|
|
270
|
+
}
|
|
271
|
+
else
|
|
272
|
+
this .scale (scale);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
if (hasCenter)
|
|
276
|
+
this .translate (Vector3 .negate (center));
|
|
277
|
+
|
|
278
|
+
break;
|
|
279
|
+
}
|
|
280
|
+
case 16:
|
|
281
|
+
{
|
|
282
|
+
this [ 0] = arguments [ 0];
|
|
283
|
+
this [ 1] = arguments [ 1];
|
|
284
|
+
this [ 2] = arguments [ 2];
|
|
285
|
+
this [ 3] = arguments [ 3];
|
|
286
|
+
this [ 4] = arguments [ 4];
|
|
287
|
+
this [ 5] = arguments [ 5];
|
|
288
|
+
this [ 6] = arguments [ 6];
|
|
289
|
+
this [ 7] = arguments [ 7];
|
|
290
|
+
this [ 8] = arguments [ 8];
|
|
291
|
+
this [ 9] = arguments [ 9];
|
|
292
|
+
this [10] = arguments [10];
|
|
293
|
+
this [11] = arguments [11];
|
|
294
|
+
this [12] = arguments [12];
|
|
295
|
+
this [13] = arguments [13];
|
|
296
|
+
this [14] = arguments [14];
|
|
297
|
+
this [15] = arguments [15];
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
return this;
|
|
303
|
+
},
|
|
304
|
+
get: (function ()
|
|
305
|
+
{
|
|
306
|
+
const
|
|
307
|
+
dummyTranslation = new Vector3 (0, 0, 0),
|
|
308
|
+
dummyRotation = new Rotation4 (),
|
|
309
|
+
dummyScale = new Vector3 (0, 0, 0),
|
|
310
|
+
dummyScaleOrientation = new Rotation4 (),
|
|
311
|
+
dummyCenter = new Vector3 (0, 0, 0),
|
|
312
|
+
rot = new Matrix3 (),
|
|
313
|
+
so = new Matrix3 (),
|
|
314
|
+
c = new Vector3 (0, 0, 0);
|
|
315
|
+
|
|
316
|
+
return function (translation, rotation, scale, scaleOrientation, center)
|
|
317
|
+
{
|
|
318
|
+
if (translation === null) translation = dummyTranslation;
|
|
319
|
+
if (rotation === null) rotation = dummyRotation;
|
|
320
|
+
if (scale === null) scale = dummyScale;
|
|
321
|
+
if (scaleOrientation === null) scaleOrientation = dummyScaleOrientation;
|
|
322
|
+
if (center === null) center = dummyCenter;
|
|
323
|
+
|
|
324
|
+
switch (arguments .length)
|
|
325
|
+
{
|
|
326
|
+
case 1:
|
|
327
|
+
{
|
|
328
|
+
translation .set (this [12], this [13], this [14]);
|
|
329
|
+
break;
|
|
330
|
+
}
|
|
331
|
+
case 2:
|
|
332
|
+
{
|
|
333
|
+
this .factor (translation, rot, dummyScale, so);
|
|
334
|
+
rotation .setMatrix (rot);
|
|
335
|
+
break;
|
|
336
|
+
}
|
|
337
|
+
case 3:
|
|
338
|
+
{
|
|
339
|
+
this .factor (translation, rot, scale, so);
|
|
340
|
+
rotation .setMatrix (rot);
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
case 4:
|
|
344
|
+
{
|
|
345
|
+
this .factor (translation, rot, scale, so);
|
|
346
|
+
rotation .setMatrix (rot);
|
|
347
|
+
scaleOrientation .setMatrix (so);
|
|
348
|
+
break;
|
|
349
|
+
}
|
|
350
|
+
case 5:
|
|
351
|
+
{
|
|
352
|
+
const m = new Matrix4 ();
|
|
353
|
+
|
|
354
|
+
m .set (c .assign (center) .negate ());
|
|
355
|
+
m .multLeft (this);
|
|
356
|
+
m .translate (center);
|
|
357
|
+
|
|
358
|
+
m .get (translation, rotation, scale, scaleOrientation);
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
};
|
|
363
|
+
})(),
|
|
364
|
+
setRotation: function (rotation)
|
|
365
|
+
{
|
|
366
|
+
return this .setQuaternion (rotation .value);
|
|
367
|
+
},
|
|
368
|
+
setQuaternion: function (quaternion)
|
|
369
|
+
{
|
|
370
|
+
const
|
|
371
|
+
x = quaternion .x,
|
|
372
|
+
y = quaternion .y,
|
|
373
|
+
z = quaternion .z,
|
|
374
|
+
w = quaternion .w,
|
|
375
|
+
A = y * y,
|
|
376
|
+
B = z * z,
|
|
377
|
+
C = x * y,
|
|
378
|
+
D = z * w,
|
|
379
|
+
E = z * x,
|
|
380
|
+
F = y * w,
|
|
381
|
+
G = x * x,
|
|
382
|
+
H = y * z,
|
|
383
|
+
I = x * w;
|
|
384
|
+
|
|
385
|
+
this [0] = 1 - 2 * (A + B);
|
|
386
|
+
this [1] = 2 * (C + D);
|
|
387
|
+
this [2] = 2 * (E - F);
|
|
388
|
+
this [3] = 0;
|
|
389
|
+
this [4] = 2 * (C - D);
|
|
390
|
+
this [5] = 1 - 2 * (B + G);
|
|
391
|
+
this [6] = 2 * (H + I);
|
|
392
|
+
this [7] = 0;
|
|
393
|
+
this [8] = 2 * (E + F);
|
|
394
|
+
this [9] = 2 * (H - I);
|
|
395
|
+
this [10] = 1 - 2 * (A + G);
|
|
396
|
+
this [11] = 0;
|
|
397
|
+
this [12] = 0;
|
|
398
|
+
this [13] = 0;
|
|
399
|
+
this [14] = 0;
|
|
400
|
+
this [15] = 1;
|
|
401
|
+
|
|
402
|
+
return this;
|
|
403
|
+
},
|
|
404
|
+
factor: (function ()
|
|
405
|
+
{
|
|
406
|
+
const
|
|
407
|
+
si = new Matrix3 (),
|
|
408
|
+
u = new Matrix3 (),
|
|
409
|
+
b = new Matrix3 ();
|
|
410
|
+
|
|
411
|
+
const eigen = { values: [ ], vectors: [[ ], [ ], [ ]] };
|
|
412
|
+
|
|
413
|
+
return function (translation, rotation, scale, scaleOrientation)
|
|
414
|
+
{
|
|
415
|
+
// (1) Get translation.
|
|
416
|
+
translation .set (this [12], this [13], this [14]);
|
|
417
|
+
|
|
418
|
+
// (2) Create 3x3 matrix.
|
|
419
|
+
const a = this .submatrix;
|
|
420
|
+
|
|
421
|
+
// (3) Compute det A. If negative, set sign = -1, else sign = 1
|
|
422
|
+
const det = a .determinant ();
|
|
423
|
+
const det_sign = det < 0 ? -1 : 1;
|
|
424
|
+
|
|
425
|
+
if (det === 0)
|
|
426
|
+
throw new Error ("Matrix4 .factor: determinant is 0.");
|
|
427
|
+
|
|
428
|
+
// (4) B = A * !A (here !A means A transpose)
|
|
429
|
+
b .assign (a) .transpose () .multLeft (a);
|
|
430
|
+
const e = eigendecomposition (b, eigen);
|
|
431
|
+
|
|
432
|
+
// Find min / max eigenvalues and do ratio test to determine singularity.
|
|
433
|
+
|
|
434
|
+
scaleOrientation .set (e .vectors [0] [0], e .vectors [1] [0], e .vectors [2] [0],
|
|
435
|
+
e .vectors [0] [1], e .vectors [1] [1], e .vectors [2] [1],
|
|
436
|
+
e .vectors [0] [2], e .vectors [1] [2], e .vectors [2] [2]);
|
|
437
|
+
|
|
438
|
+
// Compute s = sqrt(evalues), with sign. Set si = s-inverse
|
|
439
|
+
|
|
440
|
+
scale .x = det_sign * Math .sqrt (e .values [0]);
|
|
441
|
+
scale .y = det_sign * Math .sqrt (e .values [1]);
|
|
442
|
+
scale .z = det_sign * Math .sqrt (e .values [2]);
|
|
443
|
+
|
|
444
|
+
si [0] = 1 / scale .x;
|
|
445
|
+
si [4] = 1 / scale .y;
|
|
446
|
+
si [8] = 1 / scale .z;
|
|
447
|
+
|
|
448
|
+
// (5) Compute U = !R ~S R A.
|
|
449
|
+
rotation .assign (u .assign (scaleOrientation) .transpose () .multRight (si) .multRight (scaleOrientation) .multRight (a));
|
|
450
|
+
};
|
|
451
|
+
})(),
|
|
452
|
+
determinant3: function ()
|
|
453
|
+
{
|
|
454
|
+
const
|
|
455
|
+
m00 = this [0], m01 = this [1], m02 = this [ 2],
|
|
456
|
+
m04 = this [4], m05 = this [5], m06 = this [ 6],
|
|
457
|
+
m08 = this [8], m09 = this [9], m10 = this [10];
|
|
458
|
+
|
|
459
|
+
return m00 * (m05 * m10 - m06 * m09) -
|
|
460
|
+
m01 * (m04 * m10 - m06 * m08) +
|
|
461
|
+
m02 * (m04 * m09 - m05 * m08);
|
|
462
|
+
},
|
|
463
|
+
determinant: function ()
|
|
464
|
+
{
|
|
465
|
+
const
|
|
466
|
+
m00 = this [ 0],
|
|
467
|
+
m01 = this [ 1],
|
|
468
|
+
m02 = this [ 2],
|
|
469
|
+
m03 = this [ 3],
|
|
470
|
+
m04 = this [ 4],
|
|
471
|
+
m05 = this [ 5],
|
|
472
|
+
m06 = this [ 6],
|
|
473
|
+
m07 = this [ 7],
|
|
474
|
+
m08 = this [ 8],
|
|
475
|
+
m09 = this [ 9],
|
|
476
|
+
m10 = this [10],
|
|
477
|
+
m11 = this [11],
|
|
478
|
+
m12 = this [12],
|
|
479
|
+
m13 = this [13],
|
|
480
|
+
m14 = this [14],
|
|
481
|
+
m15 = this [15],
|
|
482
|
+
b = m10 * m15,
|
|
483
|
+
c = m14 * m11,
|
|
484
|
+
d = m06 * m15,
|
|
485
|
+
e = m14 * m07,
|
|
486
|
+
f = m06 * m11,
|
|
487
|
+
g = m10 * m07,
|
|
488
|
+
h = m02 * m15,
|
|
489
|
+
i = m14 * m03,
|
|
490
|
+
j = m02 * m11,
|
|
491
|
+
o = m10 * m03,
|
|
492
|
+
r = m02 * m07,
|
|
493
|
+
x = m06 * m03,
|
|
494
|
+
H = b * m05 + e * m09 + f * m13 - (c * m05) - (d * m09) - (g * m13),
|
|
495
|
+
I = c * m01 + h * m09 + o * m13 - (b * m01) - (i * m09) - (j * m13),
|
|
496
|
+
J = d * m01 + i * m05 + r * m13 - (e * m01) - (h * m05) - (x * m13),
|
|
497
|
+
K = g * m01 + j * m05 + x * m09 - (f * m01) - (o * m05) - (r * m09);
|
|
498
|
+
|
|
499
|
+
return m00 * H + m04 * I + m08 * J + m12 * K;
|
|
500
|
+
},
|
|
501
|
+
transpose: function ()
|
|
502
|
+
{
|
|
503
|
+
let tmp;
|
|
504
|
+
|
|
505
|
+
tmp = this [ 1]; this [ 1] = this [ 4]; this [ 4] = tmp;
|
|
506
|
+
tmp = this [ 2]; this [ 2] = this [ 8]; this [ 8] = tmp;
|
|
507
|
+
tmp = this [ 3]; this [ 3] = this [12]; this [12] = tmp;
|
|
508
|
+
tmp = this [ 6]; this [ 6] = this [ 9]; this [ 9] = tmp;
|
|
509
|
+
tmp = this [ 7]; this [ 7] = this [13]; this [13] = tmp;
|
|
510
|
+
tmp = this [11]; this [11] = this [14]; this [14] = tmp;
|
|
511
|
+
|
|
512
|
+
return this;
|
|
513
|
+
},
|
|
514
|
+
inverse: function ()
|
|
515
|
+
{
|
|
516
|
+
const
|
|
517
|
+
m00 = this [ 0],
|
|
518
|
+
m01 = this [ 1],
|
|
519
|
+
m02 = this [ 2],
|
|
520
|
+
m03 = this [ 3],
|
|
521
|
+
m04 = this [ 4],
|
|
522
|
+
m05 = this [ 5],
|
|
523
|
+
m06 = this [ 6],
|
|
524
|
+
m07 = this [ 7],
|
|
525
|
+
m08 = this [ 8],
|
|
526
|
+
m09 = this [ 9],
|
|
527
|
+
m10 = this [10],
|
|
528
|
+
m11 = this [11],
|
|
529
|
+
m12 = this [12],
|
|
530
|
+
m13 = this [13],
|
|
531
|
+
m14 = this [14],
|
|
532
|
+
m15 = this [15],
|
|
533
|
+
b = m10 * m15,
|
|
534
|
+
c = m14 * m11,
|
|
535
|
+
d = m06 * m15,
|
|
536
|
+
e = m14 * m07,
|
|
537
|
+
f = m06 * m11,
|
|
538
|
+
g = m10 * m07,
|
|
539
|
+
h = m02 * m15,
|
|
540
|
+
i = m14 * m03,
|
|
541
|
+
j = m02 * m11,
|
|
542
|
+
o = m10 * m03,
|
|
543
|
+
r = m02 * m07,
|
|
544
|
+
x = m06 * m03,
|
|
545
|
+
t = m08 * m13,
|
|
546
|
+
p = m12 * m09,
|
|
547
|
+
v = m04 * m13,
|
|
548
|
+
s = m12 * m05,
|
|
549
|
+
y = m04 * m09,
|
|
550
|
+
z = m08 * m05,
|
|
551
|
+
A = m00 * m13,
|
|
552
|
+
C = m12 * m01,
|
|
553
|
+
D = m00 * m09,
|
|
554
|
+
E = m08 * m01,
|
|
555
|
+
F = m00 * m05,
|
|
556
|
+
G = m04 * m01,
|
|
557
|
+
H = b * m05 + e * m09 + f * m13 - ((c * m05) + (d * m09) + (g * m13)),
|
|
558
|
+
I = c * m01 + h * m09 + o * m13 - ((b * m01) + (i * m09) + (j * m13)),
|
|
559
|
+
J = d * m01 + i * m05 + r * m13 - ((e * m01) + (h * m05) + (x * m13)),
|
|
560
|
+
K = g * m01 + j * m05 + x * m09 - ((f * m01) + (o * m05) + (r * m09));
|
|
561
|
+
|
|
562
|
+
let B = m00 * H + m04 * I + m08 * J + m12 * K;
|
|
563
|
+
|
|
564
|
+
if (B === 0)
|
|
565
|
+
throw new Error ("Matrix4 .inverse: determinant is 0.");
|
|
566
|
+
|
|
567
|
+
B = 1 / B;
|
|
568
|
+
|
|
569
|
+
this [ 0] = B * H;
|
|
570
|
+
this [ 1] = B * I;
|
|
571
|
+
this [ 2] = B * J;
|
|
572
|
+
this [ 3] = B * K;
|
|
573
|
+
this [ 4] = B * (c * m04 + d * m08 + g * m12 - (b * m04) - (e * m08) - (f * m12));
|
|
574
|
+
this [ 5] = B * (b * m00 + i * m08 + j * m12 - (c * m00) - (h * m08) - (o * m12));
|
|
575
|
+
this [ 6] = B * (e * m00 + h * m04 + x * m12 - (d * m00) - (i * m04) - (r * m12));
|
|
576
|
+
this [ 7] = B * (f * m00 + o * m04 + r * m08 - (g * m00) - (j * m04) - (x * m08));
|
|
577
|
+
this [ 8] = B * (t * m07 + s * m11 + y * m15 - (p * m07) - (v * m11) - (z * m15));
|
|
578
|
+
this [ 9] = B * (p * m03 + A * m11 + E * m15 - (t * m03) - (C * m11) - (D * m15));
|
|
579
|
+
this [10] = B * (v * m03 + C * m07 + F * m15 - (s * m03) - (A * m07) - (G * m15));
|
|
580
|
+
this [11] = B * (z * m03 + D * m07 + G * m11 - (y * m03) - (E * m07) - (F * m11));
|
|
581
|
+
this [12] = B * (v * m10 + z * m14 + p * m06 - (y * m14) - (t * m06) - (s * m10));
|
|
582
|
+
this [13] = B * (D * m14 + t * m02 + C * m10 - (A * m10) - (E * m14) - (p * m02));
|
|
583
|
+
this [14] = B * (A * m06 + G * m14 + s * m02 - (F * m14) - (v * m02) - (C * m06));
|
|
584
|
+
this [15] = B * (F * m10 + y * m02 + E * m06 - (D * m06) - (G * m10) - (z * m02));
|
|
585
|
+
|
|
586
|
+
return this;
|
|
587
|
+
},
|
|
588
|
+
multLeft: function (matrix)
|
|
589
|
+
{
|
|
590
|
+
const
|
|
591
|
+
a00 = this [ 0], a01 = this [ 1], a02 = this [ 2], a03 = this [ 3],
|
|
592
|
+
a04 = this [ 4], a05 = this [ 5], a06 = this [ 6], a07 = this [ 7],
|
|
593
|
+
a08 = this [ 8], a09 = this [ 9], a10 = this [10], a11 = this [11],
|
|
594
|
+
a12 = this [12], a13 = this [13], a14 = this [14], a15 = this [15],
|
|
595
|
+
b00 = matrix [ 0], b01 = matrix [ 1], b02 = matrix [ 2], b03 = matrix [ 3],
|
|
596
|
+
b04 = matrix [ 4], b05 = matrix [ 5], b06 = matrix [ 6], b07 = matrix [ 7],
|
|
597
|
+
b08 = matrix [ 8], b09 = matrix [ 9], b10 = matrix [10], b11 = matrix [11],
|
|
598
|
+
b12 = matrix [12], b13 = matrix [13], b14 = matrix [14], b15 = matrix [15];
|
|
599
|
+
|
|
600
|
+
this [ 0] = a00 * b00 + a04 * b01 + a08 * b02 + a12 * b03;
|
|
601
|
+
this [ 1] = a01 * b00 + a05 * b01 + a09 * b02 + a13 * b03;
|
|
602
|
+
this [ 2] = a02 * b00 + a06 * b01 + a10 * b02 + a14 * b03;
|
|
603
|
+
this [ 3] = a03 * b00 + a07 * b01 + a11 * b02 + a15 * b03;
|
|
604
|
+
this [ 4] = a00 * b04 + a04 * b05 + a08 * b06 + a12 * b07;
|
|
605
|
+
this [ 5] = a01 * b04 + a05 * b05 + a09 * b06 + a13 * b07;
|
|
606
|
+
this [ 6] = a02 * b04 + a06 * b05 + a10 * b06 + a14 * b07;
|
|
607
|
+
this [ 7] = a03 * b04 + a07 * b05 + a11 * b06 + a15 * b07;
|
|
608
|
+
this [ 8] = a00 * b08 + a04 * b09 + a08 * b10 + a12 * b11;
|
|
609
|
+
this [ 9] = a01 * b08 + a05 * b09 + a09 * b10 + a13 * b11;
|
|
610
|
+
this [10] = a02 * b08 + a06 * b09 + a10 * b10 + a14 * b11;
|
|
611
|
+
this [11] = a03 * b08 + a07 * b09 + a11 * b10 + a15 * b11;
|
|
612
|
+
this [12] = a00 * b12 + a04 * b13 + a08 * b14 + a12 * b15;
|
|
613
|
+
this [13] = a01 * b12 + a05 * b13 + a09 * b14 + a13 * b15;
|
|
614
|
+
this [14] = a02 * b12 + a06 * b13 + a10 * b14 + a14 * b15;
|
|
615
|
+
this [15] = a03 * b12 + a07 * b13 + a11 * b14 + a15 * b15;
|
|
616
|
+
|
|
617
|
+
return this;
|
|
618
|
+
},
|
|
619
|
+
multRight: function (matrix)
|
|
620
|
+
{
|
|
621
|
+
const
|
|
622
|
+
a00 = this [ 0], a01 = this [ 1], a02 = this [ 2], a03 = this [ 3],
|
|
623
|
+
a04 = this [ 4], a05 = this [ 5], a06 = this [ 6], a07 = this [ 7],
|
|
624
|
+
a08 = this [ 8], a09 = this [ 9], a10 = this [10], a11 = this [11],
|
|
625
|
+
a12 = this [12], a13 = this [13], a14 = this [14], a15 = this [15],
|
|
626
|
+
b00 = matrix [ 0], b01 = matrix [ 1], b02 = matrix [ 2], b03 = matrix [ 3],
|
|
627
|
+
b04 = matrix [ 4], b05 = matrix [ 5], b06 = matrix [ 6], b07 = matrix [ 7],
|
|
628
|
+
b08 = matrix [ 8], b09 = matrix [ 9], b10 = matrix [10], b11 = matrix [11],
|
|
629
|
+
b12 = matrix [12], b13 = matrix [13], b14 = matrix [14], b15 = matrix [15];
|
|
630
|
+
|
|
631
|
+
this [ 0] = a00 * b00 + a01 * b04 + a02 * b08 + a03 * b12;
|
|
632
|
+
this [ 1] = a00 * b01 + a01 * b05 + a02 * b09 + a03 * b13;
|
|
633
|
+
this [ 2] = a00 * b02 + a01 * b06 + a02 * b10 + a03 * b14;
|
|
634
|
+
this [ 3] = a00 * b03 + a01 * b07 + a02 * b11 + a03 * b15;
|
|
635
|
+
this [ 4] = a04 * b00 + a05 * b04 + a06 * b08 + a07 * b12;
|
|
636
|
+
this [ 5] = a04 * b01 + a05 * b05 + a06 * b09 + a07 * b13;
|
|
637
|
+
this [ 6] = a04 * b02 + a05 * b06 + a06 * b10 + a07 * b14;
|
|
638
|
+
this [ 7] = a04 * b03 + a05 * b07 + a06 * b11 + a07 * b15;
|
|
639
|
+
this [ 8] = a08 * b00 + a09 * b04 + a10 * b08 + a11 * b12;
|
|
640
|
+
this [ 9] = a08 * b01 + a09 * b05 + a10 * b09 + a11 * b13;
|
|
641
|
+
this [10] = a08 * b02 + a09 * b06 + a10 * b10 + a11 * b14;
|
|
642
|
+
this [11] = a08 * b03 + a09 * b07 + a10 * b11 + a11 * b15;
|
|
643
|
+
this [12] = a12 * b00 + a13 * b04 + a14 * b08 + a15 * b12;
|
|
644
|
+
this [13] = a12 * b01 + a13 * b05 + a14 * b09 + a15 * b13;
|
|
645
|
+
this [14] = a12 * b02 + a13 * b06 + a14 * b10 + a15 * b14;
|
|
646
|
+
this [15] = a12 * b03 + a13 * b07 + a14 * b11 + a15 * b15;
|
|
647
|
+
|
|
648
|
+
return this;
|
|
649
|
+
},
|
|
650
|
+
multVecMatrix: function (vector)
|
|
651
|
+
{
|
|
652
|
+
if (vector .length === 3)
|
|
653
|
+
{
|
|
654
|
+
const
|
|
655
|
+
x = vector .x,
|
|
656
|
+
y = vector .y,
|
|
657
|
+
z = vector .z,
|
|
658
|
+
w = 1 / (x * this [3] + y * this [7] + z * this [11] + this [15]);
|
|
659
|
+
|
|
660
|
+
vector .x = (x * this [0] + y * this [4] + z * this [ 8] + this [12]) * w;
|
|
661
|
+
vector .y = (x * this [1] + y * this [5] + z * this [ 9] + this [13]) * w;
|
|
662
|
+
vector .z = (x * this [2] + y * this [6] + z * this [10] + this [14]) * w;
|
|
663
|
+
|
|
664
|
+
return vector;
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
const
|
|
668
|
+
x = vector .x,
|
|
669
|
+
y = vector .y,
|
|
670
|
+
z = vector .z,
|
|
671
|
+
w = vector .w;
|
|
672
|
+
|
|
673
|
+
vector .x = x * this [0] + y * this [4] + z * this [ 8] + w * this [12];
|
|
674
|
+
vector .y = x * this [1] + y * this [5] + z * this [ 9] + w * this [13];
|
|
675
|
+
vector .z = x * this [2] + y * this [6] + z * this [10] + w * this [14];
|
|
676
|
+
vector .w = x * this [3] + y * this [7] + z * this [11] + w * this [15];
|
|
677
|
+
|
|
678
|
+
return vector;
|
|
679
|
+
},
|
|
680
|
+
multMatrixVec: function (vector)
|
|
681
|
+
{
|
|
682
|
+
if (vector .length === 3)
|
|
683
|
+
{
|
|
684
|
+
const
|
|
685
|
+
x = vector .x,
|
|
686
|
+
y = vector .y,
|
|
687
|
+
z = vector .z,
|
|
688
|
+
w = 1 / (x * this [12] + y * this [13] + z * this [14] + this [15]);
|
|
689
|
+
|
|
690
|
+
vector .x = (x * this [0] + y * this [1] + z * this [ 2] + this [ 3]) * w;
|
|
691
|
+
vector .y = (x * this [4] + y * this [5] + z * this [ 6] + this [ 7]) * w;
|
|
692
|
+
vector .z = (x * this [8] + y * this [9] + z * this [10] + this [11]) * w;
|
|
693
|
+
|
|
694
|
+
return vector;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
const
|
|
698
|
+
x = vector .x,
|
|
699
|
+
y = vector .y,
|
|
700
|
+
z = vector .z,
|
|
701
|
+
w = vector .w;
|
|
702
|
+
|
|
703
|
+
vector .x = x * this [ 0] + y * this [ 1] + z * this [ 2] + w * this [ 3];
|
|
704
|
+
vector .y = x * this [ 4] + y * this [ 5] + z * this [ 6] + w * this [ 7];
|
|
705
|
+
vector .z = x * this [ 8] + y * this [ 9] + z * this [10] + w * this [11];
|
|
706
|
+
vector .w = x * this [12] + y * this [13] + z * this [14] + w * this [15];
|
|
707
|
+
|
|
708
|
+
return vector;
|
|
709
|
+
},
|
|
710
|
+
multDirMatrix: function (vector)
|
|
711
|
+
{
|
|
712
|
+
const
|
|
713
|
+
x = vector .x,
|
|
714
|
+
y = vector .y,
|
|
715
|
+
z = vector .z;
|
|
716
|
+
|
|
717
|
+
vector .x = x * this [0] + y * this [4] + z * this [ 8];
|
|
718
|
+
vector .y = x * this [1] + y * this [5] + z * this [ 9];
|
|
719
|
+
vector .z = x * this [2] + y * this [6] + z * this [10];
|
|
720
|
+
|
|
721
|
+
return vector;
|
|
722
|
+
},
|
|
723
|
+
multMatrixDir: function (vector)
|
|
724
|
+
{
|
|
725
|
+
const
|
|
726
|
+
x = vector .x,
|
|
727
|
+
y = vector .y,
|
|
728
|
+
z = vector .z;
|
|
729
|
+
|
|
730
|
+
vector .x = x * this [0] + y * this [1] + z * this [ 2];
|
|
731
|
+
vector .y = x * this [4] + y * this [5] + z * this [ 6];
|
|
732
|
+
vector .z = x * this [8] + y * this [9] + z * this [10];
|
|
733
|
+
|
|
734
|
+
return vector;
|
|
735
|
+
},
|
|
736
|
+
identity: function ()
|
|
737
|
+
{
|
|
738
|
+
this [ 0] = 1; this [ 1] = 0; this [ 2] = 0; this [ 3] = 0;
|
|
739
|
+
this [ 4] = 0; this [ 5] = 1; this [ 6] = 0; this [ 7] = 0;
|
|
740
|
+
this [ 8] = 0; this [ 9] = 0; this [10] = 1; this [11] = 0;
|
|
741
|
+
this [12] = 0; this [13] = 0; this [14] = 0; this [15] = 1;
|
|
742
|
+
},
|
|
743
|
+
translate: function (translation)
|
|
744
|
+
{
|
|
745
|
+
const
|
|
746
|
+
x = translation .x,
|
|
747
|
+
y = translation .y,
|
|
748
|
+
z = translation .z;
|
|
749
|
+
|
|
750
|
+
this [12] += this [ 0] * x + this [ 4] * y + this [ 8] * z;
|
|
751
|
+
this [13] += this [ 1] * x + this [ 5] * y + this [ 9] * z;
|
|
752
|
+
this [14] += this [ 2] * x + this [ 6] * y + this [10] * z;
|
|
753
|
+
|
|
754
|
+
return this;
|
|
755
|
+
},
|
|
756
|
+
rotate: function (rotation)
|
|
757
|
+
{
|
|
758
|
+
this .multLeft (rotateMatrix .setQuaternion (rotation .value));
|
|
759
|
+
|
|
760
|
+
return this;
|
|
761
|
+
},
|
|
762
|
+
scale: function (scale)
|
|
763
|
+
{
|
|
764
|
+
const
|
|
765
|
+
x = scale .x,
|
|
766
|
+
y = scale .y,
|
|
767
|
+
z = scale .z;
|
|
768
|
+
|
|
769
|
+
this [ 0] *= x;
|
|
770
|
+
this [ 4] *= y;
|
|
771
|
+
this [ 8] *= z;
|
|
772
|
+
|
|
773
|
+
this [ 1] *= x;
|
|
774
|
+
this [ 5] *= y;
|
|
775
|
+
this [ 9] *= z;
|
|
776
|
+
|
|
777
|
+
this [ 2] *= x;
|
|
778
|
+
this [ 6] *= y;
|
|
779
|
+
this [10] *= z;
|
|
780
|
+
|
|
781
|
+
return this;
|
|
782
|
+
},
|
|
783
|
+
getDepth: function (vector)
|
|
784
|
+
{
|
|
785
|
+
const
|
|
786
|
+
x = vector .x,
|
|
787
|
+
y = vector .y,
|
|
788
|
+
z = vector .z,
|
|
789
|
+
w = 1 / (x * this [3] + y * this [7] + z * this [11] + this [15]);
|
|
790
|
+
|
|
791
|
+
return (x * this [2] + y * this [6] + z * this [10] + this [14]) * w;
|
|
792
|
+
},
|
|
793
|
+
toString: function ()
|
|
794
|
+
{
|
|
795
|
+
return this [ 0] + " " + this [ 1] + " " + this [ 2] + " " + this [ 3] + " " +
|
|
796
|
+
this [ 4] + " " + this [ 5] + " " + this [ 6] + " " + this [ 7] + " " +
|
|
797
|
+
this [ 8] + " " + this [ 9] + " " + this [10] + " " + this [11] + " " +
|
|
798
|
+
this [12] + " " + this [13] + " " + this [14] + " " + this [15]
|
|
799
|
+
},
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
Object .defineProperty (Matrix4 .prototype, "x",
|
|
803
|
+
{
|
|
804
|
+
get: (function ()
|
|
805
|
+
{
|
|
806
|
+
const vector = new Vector4 (0, 0, 0, 0);
|
|
807
|
+
|
|
808
|
+
return function () { return vector .set (this [0], this [1], this [2], this [3]); };
|
|
809
|
+
})(),
|
|
810
|
+
enumerable: false,
|
|
811
|
+
configurable: false
|
|
812
|
+
});
|
|
813
|
+
|
|
814
|
+
Object .defineProperty (Matrix4 .prototype, "y",
|
|
815
|
+
{
|
|
816
|
+
get: (function ()
|
|
817
|
+
{
|
|
818
|
+
const vector = new Vector4 (0, 0, 0, 0);
|
|
819
|
+
|
|
820
|
+
return function () { return vector .set (this [4], this [5], this [6], this [7]); };
|
|
821
|
+
})(),
|
|
822
|
+
enumerable: false,
|
|
823
|
+
configurable: false
|
|
824
|
+
});
|
|
825
|
+
|
|
826
|
+
Object .defineProperty (Matrix4 .prototype, "z",
|
|
827
|
+
{
|
|
828
|
+
get: (function ()
|
|
829
|
+
{
|
|
830
|
+
const vector = new Vector4 (0, 0, 0, 0);
|
|
831
|
+
|
|
832
|
+
return function () { return vector .set (this [8], this [9], this [10], this [11]); };
|
|
833
|
+
})(),
|
|
834
|
+
enumerable: false,
|
|
835
|
+
configurable: false
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
Object .defineProperty (Matrix4 .prototype, "xAxis",
|
|
839
|
+
{
|
|
840
|
+
get: (function ()
|
|
841
|
+
{
|
|
842
|
+
const vector = new Vector3 (0, 0, 0);
|
|
843
|
+
|
|
844
|
+
return function () { return vector .set (this [0], this [1], this [2]); };
|
|
845
|
+
})(),
|
|
846
|
+
enumerable: false,
|
|
847
|
+
configurable: false
|
|
848
|
+
});
|
|
849
|
+
|
|
850
|
+
Object .defineProperty (Matrix4 .prototype, "yAxis",
|
|
851
|
+
{
|
|
852
|
+
get: (function ()
|
|
853
|
+
{
|
|
854
|
+
const vector = new Vector3 (0, 0, 0);
|
|
855
|
+
|
|
856
|
+
return function () { return vector .set (this [4], this [5], this [6]); };
|
|
857
|
+
})(),
|
|
858
|
+
enumerable: false,
|
|
859
|
+
configurable: false
|
|
860
|
+
});
|
|
861
|
+
|
|
862
|
+
Object .defineProperty (Matrix4 .prototype, "zAxis",
|
|
863
|
+
{
|
|
864
|
+
get: (function ()
|
|
865
|
+
{
|
|
866
|
+
const vector = new Vector3 (0, 0, 0);
|
|
867
|
+
|
|
868
|
+
return function () { return vector .set (this [8], this [9], this [10]); };
|
|
869
|
+
})(),
|
|
870
|
+
enumerable: false,
|
|
871
|
+
configurable: false
|
|
872
|
+
});
|
|
873
|
+
|
|
874
|
+
Object .defineProperty (Matrix4 .prototype, "origin",
|
|
875
|
+
{
|
|
876
|
+
get: (function ()
|
|
877
|
+
{
|
|
878
|
+
const vector = new Vector3 (0, 0, 0);
|
|
879
|
+
|
|
880
|
+
return function () { return vector .set (this [12], this [13], this [14]); };
|
|
881
|
+
})(),
|
|
882
|
+
enumerable: false,
|
|
883
|
+
configurable: false
|
|
884
|
+
});
|
|
885
|
+
|
|
886
|
+
Object .defineProperty (Matrix4 .prototype, "submatrix",
|
|
887
|
+
{
|
|
888
|
+
get: (function ()
|
|
889
|
+
{
|
|
890
|
+
const matrix = new Matrix3 ();
|
|
891
|
+
|
|
892
|
+
return function ()
|
|
893
|
+
{
|
|
894
|
+
matrix [0] = this [0]; matrix [1] = this [1]; matrix [2] = this [ 2];
|
|
895
|
+
matrix [3] = this [4]; matrix [4] = this [5]; matrix [5] = this [ 6];
|
|
896
|
+
matrix [6] = this [8]; matrix [7] = this [9]; matrix [8] = this [10];
|
|
897
|
+
return matrix;
|
|
898
|
+
};
|
|
899
|
+
})(),
|
|
900
|
+
enumerable: false,
|
|
901
|
+
configurable: false
|
|
902
|
+
});
|
|
903
|
+
|
|
904
|
+
Object .assign (Matrix4,
|
|
905
|
+
{
|
|
906
|
+
Identity: new Matrix4 (),
|
|
907
|
+
Rotation: function (rotation)
|
|
908
|
+
{
|
|
909
|
+
return Object .create (this .prototype) .setQuaternion (rotation .value);
|
|
910
|
+
},
|
|
911
|
+
Quaternion: function (quaternion)
|
|
912
|
+
{
|
|
913
|
+
return Object .create (this .prototype) .setQuaternion (quaternion);
|
|
914
|
+
},
|
|
915
|
+
Matrix3: function (matrix)
|
|
916
|
+
{
|
|
917
|
+
return new Matrix4 (matrix [0], matrix [1], matrix [2], 0,
|
|
918
|
+
matrix [3], matrix [4], matrix [5], 0,
|
|
919
|
+
matrix [6], matrix [7], matrix [8], 0,
|
|
920
|
+
0, 0, 0, 1);
|
|
921
|
+
},
|
|
922
|
+
transpose: function (matrix)
|
|
923
|
+
{
|
|
924
|
+
return matrix .copy () .transpose ();
|
|
925
|
+
},
|
|
926
|
+
inverse: function (matrix)
|
|
927
|
+
{
|
|
928
|
+
return matrix .copy () .inverse ();
|
|
929
|
+
},
|
|
930
|
+
multLeft: function (lhs, rhs)
|
|
931
|
+
{
|
|
932
|
+
return lhs .copy () .multLeft (rhs);
|
|
933
|
+
},
|
|
934
|
+
multRight: function (lhs, rhs)
|
|
935
|
+
{
|
|
936
|
+
return lhs .copy () .multRight (rhs);
|
|
937
|
+
},
|
|
938
|
+
});
|
|
939
|
+
|
|
940
|
+
const rotateMatrix = new Matrix4 ();
|
|
941
|
+
|
|
942
|
+
return Matrix4;
|
|
943
943
|
});
|