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
|
@@ -88,13 +88,13 @@ function XMLParser (scene)
|
|
|
88
88
|
XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
89
89
|
{
|
|
90
90
|
constructor: XMLParser,
|
|
91
|
-
|
|
91
|
+
getEncoding: function ()
|
|
92
92
|
{
|
|
93
|
-
return
|
|
93
|
+
return "XML";
|
|
94
94
|
},
|
|
95
|
-
|
|
95
|
+
isValid: function ()
|
|
96
96
|
{
|
|
97
|
-
return this .input;
|
|
97
|
+
return (this .input instanceof XMLDocument) || (this .input instanceof HTMLElement) || (this .input === null);
|
|
98
98
|
},
|
|
99
99
|
setInput (xmlElement)
|
|
100
100
|
{
|
|
@@ -106,7 +106,7 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
106
106
|
this .input = xmlElement;
|
|
107
107
|
this .xml = this .isXML (xmlElement);
|
|
108
108
|
|
|
109
|
-
if (!
|
|
109
|
+
if (!this .xml)
|
|
110
110
|
Object .assign (this, HTMLParser);
|
|
111
111
|
}
|
|
112
112
|
catch (error)
|
|
@@ -143,12 +143,12 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
143
143
|
{
|
|
144
144
|
case "#document":
|
|
145
145
|
{
|
|
146
|
-
|
|
146
|
+
const X3D = $(xmlElement) .children ("X3D");
|
|
147
147
|
|
|
148
148
|
if (X3D .length)
|
|
149
149
|
{
|
|
150
|
-
for (
|
|
151
|
-
this .x3dElement (
|
|
150
|
+
for (const xmlElement of X3D)
|
|
151
|
+
this .x3dElement (xmlElement);
|
|
152
152
|
}
|
|
153
153
|
else
|
|
154
154
|
{
|
|
@@ -264,6 +264,9 @@ XMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
264
264
|
for (var i = 0; i < childNodes .length; ++ i)
|
|
265
265
|
this .x3dElementChildHead (childNodes [i])
|
|
266
266
|
|
|
267
|
+
if (!this .xml)
|
|
268
|
+
this .headElement (xmlElement);
|
|
269
|
+
|
|
267
270
|
if (this .success)
|
|
268
271
|
{
|
|
269
272
|
this .loadComponents () .then (function ()
|
|
@@ -1190,107 +1193,6 @@ XMLParser .prototype .fieldTypes [X3DConstants .MFVec3f] = VRMLParser .proto
|
|
|
1190
1193
|
XMLParser .prototype .fieldTypes [X3DConstants .MFVec4d] = VRMLParser .prototype .sfvec4dValues;
|
|
1191
1194
|
XMLParser .prototype .fieldTypes [X3DConstants .MFVec4f] = VRMLParser .prototype .sfvec4fValues;
|
|
1192
1195
|
|
|
1193
|
-
/*
|
|
1194
|
-
* Lazy parse functions.
|
|
1195
|
-
*/
|
|
1196
|
-
|
|
1197
|
-
const
|
|
1198
|
-
infs = /\binf\b/g,
|
|
1199
|
-
nans = /\bnan\b/g,
|
|
1200
|
-
trimWhitespaces = /^[\x20\n,\t\r"]+|[\x20\n,\t\r"]+$/g,
|
|
1201
|
-
whitespaces = /[\x20\n,\t\r"]+/,
|
|
1202
|
-
strings = new RegExp ('"((?:[^\\\\"]|\\\\\\\\|\\\\\\")*)"', 'g');
|
|
1203
|
-
|
|
1204
|
-
function prepareBools (string)
|
|
1205
|
-
{
|
|
1206
|
-
return string .replace (trimWhitespaces, "") .split (whitespaces);
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
function prepareFloats (string)
|
|
1210
|
-
{
|
|
1211
|
-
return (string
|
|
1212
|
-
.replace (infs, "Infinity")
|
|
1213
|
-
.replace (nans, "NaN")
|
|
1214
|
-
.replace (trimWhitespaces, "")
|
|
1215
|
-
.split (whitespaces));
|
|
1216
|
-
}
|
|
1217
|
-
|
|
1218
|
-
function prepareInts (string)
|
|
1219
|
-
{
|
|
1220
|
-
return string .replace (trimWhitespaces, "") .split (whitespaces);
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
|
-
function prepareStrings (string)
|
|
1224
|
-
{
|
|
1225
|
-
var
|
|
1226
|
-
match = null,
|
|
1227
|
-
array = [ ];
|
|
1228
|
-
|
|
1229
|
-
while (match = strings .exec (string))
|
|
1230
|
-
array .push (match [1]);
|
|
1231
|
-
|
|
1232
|
-
return array .map (Fields .SFString .unescape);
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
// Unitless fields.
|
|
1236
|
-
|
|
1237
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFColor] =
|
|
1238
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFColorRGBA] =
|
|
1239
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFMatrix3d] =
|
|
1240
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFMatrix3f] =
|
|
1241
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFMatrix4d] =
|
|
1242
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFMatrix4f] =
|
|
1243
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFVec4d] =
|
|
1244
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFVec4f] = function (field)
|
|
1245
|
-
{
|
|
1246
|
-
field .setValue (prepareFloats (this .getInput ()) .map (function (value)
|
|
1247
|
-
{
|
|
1248
|
-
return parseFloat (value);
|
|
1249
|
-
}));
|
|
1250
|
-
};
|
|
1251
|
-
|
|
1252
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFBool] = function (field)
|
|
1253
|
-
{
|
|
1254
|
-
field .setValue (prepareBools (this .getInput ()) .map (function (value)
|
|
1255
|
-
{
|
|
1256
|
-
if (value === "true" || value === "TRUE")
|
|
1257
|
-
return true;
|
|
1258
|
-
|
|
1259
|
-
return false;
|
|
1260
|
-
}));
|
|
1261
|
-
};
|
|
1262
|
-
|
|
1263
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFInt32] = function (field)
|
|
1264
|
-
{
|
|
1265
|
-
field .setValue (prepareInts (this .getInput ()) .map (function (value)
|
|
1266
|
-
{
|
|
1267
|
-
return parseInt (value);
|
|
1268
|
-
}));
|
|
1269
|
-
};
|
|
1270
|
-
|
|
1271
|
-
// Unit fields.
|
|
1272
|
-
|
|
1273
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFDouble] =
|
|
1274
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFFloat] =
|
|
1275
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFVec2d] =
|
|
1276
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFVec2f] =
|
|
1277
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFVec3d] =
|
|
1278
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFVec3f] = function (field)
|
|
1279
|
-
{
|
|
1280
|
-
var category = field .getUnit ();
|
|
1281
|
-
|
|
1282
|
-
field .setValue (prepareFloats (this .getInput ()) .map (function (value)
|
|
1283
|
-
{
|
|
1284
|
-
return this .fromUnit (category, parseFloat (value));
|
|
1285
|
-
},
|
|
1286
|
-
this));
|
|
1287
|
-
};
|
|
1288
|
-
|
|
1289
|
-
XMLParser .prototype .fieldTypes [X3DConstants .MFString] = function (field)
|
|
1290
|
-
{
|
|
1291
|
-
field .setValue (prepareStrings (this .getInput ()));
|
|
1292
|
-
};
|
|
1293
|
-
|
|
1294
1196
|
// HTML Support
|
|
1295
1197
|
|
|
1296
1198
|
const HTMLParser =
|
|
@@ -224,9 +224,9 @@ X3DExternProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoD
|
|
|
224
224
|
toVRMLStreamUserDefinedField: function (generator, field, fieldTypeLength, accessTypeLength)
|
|
225
225
|
{
|
|
226
226
|
generator .string += generator .Indent ();
|
|
227
|
-
generator .string += generator .
|
|
227
|
+
generator .string += generator .AccessType (field .getAccessType ()) .padEnd (accessTypeLength, " ");
|
|
228
228
|
generator .string += generator .Space ();
|
|
229
|
-
generator .string +=
|
|
229
|
+
generator .string += field .getTypeName () .padEnd (fieldTypeLength, " ");
|
|
230
230
|
generator .string += generator .Space ();
|
|
231
231
|
generator .string += field .getName ();
|
|
232
232
|
},
|
|
@@ -164,9 +164,9 @@ X3DProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoDeclara
|
|
|
164
164
|
toVRMLStreamUserDefinedField: function (generator, field, fieldTypeLength, accessTypeLength)
|
|
165
165
|
{
|
|
166
166
|
generator .string += generator .Indent ();
|
|
167
|
-
generator .string += generator .
|
|
167
|
+
generator .string += generator .AccessType (field .getAccessType ()) .padEnd (accessTypeLength, " ");
|
|
168
168
|
generator .string += generator .Space ();
|
|
169
|
-
generator .string +=
|
|
169
|
+
generator .string += field .getTypeName () .padEnd (fieldTypeLength, " ");
|
|
170
170
|
generator .string += generator .Space ();
|
|
171
171
|
generator .string += field .getName ();
|
|
172
172
|
|
|
@@ -513,7 +513,7 @@ X3DProtoDeclaration .prototype = Object .assign (Object .create (X3DProtoDeclara
|
|
|
513
513
|
|
|
514
514
|
this [_body] .toJSONStream (generator);
|
|
515
515
|
|
|
516
|
-
generator .
|
|
516
|
+
generator .JSONRemoveComma ();
|
|
517
517
|
|
|
518
518
|
generator .string += generator .DecIndent ();
|
|
519
519
|
generator .string += generator .Indent ();
|
|
@@ -119,7 +119,7 @@ DependentRenderer .prototype = Object .assign (Object .create (X3DBaseNode .prot
|
|
|
119
119
|
X3DRenderObject .prototype .render .call (this, type, callback, group);
|
|
120
120
|
|
|
121
121
|
for (const light of this .renderObject .getLights ())
|
|
122
|
-
light .
|
|
122
|
+
light .modelViewMatrix .pop ();
|
|
123
123
|
|
|
124
124
|
break;
|
|
125
125
|
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/*******************************************************************************
|
|
2
|
+
*
|
|
3
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4
|
+
*
|
|
5
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
6
|
+
*
|
|
7
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
8
|
+
*
|
|
9
|
+
* The copyright notice above does not evidence any actual of intended
|
|
10
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
11
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
12
|
+
* create3000.
|
|
13
|
+
*
|
|
14
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
15
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
16
|
+
* permission of create3000.
|
|
17
|
+
*
|
|
18
|
+
* NON-MILITARY USE ONLY
|
|
19
|
+
*
|
|
20
|
+
* All create3000 software are effectively free software with a non-military use
|
|
21
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
22
|
+
* source in any way you please with the exception anything that uses it must be
|
|
23
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
24
|
+
*
|
|
25
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
26
|
+
*
|
|
27
|
+
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
28
|
+
*
|
|
29
|
+
* This file is part of the X_ITE Project.
|
|
30
|
+
*
|
|
31
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
32
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
33
|
+
* Free Software Foundation.
|
|
34
|
+
*
|
|
35
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
36
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
37
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
38
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
39
|
+
*
|
|
40
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
41
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
42
|
+
* copy of the GPLv3 License.
|
|
43
|
+
*
|
|
44
|
+
* For Silvio, Joy and Adi.
|
|
45
|
+
*
|
|
46
|
+
******************************************************************************/
|
|
47
|
+
|
|
48
|
+
function MultiSampleFrameBuffer (browser, width, height, samples)
|
|
49
|
+
{
|
|
50
|
+
const gl = browser .getContext ();
|
|
51
|
+
|
|
52
|
+
if (gl .getVersion () === 1 || width === 0 || height === 0)
|
|
53
|
+
return Fallback;
|
|
54
|
+
|
|
55
|
+
this .browser = browser;
|
|
56
|
+
this .width = width;
|
|
57
|
+
this .height = height;
|
|
58
|
+
this .samples = Math .min (samples, gl .getParameter (gl .MAX_SAMPLES));
|
|
59
|
+
|
|
60
|
+
this .lastBuffer = gl .getParameter (gl .FRAMEBUFFER_BINDING);
|
|
61
|
+
this .framebuffer = gl .createFramebuffer ();
|
|
62
|
+
|
|
63
|
+
this .colorRenderbuffer = gl .createRenderbuffer ();
|
|
64
|
+
|
|
65
|
+
gl .bindRenderbuffer (gl .RENDERBUFFER, this .colorRenderbuffer);
|
|
66
|
+
gl .renderbufferStorageMultisample (gl .RENDERBUFFER, this .samples, gl .RGBA8, this .width, this .height);
|
|
67
|
+
|
|
68
|
+
this .depthRenderbuffer = gl .createRenderbuffer ();
|
|
69
|
+
|
|
70
|
+
gl .bindRenderbuffer (gl .RENDERBUFFER, this .depthRenderbuffer);
|
|
71
|
+
gl .renderbufferStorageMultisample (gl .RENDERBUFFER, this .samples, gl .DEPTH_COMPONENT24, this .width, this .height);
|
|
72
|
+
|
|
73
|
+
gl .bindFramebuffer (gl .FRAMEBUFFER, this .framebuffer);
|
|
74
|
+
gl .framebufferRenderbuffer (gl .FRAMEBUFFER, gl .COLOR_ATTACHMENT0, gl .RENDERBUFFER, this .colorRenderbuffer);
|
|
75
|
+
gl .framebufferRenderbuffer (gl .FRAMEBUFFER, gl .DEPTH_ATTACHMENT, gl .RENDERBUFFER, this .depthRenderbuffer);
|
|
76
|
+
|
|
77
|
+
gl .bindFramebuffer (gl .FRAMEBUFFER, this .lastBuffer);
|
|
78
|
+
|
|
79
|
+
// Always check that our framebuffer is ok.
|
|
80
|
+
|
|
81
|
+
if (gl .checkFramebufferStatus (gl .FRAMEBUFFER) === gl .FRAMEBUFFER_COMPLETE)
|
|
82
|
+
return;
|
|
83
|
+
|
|
84
|
+
throw new Error ("Couldn't create frame buffer.");
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
MultiSampleFrameBuffer .prototype =
|
|
88
|
+
{
|
|
89
|
+
constructor: MultiSampleFrameBuffer,
|
|
90
|
+
getWidth: function ()
|
|
91
|
+
{
|
|
92
|
+
return this .width;
|
|
93
|
+
},
|
|
94
|
+
getHeight: function ()
|
|
95
|
+
{
|
|
96
|
+
return this .height;
|
|
97
|
+
},
|
|
98
|
+
getSamples: function ()
|
|
99
|
+
{
|
|
100
|
+
return this .samples;
|
|
101
|
+
},
|
|
102
|
+
bind: function ()
|
|
103
|
+
{
|
|
104
|
+
const gl = this .browser .getContext ();
|
|
105
|
+
|
|
106
|
+
this .lastBuffer = gl .getParameter (gl .FRAMEBUFFER_BINDING);
|
|
107
|
+
|
|
108
|
+
gl .bindFramebuffer (gl .FRAMEBUFFER, this .framebuffer);
|
|
109
|
+
},
|
|
110
|
+
unbind: function ()
|
|
111
|
+
{
|
|
112
|
+
const gl = this .browser .getContext ();
|
|
113
|
+
|
|
114
|
+
gl .bindFramebuffer (gl .FRAMEBUFFER, this .lastBuffer);
|
|
115
|
+
},
|
|
116
|
+
blit: function ()
|
|
117
|
+
{
|
|
118
|
+
const gl = this .browser .getContext ();
|
|
119
|
+
|
|
120
|
+
gl .viewport (0, 0, this .width, this .height);
|
|
121
|
+
gl .scissor (0, 0, this .width, this .height);
|
|
122
|
+
|
|
123
|
+
gl .bindFramebuffer (gl .READ_FRAMEBUFFER, this .framebuffer);
|
|
124
|
+
gl .bindFramebuffer (gl .DRAW_FRAMEBUFFER, null);
|
|
125
|
+
|
|
126
|
+
gl .blitFramebuffer (0, 0, this .width, this .height,
|
|
127
|
+
0, 0, this .width, this .height,
|
|
128
|
+
gl .COLOR_BUFFER_BIT, gl .LINEAR);
|
|
129
|
+
},
|
|
130
|
+
dispose: function ()
|
|
131
|
+
{
|
|
132
|
+
const gl = this .browser .getContext ();
|
|
133
|
+
|
|
134
|
+
gl .deleteFramebuffer (this .framebuffer);
|
|
135
|
+
gl .deleteRenderbuffer (this .colorRenderbuffer);
|
|
136
|
+
gl .deleteRenderbuffer (this .depthRenderbuffer);
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const Fallback = {
|
|
141
|
+
getWidth: Function .prototype,
|
|
142
|
+
getHeight: Function .prototype,
|
|
143
|
+
getSamples: Function .prototype,
|
|
144
|
+
bind: Function .prototype,
|
|
145
|
+
unbind: Function .prototype,
|
|
146
|
+
blit: Function .prototype,
|
|
147
|
+
dispose: Function .prototype,
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default MultiSampleFrameBuffer;
|
|
@@ -105,14 +105,12 @@ function TextureBuffer (browser, width, height)
|
|
|
105
105
|
gl .framebufferRenderbuffer (gl .FRAMEBUFFER, gl .DEPTH_ATTACHMENT, gl .RENDERBUFFER, this .depthBuffer);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
-
// Always check that our framebuffer is ok.
|
|
109
|
-
|
|
110
|
-
const complete = gl .checkFramebufferStatus (gl .FRAMEBUFFER) === gl .FRAMEBUFFER_COMPLETE;
|
|
111
|
-
|
|
112
108
|
gl .bindTexture (gl .TEXTURE_2D, null);
|
|
113
109
|
gl .bindFramebuffer (gl .FRAMEBUFFER, this .lastBuffer);
|
|
114
110
|
|
|
115
|
-
|
|
111
|
+
// Always check that our framebuffer is ok.
|
|
112
|
+
|
|
113
|
+
if (gl .checkFramebufferStatus (gl .FRAMEBUFFER) === gl .FRAMEBUFFER_COMPLETE)
|
|
116
114
|
return;
|
|
117
115
|
|
|
118
116
|
throw new Error ("Couldn't create frame buffer.");
|
|
@@ -82,7 +82,6 @@ function X3DRenderObject (executionContext)
|
|
|
82
82
|
this .localShadows = [ false ];
|
|
83
83
|
this .localFogs = [ null ];
|
|
84
84
|
this .layouts = [ ];
|
|
85
|
-
this .jointNodes = [ ];
|
|
86
85
|
this .textureProjectors = [ ];
|
|
87
86
|
this .generatedCubeMapTextures = [ ];
|
|
88
87
|
this .collisions = [ ];
|
|
@@ -220,10 +219,6 @@ X3DRenderObject .prototype =
|
|
|
220
219
|
{
|
|
221
220
|
return this .layouts;
|
|
222
221
|
},
|
|
223
|
-
getJoints: function ()
|
|
224
|
-
{
|
|
225
|
-
return this .jointNodes;
|
|
226
|
-
},
|
|
227
222
|
getParentLayout: function ()
|
|
228
223
|
{
|
|
229
224
|
return this .layouts .at (-1);
|
|
@@ -842,8 +837,8 @@ X3DRenderObject .prototype =
|
|
|
842
837
|
globalShadows = this .globalShadows,
|
|
843
838
|
shadows = globalShadows .at (-1),
|
|
844
839
|
headlight = this .getNavigationInfo () ._headlight .getValue (),
|
|
845
|
-
numGlobalLights = globalObjects .reduce ((
|
|
846
|
-
numGlobalTextureProjectors = globalObjects .reduce ((
|
|
840
|
+
numGlobalLights = globalObjects .reduce ((n, c) => n + !!c .lightNode, 0),
|
|
841
|
+
numGlobalTextureProjectors = globalObjects .reduce ((n, c) => n + !!c .textureProjectorNode, 0);
|
|
847
842
|
|
|
848
843
|
|
|
849
844
|
this .renderTime = Date .now ();
|
package/src/x_ite/X3D.js
CHANGED
|
@@ -73,6 +73,7 @@ import X3DConstants from "./Base/X3DConstants.js";
|
|
|
73
73
|
import Fallback from "./Fallback.js";
|
|
74
74
|
import MicroTime from "../standard/Time/MicroTime.js";
|
|
75
75
|
import jQuery from "../lib/jquery.js";
|
|
76
|
+
import libtess from "../lib/libtess.js";
|
|
76
77
|
|
|
77
78
|
const
|
|
78
79
|
callbacks = $.Deferred (),
|
package/src/x_ite/X3DCanvas.js
CHANGED
|
@@ -87,6 +87,16 @@ class X3DCanvas extends HTMLElement
|
|
|
87
87
|
static get observedAttributes ()
|
|
88
88
|
{
|
|
89
89
|
return [
|
|
90
|
+
"antialiased",
|
|
91
|
+
"cache",
|
|
92
|
+
"contentScale",
|
|
93
|
+
"contentscale",
|
|
94
|
+
"contextMenu",
|
|
95
|
+
"contextmenu",
|
|
96
|
+
"debug",
|
|
97
|
+
"multisampling",
|
|
98
|
+
"notifications",
|
|
99
|
+
"splashScreen",
|
|
90
100
|
"splashscreen",
|
|
91
101
|
"src",
|
|
92
102
|
"url",
|
package/src/x_ite.html
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<script src="../node_modules/css-element-queries/src/ResizeSensor.js"></script>
|
|
12
12
|
<script src="../node_modules/pako/dist/pako_inflate.js"></script>
|
|
13
13
|
<script src="../node_modules/libtess/libtess.cat.js"></script>
|
|
14
|
+
<script src="lib/libgif/libgif.js"></script>
|
|
14
15
|
<!-- Text -->
|
|
15
16
|
<script src="../node_modules/opentype.js/dist/opentype.js"></script>
|
|
16
17
|
<!-- Texturing3D -->
|
|
@@ -37,15 +38,43 @@ X3D (function ()
|
|
|
37
38
|
Browser = X3D .getBrowser (),
|
|
38
39
|
localStorage = Browser .getLocalStorage ();
|
|
39
40
|
|
|
40
|
-
Browser .getContextMenu () .setUserMenu (
|
|
41
|
+
Browser .getContextMenu () .setUserMenu (function ()
|
|
42
|
+
{
|
|
43
|
+
function antialiasing (antialiased, contentScale, imageRendering)
|
|
44
|
+
{
|
|
45
|
+
$("#browser")
|
|
46
|
+
.attr ("antialiased", antialiased)
|
|
47
|
+
.attr ("contentScale", contentScale)
|
|
48
|
+
.css ("image-rendering", imageRendering);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
... (typeof createTestMenu !== "undefined" ? createTestMenu () : { }),
|
|
53
|
+
"antialiasing": {
|
|
54
|
+
"name": "Antialiasing",
|
|
55
|
+
"items": {
|
|
56
|
+
"default": {
|
|
57
|
+
"name": "Default",
|
|
58
|
+
"callback": antialiasing .bind (this, null, null, ""),
|
|
59
|
+
},
|
|
60
|
+
"auto": {
|
|
61
|
+
"name": "Auto",
|
|
62
|
+
"callback": antialiasing .bind (this, true, "auto", ""),
|
|
63
|
+
},
|
|
64
|
+
"pixelated": {
|
|
65
|
+
"name": "Pixelated",
|
|
66
|
+
"callback": antialiasing .bind (this, false, 0.1, "pixelated"),
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
};
|
|
71
|
+
});
|
|
41
72
|
|
|
42
73
|
localStorage .addDefaultValues ({
|
|
43
74
|
"Bookmarks.history": ["https://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage/ButanedioicAcid.x3d"],
|
|
44
75
|
});
|
|
45
76
|
|
|
46
|
-
let
|
|
47
|
-
loadTime = 0,
|
|
48
|
-
index = localStorage ["Bookmarks.history"] .length - 1;
|
|
77
|
+
let index = localStorage ["Bookmarks.history"] .length - 1;
|
|
49
78
|
|
|
50
79
|
function loadURL (url)
|
|
51
80
|
{
|
|
@@ -66,11 +95,7 @@ X3D (function ()
|
|
|
66
95
|
|
|
67
96
|
$(".file") .removeClass ("loaded");
|
|
68
97
|
|
|
69
|
-
loadTime = performance .now ();
|
|
70
|
-
|
|
71
98
|
bookmarks .loadURL (url);
|
|
72
|
-
|
|
73
|
-
return false;
|
|
74
99
|
}
|
|
75
100
|
|
|
76
101
|
function toVRMLString ()
|
|
@@ -94,15 +119,12 @@ X3D (function ()
|
|
|
94
119
|
loadURL (localStorage ["Bookmarks.url"] || "https://create3000.github.io/media/x_ite/info/info.x3d");
|
|
95
120
|
|
|
96
121
|
$(".version") .text (Browser .name + " v" + Browser .version);
|
|
97
|
-
$(".browser") .on ("initialized", () => $(".console") .empty ());
|
|
98
|
-
$(".browser") .on ("initialized", () => Browser .println ("Scene loaded in " + ((performance .now () - loadTime) / 1000) .toFixed (3) + " s."));
|
|
99
|
-
$(".browser") .on ("initialized", () => localStorage ["Bookmarks.url"] = Browser .getWorldURL ());
|
|
100
|
-
$(".browser") .on ("shutdown", () => Browser .println ("Shutdown at " + new Date () .toUTCString () + "."));
|
|
101
122
|
$(".location-entry") .val (localStorage ["Bookmarks.history"] [index])
|
|
102
123
|
$(".location-go") .on ("click", () => loadURL ($(".location-entry") .val ()));
|
|
103
124
|
$(".print-vrml") .on ("click", toVRMLString);
|
|
104
125
|
$(".print-xml") .on ("click", toXMLString);
|
|
105
126
|
$(".print-json") .on ("click", toJSONString);
|
|
127
|
+
$("#browser") .on ("initialized", () => localStorage ["Bookmarks.url"] = Browser .getWorldURL ());
|
|
106
128
|
|
|
107
129
|
$(".location-entry") .keydown (event =>
|
|
108
130
|
{
|
|
@@ -200,8 +222,9 @@ main.color-management .browser {
|
|
|
200
222
|
.browser {
|
|
201
223
|
display: block;
|
|
202
224
|
margin: 10px 0px;
|
|
225
|
+
aspect-ratio: 16 / 9;
|
|
203
226
|
width: 100%;
|
|
204
|
-
height:
|
|
227
|
+
height: auto;
|
|
205
228
|
box-shadow: 0px 2px 12px 1px rgba(0, 0, 0, 0.75);
|
|
206
229
|
}
|
|
207
230
|
|
|
@@ -371,7 +394,7 @@ main.color-management .browser {
|
|
|
371
394
|
<main>
|
|
372
395
|
<div>
|
|
373
396
|
<form action="javascript:alert('form submitted')">
|
|
374
|
-
<x3d-canvas id="browser" class="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" onload="$('.file') .addClass ('loaded')" x-url='"tests/
|
|
397
|
+
<x3d-canvas id="browser" class="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" onload="$('.file') .addClass ('loaded')" x-url='"tests/empty.x3dv"'>
|
|
375
398
|
<p class="fallback">
|
|
376
399
|
Sorry,<br/>
|
|
377
400
|
it wasn't me!<br/>
|
|
@@ -387,13 +410,12 @@ main.color-management .browser {
|
|
|
387
410
|
<button class="location-go" type="button">Load URL</button>
|
|
388
411
|
</div>
|
|
389
412
|
<div class="buttons">
|
|
390
|
-
<a class="print-xml" href="#">XML</a><a class="print-vrml" href="#">VRML</a><a class="print-json" href="#">JSON</a><a href="../dist/example.html">
|
|
413
|
+
<a class="print-xml" href="#">XML</a><a class="print-vrml" href="#">VRML</a><a class="print-json" href="#">JSON</a><a href="../dist/example.html">example page</a><a href="tests/d3-x3d/">d3-x3d</a><a href="tests/dom-integration/">dom-integration</a><a href="tests/legacy/">legacy</a>
|
|
391
414
|
</div>
|
|
392
415
|
<div class="links">
|
|
393
416
|
<a href="../x_ite.min.html">x_ite.min.html</a><a href="https://rawgit.com/create3000/x_ite/main/x_ite.min.html">github</a>
|
|
394
417
|
</div>
|
|
395
|
-
<div class="examples-box">
|
|
396
|
-
</div>
|
|
418
|
+
<div class="examples-box"></div>
|
|
397
419
|
</div>
|
|
398
420
|
</main>
|
|
399
421
|
<footer><div class="console x_ite-console"></div></footer>
|
package/webpack.config.js
CHANGED
|
@@ -105,6 +105,7 @@ export default __default__;`;
|
|
|
105
105
|
libtess: "libtess/libtess.cat.js",
|
|
106
106
|
pako: "pako/dist/pako_inflate.js",
|
|
107
107
|
ResizeSensor: "css-element-queries/src/ResizeSensor.js",
|
|
108
|
+
SuperGif: path .resolve (__dirname, "src/lib/libgif/libgif.js"),
|
|
108
109
|
}),
|
|
109
110
|
new WebpackShellPluginNext ({
|
|
110
111
|
logging: false,
|
package/x_ite.min.html
CHANGED
|
@@ -19,15 +19,43 @@ X3D (function ()
|
|
|
19
19
|
Browser = X3D .getBrowser (),
|
|
20
20
|
localStorage = Browser .getLocalStorage ();
|
|
21
21
|
|
|
22
|
-
Browser .getContextMenu () .setUserMenu (
|
|
22
|
+
Browser .getContextMenu () .setUserMenu (function ()
|
|
23
|
+
{
|
|
24
|
+
function antialiasing (antialiased, contentScale, imageRendering)
|
|
25
|
+
{
|
|
26
|
+
$("#browser")
|
|
27
|
+
.attr ("antialiased", antialiased)
|
|
28
|
+
.attr ("contentScale", contentScale)
|
|
29
|
+
.css ("image-rendering", imageRendering);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return {
|
|
33
|
+
... (typeof createTestMenu !== "undefined" ? createTestMenu () : { }),
|
|
34
|
+
"antialiasing": {
|
|
35
|
+
"name": "Antialiasing",
|
|
36
|
+
"items": {
|
|
37
|
+
"default": {
|
|
38
|
+
"name": "Default",
|
|
39
|
+
"callback": antialiasing .bind (this, null, null, ""),
|
|
40
|
+
},
|
|
41
|
+
"auto": {
|
|
42
|
+
"name": "Auto",
|
|
43
|
+
"callback": antialiasing .bind (this, true, "auto", ""),
|
|
44
|
+
},
|
|
45
|
+
"pixelated": {
|
|
46
|
+
"name": "Pixelated",
|
|
47
|
+
"callback": antialiasing .bind (this, false, 0.1, "pixelated"),
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
});
|
|
23
53
|
|
|
24
54
|
localStorage .addDefaultValues ({
|
|
25
55
|
"Bookmarks.history": ["https://www.web3d.org/x3d/content/examples/Basic/ChemicalMarkupLanguage/ButanedioicAcid.x3d"],
|
|
26
56
|
});
|
|
27
57
|
|
|
28
|
-
let
|
|
29
|
-
loadTime = 0,
|
|
30
|
-
index = localStorage ["Bookmarks.history"] .length - 1;
|
|
58
|
+
let index = localStorage ["Bookmarks.history"] .length - 1;
|
|
31
59
|
|
|
32
60
|
function loadURL (url)
|
|
33
61
|
{
|
|
@@ -48,11 +76,7 @@ X3D (function ()
|
|
|
48
76
|
|
|
49
77
|
$(".file") .removeClass ("loaded");
|
|
50
78
|
|
|
51
|
-
loadTime = performance .now ();
|
|
52
|
-
|
|
53
79
|
bookmarks .loadURL (url);
|
|
54
|
-
|
|
55
|
-
return false;
|
|
56
80
|
}
|
|
57
81
|
|
|
58
82
|
function toVRMLString ()
|
|
@@ -76,15 +100,12 @@ X3D (function ()
|
|
|
76
100
|
loadURL (localStorage ["Bookmarks.url"] || "https://create3000.github.io/media/x_ite/info/info.x3d");
|
|
77
101
|
|
|
78
102
|
$(".version") .text (Browser .name + " v" + Browser .version);
|
|
79
|
-
$(".browser") .on ("initialized", () => $(".console") .empty ());
|
|
80
|
-
$(".browser") .on ("initialized", () => Browser .println ("Scene loaded in " + ((performance .now () - loadTime) / 1000) .toFixed (3) + " s."));
|
|
81
|
-
$(".browser") .on ("initialized", () => localStorage ["Bookmarks.url"] = Browser .getWorldURL ());
|
|
82
|
-
$(".browser") .on ("shutdown", () => Browser .println ("Shutdown at " + new Date () .toUTCString () + "."));
|
|
83
103
|
$(".location-entry") .val (localStorage ["Bookmarks.history"] [index])
|
|
84
104
|
$(".location-go") .on ("click", () => loadURL ($(".location-entry") .val ()));
|
|
85
105
|
$(".print-vrml") .on ("click", toVRMLString);
|
|
86
106
|
$(".print-xml") .on ("click", toXMLString);
|
|
87
107
|
$(".print-json") .on ("click", toJSONString);
|
|
108
|
+
$("#browser") .on ("initialized", () => localStorage ["Bookmarks.url"] = Browser .getWorldURL ());
|
|
88
109
|
|
|
89
110
|
$(".location-entry") .keydown (event =>
|
|
90
111
|
{
|
|
@@ -182,8 +203,9 @@ main.color-management .browser {
|
|
|
182
203
|
.browser {
|
|
183
204
|
display: block;
|
|
184
205
|
margin: 10px 0px;
|
|
206
|
+
aspect-ratio: 16 / 9;
|
|
185
207
|
width: 100%;
|
|
186
|
-
height:
|
|
208
|
+
height: auto;
|
|
187
209
|
box-shadow: 0px 2px 12px 1px rgba(0, 0, 0, 0.75);
|
|
188
210
|
}
|
|
189
211
|
|
|
@@ -353,7 +375,7 @@ main.color-management .browser {
|
|
|
353
375
|
<main>
|
|
354
376
|
<div>
|
|
355
377
|
<form action="javascript:alert('form submitted')">
|
|
356
|
-
<x3d-canvas id="browser" class="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" onload="$('.file') .addClass ('loaded')" x-url='"src/tests/
|
|
378
|
+
<x3d-canvas id="browser" class="browser" splashScreen="true" contextMenu="true" cache="false" debug="true" preserveDrawingBuffer="false" onload="$('.file') .addClass ('loaded')" x-url='"src/tests/empty.x3dv"'>
|
|
357
379
|
<p class="fallback">
|
|
358
380
|
Sorry,<br/>
|
|
359
381
|
it wasn't me!<br/>
|
|
@@ -369,13 +391,12 @@ main.color-management .browser {
|
|
|
369
391
|
<button class="location-go" type="button">Load URL</button>
|
|
370
392
|
</div>
|
|
371
393
|
<div class="buttons">
|
|
372
|
-
<a class="print-xml" href="#">XML</a><a class="print-vrml" href="#">VRML</a><a class="print-json" href="#">JSON</a><a href="dist/example.html">
|
|
394
|
+
<a class="print-xml" href="#">XML</a><a class="print-vrml" href="#">VRML</a><a class="print-json" href="#">JSON</a><a href="dist/example.html">example page</a><a href="src/tests/d3-x3d/">d3-x3d</a><a href="src/tests/dom-integration/">dom-integration</a><a href="src/tests/legacy/">legacy</a>
|
|
373
395
|
</div>
|
|
374
396
|
<div class="links min-links">
|
|
375
397
|
<a href="src/x_ite.html">src/x_ite.html</a><a href="https://rawgit.com/create3000/x_ite/main/x_ite.min.html">github</a>
|
|
376
398
|
</div>
|
|
377
|
-
<div class="examples-box">
|
|
378
|
-
</div>
|
|
399
|
+
<div class="examples-box"></div>
|
|
379
400
|
</div>
|
|
380
401
|
</main>
|
|
381
402
|
<footer><div class="console x_ite-console"></div></footer>
|