x_ite 8.4.3 → 8.5.3
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 +5 -1
- package/Makefile +0 -3
- package/build/bin/components.js +173 -0
- package/build/bin/tags.pl +28 -0
- package/build/bin/tests.pl +80 -2
- package/build/bin/version.pl +12 -7
- 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 +28 -29
- 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 +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +63 -42
- 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 -29
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +29 -31
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +23 -23
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +19 -19
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +24 -19
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +30 -30
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +172 -594
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +31 -47
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +367 -346
- 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 +12174 -3553
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +5 -136
- package/docs/_data/nav/components-CADGeometry.yml +14 -0
- package/docs/_data/nav/components-Core.yml +16 -0
- package/docs/_data/nav/components-CubeMapTexturing.yml +8 -0
- package/docs/_data/nav/components-DIS.yml +14 -0
- package/docs/_data/nav/components-EnvironmentalEffects.yml +12 -0
- package/docs/_data/nav/components-EnvironmentalSensor.yml +8 -0
- package/docs/_data/nav/components-EventUtilities.yml +16 -0
- package/docs/_data/nav/components-Followers.yml +30 -0
- package/docs/_data/nav/components-Geometry2D.yml +18 -0
- package/docs/_data/nav/components-Geometry3D.yml +16 -0
- package/docs/_data/nav/components-Geospatial.yml +24 -0
- package/docs/_data/nav/components-Grouping.yml +10 -0
- package/docs/_data/nav/components-HAnim.yml +14 -0
- package/docs/_data/nav/components-Interpolation.yml +28 -0
- package/docs/_data/nav/components-KeyDeviceSensor.yml +6 -0
- package/docs/_data/nav/components-Layering.yml +8 -0
- package/docs/_data/nav/components-Layout.yml +12 -0
- package/docs/_data/nav/components-Lighting.yml +10 -0
- package/docs/_data/nav/components-NURBS.yml +30 -0
- package/docs/_data/nav/components-Navigation.yml +16 -0
- package/docs/_data/nav/components-Networking.yml +8 -0
- package/docs/_data/nav/components-ParticleSystems.yml +22 -0
- package/docs/_data/nav/components-Picking.yml +12 -0
- package/docs/_data/nav/components-PointingDeviceSensor.yml +10 -0
- package/docs/_data/nav/components-Rendering.yml +30 -0
- package/docs/_data/nav/components-RigidBodyPhysics.yml +30 -0
- package/docs/_data/nav/components-Scripting.yml +4 -0
- package/docs/_data/nav/components-Shaders.yml +18 -0
- package/docs/_data/nav/components-Shape.yml +22 -0
- package/docs/_data/nav/components-Sound.yml +44 -0
- package/docs/_data/nav/components-Text.yml +6 -0
- package/docs/_data/nav/components-TextureProjector.yml +6 -0
- package/docs/_data/nav/components-Texturing.yml +22 -0
- package/docs/_data/nav/components-Texturing3D.yml +18 -0
- package/docs/_data/nav/components-Time.yml +4 -0
- package/docs/_data/nav/components-VolumeRendering.yml +28 -0
- package/docs/_data/nav/components-X_ITE.yml +4 -0
- package/docs/_data/nav/main.yml +26 -0
- package/docs/_data/nav/reference.yml +18 -0
- package/docs/_data/nav/tutorials-animation-sensors-and-geometry.yml +18 -0
- package/docs/_data/nav/tutorials-basic.yml +6 -0
- package/docs/_data/nav/tutorials-optimize-your-scene.yml +6 -0
- package/docs/_data/nav/tutorials-scripts-and-prototypes.yml +12 -0
- package/docs/_data/nav/tutorials-shapes-geometry-and-appearance.yml +16 -0
- package/docs/_data/nav/tutorials-textures-lights-and-environment.yml +20 -0
- package/docs/_includes/nav.html +2 -2
- package/docs/_includes/scripts.html +2 -1
- package/docs/_posts/accessing-the-external-browser.md +1 -1
- package/docs/_posts/browser-support.md +1 -1
- package/docs/_posts/components/CADGeometry/CADAssembly.md +83 -0
- package/docs/_posts/components/CADGeometry/CADFace.md +70 -0
- package/docs/_posts/components/CADGeometry/CADLayer.md +84 -0
- package/docs/_posts/components/CADGeometry/CADPart.md +117 -0
- package/docs/_posts/components/CADGeometry/IndexedQuadSet.md +125 -0
- package/docs/_posts/components/CADGeometry/QuadSet.md +113 -0
- package/docs/_posts/components/Core/MetadataBoolean.md +90 -0
- package/docs/_posts/components/Core/MetadataDouble.md +67 -0
- package/docs/_posts/components/Core/MetadataFloat.md +67 -0
- package/docs/_posts/components/Core/MetadataInteger.md +66 -0
- package/docs/_posts/components/Core/MetadataSet.md +63 -0
- package/docs/_posts/components/Core/MetadataString.md +66 -0
- package/docs/_posts/components/Core/WorldInfo.md +54 -0
- package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +76 -0
- package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +65 -0
- package/docs/_posts/components/CubeMapTexturing/ImageCubeMapTexture.md +66 -0
- package/docs/_posts/components/DIS/DISEntityManager.md +73 -0
- package/docs/_posts/components/DIS/DISEntityTypeMapping.md +88 -0
- package/docs/_posts/components/DIS/EspduTransform.md +416 -0
- package/docs/_posts/components/DIS/ReceiverPdu.md +168 -0
- package/docs/_posts/components/DIS/SignalPdu.md +168 -0
- package/docs/_posts/components/DIS/TransmitterPdu.md +232 -0
- package/docs/_posts/components/EnvironmentalEffects/Background.md +189 -0
- package/docs/_posts/components/EnvironmentalEffects/Fog.md +97 -0
- package/docs/_posts/components/EnvironmentalEffects/FogCoordinate.md +40 -0
- package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +84 -0
- package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +142 -0
- package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +90 -0
- package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +91 -0
- package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +73 -0
- package/docs/_posts/components/EventUtilities/BooleanFilter.md +62 -0
- package/docs/_posts/components/EventUtilities/BooleanSequencer.md +86 -0
- package/docs/_posts/components/EventUtilities/BooleanToggle.md +46 -0
- package/docs/_posts/components/EventUtilities/BooleanTrigger.md +47 -0
- package/docs/_posts/components/EventUtilities/IntegerSequencer.md +90 -0
- package/docs/_posts/components/EventUtilities/IntegerTrigger.md +51 -0
- package/docs/_posts/components/EventUtilities/TimeTrigger.md +47 -0
- package/docs/_posts/components/Followers/ColorChaser.md +77 -0
- package/docs/_posts/components/Followers/ColorDamper.md +85 -0
- package/docs/_posts/components/Followers/CoordinateChaser.md +76 -0
- package/docs/_posts/components/Followers/CoordinateDamper.md +80 -0
- package/docs/_posts/components/Followers/OrientationChaser.md +72 -0
- package/docs/_posts/components/Followers/OrientationDamper.md +80 -0
- package/docs/_posts/components/Followers/PositionChaser.md +72 -0
- package/docs/_posts/components/Followers/PositionChaser2D.md +72 -0
- package/docs/_posts/components/Followers/PositionDamper.md +80 -0
- package/docs/_posts/components/Followers/PositionDamper2D.md +80 -0
- package/docs/_posts/components/Followers/ScalarChaser.md +76 -0
- package/docs/_posts/components/Followers/ScalarDamper.md +80 -0
- package/docs/_posts/components/Followers/TexCoordChaser2D.md +72 -0
- package/docs/_posts/components/Followers/TexCoordDamper2D.md +80 -0
- package/docs/_posts/components/Geometry2D/Arc2D.md +71 -0
- package/docs/_posts/components/Geometry2D/ArcClose2D.md +91 -0
- package/docs/_posts/components/Geometry2D/Circle2D.md +55 -0
- package/docs/_posts/components/Geometry2D/Disk2D.md +75 -0
- package/docs/_posts/components/Geometry2D/Polyline2D.md +54 -0
- package/docs/_posts/components/Geometry2D/Polypoint2D.md +54 -0
- package/docs/_posts/components/Geometry2D/Rectangle2D.md +66 -0
- package/docs/_posts/components/Geometry2D/TriangleSet2D.md +66 -0
- package/docs/_posts/components/Geometry3D/Box.md +66 -0
- package/docs/_posts/components/Geometry3D/Cone.md +90 -0
- package/docs/_posts/components/Geometry3D/Cylinder.md +98 -0
- package/docs/_posts/components/Geometry3D/ElevationGrid.md +162 -0
- package/docs/_posts/components/Geometry3D/Extrusion.md +170 -0
- package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +208 -0
- package/docs/_posts/components/Geometry3D/Sphere.md +66 -0
- package/docs/_posts/components/Geospatial/GeoCoordinate.md +65 -0
- package/docs/_posts/components/Geospatial/GeoElevationGrid.md +180 -0
- package/docs/_posts/components/Geospatial/GeoLOD.md +128 -0
- package/docs/_posts/components/Geospatial/GeoLocation.md +93 -0
- package/docs/_posts/components/Geospatial/GeoMetadata.md +75 -0
- package/docs/_posts/components/Geospatial/GeoOrigin.md +69 -0
- package/docs/_posts/components/Geospatial/GeoPositionInterpolator.md +95 -0
- package/docs/_posts/components/Geospatial/GeoProximitySensor.md +109 -0
- package/docs/_posts/components/Geospatial/GeoTouchSensor.md +108 -0
- package/docs/_posts/components/Geospatial/GeoTransform.md +121 -0
- package/docs/_posts/components/Geospatial/GeoViewpoint.md +126 -0
- package/docs/_posts/components/Grouping/Group.md +75 -0
- package/docs/_posts/components/Grouping/StaticGroup.md +65 -0
- package/docs/_posts/components/Grouping/Switch.md +89 -0
- package/docs/_posts/components/Grouping/Transform.md +126 -0
- package/docs/_posts/components/HAnim/HAnimDisplacer.md +89 -0
- package/docs/_posts/components/HAnim/HAnimHumanoid.md +136 -0
- package/docs/_posts/components/HAnim/HAnimJoint.md +165 -0
- package/docs/_posts/components/HAnim/HAnimMotion.md +68 -0
- package/docs/_posts/components/HAnim/HAnimSegment.md +107 -0
- package/docs/_posts/components/HAnim/HAnimSite.md +108 -0
- package/docs/_posts/components/Interpolation/ColorInterpolator.md +73 -0
- package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +76 -0
- package/docs/_posts/components/Interpolation/CoordinateInterpolator2D.md +73 -0
- package/docs/_posts/components/Interpolation/EaseInEaseOut.md +67 -0
- package/docs/_posts/components/Interpolation/NormalInterpolator.md +68 -0
- package/docs/_posts/components/Interpolation/OrientationInterpolator.md +72 -0
- package/docs/_posts/components/Interpolation/PositionInterpolator.md +72 -0
- package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +77 -0
- package/docs/_posts/components/Interpolation/ScalarInterpolator.md +76 -0
- package/docs/_posts/components/Interpolation/SplinePositionInterpolator.md +93 -0
- package/docs/_posts/components/Interpolation/SplinePositionInterpolator2D.md +93 -0
- package/docs/_posts/components/Interpolation/SplineScalarInterpolator.md +106 -0
- package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.md +78 -0
- package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +78 -0
- package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +70 -0
- package/docs/_posts/components/Layering/Layer.md +67 -0
- package/docs/_posts/components/Layering/LayerSet.md +78 -0
- package/docs/_posts/components/Layering/Viewport.md +80 -0
- package/docs/_posts/components/Layout/Layout.md +107 -0
- package/docs/_posts/components/Layout/LayoutGroup.md +85 -0
- package/docs/_posts/components/Layout/LayoutLayer.md +74 -0
- package/docs/_posts/components/Layout/ScreenFontStyle.md +137 -0
- package/docs/_posts/components/Layout/ScreenGroup.md +71 -0
- package/docs/_posts/components/Lighting/DirectionalLight.md +100 -0
- package/docs/_posts/components/Lighting/EnvironmentLight.md +91 -0
- package/docs/_posts/components/Lighting/PointLight.md +103 -0
- package/docs/_posts/components/Lighting/SpotLight.md +132 -0
- package/docs/_posts/components/NURBS/Contour2D.md +57 -0
- package/docs/_posts/components/NURBS/ContourPolyline2D.md +46 -0
- package/docs/_posts/components/NURBS/CoordinateDouble.md +47 -0
- package/docs/_posts/components/NURBS/NurbsCurve.md +71 -0
- package/docs/_posts/components/NURBS/NurbsCurve2D.md +66 -0
- package/docs/_posts/components/NURBS/NurbsOrientationInterpolator.md +70 -0
- package/docs/_posts/components/NURBS/NurbsPatchSurface.md +106 -0
- package/docs/_posts/components/NURBS/NurbsPositionInterpolator.md +70 -0
- package/docs/_posts/components/NURBS/NurbsSet.md +66 -0
- package/docs/_posts/components/NURBS/NurbsSurfaceInterpolator.md +90 -0
- package/docs/_posts/components/NURBS/NurbsSweptSurface.md +69 -0
- package/docs/_posts/components/NURBS/NurbsSwungSurface.md +65 -0
- package/docs/_posts/components/NURBS/NurbsTextureCoordinate.md +77 -0
- package/docs/_posts/components/NURBS/NurbsTrimmedSurface.md +114 -0
- package/docs/_posts/components/Navigation/Billboard.md +88 -0
- package/docs/_posts/components/Navigation/Collision.md +102 -0
- package/docs/_posts/components/Navigation/LOD.md +99 -0
- package/docs/_posts/components/Navigation/NavigationInfo.md +122 -0
- package/docs/_posts/components/Navigation/OrthoViewpoint.md +117 -0
- package/docs/_posts/components/Navigation/Viewpoint.md +117 -0
- package/docs/_posts/components/Navigation/ViewpointGroup.md +80 -0
- package/docs/_posts/components/Networking/Anchor.md +111 -0
- package/docs/_posts/components/Networking/Inline.md +115 -0
- package/docs/_posts/components/Networking/LoadSensor.md +91 -0
- package/docs/_posts/components/ParticleSystems/BoundedPhysicsModel.md +54 -0
- package/docs/_posts/components/ParticleSystems/ConeEmitter.md +76 -0
- package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +72 -0
- package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +58 -0
- package/docs/_posts/components/ParticleSystems/ParticleSystem.md +177 -0
- package/docs/_posts/components/ParticleSystems/PointEmitter.md +76 -0
- package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +94 -0
- package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +90 -0
- package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +90 -0
- package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +68 -0
- package/docs/_posts/components/Picking/LinePickSensor.md +125 -0
- package/docs/_posts/components/Picking/PickableGroup.md +93 -0
- package/docs/_posts/components/Picking/PointPickSensor.md +112 -0
- package/docs/_posts/components/Picking/PrimitivePickSensor.md +114 -0
- package/docs/_posts/components/Picking/VolumePickSensor.md +107 -0
- package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +122 -0
- package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +114 -0
- package/docs/_posts/components/PointingDeviceSensor/SphereSensor.md +89 -0
- package/docs/_posts/components/PointingDeviceSensor/TouchSensor.md +87 -0
- package/docs/_posts/components/Rendering/ClipPlane.md +67 -0
- package/docs/_posts/components/Rendering/Color.md +56 -0
- package/docs/_posts/components/Rendering/ColorRGBA.md +61 -0
- package/docs/_posts/components/Rendering/Coordinate.md +45 -0
- package/docs/_posts/components/Rendering/IndexedLineSet.md +128 -0
- package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +128 -0
- package/docs/_posts/components/Rendering/IndexedTriangleSet.md +128 -0
- package/docs/_posts/components/Rendering/IndexedTriangleStripSet.md +116 -0
- package/docs/_posts/components/Rendering/LineSet.md +85 -0
- package/docs/_posts/components/Rendering/Normal.md +41 -0
- package/docs/_posts/components/Rendering/PointSet.md +76 -0
- package/docs/_posts/components/Rendering/TriangleFanSet.md +112 -0
- package/docs/_posts/components/Rendering/TriangleSet.md +108 -0
- package/docs/_posts/components/Rendering/TriangleStripSet.md +116 -0
- package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +78 -0
- package/docs/_posts/components/RigidBodyPhysics/CollidableOffset.md +75 -0
- package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +83 -0
- package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +90 -0
- package/docs/_posts/components/RigidBodyPhysics/CollisionSensor.md +65 -0
- package/docs/_posts/components/RigidBodyPhysics/CollisionSpace.md +70 -0
- package/docs/_posts/components/RigidBodyPhysics/Contact.md +117 -0
- package/docs/_posts/components/RigidBodyPhysics/DoubleAxisHingeJoint.md +162 -0
- package/docs/_posts/components/RigidBodyPhysics/MotorJoint.md +183 -0
- package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +175 -0
- package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +120 -0
- package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +108 -0
- package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +106 -0
- package/docs/_posts/components/RigidBodyPhysics/UniversalJoint.md +119 -0
- package/docs/_posts/components/Scripting/Script.md +81 -0
- package/docs/_posts/components/Shaders/ComposedShader.md +81 -0
- package/docs/_posts/components/Shaders/FloatVertexAttribute.md +65 -0
- package/docs/_posts/components/Shaders/Matrix3VertexAttribute.md +53 -0
- package/docs/_posts/components/Shaders/Matrix4VertexAttribute.md +53 -0
- package/docs/_posts/components/Shaders/PackagedShader.md +77 -0
- package/docs/_posts/components/Shaders/ProgramShader.md +71 -0
- package/docs/_posts/components/Shaders/ShaderPart.md +76 -0
- package/docs/_posts/components/Shaders/ShaderProgram.md +68 -0
- package/docs/_posts/components/Shape/AcousticProperties.md +52 -0
- package/docs/_posts/components/Shape/Appearance.md +123 -0
- package/docs/_posts/components/Shape/FillProperties.md +67 -0
- package/docs/_posts/components/Shape/LineProperties.md +63 -0
- package/docs/_posts/components/Shape/Material.md +217 -0
- package/docs/_posts/components/Shape/PhysicalMaterial.md +173 -0
- package/docs/_posts/components/Shape/PointProperties.md +84 -0
- package/docs/_posts/components/Shape/Shape.md +63 -0
- package/docs/_posts/components/Shape/TwoSidedMaterial.md +149 -0
- package/docs/_posts/components/Shape/UnlitMaterial.md +115 -0
- package/docs/_posts/components/Sound/Analyser.md +72 -0
- package/docs/_posts/components/Sound/AudioClip.md +139 -0
- package/docs/_posts/components/Sound/AudioDestination.md +52 -0
- package/docs/_posts/components/Sound/BiquadFilter.md +70 -0
- package/docs/_posts/components/Sound/BufferAudioSource.md +86 -0
- package/docs/_posts/components/Sound/ChannelMerger.md +46 -0
- package/docs/_posts/components/Sound/ChannelSelector.md +48 -0
- package/docs/_posts/components/Sound/ChannelSplitter.md +48 -0
- package/docs/_posts/components/Sound/Convolver.md +66 -0
- package/docs/_posts/components/Sound/Delay.md +66 -0
- package/docs/_posts/components/Sound/DynamicsCompressor.md +74 -0
- package/docs/_posts/components/Sound/Gain.md +62 -0
- package/docs/_posts/components/Sound/ListenerPointSource.md +62 -0
- package/docs/_posts/components/Sound/MicrophoneSource.md +54 -0
- package/docs/_posts/components/Sound/OscillatorSource.md +58 -0
- package/docs/_posts/components/Sound/PeriodicWave.md +42 -0
- package/docs/_posts/components/Sound/Sound.md +92 -0
- package/docs/_posts/components/Sound/SpatialSound.md +68 -0
- package/docs/_posts/components/Sound/StreamAudioDestination.md +52 -0
- package/docs/_posts/components/Sound/StreamAudioSource.md +54 -0
- package/docs/_posts/components/Sound/WaveShaper.md +66 -0
- package/docs/_posts/components/Text/FontStyle.md +145 -0
- package/docs/_posts/components/Text/Text.md +102 -0
- package/docs/_posts/components/TextureProjector/TextureProjector.md +52 -0
- package/docs/_posts/components/TextureProjector/TextureProjectorParallel.md +52 -0
- package/docs/_posts/components/Texturing/ImageTexture.md +134 -0
- package/docs/_posts/components/Texturing/MovieTexture.md +221 -0
- package/docs/_posts/components/Texturing/MultiTexture.md +100 -0
- package/docs/_posts/components/Texturing/MultiTextureCoordinate.md +47 -0
- package/docs/_posts/components/Texturing/MultiTextureTransform.md +47 -0
- package/docs/_posts/components/Texturing/PixelTexture.md +80 -0
- package/docs/_posts/components/Texturing/TextureCoordinate.md +52 -0
- package/docs/_posts/components/Texturing/TextureCoordinateGenerator.md +64 -0
- package/docs/_posts/components/Texturing/TextureProperties.md +137 -0
- package/docs/_posts/components/Texturing/TextureTransform.md +73 -0
- package/docs/_posts/components/Texturing3D/ComposedTexture3D.md +76 -0
- package/docs/_posts/components/Texturing3D/ImageTexture3D.md +132 -0
- package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +131 -0
- package/docs/_posts/components/Texturing3D/PixelTexture3D.md +75 -0
- package/docs/_posts/components/Texturing3D/TextureCoordinate3D.md +53 -0
- package/docs/_posts/components/Texturing3D/TextureCoordinate4D.md +52 -0
- package/docs/_posts/components/Texturing3D/TextureTransform3D.md +69 -0
- package/docs/_posts/components/Texturing3D/TextureTransformMatrix3D.md +57 -0
- package/docs/_posts/components/Time/TimeSensor.md +136 -0
- package/docs/_posts/components/VolumeRendering/BlendedVolumeStyle.md +92 -0
- package/docs/_posts/components/VolumeRendering/BoundaryEnhancementVolumeStyle.md +53 -0
- package/docs/_posts/components/VolumeRendering/CartoonVolumeStyle.md +83 -0
- package/docs/_posts/components/VolumeRendering/ComposedVolumeStyle.md +51 -0
- package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +67 -0
- package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +99 -0
- package/docs/_posts/components/VolumeRendering/OpacityMapVolumeStyle.md +51 -0
- package/docs/_posts/components/VolumeRendering/ProjectionVolumeStyle.md +48 -0
- package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +80 -0
- package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +75 -0
- package/docs/_posts/components/VolumeRendering/SilhouetteEnhancementVolumeStyle.md +63 -0
- package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +71 -0
- package/docs/_posts/components/VolumeRendering/VolumeData.md +71 -0
- package/docs/_posts/components/X_ITE/BlendMode.md +94 -0
- package/docs/_posts/custom-shaders.md +9 -4
- package/docs/_posts/dom-integration.md +1 -6
- package/docs/_posts/features.md +2 -2
- package/docs/_posts/getting-started.md +100 -57
- package/docs/_posts/glossary.md +1 -1
- package/docs/_posts/how-to-configure-your-web-server.md +1 -1
- package/docs/_posts/reference/browser-services.md +78 -18
- package/docs/_posts/reference/constants-services.md +1 -1
- package/docs/_posts/reference/ecmascript-object-and-function-definitions.md +1 -1
- package/docs/_posts/reference/field-services-and-objects.md +8 -8
- package/docs/_posts/reference/prototype-services.md +7 -7
- package/docs/_posts/reference/route-services.md +1 -1
- package/docs/_posts/reference/scene-services.md +5 -5
- package/docs/_posts/reference/script-node-authoring-interface.md +1 -1
- package/docs/_posts/report-a-bug.md +1 -1
- package/docs/_posts/setup-a-localhost-server.md +5 -1
- package/docs/_posts/supported-nodes.md +239 -238
- package/docs/_posts/tutorials/adding-backgrounds.md +3 -3
- package/docs/_posts/tutorials/adding-fog.md +2 -2
- package/docs/_posts/tutorials/adding-sound.md +19 -19
- package/docs/_posts/tutorials/animating-transforms.md +17 -17
- package/docs/_posts/tutorials/basic-nodes.md +30 -30
- package/docs/_posts/tutorials/building-a-x3d-world.md +3 -3
- package/docs/_posts/tutorials/building-elevation-grids.md +7 -7
- package/docs/_posts/tutorials/building-extruded-shapes.md +7 -7
- package/docs/_posts/tutorials/building-primitive-shapes.md +13 -13
- package/docs/_posts/tutorials/building-shapes-out-of-points-lines-and-faces.md +21 -21
- package/docs/_posts/tutorials/controlling-appearance-with-materials.md +7 -7
- package/docs/_posts/tutorials/controlling-color-on-coordinate-based-geometry.md +11 -11
- package/docs/_posts/tutorials/controlling-detail.md +4 -4
- package/docs/_posts/tutorials/controlling-how-textures-are-mapped.md +7 -7
- package/docs/_posts/tutorials/controlling-navigation.md +3 -3
- package/docs/_posts/tutorials/controlling-shading-on-coordinate-based-geometry.md +13 -13
- package/docs/_posts/tutorials/controlling-the-viewpoint.md +3 -3
- package/docs/_posts/tutorials/creating-new-node-types.md +4 -4
- package/docs/_posts/tutorials/grouping-nodes.md +13 -13
- package/docs/_posts/tutorials/hello-world.md +1 -1
- package/docs/_posts/tutorials/improving-performance.md +1 -1
- package/docs/_posts/tutorials/increasing-rendering-speed.md +1 -1
- package/docs/_posts/tutorials/introducing-animation.md +10 -10
- package/docs/_posts/tutorials/introducing-script-use.md +3 -3
- package/docs/_posts/tutorials/introducing-x3d.md +1 -1
- package/docs/_posts/tutorials/lighting-your-world.md +4 -4
- package/docs/_posts/tutorials/mapping-textures.md +7 -7
- package/docs/_posts/tutorials/naming-nodes.md +1 -1
- package/docs/_posts/tutorials/overview.md +1 -1
- package/docs/_posts/tutorials/providing-information-about-your-world.md +2 -2
- package/docs/_posts/tutorials/sensing-the-viewer.md +15 -15
- package/docs/_posts/tutorials/sensing-viewer-actions.md +10 -10
- package/docs/_posts/tutorials/transforming-shapes.md +4 -4
- package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +5 -5
- package/docs/_posts/what's-new.md +40 -2
- package/docs/_tabs/components.md +383 -0
- package/docs/_tabs/imprint.md +1 -1
- package/docs/_tabs/laboratory.md +38 -6
- package/docs/_tabs/playground.html +22 -66
- package/docs/_tabs/reference.md +2 -1
- package/docs/_tabs/tags.md +1 -1
- package/docs/_tabs/tutorials.md +1 -1
- package/docs/assets/X3D/Michroma-Regular.ttf +0 -0
- package/docs/assets/X3D/peakpx.jpg +0 -0
- package/docs/assets/X3D/teaser.x3d +55 -0
- package/docs/assets/css/style.scss +120 -11
- package/docs/assets/img/laboratory/blend-mode.png +0 -0
- package/docs/assets/img/laboratory/dicom-nrrd.png +0 -0
- package/docs/assets/img/laboratory/earthquake.png +0 -0
- package/docs/assets/img/laboratory/gltf.png +0 -0
- package/docs/assets/img/laboratory/l-system.png +0 -0
- package/docs/assets/js/autoupdate.js +25 -0
- package/docs/laboratory/gltf-sample-viewer.html +318 -0
- package/docs/laboratory/x3d-visual-blend-mode-editor.html +1 -0
- package/package.json +9 -2
- package/src/assets/components/Texturing3D.js +5 -3
- package/src/assets/shaders/Types.glsl.js +5 -5
- package/src/assets/shaders/webgl1/PBR.fs.js +1 -1
- package/src/assets/shaders/webgl1/include/Colors.glsl.js +5 -7
- package/src/assets/shaders/webgl1/include/Fragment.glsl.js +4 -0
- package/src/assets/shaders/webgl1/include/Hatch.glsl.js +1 -1
- package/src/assets/shaders/webgl1/include/Texture.glsl.js +3 -3
- package/src/assets/shaders/webgl2/include/Colors.glsl.js +5 -7
- package/src/assets/shaders/webgl2/include/Hatch.glsl.js +1 -1
- package/src/assets/shaders/webgl2/include/Particle.glsl.js +2 -2
- package/src/assets/shaders/webgl2/include/Texture.glsl.js +2 -2
- package/src/bookmarks.js +12 -8
- package/src/examples.js +3 -0
- package/src/lib/jquery.js +20 -0
- package/src/lib/libgif/libgif.js +1004 -0
- package/src/lib/libtess.js +1 -0
- package/src/lib/nurbs/extras/sample.js +5 -7
- package/src/standard/Math/Algorithms/Bezier.js +175 -33
- package/src/standard/Math/Geometry/Box2.js +15 -55
- package/src/standard/Math/Geometry/Box3.js +19 -66
- package/src/standard/Math/Geometry/Triangle3.js +14 -79
- package/src/standard/Math/Numbers/Color3.js +4 -0
- package/src/standard/Math/Numbers/Color4.js +4 -0
- package/src/standard/Math/Numbers/Matrix3.js +11 -3
- package/src/standard/Math/Numbers/Matrix4.js +9 -6
- package/src/standard/Math/Numbers/Rotation4.js +72 -65
- package/src/tests.js +3 -0
- package/src/x_ite/Base/X3DArrayField.js +0 -2
- package/src/x_ite/Base/X3DInfoArray.js +2 -2
- package/src/x_ite/Base/X3DObjectArrayField.js +19 -0
- package/src/x_ite/Base/X3DTypedArrayField.js +149 -0
- package/src/x_ite/Browser/Core/BrowserOptions.js +108 -64
- package/src/x_ite/Browser/Core/Context.js +1 -1
- package/src/x_ite/Browser/Core/ContextMenu.js +2 -2
- package/src/x_ite/Browser/Core/Notification.js +1 -1
- package/src/x_ite/Browser/Core/RenderingProperties.js +4 -0
- package/src/x_ite/Browser/Core/X3DCoreContext.js +99 -54
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +4 -14
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -13
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -12
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +25 -22
- package/src/x_ite/Browser/Navigation/X3DViewer.js +12 -3
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +2 -2
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +19 -15
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +30 -10
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +1 -1
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +30 -3
- package/src/x_ite/Browser/Text/PolygonText.js +137 -134
- package/src/x_ite/Browser/Texturing/GifMedia.js +113 -0
- package/src/x_ite/Browser/Texturing3D/DICOMParser.js +1 -6
- package/src/x_ite/Browser/Texturing3D/NRRDParser.js +81 -310
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +162 -122
- package/src/x_ite/Browser/X3DBrowserContext.js +7 -5
- package/src/x_ite/Components/Core/WorldInfo.js +3 -3
- package/src/x_ite/Components/Core/X3DNode.js +7 -7
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +1 -1
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +2 -3
- package/src/x_ite/Components/Geometry3D/Extrusion.js +27 -23
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +10 -19
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +1 -3
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +39 -15
- package/src/x_ite/Components/HAnim/HAnimJoint.js +6 -9
- package/src/x_ite/Components/Layering/X3DLayerNode.js +21 -2
- package/src/x_ite/Components/Layout/Layout.js +4 -2
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +6 -0
- package/src/x_ite/Components/Lighting/DirectionalLight.js +4 -11
- package/src/x_ite/Components/Lighting/EnvironmentLight.js +1 -1
- package/src/x_ite/Components/Lighting/PointLight.js +4 -11
- package/src/x_ite/Components/Lighting/SpotLight.js +4 -11
- package/src/x_ite/Components/Lighting/X3DLightNode.js +7 -9
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +2 -2
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +14 -6
- package/src/x_ite/Components/Networking/Inline.js +48 -59
- package/src/x_ite/Components/Networking/X3DUrlObject.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +2 -2
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +7 -13
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +4 -2
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +4 -2
- package/src/x_ite/Components/Scripting/Script.js +2 -2
- package/src/x_ite/Components/Shaders/ShaderPart.js +1 -1
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +1 -3
- package/src/x_ite/Components/Shape/Appearance.js +27 -1
- package/src/x_ite/Components/Shape/FillProperties.js +1 -0
- package/src/x_ite/Components/Shape/LineProperties.js +15 -9
- package/src/x_ite/Components/Shape/Material.js +33 -22
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +22 -15
- package/src/x_ite/Components/Shape/PointProperties.js +23 -7
- package/src/x_ite/Components/Shape/UnlitMaterial.js +3 -2
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +25 -19
- package/src/x_ite/Components/Sound/AudioClip.js +5 -5
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +26 -34
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +1 -1
- package/src/x_ite/Components/TextureProjector/TextureProjector.js +4 -12
- package/src/x_ite/Components/TextureProjector/TextureProjectorParallel.js +6 -14
- package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +7 -7
- package/src/x_ite/Components/Texturing/ImageTexture.js +15 -10
- package/src/x_ite/Components/Texturing/MovieTexture.js +51 -11
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +2 -2
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +230 -0
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +12 -10
- package/src/x_ite/Execution/BindableList.js +35 -37
- package/src/x_ite/Execution/BindableStack.js +25 -7
- package/src/x_ite/Execution/X3DScene.js +2 -2
- package/src/x_ite/Execution/X3DWorld.js +1 -1
- package/src/x_ite/Fields/SFRotation.js +2 -1
- package/src/x_ite/Fields/SFString.js +1 -1
- package/src/x_ite/InputOutput/FileLoader.js +105 -236
- package/src/x_ite/InputOutput/Generator.js +12 -8
- package/src/x_ite/Parser/Expressions.js +85 -0
- package/src/x_ite/Parser/GLB2Parser.js +147 -0
- package/src/x_ite/Parser/GLTF2Parser.js +2221 -0
- package/src/x_ite/Parser/GoldenGate.js +64 -13
- package/src/x_ite/Parser/JSONParser.js +7 -36
- package/src/x_ite/Parser/OBJParser.js +1076 -0
- package/src/x_ite/Parser/STLAParser.js +376 -0
- package/src/x_ite/Parser/STLBParser.js +156 -0
- package/src/x_ite/Parser/SVGParser.js +2476 -0
- package/src/x_ite/Parser/VRMLParser.js +127 -183
- package/src/x_ite/Parser/X3DOptimizer.js +191 -0
- package/src/x_ite/Parser/X3DParser.js +34 -0
- package/src/x_ite/Parser/XMLParser.js +11 -109
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +2 -2
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +3 -3
- package/src/x_ite/Rendering/DependentRenderer.js +1 -1
- package/src/x_ite/Rendering/MultiSampleFrameBuffer.js +150 -0
- package/src/x_ite/Rendering/TextureBuffer.js +3 -5
- package/src/x_ite/Rendering/X3DRenderObject.js +2 -7
- package/src/x_ite/X3D.js +1 -0
- package/src/x_ite/X3DCanvas.js +10 -0
- package/src/x_ite.html +39 -17
- package/webpack.config.js +1 -0
- package/x_ite.min.html +38 -17
- package/src/standard/Networking/BinaryTransport.js +0 -116
|
@@ -45,34 +45,18 @@
|
|
|
45
45
|
*
|
|
46
46
|
******************************************************************************/
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
var Grammar =
|
|
51
|
-
{
|
|
52
|
-
NRRD: new RegExp ("^NRRD(\\d+)\\n", 'gy'),
|
|
53
|
-
field: new RegExp ("([\\w\\s]+):\\s*(.+?)\\n", 'gy'),
|
|
54
|
-
comment: new RegExp ("#[^\\n]*\\n", 'gy'),
|
|
55
|
-
newLine: new RegExp ("\n", 'gy'),
|
|
56
|
-
data: new RegExp ("(.*)$", 'sgy'),
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
function parse (parser)
|
|
60
|
-
{
|
|
61
|
-
this .lastIndex = parser .lastIndex;
|
|
62
|
-
|
|
63
|
-
parser .result = this .exec (parser .input);
|
|
48
|
+
import Expressions from "../../Parser/Expressions.js";
|
|
49
|
+
import $ from "../../../lib/jquery.js";
|
|
64
50
|
|
|
65
|
-
|
|
66
|
-
{
|
|
67
|
-
parser .lastIndex = this .lastIndex;
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return false;
|
|
72
|
-
}
|
|
51
|
+
// Grammar
|
|
73
52
|
|
|
74
|
-
|
|
75
|
-
|
|
53
|
+
const Grammar = Expressions ({
|
|
54
|
+
NRRD: /^NRRD(\d+)\n/gy,
|
|
55
|
+
field: /([\w\s]+):\s*(.+?)\n/gy,
|
|
56
|
+
comment: /#[^\n]*\n/gy,
|
|
57
|
+
newLine: /\n/gy,
|
|
58
|
+
data: /(.*)$/sgy,
|
|
59
|
+
});
|
|
76
60
|
|
|
77
61
|
// Parser
|
|
78
62
|
|
|
@@ -103,10 +87,11 @@ NRRDParser .prototype =
|
|
|
103
87
|
},
|
|
104
88
|
setInput: function (value)
|
|
105
89
|
{
|
|
106
|
-
this .
|
|
107
|
-
this .
|
|
108
|
-
this .
|
|
109
|
-
this .
|
|
90
|
+
this .dataView = new DataView (value);
|
|
91
|
+
this .input = $.decodeText (value);
|
|
92
|
+
this .lastIndex = 0;
|
|
93
|
+
this .nrrd = { };
|
|
94
|
+
this .littleEndian = true;
|
|
110
95
|
},
|
|
111
96
|
getNRRD: function ()
|
|
112
97
|
{
|
|
@@ -114,7 +99,6 @@ NRRDParser .prototype =
|
|
|
114
99
|
{
|
|
115
100
|
this .nrrd .nrrd = true;
|
|
116
101
|
this .nrrd .version = parseInt (this .result [1]);
|
|
117
|
-
this .endian = this .getEndianess ();
|
|
118
102
|
return true;
|
|
119
103
|
}
|
|
120
104
|
|
|
@@ -128,7 +112,7 @@ NRRDParser .prototype =
|
|
|
128
112
|
|
|
129
113
|
while (Grammar .field .parse (this))
|
|
130
114
|
{
|
|
131
|
-
|
|
115
|
+
const
|
|
132
116
|
key = this .result [1] .toLowerCase (),
|
|
133
117
|
value = this .result [2] .trim () .toLowerCase (),
|
|
134
118
|
fun = this .fieldFunction .get (key);
|
|
@@ -142,7 +126,7 @@ NRRDParser .prototype =
|
|
|
142
126
|
},
|
|
143
127
|
getType: (function ()
|
|
144
128
|
{
|
|
145
|
-
|
|
129
|
+
const types = new Map ([
|
|
146
130
|
["signed char", ["signed char", 1]],
|
|
147
131
|
["int8", ["signed char", 1]],
|
|
148
132
|
["int8_t", ["signed char", 1]],
|
|
@@ -175,7 +159,7 @@ NRRDParser .prototype =
|
|
|
175
159
|
|
|
176
160
|
return function (value)
|
|
177
161
|
{
|
|
178
|
-
|
|
162
|
+
const type = types .get (value);
|
|
179
163
|
|
|
180
164
|
if (type === undefined)
|
|
181
165
|
throw new Error ("Unsupported NRRD type '" + value + "'.");
|
|
@@ -186,7 +170,7 @@ NRRDParser .prototype =
|
|
|
186
170
|
})(),
|
|
187
171
|
getEncoding: (function ()
|
|
188
172
|
{
|
|
189
|
-
|
|
173
|
+
const encodings = new Map ([
|
|
190
174
|
["ascii", "ascii"],
|
|
191
175
|
["txt", "ascii"],
|
|
192
176
|
["text", "ascii"],
|
|
@@ -198,7 +182,7 @@ NRRDParser .prototype =
|
|
|
198
182
|
|
|
199
183
|
return function (value)
|
|
200
184
|
{
|
|
201
|
-
|
|
185
|
+
const encoding = encodings .get (value);
|
|
202
186
|
|
|
203
187
|
if (encoding === undefined)
|
|
204
188
|
throw new Error ("Unsupported NRRD encoding '" + value + "'.");
|
|
@@ -208,33 +192,32 @@ NRRDParser .prototype =
|
|
|
208
192
|
})(),
|
|
209
193
|
getDimension: function (value)
|
|
210
194
|
{
|
|
211
|
-
|
|
212
|
-
result = value .match (/(\d+)/),
|
|
213
|
-
dimension = 0;
|
|
195
|
+
const result = value .match (/(\d+)/);
|
|
214
196
|
|
|
215
197
|
if (result)
|
|
216
198
|
{
|
|
217
|
-
|
|
199
|
+
const value = parseInt (result [1]);
|
|
218
200
|
|
|
219
|
-
switch (
|
|
201
|
+
switch (value)
|
|
220
202
|
{
|
|
221
203
|
case 1:
|
|
222
204
|
case 2:
|
|
223
205
|
case 3:
|
|
224
206
|
case 4:
|
|
225
|
-
this .dimension =
|
|
207
|
+
this .dimension = value;
|
|
226
208
|
return;
|
|
227
209
|
}
|
|
228
210
|
}
|
|
229
211
|
|
|
230
|
-
throw new Error ("Unsupported NRRD dimension '" +
|
|
212
|
+
throw new Error ("Unsupported NRRD dimension '" + result [1] + "', must be 1, 2, 3, or 4.");
|
|
231
213
|
},
|
|
232
214
|
getSizes: function (value)
|
|
233
215
|
{
|
|
234
|
-
|
|
235
|
-
num
|
|
236
|
-
|
|
237
|
-
|
|
216
|
+
const
|
|
217
|
+
num = /\s*(\d+)/gy,
|
|
218
|
+
sizes = [ ];
|
|
219
|
+
|
|
220
|
+
let result;
|
|
238
221
|
|
|
239
222
|
while (result = num .exec (value))
|
|
240
223
|
{
|
|
@@ -281,13 +264,19 @@ NRRDParser .prototype =
|
|
|
281
264
|
},
|
|
282
265
|
getEndian: function (value)
|
|
283
266
|
{
|
|
284
|
-
if (value ===
|
|
267
|
+
if (value === "little")
|
|
285
268
|
{
|
|
286
|
-
this .
|
|
269
|
+
this .littleEndian = true;
|
|
287
270
|
return;
|
|
288
271
|
}
|
|
289
272
|
|
|
290
|
-
|
|
273
|
+
if (value === "big")
|
|
274
|
+
{
|
|
275
|
+
this .littleEndian = false;
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
throw new Error ("Unsupported NRRD endian, must be either 'little' or 'big'.");
|
|
291
280
|
},
|
|
292
281
|
getData: function ()
|
|
293
282
|
{
|
|
@@ -300,7 +289,7 @@ NRRDParser .prototype =
|
|
|
300
289
|
}
|
|
301
290
|
case "raw":
|
|
302
291
|
{
|
|
303
|
-
this .
|
|
292
|
+
this .raw ();
|
|
304
293
|
break;
|
|
305
294
|
}
|
|
306
295
|
case "hex":
|
|
@@ -317,157 +306,66 @@ NRRDParser .prototype =
|
|
|
317
306
|
},
|
|
318
307
|
ascii: function ()
|
|
319
308
|
{
|
|
320
|
-
|
|
309
|
+
const
|
|
321
310
|
dataLength = this .nrrd .components * this .nrrd .width * this .nrrd .height * this .nrrd .depth,
|
|
322
311
|
data = new Uint8Array (dataLength);
|
|
323
312
|
|
|
324
313
|
this .nrrd .data = data;
|
|
325
314
|
|
|
326
|
-
if (!
|
|
315
|
+
if (!Grammar .data .parse (this))
|
|
327
316
|
return;
|
|
328
317
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
{
|
|
333
|
-
case "signed char":
|
|
334
|
-
case "unsigned char":
|
|
335
|
-
{
|
|
336
|
-
numbers .forEach (function (value, i)
|
|
337
|
-
{
|
|
338
|
-
data [i] = parseInt (value);
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
343
|
-
case "signed short":
|
|
344
|
-
case "unsigned short":
|
|
345
|
-
{
|
|
346
|
-
numbers .forEach (function (value, i)
|
|
347
|
-
{
|
|
348
|
-
data [i] = parseInt (value) / 256;
|
|
349
|
-
});
|
|
350
|
-
|
|
351
|
-
return;
|
|
352
|
-
}
|
|
353
|
-
case "signed int":
|
|
354
|
-
case "unsigned int":
|
|
355
|
-
{
|
|
356
|
-
numbers .forEach (function (value, i)
|
|
357
|
-
{
|
|
358
|
-
data [i] = parseInt (value) / 16777216;
|
|
359
|
-
});
|
|
360
|
-
|
|
361
|
-
return;
|
|
362
|
-
}
|
|
363
|
-
case "float":
|
|
364
|
-
{
|
|
365
|
-
numbers .forEach (function (value, i)
|
|
366
|
-
{
|
|
367
|
-
data [i] = parseFloat (value) / 256;
|
|
368
|
-
});
|
|
369
|
-
|
|
370
|
-
return;
|
|
371
|
-
}
|
|
372
|
-
case "double":
|
|
373
|
-
{
|
|
374
|
-
numbers .forEach (function (value, i)
|
|
375
|
-
{
|
|
376
|
-
data [i] = parseFloat (value) / 16777216;
|
|
377
|
-
});
|
|
378
|
-
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
},
|
|
383
|
-
rawString: function (input)
|
|
384
|
-
{
|
|
385
|
-
var
|
|
386
|
-
dataLength = this .nrrd .components * this .nrrd .width * this .nrrd .height * this .nrrd .depth,
|
|
387
|
-
length = dataLength * this .bytes,
|
|
388
|
-
data = new Uint8Array (dataLength);
|
|
389
|
-
|
|
390
|
-
this .nrrd .data = data;
|
|
318
|
+
const
|
|
319
|
+
numbers = this .result [1] .trim () .split (/\s+/),
|
|
320
|
+
numNumbers = numbers .length;
|
|
391
321
|
|
|
392
322
|
switch (this .byteType)
|
|
393
323
|
{
|
|
394
324
|
case "signed char":
|
|
395
325
|
case "unsigned char":
|
|
396
326
|
{
|
|
397
|
-
for (
|
|
398
|
-
data [
|
|
327
|
+
for (let i = 0; i < numNumbers; ++ i)
|
|
328
|
+
data [i] = parseInt (numbers [i]);
|
|
399
329
|
|
|
400
330
|
return;
|
|
401
331
|
}
|
|
402
332
|
case "signed short":
|
|
403
333
|
case "unsigned short":
|
|
404
334
|
{
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
else
|
|
408
|
-
var e0 = 1, e1 = 0;
|
|
409
|
-
|
|
410
|
-
for (var i = input .length - length, d = 0; i < input .length; i += 2, ++ d)
|
|
411
|
-
data [d] = this .short2byte (input .charCodeAt (i + e0),
|
|
412
|
-
input .charCodeAt (i + e1));
|
|
335
|
+
for (let i = 0; i < numNumbers; ++ i)
|
|
336
|
+
data [i] = parseInt (numbers [i]) / 256;
|
|
413
337
|
|
|
414
338
|
return;
|
|
415
339
|
}
|
|
416
340
|
case "signed int":
|
|
417
341
|
case "unsigned int":
|
|
418
342
|
{
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
else
|
|
422
|
-
var e0 = 3, e1 = 2, e2 = 1, e3 = 0;
|
|
423
|
-
|
|
424
|
-
for (var i = input .length - length, d = 0; i < input .length; i += 4, ++ d)
|
|
425
|
-
data [d] = this .int2byte (input .charCodeAt (i + e0),
|
|
426
|
-
input .charCodeAt (i + e1),
|
|
427
|
-
input .charCodeAt (i + e2),
|
|
428
|
-
input .charCodeAt (i + e3));
|
|
343
|
+
for (let i = 0; i < numNumbers; ++ i)
|
|
344
|
+
data [i] = parseInt (numbers [i]) / 16777216;
|
|
429
345
|
|
|
430
346
|
return;
|
|
431
347
|
}
|
|
432
348
|
case "float":
|
|
433
349
|
{
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
else
|
|
437
|
-
var e0 = 3, e1 = 2, e2 = 1, e3 = 0;
|
|
438
|
-
|
|
439
|
-
for (var i = input .length - length, d = 0; i < input .length; i += 4, ++ d)
|
|
440
|
-
data [d] = this .float2byte (input .charCodeAt (i + e0),
|
|
441
|
-
input .charCodeAt (i + e1),
|
|
442
|
-
input .charCodeAt (i + e2),
|
|
443
|
-
input .charCodeAt (i + e3));
|
|
350
|
+
for (let i = 0; i < numNumbers; ++ i)
|
|
351
|
+
data [i] = parseFloat (numbers [i]) / 256;
|
|
444
352
|
|
|
445
353
|
return;
|
|
446
354
|
}
|
|
447
355
|
case "double":
|
|
448
356
|
{
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
else
|
|
452
|
-
var e0 = 7, e1 = 6, e2 = 5, e3 = 4, e4 = 3, e5 = 2, e6 = 1, e7 = 0;
|
|
453
|
-
|
|
454
|
-
for (var i = input .length - length, d = 0; i < input .length; i += 8, ++ d)
|
|
455
|
-
data [d] = this .double2byte (input .charCodeAt (i + e0),
|
|
456
|
-
input .charCodeAt (i + e1),
|
|
457
|
-
input .charCodeAt (i + e2),
|
|
458
|
-
input .charCodeAt (i + e3),
|
|
459
|
-
input .charCodeAt (i + e4),
|
|
460
|
-
input .charCodeAt (i + e5),
|
|
461
|
-
input .charCodeAt (i + e6),
|
|
462
|
-
input .charCodeAt (i + e7));
|
|
357
|
+
for (let i = 0; i < numNumbers; ++ i)
|
|
358
|
+
data [i] = parseFloat (numbers [i]) / 16777216;
|
|
463
359
|
|
|
464
360
|
return;
|
|
465
361
|
}
|
|
466
362
|
}
|
|
467
363
|
},
|
|
468
|
-
|
|
364
|
+
raw: function ()
|
|
469
365
|
{
|
|
470
|
-
|
|
366
|
+
const
|
|
367
|
+
dataView = this .dataView,
|
|
368
|
+
byteLength = dataView .byteLength,
|
|
471
369
|
dataLength = this .nrrd .components * this .nrrd .width * this .nrrd .height * this .nrrd .depth,
|
|
472
370
|
length = dataLength * this .bytes,
|
|
473
371
|
data = new Uint8Array (dataLength);
|
|
@@ -479,72 +377,38 @@ NRRDParser .prototype =
|
|
|
479
377
|
case "signed char":
|
|
480
378
|
case "unsigned char":
|
|
481
379
|
{
|
|
482
|
-
for (
|
|
483
|
-
data [d] =
|
|
380
|
+
for (let i = byteLength - length, d = 0; i < byteLength; ++ i, ++ d)
|
|
381
|
+
data [d] = dataView .getUint8 (i);
|
|
484
382
|
|
|
485
383
|
return;
|
|
486
384
|
}
|
|
487
385
|
case "signed short":
|
|
488
386
|
case "unsigned short":
|
|
489
387
|
{
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
else
|
|
493
|
-
var e0 = 1, e1 = 0;
|
|
494
|
-
|
|
495
|
-
for (var i = input .length - length, d = 0; i < input .length; i += 2, ++ d)
|
|
496
|
-
data [d] = this .short2byte (input [i + e0],
|
|
497
|
-
input [i + e1]);
|
|
388
|
+
for (let i = byteLength - length, d = 0; i < byteLength; i += 2, ++ d)
|
|
389
|
+
data [d] = dataView .getUint16 (i, this .littleEndian) / 256;
|
|
498
390
|
|
|
499
391
|
return;
|
|
500
392
|
}
|
|
501
393
|
case "signed int":
|
|
502
394
|
case "unsigned int":
|
|
503
395
|
{
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
else
|
|
507
|
-
var e0 = 3, e1 = 2, e2 = 1, e3 = 0;
|
|
508
|
-
|
|
509
|
-
for (var i = input .length - length, d = 0; i < input .length; i += 4, ++ d)
|
|
510
|
-
data [d] = this .int2byte (input [i + e0],
|
|
511
|
-
input [i + e1],
|
|
512
|
-
input [i + e2],
|
|
513
|
-
input [i + e3]);
|
|
396
|
+
for (let i = byteLength - length, d = 0; i < byteLength; i += 4, ++ d)
|
|
397
|
+
data [d] = dataView .getUint32 (i, this .littleEndian) / 16777216;
|
|
514
398
|
|
|
515
399
|
return;
|
|
516
400
|
}
|
|
517
401
|
case "float":
|
|
518
402
|
{
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
else
|
|
522
|
-
var e0 = 3, e1 = 2, e2 = 1, e3 = 0;
|
|
523
|
-
|
|
524
|
-
for (var i = input .length - length, d = 0; i < input .length; i += 4, ++ d)
|
|
525
|
-
data [d] = this .float2byte (input [i + e0],
|
|
526
|
-
input [i + e1],
|
|
527
|
-
input [i + e2],
|
|
528
|
-
input [i + e3]);
|
|
403
|
+
for (let i = byteLength - length, d = 0; i < byteLength; i += 4, ++ d)
|
|
404
|
+
data [d] = dataView .getFloat32 (i, this .littleEndian) / 256;
|
|
529
405
|
|
|
530
406
|
return;
|
|
531
407
|
}
|
|
532
408
|
case "double":
|
|
533
409
|
{
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
else
|
|
537
|
-
var e0 = 7, e1 = 6, e2 = 5, e3 = 4, e4 = 3, e5 = 2, e6 = 1, e7 = 0;
|
|
538
|
-
|
|
539
|
-
for (var i = input .length - length, d = 0; i < input .length; i += 8, ++ d)
|
|
540
|
-
data [d] = this .double2byte (input [i + e0],
|
|
541
|
-
input [i + e1],
|
|
542
|
-
input [i + e2],
|
|
543
|
-
input [i + e3],
|
|
544
|
-
input [i + e4],
|
|
545
|
-
input [i + e5],
|
|
546
|
-
input [i + e6],
|
|
547
|
-
input [i + e7]);
|
|
410
|
+
for (let i = byteLength - length, d = 0; i < byteLength; i += 8, ++ d)
|
|
411
|
+
data [d] = dataView .getFloat64 (i, this .littleEndian) / 16777216;
|
|
548
412
|
|
|
549
413
|
return;
|
|
550
414
|
}
|
|
@@ -554,16 +418,15 @@ NRRDParser .prototype =
|
|
|
554
418
|
{
|
|
555
419
|
if (Grammar .data .parse (this))
|
|
556
420
|
{
|
|
557
|
-
|
|
421
|
+
const match = this .result [1] .match (/([0-9a-fA-F]{2})/g);
|
|
558
422
|
|
|
559
423
|
if (match)
|
|
560
424
|
{
|
|
561
|
-
|
|
562
|
-
{
|
|
563
|
-
return parseInt (value, 16);
|
|
564
|
-
});
|
|
425
|
+
const array = Uint8Array .from (match, value => parseInt (value, 16));
|
|
565
426
|
|
|
566
|
-
this .
|
|
427
|
+
this .dataView = new DataView (array .buffer);
|
|
428
|
+
|
|
429
|
+
this .raw ();
|
|
567
430
|
return;
|
|
568
431
|
}
|
|
569
432
|
}
|
|
@@ -574,114 +437,22 @@ NRRDParser .prototype =
|
|
|
574
437
|
{
|
|
575
438
|
try
|
|
576
439
|
{
|
|
577
|
-
if (!
|
|
440
|
+
if (!Grammar .newLine .parse (this))
|
|
578
441
|
throw new Error ("Invalid NRRD data.");
|
|
579
442
|
|
|
580
|
-
Grammar .data .parse (this);
|
|
581
|
-
|
|
582
443
|
const
|
|
583
|
-
|
|
584
|
-
|
|
444
|
+
input = this .dataView .buffer .slice (this .lastIndex),
|
|
445
|
+
arrayBuffer = $.ungzip (input);
|
|
446
|
+
|
|
447
|
+
this .dataView = new DataView (arrayBuffer);
|
|
585
448
|
|
|
586
|
-
this .
|
|
449
|
+
this .raw ();
|
|
587
450
|
}
|
|
588
451
|
catch (error)
|
|
589
452
|
{
|
|
590
|
-
throw new Error (
|
|
453
|
+
throw new Error (`Invalid NRRD data: ${error}.`);
|
|
591
454
|
}
|
|
592
455
|
},
|
|
593
|
-
binaryStringToBuffer: function (string)
|
|
594
|
-
{
|
|
595
|
-
const buffer = new Uint8Array (string .length);
|
|
596
|
-
|
|
597
|
-
for (let i = 0, length = string .length; i < length; ++ i)
|
|
598
|
-
buffer [i] = string .charCodeAt (i);
|
|
599
|
-
|
|
600
|
-
return buffer;
|
|
601
|
-
},
|
|
602
|
-
getEndianess: function ()
|
|
603
|
-
{
|
|
604
|
-
var
|
|
605
|
-
buffer = new ArrayBuffer (4),
|
|
606
|
-
int = new Uint32Array (buffer),
|
|
607
|
-
bytes = new Uint8Array (buffer);
|
|
608
|
-
|
|
609
|
-
int [0] = 0x01020304;
|
|
610
|
-
|
|
611
|
-
if (bytes [0] == 1 && bytes [1] == 2 && bytes [2] == 3 && bytes [3] == 4)
|
|
612
|
-
return 'big';
|
|
613
|
-
|
|
614
|
-
if (bytes [0] == 4 && bytes [1] == 3 && bytes [2] == 2 && bytes [3] == 1)
|
|
615
|
-
return 'little';
|
|
616
|
-
|
|
617
|
-
throw new Error ("NRRD: unkown system endianess,");
|
|
618
|
-
},
|
|
619
|
-
short2byte: (function ()
|
|
620
|
-
{
|
|
621
|
-
var
|
|
622
|
-
bytes = new Uint8Array (2),
|
|
623
|
-
number = new Uint16Array (bytes .buffer);
|
|
624
|
-
|
|
625
|
-
return function (b0, b1)
|
|
626
|
-
{
|
|
627
|
-
bytes [0] = b0;
|
|
628
|
-
bytes [1] = b1;
|
|
629
|
-
|
|
630
|
-
return number [0] / 256;
|
|
631
|
-
};
|
|
632
|
-
})(),
|
|
633
|
-
int2byte: (function ()
|
|
634
|
-
{
|
|
635
|
-
var
|
|
636
|
-
bytes = new Uint8Array (4),
|
|
637
|
-
number = new Uint32Array (bytes .buffer);
|
|
638
|
-
|
|
639
|
-
return function (b0, b1, b2, b3)
|
|
640
|
-
{
|
|
641
|
-
bytes [0] = b0;
|
|
642
|
-
bytes [1] = b1;
|
|
643
|
-
bytes [2] = b2;
|
|
644
|
-
bytes [3] = b3;
|
|
645
|
-
|
|
646
|
-
return number [0] / 16777216;
|
|
647
|
-
};
|
|
648
|
-
})(),
|
|
649
|
-
float2byte: (function ()
|
|
650
|
-
{
|
|
651
|
-
var
|
|
652
|
-
bytes = new Uint8Array (4),
|
|
653
|
-
number = new Float32Array (bytes .buffer);
|
|
654
|
-
|
|
655
|
-
return function (b0, b1, b2, b3)
|
|
656
|
-
{
|
|
657
|
-
bytes [0] = b0;
|
|
658
|
-
bytes [1] = b1;
|
|
659
|
-
bytes [2] = b2;
|
|
660
|
-
bytes [3] = b3;
|
|
661
|
-
|
|
662
|
-
return number [0] / 256;
|
|
663
|
-
};
|
|
664
|
-
})(),
|
|
665
|
-
double2byte: (function ()
|
|
666
|
-
{
|
|
667
|
-
var
|
|
668
|
-
bytes = new Uint8Array (8),
|
|
669
|
-
number = new Float64Array (bytes .buffer);
|
|
670
|
-
|
|
671
|
-
return function (b0, b1, b2, b3, b4, b5, b6, b7)
|
|
672
|
-
{
|
|
673
|
-
bytes [0] = b0;
|
|
674
|
-
bytes [1] = b1;
|
|
675
|
-
bytes [2] = b2;
|
|
676
|
-
bytes [3] = b3;
|
|
677
|
-
bytes [4] = b4;
|
|
678
|
-
bytes [5] = b5;
|
|
679
|
-
bytes [6] = b6;
|
|
680
|
-
bytes [7] = b7;
|
|
681
|
-
|
|
682
|
-
return number [0] / 16777216;
|
|
683
|
-
};
|
|
684
|
-
})(),
|
|
685
456
|
};
|
|
686
457
|
|
|
687
458
|
export default NRRDParser;
|