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
|
@@ -53,6 +53,7 @@ import X3DConstants from "../../Base/X3DConstants.js";
|
|
|
53
53
|
import PrimitiveQuality from "./PrimitiveQuality.js";
|
|
54
54
|
import Shading from "./Shading.js";
|
|
55
55
|
import TextureQuality from "./TextureQuality.js";
|
|
56
|
+
import Algorithm from "../../../standard/Math/Algorithm.js";
|
|
56
57
|
|
|
57
58
|
function BrowserOptions (executionContext)
|
|
58
59
|
{
|
|
@@ -82,10 +83,16 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
82
83
|
new X3DFieldDefinition (X3DConstants .inputOutput, "QualityWhenMoving", new Fields .SFString ("MEDIUM")),
|
|
83
84
|
new X3DFieldDefinition (X3DConstants .inputOutput, "Shading", new Fields .SFString ("GOURAUD")),
|
|
84
85
|
new X3DFieldDefinition (X3DConstants .inputOutput, "MotionBlur", new Fields .SFBool ()),
|
|
86
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "Cache", new Fields .SFBool (true)),
|
|
87
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "ContentScale", new Fields .SFFloat (1)),
|
|
88
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "ContextMenu", new Fields .SFBool (true)),
|
|
89
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "Debug", new Fields .SFBool ()),
|
|
85
90
|
new X3DFieldDefinition (X3DConstants .inputOutput, "Gravity", new Fields .SFFloat (9.80665)),
|
|
91
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "LogarithmicDepthBuffer", new Fields .SFBool ()),
|
|
92
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "Notifications", new Fields .SFBool (true)),
|
|
93
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "Multisampling", new Fields .SFInt32 (4)),
|
|
86
94
|
new X3DFieldDefinition (X3DConstants .inputOutput, "StraightenHorizon", new Fields .SFBool (true)),
|
|
87
|
-
new X3DFieldDefinition (X3DConstants .inputOutput, "
|
|
88
|
-
new X3DFieldDefinition (X3DConstants .inputOutput, "Timings", new Fields .SFBool (false)),
|
|
95
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "Timings", new Fields .SFBool ()),
|
|
89
96
|
]),
|
|
90
97
|
getTypeName: function ()
|
|
91
98
|
{
|
|
@@ -112,90 +119,80 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
112
119
|
});
|
|
113
120
|
|
|
114
121
|
this ._Rubberband .addInterest ("set_rubberband__", this);
|
|
122
|
+
this ._Antialiased .addInterest ("set_antialiased__", this);
|
|
115
123
|
this ._PrimitiveQuality .addInterest ("set_primitiveQuality__", this);
|
|
116
124
|
this ._TextureQuality .addInterest ("set_textureQuality__", this);
|
|
117
125
|
this ._Shading .addInterest ("set_shading__", this);
|
|
118
126
|
this ._StraightenHorizon .addInterest ("set_straightenHorizon__", this);
|
|
127
|
+
this ._ContentScale .addInterest ("set_contentScale__", this);
|
|
119
128
|
this ._LogarithmicDepthBuffer .addInterest ("set_logarithmicDepthBuffer__", this);
|
|
129
|
+
this ._Multisampling .addInterest ("set_multisampling__", this);
|
|
120
130
|
this ._Timings .addInterest ("set_timings__", this);
|
|
121
131
|
|
|
122
132
|
this .configure ();
|
|
123
133
|
},
|
|
124
|
-
configure: function ()
|
|
134
|
+
configure: (function ()
|
|
125
135
|
{
|
|
126
|
-
const
|
|
127
|
-
|
|
128
|
-
|
|
136
|
+
const globals = new Set ([
|
|
137
|
+
"Antialiased",
|
|
138
|
+
"Cache",
|
|
139
|
+
"ContentScale",
|
|
140
|
+
"ContextMenu",
|
|
141
|
+
"Debug",
|
|
142
|
+
"Multisampling",
|
|
143
|
+
"Notifications",
|
|
144
|
+
"SplashScreen",
|
|
145
|
+
]);
|
|
146
|
+
|
|
147
|
+
return function ()
|
|
129
148
|
{
|
|
130
|
-
const
|
|
149
|
+
const
|
|
150
|
+
browser = this .getBrowser (),
|
|
151
|
+
localStorage = this .localStorage;
|
|
131
152
|
|
|
132
|
-
|
|
133
|
-
|
|
153
|
+
for (const { name, value } of this .getFieldDefinitions ())
|
|
154
|
+
{
|
|
155
|
+
if (globals .has (name))
|
|
156
|
+
{
|
|
157
|
+
const attribute = name [0] .toLowerCase () + name .slice (1);
|
|
158
|
+
browser .attributeChangedCallback (attribute, null, browser .getElement () .attr (name));
|
|
159
|
+
continue;
|
|
160
|
+
}
|
|
134
161
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
162
|
+
if (localStorage [name] !== undefined)
|
|
163
|
+
continue;
|
|
138
164
|
|
|
139
|
-
|
|
140
|
-
rubberband = localStorage .Rubberband,
|
|
141
|
-
primitiveQuality = localStorage .PrimitiveQuality,
|
|
142
|
-
textureQuality = localStorage .TextureQuality,
|
|
143
|
-
straightenHorizon = localStorage .StraightenHorizon,
|
|
144
|
-
timings = localStorage .Timings;
|
|
165
|
+
const field = this .getField (name);
|
|
145
166
|
|
|
146
|
-
|
|
147
|
-
|
|
167
|
+
if (field .equals (value))
|
|
168
|
+
continue;
|
|
148
169
|
|
|
149
|
-
|
|
150
|
-
|
|
170
|
+
field .assign (value);
|
|
171
|
+
}
|
|
151
172
|
|
|
152
|
-
|
|
153
|
-
|
|
173
|
+
const
|
|
174
|
+
rubberband = localStorage .Rubberband,
|
|
175
|
+
primitiveQuality = localStorage .PrimitiveQuality,
|
|
176
|
+
textureQuality = localStorage .TextureQuality,
|
|
177
|
+
straightenHorizon = localStorage .StraightenHorizon,
|
|
178
|
+
timings = localStorage .Timings;
|
|
154
179
|
|
|
155
|
-
|
|
156
|
-
|
|
180
|
+
if (rubberband !== this ._Rubberband .getValue ())
|
|
181
|
+
this ._Rubberband = rubberband;
|
|
157
182
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
},
|
|
161
|
-
getAttribute: function (name)
|
|
162
|
-
{
|
|
163
|
-
const element = this .getBrowser () .getElement ();
|
|
183
|
+
if (primitiveQuality !== this ._PrimitiveQuality .getValue ())
|
|
184
|
+
this ._PrimitiveQuality = primitiveQuality;
|
|
164
185
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
toBoolean: function (value, defaultValue)
|
|
168
|
-
{
|
|
169
|
-
value = String (value) .toLowerCase ();
|
|
170
|
-
|
|
171
|
-
if (value === "true")
|
|
172
|
-
return true;
|
|
186
|
+
if (textureQuality !== this ._TextureQuality .getValue ())
|
|
187
|
+
this ._TextureQuality = textureQuality;
|
|
173
188
|
|
|
174
|
-
|
|
175
|
-
|
|
189
|
+
if (straightenHorizon !== this ._StraightenHorizon .getValue ())
|
|
190
|
+
this ._StraightenHorizon = straightenHorizon;
|
|
176
191
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
return this .toBoolean (this .getAttribute ("cache"), true);
|
|
182
|
-
},
|
|
183
|
-
getContextMenu: function ()
|
|
184
|
-
{
|
|
185
|
-
return this .toBoolean (this .getAttribute ("contextMenu"), true);
|
|
186
|
-
},
|
|
187
|
-
getDebug: function ()
|
|
188
|
-
{
|
|
189
|
-
return this .toBoolean (this .getAttribute ("debug"), false);
|
|
190
|
-
},
|
|
191
|
-
getNotifications: function ()
|
|
192
|
-
{
|
|
193
|
-
return this .toBoolean (this .getAttribute ("notifications"), true);
|
|
194
|
-
},
|
|
195
|
-
getSplashScreen: function ()
|
|
196
|
-
{
|
|
197
|
-
return this .toBoolean (this .getAttribute ("splashScreen"), this ._SplashScreen .getValue ());
|
|
198
|
-
},
|
|
192
|
+
if (timings !== this ._Timings .getValue ())
|
|
193
|
+
this ._Timings = timings;
|
|
194
|
+
};
|
|
195
|
+
})(),
|
|
199
196
|
getPrimitiveQuality: function ()
|
|
200
197
|
{
|
|
201
198
|
return this .primitiveQuality;
|
|
@@ -212,6 +209,10 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
212
209
|
{
|
|
213
210
|
this .localStorage .Rubberband = rubberband .getValue ();
|
|
214
211
|
},
|
|
212
|
+
set_antialiased__: function ()
|
|
213
|
+
{
|
|
214
|
+
this .set_multisampling__ (this ._Multisampling);
|
|
215
|
+
},
|
|
215
216
|
set_primitiveQuality__: function (value)
|
|
216
217
|
{
|
|
217
218
|
const
|
|
@@ -265,6 +266,38 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
265
266
|
{
|
|
266
267
|
this .localStorage .StraightenHorizon = straightenHorizon .getValue ();
|
|
267
268
|
},
|
|
269
|
+
updateContentScale: function ()
|
|
270
|
+
{
|
|
271
|
+
const
|
|
272
|
+
browser = this .getBrowser (),
|
|
273
|
+
media = window .matchMedia (`(resolution: ${window .devicePixelRatio}dppx)`),
|
|
274
|
+
update = this .updateContentScale .bind (this);
|
|
275
|
+
|
|
276
|
+
if (this .removeUpdateContentScale)
|
|
277
|
+
this .removeUpdateContentScale ();
|
|
278
|
+
|
|
279
|
+
this .removeUpdateContentScale = function () { media .removeEventListener ("change", update) };
|
|
280
|
+
|
|
281
|
+
media .addEventListener ("change", update);
|
|
282
|
+
|
|
283
|
+
browser .getRenderingProperties () ._ContentScale = window .devicePixelRatio;
|
|
284
|
+
|
|
285
|
+
browser .reshape ();
|
|
286
|
+
},
|
|
287
|
+
set_contentScale__: function (contentScale)
|
|
288
|
+
{
|
|
289
|
+
const browser = this .getBrowser ();
|
|
290
|
+
|
|
291
|
+
if (this .removeUpdateContentScale)
|
|
292
|
+
this .removeUpdateContentScale ();
|
|
293
|
+
|
|
294
|
+
if (contentScale .getValue () === -1)
|
|
295
|
+
this .updateContentScale ();
|
|
296
|
+
else
|
|
297
|
+
browser .getRenderingProperties () ._ContentScale = Math .max (contentScale .getValue (), 0) || 1;
|
|
298
|
+
|
|
299
|
+
browser .reshape ();
|
|
300
|
+
},
|
|
268
301
|
set_logarithmicDepthBuffer__: function (logarithmicDepthBuffer)
|
|
269
302
|
{
|
|
270
303
|
const
|
|
@@ -273,6 +306,17 @@ BrowserOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototy
|
|
|
273
306
|
|
|
274
307
|
browser .getRenderingProperties () ._LogarithmicDepthBuffer = logarithmicDepthBuffer .getValue () && gl .HAS_FEATURE_FRAG_DEPTH;
|
|
275
308
|
},
|
|
309
|
+
set_multisampling__: function (multisampling)
|
|
310
|
+
{
|
|
311
|
+
const
|
|
312
|
+
browser = this .getBrowser (),
|
|
313
|
+
samples = Algorithm .clamp (multisampling .getValue (), 0, browser .getMaxSamples ());
|
|
314
|
+
|
|
315
|
+
browser .getRenderingProperties () ._Multisampling = this ._Antialiased .getValue () ? samples : 0;
|
|
316
|
+
browser .getRenderingProperties () ._Antialiased = browser .getAntialiased ();
|
|
317
|
+
|
|
318
|
+
browser .reshape ();
|
|
319
|
+
},
|
|
276
320
|
set_timings__: function (timings)
|
|
277
321
|
{
|
|
278
322
|
this .localStorage .Timings = timings .getValue ();
|
|
@@ -118,7 +118,7 @@ ContextMenu .prototype = Object .assign (Object .create (X3DBaseNode .prototype)
|
|
|
118
118
|
browser = this .getBrowser (),
|
|
119
119
|
fullscreen = browser .getElement () .fullScreen ();
|
|
120
120
|
|
|
121
|
-
if (! browser .
|
|
121
|
+
if (! browser .getBrowserOption ("ContextMenu"))
|
|
122
122
|
return;
|
|
123
123
|
|
|
124
124
|
const menu = {
|
|
@@ -455,7 +455,7 @@ ContextMenu .prototype = Object .assign (Object .create (X3DBaseNode .prototype)
|
|
|
455
455
|
delete menu .items ["straighten-horizon"];
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
if (! browser .
|
|
458
|
+
if (! browser .getBrowserOption ("Debug"))
|
|
459
459
|
{
|
|
460
460
|
delete menu .items ["shading"];
|
|
461
461
|
}
|
|
@@ -95,7 +95,7 @@ Notification .prototype = Object .assign (Object .create (X3DBaseNode .prototype
|
|
|
95
95
|
},
|
|
96
96
|
set_string__: function ()
|
|
97
97
|
{
|
|
98
|
-
if (! this .getBrowser () .
|
|
98
|
+
if (! this .getBrowser () .getBrowserOption ("Notifications"))
|
|
99
99
|
return;
|
|
100
100
|
|
|
101
101
|
if (this ._string .length === 0)
|
|
@@ -69,7 +69,10 @@ RenderingProperties .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
69
69
|
new X3DFieldDefinition (X3DConstants .outputOnly, "Antialiased", new Fields .SFBool (true)),
|
|
70
70
|
new X3DFieldDefinition (X3DConstants .outputOnly, "ColorDepth", new Fields .SFInt32 ()),
|
|
71
71
|
new X3DFieldDefinition (X3DConstants .outputOnly, "TextureMemory", new Fields .SFDouble ()),
|
|
72
|
+
new X3DFieldDefinition (X3DConstants .outputOnly, "ContentScale", new Fields .SFFloat (1)),
|
|
72
73
|
new X3DFieldDefinition (X3DConstants .outputOnly, "LogarithmicDepthBuffer", new Fields .SFBool (false)),
|
|
74
|
+
new X3DFieldDefinition (X3DConstants .outputOnly, "MaxSamples", new Fields .SFInt32 ()),
|
|
75
|
+
new X3DFieldDefinition (X3DConstants .outputOnly, "Multisampling", new Fields .SFInt32 (4)),
|
|
73
76
|
]),
|
|
74
77
|
getTypeName: function ()
|
|
75
78
|
{
|
|
@@ -94,6 +97,7 @@ RenderingProperties .prototype = Object .assign (Object .create (X3DBaseNode .pr
|
|
|
94
97
|
this ._MaxLights = browser .getMaxLights ();
|
|
95
98
|
this ._ColorDepth = browser .getColorDepth ();
|
|
96
99
|
this ._TextureMemory = browser .getTextureMemory ();
|
|
100
|
+
this ._MaxSamples = browser .getMaxSamples ();
|
|
97
101
|
},
|
|
98
102
|
});
|
|
99
103
|
|
|
@@ -57,29 +57,30 @@ import Scene from "../../Execution/Scene.js";
|
|
|
57
57
|
import DataStorage from "../../../standard/Utility/DataStorage.js";
|
|
58
58
|
import Vector3 from "../../../standard/Math/Numbers/Vector3.js";
|
|
59
59
|
import _ from "../../../locale/gettext.js";
|
|
60
|
+
import DEBUG from "../../DEBUG.js";
|
|
60
61
|
|
|
61
62
|
const WEBGL_LATEST_VERSION = 2;
|
|
62
63
|
|
|
63
64
|
const
|
|
64
|
-
_instanceId
|
|
65
|
-
_element
|
|
66
|
-
_shadow
|
|
67
|
-
_surface
|
|
68
|
-
_canvas
|
|
69
|
-
_context
|
|
70
|
-
_splashScreen
|
|
71
|
-
_localStorage
|
|
72
|
-
_mobile
|
|
73
|
-
_browserTimings
|
|
74
|
-
_browserOptions
|
|
75
|
-
_browserProperties
|
|
76
|
-
_renderingProperties
|
|
77
|
-
_notification
|
|
78
|
-
_contextMenu
|
|
79
|
-
_privateScene
|
|
80
|
-
_keydown
|
|
81
|
-
_keyup
|
|
82
|
-
_pixelPerPoint
|
|
65
|
+
_instanceId = Symbol (),
|
|
66
|
+
_element = Symbol (),
|
|
67
|
+
_shadow = Symbol (),
|
|
68
|
+
_surface = Symbol (),
|
|
69
|
+
_canvas = Symbol (),
|
|
70
|
+
_context = Symbol (),
|
|
71
|
+
_splashScreen = Symbol (),
|
|
72
|
+
_localStorage = Symbol (),
|
|
73
|
+
_mobile = Symbol (),
|
|
74
|
+
_browserTimings = Symbol (),
|
|
75
|
+
_browserOptions = Symbol (),
|
|
76
|
+
_browserProperties = Symbol (),
|
|
77
|
+
_renderingProperties = Symbol (),
|
|
78
|
+
_notification = Symbol (),
|
|
79
|
+
_contextMenu = Symbol (),
|
|
80
|
+
_privateScene = Symbol (),
|
|
81
|
+
_keydown = Symbol (),
|
|
82
|
+
_keyup = Symbol (),
|
|
83
|
+
_pixelPerPoint = Symbol ();
|
|
83
84
|
|
|
84
85
|
let instanceId = 0;
|
|
85
86
|
|
|
@@ -122,10 +123,10 @@ function X3DCoreContext (element)
|
|
|
122
123
|
|
|
123
124
|
this [_pixelPerPoint] = 1; // default 72 dpi
|
|
124
125
|
|
|
125
|
-
this .addChildObjects ("controlKey",
|
|
126
|
-
"shiftKey",
|
|
127
|
-
"altKey",
|
|
128
|
-
"altGrKey",
|
|
126
|
+
this .addChildObjects ("controlKey", new Fields .SFBool (),
|
|
127
|
+
"shiftKey", new Fields .SFBool (),
|
|
128
|
+
"altKey", new Fields .SFBool (),
|
|
129
|
+
"altGrKey", new Fields .SFBool ());
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
X3DCoreContext .prototype =
|
|
@@ -145,32 +146,28 @@ X3DCoreContext .prototype =
|
|
|
145
146
|
|
|
146
147
|
Object .defineProperty (this .getElement () .get (0), "src",
|
|
147
148
|
{
|
|
148
|
-
get:
|
|
149
|
+
get: () =>
|
|
149
150
|
{
|
|
150
151
|
return this .getExecutionContext () .getWorldURL ();
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
set: function (value)
|
|
152
|
+
},
|
|
153
|
+
set: (value) =>
|
|
154
154
|
{
|
|
155
155
|
this .loadURL (new Fields .MFString (value), new Fields .MFString ());
|
|
156
|
-
}
|
|
157
|
-
.bind (this),
|
|
156
|
+
},
|
|
158
157
|
enumerable: true,
|
|
159
158
|
configurable: false,
|
|
160
159
|
});
|
|
161
160
|
|
|
162
161
|
Object .defineProperty (this .getElement () .get (0), "url",
|
|
163
162
|
{
|
|
164
|
-
get:
|
|
163
|
+
get: () =>
|
|
165
164
|
{
|
|
166
165
|
return new Fields .MFString (this .getExecutionContext () .getWorldURL ());
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
set: function (value)
|
|
166
|
+
},
|
|
167
|
+
set: (value) =>
|
|
170
168
|
{
|
|
171
169
|
this .loadURL (value, new Fields .MFString ());
|
|
172
|
-
}
|
|
173
|
-
.bind (this),
|
|
170
|
+
},
|
|
174
171
|
enumerable: true,
|
|
175
172
|
configurable: false,
|
|
176
173
|
});
|
|
@@ -180,10 +177,6 @@ X3DCoreContext .prototype =
|
|
|
180
177
|
this .getElement () .on ("keydown.X3DCoreContext", this [_keydown] .bind (this));
|
|
181
178
|
this .getElement () .on ("keyup.X3DCoreContext", this [_keyup] .bind (this));
|
|
182
179
|
},
|
|
183
|
-
getDebug: function ()
|
|
184
|
-
{
|
|
185
|
-
return this .getBrowserOptions () .getDebug ();
|
|
186
|
-
},
|
|
187
180
|
getInstanceId: function ()
|
|
188
181
|
{
|
|
189
182
|
return this [_instanceId];
|
|
@@ -265,7 +258,7 @@ X3DCoreContext .prototype =
|
|
|
265
258
|
},
|
|
266
259
|
getPixelPerPoint: function ()
|
|
267
260
|
{
|
|
268
|
-
return this [_pixelPerPoint];
|
|
261
|
+
return this [_pixelPerPoint] * this .getRenderingProperty ("ContentScale");
|
|
269
262
|
},
|
|
270
263
|
connectedCallback: function ()
|
|
271
264
|
{
|
|
@@ -275,11 +268,53 @@ X3DCoreContext .prototype =
|
|
|
275
268
|
},
|
|
276
269
|
attributeChangedCallback: function (name, oldValue, newValue)
|
|
277
270
|
{
|
|
278
|
-
switch (name
|
|
271
|
+
switch (name)
|
|
279
272
|
{
|
|
273
|
+
case "antialiased":
|
|
274
|
+
{
|
|
275
|
+
this .setBrowserOption ("Antialiased", this .parseBooleanAttribute (newValue, true));
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
case "cache":
|
|
279
|
+
{
|
|
280
|
+
this .setBrowserOption ("Cache", this .parseBooleanAttribute (newValue, true));
|
|
281
|
+
break;
|
|
282
|
+
}
|
|
283
|
+
case "contentScale":
|
|
284
|
+
case "contentscale":
|
|
285
|
+
{
|
|
286
|
+
this .setBrowserOption ("ContentScale", newValue === "auto" ? -1 : parseFloat (newValue));
|
|
287
|
+
break;
|
|
288
|
+
}
|
|
289
|
+
case "contextMenu":
|
|
290
|
+
case "contextmenu":
|
|
291
|
+
{
|
|
292
|
+
this .setBrowserOption ("ContextMenu", this .parseBooleanAttribute (newValue, true));
|
|
293
|
+
break;
|
|
294
|
+
}
|
|
295
|
+
case "debug":
|
|
296
|
+
{
|
|
297
|
+
this .setBrowserOption ("Debug", this .parseBooleanAttribute (newValue, false));
|
|
298
|
+
break;
|
|
299
|
+
}
|
|
300
|
+
case "multisampling":
|
|
301
|
+
{
|
|
302
|
+
const samples = parseInt (newValue);
|
|
303
|
+
|
|
304
|
+
this .setBrowserOption ("Multisampling", isNaN (samples) ? 4 : samples);
|
|
305
|
+
break;
|
|
306
|
+
}
|
|
307
|
+
case "notifications":
|
|
308
|
+
{
|
|
309
|
+
this .setBrowserOption ("Notifications", this .parseBooleanAttribute (newValue, true));
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
case "splashScreen":
|
|
280
313
|
case "splashscreen":
|
|
281
314
|
{
|
|
282
|
-
|
|
315
|
+
this .setBrowserOption ("SplashScreen", this .parseBooleanAttribute (newValue, true));
|
|
316
|
+
|
|
317
|
+
if (! this .getBrowserOption ("SplashScreen"))
|
|
283
318
|
{
|
|
284
319
|
this .getCanvas () .show ();
|
|
285
320
|
this .getSplashScreen () .stop (true, true) .hide ();
|
|
@@ -299,6 +334,16 @@ X3DCoreContext .prototype =
|
|
|
299
334
|
}
|
|
300
335
|
}
|
|
301
336
|
},
|
|
337
|
+
parseBooleanAttribute: function (value, defaultValue)
|
|
338
|
+
{
|
|
339
|
+
if (value === "true")
|
|
340
|
+
return true;
|
|
341
|
+
|
|
342
|
+
if (value === "false")
|
|
343
|
+
return false;
|
|
344
|
+
|
|
345
|
+
return defaultValue;
|
|
346
|
+
},
|
|
302
347
|
parseUrlAttribute: function (urlCharacters)
|
|
303
348
|
{
|
|
304
349
|
const url = new Fields .MFString ();
|
|
@@ -355,7 +400,7 @@ X3DCoreContext .prototype =
|
|
|
355
400
|
}
|
|
356
401
|
case 49: // 1
|
|
357
402
|
{
|
|
358
|
-
if (this .
|
|
403
|
+
if (this .getBrowserOption ("Debug"))
|
|
359
404
|
{
|
|
360
405
|
if (this .getControlKey ())
|
|
361
406
|
{
|
|
@@ -369,7 +414,7 @@ X3DCoreContext .prototype =
|
|
|
369
414
|
}
|
|
370
415
|
case 50: // 2
|
|
371
416
|
{
|
|
372
|
-
if (this .
|
|
417
|
+
if (this .getBrowserOption ("Debug"))
|
|
373
418
|
{
|
|
374
419
|
if (this .getControlKey ())
|
|
375
420
|
{
|
|
@@ -383,7 +428,7 @@ X3DCoreContext .prototype =
|
|
|
383
428
|
}
|
|
384
429
|
case 51: // 3
|
|
385
430
|
{
|
|
386
|
-
if (this .
|
|
431
|
+
if (this .getBrowserOption ("Debug"))
|
|
387
432
|
{
|
|
388
433
|
if (this .getControlKey ())
|
|
389
434
|
{
|
|
@@ -397,7 +442,7 @@ X3DCoreContext .prototype =
|
|
|
397
442
|
}
|
|
398
443
|
case 52: // 4
|
|
399
444
|
{
|
|
400
|
-
if (this .
|
|
445
|
+
if (this .getBrowserOption ("Debug"))
|
|
401
446
|
{
|
|
402
447
|
if (this .getControlKey ())
|
|
403
448
|
{
|
|
@@ -411,7 +456,7 @@ X3DCoreContext .prototype =
|
|
|
411
456
|
}
|
|
412
457
|
case 53: // 5
|
|
413
458
|
{
|
|
414
|
-
if (this .
|
|
459
|
+
if (this .getBrowserOption ("Debug"))
|
|
415
460
|
{
|
|
416
461
|
if (this .getControlKey ())
|
|
417
462
|
{
|
|
@@ -425,7 +470,7 @@ X3DCoreContext .prototype =
|
|
|
425
470
|
}
|
|
426
471
|
case 83: // s
|
|
427
472
|
{
|
|
428
|
-
if (this .
|
|
473
|
+
if (this .getBrowserOption ("Debug"))
|
|
429
474
|
{
|
|
430
475
|
if (this .getControlKey ())
|
|
431
476
|
{
|
|
@@ -551,9 +596,9 @@ X3DCoreContext .prototype =
|
|
|
551
596
|
text += "\n";
|
|
552
597
|
|
|
553
598
|
this .copyToClipboard (text);
|
|
554
|
-
this .getNotification () ._string = _ ("Viewpoint
|
|
599
|
+
this .getNotification () ._string = _ ("Viewpoint copied to clipboard.");
|
|
555
600
|
|
|
556
|
-
console .log ("
|
|
601
|
+
console .log ("Viewpoint copied to clipboard.");
|
|
557
602
|
console .debug (text);
|
|
558
603
|
}
|
|
559
604
|
|
|
@@ -592,11 +637,11 @@ X3DCoreContext .prototype =
|
|
|
592
637
|
copyToClipboard: function (text)
|
|
593
638
|
{
|
|
594
639
|
// The textarea must be visible to make copy work.
|
|
595
|
-
const
|
|
596
|
-
this .getShadow () .find (".x_ite-private-browser") .prepend (
|
|
597
|
-
|
|
640
|
+
const tmp = $("<textarea></textarea>");
|
|
641
|
+
this .getShadow () .find (".x_ite-private-browser") .prepend (tmp);
|
|
642
|
+
tmp .text (text) .trigger ("select");
|
|
598
643
|
document .execCommand ("copy");
|
|
599
|
-
|
|
644
|
+
tmp .remove ();
|
|
600
645
|
},
|
|
601
646
|
};
|
|
602
647
|
|
|
@@ -175,10 +175,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
175
175
|
|
|
176
176
|
this .pressTime = Date .now ();
|
|
177
177
|
|
|
178
|
-
const
|
|
179
|
-
offset = this .getBrowser () .getSurface () .offset (),
|
|
180
|
-
x = event .pageX - offset .left,
|
|
181
|
-
y = event .pageY - offset .top;
|
|
178
|
+
const [x, y] = this .getPointer (event);
|
|
182
179
|
|
|
183
180
|
switch (this .getButton (event .button))
|
|
184
181
|
{
|
|
@@ -285,11 +282,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
285
282
|
event .preventDefault ();
|
|
286
283
|
event .stopImmediatePropagation ();
|
|
287
284
|
|
|
288
|
-
const
|
|
289
|
-
element = this .getBrowser () .getSurface (),
|
|
290
|
-
offset = element .offset (),
|
|
291
|
-
x = event .pageX - offset .left - parseFloat (element .css ('borderLeftWidth')),
|
|
292
|
-
y = element .innerHeight () - (event .pageY - offset .top - parseFloat (element .css ('borderTopWidth')));
|
|
285
|
+
const [x, y] = this .getPointer (event);
|
|
293
286
|
|
|
294
287
|
this .disconnect ();
|
|
295
288
|
this .lookAtBBox (x, y, this .getStraightenHorizon ());
|
|
@@ -300,10 +293,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
300
293
|
|
|
301
294
|
return function (event)
|
|
302
295
|
{
|
|
303
|
-
const
|
|
304
|
-
offset = this .getBrowser () .getSurface () .offset (),
|
|
305
|
-
x = event .pageX - offset .left,
|
|
306
|
-
y = event .pageY - offset .top;
|
|
296
|
+
const [x, y] = this .getPointer (event);
|
|
307
297
|
|
|
308
298
|
switch (this .getButton (this .button))
|
|
309
299
|
{
|
|
@@ -643,7 +633,7 @@ ExamineViewer .prototype = Object .assign (Object .create (X3DViewer .prototype)
|
|
|
643
633
|
|
|
644
634
|
this .axis .assign (axis);
|
|
645
635
|
|
|
646
|
-
if (rotation .getAxis () .dot (Vector3 .yAxis) < 0 !== rotation .angle < 0)
|
|
636
|
+
if (rotation .getAxis (new Vector3 (0, 0, 0)) .dot (Vector3 .yAxis) < 0 !== rotation .angle < 0)
|
|
647
637
|
this .axis .negate ();
|
|
648
638
|
|
|
649
639
|
this .timeSensor ._cycleInterval = Math .PI / (rotationChange .angle * SPIN_FACTOR * 30);
|
|
@@ -126,10 +126,7 @@ LookAtViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
126
126
|
if (this .button >= 0)
|
|
127
127
|
return;
|
|
128
128
|
|
|
129
|
-
const
|
|
130
|
-
offset = this .getBrowser () .getSurface () .offset (),
|
|
131
|
-
x = event .pageX - offset .left,
|
|
132
|
-
y = event .pageY - offset .top;
|
|
129
|
+
const [x, y] = this .getPointer (event);
|
|
133
130
|
|
|
134
131
|
switch (event .button)
|
|
135
132
|
{
|
|
@@ -187,11 +184,7 @@ LookAtViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
187
184
|
event .preventDefault ();
|
|
188
185
|
event .stopImmediatePropagation ();
|
|
189
186
|
|
|
190
|
-
const
|
|
191
|
-
element = this .getBrowser () .getSurface (),
|
|
192
|
-
offset = element .offset (),
|
|
193
|
-
x = event .pageX - offset .left - parseFloat (element .css ('borderLeftWidth')),
|
|
194
|
-
y = element .innerHeight () - (event .pageY - offset .top - parseFloat (element .css ('borderTopWidth')));
|
|
187
|
+
const [x, y] = this .getPointer (event);
|
|
195
188
|
|
|
196
189
|
this .disconnect ();
|
|
197
190
|
this .lookAtPoint (x, y, this .getStraightenHorizon ());
|
|
@@ -202,10 +195,7 @@ LookAtViewer .prototype = Object .assign (Object .create (X3DViewer .prototype),
|
|
|
202
195
|
|
|
203
196
|
this .event = event;
|
|
204
197
|
|
|
205
|
-
const
|
|
206
|
-
offset = this .getBrowser () .getSurface () .offset (),
|
|
207
|
-
x = event .pageX - offset .left,
|
|
208
|
-
y = event .pageY - offset .top;
|
|
198
|
+
const [x, y] = this .getPointer (event);
|
|
209
199
|
|
|
210
200
|
switch (this .button)
|
|
211
201
|
{
|