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
|
@@ -135,7 +135,7 @@ X3DLightNode .prototype = Object .assign (Object .create (X3DChildNode .prototyp
|
|
|
135
135
|
return biasMatrix;
|
|
136
136
|
};
|
|
137
137
|
})(),
|
|
138
|
-
push: function (renderObject,
|
|
138
|
+
push: function (renderObject, groupNode)
|
|
139
139
|
{
|
|
140
140
|
if (renderObject .isIndependent ())
|
|
141
141
|
{
|
|
@@ -155,7 +155,7 @@ X3DLightNode .prototype = Object .assign (Object .create (X3DChildNode .prototyp
|
|
|
155
155
|
else
|
|
156
156
|
{
|
|
157
157
|
lightContainer .set (this,
|
|
158
|
-
|
|
158
|
+
groupNode,
|
|
159
159
|
renderObject .getModelViewMatrix () .get ());
|
|
160
160
|
|
|
161
161
|
renderObject .getLocalObjects () .push (lightContainer);
|
|
@@ -170,10 +170,10 @@ X3DLightNode .prototype = Object .assign (Object .create (X3DChildNode .prototyp
|
|
|
170
170
|
{
|
|
171
171
|
const lightContainer = renderObject .getLightContainer ();
|
|
172
172
|
|
|
173
|
+
lightContainer .modelViewMatrix .pushMatrix (renderObject .getModelViewMatrix () .get ());
|
|
174
|
+
|
|
173
175
|
if (this ._global .getValue ())
|
|
174
176
|
{
|
|
175
|
-
lightContainer .getModelViewMatrix () .pushMatrix (renderObject .getModelViewMatrix () .get ());
|
|
176
|
-
|
|
177
177
|
renderObject .getGlobalObjects () .push (lightContainer);
|
|
178
178
|
renderObject .getLights () .push (lightContainer);
|
|
179
179
|
|
|
@@ -181,8 +181,6 @@ X3DLightNode .prototype = Object .assign (Object .create (X3DChildNode .prototyp
|
|
|
181
181
|
}
|
|
182
182
|
else
|
|
183
183
|
{
|
|
184
|
-
lightContainer .getModelViewMatrix () .pushMatrix (renderObject .getModelViewMatrix () .get ());
|
|
185
|
-
|
|
186
184
|
renderObject .getLocalObjects () .push (lightContainer);
|
|
187
185
|
renderObject .getLights () .push (lightContainer);
|
|
188
186
|
|
|
@@ -197,10 +195,10 @@ X3DLightNode .prototype = Object .assign (Object .create (X3DChildNode .prototyp
|
|
|
197
195
|
if (this ._global .getValue ())
|
|
198
196
|
return;
|
|
199
197
|
|
|
198
|
+
const lightContainer = renderObject .getLocalObjects () .pop ();
|
|
199
|
+
|
|
200
200
|
if (renderObject .isIndependent ())
|
|
201
|
-
this .getBrowser () .getLocalObjects () .push (
|
|
202
|
-
else
|
|
203
|
-
renderObject .getLocalObjects () .pop ();
|
|
201
|
+
this .getBrowser () .getLocalObjects () .push (lightContainer);
|
|
204
202
|
|
|
205
203
|
renderObject .popLocalShadows ();
|
|
206
204
|
|
|
@@ -323,6 +323,8 @@ OrthoViewpoint .prototype = Object .assign (Object .create (X3DViewpointNode .pr
|
|
|
323
323
|
},
|
|
324
324
|
viewAll: function (bbox)
|
|
325
325
|
{
|
|
326
|
+
X3DViewpointNode .prototype .viewAll .call (this, bbox);
|
|
327
|
+
|
|
326
328
|
const
|
|
327
329
|
size = bbox .size,
|
|
328
330
|
scaleX = size .x / this .getSizeX (),
|
|
@@ -333,8 +335,6 @@ OrthoViewpoint .prototype = Object .assign (Object .create (X3DViewpointNode .pr
|
|
|
333
335
|
this ._fieldOfViewOffset [1] = this .getMinimumY () * scale - this .getMinimumY ();
|
|
334
336
|
this ._fieldOfViewOffset [2] = this .getMaximumX () * scale - this .getMaximumX ();
|
|
335
337
|
this ._fieldOfViewOffset [3] = this .getMaximumY () * scale - this .getMaximumY ();
|
|
336
|
-
|
|
337
|
-
X3DViewpointNode .prototype .viewAll .call (this, bbox);
|
|
338
338
|
},
|
|
339
339
|
});
|
|
340
340
|
|
|
@@ -125,7 +125,7 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
125
125
|
this .easeInEaseOut ._modifiedFraction_changed .addFieldInterest (this .orientationInterpolator ._set_fraction);
|
|
126
126
|
this .easeInEaseOut ._modifiedFraction_changed .addFieldInterest (this .scaleInterpolator ._set_fraction);
|
|
127
127
|
this .easeInEaseOut ._modifiedFraction_changed .addFieldInterest (this .scaleOrientationInterpolator ._set_fraction);
|
|
128
|
-
this .easeInEaseOut ._modifiedFraction_changed .addFieldInterest (this .fieldOfViewScaleInterpolator
|
|
128
|
+
this .easeInEaseOut ._modifiedFraction_changed .addFieldInterest (this .fieldOfViewScaleInterpolator ._set_fraction);
|
|
129
129
|
|
|
130
130
|
this .positionInterpolator ._value_changed .addFieldInterest (this ._positionOffset);
|
|
131
131
|
this .orientationInterpolator ._value_changed .addFieldInterest (this ._orientationOffset);
|
|
@@ -349,6 +349,8 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
349
349
|
this ._orientationOffset = relative .orientation;
|
|
350
350
|
this ._scaleOffset = relative .scale;
|
|
351
351
|
this ._scaleOrientationOffset = relative .scaleOrientation;
|
|
352
|
+
this ._nearDistance = toViewpointNode ._nearDistance;
|
|
353
|
+
this ._farDistance = toViewpointNode ._farDistance;
|
|
352
354
|
|
|
353
355
|
this .setInterpolators (fromViewpointNode, toViewpointNode, relative);
|
|
354
356
|
|
|
@@ -379,6 +381,9 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
379
381
|
this ._scaleOrientationOffset = Rotation4 .Identity;
|
|
380
382
|
this ._centerOfRotationOffset = Vector3 .Zero;
|
|
381
383
|
this ._fieldOfViewScale = 1;
|
|
384
|
+
|
|
385
|
+
this .set_nearDistance__ ();
|
|
386
|
+
this .set_farDistance__ ();
|
|
382
387
|
},
|
|
383
388
|
getRelativeTransformation: (function ()
|
|
384
389
|
{
|
|
@@ -537,17 +542,20 @@ X3DViewpointNode .prototype = Object .assign (Object .create (X3DBindableNode .p
|
|
|
537
542
|
})(),
|
|
538
543
|
viewAll: function (bbox)
|
|
539
544
|
{
|
|
545
|
+
bbox .multRight (this .modelMatrix .copy () .inverse ());
|
|
546
|
+
|
|
540
547
|
const
|
|
541
|
-
|
|
542
|
-
direction = this .getUserPosition () .copy () .subtract (center),
|
|
548
|
+
direction = this .getUserPosition () .copy () .subtract (bbox .center) .normalize (),
|
|
543
549
|
distance = this .getLookAtDistance (bbox),
|
|
544
|
-
userPosition = center .copy () .add (direction .
|
|
545
|
-
userOrientation = this .getLookAtRotation (userPosition, center);
|
|
550
|
+
userPosition = bbox .center .copy () .add (direction .multiply (distance)),
|
|
551
|
+
userOrientation = this .getLookAtRotation (userPosition, bbox .center);
|
|
546
552
|
|
|
547
553
|
this ._positionOffset = userPosition .subtract (this .getPosition ());
|
|
548
554
|
this ._orientationOffset = this .getOrientation () .copy () .inverse () .multRight (userOrientation);
|
|
549
|
-
this ._centerOfRotationOffset = center .subtract (this .getCenterOfRotation ());
|
|
555
|
+
this ._centerOfRotationOffset = bbox .center .copy () .subtract (this .getCenterOfRotation ());
|
|
550
556
|
this ._fieldOfViewScale = 1;
|
|
557
|
+
this .nearDistance = Math .min ((distance - bbox .size .magnitude ()) / 2, 0.125);
|
|
558
|
+
this .farDistance = this .nearDistance * this .getMaxFarValue () / 0.125;
|
|
551
559
|
},
|
|
552
560
|
traverse: function (type, renderObject)
|
|
553
561
|
{
|
|
@@ -67,10 +67,10 @@ function Inline (executionContext)
|
|
|
67
67
|
if (executionContext .getSpecificationVersion () < 4.0)
|
|
68
68
|
this ._global = true;
|
|
69
69
|
|
|
70
|
-
this .scene
|
|
71
|
-
this .groupNode
|
|
72
|
-
|
|
73
|
-
this .
|
|
70
|
+
this .scene = this .getBrowser () .getDefaultScene ();
|
|
71
|
+
this .groupNode = new Group (executionContext);
|
|
72
|
+
this .localObjects = [ ];
|
|
73
|
+
this .localShadows = false;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
Inline .prototype = Object .assign (Object .create (X3DChildNode .prototype),
|
|
@@ -225,73 +225,62 @@ Inline .prototype = Object .assign (Object .create (X3DChildNode .prototype),
|
|
|
225
225
|
else
|
|
226
226
|
{
|
|
227
227
|
const
|
|
228
|
-
globalsBegin = renderObject .getGlobalObjects () .length,
|
|
229
|
-
shadowsBegin = renderObject .getGlobalShadows () .length,
|
|
230
|
-
opaqueShapesBegin = renderObject .getNumOpaqueShapes (),
|
|
231
|
-
transparentShapesBegin = renderObject .getNumTransparentShapes ();
|
|
232
|
-
|
|
233
|
-
this .groupNode .traverse (type, renderObject);
|
|
234
|
-
|
|
235
|
-
const globalsEnd = renderObject .getGlobalObjects () .length;
|
|
236
|
-
|
|
237
|
-
if (globalsBegin === globalsEnd)
|
|
238
|
-
return;
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
browser = this .getBrowser (),
|
|
242
228
|
globalObjects = renderObject .getGlobalObjects (),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
for (let g = globalsBegin; g < globalsEnd; ++ g)
|
|
229
|
+
globalShadows = renderObject .getGlobalShadows (),
|
|
230
|
+
globalsBegin = globalObjects .length,
|
|
231
|
+
shadowsBegin = globalShadows .length,
|
|
232
|
+
localObjects = this .localObjects,
|
|
233
|
+
numLocalObjects = localObjects .length,
|
|
234
|
+
numLights = localObjects .reduce ((n, c) => n + !!c .lightNode, 0),
|
|
235
|
+
numTextureProjectors = localObjects .reduce ((n, c) => n + !!c .textureProjectorNode, 0);
|
|
236
|
+
|
|
237
|
+
if (numLocalObjects)
|
|
254
238
|
{
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
numGlobalLights += !!globalObject .lightNode;
|
|
260
|
-
numGlobalTextureProjectors += !!globalObject .textureProjectorNode;
|
|
261
|
-
|
|
262
|
-
browser .getLocalObjects () .push (globalObject);
|
|
239
|
+
renderObject .getLocalObjects () .push (... localObjects);
|
|
240
|
+
renderObject .pushLocalShadows (this .localShadows);
|
|
241
|
+
renderObject .getLocalObjectsCount () [1] += numLights;
|
|
242
|
+
renderObject .getLocalObjectsCount () [2] += numTextureProjectors;
|
|
263
243
|
}
|
|
264
244
|
|
|
265
|
-
|
|
266
|
-
{
|
|
267
|
-
const
|
|
268
|
-
renderContext = opaqueShapes [i],
|
|
269
|
-
localObjects = renderContext .localObjects;
|
|
270
|
-
|
|
271
|
-
renderContext .shadows = renderContext .shadows || globalShadow;
|
|
272
|
-
renderContext .objectsCount [1] += numGlobalLights;
|
|
273
|
-
renderContext .objectsCount [2] += numGlobalTextureProjectors;
|
|
245
|
+
this .groupNode .traverse (type, renderObject);
|
|
274
246
|
|
|
275
|
-
|
|
276
|
-
|
|
247
|
+
if (numLocalObjects)
|
|
248
|
+
{
|
|
249
|
+
if (renderObject .isIndependent ())
|
|
250
|
+
{
|
|
251
|
+
const browser = this .getBrowser ();
|
|
252
|
+
|
|
253
|
+
for (let i = 0; i < numLocalObjects; ++ i)
|
|
254
|
+
browser .getLocalObjects () .push (renderObject .getLocalObjects () .pop ());
|
|
255
|
+
}
|
|
256
|
+
else
|
|
257
|
+
{
|
|
258
|
+
for (let i = 0; i < numLocalObjects; ++ i)
|
|
259
|
+
renderObject .getLocalObjects () .pop ();
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
renderObject .popLocalShadows ();
|
|
263
|
+
renderObject .getLocalObjectsCount () [1] -= numLights;
|
|
264
|
+
renderObject .getLocalObjectsCount () [2] -= numTextureProjectors;
|
|
277
265
|
}
|
|
278
266
|
|
|
279
|
-
|
|
267
|
+
const numGlobalObjects = globalObjects .length - globalsBegin;
|
|
268
|
+
|
|
269
|
+
for (let i = 0; i < numGlobalObjects; ++ i)
|
|
280
270
|
{
|
|
281
|
-
const
|
|
282
|
-
renderContext = transparentShapes [i],
|
|
283
|
-
localObjects = renderContext .localObjects;
|
|
271
|
+
const globalObject = globalObjects [globalsBegin + i];
|
|
284
272
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
renderContext .objectsCount [2] += numGlobalTextureProjectors;
|
|
273
|
+
globalObject .groupNode = this .groupNode;
|
|
274
|
+
globalObject .global = false;
|
|
288
275
|
|
|
289
|
-
|
|
290
|
-
localObjects .push (globalObjects [g]);
|
|
276
|
+
localObjects [i] = globalObject;
|
|
291
277
|
}
|
|
292
278
|
|
|
293
|
-
|
|
294
|
-
|
|
279
|
+
localObjects .length = numGlobalObjects;
|
|
280
|
+
this .localShadows = globalShadows .at (-1);
|
|
281
|
+
|
|
282
|
+
globalObjects .length = globalsBegin;
|
|
283
|
+
globalShadows .length = shadowsBegin;
|
|
295
284
|
}
|
|
296
285
|
|
|
297
286
|
return;
|
|
@@ -151,7 +151,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
|
|
|
151
151
|
},
|
|
152
152
|
getAngle: function (rotation)
|
|
153
153
|
{
|
|
154
|
-
if (Vector3 .dot (rotation .getAxis (), this .cylinder .axis .direction) > 0)
|
|
154
|
+
if (Vector3 .dot (rotation .getAxis (new Vector3 (0, 0, 0)), this .cylinder .axis .direction) > 0)
|
|
155
155
|
return rotation .angle;
|
|
156
156
|
|
|
157
157
|
else
|
|
@@ -262,7 +262,7 @@ CylinderSensor .prototype = Object .assign (Object .create (X3DDragSensorNode .p
|
|
|
262
262
|
endVector = rotation .multVecRot (this ._axisRotation .getValue () .multVecRot (new Vector3 (0, 0, 1))),
|
|
263
263
|
deltaRotation = new Rotation4 (this .startVector, endVector),
|
|
264
264
|
axis = this ._axisRotation .getValue () .multVecRot (new Vector3 (0, 1, 0)),
|
|
265
|
-
sign = axis .dot (deltaRotation .getAxis ()) > 0 ? 1 : -1,
|
|
265
|
+
sign = axis .dot (deltaRotation .getAxis (new Vector3 (0, 0, 0))) > 0 ? 1 : -1,
|
|
266
266
|
min = this ._minAngle .getValue (),
|
|
267
267
|
max = this ._maxAngle .getValue ();
|
|
268
268
|
|
|
@@ -110,11 +110,13 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (X3DGeometryNode
|
|
|
110
110
|
return function (hitRay, renderObject, invModelViewMatrix, appearanceNode, intersections)
|
|
111
111
|
{
|
|
112
112
|
const
|
|
113
|
+
browser = this .getBrowser (),
|
|
114
|
+
contentScale = browser .getRenderingProperty ("ContentScale"),
|
|
113
115
|
modelViewMatrix = renderObject .getModelViewMatrix () .get (),
|
|
114
116
|
viewport = renderObject .getViewVolume () .getViewport (),
|
|
115
117
|
extents = bbox .assign (this .getBBox ()) .multRight (modelViewMatrix) .getExtents (min, max),
|
|
116
118
|
linePropertiesNode = appearanceNode .getLineProperties (),
|
|
117
|
-
lineWidth1_2 = Math .max (1.5, linePropertiesNode && linePropertiesNode .getApplied () ? linePropertiesNode .getLinewidthScaleFactor () / 2 :
|
|
119
|
+
lineWidth1_2 = Math .max (1.5, linePropertiesNode && linePropertiesNode .getApplied () ? linePropertiesNode .getLinewidthScaleFactor () / 2 : contentScale),
|
|
118
120
|
screenScale1 = renderObject .getViewpoint () .getScreenScale (min, viewport, screenScale1_), // in m/px
|
|
119
121
|
offsets1 = invModelViewMatrix .multDirMatrix (screenScale1 .multiply (lineWidth1_2)),
|
|
120
122
|
screenScale2 = renderObject .getViewpoint () .getScreenScale (max, viewport, screenScale2_), // in m/px
|
|
@@ -283,7 +285,7 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (X3DGeometryNode
|
|
|
283
285
|
renderObject = renderContext .renderObject,
|
|
284
286
|
viewport = renderObject .getViewVolume () .getViewport (),
|
|
285
287
|
projectionMatrix = renderObject .getProjectionMatrix () .get (),
|
|
286
|
-
primitiveMode = browser .getPrimitiveMode (gl .TRIANGLES),
|
|
288
|
+
primitiveMode = browser .getWireframe () ? gl .TRIANGLES : browser .getPrimitiveMode (gl .TRIANGLES),
|
|
287
289
|
transformShaderNode = browser .getLineTransformShader ();
|
|
288
290
|
|
|
289
291
|
modelViewProjectionMatrixArray .set (matrix .assign (renderContext .modelViewMatrix) .multRight (projectionMatrix));
|
|
@@ -406,17 +408,9 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (X3DGeometryNode
|
|
|
406
408
|
gl .bindBuffer (gl .ARRAY_BUFFER, null);
|
|
407
409
|
}
|
|
408
410
|
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
gl .drawArrays (primitiveMode, i, 3);
|
|
413
|
-
}
|
|
414
|
-
else
|
|
415
|
-
{
|
|
416
|
-
gl .frontFace (gl .CCW);
|
|
417
|
-
gl .enable (gl .CULL_FACE);
|
|
418
|
-
gl .drawArrays (primitiveMode, 0, this .vertexCount * 3);
|
|
419
|
-
}
|
|
411
|
+
gl .frontFace (gl .CCW);
|
|
412
|
+
gl .enable (gl .CULL_FACE);
|
|
413
|
+
gl .drawArrays (primitiveMode, 0, this .vertexCount * 3);
|
|
420
414
|
|
|
421
415
|
if (blendModeNode)
|
|
422
416
|
blendModeNode .disable (gl);
|
|
@@ -84,14 +84,16 @@ X3DLineGeometryNode .prototype = Object .assign (Object .create (X3DGeometryNode
|
|
|
84
84
|
return function (hitRay, renderObject, invModelViewMatrix, appearanceNode, intersections)
|
|
85
85
|
{
|
|
86
86
|
const
|
|
87
|
+
browser = this .getBrowser (),
|
|
88
|
+
contentScale = browser .getRenderingProperty ("ContentScale"),
|
|
87
89
|
modelViewMatrix = renderObject .getModelViewMatrix () .get (),
|
|
88
90
|
viewport = renderObject .getViewVolume () .getViewport (),
|
|
89
91
|
extents = bbox .assign (this .getBBox ()) .multRight (modelViewMatrix) .getExtents (min, max),
|
|
90
92
|
pointPropertiesNode = appearanceNode .getPointProperties (),
|
|
91
|
-
pointSize1 = Math .max (1.5, pointPropertiesNode ? pointPropertiesNode .getPointSize (min) / 2 :
|
|
93
|
+
pointSize1 = Math .max (1.5, pointPropertiesNode ? pointPropertiesNode .getPointSize (min) / 2 : contentScale),
|
|
92
94
|
screenScale1 = renderObject .getViewpoint () .getScreenScale (min, viewport, screenScale1_), // in m/px
|
|
93
95
|
offsets1 = invModelViewMatrix .multDirMatrix (screenScale1 .multiply (pointSize1)),
|
|
94
|
-
pointSize2 = Math .max (1.5, pointPropertiesNode ? pointPropertiesNode .getPointSize (max) / 2 :
|
|
96
|
+
pointSize2 = Math .max (1.5, pointPropertiesNode ? pointPropertiesNode .getPointSize (max) / 2 : contentScale),
|
|
95
97
|
screenScale2 = renderObject .getViewpoint () .getScreenScale (max, viewport, screenScale2_), // in m/px
|
|
96
98
|
offsets2 = invModelViewMatrix .multDirMatrix (screenScale2 .multiply (pointSize2));
|
|
97
99
|
|
|
@@ -52,6 +52,7 @@ import X3DNode from "../Core/X3DNode.js";
|
|
|
52
52
|
import X3DConstants from "../../Base/X3DConstants.js";
|
|
53
53
|
import X3DCast from "../../Base/X3DCast.js";
|
|
54
54
|
import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
55
|
+
import Quaternion from "../../../standard/Math/Numbers/Quaternion.js";
|
|
55
56
|
import Rotation4 from "../../../standard/Math/Numbers/Rotation4.js";
|
|
56
57
|
import Matrix4 from "../../../standard/Math/Numbers/Matrix4.js";
|
|
57
58
|
import Ammo from "../../../lib/ammojs/AmmoClass.js";
|
|
@@ -465,6 +466,7 @@ RigidBody .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
465
466
|
var
|
|
466
467
|
transform = new Ammo .btTransform (),
|
|
467
468
|
position = new Vector3 (0, 0, 0),
|
|
469
|
+
quaternion = new Quaternion (0, 0, 0, 1),
|
|
468
470
|
orientation = new Rotation4 (0, 0, 1, 0),
|
|
469
471
|
linearVelocity = new Vector3 (0, 0, 0),
|
|
470
472
|
angularVelocity = new Vector3 (0, 0, 0);
|
|
@@ -479,10 +481,10 @@ RigidBody .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
479
481
|
btLinearVeloctity = this .rigidBody .getLinearVelocity (),
|
|
480
482
|
btAngularVelocity = this .rigidBody .getAngularVelocity ();
|
|
481
483
|
|
|
482
|
-
|
|
484
|
+
quaternion .set (btQuaternion .x (), btQuaternion .y (), btQuaternion .z (), btQuaternion .w ());
|
|
483
485
|
|
|
484
486
|
this ._position = position .set (btOrigin .x (), btOrigin .y (), btOrigin .z ());
|
|
485
|
-
this ._orientation = orientation;
|
|
487
|
+
this ._orientation = orientation .setQuaternion (quaternion);
|
|
486
488
|
this ._linearVelocity = linearVelocity .set (btLinearVeloctity .x (), btLinearVeloctity .y (), btLinearVeloctity .z ());
|
|
487
489
|
this ._angularVelocity = angularVelocity .set (btAngularVelocity .x (), btAngularVelocity .y (), btAngularVelocity .z ());
|
|
488
490
|
};
|
|
@@ -153,7 +153,7 @@ Script .prototype = Object .assign (Object .create (X3DScriptNode .prototype),
|
|
|
153
153
|
{
|
|
154
154
|
this .initialized = false;
|
|
155
155
|
|
|
156
|
-
new FileLoader (this) .
|
|
156
|
+
new FileLoader (this) .loadDocument (this ._url,
|
|
157
157
|
function (data)
|
|
158
158
|
{
|
|
159
159
|
if (data === null)
|
|
@@ -164,7 +164,7 @@ Script .prototype = Object .assign (Object .create (X3DScriptNode .prototype),
|
|
|
164
164
|
else
|
|
165
165
|
{
|
|
166
166
|
this .setLoadState (X3DConstants .COMPLETE_STATE);
|
|
167
|
-
this .initialize__ (data);
|
|
167
|
+
this .initialize__ ($.decodeText (data));
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
.bind (this));
|
|
@@ -176,7 +176,7 @@ ShaderPart .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
176
176
|
type = this .getShaderType (),
|
|
177
177
|
options = ["X3D_" + type] .concat (this .options),
|
|
178
178
|
shaderCompiler = new ShaderCompiler (gl),
|
|
179
|
-
source = ShaderSource .getSource (gl, browser, shaderCompiler .process (data), options),
|
|
179
|
+
source = ShaderSource .getSource (gl, browser, shaderCompiler .process ($.decodeText (data)), options),
|
|
180
180
|
shader = gl .createShader (gl [type]);
|
|
181
181
|
|
|
182
182
|
gl .deleteShader (this .shader);
|
|
@@ -168,7 +168,6 @@ X3DProgrammableShaderObject .prototype =
|
|
|
168
168
|
this .x3d_PointPropertiesPointSizeMaxValue = gl .getUniformLocation (program, "x3d_PointProperties.pointSizeMaxValue");
|
|
169
169
|
this .x3d_PointPropertiesAttenuation = gl .getUniformLocation (program, "x3d_PointProperties.attenuation");
|
|
170
170
|
|
|
171
|
-
this .x3d_LinePropertiesApplied = gl .getUniformLocation (program, "x3d_LineProperties.applied");
|
|
172
171
|
this .x3d_LinePropertiesLinetype = gl .getUniformLocation (program, "x3d_LineProperties.linetype");
|
|
173
172
|
this .x3d_LineStippleScale = gl .getUniformLocation (program, "x3d_LineProperties.lineStippleScale");
|
|
174
173
|
this .x3d_LinePropertiesTexture = gl .getUniformLocation (program, "x3d_LineProperties.texture");
|
|
@@ -177,6 +176,7 @@ X3DProgrammableShaderObject .prototype =
|
|
|
177
176
|
this .x3d_FillPropertiesHatched = gl .getUniformLocation (program, "x3d_FillProperties.hatched");
|
|
178
177
|
this .x3d_FillPropertiesHatchColor = gl .getUniformLocation (program, "x3d_FillProperties.hatchColor");
|
|
179
178
|
this .x3d_FillPropertiesTexture = gl .getUniformLocation (program, "x3d_FillProperties.texture");
|
|
179
|
+
this .x3d_FillPropertiesScale = gl .getUniformLocation (program, "x3d_FillProperties.scale");
|
|
180
180
|
|
|
181
181
|
for (let i = 0; i < maxLights; ++ i)
|
|
182
182
|
{
|
|
@@ -326,8 +326,6 @@ X3DProgrammableShaderObject .prototype =
|
|
|
326
326
|
* Fill uniforms with defaults.
|
|
327
327
|
*/
|
|
328
328
|
|
|
329
|
-
gl .uniform1f (this .x3d_LineStippleScale, browser .getLineStippleScale ());
|
|
330
|
-
|
|
331
329
|
// Fill special uniforms with default values, textures for units are created in X3DTexturingContext.
|
|
332
330
|
|
|
333
331
|
gl .uniform1i (this .x3d_LinePropertiesTexture, browser .getDefaultTexture2DUnit ());
|
|
@@ -100,6 +100,10 @@ Appearance .prototype = Object .assign (Object .create (X3DAppearanceNode .proto
|
|
|
100
100
|
{
|
|
101
101
|
X3DAppearanceNode .prototype .initialize .call (this);
|
|
102
102
|
|
|
103
|
+
const browser = this .getBrowser ();
|
|
104
|
+
|
|
105
|
+
browser .getRenderingProperties () ._ContentScale .addInterest ("set_contentScale__", this);
|
|
106
|
+
|
|
103
107
|
this ._alphaMode .addInterest ("set_alphaMode__", this);
|
|
104
108
|
this ._alphaCutoff .addInterest ("set_alphaCutoff__", this);
|
|
105
109
|
this ._pointProperties .addInterest ("set_pointProperties__", this);
|
|
@@ -195,6 +199,11 @@ Appearance .prototype = Object .assign (Object .create (X3DAppearanceNode .proto
|
|
|
195
199
|
{
|
|
196
200
|
return this .blendModeNode;
|
|
197
201
|
},
|
|
202
|
+
set_contentScale__: function ()
|
|
203
|
+
{
|
|
204
|
+
this .set_pointProperties__ ();
|
|
205
|
+
this .set_applied__ ();
|
|
206
|
+
},
|
|
198
207
|
set_alphaMode__: function ()
|
|
199
208
|
{
|
|
200
209
|
this .alphaMode = this .getEnum (AlphaMode, this ._alphaMode .getValue (), AlphaMode .AUTO);
|
|
@@ -208,6 +217,14 @@ Appearance .prototype = Object .assign (Object .create (X3DAppearanceNode .proto
|
|
|
208
217
|
set_pointProperties__: function ()
|
|
209
218
|
{
|
|
210
219
|
this .stylePropertiesNode [0] = X3DCast (X3DConstants .PointProperties, this ._pointProperties);
|
|
220
|
+
|
|
221
|
+
if (! this .stylePropertiesNode [0])
|
|
222
|
+
{
|
|
223
|
+
const browser = this .getBrowser ();
|
|
224
|
+
|
|
225
|
+
if (browser .getRenderingProperty ("ContentScale") !== 1)
|
|
226
|
+
this .stylePropertiesNode [0] = browser .getDefaultPointProperties ();
|
|
227
|
+
}
|
|
211
228
|
},
|
|
212
229
|
set_lineProperties__: function ()
|
|
213
230
|
{
|
|
@@ -224,9 +241,18 @@ Appearance .prototype = Object .assign (Object .create (X3DAppearanceNode .proto
|
|
|
224
241
|
set_applied__: function ()
|
|
225
242
|
{
|
|
226
243
|
if (this .linePropertiesNode && this .linePropertiesNode ._applied .getValue ())
|
|
244
|
+
{
|
|
227
245
|
this .stylePropertiesNode [1] = this .linePropertiesNode;
|
|
246
|
+
}
|
|
228
247
|
else
|
|
229
|
-
|
|
248
|
+
{
|
|
249
|
+
const browser = this .getBrowser ();
|
|
250
|
+
|
|
251
|
+
if (browser .getRenderingProperty ("ContentScale") !== 1)
|
|
252
|
+
this .stylePropertiesNode [1] = browser .getDefaultLineProperties ();
|
|
253
|
+
else
|
|
254
|
+
this .stylePropertiesNode [1] = null;
|
|
255
|
+
}
|
|
230
256
|
},
|
|
231
257
|
set_fillProperties__: function ()
|
|
232
258
|
{
|
|
@@ -152,6 +152,7 @@ FillProperties .prototype = Object .assign (Object .create (X3DAppearanceChildNo
|
|
|
152
152
|
textureUnit = browser .getTexture2DUnit ();
|
|
153
153
|
|
|
154
154
|
gl .uniform3fv (shaderObject .x3d_FillPropertiesHatchColor, this .hatchColor);
|
|
155
|
+
gl .uniform1f (shaderObject .x3d_FillPropertiesScale, browser .getRenderingProperty ("ContentScale"));
|
|
155
156
|
|
|
156
157
|
gl .activeTexture (gl .TEXTURE0 + textureUnit);
|
|
157
158
|
gl .bindTexture (gl .TEXTURE_2D, texture .getTexture ());
|
|
@@ -83,6 +83,10 @@ LineProperties .prototype = Object .assign (Object .create (X3DAppearanceChildNo
|
|
|
83
83
|
{
|
|
84
84
|
X3DAppearanceChildNode .prototype .initialize .call (this);
|
|
85
85
|
|
|
86
|
+
const browser = this .getBrowser ();
|
|
87
|
+
|
|
88
|
+
browser .getRenderingProperties () ._ContentScale .addInterest ("set_linewidthScaleFactor__", this);
|
|
89
|
+
|
|
86
90
|
this ._applied .addInterest ("set_applied__", this);
|
|
87
91
|
this ._linetype .addInterest ("set_linetype__", this);
|
|
88
92
|
this ._linewidthScaleFactor .addInterest ("set_linewidthScaleFactor__", this);
|
|
@@ -126,23 +130,24 @@ LineProperties .prototype = Object .assign (Object .create (X3DAppearanceChildNo
|
|
|
126
130
|
set_linewidthScaleFactor__: function ()
|
|
127
131
|
{
|
|
128
132
|
const
|
|
129
|
-
browser
|
|
130
|
-
gl
|
|
133
|
+
browser = this .getBrowser (),
|
|
134
|
+
gl = browser .getContext (),
|
|
135
|
+
contentScale = browser .getRenderingProperty ("ContentScale");
|
|
131
136
|
|
|
132
|
-
this .linewidthScaleFactor = Math .max (1, this ._linewidthScaleFactor .getValue ());
|
|
137
|
+
this .linewidthScaleFactor = Math .max (1, this ._linewidthScaleFactor .getValue ()) * contentScale;
|
|
133
138
|
this .transformLines = gl .HAS_FEATURE_TRANSFORMED_LINES && this .linewidthScaleFactor > 1;
|
|
134
139
|
},
|
|
135
140
|
setShaderUniforms: function (gl, shaderObject)
|
|
136
141
|
{
|
|
142
|
+
const browser = this .getBrowser ();
|
|
143
|
+
|
|
137
144
|
if (this .applied)
|
|
138
145
|
{
|
|
139
|
-
const
|
|
140
|
-
browser = this .getBrowser (),
|
|
141
|
-
textureUnit = browser .getTexture2DUnit ();
|
|
146
|
+
const textureUnit = browser .getTexture2DUnit ();
|
|
142
147
|
|
|
143
148
|
gl .lineWidth (this .linewidthScaleFactor);
|
|
144
|
-
gl .uniform1i (shaderObject .x3d_LinePropertiesApplied, true);
|
|
145
149
|
gl .uniform1i (shaderObject .x3d_LinePropertiesLinetype, this .linetype);
|
|
150
|
+
gl .uniform1f (shaderObject .x3d_LineStippleScale, browser .getLineStippleScale ());
|
|
146
151
|
|
|
147
152
|
gl .activeTexture (gl .TEXTURE0 + textureUnit);
|
|
148
153
|
gl .bindTexture (gl .TEXTURE_2D, browser .getLinetypeTexture () .getTexture ());
|
|
@@ -150,8 +155,9 @@ LineProperties .prototype = Object .assign (Object .create (X3DAppearanceChildNo
|
|
|
150
155
|
}
|
|
151
156
|
else
|
|
152
157
|
{
|
|
153
|
-
gl .lineWidth (
|
|
154
|
-
gl .uniform1i (shaderObject .
|
|
158
|
+
gl .lineWidth (browser .getRenderingProperty ("ContentScale"));
|
|
159
|
+
gl .uniform1i (shaderObject .x3d_LinePropertiesLinetype, 16);
|
|
160
|
+
gl .uniform1f (shaderObject .x3d_LineStippleScale, 1);
|
|
155
161
|
}
|
|
156
162
|
},
|
|
157
163
|
});
|