x_ite 8.7.8 → 8.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Makefile +3 -0
- package/build/bin/version.pl +1 -1
- package/dist/assets/components/Annotation.js +248 -169
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +296 -233
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +217 -172
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +451 -387
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +309 -208
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +397 -333
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +705 -575
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +319 -259
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +134 -99
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +305 -240
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +781 -626
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +632 -460
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +376 -295
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +936 -749
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +173 -103
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +241 -207
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +162 -129
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +485 -384
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +741 -547
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +66 -54
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +61554 -59658
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/package.json +4 -4
- package/src/assets/components/Annotation.js +14 -14
- package/src/assets/components/CADGeometry.js +14 -14
- package/src/assets/components/CubeMapTexturing.js +11 -11
- package/src/assets/components/DIS.js +13 -13
- package/src/assets/components/EventUtilities.js +16 -16
- package/src/assets/components/Geometry2D.js +15 -15
- package/src/assets/components/Geospatial.js +19 -19
- package/src/assets/components/HAnim.js +13 -13
- package/src/assets/components/KeyDeviceSensor.js +10 -10
- package/src/assets/components/Layout.js +13 -13
- package/src/assets/components/NURBS.js +24 -24
- package/src/assets/components/ParticleSystems.js +19 -19
- package/src/assets/components/Picking.js +14 -14
- package/src/assets/components/RigidBodyPhysics.js +24 -24
- package/src/assets/components/Scripting.js +9 -9
- package/src/assets/components/Text.js +10 -10
- package/src/assets/components/TextureProjector.js +10 -10
- package/src/assets/components/Texturing3D.js +16 -16
- package/src/assets/components/VolumeRendering.js +23 -23
- package/src/assets/components/X_ITE.js +8 -7
- package/src/assets/shaders/webgl1/include/Shadow.glsl.js +21 -25
- package/src/assets/shaders/webgl2/include/Shadow.glsl.js +23 -27
- package/src/bookmarks.js +2 -2
- package/src/lib/jquery.js +42 -30
- package/src/standard/Geospatial/Geodetic.js +8 -9
- package/src/standard/Geospatial/UniversalTransverseMercator.js +4 -5
- package/src/standard/Math/Algorithm.js +41 -56
- package/src/standard/Math/Algorithms/Bezier.js +2 -2
- package/src/standard/Math/Algorithms/MergeSort.js +6 -6
- package/src/standard/Math/Algorithms/PartialSort.js +5 -5
- package/src/standard/Math/Algorithms/QuickSort.js +5 -5
- package/src/standard/Math/Geometry/Box2.js +16 -17
- package/src/standard/Math/Geometry/Box3.js +18 -19
- package/src/standard/Math/Geometry/Camera.js +6 -5
- package/src/standard/Math/Geometry/Cylinder3.js +6 -7
- package/src/standard/Math/Geometry/Line2.js +20 -18
- package/src/standard/Math/Geometry/Line3.js +20 -18
- package/src/standard/Math/Geometry/Plane3.js +11 -12
- package/src/standard/Math/Geometry/Sphere3.js +6 -7
- package/src/standard/Math/Geometry/Spheroid3.js +6 -7
- package/src/standard/Math/Geometry/Triangle2.js +4 -3
- package/src/standard/Math/Geometry/Triangle3.js +5 -4
- package/src/standard/Math/Geometry/ViewVolume.js +6 -7
- package/src/standard/Math/Numbers/Color3.js +18 -19
- package/src/standard/Math/Numbers/Color4.js +20 -21
- package/src/standard/Math/Numbers/Complex.js +28 -29
- package/src/standard/Math/Numbers/Matrix2.js +22 -23
- package/src/standard/Math/Numbers/Matrix3.js +28 -29
- package/src/standard/Math/Numbers/Matrix4.js +29 -30
- package/src/standard/Math/Numbers/Quaternion.js +40 -41
- package/src/standard/Math/Numbers/Rotation4.js +34 -35
- package/src/standard/Math/Numbers/Vector2.js +29 -30
- package/src/standard/Math/Numbers/Vector3.js +32 -33
- package/src/standard/Math/Numbers/Vector4.js +34 -35
- package/src/standard/Math/Utility/BVH.js +14 -15
- package/src/standard/Math/Utility/MatrixStack.js +12 -12
- package/src/standard/Time/MicroTime.js +4 -3
- package/src/standard/Utility/BitSet.js +10 -11
- package/src/standard/Utility/DataStorage.js +10 -10
- package/src/standard/Utility/MapUtilities.js +2 -1
- package/src/standard/Utility/ObjectCache.js +3 -3
- package/src/tests.js +10 -0
- package/src/x_ite/Base/Events.js +3 -3
- package/src/x_ite/Base/FieldArray.js +11 -9
- package/src/x_ite/Base/FieldDefinitionArray.js +11 -9
- package/src/x_ite/Base/X3DArrayField.js +13 -14
- package/src/x_ite/Base/X3DBaseNode.js +219 -181
- package/src/x_ite/Base/X3DCast.js +1 -1
- package/src/x_ite/Base/X3DChildObject.js +162 -53
- package/src/x_ite/Base/X3DConstants.js +74 -60
- package/src/x_ite/Base/X3DEventObject.js +6 -12
- package/src/x_ite/Base/X3DField.js +45 -42
- package/src/x_ite/Base/X3DFieldDefinition.js +9 -7
- package/src/x_ite/Base/X3DInfoArray.js +75 -65
- package/src/x_ite/Base/X3DObject.js +59 -29
- package/src/x_ite/Base/X3DObjectArrayField.js +51 -117
- package/src/x_ite/Base/X3DTypedArrayField.js +48 -42
- package/src/x_ite/Browser/Core/BrowserOptions.js +55 -57
- package/src/x_ite/Browser/Core/BrowserProperties.js +18 -20
- package/src/x_ite/Browser/Core/BrowserTimings.js +29 -33
- package/src/x_ite/Browser/Core/Context.js +7 -7
- package/src/x_ite/Browser/Core/ContextMenu.js +61 -83
- package/src/x_ite/Browser/Core/Notification.js +12 -12
- package/src/x_ite/Browser/Core/RenderingProperties.js +28 -28
- package/src/x_ite/Browser/Core/X3DCoreContext.js +45 -37
- package/src/x_ite/Browser/DOMIntegration.js +4 -1
- package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +3 -3
- package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +1 -1
- package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +12 -12
- package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +8 -14
- package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +8 -14
- package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +13 -17
- package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +15 -19
- package/src/x_ite/Browser/Geometry2D/Rectangle2DOptions.js +12 -16
- package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +9 -9
- package/src/x_ite/Browser/Geometry3D/BoxOptions.js +12 -16
- package/src/x_ite/Browser/Geometry3D/ConeOptions.js +6 -12
- package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +6 -12
- package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +13 -17
- package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +17 -21
- package/src/x_ite/Browser/Geometry3D/X3DGeometry3DContext.js +8 -8
- package/src/x_ite/Browser/Geospatial/Geocentric.js +5 -6
- package/src/x_ite/Browser/Geospatial/Geospatial.js +10 -10
- package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +3 -3
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator.js +2 -3
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1.js +8 -9
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +7 -8
- package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +3 -4
- package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +8 -8
- package/src/x_ite/Browser/Layering/X3DLayeringContext.js +4 -4
- package/src/x_ite/Browser/Layout/ScreenText.js +7 -8
- package/src/x_ite/Browser/Layout/X3DLayoutContext.js +3 -3
- package/src/x_ite/Browser/Legacy.js +32 -12
- package/src/x_ite/Browser/Lighting/X3DLightingContext.js +5 -5
- package/src/x_ite/Browser/NURBS/NURBS.js +10 -10
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +32 -20
- package/src/x_ite/Browser/Navigation/FlyViewer.js +22 -10
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +29 -17
- package/src/x_ite/Browser/Navigation/NoneViewer.js +15 -5
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +24 -12
- package/src/x_ite/Browser/Navigation/WalkViewer.js +22 -10
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +17 -18
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +19 -19
- package/src/x_ite/Browser/Navigation/X3DViewer.js +13 -19
- package/src/x_ite/Browser/Networking/URLs.js +5 -5
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +16 -16
- package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +3 -3
- package/src/x_ite/Browser/Picking/VolumePicker.js +8 -8
- package/src/x_ite/Browser/Picking/X3DPickingContext.js +12 -12
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +24 -20
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer.js +6 -6
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +21 -21
- package/src/x_ite/Browser/Rendering/GeometryContext.js +4 -5
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +18 -18
- package/src/x_ite/Browser/Scripting/X3DScriptingContext.js +4 -4
- package/src/x_ite/Browser/Shaders/ShaderCompiler.js +4 -4
- package/src/x_ite/Browser/Shaders/ShaderSource.js +1 -1
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +13 -13
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +12 -12
- package/src/x_ite/Browser/Sound/X3DSoundContext.js +0 -2
- package/src/x_ite/Browser/Text/PolygonText.js +10 -11
- package/src/x_ite/Browser/Text/X3DTextContext.js +6 -6
- package/src/x_ite/Browser/Text/X3DTextGeometry.js +18 -19
- package/src/x_ite/Browser/Texturing/GifMedia.js +7 -7
- package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +24 -24
- package/src/x_ite/Browser/Texturing3D/DICOMParser.js +38 -38
- package/src/x_ite/Browser/Texturing3D/NRRDParser.js +14 -14
- package/src/x_ite/Browser/Time/X3DTimeContext.js +5 -5
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/VolumeMaterial.js +39 -22
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +6 -6
- package/src/x_ite/Browser/X3DBrowser.js +170 -136
- package/src/x_ite/Browser/X3DBrowserContext.js +23 -24
- package/src/x_ite/Components/Annotation/AnnotationLayer.js +30 -19
- package/src/x_ite/Components/Annotation/AnnotationTarget.js +30 -19
- package/src/x_ite/Components/Annotation/GroupAnnotation.js +40 -29
- package/src/x_ite/Components/Annotation/IconAnnotation.js +38 -27
- package/src/x_ite/Components/Annotation/TextAnnotation.js +31 -20
- package/src/x_ite/Components/Annotation/URLAnnotation.js +30 -19
- package/src/x_ite/Components/Annotation/X3DAnnotationNode.js +16 -3
- package/src/x_ite/Components/CADGeometry/CADAssembly.js +32 -21
- package/src/x_ite/Components/CADGeometry/CADFace.js +48 -37
- package/src/x_ite/Components/CADGeometry/CADLayer.js +30 -21
- package/src/x_ite/Components/CADGeometry/CADPart.js +37 -26
- package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +51 -46
- package/src/x_ite/Components/CADGeometry/QuadSet.js +48 -43
- package/src/x_ite/Components/CADGeometry/X3DProductStructureChildNode.js +13 -2
- package/src/x_ite/Components/Core/MetadataBoolean.js +33 -22
- package/src/x_ite/Components/Core/MetadataDouble.js +33 -22
- package/src/x_ite/Components/Core/MetadataFloat.js +33 -22
- package/src/x_ite/Components/Core/MetadataInteger.js +33 -22
- package/src/x_ite/Components/Core/MetadataSet.js +33 -22
- package/src/x_ite/Components/Core/MetadataString.js +33 -22
- package/src/x_ite/Components/Core/WorldInfo.js +34 -23
- package/src/x_ite/Components/Core/X3DBindableNode.js +17 -4
- package/src/x_ite/Components/Core/X3DChildNode.js +19 -6
- package/src/x_ite/Components/Core/X3DInfoNode.js +13 -2
- package/src/x_ite/Components/Core/X3DMetadataObject.js +18 -5
- package/src/x_ite/Components/Core/X3DNode.js +66 -34
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +68 -77
- package/src/x_ite/Components/Core/X3DSensorNode.js +13 -2
- package/src/x_ite/Components/Core.js +22 -29
- package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +46 -35
- package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +39 -28
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +47 -36
- package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +21 -8
- package/src/x_ite/Components/DIS/DISEntityManager.js +29 -20
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +41 -30
- package/src/x_ite/Components/DIS/EspduTransform.js +117 -106
- package/src/x_ite/Components/DIS/ReceiverPdu.js +60 -49
- package/src/x_ite/Components/DIS/SignalPdu.js +60 -49
- package/src/x_ite/Components/DIS/TransmitterPdu.js +76 -65
- package/src/x_ite/Components/EnvironmentalEffects/Background.js +47 -36
- package/src/x_ite/Components/EnvironmentalEffects/Fog.js +42 -31
- package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +39 -28
- package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +40 -29
- package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +48 -37
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +28 -15
- package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +30 -18
- package/src/x_ite/Components/EnvironmentalEffects.js +15 -22
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +45 -34
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +50 -39
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +41 -30
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +22 -9
- package/src/x_ite/Components/EnvironmentalSensor.js +12 -19
- package/src/x_ite/Components/EventUtilities/BooleanFilter.js +38 -27
- package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +38 -27
- package/src/x_ite/Components/EventUtilities/BooleanToggle.js +33 -22
- package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +32 -21
- package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +38 -27
- package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +33 -22
- package/src/x_ite/Components/EventUtilities/TimeTrigger.js +32 -21
- package/src/x_ite/Components/EventUtilities/X3DSequencerNode.js +20 -7
- package/src/x_ite/Components/EventUtilities/X3DTriggerNode.js +13 -2
- package/src/x_ite/Components/Followers/ColorChaser.js +47 -36
- package/src/x_ite/Components/Followers/ColorDamper.js +49 -38
- package/src/x_ite/Components/Followers/CoordinateChaser.js +33 -22
- package/src/x_ite/Components/Followers/CoordinateDamper.js +35 -24
- package/src/x_ite/Components/Followers/OrientationChaser.js +43 -32
- package/src/x_ite/Components/Followers/OrientationDamper.js +41 -30
- package/src/x_ite/Components/Followers/PositionChaser.js +33 -22
- package/src/x_ite/Components/Followers/PositionChaser2D.js +33 -22
- package/src/x_ite/Components/Followers/PositionDamper.js +35 -24
- package/src/x_ite/Components/Followers/PositionDamper2D.js +35 -24
- package/src/x_ite/Components/Followers/ScalarChaser.js +47 -36
- package/src/x_ite/Components/Followers/ScalarDamper.js +43 -32
- package/src/x_ite/Components/Followers/TexCoordChaser2D.js +33 -22
- package/src/x_ite/Components/Followers/TexCoordDamper2D.js +35 -24
- package/src/x_ite/Components/Followers/X3DChaserNode.js +27 -14
- package/src/x_ite/Components/Followers/X3DDamperNode.js +22 -9
- package/src/x_ite/Components/Followers/X3DFollowerNode.js +29 -16
- package/src/x_ite/Components/Followers.js +25 -32
- package/src/x_ite/Components/Geometry2D/Arc2D.js +38 -27
- package/src/x_ite/Components/Geometry2D/ArcClose2D.js +39 -28
- package/src/x_ite/Components/Geometry2D/Circle2D.js +35 -24
- package/src/x_ite/Components/Geometry2D/Disk2D.js +40 -29
- package/src/x_ite/Components/Geometry2D/Polyline2D.js +34 -23
- package/src/x_ite/Components/Geometry2D/Polypoint2D.js +34 -23
- package/src/x_ite/Components/Geometry2D/Rectangle2D.js +34 -23
- package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +36 -25
- package/src/x_ite/Components/Geometry3D/Box.js +34 -23
- package/src/x_ite/Components/Geometry3D/Cone.js +40 -29
- package/src/x_ite/Components/Geometry3D/Cylinder.js +41 -30
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +63 -52
- package/src/x_ite/Components/Geometry3D/Extrusion.js +49 -38
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +98 -95
- package/src/x_ite/Components/Geometry3D/Sphere.js +36 -25
- package/src/x_ite/Components/Geometry3D.js +15 -22
- package/src/x_ite/Components/Geospatial/GeoCoordinate.js +37 -26
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +63 -52
- package/src/x_ite/Components/Geospatial/GeoLOD.js +59 -48
- package/src/x_ite/Components/Geospatial/GeoLocation.js +45 -34
- package/src/x_ite/Components/Geospatial/GeoMetadata.js +38 -27
- package/src/x_ite/Components/Geospatial/GeoOrigin.js +37 -26
- package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +43 -32
- package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +48 -37
- package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +45 -34
- package/src/x_ite/Components/Geospatial/GeoTransform.js +49 -38
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +56 -45
- package/src/x_ite/Components/Geospatial/X3DGeospatialObject.js +30 -17
- package/src/x_ite/Components/Grouping/Group.js +29 -20
- package/src/x_ite/Components/Grouping/StaticGroup.js +40 -48
- package/src/x_ite/Components/Grouping/Switch.js +51 -40
- package/src/x_ite/Components/Grouping/Transform.js +34 -25
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +22 -9
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +224 -221
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +20 -7
- package/src/x_ite/Components/Grouping/X3DTransformNode.js +17 -4
- package/src/x_ite/Components/Grouping.js +16 -23
- package/src/x_ite/Components/HAnim/HAnimDisplacer.js +27 -18
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +73 -62
- package/src/x_ite/Components/HAnim/HAnimJoint.js +61 -50
- package/src/x_ite/Components/HAnim/HAnimMotion.js +44 -33
- package/src/x_ite/Components/HAnim/HAnimSegment.js +36 -27
- package/src/x_ite/Components/HAnim/HAnimSite.js +36 -27
- package/src/x_ite/Components/Interpolation/ColorInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +38 -27
- package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +39 -28
- package/src/x_ite/Components/Interpolation/NormalInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/PositionInterpolator.js +38 -27
- package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +38 -27
- package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +39 -28
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +44 -33
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +44 -33
- package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +44 -33
- package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +40 -29
- package/src/x_ite/Components/Interpolation/X3DInterpolatorNode.js +21 -8
- package/src/x_ite/Components/Interpolation.js +22 -29
- package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +44 -33
- package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +38 -27
- package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +23 -10
- package/src/x_ite/Components/Layering/Layer.js +40 -29
- package/src/x_ite/Components/Layering/LayerSet.js +44 -33
- package/src/x_ite/Components/Layering/Viewport.js +48 -37
- package/src/x_ite/Components/Layering/X3DLayerNode.js +45 -32
- package/src/x_ite/Components/Layering/X3DViewportNode.js +13 -2
- package/src/x_ite/Components/Layering.js +13 -20
- package/src/x_ite/Components/Layout/Layout.js +60 -49
- package/src/x_ite/Components/Layout/LayoutGroup.js +48 -37
- package/src/x_ite/Components/Layout/LayoutLayer.js +41 -30
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +41 -30
- package/src/x_ite/Components/Layout/ScreenGroup.js +42 -31
- package/src/x_ite/Components/Layout/X3DLayoutNode.js +13 -2
- package/src/x_ite/Components/Lighting/DirectionalLight.js +45 -35
- package/src/x_ite/Components/Lighting/EnvironmentLight.js +51 -41
- package/src/x_ite/Components/Lighting/PointLight.js +53 -43
- package/src/x_ite/Components/Lighting/SpotLight.js +62 -52
- package/src/x_ite/Components/Lighting/X3DLightNode.js +29 -16
- package/src/x_ite/Components/Lighting.js +13 -20
- package/src/x_ite/Components/NURBS/Contour2D.js +45 -45
- package/src/x_ite/Components/NURBS/ContourPolyline2D.js +34 -23
- package/src/x_ite/Components/NURBS/CoordinateDouble.js +23 -14
- package/src/x_ite/Components/NURBS/NurbsCurve.js +47 -36
- package/src/x_ite/Components/NURBS/NurbsCurve2D.js +44 -33
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +46 -35
- package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +36 -27
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +46 -35
- package/src/x_ite/Components/NURBS/NurbsSet.js +52 -52
- package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +44 -33
- package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +40 -29
- package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +40 -29
- package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +43 -32
- package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +59 -59
- package/src/x_ite/Components/NURBS/X3DNurbsControlCurveNode.js +13 -2
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +30 -17
- package/src/x_ite/Components/NURBS/X3DParametricGeometryNode.js +16 -3
- package/src/x_ite/Components/Navigation/Billboard.js +43 -32
- package/src/x_ite/Components/Navigation/Collision.js +49 -38
- package/src/x_ite/Components/Navigation/LOD.js +54 -43
- package/src/x_ite/Components/Navigation/NavigationInfo.js +58 -47
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +69 -58
- package/src/x_ite/Components/Navigation/Viewpoint.js +53 -42
- package/src/x_ite/Components/Navigation/ViewpointGroup.js +44 -33
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +48 -35
- package/src/x_ite/Components/Navigation.js +16 -23
- package/src/x_ite/Components/Networking/Anchor.js +51 -40
- package/src/x_ite/Components/Networking/Inline.js +54 -43
- package/src/x_ite/Components/Networking/LoadSensor.js +49 -38
- package/src/x_ite/Components/Networking/X3DNetworkSensorNode.js +13 -2
- package/src/x_ite/Components/Networking/X3DUrlObject.js +35 -22
- package/src/x_ite/Components/Networking.js +13 -20
- package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +37 -26
- package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +44 -33
- package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +41 -30
- package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +34 -23
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +83 -72
- package/src/x_ite/Components/ParticleSystems/PointEmitter.js +41 -30
- package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +42 -31
- package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +42 -31
- package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +43 -32
- package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +38 -27
- package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +33 -20
- package/src/x_ite/Components/ParticleSystems/X3DParticlePhysicsModelNode.js +16 -3
- package/src/x_ite/Components/Picking/LinePickSensor.js +49 -38
- package/src/x_ite/Components/Picking/PickableGroup.js +45 -34
- package/src/x_ite/Components/Picking/PointPickSensor.js +46 -35
- package/src/x_ite/Components/Picking/PrimitivePickSensor.js +46 -35
- package/src/x_ite/Components/Picking/VolumePickSensor.js +45 -34
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +31 -18
- package/src/x_ite/Components/Picking/X3DPickableObject.js +20 -7
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +50 -39
- package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +52 -45
- package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +44 -33
- package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +30 -21
- package/src/x_ite/Components/PointingDeviceSensor/X3DDragSensorNode.js +13 -2
- package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +22 -11
- package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +16 -3
- package/src/x_ite/Components/PointingDeviceSensor.js +15 -22
- package/src/x_ite/Components/Rendering/ClipPlane.js +44 -34
- package/src/x_ite/Components/Rendering/Color.js +37 -26
- package/src/x_ite/Components/Rendering/ColorRGBA.js +37 -26
- package/src/x_ite/Components/Rendering/Coordinate.js +23 -14
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +52 -41
- package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +48 -37
- package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +44 -33
- package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +48 -37
- package/src/x_ite/Components/Rendering/LineSet.js +45 -34
- package/src/x_ite/Components/Rendering/Normal.js +39 -28
- package/src/x_ite/Components/Rendering/PointSet.js +45 -34
- package/src/x_ite/Components/Rendering/TriangleFanSet.js +47 -36
- package/src/x_ite/Components/Rendering/TriangleSet.js +41 -30
- package/src/x_ite/Components/Rendering/TriangleStripSet.js +47 -36
- package/src/x_ite/Components/Rendering/X3DColorNode.js +17 -4
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +33 -20
- package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +23 -10
- package/src/x_ite/Components/Rendering/X3DGeometricPropertyNode.js +13 -2
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +96 -80
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +21 -8
- package/src/x_ite/Components/Rendering/X3DNormalNode.js +13 -2
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +20 -7
- package/src/x_ite/Components/Rendering.js +29 -36
- package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +43 -32
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +48 -37
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +52 -41
- package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +47 -36
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +41 -30
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +44 -33
- package/src/x_ite/Components/RigidBodyPhysics/Contact.js +38 -29
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +60 -49
- package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +48 -39
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +69 -58
- package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +61 -50
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +49 -38
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +47 -36
- package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +36 -27
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +24 -11
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +17 -4
- package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +34 -21
- package/src/x_ite/Components/Scripting/Script.js +83 -53
- package/src/x_ite/Components/Scripting/X3DScriptNode.js +17 -4
- package/src/x_ite/Components/Shaders/ComposedShader.js +46 -35
- package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +40 -29
- package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +38 -27
- package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +38 -27
- package/src/x_ite/Components/Shaders/PackagedShader.js +45 -34
- package/src/x_ite/Components/Shaders/ProgramShader.js +27 -18
- package/src/x_ite/Components/Shaders/ShaderPart.js +47 -36
- package/src/x_ite/Components/Shaders/ShaderProgram.js +42 -31
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +51 -38
- package/src/x_ite/Components/Shaders/X3DShaderNode.js +19 -6
- package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +17 -4
- package/src/x_ite/Components/Shaders.js +19 -26
- package/src/x_ite/Components/Shape/AcousticProperties.js +28 -19
- package/src/x_ite/Components/Shape/Appearance.js +79 -68
- package/src/x_ite/Components/Shape/FillProperties.js +44 -33
- package/src/x_ite/Components/Shape/LineProperties.js +44 -33
- package/src/x_ite/Components/Shape/Material.js +75 -64
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +65 -54
- package/src/x_ite/Components/Shape/PointProperties.js +43 -32
- package/src/x_ite/Components/Shape/Shape.js +48 -37
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +60 -49
- package/src/x_ite/Components/Shape/UnlitMaterial.js +44 -33
- package/src/x_ite/Components/Shape/X3DAppearanceChildNode.js +13 -2
- package/src/x_ite/Components/Shape/X3DAppearanceNode.js +17 -4
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +41 -33
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +29 -16
- package/src/x_ite/Components/Shape/X3DShapeNode.js +28 -15
- package/src/x_ite/Components/Shape.js +23 -30
- package/src/x_ite/Components/Sound/Analyser.js +46 -37
- package/src/x_ite/Components/Sound/AudioClip.js +61 -50
- package/src/x_ite/Components/Sound/AudioDestination.js +35 -26
- package/src/x_ite/Components/Sound/BiquadFilter.js +45 -36
- package/src/x_ite/Components/Sound/BufferAudioSource.js +61 -50
- package/src/x_ite/Components/Sound/ChannelMerger.js +32 -23
- package/src/x_ite/Components/Sound/ChannelSelector.js +33 -24
- package/src/x_ite/Components/Sound/ChannelSplitter.js +33 -24
- package/src/x_ite/Components/Sound/Convolver.js +43 -34
- package/src/x_ite/Components/Sound/Delay.js +43 -34
- package/src/x_ite/Components/Sound/DynamicsCompressor.js +47 -38
- package/src/x_ite/Components/Sound/Gain.js +41 -32
- package/src/x_ite/Components/Sound/ListenerPointSource.js +39 -30
- package/src/x_ite/Components/Sound/MicrophoneSource.js +35 -26
- package/src/x_ite/Components/Sound/OscillatorSource.js +37 -28
- package/src/x_ite/Components/Sound/PeriodicWave.js +27 -18
- package/src/x_ite/Components/Sound/Sound.js +51 -40
- package/src/x_ite/Components/Sound/SpatialSound.js +42 -33
- package/src/x_ite/Components/Sound/StreamAudioDestination.js +35 -26
- package/src/x_ite/Components/Sound/StreamAudioSource.js +35 -26
- package/src/x_ite/Components/Sound/WaveShaper.js +43 -34
- package/src/x_ite/Components/Sound/X3DSoundChannelNode.js +13 -2
- package/src/x_ite/Components/Sound/X3DSoundDestinationNode.js +13 -2
- package/src/x_ite/Components/Sound/X3DSoundNode.js +13 -2
- package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +17 -4
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +30 -17
- package/src/x_ite/Components/Sound.js +34 -41
- package/src/x_ite/Components/Text/FontStyle.js +37 -26
- package/src/x_ite/Components/Text/Text.js +50 -39
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +32 -18
- package/src/x_ite/Components/TextureProjector/TextureProjector.js +49 -39
- package/src/x_ite/Components/TextureProjector/TextureProjectorParallel.js +58 -48
- package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +27 -14
- package/src/x_ite/Components/Texturing/ImageTexture.js +50 -39
- package/src/x_ite/Components/Texturing/MovieTexture.js +67 -56
- package/src/x_ite/Components/Texturing/MultiTexture.js +52 -41
- package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +44 -33
- package/src/x_ite/Components/Texturing/MultiTextureTransform.js +39 -28
- package/src/x_ite/Components/Texturing/PixelTexture.js +42 -31
- package/src/x_ite/Components/Texturing/TextureCoordinate.js +41 -30
- package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +41 -30
- package/src/x_ite/Components/Texturing/TextureProperties.js +47 -36
- package/src/x_ite/Components/Texturing/TextureTransform.js +39 -28
- package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +20 -7
- package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +21 -8
- package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +20 -7
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +26 -13
- package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +13 -2
- package/src/x_ite/Components/Texturing/X3DTextureNode.js +17 -4
- package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +13 -2
- package/src/x_ite/Components/Texturing.js +25 -32
- package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +44 -33
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +46 -35
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +54 -43
- package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +40 -29
- package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +41 -30
- package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +41 -30
- package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +39 -28
- package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +36 -25
- package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +26 -13
- package/src/x_ite/Components/Time/TimeSensor.js +55 -44
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +38 -25
- package/src/x_ite/Components/Time.js +10 -17
- package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +51 -41
- package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +39 -28
- package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +42 -31
- package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +41 -30
- package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +41 -30
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +50 -39
- package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +39 -28
- package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +38 -27
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +49 -38
- package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +44 -33
- package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +42 -31
- package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +41 -30
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +45 -34
- package/src/x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode.js +13 -2
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +25 -12
- package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +22 -9
- package/src/x_ite/Components/X_ITE/BlendMode.js +48 -37
- package/src/x_ite/Components.js +38 -14
- package/src/x_ite/Configuration/AbstractNodes.js +50 -0
- package/src/x_ite/{Fallback.js → Configuration/AbstractNodesArray.js} +22 -29
- package/src/x_ite/Configuration/ComponentInfo.js +14 -10
- package/src/x_ite/Configuration/ComponentInfoArray.js +14 -10
- package/src/x_ite/Configuration/ConcreteNodes.js +50 -0
- package/src/x_ite/Configuration/{SupportedNodes.js → ConcreteNodesArray.js} +26 -40
- package/src/x_ite/Configuration/ProfileInfo.js +13 -9
- package/src/x_ite/Configuration/ProfileInfoArray.js +14 -13
- package/src/x_ite/Configuration/SupportedComponents.js +40 -78
- package/src/x_ite/Configuration/SupportedProfiles.js +16 -16
- package/src/x_ite/Configuration/UnitInfo.js +14 -10
- package/src/x_ite/Configuration/UnitInfoArray.js +10 -21
- package/src/x_ite/Execution/BindableList.js +14 -10
- package/src/x_ite/Execution/BindableStack.js +14 -10
- package/src/x_ite/Execution/ExportedNodesArray.js +11 -9
- package/src/x_ite/Execution/ImportedNodesArray.js +11 -9
- package/src/x_ite/Execution/NamedNodesArray.js +11 -22
- package/src/x_ite/Execution/X3DExecutionContext.js +181 -152
- package/src/x_ite/Execution/X3DExportedNode.js +18 -10
- package/src/x_ite/Execution/X3DImportedNode.js +35 -22
- package/src/x_ite/Execution/X3DScene.js +93 -64
- package/src/x_ite/Execution/X3DWorld.js +21 -17
- package/src/x_ite/Fields/ArrayFields.js +87 -153
- package/src/x_ite/Fields/SFBool.js +21 -25
- package/src/x_ite/Fields/SFColor.js +43 -39
- package/src/x_ite/Fields/SFColorRGBA.js +39 -35
- package/src/x_ite/Fields/SFDouble.js +20 -21
- package/src/x_ite/Fields/SFFloat.js +20 -21
- package/src/x_ite/Fields/SFImage.js +50 -48
- package/src/x_ite/Fields/SFInt32.js +20 -21
- package/src/x_ite/Fields/SFMatrix3.js +23 -16
- package/src/x_ite/Fields/SFMatrix4.js +24 -17
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +31 -31
- package/src/x_ite/Fields/SFNode.js +57 -88
- package/src/x_ite/Fields/SFNodeCache.js +7 -11
- package/src/x_ite/Fields/SFRotation.js +73 -62
- package/src/x_ite/Fields/SFString.js +35 -36
- package/src/x_ite/Fields/SFTime.js +20 -21
- package/src/x_ite/Fields/SFVec2.js +17 -14
- package/src/x_ite/Fields/SFVec3.js +20 -17
- package/src/x_ite/Fields/SFVec4.js +21 -18
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +36 -36
- package/src/x_ite/Fields.js +6 -13
- package/src/x_ite/InputOutput/FileLoader.js +36 -40
- package/src/x_ite/InputOutput/Generator.js +50 -51
- package/src/x_ite/Parser/GLB2Parser.js +12 -13
- package/src/x_ite/Parser/GLTF2Parser.js +111 -112
- package/src/x_ite/Parser/GoldenGate.js +11 -13
- package/src/x_ite/Parser/HTMLSupport.js +15 -5
- package/src/x_ite/Parser/JSONParser.js +21 -22
- package/src/x_ite/Parser/OBJParser.js +56 -57
- package/src/x_ite/Parser/STLAParser.js +22 -23
- package/src/x_ite/Parser/STLBParser.js +12 -13
- package/src/x_ite/Parser/SVGParser.js +85 -86
- package/src/x_ite/Parser/VRMLParser.js +495 -878
- package/src/x_ite/Parser/X3DOptimizer.js +7 -7
- package/src/x_ite/Parser/X3DParser.js +17 -17
- package/src/x_ite/Parser/XMLParser.js +215 -269
- package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +11 -9
- package/src/x_ite/Prototype/ProtoDeclarationArray.js +11 -9
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +35 -27
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +28 -20
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +18 -10
- package/src/x_ite/Rendering/DependentRenderer.js +11 -12
- package/src/x_ite/Rendering/MultiSampleFrameBuffer.js +9 -10
- package/src/x_ite/Rendering/PointingBuffer.js +6 -7
- package/src/x_ite/Rendering/TextureBuffer.js +11 -12
- package/src/x_ite/Rendering/VertexArray.js +5 -5
- package/src/x_ite/Rendering/X3DRenderObject.js +51 -52
- package/src/x_ite/Routing/RouteArray.js +11 -9
- package/src/x_ite/Routing/X3DRoute.js +35 -19
- package/src/x_ite/Routing/X3DRoutingContext.js +8 -9
- package/src/x_ite/X3D.js +27 -26
- package/src/x_ite/X3DCanvasElement.js +18 -7
- package/src/x_ite.css +2 -1
- package/webpack.config.js +2 -2
- /package/src/x_ite/{DEBUG.js → DEVELOPMENT.js} +0 -0
|
@@ -52,6 +52,14 @@ import X3DField from "../Base/X3DField.js";
|
|
|
52
52
|
import X3DExternProtoDeclaration from "../Prototype/X3DExternProtoDeclaration.js";
|
|
53
53
|
import X3DProtoDeclaration from "../Prototype/X3DProtoDeclaration.js";
|
|
54
54
|
import X3DConstants from "../Base/X3DConstants.js";
|
|
55
|
+
import Color3 from "../../standard/Math/Numbers/Color3.js";
|
|
56
|
+
import Color4 from "../../standard/Math/Numbers/Color4.js";
|
|
57
|
+
import Matrix3 from "../../standard/Math/Numbers/Matrix3.js";
|
|
58
|
+
import Matrix4 from "../../standard/Math/Numbers/Matrix4.js";
|
|
59
|
+
import Rotation4 from "../../standard/Math/Numbers/Rotation4.js";
|
|
60
|
+
import Vector2 from "../../standard/Math/Numbers/Vector2.js";
|
|
61
|
+
import Vector3 from "../../standard/Math/Numbers/Vector3.js";
|
|
62
|
+
import Vector4 from "../../standard/Math/Numbers/Vector4.js";
|
|
55
63
|
|
|
56
64
|
/*
|
|
57
65
|
* Grammar
|
|
@@ -127,9 +135,8 @@ function VRMLParser (scene)
|
|
|
127
135
|
X3DParser .call (this, scene);
|
|
128
136
|
}
|
|
129
137
|
|
|
130
|
-
|
|
138
|
+
Object .assign (Object .setPrototypeOf (VRMLParser .prototype, X3DParser .prototype),
|
|
131
139
|
{
|
|
132
|
-
constructor: VRMLParser,
|
|
133
140
|
accessTypes:
|
|
134
141
|
{
|
|
135
142
|
field: X3DConstants .initializeOnly,
|
|
@@ -141,48 +148,17 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
141
148
|
outputOnly: X3DConstants .outputOnly,
|
|
142
149
|
inputOutput: X3DConstants .inputOutput,
|
|
143
150
|
},
|
|
144
|
-
SFBool: new Fields .SFBool (),
|
|
145
|
-
SFColor: new Fields .SFColor (),
|
|
146
|
-
SFColorRGBA: new Fields .SFColorRGBA (),
|
|
147
|
-
SFDouble: new Fields .SFDouble (),
|
|
148
|
-
SFFloat: new Fields .SFFloat (),
|
|
149
151
|
SFImage: new Fields .SFImage (),
|
|
150
|
-
SFInt32: new Fields .SFInt32 (),
|
|
151
|
-
SFMatrix3f: new Fields .SFMatrix3f (),
|
|
152
|
-
SFMatrix3d: new Fields .SFMatrix3d (),
|
|
153
|
-
SFMatrix4f: new Fields .SFMatrix4f (),
|
|
154
|
-
SFMatrix4d: new Fields .SFMatrix4d (),
|
|
155
152
|
SFNode: new Fields .SFNode (),
|
|
156
|
-
SFRotation: new Fields .SFRotation (),
|
|
157
|
-
SFString: new Fields .SFString (),
|
|
158
|
-
SFTime: new Fields .SFTime (),
|
|
159
|
-
SFVec2d: new Fields .SFVec2d (),
|
|
160
|
-
SFVec2f: new Fields .SFVec2f (),
|
|
161
|
-
SFVec3d: new Fields .SFVec3d (),
|
|
162
|
-
SFVec3f: new Fields .SFVec3f (),
|
|
163
|
-
SFVec4d: new Fields .SFVec4d (),
|
|
164
|
-
SFVec4f: new Fields .SFVec4f (),
|
|
165
|
-
MFBool: new Fields .MFBool (),
|
|
166
|
-
MFColor: new Fields .MFColor (),
|
|
167
|
-
MFColorRGBA: new Fields .MFColorRGBA (),
|
|
168
|
-
MFDouble: new Fields .MFDouble (),
|
|
169
|
-
MFFloat: new Fields .MFFloat (),
|
|
170
|
-
MFImage: new Fields .MFImage (),
|
|
171
|
-
MFInt32: new Fields .MFInt32 (),
|
|
172
|
-
MFMatrix3d: new Fields .MFMatrix3d (),
|
|
173
|
-
MFMatrix3f: new Fields .MFMatrix3f (),
|
|
174
|
-
MFMatrix4d: new Fields .MFMatrix4d (),
|
|
175
|
-
MFMatrix4f: new Fields .MFMatrix4f (),
|
|
176
|
-
MFNode: new Fields .MFNode (),
|
|
177
|
-
MFRotation: new Fields .MFRotation (),
|
|
178
153
|
MFString: new Fields .MFString (),
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
154
|
+
Color3: new Color3 (0, 0, 0),
|
|
155
|
+
Color4: new Color4 (0, 0, 0, 0),
|
|
156
|
+
Matrix3: new Matrix3 (),
|
|
157
|
+
Matrix4: new Matrix4 (),
|
|
158
|
+
Rotation4: new Rotation4 (),
|
|
159
|
+
Vector2: new Vector2 (0, 0),
|
|
160
|
+
Vector3: new Vector3 (0, 0, 0),
|
|
161
|
+
Vector4: new Vector4 (0, 0, 0, 0),
|
|
186
162
|
CONSTANTS: {
|
|
187
163
|
NAN: Number .NaN,
|
|
188
164
|
INFINITY: Number .POSITIVE_INFINITY,
|
|
@@ -210,29 +186,29 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
210
186
|
SQRT1_2: Math .SQRT1_2,
|
|
211
187
|
SQRT2: Math .SQRT2,
|
|
212
188
|
},
|
|
213
|
-
getEncoding
|
|
189
|
+
getEncoding ()
|
|
214
190
|
{
|
|
215
191
|
return "STRING";
|
|
216
192
|
},
|
|
217
|
-
|
|
193
|
+
setInput (vrmlSyntax)
|
|
194
|
+
{
|
|
195
|
+
this .input = vrmlSyntax;
|
|
196
|
+
this .lineNumber = 1;
|
|
197
|
+
this .lastIndex = 0;
|
|
198
|
+
},
|
|
199
|
+
isValid ()
|
|
218
200
|
{
|
|
219
201
|
if (!(typeof this .input === "string"))
|
|
220
202
|
return false;
|
|
221
203
|
|
|
222
204
|
return !! this .input .match (/^(?:#X3D|#VRML|(?:[\x20\n,\t\r]*|#.*?[\r\n])*(PROFILE|COMPONENT|META|UNIT|EXTERNPROTO|PROTO|DEF|NULL|IMPORT|EXPORT|ROUTE|\w+(?:[\x20\n,\t\r]*|#.*?[\r\n])\{|$))/);
|
|
223
205
|
},
|
|
224
|
-
|
|
225
|
-
{
|
|
226
|
-
this .input = vrmlSyntax;
|
|
227
|
-
this .lineNumber = 1;
|
|
228
|
-
this .lastIndex = 0;
|
|
229
|
-
},
|
|
230
|
-
parseIntoScene: function (success, error)
|
|
206
|
+
parseIntoScene (resolve, reject)
|
|
231
207
|
{
|
|
232
208
|
try
|
|
233
209
|
{
|
|
234
|
-
this .
|
|
235
|
-
this .
|
|
210
|
+
this .resolve = resolve;
|
|
211
|
+
this .reject = reject;
|
|
236
212
|
|
|
237
213
|
this .getScene () .setEncoding ("VRML");
|
|
238
214
|
this .getScene () .setProfile (this .getBrowser () .getProfile ("Full"));
|
|
@@ -244,20 +220,20 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
244
220
|
throw new Error (this .getError (error));
|
|
245
221
|
}
|
|
246
222
|
},
|
|
247
|
-
|
|
223
|
+
throwOrWarn (string)
|
|
248
224
|
{
|
|
249
225
|
if (this .getBrowser () .isStrict ())
|
|
250
226
|
throw new Error (string);
|
|
251
227
|
|
|
252
228
|
console .warn (string);
|
|
253
229
|
},
|
|
254
|
-
getError
|
|
230
|
+
getError (error)
|
|
255
231
|
{
|
|
256
232
|
//console .error (error);
|
|
257
233
|
|
|
258
|
-
|
|
234
|
+
const string = error .message;
|
|
259
235
|
|
|
260
|
-
|
|
236
|
+
let
|
|
261
237
|
rest = this .getLine (),
|
|
262
238
|
line = this .getLastLine (),
|
|
263
239
|
lastLine = this .getLastLine (),
|
|
@@ -272,24 +248,23 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
272
248
|
|
|
273
249
|
// Format error
|
|
274
250
|
|
|
275
|
-
|
|
276
|
-
+
|
|
277
|
-
+
|
|
278
|
-
+
|
|
279
|
-
+
|
|
280
|
-
+ lastLine
|
|
281
|
-
+ line
|
|
282
|
-
+ Array (linePos) .join (" ")
|
|
283
|
-
+ string
|
|
284
|
-
+
|
|
285
|
-
+ "\n"
|
|
251
|
+
const message = "\n"
|
|
252
|
+
+ `********************************************************************************\n`
|
|
253
|
+
+ `Parser error at line ${this .lineNumber}:${linePos}\n`
|
|
254
|
+
+ `in '${this .getExecutionContext () .getWorldURL ()}'\n`
|
|
255
|
+
+ `\n`
|
|
256
|
+
+ `${lastLine}\n`
|
|
257
|
+
+ `${line}\n`
|
|
258
|
+
+ `${Array (linePos) .join (" ")}^\n`
|
|
259
|
+
+ `${string}\n`
|
|
260
|
+
+ `********************************************************************************\n`
|
|
286
261
|
;
|
|
287
262
|
|
|
288
263
|
return message;
|
|
289
264
|
},
|
|
290
|
-
getLine
|
|
265
|
+
getLine ()
|
|
291
266
|
{
|
|
292
|
-
|
|
267
|
+
let
|
|
293
268
|
input = this .input,
|
|
294
269
|
lastIndex = this .lastIndex,
|
|
295
270
|
line = "";
|
|
@@ -301,9 +276,9 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
301
276
|
|
|
302
277
|
return line;
|
|
303
278
|
},
|
|
304
|
-
getLastLine
|
|
279
|
+
getLastLine ()
|
|
305
280
|
{
|
|
306
|
-
|
|
281
|
+
let
|
|
307
282
|
input = this .input,
|
|
308
283
|
lastIndex = this .lastIndex,
|
|
309
284
|
line = "";
|
|
@@ -318,19 +293,19 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
318
293
|
|
|
319
294
|
return line;
|
|
320
295
|
},
|
|
321
|
-
comments
|
|
296
|
+
comments ()
|
|
322
297
|
{
|
|
323
298
|
while (this .comment ())
|
|
324
299
|
;
|
|
325
300
|
},
|
|
326
|
-
comment
|
|
301
|
+
comment ()
|
|
327
302
|
{
|
|
328
303
|
if (this .whitespaces ())
|
|
329
304
|
return true;
|
|
330
305
|
|
|
331
306
|
return Grammar .Comment .parse (this);
|
|
332
307
|
},
|
|
333
|
-
whitespaces
|
|
308
|
+
whitespaces ()
|
|
334
309
|
{
|
|
335
310
|
if (Grammar .Whitespaces .parse (this))
|
|
336
311
|
{
|
|
@@ -341,9 +316,9 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
341
316
|
|
|
342
317
|
return false;
|
|
343
318
|
},
|
|
344
|
-
lines
|
|
319
|
+
lines (string)
|
|
345
320
|
{
|
|
346
|
-
|
|
321
|
+
const match = string .match (Grammar .Break);
|
|
347
322
|
|
|
348
323
|
if (match)
|
|
349
324
|
this .lineNumber += match .length;
|
|
@@ -387,7 +362,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
387
362
|
this .getScene () .addComponent (this .getBrowser () .getComponent (componentName));
|
|
388
363
|
}
|
|
389
364
|
|
|
390
|
-
if (this .
|
|
365
|
+
if (this .resolve)
|
|
391
366
|
{
|
|
392
367
|
this .loadComponents () .then (() =>
|
|
393
368
|
{
|
|
@@ -398,15 +373,15 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
398
373
|
if (this .lastIndex < this .input .length)
|
|
399
374
|
throw new Error ("Unknown statement.");
|
|
400
375
|
|
|
401
|
-
this .
|
|
376
|
+
this .resolve (this .getScene ());
|
|
402
377
|
}
|
|
403
378
|
catch (error)
|
|
404
379
|
{
|
|
405
380
|
console .error (error);
|
|
406
|
-
this .
|
|
381
|
+
this .reject (new Error (this .getError (error)));
|
|
407
382
|
}
|
|
408
383
|
})
|
|
409
|
-
.catch (this .
|
|
384
|
+
.catch (this .reject);
|
|
410
385
|
}
|
|
411
386
|
else
|
|
412
387
|
{
|
|
@@ -417,11 +392,11 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
417
392
|
}
|
|
418
393
|
};
|
|
419
394
|
})(),
|
|
420
|
-
headerStatement
|
|
395
|
+
headerStatement ()
|
|
421
396
|
{
|
|
422
397
|
Grammar .Header .lastIndex = 0;
|
|
423
398
|
|
|
424
|
-
|
|
399
|
+
const result = Grammar .Header .exec (this .input);
|
|
425
400
|
|
|
426
401
|
if (result)
|
|
427
402
|
{
|
|
@@ -432,7 +407,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
432
407
|
|
|
433
408
|
return false;
|
|
434
409
|
},
|
|
435
|
-
profileStatement
|
|
410
|
+
profileStatement ()
|
|
436
411
|
{
|
|
437
412
|
this .comments ();
|
|
438
413
|
|
|
@@ -440,7 +415,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
440
415
|
{
|
|
441
416
|
if (this .profileNameId ())
|
|
442
417
|
{
|
|
443
|
-
|
|
418
|
+
const profile = this .getBrowser () .getProfile (this .result [1]);
|
|
444
419
|
|
|
445
420
|
this .getScene () .setProfile (profile);
|
|
446
421
|
return;
|
|
@@ -449,18 +424,14 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
449
424
|
throw new Error ("Expected a profile name.");
|
|
450
425
|
}
|
|
451
426
|
},
|
|
452
|
-
componentStatements
|
|
427
|
+
componentStatements ()
|
|
453
428
|
{
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
while (component)
|
|
457
|
-
{
|
|
458
|
-
this .getScene () .addComponent (component);
|
|
429
|
+
let component;
|
|
459
430
|
|
|
460
|
-
|
|
461
|
-
|
|
431
|
+
while (component = this .componentStatement ())
|
|
432
|
+
this .getScene () .updateComponent (component);
|
|
462
433
|
},
|
|
463
|
-
componentStatement
|
|
434
|
+
componentStatement ()
|
|
464
435
|
{
|
|
465
436
|
this .comments ();
|
|
466
437
|
|
|
@@ -468,7 +439,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
468
439
|
{
|
|
469
440
|
if (this .componentNameId ())
|
|
470
441
|
{
|
|
471
|
-
|
|
442
|
+
const componentNameIdCharacters = this .result [1];
|
|
472
443
|
|
|
473
444
|
this .comments ();
|
|
474
445
|
|
|
@@ -476,7 +447,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
476
447
|
{
|
|
477
448
|
if (this .componentSupportLevel ())
|
|
478
449
|
{
|
|
479
|
-
|
|
450
|
+
const componentSupportLevel = this .value;
|
|
480
451
|
|
|
481
452
|
return this .getBrowser () .getComponent (componentNameIdCharacters, componentSupportLevel);
|
|
482
453
|
}
|
|
@@ -492,16 +463,16 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
492
463
|
|
|
493
464
|
return null;
|
|
494
465
|
},
|
|
495
|
-
componentSupportLevel
|
|
466
|
+
componentSupportLevel ()
|
|
496
467
|
{
|
|
497
468
|
return this .int32 ();
|
|
498
469
|
},
|
|
499
|
-
unitStatements
|
|
470
|
+
unitStatements ()
|
|
500
471
|
{
|
|
501
472
|
while (this .unitStatement ())
|
|
502
473
|
;
|
|
503
474
|
},
|
|
504
|
-
unitStatement
|
|
475
|
+
unitStatement ()
|
|
505
476
|
{
|
|
506
477
|
this .comments ();
|
|
507
478
|
|
|
@@ -509,15 +480,15 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
509
480
|
{
|
|
510
481
|
if (this .categoryNameId ())
|
|
511
482
|
{
|
|
512
|
-
|
|
483
|
+
const categoryNameId = this .result [1];
|
|
513
484
|
|
|
514
485
|
if (this .unitNameId ())
|
|
515
486
|
{
|
|
516
|
-
|
|
487
|
+
const unitNameId = this .result [1];
|
|
517
488
|
|
|
518
489
|
if (this .unitConversionFactor ())
|
|
519
490
|
{
|
|
520
|
-
|
|
491
|
+
const unitConversionFactor = this .value;
|
|
521
492
|
|
|
522
493
|
try
|
|
523
494
|
{
|
|
@@ -542,30 +513,30 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
542
513
|
|
|
543
514
|
return false;
|
|
544
515
|
},
|
|
545
|
-
unitConversionFactor
|
|
516
|
+
unitConversionFactor ()
|
|
546
517
|
{
|
|
547
518
|
return this .double ();
|
|
548
519
|
},
|
|
549
|
-
metaStatements
|
|
520
|
+
metaStatements ()
|
|
550
521
|
{
|
|
551
522
|
while (this .metaStatement ())
|
|
552
523
|
;
|
|
553
524
|
},
|
|
554
|
-
metaStatement
|
|
525
|
+
metaStatement ()
|
|
555
526
|
{
|
|
556
527
|
this .comments ();
|
|
557
528
|
|
|
558
529
|
if (Grammar .META .parse (this))
|
|
559
530
|
{
|
|
560
|
-
if (this .
|
|
531
|
+
if (this .metaKey ())
|
|
561
532
|
{
|
|
562
|
-
|
|
533
|
+
const metaKey = this .value;
|
|
563
534
|
|
|
564
|
-
if (this .
|
|
535
|
+
if (this .metaValue ())
|
|
565
536
|
{
|
|
566
|
-
|
|
537
|
+
const metaValue = this .value;
|
|
567
538
|
|
|
568
|
-
this .getScene () .addMetaData (
|
|
539
|
+
this .getScene () .addMetaData (metaKey, metaValue);
|
|
569
540
|
return true;
|
|
570
541
|
}
|
|
571
542
|
|
|
@@ -577,15 +548,15 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
577
548
|
|
|
578
549
|
return false;
|
|
579
550
|
},
|
|
580
|
-
|
|
551
|
+
metaKey ()
|
|
581
552
|
{
|
|
582
553
|
return this .string ();
|
|
583
554
|
},
|
|
584
|
-
|
|
555
|
+
metaValue ()
|
|
585
556
|
{
|
|
586
557
|
return this .string ();
|
|
587
558
|
},
|
|
588
|
-
exportStatement
|
|
559
|
+
exportStatement ()
|
|
589
560
|
{
|
|
590
561
|
this .comments ();
|
|
591
562
|
|
|
@@ -593,23 +564,23 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
593
564
|
{
|
|
594
565
|
if (this .nodeNameId ())
|
|
595
566
|
{
|
|
596
|
-
|
|
597
|
-
localNodeNameId = this .result [1],
|
|
598
|
-
exportedNodeNameId = "";
|
|
567
|
+
const localNodeNameId = this .result [1];
|
|
599
568
|
|
|
600
569
|
this .comments ();
|
|
601
570
|
|
|
602
|
-
|
|
571
|
+
const node = this .getScene () .getLocalNode (localNodeNameId);
|
|
603
572
|
|
|
604
573
|
if (Grammar .AS .parse (this))
|
|
605
574
|
{
|
|
606
575
|
if (this .exportedNodeNameId ())
|
|
607
|
-
exportedNodeNameId = this .result [1];
|
|
576
|
+
var exportedNodeNameId = this .result [1];
|
|
608
577
|
else
|
|
609
578
|
throw new Error ("No name given after AS.");
|
|
610
579
|
}
|
|
611
580
|
else
|
|
612
|
-
|
|
581
|
+
{
|
|
582
|
+
var exportedNodeNameId = localNodeNameId;
|
|
583
|
+
}
|
|
613
584
|
|
|
614
585
|
if (this .getScene () === this .getExecutionContext ())
|
|
615
586
|
{
|
|
@@ -625,7 +596,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
625
596
|
|
|
626
597
|
return false;
|
|
627
598
|
},
|
|
628
|
-
importStatement
|
|
599
|
+
importStatement ()
|
|
629
600
|
{
|
|
630
601
|
this .comments ();
|
|
631
602
|
|
|
@@ -633,7 +604,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
633
604
|
{
|
|
634
605
|
if (this .nodeNameId ())
|
|
635
606
|
{
|
|
636
|
-
|
|
607
|
+
const
|
|
637
608
|
inlineNodeNameId = this .result [1],
|
|
638
609
|
namedNode = this .getExecutionContext () .getNamedNode (inlineNodeNameId);
|
|
639
610
|
|
|
@@ -643,20 +614,22 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
643
614
|
{
|
|
644
615
|
if (this .exportedNodeNameId ())
|
|
645
616
|
{
|
|
646
|
-
|
|
647
|
-
exportedNodeNameId = this .result [1],
|
|
648
|
-
nodeNameId = exportedNodeNameId;
|
|
617
|
+
const exportedNodeNameId = this .result [1];
|
|
649
618
|
|
|
650
619
|
this .comments ();
|
|
651
620
|
|
|
652
621
|
if (Grammar .AS .parse (this))
|
|
653
622
|
{
|
|
654
623
|
if (this .nodeNameId ())
|
|
655
|
-
nodeNameId = this .result [1];
|
|
624
|
+
var nodeNameId = this .result [1];
|
|
656
625
|
|
|
657
626
|
else
|
|
658
627
|
throw new Error ("No name given after AS.");
|
|
659
628
|
}
|
|
629
|
+
else
|
|
630
|
+
{
|
|
631
|
+
var nodeNameId = exportedNodeNameId;
|
|
632
|
+
}
|
|
660
633
|
|
|
661
634
|
this .getExecutionContext () .updateImportedNode (namedNode, exportedNodeNameId, nodeNameId);
|
|
662
635
|
return true;
|
|
@@ -672,12 +645,12 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
672
645
|
}
|
|
673
646
|
return false;
|
|
674
647
|
},
|
|
675
|
-
statements
|
|
648
|
+
statements (field)
|
|
676
649
|
{
|
|
677
650
|
while (this .statement (field))
|
|
678
651
|
;
|
|
679
652
|
},
|
|
680
|
-
statement
|
|
653
|
+
statement (field)
|
|
681
654
|
{
|
|
682
655
|
if (this .protoStatement ())
|
|
683
656
|
return true;
|
|
@@ -691,7 +664,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
691
664
|
if (this .exportStatement ())
|
|
692
665
|
return true;
|
|
693
666
|
|
|
694
|
-
|
|
667
|
+
const node = this .nodeStatement ();
|
|
695
668
|
|
|
696
669
|
if (node !== false)
|
|
697
670
|
{
|
|
@@ -701,7 +674,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
701
674
|
|
|
702
675
|
return false;
|
|
703
676
|
},
|
|
704
|
-
nodeStatement
|
|
677
|
+
nodeStatement ()
|
|
705
678
|
{
|
|
706
679
|
this .comments ();
|
|
707
680
|
|
|
@@ -726,7 +699,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
726
699
|
|
|
727
700
|
return this .node ("");
|
|
728
701
|
},
|
|
729
|
-
protoStatement
|
|
702
|
+
protoStatement ()
|
|
730
703
|
{
|
|
731
704
|
if (this .proto ())
|
|
732
705
|
return true;
|
|
@@ -736,12 +709,12 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
736
709
|
|
|
737
710
|
return false;
|
|
738
711
|
},
|
|
739
|
-
protoStatements
|
|
712
|
+
protoStatements ()
|
|
740
713
|
{
|
|
741
714
|
while (this .protoStatement ())
|
|
742
715
|
;
|
|
743
716
|
},
|
|
744
|
-
proto
|
|
717
|
+
proto ()
|
|
745
718
|
{
|
|
746
719
|
this .comments ();
|
|
747
720
|
|
|
@@ -749,13 +722,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
749
722
|
{
|
|
750
723
|
if (this .nodeTypeId ())
|
|
751
724
|
{
|
|
752
|
-
|
|
725
|
+
const nodeTypeId = this .result [1];
|
|
753
726
|
|
|
754
727
|
this .comments ();
|
|
755
728
|
|
|
756
729
|
if (Grammar .OpenBracket .parse (this))
|
|
757
730
|
{
|
|
758
|
-
|
|
731
|
+
const interfaceDeclarations = this .interfaceDeclarations ();
|
|
759
732
|
|
|
760
733
|
this .comments ();
|
|
761
734
|
|
|
@@ -765,14 +738,10 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
765
738
|
|
|
766
739
|
if (Grammar .OpenBrace .parse (this))
|
|
767
740
|
{
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
for (var i = 0, length = interfaceDeclarations .length; i < length; ++ i)
|
|
771
|
-
{
|
|
772
|
-
var field = interfaceDeclarations [i];
|
|
741
|
+
const proto = new X3DProtoDeclaration (this .getExecutionContext ());
|
|
773
742
|
|
|
743
|
+
for (const field of interfaceDeclarations)
|
|
774
744
|
proto .addUserDefinedField (field .getAccessType (), field .getName (), field);
|
|
775
|
-
}
|
|
776
745
|
|
|
777
746
|
this .pushPrototype (proto);
|
|
778
747
|
this .pushExecutionContext (proto .getBody ());
|
|
@@ -794,7 +763,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
794
763
|
|
|
795
764
|
this .getExecutionContext () .updateProtoDeclaration (this .getExecutionContext () .getUniqueProtoName (nodeTypeId), existingProto);
|
|
796
765
|
}
|
|
797
|
-
catch
|
|
766
|
+
catch
|
|
798
767
|
{ }
|
|
799
768
|
|
|
800
769
|
this .getExecutionContext () .updateProtoDeclaration (nodeTypeId, proto);
|
|
@@ -819,7 +788,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
819
788
|
|
|
820
789
|
return false;
|
|
821
790
|
},
|
|
822
|
-
protoBody
|
|
791
|
+
protoBody (rootNodes)
|
|
823
792
|
{
|
|
824
793
|
this .protoStatements ();
|
|
825
794
|
|
|
@@ -830,7 +799,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
830
799
|
|
|
831
800
|
this .statements (rootNodes);
|
|
832
801
|
},
|
|
833
|
-
rootNodeStatement
|
|
802
|
+
rootNodeStatement ()
|
|
834
803
|
{
|
|
835
804
|
this .comments ();
|
|
836
805
|
|
|
@@ -838,7 +807,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
838
807
|
{
|
|
839
808
|
if (this .nodeNameId ())
|
|
840
809
|
{
|
|
841
|
-
|
|
810
|
+
const
|
|
842
811
|
nodeNameId = this .result [0],
|
|
843
812
|
baseNode = this .node (nodeNameId);
|
|
844
813
|
|
|
@@ -851,29 +820,25 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
851
820
|
throw new Error ("No name given after DEF.");
|
|
852
821
|
}
|
|
853
822
|
|
|
854
|
-
|
|
823
|
+
const baseNode = this .node ("");
|
|
855
824
|
|
|
856
825
|
if (baseNode !== false)
|
|
857
826
|
return baseNode;
|
|
858
827
|
|
|
859
828
|
return false;
|
|
860
829
|
},
|
|
861
|
-
interfaceDeclarations
|
|
830
|
+
interfaceDeclarations ()
|
|
862
831
|
{
|
|
863
|
-
|
|
864
|
-
interfaceDeclarations = [ ],
|
|
865
|
-
field = this .interfaceDeclaration ();
|
|
832
|
+
const interfaceDeclarations = [ ];
|
|
866
833
|
|
|
867
|
-
|
|
868
|
-
{
|
|
869
|
-
interfaceDeclarations .push (field);
|
|
834
|
+
let field;
|
|
870
835
|
|
|
871
|
-
|
|
872
|
-
|
|
836
|
+
while (field = this .interfaceDeclaration ())
|
|
837
|
+
interfaceDeclarations .push (field);
|
|
873
838
|
|
|
874
839
|
return interfaceDeclarations;
|
|
875
840
|
},
|
|
876
|
-
restrictedInterfaceDeclaration
|
|
841
|
+
restrictedInterfaceDeclaration ()
|
|
877
842
|
{
|
|
878
843
|
this .comments ();
|
|
879
844
|
|
|
@@ -881,13 +846,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
881
846
|
{
|
|
882
847
|
if (this .fieldType ())
|
|
883
848
|
{
|
|
884
|
-
|
|
849
|
+
const fieldType = this .result [1];
|
|
885
850
|
|
|
886
851
|
if (this .inputOnlyId ())
|
|
887
852
|
{
|
|
888
|
-
|
|
853
|
+
const
|
|
889
854
|
fieldId = this .result [1],
|
|
890
|
-
field =
|
|
855
|
+
field = new (Fields [fieldType]) ();
|
|
891
856
|
|
|
892
857
|
field .setAccessType (X3DConstants .inputOnly);
|
|
893
858
|
field .setName (fieldId);
|
|
@@ -899,20 +864,20 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
899
864
|
|
|
900
865
|
this .Id ()
|
|
901
866
|
|
|
902
|
-
throw new Error (
|
|
867
|
+
throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
|
|
903
868
|
}
|
|
904
869
|
|
|
905
870
|
if (Grammar .outputOnly .parse (this) || Grammar .eventOut .parse (this))
|
|
906
871
|
{
|
|
907
872
|
if (this .fieldType ())
|
|
908
873
|
{
|
|
909
|
-
|
|
874
|
+
const fieldType = this .result [1];
|
|
910
875
|
|
|
911
876
|
if (this .outputOnlyId ())
|
|
912
877
|
{
|
|
913
|
-
|
|
878
|
+
const
|
|
914
879
|
fieldId = this .result [1],
|
|
915
|
-
field =
|
|
880
|
+
field = new (Fields [fieldType]) ();
|
|
916
881
|
|
|
917
882
|
field .setAccessType (X3DConstants .outputOnly);
|
|
918
883
|
field .setName (fieldId);
|
|
@@ -924,20 +889,20 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
924
889
|
|
|
925
890
|
this .Id ()
|
|
926
891
|
|
|
927
|
-
throw new Error (
|
|
892
|
+
throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
|
|
928
893
|
}
|
|
929
894
|
|
|
930
895
|
if (Grammar .initializeOnly .parse (this) || Grammar .field .parse (this))
|
|
931
896
|
{
|
|
932
897
|
if (this .fieldType ())
|
|
933
898
|
{
|
|
934
|
-
|
|
899
|
+
const fieldType = this .result [1];
|
|
935
900
|
|
|
936
901
|
if (this .initializeOnlyId ())
|
|
937
902
|
{
|
|
938
|
-
|
|
903
|
+
const
|
|
939
904
|
fieldId = this .result [1],
|
|
940
|
-
field =
|
|
905
|
+
field = new (Fields [fieldType]) ();
|
|
941
906
|
|
|
942
907
|
if (this .fieldValue (field))
|
|
943
908
|
{
|
|
@@ -946,7 +911,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
946
911
|
return field;
|
|
947
912
|
}
|
|
948
913
|
|
|
949
|
-
throw new Error (
|
|
914
|
+
throw new Error (`Couldn't read value for field '${fieldId}'.`);
|
|
950
915
|
}
|
|
951
916
|
|
|
952
917
|
throw new Error ("Expected a name for field.");
|
|
@@ -954,14 +919,14 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
954
919
|
|
|
955
920
|
this .Id ()
|
|
956
921
|
|
|
957
|
-
throw new Error (
|
|
922
|
+
throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
|
|
958
923
|
}
|
|
959
924
|
|
|
960
925
|
return null;
|
|
961
926
|
},
|
|
962
|
-
interfaceDeclaration
|
|
927
|
+
interfaceDeclaration ()
|
|
963
928
|
{
|
|
964
|
-
|
|
929
|
+
const field = this .restrictedInterfaceDeclaration ();
|
|
965
930
|
|
|
966
931
|
if (field)
|
|
967
932
|
return field;
|
|
@@ -972,13 +937,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
972
937
|
{
|
|
973
938
|
if (this .fieldType ())
|
|
974
939
|
{
|
|
975
|
-
|
|
940
|
+
const fieldType = this .result [1];
|
|
976
941
|
|
|
977
942
|
if (this .inputOutputId ())
|
|
978
943
|
{
|
|
979
|
-
|
|
944
|
+
const
|
|
980
945
|
fieldId = this .result [1],
|
|
981
|
-
field =
|
|
946
|
+
field = new (Fields [fieldType]) ();
|
|
982
947
|
|
|
983
948
|
if (this .fieldValue (field))
|
|
984
949
|
{
|
|
@@ -987,7 +952,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
987
952
|
return field;
|
|
988
953
|
}
|
|
989
954
|
|
|
990
|
-
throw new Error (
|
|
955
|
+
throw new Error (`Couldn't read value for field '${fieldId}'.`);
|
|
991
956
|
}
|
|
992
957
|
|
|
993
958
|
throw new Error ("Expected a name for field.");
|
|
@@ -995,12 +960,12 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
995
960
|
|
|
996
961
|
this .Id ();
|
|
997
962
|
|
|
998
|
-
throw new Error (
|
|
963
|
+
throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
|
|
999
964
|
}
|
|
1000
965
|
|
|
1001
966
|
return null;
|
|
1002
967
|
},
|
|
1003
|
-
externproto
|
|
968
|
+
externproto ()
|
|
1004
969
|
{
|
|
1005
970
|
this .comments ();
|
|
1006
971
|
|
|
@@ -1008,13 +973,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1008
973
|
{
|
|
1009
974
|
if (this .nodeTypeId ())
|
|
1010
975
|
{
|
|
1011
|
-
|
|
976
|
+
const nodeTypeId = this .result [1];
|
|
1012
977
|
|
|
1013
978
|
this .comments ();
|
|
1014
979
|
|
|
1015
980
|
if (Grammar .OpenBracket .parse (this))
|
|
1016
981
|
{
|
|
1017
|
-
|
|
982
|
+
const externInterfaceDeclarations = this .externInterfaceDeclarations ();
|
|
1018
983
|
|
|
1019
984
|
this .comments ();
|
|
1020
985
|
|
|
@@ -1022,14 +987,10 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1022
987
|
{
|
|
1023
988
|
if (this .URLList (this .MFString))
|
|
1024
989
|
{
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
for (var i = 0, length = externInterfaceDeclarations .length; i < length; ++ i)
|
|
1028
|
-
{
|
|
1029
|
-
var field = externInterfaceDeclarations [i];
|
|
990
|
+
const externproto = new X3DExternProtoDeclaration (this .getExecutionContext (), this .MFString);
|
|
1030
991
|
|
|
992
|
+
for (const field of externInterfaceDeclarations)
|
|
1031
993
|
externproto .addUserDefinedField (field .getAccessType (), field .getName (), field);
|
|
1032
|
-
}
|
|
1033
994
|
|
|
1034
995
|
externproto .setup ();
|
|
1035
996
|
|
|
@@ -1039,14 +1000,14 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1039
1000
|
|
|
1040
1001
|
this .getExecutionContext () .updateExternProtoDeclaration (this .getExecutionContext () .getUniqueExternProtoName (nodeTypeId), existingExternProto);
|
|
1041
1002
|
}
|
|
1042
|
-
catch
|
|
1003
|
+
catch
|
|
1043
1004
|
{ }
|
|
1044
1005
|
|
|
1045
1006
|
this .getExecutionContext () .updateExternProtoDeclaration (nodeTypeId, externproto);
|
|
1046
1007
|
return true;
|
|
1047
1008
|
}
|
|
1048
1009
|
|
|
1049
|
-
throw new Error (
|
|
1010
|
+
throw new Error (`Expected a URL list after EXTERNPROTO interface declaration '${nodeTypeId}'.`);
|
|
1050
1011
|
}
|
|
1051
1012
|
|
|
1052
1013
|
throw new Error ("Expected a ']' at the end of EXTERNPROTO interface declaration.");
|
|
@@ -1060,22 +1021,18 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1060
1021
|
|
|
1061
1022
|
return false;
|
|
1062
1023
|
},
|
|
1063
|
-
externInterfaceDeclarations
|
|
1024
|
+
externInterfaceDeclarations ()
|
|
1064
1025
|
{
|
|
1065
|
-
|
|
1066
|
-
externInterfaceDeclarations = [ ],
|
|
1067
|
-
field = this .externInterfaceDeclaration ();
|
|
1026
|
+
const externInterfaceDeclarations = [ ];
|
|
1068
1027
|
|
|
1069
|
-
|
|
1070
|
-
{
|
|
1071
|
-
externInterfaceDeclarations .push (field);
|
|
1028
|
+
let field;
|
|
1072
1029
|
|
|
1073
|
-
|
|
1074
|
-
|
|
1030
|
+
while (field = this .externInterfaceDeclaration ())
|
|
1031
|
+
externInterfaceDeclarations .push (field);
|
|
1075
1032
|
|
|
1076
1033
|
return externInterfaceDeclarations;
|
|
1077
1034
|
},
|
|
1078
|
-
externInterfaceDeclaration
|
|
1035
|
+
externInterfaceDeclaration ()
|
|
1079
1036
|
{
|
|
1080
1037
|
this .comments ();
|
|
1081
1038
|
|
|
@@ -1083,13 +1040,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1083
1040
|
{
|
|
1084
1041
|
if (this .fieldType ())
|
|
1085
1042
|
{
|
|
1086
|
-
|
|
1043
|
+
const fieldType = this .result [1];
|
|
1087
1044
|
|
|
1088
1045
|
if (this .inputOnlyId ())
|
|
1089
1046
|
{
|
|
1090
|
-
|
|
1047
|
+
const
|
|
1091
1048
|
fieldId = this .result [1],
|
|
1092
|
-
field =
|
|
1049
|
+
field = new (Fields [fieldType]) ();
|
|
1093
1050
|
|
|
1094
1051
|
field .setAccessType (X3DConstants .inputOnly);
|
|
1095
1052
|
field .setName (fieldId);
|
|
@@ -1101,20 +1058,20 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1101
1058
|
|
|
1102
1059
|
this .Id ()
|
|
1103
1060
|
|
|
1104
|
-
throw new Error (
|
|
1061
|
+
throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
|
|
1105
1062
|
}
|
|
1106
1063
|
|
|
1107
1064
|
if (Grammar .outputOnly .parse (this) || Grammar .eventOut .parse (this))
|
|
1108
1065
|
{
|
|
1109
1066
|
if (this .fieldType ())
|
|
1110
1067
|
{
|
|
1111
|
-
|
|
1068
|
+
const fieldType = this .result [1];
|
|
1112
1069
|
|
|
1113
1070
|
if (this .outputOnlyId ())
|
|
1114
1071
|
{
|
|
1115
|
-
|
|
1072
|
+
const
|
|
1116
1073
|
fieldId = this .result [1],
|
|
1117
|
-
field =
|
|
1074
|
+
field = new (Fields [fieldType]) ();
|
|
1118
1075
|
|
|
1119
1076
|
field .setAccessType (X3DConstants .outputOnly);
|
|
1120
1077
|
field .setName (fieldId);
|
|
@@ -1126,20 +1083,20 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1126
1083
|
|
|
1127
1084
|
this .Id ()
|
|
1128
1085
|
|
|
1129
|
-
throw new Error (
|
|
1086
|
+
throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
|
|
1130
1087
|
}
|
|
1131
1088
|
|
|
1132
1089
|
if (Grammar .initializeOnly .parse (this) || Grammar .field .parse (this))
|
|
1133
1090
|
{
|
|
1134
1091
|
if (this .fieldType ())
|
|
1135
1092
|
{
|
|
1136
|
-
|
|
1093
|
+
const fieldType = this .result [1];
|
|
1137
1094
|
|
|
1138
1095
|
if (this .initializeOnlyId ())
|
|
1139
1096
|
{
|
|
1140
|
-
|
|
1097
|
+
const
|
|
1141
1098
|
fieldId = this .result [1],
|
|
1142
|
-
field =
|
|
1099
|
+
field = new (Fields [fieldType]) ();
|
|
1143
1100
|
|
|
1144
1101
|
field .setAccessType (X3DConstants .initializeOnly);
|
|
1145
1102
|
field .setName (fieldId);
|
|
@@ -1151,20 +1108,20 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1151
1108
|
|
|
1152
1109
|
this .Id ()
|
|
1153
1110
|
|
|
1154
|
-
throw new Error (
|
|
1111
|
+
throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
|
|
1155
1112
|
}
|
|
1156
1113
|
|
|
1157
1114
|
if (Grammar .inputOutput .parse (this) || Grammar .exposedField .parse (this))
|
|
1158
1115
|
{
|
|
1159
1116
|
if (this .fieldType ())
|
|
1160
1117
|
{
|
|
1161
|
-
|
|
1118
|
+
const fieldType = this .result [1];
|
|
1162
1119
|
|
|
1163
1120
|
if (this .inputOutputId ())
|
|
1164
1121
|
{
|
|
1165
|
-
|
|
1122
|
+
const
|
|
1166
1123
|
fieldId = this .result [1],
|
|
1167
|
-
field =
|
|
1124
|
+
field = new (Fields [fieldType]) ();
|
|
1168
1125
|
|
|
1169
1126
|
field .setAccessType (X3DConstants .inputOutput);
|
|
1170
1127
|
field .setName (fieldId);
|
|
@@ -1176,16 +1133,16 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1176
1133
|
|
|
1177
1134
|
this .Id ()
|
|
1178
1135
|
|
|
1179
|
-
throw new Error (
|
|
1136
|
+
throw new Error (`Unknown event or field type: '${this .result [1]}'.`);
|
|
1180
1137
|
}
|
|
1181
1138
|
|
|
1182
1139
|
return null;
|
|
1183
1140
|
},
|
|
1184
|
-
URLList
|
|
1141
|
+
URLList (field)
|
|
1185
1142
|
{
|
|
1186
1143
|
return this .mfstringValue (field);
|
|
1187
1144
|
},
|
|
1188
|
-
routeStatement
|
|
1145
|
+
routeStatement ()
|
|
1189
1146
|
{
|
|
1190
1147
|
this .comments ();
|
|
1191
1148
|
|
|
@@ -1193,7 +1150,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1193
1150
|
{
|
|
1194
1151
|
if (this .nodeNameId ())
|
|
1195
1152
|
{
|
|
1196
|
-
|
|
1153
|
+
const
|
|
1197
1154
|
fromNodeId = this .result [1],
|
|
1198
1155
|
fromNode = this .getExecutionContext () .getLocalNode (fromNodeId);
|
|
1199
1156
|
|
|
@@ -1203,7 +1160,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1203
1160
|
{
|
|
1204
1161
|
if (this .outputOnlyId ())
|
|
1205
1162
|
{
|
|
1206
|
-
|
|
1163
|
+
const eventOutId = this .result [1];
|
|
1207
1164
|
|
|
1208
1165
|
this .comments ();
|
|
1209
1166
|
|
|
@@ -1211,7 +1168,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1211
1168
|
{
|
|
1212
1169
|
if (this .nodeNameId ())
|
|
1213
1170
|
{
|
|
1214
|
-
|
|
1171
|
+
const
|
|
1215
1172
|
toNodeId = this .result [1],
|
|
1216
1173
|
toNode = this .getExecutionContext () .getLocalNode (toNodeId);
|
|
1217
1174
|
|
|
@@ -1223,14 +1180,14 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1223
1180
|
{
|
|
1224
1181
|
try
|
|
1225
1182
|
{
|
|
1226
|
-
|
|
1183
|
+
const eventInId = this .result [1];
|
|
1227
1184
|
|
|
1228
1185
|
this .getExecutionContext () .addRoute (fromNode, eventOutId, toNode, eventInId);
|
|
1229
1186
|
return true;
|
|
1230
1187
|
}
|
|
1231
1188
|
catch (error)
|
|
1232
1189
|
{
|
|
1233
|
-
this .
|
|
1190
|
+
this .throwOrWarn (error .message);
|
|
1234
1191
|
|
|
1235
1192
|
return true;
|
|
1236
1193
|
}
|
|
@@ -1259,31 +1216,27 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1259
1216
|
|
|
1260
1217
|
return false;
|
|
1261
1218
|
},
|
|
1262
|
-
node
|
|
1219
|
+
node (nodeNameId)
|
|
1263
1220
|
{
|
|
1264
1221
|
if (this .nodeTypeId ())
|
|
1265
1222
|
{
|
|
1266
|
-
|
|
1267
|
-
nodeTypeId = this .result [1],
|
|
1268
|
-
baseNode = this .getExecutionContext () .createNode (nodeTypeId, false);
|
|
1223
|
+
const nodeTypeId = this .result [1];
|
|
1269
1224
|
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
baseNode = this .getExecutionContext () .createProto (nodeTypeId, false);
|
|
1225
|
+
const baseNode = this .getExecutionContext () .createNode (nodeTypeId, false)
|
|
1226
|
+
?? this .getExecutionContext () .createProto (nodeTypeId, false);
|
|
1273
1227
|
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
}
|
|
1228
|
+
if (!baseNode)
|
|
1229
|
+
throw new Error (`Unknown node type or proto '${nodeTypeId}', you probably have insufficient component/profile statements, and/or an inappropriate specification version.`);
|
|
1277
1230
|
|
|
1278
1231
|
if (nodeNameId .length)
|
|
1279
1232
|
{
|
|
1280
1233
|
try
|
|
1281
1234
|
{
|
|
1282
|
-
|
|
1235
|
+
const namedNode = this .getExecutionContext () .getNamedNode (nodeNameId);
|
|
1283
1236
|
|
|
1284
1237
|
this .getExecutionContext () .updateNamedNode (this .getExecutionContext () .getUniqueName (nodeNameId), namedNode);
|
|
1285
1238
|
}
|
|
1286
|
-
catch
|
|
1239
|
+
catch
|
|
1287
1240
|
{ }
|
|
1288
1241
|
|
|
1289
1242
|
this .getExecutionContext () .updateNamedNode (nodeNameId, baseNode);
|
|
@@ -1303,7 +1256,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1303
1256
|
|
|
1304
1257
|
if (Grammar .CloseBrace .parse (this))
|
|
1305
1258
|
{
|
|
1306
|
-
if (!
|
|
1259
|
+
if (!this .isInsideProtoDefinition ())
|
|
1307
1260
|
baseNode .setup ();
|
|
1308
1261
|
|
|
1309
1262
|
return baseNode;
|
|
@@ -1317,30 +1270,30 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1317
1270
|
|
|
1318
1271
|
return false;
|
|
1319
1272
|
},
|
|
1320
|
-
scriptBody
|
|
1273
|
+
scriptBody (baseNode)
|
|
1321
1274
|
{
|
|
1322
1275
|
while (this .scriptBodyElement (baseNode))
|
|
1323
1276
|
;
|
|
1324
1277
|
},
|
|
1325
|
-
scriptBodyElement
|
|
1278
|
+
scriptBodyElement (baseNode)
|
|
1326
1279
|
{
|
|
1327
|
-
|
|
1280
|
+
const
|
|
1328
1281
|
lastIndex = this .lastIndex,
|
|
1329
1282
|
lineNumber = this .lineNumber;
|
|
1330
1283
|
|
|
1331
1284
|
if (this .Id ())
|
|
1332
1285
|
{
|
|
1333
|
-
|
|
1286
|
+
const accessType = this .accessTypes [this .result [1]];
|
|
1334
1287
|
|
|
1335
1288
|
if (accessType)
|
|
1336
1289
|
{
|
|
1337
1290
|
if (this .fieldType ())
|
|
1338
1291
|
{
|
|
1339
|
-
|
|
1292
|
+
const fieldType = this .result [1];
|
|
1340
1293
|
|
|
1341
1294
|
if (this .Id ())
|
|
1342
1295
|
{
|
|
1343
|
-
|
|
1296
|
+
const fieldId = this .result [1];
|
|
1344
1297
|
|
|
1345
1298
|
this .comments ();
|
|
1346
1299
|
|
|
@@ -1350,47 +1303,45 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1350
1303
|
{
|
|
1351
1304
|
if (this .Id ())
|
|
1352
1305
|
{
|
|
1353
|
-
|
|
1306
|
+
const isId = this .result [1];
|
|
1354
1307
|
|
|
1355
1308
|
try
|
|
1356
1309
|
{
|
|
1357
1310
|
var reference = this .getPrototype () .getField (isId);
|
|
1358
1311
|
}
|
|
1359
|
-
catch
|
|
1312
|
+
catch
|
|
1360
1313
|
{
|
|
1361
|
-
this .
|
|
1314
|
+
this .throwOrWarn (`No such event or field '${isId}' inside PROTO ${this .getPrototype () .getName ()} interface declaration.`);
|
|
1362
1315
|
|
|
1363
1316
|
return true;
|
|
1364
1317
|
}
|
|
1365
1318
|
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
if (supportedField .getType () === reference .getType ())
|
|
1319
|
+
if (X3DConstants [fieldType] === reference .getType ())
|
|
1369
1320
|
{
|
|
1370
1321
|
if (reference .isReference (accessType))
|
|
1371
1322
|
{
|
|
1372
|
-
try
|
|
1323
|
+
let field = $.try (() => baseNode .getUserDefinedField (fieldId));
|
|
1324
|
+
|
|
1325
|
+
if (!field)
|
|
1373
1326
|
{
|
|
1374
|
-
|
|
1327
|
+
field = new (Fields [fieldType]) ();
|
|
1375
1328
|
|
|
1376
|
-
|
|
1377
|
-
{
|
|
1378
|
-
field = this .createUserDefinedField (baseNode, accessType, fieldId, supportedField);
|
|
1379
|
-
}
|
|
1329
|
+
baseNode .addUserDefinedField (accessType, fieldId, field);
|
|
1380
1330
|
}
|
|
1381
|
-
|
|
1331
|
+
|
|
1332
|
+
if (accessType === field .getAccessType () && reference .getType () === field .getType ())
|
|
1382
1333
|
{
|
|
1383
|
-
|
|
1334
|
+
field .addReference (reference);
|
|
1335
|
+
return true;
|
|
1384
1336
|
}
|
|
1385
1337
|
|
|
1386
|
-
field
|
|
1387
|
-
return true;
|
|
1338
|
+
throw new Error (`Couldn't add field '${fieldId}', field already exists with different access type or data type.`);
|
|
1388
1339
|
}
|
|
1389
1340
|
|
|
1390
|
-
throw new Error (
|
|
1341
|
+
throw new Error (`Field '${fieldId}' and '${reference .getName ()}' in PROTO '${this .getPrototype () .getName ()}' are incompatible as an IS mapping.`);
|
|
1391
1342
|
}
|
|
1392
1343
|
|
|
1393
|
-
throw new Error (
|
|
1344
|
+
throw new Error (`Field '${fieldId}' and '${reference .getName ()}' in PROTO '${this .getPrototype () .getName ()}' have different types.`);
|
|
1394
1345
|
}
|
|
1395
1346
|
|
|
1396
1347
|
throw new Error ("No name give after IS statement.");
|
|
@@ -1406,28 +1357,22 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1406
1357
|
this .lastIndex = lastIndex;
|
|
1407
1358
|
this .lineNumber = lineNumber;
|
|
1408
1359
|
|
|
1409
|
-
|
|
1360
|
+
const field = this .interfaceDeclaration ();
|
|
1410
1361
|
|
|
1411
1362
|
if (field)
|
|
1412
1363
|
{
|
|
1413
|
-
try
|
|
1364
|
+
const existingField = $.try (() => baseNode .getUserDefinedField (field .getName ()));
|
|
1365
|
+
|
|
1366
|
+
if (existingField)
|
|
1414
1367
|
{
|
|
1415
|
-
if (field .getAccessType () ===
|
|
1368
|
+
if (existingField .getAccessType () === field .getAccessType () && existingField .getType () === field .getType ())
|
|
1416
1369
|
{
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
if (existingField .getAccessType () === X3DConstants .inputOutput)
|
|
1420
|
-
{
|
|
1421
|
-
if (field .getType () === existingField .getType ())
|
|
1422
|
-
{
|
|
1423
|
-
existingField .setValue (field);
|
|
1424
|
-
return true;
|
|
1425
|
-
}
|
|
1426
|
-
}
|
|
1370
|
+
existingField .assign (field);
|
|
1371
|
+
return true;
|
|
1427
1372
|
}
|
|
1373
|
+
|
|
1374
|
+
throw new Error (`Couldn't set value for field '${field .getName ()}', field already exists with different access type or data type.`);
|
|
1428
1375
|
}
|
|
1429
|
-
catch (error)
|
|
1430
|
-
{ }
|
|
1431
1376
|
|
|
1432
1377
|
baseNode .addUserDefinedField (field .getAccessType (), field .getName (), field);
|
|
1433
1378
|
return true;
|
|
@@ -1435,20 +1380,12 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1435
1380
|
|
|
1436
1381
|
return this .nodeBodyElement (baseNode);
|
|
1437
1382
|
},
|
|
1438
|
-
|
|
1439
|
-
{
|
|
1440
|
-
var field = supportedField .create ();
|
|
1441
|
-
|
|
1442
|
-
baseNode .addUserDefinedField (accessType, fieldId, field);
|
|
1443
|
-
|
|
1444
|
-
return field;
|
|
1445
|
-
},
|
|
1446
|
-
nodeBody: function (baseNode)
|
|
1383
|
+
nodeBody (baseNode)
|
|
1447
1384
|
{
|
|
1448
1385
|
while (this .nodeBodyElement (baseNode))
|
|
1449
1386
|
;
|
|
1450
1387
|
},
|
|
1451
|
-
nodeBodyElement
|
|
1388
|
+
nodeBodyElement (baseNode)
|
|
1452
1389
|
{
|
|
1453
1390
|
if (this .protoStatement ())
|
|
1454
1391
|
return true;
|
|
@@ -1458,15 +1395,15 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1458
1395
|
|
|
1459
1396
|
if (this .Id ())
|
|
1460
1397
|
{
|
|
1461
|
-
|
|
1398
|
+
const fieldId = this .result [1];
|
|
1462
1399
|
|
|
1463
1400
|
try
|
|
1464
1401
|
{
|
|
1465
|
-
var field = baseNode .
|
|
1402
|
+
var field = baseNode .getPredefinedField (fieldId);
|
|
1466
1403
|
}
|
|
1467
|
-
catch
|
|
1404
|
+
catch
|
|
1468
1405
|
{
|
|
1469
|
-
throw new Error (
|
|
1406
|
+
throw new Error (`Unknown field '${fieldId}' in class '${baseNode .getTypeName ()}'.`);
|
|
1470
1407
|
}
|
|
1471
1408
|
|
|
1472
1409
|
this .comments ();
|
|
@@ -1477,15 +1414,15 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1477
1414
|
{
|
|
1478
1415
|
if (this .Id ())
|
|
1479
1416
|
{
|
|
1480
|
-
|
|
1417
|
+
const isId = this .result [1];
|
|
1481
1418
|
|
|
1482
1419
|
try
|
|
1483
1420
|
{
|
|
1484
1421
|
var reference = this .getPrototype () .getField (isId);
|
|
1485
1422
|
}
|
|
1486
|
-
catch
|
|
1423
|
+
catch
|
|
1487
1424
|
{
|
|
1488
|
-
this .
|
|
1425
|
+
this .throwOrWarn (`No such event or field '${isId}' inside PROTO ${this .getPrototype () .getName ()}`);
|
|
1489
1426
|
|
|
1490
1427
|
return true;
|
|
1491
1428
|
}
|
|
@@ -1498,10 +1435,10 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1498
1435
|
return true;
|
|
1499
1436
|
}
|
|
1500
1437
|
|
|
1501
|
-
throw new Error (
|
|
1438
|
+
throw new Error (`Field '${field .getName ()}' and '${reference .getName ()}' in PROTO ${this .getPrototype () .getName ()} are incompatible as an IS mapping.`);
|
|
1502
1439
|
}
|
|
1503
1440
|
|
|
1504
|
-
throw new Error (
|
|
1441
|
+
throw new Error (`Field '${field .getName ()}' and '${reference .getName ()}' in PROTO ${this .getPrototype () .getName ()} have different types.`);
|
|
1505
1442
|
}
|
|
1506
1443
|
|
|
1507
1444
|
throw new Error("No name give after IS statement.");
|
|
@@ -1515,47 +1452,65 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1515
1452
|
if (this .fieldValue (field))
|
|
1516
1453
|
return true;
|
|
1517
1454
|
|
|
1518
|
-
throw new Error (
|
|
1455
|
+
throw new Error (`Couldn't read value for field '${fieldId}'.`);
|
|
1519
1456
|
}
|
|
1520
1457
|
|
|
1521
|
-
throw new Error (
|
|
1458
|
+
throw new Error (`Couldn't assign value to ${this .accessTypeToString (field .getAccessType ())} field '${fieldId}'.`);
|
|
1522
1459
|
}
|
|
1523
1460
|
|
|
1524
1461
|
return false;
|
|
1525
1462
|
},
|
|
1526
|
-
profileNameId
|
|
1527
|
-
componentNameId
|
|
1463
|
+
profileNameId () { return this .Id (); },
|
|
1464
|
+
componentNameId ()
|
|
1528
1465
|
{
|
|
1529
1466
|
this .comments ();
|
|
1530
1467
|
|
|
1531
1468
|
return Grammar .ComponentNameId .parse (this);
|
|
1532
1469
|
},
|
|
1533
|
-
categoryNameId
|
|
1534
|
-
unitNameId
|
|
1535
|
-
exportedNodeNameId
|
|
1536
|
-
nodeNameId
|
|
1537
|
-
nodeTypeId
|
|
1538
|
-
initializeOnlyId
|
|
1539
|
-
inputOnlyId
|
|
1540
|
-
outputOnlyId
|
|
1541
|
-
inputOutputId
|
|
1542
|
-
Id
|
|
1470
|
+
categoryNameId () { return this .Id (); },
|
|
1471
|
+
unitNameId () { return this .Id (); },
|
|
1472
|
+
exportedNodeNameId () { return this .Id (); },
|
|
1473
|
+
nodeNameId () { return this .Id (); },
|
|
1474
|
+
nodeTypeId () { return this .Id (); },
|
|
1475
|
+
initializeOnlyId () { return this .Id (); },
|
|
1476
|
+
inputOnlyId () { return this .Id (); },
|
|
1477
|
+
outputOnlyId () { return this .Id (); },
|
|
1478
|
+
inputOutputId () { return this .Id (); },
|
|
1479
|
+
Id ()
|
|
1543
1480
|
{
|
|
1544
1481
|
this .comments ();
|
|
1545
1482
|
|
|
1546
1483
|
return Grammar .Id .parse (this);
|
|
1547
1484
|
},
|
|
1548
|
-
fieldType
|
|
1485
|
+
fieldType ()
|
|
1549
1486
|
{
|
|
1550
1487
|
this .comments ();
|
|
1551
1488
|
|
|
1552
1489
|
return Grammar .FieldType .parse (this);
|
|
1553
1490
|
},
|
|
1554
|
-
fieldValue
|
|
1491
|
+
fieldValue (field)
|
|
1492
|
+
{
|
|
1493
|
+
return this [field .getType ()] (field, field .getUnit ());
|
|
1494
|
+
},
|
|
1495
|
+
bool ()
|
|
1555
1496
|
{
|
|
1556
|
-
|
|
1497
|
+
this .comments ();
|
|
1498
|
+
|
|
1499
|
+
if (Grammar .TRUE .parse (this))
|
|
1500
|
+
{
|
|
1501
|
+
this .value = true;
|
|
1502
|
+
return true;
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
if (Grammar .FALSE .parse (this))
|
|
1506
|
+
{
|
|
1507
|
+
this .value = false;
|
|
1508
|
+
return true;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
return false;
|
|
1557
1512
|
},
|
|
1558
|
-
double
|
|
1513
|
+
double ()
|
|
1559
1514
|
{
|
|
1560
1515
|
this .comments ();
|
|
1561
1516
|
|
|
@@ -1579,7 +1534,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1579
1534
|
|
|
1580
1535
|
return false;
|
|
1581
1536
|
},
|
|
1582
|
-
int32
|
|
1537
|
+
int32 ()
|
|
1583
1538
|
{
|
|
1584
1539
|
this .comments ();
|
|
1585
1540
|
|
|
@@ -1591,7 +1546,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1591
1546
|
|
|
1592
1547
|
return false;
|
|
1593
1548
|
},
|
|
1594
|
-
string
|
|
1549
|
+
string ()
|
|
1595
1550
|
{
|
|
1596
1551
|
this .comments ();
|
|
1597
1552
|
|
|
@@ -1606,31 +1561,23 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1606
1561
|
|
|
1607
1562
|
return false;
|
|
1608
1563
|
},
|
|
1609
|
-
sfboolValue
|
|
1564
|
+
sfboolValue (field)
|
|
1610
1565
|
{
|
|
1611
|
-
this .
|
|
1612
|
-
|
|
1613
|
-
if (Grammar .TRUE .parse (this))
|
|
1614
|
-
{
|
|
1615
|
-
field .setValue (true);
|
|
1616
|
-
return true;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
|
-
if (Grammar .FALSE .parse (this))
|
|
1566
|
+
if (this .bool ())
|
|
1620
1567
|
{
|
|
1621
|
-
field .setValue (
|
|
1568
|
+
field .setValue (this .value);
|
|
1622
1569
|
return true;
|
|
1623
1570
|
}
|
|
1624
1571
|
|
|
1625
1572
|
return false;
|
|
1626
1573
|
},
|
|
1627
|
-
mfboolValue
|
|
1574
|
+
mfboolValue (field)
|
|
1628
1575
|
{
|
|
1629
1576
|
field .length = 0;
|
|
1630
1577
|
|
|
1631
|
-
if (this .
|
|
1578
|
+
if (this .bool ())
|
|
1632
1579
|
{
|
|
1633
|
-
field .push (this .
|
|
1580
|
+
field .push (this .value);
|
|
1634
1581
|
return true;
|
|
1635
1582
|
}
|
|
1636
1583
|
|
|
@@ -1638,8 +1585,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1638
1585
|
{
|
|
1639
1586
|
this .sfboolValues (field);
|
|
1640
1587
|
|
|
1641
|
-
this .comments ();
|
|
1642
|
-
|
|
1643
1588
|
if (Grammar .CloseBracket .parse (this))
|
|
1644
1589
|
return true;
|
|
1645
1590
|
|
|
@@ -1648,31 +1593,29 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1648
1593
|
|
|
1649
1594
|
return false;
|
|
1650
1595
|
},
|
|
1651
|
-
sfboolValues
|
|
1596
|
+
sfboolValues (field)
|
|
1652
1597
|
{
|
|
1653
1598
|
field .length = 0;
|
|
1654
1599
|
field = field .getTarget ();
|
|
1655
1600
|
|
|
1656
|
-
while (this .
|
|
1657
|
-
|
|
1658
|
-
field .push (this .SFBool);
|
|
1659
|
-
}
|
|
1601
|
+
while (this .bool ())
|
|
1602
|
+
field .push (this .value);
|
|
1660
1603
|
},
|
|
1661
|
-
sfcolorValue
|
|
1604
|
+
sfcolorValue (field)
|
|
1662
1605
|
{
|
|
1663
1606
|
const lastIndex = this .lastIndex;
|
|
1664
1607
|
|
|
1665
1608
|
if (this .double ())
|
|
1666
1609
|
{
|
|
1667
|
-
|
|
1610
|
+
const r = this .value;
|
|
1668
1611
|
|
|
1669
1612
|
if (this .double ())
|
|
1670
1613
|
{
|
|
1671
|
-
|
|
1614
|
+
const g = this .value;
|
|
1672
1615
|
|
|
1673
1616
|
if (this .double ())
|
|
1674
1617
|
{
|
|
1675
|
-
|
|
1618
|
+
const b = this .value;
|
|
1676
1619
|
|
|
1677
1620
|
field .r = r;
|
|
1678
1621
|
field .g = g;
|
|
@@ -1700,13 +1643,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1700
1643
|
|
|
1701
1644
|
return false;
|
|
1702
1645
|
},
|
|
1703
|
-
mfcolorValue
|
|
1646
|
+
mfcolorValue (field)
|
|
1704
1647
|
{
|
|
1705
1648
|
field .length = 0;
|
|
1706
1649
|
|
|
1707
|
-
if (this .sfcolorValue (this .
|
|
1650
|
+
if (this .sfcolorValue (this .Color3))
|
|
1708
1651
|
{
|
|
1709
|
-
field .push (this .
|
|
1652
|
+
field .push (this .Color3);
|
|
1710
1653
|
return true;
|
|
1711
1654
|
}
|
|
1712
1655
|
|
|
@@ -1714,8 +1657,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1714
1657
|
{
|
|
1715
1658
|
this .sfcolorValues (field);
|
|
1716
1659
|
|
|
1717
|
-
this .comments ();
|
|
1718
|
-
|
|
1719
1660
|
if (Grammar .CloseBracket .parse (this))
|
|
1720
1661
|
return true;
|
|
1721
1662
|
|
|
@@ -1724,35 +1665,35 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1724
1665
|
|
|
1725
1666
|
return false;
|
|
1726
1667
|
},
|
|
1727
|
-
sfcolorValues
|
|
1668
|
+
sfcolorValues (field)
|
|
1728
1669
|
{
|
|
1729
1670
|
field .length = 0;
|
|
1730
1671
|
field = field .getTarget ();
|
|
1731
1672
|
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1673
|
+
const value = this .Color3;
|
|
1674
|
+
|
|
1675
|
+
while (this .sfcolorValue (value))
|
|
1676
|
+
field .push (value);
|
|
1736
1677
|
},
|
|
1737
|
-
sfcolorrgbaValue
|
|
1678
|
+
sfcolorrgbaValue (field)
|
|
1738
1679
|
{
|
|
1739
1680
|
const lastIndex = this .lastIndex;
|
|
1740
1681
|
|
|
1741
1682
|
if (this .double ())
|
|
1742
1683
|
{
|
|
1743
|
-
|
|
1684
|
+
const r = this .value;
|
|
1744
1685
|
|
|
1745
1686
|
if (this .double ())
|
|
1746
1687
|
{
|
|
1747
|
-
|
|
1688
|
+
const g = this .value;
|
|
1748
1689
|
|
|
1749
1690
|
if (this .double ())
|
|
1750
1691
|
{
|
|
1751
|
-
|
|
1692
|
+
const b = this .value;
|
|
1752
1693
|
|
|
1753
1694
|
if (this .double ())
|
|
1754
1695
|
{
|
|
1755
|
-
|
|
1696
|
+
const a = this .value;
|
|
1756
1697
|
|
|
1757
1698
|
field .r = r;
|
|
1758
1699
|
field .g = g;
|
|
@@ -1783,13 +1724,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1783
1724
|
|
|
1784
1725
|
return false;
|
|
1785
1726
|
},
|
|
1786
|
-
mfcolorrgbaValue
|
|
1727
|
+
mfcolorrgbaValue (field)
|
|
1787
1728
|
{
|
|
1788
1729
|
field .length = 0;
|
|
1789
1730
|
|
|
1790
|
-
if (this .sfcolorrgbaValue (this .
|
|
1731
|
+
if (this .sfcolorrgbaValue (this .Color4))
|
|
1791
1732
|
{
|
|
1792
|
-
field .push (this .
|
|
1733
|
+
field .push (this .Color4);
|
|
1793
1734
|
return true;
|
|
1794
1735
|
}
|
|
1795
1736
|
|
|
@@ -1797,8 +1738,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1797
1738
|
{
|
|
1798
1739
|
this .sfcolorrgbaValues (field);
|
|
1799
1740
|
|
|
1800
|
-
this .comments ();
|
|
1801
|
-
|
|
1802
1741
|
if (Grammar .CloseBracket .parse (this))
|
|
1803
1742
|
return true;
|
|
1804
1743
|
|
|
@@ -1807,17 +1746,17 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1807
1746
|
|
|
1808
1747
|
return false;
|
|
1809
1748
|
},
|
|
1810
|
-
sfcolorrgbaValues
|
|
1749
|
+
sfcolorrgbaValues (field)
|
|
1811
1750
|
{
|
|
1812
1751
|
field .length = 0;
|
|
1813
1752
|
field = field .getTarget ();
|
|
1814
1753
|
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1754
|
+
const value = this .Color4;
|
|
1755
|
+
|
|
1756
|
+
while (this .sfcolorrgbaValue (value))
|
|
1757
|
+
field .push (value);
|
|
1819
1758
|
},
|
|
1820
|
-
sfdoubleValue
|
|
1759
|
+
sfdoubleValue (field)
|
|
1821
1760
|
{
|
|
1822
1761
|
if (this .double ())
|
|
1823
1762
|
{
|
|
@@ -1827,15 +1766,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1827
1766
|
|
|
1828
1767
|
return false;
|
|
1829
1768
|
},
|
|
1830
|
-
mfdoubleValue
|
|
1769
|
+
mfdoubleValue (field)
|
|
1831
1770
|
{
|
|
1832
1771
|
field .length = 0;
|
|
1833
1772
|
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
if (this .sfdoubleValue (this .SFDouble))
|
|
1773
|
+
if (this .double ())
|
|
1837
1774
|
{
|
|
1838
|
-
field .push (this .
|
|
1775
|
+
field .push (this .fromUnit (field .getUnit (), this .value));
|
|
1839
1776
|
return true;
|
|
1840
1777
|
}
|
|
1841
1778
|
|
|
@@ -1843,8 +1780,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1843
1780
|
{
|
|
1844
1781
|
this .sfdoubleValues (field);
|
|
1845
1782
|
|
|
1846
|
-
this .comments ();
|
|
1847
|
-
|
|
1848
1783
|
if (Grammar .CloseBracket .parse (this))
|
|
1849
1784
|
return true;
|
|
1850
1785
|
|
|
@@ -1853,83 +1788,39 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1853
1788
|
|
|
1854
1789
|
return false;
|
|
1855
1790
|
},
|
|
1856
|
-
sfdoubleValues
|
|
1791
|
+
sfdoubleValues (field)
|
|
1857
1792
|
{
|
|
1858
1793
|
field .length = 0;
|
|
1859
1794
|
field = field .getTarget ();
|
|
1860
1795
|
|
|
1861
|
-
|
|
1796
|
+
const unit = field .getUnit ();
|
|
1862
1797
|
|
|
1863
|
-
while (this .
|
|
1864
|
-
|
|
1865
|
-
field .push (this .SFDouble);
|
|
1866
|
-
}
|
|
1867
|
-
},
|
|
1868
|
-
sffloatValue: function (field)
|
|
1869
|
-
{
|
|
1870
|
-
return this .sfdoubleValue (field);
|
|
1798
|
+
while (this .double ())
|
|
1799
|
+
field .push (this .fromUnit (unit, this .value));
|
|
1871
1800
|
},
|
|
1872
|
-
|
|
1873
|
-
{
|
|
1874
|
-
field .length = 0;
|
|
1875
|
-
|
|
1876
|
-
this .SFFloat .setUnit (field .getUnit ());
|
|
1877
|
-
|
|
1878
|
-
if (this .sffloatValue (this .SFFloat))
|
|
1879
|
-
{
|
|
1880
|
-
field .push (this .SFFloat);
|
|
1881
|
-
return true;
|
|
1882
|
-
}
|
|
1883
|
-
|
|
1884
|
-
if (Grammar .OpenBracket .parse (this))
|
|
1885
|
-
{
|
|
1886
|
-
this .sffloatValues (field);
|
|
1887
|
-
|
|
1888
|
-
this .comments ();
|
|
1889
|
-
|
|
1890
|
-
if (Grammar .CloseBracket .parse (this))
|
|
1891
|
-
return true;
|
|
1892
|
-
|
|
1893
|
-
throw new Error ("Expected ']'.");
|
|
1894
|
-
}
|
|
1895
|
-
|
|
1896
|
-
return false;
|
|
1897
|
-
},
|
|
1898
|
-
sffloatValues: function (field)
|
|
1899
|
-
{
|
|
1900
|
-
field .length = 0;
|
|
1901
|
-
field = field .getTarget ();
|
|
1902
|
-
|
|
1903
|
-
this .SFFloat .setUnit (field .getUnit ());
|
|
1904
|
-
|
|
1905
|
-
while (this .sffloatValue (this .SFFloat))
|
|
1906
|
-
{
|
|
1907
|
-
field .push (this .SFFloat);
|
|
1908
|
-
}
|
|
1909
|
-
},
|
|
1910
|
-
sfimageValue: function (field)
|
|
1801
|
+
sfimageValue (field)
|
|
1911
1802
|
{
|
|
1912
1803
|
if (this .int32 ())
|
|
1913
1804
|
{
|
|
1914
|
-
|
|
1805
|
+
const width = this .value;
|
|
1915
1806
|
|
|
1916
1807
|
if (this .int32 ())
|
|
1917
1808
|
{
|
|
1918
|
-
|
|
1809
|
+
const height = this .value;
|
|
1919
1810
|
|
|
1920
1811
|
if (this .int32 ())
|
|
1921
1812
|
{
|
|
1922
|
-
|
|
1923
|
-
comp
|
|
1924
|
-
size
|
|
1813
|
+
const
|
|
1814
|
+
comp = this .value,
|
|
1815
|
+
size = width * height;
|
|
1925
1816
|
|
|
1926
1817
|
field .width = width;
|
|
1927
1818
|
field .height = height;
|
|
1928
1819
|
field .comp = comp;
|
|
1929
1820
|
|
|
1930
|
-
|
|
1821
|
+
const array = field .array;
|
|
1931
1822
|
|
|
1932
|
-
for (
|
|
1823
|
+
for (let i = 0; i < size; ++ i)
|
|
1933
1824
|
{
|
|
1934
1825
|
if (this .int32 ())
|
|
1935
1826
|
{
|
|
@@ -1947,7 +1838,7 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1947
1838
|
|
|
1948
1839
|
return false;
|
|
1949
1840
|
},
|
|
1950
|
-
mfimageValue
|
|
1841
|
+
mfimageValue (field)
|
|
1951
1842
|
{
|
|
1952
1843
|
field .length = 0;
|
|
1953
1844
|
|
|
@@ -1961,8 +1852,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1961
1852
|
{
|
|
1962
1853
|
this .sfimageValues (field);
|
|
1963
1854
|
|
|
1964
|
-
this .comments ();
|
|
1965
|
-
|
|
1966
1855
|
if (Grammar .CloseBracket .parse (this))
|
|
1967
1856
|
return true;
|
|
1968
1857
|
|
|
@@ -1971,17 +1860,17 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1971
1860
|
|
|
1972
1861
|
return false;
|
|
1973
1862
|
},
|
|
1974
|
-
sfimageValues
|
|
1863
|
+
sfimageValues (field)
|
|
1975
1864
|
{
|
|
1976
1865
|
field .length = 0;
|
|
1977
1866
|
field = field .getTarget ();
|
|
1978
1867
|
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1868
|
+
const value = this .SFImage;
|
|
1869
|
+
|
|
1870
|
+
while (this .sfimageValue (value))
|
|
1871
|
+
field .push (value);
|
|
1983
1872
|
},
|
|
1984
|
-
sfint32Value
|
|
1873
|
+
sfint32Value (field)
|
|
1985
1874
|
{
|
|
1986
1875
|
if (this .int32 ())
|
|
1987
1876
|
{
|
|
@@ -1991,13 +1880,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
1991
1880
|
|
|
1992
1881
|
return false;
|
|
1993
1882
|
},
|
|
1994
|
-
mfint32Value
|
|
1883
|
+
mfint32Value (field)
|
|
1995
1884
|
{
|
|
1996
1885
|
field .length = 0;
|
|
1997
1886
|
|
|
1998
|
-
if (this .
|
|
1887
|
+
if (this .int32 ())
|
|
1999
1888
|
{
|
|
2000
|
-
field .push (this .
|
|
1889
|
+
field .push (this .value);
|
|
2001
1890
|
return true;
|
|
2002
1891
|
}
|
|
2003
1892
|
|
|
@@ -2005,8 +1894,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2005
1894
|
{
|
|
2006
1895
|
this .sfint32Values (field);
|
|
2007
1896
|
|
|
2008
|
-
this .comments ();
|
|
2009
|
-
|
|
2010
1897
|
if (Grammar .CloseBracket .parse (this))
|
|
2011
1898
|
return true;
|
|
2012
1899
|
|
|
@@ -2015,53 +1902,51 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2015
1902
|
|
|
2016
1903
|
return false;
|
|
2017
1904
|
},
|
|
2018
|
-
sfint32Values
|
|
1905
|
+
sfint32Values (field)
|
|
2019
1906
|
{
|
|
2020
1907
|
field .length = 0;
|
|
2021
1908
|
field = field .getTarget ();
|
|
2022
1909
|
|
|
2023
|
-
while (this .
|
|
2024
|
-
|
|
2025
|
-
field .push (this .SFInt32);
|
|
2026
|
-
}
|
|
1910
|
+
while (this .int32 ())
|
|
1911
|
+
field .push (this .value);
|
|
2027
1912
|
},
|
|
2028
|
-
|
|
1913
|
+
sfmatrix3Value (field)
|
|
2029
1914
|
{
|
|
2030
1915
|
if (this .double ())
|
|
2031
1916
|
{
|
|
2032
|
-
|
|
1917
|
+
const m00 = this .value;
|
|
2033
1918
|
|
|
2034
1919
|
if (this .double ())
|
|
2035
1920
|
{
|
|
2036
|
-
|
|
1921
|
+
const m01 = this .value;
|
|
2037
1922
|
|
|
2038
1923
|
if (this .double ())
|
|
2039
1924
|
{
|
|
2040
|
-
|
|
1925
|
+
const m02 = this .value;
|
|
2041
1926
|
|
|
2042
1927
|
if (this .double ())
|
|
2043
1928
|
{
|
|
2044
|
-
|
|
1929
|
+
const m10 = this .value;
|
|
2045
1930
|
|
|
2046
1931
|
if (this .double ())
|
|
2047
1932
|
{
|
|
2048
|
-
|
|
1933
|
+
const m11 = this .value;
|
|
2049
1934
|
|
|
2050
1935
|
if (this .double ())
|
|
2051
1936
|
{
|
|
2052
|
-
|
|
1937
|
+
const m12 = this .value;
|
|
2053
1938
|
|
|
2054
1939
|
if (this .double ())
|
|
2055
1940
|
{
|
|
2056
|
-
|
|
1941
|
+
const m20 = this .value;
|
|
2057
1942
|
|
|
2058
1943
|
if (this .double ())
|
|
2059
1944
|
{
|
|
2060
|
-
|
|
1945
|
+
const m21 = this .value;
|
|
2061
1946
|
|
|
2062
1947
|
if (this .double ())
|
|
2063
1948
|
{
|
|
2064
|
-
|
|
1949
|
+
const m22 = this .value;
|
|
2065
1950
|
|
|
2066
1951
|
field [0] = m00;
|
|
2067
1952
|
field [1] = m01;
|
|
@@ -2086,21 +1971,19 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2086
1971
|
|
|
2087
1972
|
return false;
|
|
2088
1973
|
},
|
|
2089
|
-
|
|
1974
|
+
mfmatrix3Value (field)
|
|
2090
1975
|
{
|
|
2091
1976
|
field .length = 0;
|
|
2092
1977
|
|
|
2093
|
-
if (this .
|
|
1978
|
+
if (this .sfmatrix3Value (this .Matrix3))
|
|
2094
1979
|
{
|
|
2095
|
-
field .push (this .
|
|
1980
|
+
field .push (this .Matrix3);
|
|
2096
1981
|
return true;
|
|
2097
1982
|
}
|
|
2098
1983
|
|
|
2099
1984
|
if (Grammar .OpenBracket .parse (this))
|
|
2100
1985
|
{
|
|
2101
|
-
this .
|
|
2102
|
-
|
|
2103
|
-
this .comments ();
|
|
1986
|
+
this .sfmatrix3Values (field);
|
|
2104
1987
|
|
|
2105
1988
|
if (Grammar .CloseBracket .parse (this))
|
|
2106
1989
|
return true;
|
|
@@ -2110,119 +1993,81 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2110
1993
|
|
|
2111
1994
|
return false;
|
|
2112
1995
|
},
|
|
2113
|
-
|
|
1996
|
+
sfmatrix3Values (field)
|
|
2114
1997
|
{
|
|
2115
1998
|
field .length = 0;
|
|
2116
1999
|
field = field .getTarget ();
|
|
2117
2000
|
|
|
2118
|
-
|
|
2119
|
-
{
|
|
2120
|
-
field .push (this .SFMatrix3d);
|
|
2121
|
-
}
|
|
2122
|
-
},
|
|
2123
|
-
sfmatrix3fValue: function (field)
|
|
2124
|
-
{
|
|
2125
|
-
return this .sfmatrix3dValue (field);
|
|
2126
|
-
},
|
|
2127
|
-
mfmatrix3fValue: function (field)
|
|
2128
|
-
{
|
|
2129
|
-
field .length = 0;
|
|
2130
|
-
|
|
2131
|
-
if (this .sfmatrix3fValue (this .SFMatrix3f))
|
|
2132
|
-
{
|
|
2133
|
-
field .push (this .SFMatrix3f);
|
|
2134
|
-
return true;
|
|
2135
|
-
}
|
|
2136
|
-
|
|
2137
|
-
if (Grammar .OpenBracket .parse (this))
|
|
2138
|
-
{
|
|
2139
|
-
this .sfmatrix3fValues (field);
|
|
2140
|
-
|
|
2141
|
-
this .comments ();
|
|
2142
|
-
|
|
2143
|
-
if (Grammar .CloseBracket .parse (this))
|
|
2144
|
-
return true;
|
|
2145
|
-
|
|
2146
|
-
throw new Error ("Expected ']'.");
|
|
2147
|
-
}
|
|
2148
|
-
|
|
2149
|
-
return false;
|
|
2150
|
-
},
|
|
2151
|
-
sfmatrix3fValues: function (field)
|
|
2152
|
-
{
|
|
2153
|
-
field .length = 0;
|
|
2154
|
-
field = field .getTarget ();
|
|
2001
|
+
const value = this .Matrix3;
|
|
2155
2002
|
|
|
2156
|
-
while (this .
|
|
2157
|
-
|
|
2158
|
-
field .push (this .SFMatrix3f);
|
|
2159
|
-
}
|
|
2003
|
+
while (this .sfmatrix3Value (value))
|
|
2004
|
+
field .push (value);
|
|
2160
2005
|
},
|
|
2161
|
-
|
|
2006
|
+
sfmatrix4Value (field)
|
|
2162
2007
|
{
|
|
2163
2008
|
if (this .double ())
|
|
2164
2009
|
{
|
|
2165
|
-
|
|
2010
|
+
const m00 = this .value;
|
|
2166
2011
|
|
|
2167
2012
|
if (this .double ())
|
|
2168
2013
|
{
|
|
2169
|
-
|
|
2014
|
+
const m01 = this .value;
|
|
2170
2015
|
|
|
2171
2016
|
if (this .double ())
|
|
2172
2017
|
{
|
|
2173
|
-
|
|
2018
|
+
const m02 = this .value;
|
|
2174
2019
|
|
|
2175
2020
|
if (this .double ())
|
|
2176
2021
|
{
|
|
2177
|
-
|
|
2022
|
+
const m03 = this .value;
|
|
2178
2023
|
|
|
2179
2024
|
if (this .double ())
|
|
2180
2025
|
{
|
|
2181
|
-
|
|
2026
|
+
const m10 = this .value;
|
|
2182
2027
|
|
|
2183
2028
|
if (this .double ())
|
|
2184
2029
|
{
|
|
2185
|
-
|
|
2030
|
+
const m11 = this .value;
|
|
2186
2031
|
|
|
2187
2032
|
if (this .double ())
|
|
2188
2033
|
{
|
|
2189
|
-
|
|
2034
|
+
const m12 = this .value;
|
|
2190
2035
|
|
|
2191
2036
|
if (this .double ())
|
|
2192
2037
|
{
|
|
2193
|
-
|
|
2038
|
+
const m13 = this .value;
|
|
2194
2039
|
|
|
2195
2040
|
if (this .double ())
|
|
2196
2041
|
{
|
|
2197
|
-
|
|
2042
|
+
const m20 = this .value;
|
|
2198
2043
|
|
|
2199
2044
|
if (this .double ())
|
|
2200
2045
|
{
|
|
2201
|
-
|
|
2046
|
+
const m21 = this .value;
|
|
2202
2047
|
|
|
2203
2048
|
if (this .double ())
|
|
2204
2049
|
{
|
|
2205
|
-
|
|
2050
|
+
const m22 = this .value;
|
|
2206
2051
|
|
|
2207
2052
|
if (this .double ())
|
|
2208
2053
|
{
|
|
2209
|
-
|
|
2054
|
+
const m23 = this .value;
|
|
2210
2055
|
|
|
2211
2056
|
if (this .double ())
|
|
2212
2057
|
{
|
|
2213
|
-
|
|
2058
|
+
const m30 = this .value;
|
|
2214
2059
|
|
|
2215
2060
|
if (this .double ())
|
|
2216
2061
|
{
|
|
2217
|
-
|
|
2062
|
+
const m31 = this .value;
|
|
2218
2063
|
|
|
2219
2064
|
if (this .double ())
|
|
2220
2065
|
{
|
|
2221
|
-
|
|
2066
|
+
const m32 = this .value;
|
|
2222
2067
|
|
|
2223
2068
|
if (this .double ())
|
|
2224
2069
|
{
|
|
2225
|
-
|
|
2070
|
+
const m33 = this .value;
|
|
2226
2071
|
|
|
2227
2072
|
field [ 0] = m00;
|
|
2228
2073
|
field [ 1] = m01;
|
|
@@ -2261,21 +2106,19 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2261
2106
|
|
|
2262
2107
|
return false;
|
|
2263
2108
|
},
|
|
2264
|
-
|
|
2109
|
+
mfmatrix4Value (field)
|
|
2265
2110
|
{
|
|
2266
2111
|
field .length = 0;
|
|
2267
2112
|
|
|
2268
|
-
if (this .
|
|
2113
|
+
if (this .sfmatrix4Value (this .Matrix4))
|
|
2269
2114
|
{
|
|
2270
|
-
field .push (this .
|
|
2115
|
+
field .push (this .Matrix4);
|
|
2271
2116
|
return true;
|
|
2272
2117
|
}
|
|
2273
2118
|
|
|
2274
2119
|
if (Grammar .OpenBracket .parse (this))
|
|
2275
2120
|
{
|
|
2276
|
-
this .
|
|
2277
|
-
|
|
2278
|
-
this .comments ();
|
|
2121
|
+
this .sfmatrix4Values (field);
|
|
2279
2122
|
|
|
2280
2123
|
if (Grammar .CloseBracket .parse (this))
|
|
2281
2124
|
return true;
|
|
@@ -2285,57 +2128,19 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2285
2128
|
|
|
2286
2129
|
return false;
|
|
2287
2130
|
},
|
|
2288
|
-
|
|
2131
|
+
sfmatrix4Values (field)
|
|
2289
2132
|
{
|
|
2290
2133
|
field .length = 0;
|
|
2291
2134
|
field = field .getTarget ();
|
|
2292
2135
|
|
|
2293
|
-
|
|
2294
|
-
{
|
|
2295
|
-
field .push (this .SFMatrix4d);
|
|
2296
|
-
}
|
|
2297
|
-
},
|
|
2298
|
-
sfmatrix4fValue: function (field)
|
|
2299
|
-
{
|
|
2300
|
-
return this .sfmatrix4dValue (field);
|
|
2301
|
-
},
|
|
2302
|
-
mfmatrix4fValue: function (field)
|
|
2303
|
-
{
|
|
2304
|
-
field .length = 0;
|
|
2305
|
-
|
|
2306
|
-
if (this .sfmatrix4fValue (this .SFMatrix4f))
|
|
2307
|
-
{
|
|
2308
|
-
field .push (this .SFMatrix4f);
|
|
2309
|
-
return true;
|
|
2310
|
-
}
|
|
2311
|
-
|
|
2312
|
-
if (Grammar .OpenBracket .parse (this))
|
|
2313
|
-
{
|
|
2314
|
-
this .sfmatrix4fValues (field);
|
|
2136
|
+
const value = this .Matrix4;
|
|
2315
2137
|
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
if (Grammar .CloseBracket .parse (this))
|
|
2319
|
-
return true;
|
|
2320
|
-
|
|
2321
|
-
throw new Error ("Expected ']'.");
|
|
2322
|
-
}
|
|
2323
|
-
|
|
2324
|
-
return false;
|
|
2138
|
+
while (this .sfmatrix4Value (value))
|
|
2139
|
+
field .push (value);
|
|
2325
2140
|
},
|
|
2326
|
-
|
|
2141
|
+
sfnodeValue (field)
|
|
2327
2142
|
{
|
|
2328
|
-
|
|
2329
|
-
field = field .getTarget ();
|
|
2330
|
-
|
|
2331
|
-
while (this .sfmatrix4fValue (this .SFMatrix4f))
|
|
2332
|
-
{
|
|
2333
|
-
field .push (this .SFMatrix4f);
|
|
2334
|
-
}
|
|
2335
|
-
},
|
|
2336
|
-
sfnodeValue: function (field)
|
|
2337
|
-
{
|
|
2338
|
-
var baseNode = this .nodeStatement ();
|
|
2143
|
+
const baseNode = this .nodeStatement ();
|
|
2339
2144
|
|
|
2340
2145
|
if (baseNode !== false)
|
|
2341
2146
|
{
|
|
@@ -2345,11 +2150,11 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2345
2150
|
|
|
2346
2151
|
return false;
|
|
2347
2152
|
},
|
|
2348
|
-
mfnodeValue
|
|
2153
|
+
mfnodeValue (field)
|
|
2349
2154
|
{
|
|
2350
2155
|
field .length = 0;
|
|
2351
2156
|
|
|
2352
|
-
|
|
2157
|
+
const node = this .nodeStatement ();
|
|
2353
2158
|
|
|
2354
2159
|
if (node !== false)
|
|
2355
2160
|
{
|
|
@@ -2361,8 +2166,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2361
2166
|
{
|
|
2362
2167
|
this .nodeStatements (field);
|
|
2363
2168
|
|
|
2364
|
-
this .comments ();
|
|
2365
|
-
|
|
2366
2169
|
if (Grammar .CloseBracket .parse (this))
|
|
2367
2170
|
return true;
|
|
2368
2171
|
|
|
@@ -2371,11 +2174,11 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2371
2174
|
|
|
2372
2175
|
return false;
|
|
2373
2176
|
},
|
|
2374
|
-
nodeStatements
|
|
2177
|
+
nodeStatements (field)
|
|
2375
2178
|
{
|
|
2376
2179
|
this .statements (field);
|
|
2377
2180
|
|
|
2378
|
-
//
|
|
2181
|
+
// let node = this .nodeStatement ();
|
|
2379
2182
|
|
|
2380
2183
|
// while (node !== false)
|
|
2381
2184
|
// {
|
|
@@ -2384,23 +2187,23 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2384
2187
|
// node = this .nodeStatement ();
|
|
2385
2188
|
// }
|
|
2386
2189
|
},
|
|
2387
|
-
sfrotationValue
|
|
2190
|
+
sfrotationValue (field)
|
|
2388
2191
|
{
|
|
2389
2192
|
if (this .double ())
|
|
2390
2193
|
{
|
|
2391
|
-
|
|
2194
|
+
const x = this .value;
|
|
2392
2195
|
|
|
2393
2196
|
if (this .double ())
|
|
2394
2197
|
{
|
|
2395
|
-
|
|
2198
|
+
const y = this .value;
|
|
2396
2199
|
|
|
2397
2200
|
if (this .double ())
|
|
2398
2201
|
{
|
|
2399
|
-
|
|
2202
|
+
const z = this .value;
|
|
2400
2203
|
|
|
2401
2204
|
if (this .double ())
|
|
2402
2205
|
{
|
|
2403
|
-
|
|
2206
|
+
const angle = this .value;
|
|
2404
2207
|
|
|
2405
2208
|
field .x = x;
|
|
2406
2209
|
field .y = y;
|
|
@@ -2415,13 +2218,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2415
2218
|
|
|
2416
2219
|
return false;
|
|
2417
2220
|
},
|
|
2418
|
-
mfrotationValue
|
|
2221
|
+
mfrotationValue (field)
|
|
2419
2222
|
{
|
|
2420
2223
|
field .length = 0;
|
|
2421
2224
|
|
|
2422
|
-
if (this .sfrotationValue (this .
|
|
2225
|
+
if (this .sfrotationValue (this .Rotation4))
|
|
2423
2226
|
{
|
|
2424
|
-
field .push (this .
|
|
2227
|
+
field .push (this .Rotation4);
|
|
2425
2228
|
return true;
|
|
2426
2229
|
}
|
|
2427
2230
|
|
|
@@ -2429,8 +2232,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2429
2232
|
{
|
|
2430
2233
|
this .sfrotationValues (field);
|
|
2431
2234
|
|
|
2432
|
-
this .comments ();
|
|
2433
|
-
|
|
2434
2235
|
if (Grammar .CloseBracket .parse (this))
|
|
2435
2236
|
return true;
|
|
2436
2237
|
|
|
@@ -2439,17 +2240,17 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2439
2240
|
|
|
2440
2241
|
return false;
|
|
2441
2242
|
},
|
|
2442
|
-
sfrotationValues
|
|
2243
|
+
sfrotationValues (field)
|
|
2443
2244
|
{
|
|
2444
2245
|
field .length = 0;
|
|
2445
2246
|
field = field .getTarget ();
|
|
2446
2247
|
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2248
|
+
const value = this .Rotation4;
|
|
2249
|
+
|
|
2250
|
+
while (this .sfrotationValue (value))
|
|
2251
|
+
field .push (value);
|
|
2451
2252
|
},
|
|
2452
|
-
sfstringValue
|
|
2253
|
+
sfstringValue (field)
|
|
2453
2254
|
{
|
|
2454
2255
|
if (this .string ())
|
|
2455
2256
|
{
|
|
@@ -2459,13 +2260,13 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2459
2260
|
|
|
2460
2261
|
return false;
|
|
2461
2262
|
},
|
|
2462
|
-
mfstringValue
|
|
2263
|
+
mfstringValue (field)
|
|
2463
2264
|
{
|
|
2464
2265
|
field .length = 0;
|
|
2465
2266
|
|
|
2466
|
-
if (this .
|
|
2267
|
+
if (this .string ())
|
|
2467
2268
|
{
|
|
2468
|
-
field .push (this .
|
|
2269
|
+
field .push (this .value);
|
|
2469
2270
|
return true;
|
|
2470
2271
|
}
|
|
2471
2272
|
|
|
@@ -2473,8 +2274,6 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2473
2274
|
{
|
|
2474
2275
|
this .sfstringValues (field);
|
|
2475
2276
|
|
|
2476
|
-
this .comments ();
|
|
2477
|
-
|
|
2478
2277
|
if (Grammar .CloseBracket .parse (this))
|
|
2479
2278
|
return true;
|
|
2480
2279
|
|
|
@@ -2483,68 +2282,26 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2483
2282
|
|
|
2484
2283
|
return false;
|
|
2485
2284
|
},
|
|
2486
|
-
sfstringValues
|
|
2285
|
+
sfstringValues (field)
|
|
2487
2286
|
{
|
|
2488
2287
|
field .length = 0;
|
|
2489
2288
|
field = field .getTarget ();
|
|
2490
2289
|
|
|
2491
|
-
while (this .
|
|
2492
|
-
|
|
2493
|
-
field .push (this .SFString);
|
|
2494
|
-
}
|
|
2290
|
+
while (this .string ())
|
|
2291
|
+
field .push (this .value);
|
|
2495
2292
|
},
|
|
2496
|
-
|
|
2497
|
-
{
|
|
2498
|
-
return this .sfdoubleValue (field);
|
|
2499
|
-
},
|
|
2500
|
-
mftimeValue: function (field)
|
|
2501
|
-
{
|
|
2502
|
-
field .length = 0;
|
|
2503
|
-
|
|
2504
|
-
if (this .sftimeValue (this .SFTime))
|
|
2505
|
-
{
|
|
2506
|
-
field .push (this .SFTime);
|
|
2507
|
-
return true;
|
|
2508
|
-
}
|
|
2509
|
-
|
|
2510
|
-
if (Grammar .OpenBracket .parse (this))
|
|
2511
|
-
{
|
|
2512
|
-
this .sftimeValues (field);
|
|
2513
|
-
|
|
2514
|
-
this .comments ();
|
|
2515
|
-
|
|
2516
|
-
if (Grammar .CloseBracket .parse (this))
|
|
2517
|
-
return true;
|
|
2518
|
-
|
|
2519
|
-
throw new Error ("Expected ']'.");
|
|
2520
|
-
}
|
|
2521
|
-
|
|
2522
|
-
return false;
|
|
2523
|
-
},
|
|
2524
|
-
sftimeValues: function (field)
|
|
2525
|
-
{
|
|
2526
|
-
field .length = 0;
|
|
2527
|
-
field = field .getTarget ();
|
|
2528
|
-
|
|
2529
|
-
while (this .sftimeValue (this .SFTime))
|
|
2530
|
-
{
|
|
2531
|
-
field .push (this .SFTime);
|
|
2532
|
-
}
|
|
2533
|
-
},
|
|
2534
|
-
sfvec2dValue: function (field)
|
|
2293
|
+
sfvec2Value (field, unit)
|
|
2535
2294
|
{
|
|
2536
2295
|
if (this .double ())
|
|
2537
2296
|
{
|
|
2538
|
-
|
|
2297
|
+
const x = this .value;
|
|
2539
2298
|
|
|
2540
2299
|
if (this .double ())
|
|
2541
2300
|
{
|
|
2542
|
-
|
|
2543
|
-
y = this .value,
|
|
2544
|
-
category = field .getUnit ();
|
|
2301
|
+
const y = this .value;
|
|
2545
2302
|
|
|
2546
|
-
field .x = this .fromUnit (
|
|
2547
|
-
field .y = this .fromUnit (
|
|
2303
|
+
field .x = this .fromUnit (unit, x);
|
|
2304
|
+
field .y = this .fromUnit (unit, y);
|
|
2548
2305
|
|
|
2549
2306
|
return true;
|
|
2550
2307
|
}
|
|
@@ -2552,65 +2309,19 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2552
2309
|
|
|
2553
2310
|
return false;
|
|
2554
2311
|
},
|
|
2555
|
-
|
|
2556
|
-
{
|
|
2557
|
-
field .length = 0;
|
|
2558
|
-
|
|
2559
|
-
this .SFVec2d .setUnit (field .getUnit ());
|
|
2560
|
-
|
|
2561
|
-
if (this .sfvec2dValue (this .SFVec2d))
|
|
2562
|
-
{
|
|
2563
|
-
field .push (this .SFVec2d);
|
|
2564
|
-
return true;
|
|
2565
|
-
}
|
|
2566
|
-
|
|
2567
|
-
if (Grammar .OpenBracket .parse (this))
|
|
2568
|
-
{
|
|
2569
|
-
this .sfvec2dValues (field);
|
|
2570
|
-
|
|
2571
|
-
this .comments ();
|
|
2572
|
-
|
|
2573
|
-
if (Grammar .CloseBracket .parse (this))
|
|
2574
|
-
return true;
|
|
2575
|
-
|
|
2576
|
-
throw new Error ("Expected ']'.");
|
|
2577
|
-
}
|
|
2578
|
-
|
|
2579
|
-
return false;
|
|
2580
|
-
},
|
|
2581
|
-
sfvec2dValues: function (field)
|
|
2312
|
+
mfvec2Value (field)
|
|
2582
2313
|
{
|
|
2583
2314
|
field .length = 0;
|
|
2584
|
-
field = field .getTarget ();
|
|
2585
|
-
|
|
2586
|
-
this .SFVec2d .setUnit (field .getUnit ());
|
|
2587
|
-
|
|
2588
|
-
while (this .sfvec2dValue (this .SFVec2d))
|
|
2589
|
-
{
|
|
2590
|
-
field .push (this .SFVec2d);
|
|
2591
|
-
}
|
|
2592
|
-
},
|
|
2593
|
-
sfvec2fValue: function (field)
|
|
2594
|
-
{
|
|
2595
|
-
return this .sfvec2dValue (field);
|
|
2596
|
-
},
|
|
2597
|
-
mfvec2fValue: function (field)
|
|
2598
|
-
{
|
|
2599
|
-
field .length = 0;
|
|
2600
|
-
|
|
2601
|
-
this .SFVec2f .setUnit (field .getUnit ());
|
|
2602
2315
|
|
|
2603
|
-
if (this .
|
|
2316
|
+
if (this .sfvec2Value (this .Vector2, field .getUnit ()))
|
|
2604
2317
|
{
|
|
2605
|
-
field .push (this .
|
|
2318
|
+
field .push (this .Vector2);
|
|
2606
2319
|
return true;
|
|
2607
2320
|
}
|
|
2608
2321
|
|
|
2609
2322
|
if (Grammar .OpenBracket .parse (this))
|
|
2610
2323
|
{
|
|
2611
|
-
this .
|
|
2612
|
-
|
|
2613
|
-
this .comments ();
|
|
2324
|
+
this .sfvec2Values (field);
|
|
2614
2325
|
|
|
2615
2326
|
if (Grammar .CloseBracket .parse (this))
|
|
2616
2327
|
return true;
|
|
@@ -2620,37 +2331,35 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2620
2331
|
|
|
2621
2332
|
return false;
|
|
2622
2333
|
},
|
|
2623
|
-
|
|
2334
|
+
sfvec2Values (field)
|
|
2624
2335
|
{
|
|
2625
2336
|
field .length = 0;
|
|
2626
2337
|
field = field .getTarget ();
|
|
2627
2338
|
|
|
2628
|
-
|
|
2339
|
+
const
|
|
2340
|
+
value = this .Vector2,
|
|
2341
|
+
unit = field .getUnit ();
|
|
2629
2342
|
|
|
2630
|
-
while (this .
|
|
2631
|
-
|
|
2632
|
-
field .push (this .SFVec2f);
|
|
2633
|
-
}
|
|
2343
|
+
while (this .sfvec2Value (value, unit))
|
|
2344
|
+
field .push (value);
|
|
2634
2345
|
},
|
|
2635
|
-
|
|
2346
|
+
sfvec3Value (field, unit)
|
|
2636
2347
|
{
|
|
2637
2348
|
if (this .double ())
|
|
2638
2349
|
{
|
|
2639
|
-
|
|
2350
|
+
const x = this .value;
|
|
2640
2351
|
|
|
2641
2352
|
if (this .double ())
|
|
2642
2353
|
{
|
|
2643
|
-
|
|
2354
|
+
const y = this .value;
|
|
2644
2355
|
|
|
2645
2356
|
if (this .double ())
|
|
2646
2357
|
{
|
|
2647
|
-
|
|
2648
|
-
z = this .value,
|
|
2649
|
-
category = field .getUnit ();
|
|
2358
|
+
const z = this .value;
|
|
2650
2359
|
|
|
2651
|
-
field .x = this .fromUnit (
|
|
2652
|
-
field .y = this .fromUnit (
|
|
2653
|
-
field .z = this .fromUnit (
|
|
2360
|
+
field .x = this .fromUnit (unit, x);
|
|
2361
|
+
field .y = this .fromUnit (unit, y);
|
|
2362
|
+
field .z = this .fromUnit (unit, z);
|
|
2654
2363
|
|
|
2655
2364
|
return true;
|
|
2656
2365
|
}
|
|
@@ -2659,23 +2368,19 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2659
2368
|
|
|
2660
2369
|
return false;
|
|
2661
2370
|
},
|
|
2662
|
-
|
|
2371
|
+
mfvec3Value (field)
|
|
2663
2372
|
{
|
|
2664
2373
|
field .length = 0;
|
|
2665
2374
|
|
|
2666
|
-
this .
|
|
2667
|
-
|
|
2668
|
-
if (this .sfvec3dValue (this .SFVec3d))
|
|
2375
|
+
if (this .sfvec3Value (this .Vector3, field .getUnit ()))
|
|
2669
2376
|
{
|
|
2670
|
-
field .push (this .
|
|
2377
|
+
field .push (this .Vector3);
|
|
2671
2378
|
return true;
|
|
2672
2379
|
}
|
|
2673
2380
|
|
|
2674
2381
|
if (Grammar .OpenBracket .parse (this))
|
|
2675
2382
|
{
|
|
2676
|
-
this .
|
|
2677
|
-
|
|
2678
|
-
this .comments ();
|
|
2383
|
+
this .sfvec3Values (field);
|
|
2679
2384
|
|
|
2680
2385
|
if (Grammar .CloseBracket .parse (this))
|
|
2681
2386
|
return true;
|
|
@@ -2685,84 +2390,40 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2685
2390
|
|
|
2686
2391
|
return false;
|
|
2687
2392
|
},
|
|
2688
|
-
|
|
2393
|
+
sfvec3Values (field)
|
|
2689
2394
|
{
|
|
2690
2395
|
field .length = 0;
|
|
2691
2396
|
field = field .getTarget ();
|
|
2692
2397
|
|
|
2693
|
-
|
|
2398
|
+
const
|
|
2399
|
+
value = this .Vector3,
|
|
2400
|
+
unit = field .getUnit ();
|
|
2694
2401
|
|
|
2695
|
-
while (this .
|
|
2696
|
-
|
|
2697
|
-
field .push (this .SFVec3d);
|
|
2698
|
-
}
|
|
2402
|
+
while (this .sfvec3Value (value, unit))
|
|
2403
|
+
field .push (value);
|
|
2699
2404
|
},
|
|
2700
|
-
|
|
2701
|
-
{
|
|
2702
|
-
return this .sfvec3dValue (field);
|
|
2703
|
-
},
|
|
2704
|
-
mfvec3fValue: function (field)
|
|
2705
|
-
{
|
|
2706
|
-
field .length = 0;
|
|
2707
|
-
|
|
2708
|
-
this .SFVec3f .setUnit (field .getUnit ());
|
|
2709
|
-
|
|
2710
|
-
if (this .sfvec3fValue (this .SFVec3f))
|
|
2711
|
-
{
|
|
2712
|
-
field .push (this .SFVec3f);
|
|
2713
|
-
return true;
|
|
2714
|
-
}
|
|
2715
|
-
|
|
2716
|
-
if (Grammar .OpenBracket .parse (this))
|
|
2717
|
-
{
|
|
2718
|
-
this .sfvec3fValues (field);
|
|
2719
|
-
|
|
2720
|
-
this .comments ();
|
|
2721
|
-
|
|
2722
|
-
if (Grammar .CloseBracket .parse (this))
|
|
2723
|
-
return true;
|
|
2724
|
-
|
|
2725
|
-
throw new Error ("Expected ']'.");
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
return false;
|
|
2729
|
-
},
|
|
2730
|
-
sfvec3fValues: function (field)
|
|
2731
|
-
{
|
|
2732
|
-
field .length = 0;
|
|
2733
|
-
field = field .getTarget ();
|
|
2734
|
-
|
|
2735
|
-
this .SFVec3f .setUnit (field .getUnit ());
|
|
2736
|
-
|
|
2737
|
-
while (this .sfvec3fValue (this .SFVec3f))
|
|
2738
|
-
{
|
|
2739
|
-
field .push (this .SFVec3f);
|
|
2740
|
-
}
|
|
2741
|
-
},
|
|
2742
|
-
sfvec4dValue: function (field)
|
|
2405
|
+
sfvec4Value (field, unit)
|
|
2743
2406
|
{
|
|
2744
2407
|
if (this .double ())
|
|
2745
2408
|
{
|
|
2746
|
-
|
|
2409
|
+
const x = this .value;
|
|
2747
2410
|
|
|
2748
2411
|
if (this .double ())
|
|
2749
2412
|
{
|
|
2750
|
-
|
|
2413
|
+
const y = this .value;
|
|
2751
2414
|
|
|
2752
2415
|
if (this .double ())
|
|
2753
2416
|
{
|
|
2754
|
-
|
|
2417
|
+
const z = this .value;
|
|
2755
2418
|
|
|
2756
2419
|
if (this .double ())
|
|
2757
2420
|
{
|
|
2758
|
-
|
|
2759
|
-
w = this .value,
|
|
2760
|
-
category = field .getUnit ();
|
|
2421
|
+
const w = this .value;
|
|
2761
2422
|
|
|
2762
|
-
field .x = this .fromUnit (
|
|
2763
|
-
field .y = this .fromUnit (
|
|
2764
|
-
field .z = this .fromUnit (
|
|
2765
|
-
field .w = this .fromUnit (
|
|
2423
|
+
field .x = this .fromUnit (unit, x);
|
|
2424
|
+
field .y = this .fromUnit (unit, y);
|
|
2425
|
+
field .z = this .fromUnit (unit, z);
|
|
2426
|
+
field .w = this .fromUnit (unit, w);
|
|
2766
2427
|
|
|
2767
2428
|
return true;
|
|
2768
2429
|
}
|
|
@@ -2772,65 +2433,19 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2772
2433
|
|
|
2773
2434
|
return false;
|
|
2774
2435
|
},
|
|
2775
|
-
|
|
2776
|
-
{
|
|
2777
|
-
field .length = 0;
|
|
2778
|
-
|
|
2779
|
-
this .SFVec4d .setUnit (field .getUnit ());
|
|
2780
|
-
|
|
2781
|
-
if (this .sfvec4dValue (this .SFVec4d))
|
|
2782
|
-
{
|
|
2783
|
-
field .push (this .SFVec4d);
|
|
2784
|
-
return true;
|
|
2785
|
-
}
|
|
2786
|
-
|
|
2787
|
-
if (Grammar .OpenBracket .parse (this))
|
|
2788
|
-
{
|
|
2789
|
-
this .sfvec4dValues (field);
|
|
2790
|
-
|
|
2791
|
-
this .comments ();
|
|
2792
|
-
|
|
2793
|
-
if (Grammar .CloseBracket .parse (this))
|
|
2794
|
-
return true;
|
|
2795
|
-
|
|
2796
|
-
throw new Error ("Expected ']'.");
|
|
2797
|
-
}
|
|
2798
|
-
|
|
2799
|
-
return false;
|
|
2800
|
-
},
|
|
2801
|
-
sfvec4dValues: function (field)
|
|
2802
|
-
{
|
|
2803
|
-
field .length = 0;
|
|
2804
|
-
field = field .getTarget ();
|
|
2805
|
-
|
|
2806
|
-
this .SFVec4d .setUnit (field .getUnit ());
|
|
2807
|
-
|
|
2808
|
-
while (this .sfvec4dValue (this .SFVec4d))
|
|
2809
|
-
{
|
|
2810
|
-
field .push (this .SFVec4d);
|
|
2811
|
-
}
|
|
2812
|
-
},
|
|
2813
|
-
sfvec4fValue: function (field)
|
|
2814
|
-
{
|
|
2815
|
-
return this .sfvec4dValue (field);
|
|
2816
|
-
},
|
|
2817
|
-
mfvec4fValue: function (field)
|
|
2436
|
+
mfvec4Value (field)
|
|
2818
2437
|
{
|
|
2819
2438
|
field .length = 0;
|
|
2820
2439
|
|
|
2821
|
-
this .
|
|
2822
|
-
|
|
2823
|
-
if (this .sfvec4fValue (this .SFVec4f))
|
|
2440
|
+
if (this .sfvec4Value (this .Vector4, field .getUnit ()))
|
|
2824
2441
|
{
|
|
2825
|
-
field .push (this .
|
|
2442
|
+
field .push (this .Vector4);
|
|
2826
2443
|
return true;
|
|
2827
2444
|
}
|
|
2828
2445
|
|
|
2829
2446
|
if (Grammar .OpenBracket .parse (this))
|
|
2830
2447
|
{
|
|
2831
|
-
this .
|
|
2832
|
-
|
|
2833
|
-
this .comments ();
|
|
2448
|
+
this .sfvec4Values (field);
|
|
2834
2449
|
|
|
2835
2450
|
if (Grammar .CloseBracket .parse (this))
|
|
2836
2451
|
return true;
|
|
@@ -2840,19 +2455,19 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2840
2455
|
|
|
2841
2456
|
return false;
|
|
2842
2457
|
},
|
|
2843
|
-
|
|
2458
|
+
sfvec4Values (field)
|
|
2844
2459
|
{
|
|
2845
2460
|
field .length = 0;
|
|
2846
2461
|
field = field .getTarget ();
|
|
2847
2462
|
|
|
2848
|
-
|
|
2463
|
+
const
|
|
2464
|
+
value = this .Vector4,
|
|
2465
|
+
unit = field .getUnit ();
|
|
2849
2466
|
|
|
2850
|
-
while (this .
|
|
2851
|
-
|
|
2852
|
-
field .push (this .SFVec4f);
|
|
2853
|
-
}
|
|
2467
|
+
while (this .sfvec4Value (value, unit))
|
|
2468
|
+
field .push (value);
|
|
2854
2469
|
},
|
|
2855
|
-
accessTypeToString
|
|
2470
|
+
accessTypeToString (accessType)
|
|
2856
2471
|
{
|
|
2857
2472
|
switch (accessType)
|
|
2858
2473
|
{
|
|
@@ -2868,50 +2483,52 @@ VRMLParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|
|
|
2868
2483
|
},
|
|
2869
2484
|
});
|
|
2870
2485
|
|
|
2871
|
-
VRMLParser .prototype
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2486
|
+
Object .assign (VRMLParser .prototype,
|
|
2487
|
+
{
|
|
2488
|
+
[X3DConstants .SFBool]: VRMLParser .prototype .sfboolValue,
|
|
2489
|
+
[X3DConstants .SFColor]: VRMLParser .prototype .sfcolorValue,
|
|
2490
|
+
[X3DConstants .SFColorRGBA]: VRMLParser .prototype .sfcolorrgbaValue,
|
|
2491
|
+
[X3DConstants .SFDouble]: VRMLParser .prototype .sfdoubleValue,
|
|
2492
|
+
[X3DConstants .SFFloat]: VRMLParser .prototype .sfdoubleValue,
|
|
2493
|
+
[X3DConstants .SFImage]: VRMLParser .prototype .sfimageValue,
|
|
2494
|
+
[X3DConstants .SFInt32]: VRMLParser .prototype .sfint32Value,
|
|
2495
|
+
[X3DConstants .SFMatrix3f]: VRMLParser .prototype .sfmatrix3Value,
|
|
2496
|
+
[X3DConstants .SFMatrix3d]: VRMLParser .prototype .sfmatrix3Value,
|
|
2497
|
+
[X3DConstants .SFMatrix4f]: VRMLParser .prototype .sfmatrix4Value,
|
|
2498
|
+
[X3DConstants .SFMatrix4d]: VRMLParser .prototype .sfmatrix4Value,
|
|
2499
|
+
[X3DConstants .SFNode]: VRMLParser .prototype .sfnodeValue,
|
|
2500
|
+
[X3DConstants .SFRotation]: VRMLParser .prototype .sfrotationValue,
|
|
2501
|
+
[X3DConstants .SFString]: VRMLParser .prototype .sfstringValue,
|
|
2502
|
+
[X3DConstants .SFTime]: VRMLParser .prototype .sfdoubleValue,
|
|
2503
|
+
[X3DConstants .SFVec2d]: VRMLParser .prototype .sfvec2Value,
|
|
2504
|
+
[X3DConstants .SFVec2f]: VRMLParser .prototype .sfvec2Value,
|
|
2505
|
+
[X3DConstants .SFVec3d]: VRMLParser .prototype .sfvec3Value,
|
|
2506
|
+
[X3DConstants .SFVec3f]: VRMLParser .prototype .sfvec3Value,
|
|
2507
|
+
[X3DConstants .SFVec4d]: VRMLParser .prototype .sfvec4Value,
|
|
2508
|
+
[X3DConstants .SFVec4f]: VRMLParser .prototype .sfvec4Value,
|
|
2509
|
+
|
|
2510
|
+
[X3DConstants .MFBool]: VRMLParser .prototype .mfboolValue,
|
|
2511
|
+
[X3DConstants .MFColor]: VRMLParser .prototype .mfcolorValue,
|
|
2512
|
+
[X3DConstants .MFColorRGBA]: VRMLParser .prototype .mfcolorrgbaValue,
|
|
2513
|
+
[X3DConstants .MFDouble]: VRMLParser .prototype .mfdoubleValue,
|
|
2514
|
+
[X3DConstants .MFFloat]: VRMLParser .prototype .mfdoubleValue,
|
|
2515
|
+
[X3DConstants .MFImage]: VRMLParser .prototype .mfimageValue,
|
|
2516
|
+
[X3DConstants .MFInt32]: VRMLParser .prototype .mfint32Value,
|
|
2517
|
+
[X3DConstants .MFMatrix3d]: VRMLParser .prototype .mfmatrix3Value,
|
|
2518
|
+
[X3DConstants .MFMatrix3f]: VRMLParser .prototype .mfmatrix3Value,
|
|
2519
|
+
[X3DConstants .MFMatrix4d]: VRMLParser .prototype .mfmatrix4Value,
|
|
2520
|
+
[X3DConstants .MFMatrix4f]: VRMLParser .prototype .mfmatrix4Value,
|
|
2521
|
+
[X3DConstants .MFNode]: VRMLParser .prototype .mfnodeValue,
|
|
2522
|
+
[X3DConstants .MFRotation]: VRMLParser .prototype .mfrotationValue,
|
|
2523
|
+
[X3DConstants .MFString]: VRMLParser .prototype .mfstringValue,
|
|
2524
|
+
[X3DConstants .MFTime]: VRMLParser .prototype .mfdoubleValue,
|
|
2525
|
+
[X3DConstants .MFVec2d]: VRMLParser .prototype .mfvec2Value,
|
|
2526
|
+
[X3DConstants .MFVec2f]: VRMLParser .prototype .mfvec2Value,
|
|
2527
|
+
[X3DConstants .MFVec3d]: VRMLParser .prototype .mfvec3Value,
|
|
2528
|
+
[X3DConstants .MFVec3f]: VRMLParser .prototype .mfvec3Value,
|
|
2529
|
+
[X3DConstants .MFVec4d]: VRMLParser .prototype .mfvec4Value,
|
|
2530
|
+
[X3DConstants .MFVec4f]: VRMLParser .prototype .mfvec4Value,
|
|
2531
|
+
});
|
|
2915
2532
|
|
|
2916
2533
|
X3DField .prototype .fromString = function (string, scene)
|
|
2917
2534
|
{
|
|
@@ -2923,7 +2540,7 @@ X3DField .prototype .fromString = function (string, scene)
|
|
|
2923
2540
|
if (parser .fieldValue (this))
|
|
2924
2541
|
return;
|
|
2925
2542
|
|
|
2926
|
-
throw new Error (
|
|
2543
|
+
throw new Error (`Couldn't read value for field '${this .getName ()}'.`);
|
|
2927
2544
|
};
|
|
2928
2545
|
|
|
2929
2546
|
export default VRMLParser;
|