x_ite 8.11.7 → 8.11.9
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/README.md +4 -0
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +23 -23
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +26 -26
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +23 -23
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +18 -18
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +17 -17
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +37 -37
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +24 -24
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +14 -14
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +30 -30
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +18 -18
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +159 -145
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/package.json +16 -13
- package/.github/workflows/pages-deploy.yml +0 -64
- package/.vscode/launch.json +0 -15
- package/.vscode/settings.json +0 -44
- package/.vscode/tasks.json +0 -31
- package/Makefile +0 -82
- package/build/bin/bump.pl +0 -21
- package/build/bin/tests.pl +0 -203
- package/build/bin/version.pl +0 -157
- package/build/docs/components.js +0 -218
- package/build/docs/glTF-samples.pl +0 -151
- package/build/docs/nodes.pl +0 -434
- package/build/docs/tags.pl +0 -28
- package/build/src/nodes.pl +0 -41
- package/docs/Gemfile +0 -19
- package/docs/LICENSE +0 -21
- package/docs/README.md +0 -46
- package/docs/_config.yml +0 -203
- package/docs/_data/assets/cross_origin.yml +0 -62
- package/docs/_data/assets/self_host.yml +0 -51
- package/docs/_data/contact.yml +0 -30
- package/docs/_data/locales/bg-BG.yml +0 -83
- package/docs/_data/locales/de-DE.yml +0 -82
- package/docs/_data/locales/en.yml +0 -93
- package/docs/_data/locales/es-ES.yml +0 -79
- package/docs/_data/locales/fr-FR.yml +0 -79
- package/docs/_data/locales/hu-HU.yml +0 -81
- package/docs/_data/locales/id-ID.yml +0 -79
- package/docs/_data/locales/ko-KR.yml +0 -86
- package/docs/_data/locales/my-MM.yml +0 -79
- package/docs/_data/locales/pt-BR.yml +0 -79
- package/docs/_data/locales/ru-RU.yml +0 -79
- package/docs/_data/locales/tr-TR.yml +0 -79
- package/docs/_data/locales/uk-UA.yml +0 -79
- package/docs/_data/locales/vi-VN.yml +0 -77
- package/docs/_data/locales/zh-CN.yml +0 -85
- package/docs/_data/nav/components-CADGeometry.yml +0 -14
- package/docs/_data/nav/components-Core.yml +0 -16
- package/docs/_data/nav/components-CubeMapTexturing.yml +0 -8
- package/docs/_data/nav/components-DIS.yml +0 -14
- package/docs/_data/nav/components-EnvironmentalEffects.yml +0 -12
- package/docs/_data/nav/components-EnvironmentalSensor.yml +0 -8
- package/docs/_data/nav/components-EventUtilities.yml +0 -16
- package/docs/_data/nav/components-Followers.yml +0 -30
- package/docs/_data/nav/components-Geometry2D.yml +0 -18
- package/docs/_data/nav/components-Geometry3D.yml +0 -16
- package/docs/_data/nav/components-Geospatial.yml +0 -24
- package/docs/_data/nav/components-Grouping.yml +0 -10
- package/docs/_data/nav/components-HAnim.yml +0 -14
- package/docs/_data/nav/components-Interpolation.yml +0 -28
- package/docs/_data/nav/components-KeyDeviceSensor.yml +0 -6
- package/docs/_data/nav/components-Layering.yml +0 -8
- package/docs/_data/nav/components-Layout.yml +0 -12
- package/docs/_data/nav/components-Lighting.yml +0 -10
- package/docs/_data/nav/components-NURBS.yml +0 -30
- package/docs/_data/nav/components-Navigation.yml +0 -16
- package/docs/_data/nav/components-Networking.yml +0 -8
- package/docs/_data/nav/components-ParticleSystems.yml +0 -22
- package/docs/_data/nav/components-Picking.yml +0 -12
- package/docs/_data/nav/components-PointingDeviceSensor.yml +0 -10
- package/docs/_data/nav/components-Rendering.yml +0 -30
- package/docs/_data/nav/components-RigidBodyPhysics.yml +0 -30
- package/docs/_data/nav/components-Scripting.yml +0 -4
- package/docs/_data/nav/components-Shaders.yml +0 -18
- package/docs/_data/nav/components-Shape.yml +0 -22
- package/docs/_data/nav/components-Sound.yml +0 -44
- package/docs/_data/nav/components-Text.yml +0 -6
- package/docs/_data/nav/components-TextureProjector.yml +0 -6
- package/docs/_data/nav/components-Texturing.yml +0 -22
- package/docs/_data/nav/components-Texturing3D.yml +0 -18
- package/docs/_data/nav/components-Time.yml +0 -4
- package/docs/_data/nav/components-VolumeRendering.yml +0 -28
- package/docs/_data/nav/components-X_ITE.yml +0 -4
- package/docs/_data/nav/main.yml +0 -26
- package/docs/_data/nav/reference.yml +0 -18
- package/docs/_data/nav/tutorials-animation-sensors-and-geometry.yml +0 -18
- package/docs/_data/nav/tutorials-basic.yml +0 -6
- package/docs/_data/nav/tutorials-optimize-your-scene.yml +0 -6
- package/docs/_data/nav/tutorials-scripts-and-prototypes.yml +0 -12
- package/docs/_data/nav/tutorials-shapes-geometry-and-appearance.yml +0 -16
- package/docs/_data/nav/tutorials-textures-lights-and-environment.yml +0 -20
- package/docs/_data/share.yml +0 -27
- package/docs/_includes/nav.html +0 -19
- package/docs/_includes/scripts.html +0 -3
- package/docs/_layouts/compress.html +0 -11
- package/docs/_layouts/redirect-page.html +0 -6
- package/docs/_layouts/wide.html +0 -52
- package/docs/_layouts/wrap.html +0 -4
- package/docs/_layouts/x_ite.html +0 -8
- package/docs/_plugins/no_date.rb +0 -11
- package/docs/_plugins/posts-lastmod-hook.rb +0 -14
- package/docs/_posts/accessing-the-external-browser.md +0 -312
- package/docs/_posts/browser-support.md +0 -53
- package/docs/_posts/components/CADGeometry/CADAssembly.md +0 -126
- package/docs/_posts/components/CADGeometry/CADFace.md +0 -113
- package/docs/_posts/components/CADGeometry/CADLayer.md +0 -126
- package/docs/_posts/components/CADGeometry/CADPart.md +0 -164
- package/docs/_posts/components/CADGeometry/IndexedQuadSet.md +0 -154
- package/docs/_posts/components/CADGeometry/QuadSet.md +0 -145
- package/docs/_posts/components/Core/MetadataBoolean.md +0 -83
- package/docs/_posts/components/Core/MetadataDouble.md +0 -84
- package/docs/_posts/components/Core/MetadataFloat.md +0 -84
- package/docs/_posts/components/Core/MetadataInteger.md +0 -83
- package/docs/_posts/components/Core/MetadataSet.md +0 -80
- package/docs/_posts/components/Core/MetadataString.md +0 -83
- package/docs/_posts/components/Core/WorldInfo.md +0 -65
- package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +0 -123
- package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +0 -82
- package/docs/_posts/components/CubeMapTexturing/ImageCubeMapTexture.md +0 -112
- package/docs/_posts/components/DIS/DISEntityManager.md +0 -98
- package/docs/_posts/components/DIS/DISEntityTypeMapping.md +0 -131
- package/docs/_posts/components/DIS/EspduTransform.md +0 -566
- package/docs/_posts/components/DIS/ReceiverPdu.md +0 -235
- package/docs/_posts/components/DIS/SignalPdu.md +0 -239
- package/docs/_posts/components/DIS/TransmitterPdu.md +0 -299
- package/docs/_posts/components/EnvironmentalEffects/Background.md +0 -230
- package/docs/_posts/components/EnvironmentalEffects/Fog.md +0 -118
- package/docs/_posts/components/EnvironmentalEffects/FogCoordinate.md +0 -44
- package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +0 -91
- package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +0 -194
- package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +0 -118
- package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +0 -115
- package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +0 -89
- package/docs/_posts/components/EventUtilities/BooleanFilter.md +0 -75
- package/docs/_posts/components/EventUtilities/BooleanSequencer.md +0 -115
- package/docs/_posts/components/EventUtilities/BooleanToggle.md +0 -67
- package/docs/_posts/components/EventUtilities/BooleanTrigger.md +0 -64
- package/docs/_posts/components/EventUtilities/IntegerSequencer.md +0 -119
- package/docs/_posts/components/EventUtilities/IntegerTrigger.md +0 -76
- package/docs/_posts/components/EventUtilities/TimeTrigger.md +0 -68
- package/docs/_posts/components/Followers/ColorChaser.md +0 -101
- package/docs/_posts/components/Followers/ColorDamper.md +0 -105
- package/docs/_posts/components/Followers/CoordinateChaser.md +0 -100
- package/docs/_posts/components/Followers/CoordinateDamper.md +0 -100
- package/docs/_posts/components/Followers/OrientationChaser.md +0 -96
- package/docs/_posts/components/Followers/OrientationDamper.md +0 -100
- package/docs/_posts/components/Followers/PositionChaser.md +0 -96
- package/docs/_posts/components/Followers/PositionChaser2D.md +0 -96
- package/docs/_posts/components/Followers/PositionDamper.md +0 -100
- package/docs/_posts/components/Followers/PositionDamper2D.md +0 -100
- package/docs/_posts/components/Followers/ScalarChaser.md +0 -100
- package/docs/_posts/components/Followers/ScalarDamper.md +0 -100
- package/docs/_posts/components/Followers/TexCoordChaser2D.md +0 -96
- package/docs/_posts/components/Followers/TexCoordDamper2D.md +0 -100
- package/docs/_posts/components/Geometry2D/Arc2D.md +0 -96
- package/docs/_posts/components/Geometry2D/ArcClose2D.md +0 -115
- package/docs/_posts/components/Geometry2D/Circle2D.md +0 -66
- package/docs/_posts/components/Geometry2D/Disk2D.md +0 -93
- package/docs/_posts/components/Geometry2D/Polyline2D.md +0 -69
- package/docs/_posts/components/Geometry2D/Polypoint2D.md +0 -62
- package/docs/_posts/components/Geometry2D/Rectangle2D.md +0 -77
- package/docs/_posts/components/Geometry2D/TriangleSet2D.md +0 -77
- package/docs/_posts/components/Geometry3D/Box.md +0 -79
- package/docs/_posts/components/Geometry3D/Cone.md +0 -98
- package/docs/_posts/components/Geometry3D/Cylinder.md +0 -102
- package/docs/_posts/components/Geometry3D/ElevationGrid.md +0 -206
- package/docs/_posts/components/Geometry3D/Extrusion.md +0 -222
- package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +0 -260
- package/docs/_posts/components/Geometry3D/Sphere.md +0 -78
- package/docs/_posts/components/Geospatial/GeoCoordinate.md +0 -81
- package/docs/_posts/components/Geospatial/GeoElevationGrid.md +0 -225
- package/docs/_posts/components/Geospatial/GeoLOD.md +0 -184
- package/docs/_posts/components/Geospatial/GeoLocation.md +0 -148
- package/docs/_posts/components/Geospatial/GeoMetadata.md +0 -117
- package/docs/_posts/components/Geospatial/GeoOrigin.md +0 -84
- package/docs/_posts/components/Geospatial/GeoPositionInterpolator.md +0 -141
- package/docs/_posts/components/Geospatial/GeoProximitySensor.md +0 -158
- package/docs/_posts/components/Geospatial/GeoTouchSensor.md +0 -153
- package/docs/_posts/components/Geospatial/GeoTransform.md +0 -182
- package/docs/_posts/components/Geospatial/GeoViewpoint.md +0 -214
- package/docs/_posts/components/Grouping/Group.md +0 -108
- package/docs/_posts/components/Grouping/StaticGroup.md +0 -103
- package/docs/_posts/components/Grouping/Switch.md +0 -125
- package/docs/_posts/components/Grouping/Transform.md +0 -160
- package/docs/_posts/components/HAnim/HAnimDisplacer.md +0 -108
- package/docs/_posts/components/HAnim/HAnimHumanoid.md +0 -351
- package/docs/_posts/components/HAnim/HAnimJoint.md +0 -256
- package/docs/_posts/components/HAnim/HAnimMotion.md +0 -186
- package/docs/_posts/components/HAnim/HAnimSegment.md +0 -172
- package/docs/_posts/components/HAnim/HAnimSite.md +0 -176
- package/docs/_posts/components/Interpolation/ColorInterpolator.md +0 -103
- package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +0 -102
- package/docs/_posts/components/Interpolation/CoordinateInterpolator2D.md +0 -102
- package/docs/_posts/components/Interpolation/EaseInEaseOut.md +0 -91
- package/docs/_posts/components/Interpolation/NormalInterpolator.md +0 -98
- package/docs/_posts/components/Interpolation/OrientationInterpolator.md +0 -102
- package/docs/_posts/components/Interpolation/PositionInterpolator.md +0 -102
- package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +0 -106
- package/docs/_posts/components/Interpolation/ScalarInterpolator.md +0 -102
- package/docs/_posts/components/Interpolation/SplinePositionInterpolator.md +0 -118
- package/docs/_posts/components/Interpolation/SplinePositionInterpolator2D.md +0 -118
- package/docs/_posts/components/Interpolation/SplineScalarInterpolator.md +0 -122
- package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.md +0 -102
- package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +0 -120
- package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +0 -92
- package/docs/_posts/components/Layering/Layer.md +0 -92
- package/docs/_posts/components/Layering/LayerSet.md +0 -84
- package/docs/_posts/components/Layering/Viewport.md +0 -113
- package/docs/_posts/components/Layout/Layout.md +0 -118
- package/docs/_posts/components/Layout/LayoutGroup.md +0 -118
- package/docs/_posts/components/Layout/LayoutLayer.md +0 -99
- package/docs/_posts/components/Layout/ScreenFontStyle.md +0 -164
- package/docs/_posts/components/Layout/ScreenGroup.md +0 -104
- package/docs/_posts/components/Lighting/DirectionalLight.md +0 -108
- package/docs/_posts/components/Lighting/EnvironmentLight.md +0 -87
- package/docs/_posts/components/Lighting/PointLight.md +0 -115
- package/docs/_posts/components/Lighting/SpotLight.md +0 -145
- package/docs/_posts/components/NURBS/Contour2D.md +0 -65
- package/docs/_posts/components/NURBS/ContourPolyline2D.md +0 -50
- package/docs/_posts/components/NURBS/CoordinateDouble.md +0 -51
- package/docs/_posts/components/NURBS/NurbsCurve.md +0 -75
- package/docs/_posts/components/NURBS/NurbsCurve2D.md +0 -70
- package/docs/_posts/components/NURBS/NurbsOrientationInterpolator.md +0 -86
- package/docs/_posts/components/NURBS/NurbsPatchSurface.md +0 -112
- package/docs/_posts/components/NURBS/NurbsPositionInterpolator.md +0 -86
- package/docs/_posts/components/NURBS/NurbsSet.md +0 -117
- package/docs/_posts/components/NURBS/NurbsSurfaceInterpolator.md +0 -110
- package/docs/_posts/components/NURBS/NurbsSweptSurface.md +0 -86
- package/docs/_posts/components/NURBS/NurbsSwungSurface.md +0 -76
- package/docs/_posts/components/NURBS/NurbsTextureCoordinate.md +0 -81
- package/docs/_posts/components/NURBS/NurbsTrimmedSurface.md +0 -124
- package/docs/_posts/components/Navigation/Billboard.md +0 -121
- package/docs/_posts/components/Navigation/Collision.md +0 -156
- package/docs/_posts/components/Navigation/LOD.md +0 -146
- package/docs/_posts/components/Navigation/NavigationInfo.md +0 -170
- package/docs/_posts/components/Navigation/OrthoViewpoint.md +0 -209
- package/docs/_posts/components/Navigation/Viewpoint.md +0 -213
- package/docs/_posts/components/Navigation/ViewpointGroup.md +0 -91
- package/docs/_posts/components/Networking/Anchor.md +0 -160
- package/docs/_posts/components/Networking/Inline.md +0 -161
- package/docs/_posts/components/Networking/LoadSensor.md +0 -123
- package/docs/_posts/components/ParticleSystems/BoundedPhysicsModel.md +0 -62
- package/docs/_posts/components/ParticleSystems/ConeEmitter.md +0 -95
- package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +0 -83
- package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +0 -65
- package/docs/_posts/components/ParticleSystems/ParticleSystem.md +0 -249
- package/docs/_posts/components/ParticleSystems/PointEmitter.md +0 -87
- package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +0 -106
- package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +0 -101
- package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +0 -109
- package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +0 -72
- package/docs/_posts/components/Picking/LinePickSensor.md +0 -151
- package/docs/_posts/components/Picking/PickableGroup.md +0 -128
- package/docs/_posts/components/Picking/PointPickSensor.md +0 -133
- package/docs/_posts/components/Picking/PrimitivePickSensor.md +0 -126
- package/docs/_posts/components/Picking/VolumePickSensor.md +0 -124
- package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +0 -147
- package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +0 -137
- package/docs/_posts/components/PointingDeviceSensor/SphereSensor.md +0 -111
- package/docs/_posts/components/PointingDeviceSensor/TouchSensor.md +0 -121
- package/docs/_posts/components/Rendering/ClipPlane.md +0 -72
- package/docs/_posts/components/Rendering/Color.md +0 -56
- package/docs/_posts/components/Rendering/ColorRGBA.md +0 -65
- package/docs/_posts/components/Rendering/Coordinate.md +0 -49
- package/docs/_posts/components/Rendering/IndexedLineSet.md +0 -156
- package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +0 -149
- package/docs/_posts/components/Rendering/IndexedTriangleSet.md +0 -149
- package/docs/_posts/components/Rendering/IndexedTriangleStripSet.md +0 -141
- package/docs/_posts/components/Rendering/LineSet.md +0 -97
- package/docs/_posts/components/Rendering/Normal.md +0 -63
- package/docs/_posts/components/Rendering/PointSet.md +0 -89
- package/docs/_posts/components/Rendering/TriangleFanSet.md +0 -137
- package/docs/_posts/components/Rendering/TriangleSet.md +0 -133
- package/docs/_posts/components/Rendering/TriangleStripSet.md +0 -141
- package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +0 -90
- package/docs/_posts/components/RigidBodyPhysics/CollidableOffset.md +0 -115
- package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +0 -118
- package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +0 -95
- package/docs/_posts/components/RigidBodyPhysics/CollisionSensor.md +0 -74
- package/docs/_posts/components/RigidBodyPhysics/CollisionSpace.md +0 -106
- package/docs/_posts/components/RigidBodyPhysics/Contact.md +0 -121
- package/docs/_posts/components/RigidBodyPhysics/DoubleAxisHingeJoint.md +0 -164
- package/docs/_posts/components/RigidBodyPhysics/MotorJoint.md +0 -235
- package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +0 -185
- package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +0 -136
- package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +0 -118
- package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +0 -118
- package/docs/_posts/components/RigidBodyPhysics/UniversalJoint.md +0 -127
- package/docs/_posts/components/Scripting/Script.md +0 -139
- package/docs/_posts/components/Shaders/ComposedShader.md +0 -94
- package/docs/_posts/components/Shaders/FloatVertexAttribute.md +0 -74
- package/docs/_posts/components/Shaders/Matrix3VertexAttribute.md +0 -62
- package/docs/_posts/components/Shaders/Matrix4VertexAttribute.md +0 -62
- package/docs/_posts/components/Shaders/PackagedShader.md +0 -137
- package/docs/_posts/components/Shaders/ProgramShader.md +0 -91
- package/docs/_posts/components/Shaders/ShaderPart.md +0 -127
- package/docs/_posts/components/Shaders/ShaderProgram.md +0 -121
- package/docs/_posts/components/Shape/AcousticProperties.md +0 -80
- package/docs/_posts/components/Shape/Appearance.md +0 -130
- package/docs/_posts/components/Shape/FillProperties.md +0 -74
- package/docs/_posts/components/Shape/LineProperties.md +0 -71
- package/docs/_posts/components/Shape/Material.md +0 -235
- package/docs/_posts/components/Shape/PhysicalMaterial.md +0 -189
- package/docs/_posts/components/Shape/PointProperties.md +0 -83
- package/docs/_posts/components/Shape/Shape.md +0 -107
- package/docs/_posts/components/Shape/TwoSidedMaterial.md +0 -148
- package/docs/_posts/components/Shape/UnlitMaterial.md +0 -119
- package/docs/_posts/components/Sound/Analyser.md +0 -205
- package/docs/_posts/components/Sound/AudioClip.md +0 -223
- package/docs/_posts/components/Sound/AudioDestination.md +0 -128
- package/docs/_posts/components/Sound/BiquadFilter.md +0 -213
- package/docs/_posts/components/Sound/BufferAudioSource.md +0 -284
- package/docs/_posts/components/Sound/ChannelMerger.md +0 -108
- package/docs/_posts/components/Sound/ChannelSelector.md +0 -112
- package/docs/_posts/components/Sound/ChannelSplitter.md +0 -116
- package/docs/_posts/components/Sound/Convolver.md +0 -190
- package/docs/_posts/components/Sound/Delay.md +0 -185
- package/docs/_posts/components/Sound/DynamicsCompressor.md +0 -201
- package/docs/_posts/components/Sound/Gain.md +0 -177
- package/docs/_posts/components/Sound/ListenerPointSource.md +0 -171
- package/docs/_posts/components/Sound/MicrophoneSource.md +0 -145
- package/docs/_posts/components/Sound/OscillatorSource.md +0 -153
- package/docs/_posts/components/Sound/PeriodicWave.md +0 -83
- package/docs/_posts/components/Sound/Sound.md +0 -139
- package/docs/_posts/components/Sound/SpatialSound.md +0 -187
- package/docs/_posts/components/Sound/StreamAudioDestination.md +0 -132
- package/docs/_posts/components/Sound/StreamAudioSource.md +0 -145
- package/docs/_posts/components/Sound/WaveShaper.md +0 -189
- package/docs/_posts/components/Text/FontStyle.md +0 -171
- package/docs/_posts/components/Text/Text.md +0 -124
- package/docs/_posts/components/TextureProjector/TextureProjector.md +0 -111
- package/docs/_posts/components/TextureProjector/TextureProjectorParallel.md +0 -112
- package/docs/_posts/components/Texturing/ImageTexture.md +0 -138
- package/docs/_posts/components/Texturing/MovieTexture.md +0 -264
- package/docs/_posts/components/Texturing/MultiTexture.md +0 -128
- package/docs/_posts/components/Texturing/MultiTextureCoordinate.md +0 -64
- package/docs/_posts/components/Texturing/MultiTextureTransform.md +0 -69
- package/docs/_posts/components/Texturing/PixelTexture.md +0 -100
- package/docs/_posts/components/Texturing/TextureCoordinate.md +0 -62
- package/docs/_posts/components/Texturing/TextureCoordinateGenerator.md +0 -74
- package/docs/_posts/components/Texturing/TextureProperties.md +0 -162
- package/docs/_posts/components/Texturing/TextureTransform.md +0 -82
- package/docs/_posts/components/Texturing3D/ComposedTexture3D.md +0 -84
- package/docs/_posts/components/Texturing3D/ImageTexture3D.md +0 -141
- package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +0 -137
- package/docs/_posts/components/Texturing3D/PixelTexture3D.md +0 -87
- package/docs/_posts/components/Texturing3D/TextureCoordinate3D.md +0 -65
- package/docs/_posts/components/Texturing3D/TextureCoordinate4D.md +0 -64
- package/docs/_posts/components/Texturing3D/TextureTransform3D.md +0 -78
- package/docs/_posts/components/Texturing3D/TextureTransformMatrix3D.md +0 -67
- package/docs/_posts/components/Time/TimeSensor.md +0 -187
- package/docs/_posts/components/VolumeRendering/BlendedVolumeStyle.md +0 -113
- package/docs/_posts/components/VolumeRendering/BoundaryEnhancementVolumeStyle.md +0 -63
- package/docs/_posts/components/VolumeRendering/CartoonVolumeStyle.md +0 -86
- package/docs/_posts/components/VolumeRendering/ComposedVolumeStyle.md +0 -59
- package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +0 -75
- package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +0 -138
- package/docs/_posts/components/VolumeRendering/OpacityMapVolumeStyle.md +0 -59
- package/docs/_posts/components/VolumeRendering/ProjectionVolumeStyle.md +0 -70
- package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +0 -130
- package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +0 -83
- package/docs/_posts/components/VolumeRendering/SilhouetteEnhancementVolumeStyle.md +0 -71
- package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +0 -80
- package/docs/_posts/components/VolumeRendering/VolumeData.md +0 -105
- package/docs/_posts/components/X_ITE/BlendMode.md +0 -101
- package/docs/_posts/custom-shaders.md +0 -720
- package/docs/_posts/dom-integration.md +0 -237
- package/docs/_posts/features.md +0 -56
- package/docs/_posts/getting-started.md +0 -845
- package/docs/_posts/glossary.md +0 -344
- package/docs/_posts/how-to-configure-your-web-server.md +0 -61
- package/docs/_posts/laboratory/x3d-file-converter.md +0 -188
- package/docs/_posts/reference/browser-services.md +0 -466
- package/docs/_posts/reference/constants-services.md +0 -381
- package/docs/_posts/reference/ecmascript-object-and-function-definitions.md +0 -50
- package/docs/_posts/reference/field-services-and-objects.md +0 -1137
- package/docs/_posts/reference/prototype-services.md +0 -146
- package/docs/_posts/reference/route-services.md +0 -54
- package/docs/_posts/reference/scene-services.md +0 -392
- package/docs/_posts/reference/script-node-authoring-interface.md +0 -347
- package/docs/_posts/report-a-bug.md +0 -17
- package/docs/_posts/setup-a-localhost-server.md +0 -46
- package/docs/_posts/supported-nodes.md +0 -378
- package/docs/_posts/tutorials/adding-backgrounds.md +0 -273
- package/docs/_posts/tutorials/adding-fog.md +0 -72
- package/docs/_posts/tutorials/adding-sound.md +0 -333
- package/docs/_posts/tutorials/animating-transforms.md +0 -390
- package/docs/_posts/tutorials/basic-nodes.md +0 -312
- package/docs/_posts/tutorials/building-a-x3d-world.md +0 -174
- package/docs/_posts/tutorials/building-elevation-grids.md +0 -177
- package/docs/_posts/tutorials/building-extruded-shapes.md +0 -150
- package/docs/_posts/tutorials/building-primitive-shapes.md +0 -211
- package/docs/_posts/tutorials/building-shapes-out-of-points-lines-and-faces.md +0 -315
- package/docs/_posts/tutorials/controlling-appearance-with-materials.md +0 -193
- package/docs/_posts/tutorials/controlling-color-on-coordinate-based-geometry.md +0 -213
- package/docs/_posts/tutorials/controlling-detail.md +0 -137
- package/docs/_posts/tutorials/controlling-how-textures-are-mapped.md +0 -282
- package/docs/_posts/tutorials/controlling-navigation.md +0 -75
- package/docs/_posts/tutorials/controlling-shading-on-coordinate-based-geometry.md +0 -185
- package/docs/_posts/tutorials/controlling-the-viewpoint.md +0 -54
- package/docs/_posts/tutorials/creating-new-node-types.md +0 -340
- package/docs/_posts/tutorials/grouping-nodes.md +0 -242
- package/docs/_posts/tutorials/hello-world.md +0 -198
- package/docs/_posts/tutorials/improving-performance.md +0 -229
- package/docs/_posts/tutorials/increasing-rendering-speed.md +0 -115
- package/docs/_posts/tutorials/introducing-animation.md +0 -216
- package/docs/_posts/tutorials/introducing-script-use.md +0 -132
- package/docs/_posts/tutorials/introducing-x3d.md +0 -100
- package/docs/_posts/tutorials/lighting-your-world.md +0 -144
- package/docs/_posts/tutorials/mapping-textures.md +0 -217
- package/docs/_posts/tutorials/naming-nodes.md +0 -168
- package/docs/_posts/tutorials/overview.md +0 -83
- package/docs/_posts/tutorials/providing-information-about-your-world.md +0 -35
- package/docs/_posts/tutorials/sensing-the-viewer.md +0 -210
- package/docs/_posts/tutorials/sensing-viewer-actions.md +0 -219
- package/docs/_posts/tutorials/transforming-shapes.md +0 -275
- package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +0 -637
- package/docs/_posts/what's-new.md +0 -1115
- package/docs/_tabs/components.md +0 -383
- package/docs/_tabs/laboratory.md +0 -52
- package/docs/_tabs/playground.html +0 -407
- package/docs/_tabs/reference.md +0 -8
- package/docs/_tabs/tags.md +0 -5
- package/docs/_tabs/tutorials.md +0 -7
- package/docs/assets/X3D/teaser/Michroma-Regular.ttf +0 -0
- package/docs/assets/X3D/teaser/peakpx.jpg +0 -0
- package/docs/assets/X3D/teaser/teaser.x3d +0 -55
- package/docs/assets/css/style.scss +0 -320
- package/docs/assets/img/favicons/android-chrome-192x192.png +0 -0
- package/docs/assets/img/favicons/android-chrome-512x512.png +0 -0
- package/docs/assets/img/favicons/apple-touch-icon.png +0 -0
- package/docs/assets/img/favicons/favicon-16x16.png +0 -0
- package/docs/assets/img/favicons/favicon-32x32.png +0 -0
- package/docs/assets/img/favicons/favicon.ico +0 -0
- package/docs/assets/img/favicons/mstile-150x150.png +0 -0
- package/docs/assets/img/favicons/safari-pinned-tab.svg +0 -71
- package/docs/assets/img/laboratory/blend-mode.png +0 -0
- package/docs/assets/img/laboratory/dicom-nrrd.png +0 -0
- package/docs/assets/img/laboratory/earthquake.png +0 -0
- package/docs/assets/img/laboratory/gltf.png +0 -0
- package/docs/assets/img/laboratory/l-system.png +0 -0
- package/docs/assets/img/logo.png +0 -0
- package/docs/assets/js/example.js +0 -128
- package/docs/google3696ee938394d7b6.html +0 -1
- package/docs/laboratory/3d-l-system-generator.html +0 -169
- package/docs/laboratory/gltf-sample-viewer.html +0 -811
- package/docs/laboratory/online-dicom-and-nrrd-file-viewer.html +0 -72
- package/docs/laboratory/real-time-earth-quake-information.html +0 -50
- package/docs/laboratory/x3d-visual-blend-mode-editor.html +0 -228
- package/meta/logo/icon.svg +0 -432
- package/meta/logo/logo.png +0 -0
- package/meta/logo/logo.s.svg +0 -470
- package/meta/logo/logo.svg +0 -396
- package/src/LICENSE.txt +0 -46
- package/src/assets/components/Annotation.js +0 -74
- package/src/assets/components/CADGeometry.js +0 -74
- package/src/assets/components/CubeMapTexturing.js +0 -68
- package/src/assets/components/DIS.js +0 -72
- package/src/assets/components/EventUtilities.js +0 -78
- package/src/assets/components/Geometry2D.js +0 -78
- package/src/assets/components/Geospatial.js +0 -84
- package/src/assets/components/HAnim.js +0 -72
- package/src/assets/components/KeyDeviceSensor.js +0 -68
- package/src/assets/components/Layout.js +0 -74
- package/src/assets/components/NURBS.js +0 -94
- package/src/assets/components/ParticleSystems.js +0 -86
- package/src/assets/components/Picking.js +0 -74
- package/src/assets/components/RigidBodyPhysics.js +0 -94
- package/src/assets/components/Scripting.js +0 -64
- package/src/assets/components/Text.js +0 -68
- package/src/assets/components/TextureProjector.js +0 -66
- package/src/assets/components/Texturing3D.js +0 -78
- package/src/assets/components/VolumeRendering.js +0 -94
- package/src/assets/components/X_ITE.js +0 -62
- package/src/assets/fonts/DroidSerif-Bold.ttf +0 -0
- package/src/assets/fonts/DroidSerif-BoldItalic.ttf +0 -0
- package/src/assets/fonts/DroidSerif-Italic.ttf +0 -0
- package/src/assets/fonts/DroidSerif-Regular.ttf +0 -0
- package/src/assets/fonts/Ubuntu-B.ttf +0 -0
- package/src/assets/fonts/Ubuntu-BI.ttf +0 -0
- package/src/assets/fonts/Ubuntu-R.ttf +0 -0
- package/src/assets/fonts/Ubuntu-RI.ttf +0 -0
- package/src/assets/fonts/UbuntuMono-B.ttf +0 -0
- package/src/assets/fonts/UbuntuMono-BI.ttf +0 -0
- package/src/assets/fonts/UbuntuMono-R.ttf +0 -0
- package/src/assets/fonts/UbuntuMono-RI.ttf +0 -0
- package/src/assets/hatching/1.png +0 -0
- package/src/assets/hatching/10.png +0 -0
- package/src/assets/hatching/11.png +0 -0
- package/src/assets/hatching/12.png +0 -0
- package/src/assets/hatching/13.png +0 -0
- package/src/assets/hatching/14.png +0 -0
- package/src/assets/hatching/15.png +0 -0
- package/src/assets/hatching/16.png +0 -0
- package/src/assets/hatching/17.png +0 -0
- package/src/assets/hatching/18.png +0 -0
- package/src/assets/hatching/19.png +0 -0
- package/src/assets/hatching/2.png +0 -0
- package/src/assets/hatching/3.png +0 -0
- package/src/assets/hatching/4.png +0 -0
- package/src/assets/hatching/5.png +0 -0
- package/src/assets/hatching/6.png +0 -0
- package/src/assets/hatching/7.png +0 -0
- package/src/assets/hatching/8.png +0 -0
- package/src/assets/hatching/9.png +0 -0
- package/src/assets/images/ExamineViewer.png +0 -0
- package/src/assets/images/FlyViewer.png +0 -0
- package/src/assets/images/NoneViewer.png +0 -0
- package/src/assets/images/PlaneViewer.png +0 -0
- package/src/assets/images/PrimitiveQuality.png +0 -0
- package/src/assets/images/Shading.png +0 -0
- package/src/assets/images/TextureQuality.png +0 -0
- package/src/assets/images/Time.png +0 -0
- package/src/assets/images/Viewpoint.png +0 -0
- package/src/assets/images/WalkViewer.png +0 -0
- package/src/assets/images/go-next.png +0 -0
- package/src/assets/images/gtk-fullscreen.png +0 -0
- package/src/assets/images/gtk-leave-fullscreen.png +0 -0
- package/src/assets/images/gtk-zoom-fit.png +0 -0
- package/src/assets/images/gtk-zoom-in.png +0 -0
- package/src/assets/images/help-about.png +0 -0
- package/src/assets/images/icon.bw.png +0 -0
- package/src/assets/images/icon.png +0 -0
- package/src/assets/images/logo.128.png +0 -0
- package/src/assets/images/logo.bw.png +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/assets/lib/draco_decoder_gltf.js +0 -29
- package/src/assets/linetype/linetypes.png +0 -0
- package/src/assets/shaders/Types.glsl.js +0 -312
- package/src/assets/shaders/webgl1/Default.vs.js +0 -14
- package/src/assets/shaders/webgl1/Depth.fs.js +0 -25
- package/src/assets/shaders/webgl1/Depth.vs.js +0 -31
- package/src/assets/shaders/webgl1/Gouraud.fs.js +0 -40
- package/src/assets/shaders/webgl1/Gouraud.vs.js +0 -58
- package/src/assets/shaders/webgl1/PBR.fs.js +0 -366
- package/src/assets/shaders/webgl1/Phong.fs.js +0 -211
- package/src/assets/shaders/webgl1/Pointing.fs.js +0 -40
- package/src/assets/shaders/webgl1/Pointing.vs.js +0 -46
- package/src/assets/shaders/webgl1/Unlit.fs.js +0 -55
- package/src/assets/shaders/webgl1/include/ClipPlanes.glsl.js +0 -17
- package/src/assets/shaders/webgl1/include/Colors.glsl.js +0 -27
- package/src/assets/shaders/webgl1/include/Fog.glsl.js +0 -32
- package/src/assets/shaders/webgl1/include/Fragment.glsl.js +0 -137
- package/src/assets/shaders/webgl1/include/Hatch.glsl.js +0 -22
- package/src/assets/shaders/webgl1/include/Material.glsl.js +0 -59
- package/src/assets/shaders/webgl1/include/Normal.glsl.js +0 -48
- package/src/assets/shaders/webgl1/include/Perlin.glsl.js +0 -41
- package/src/assets/shaders/webgl1/include/Point.glsl.js +0 -47
- package/src/assets/shaders/webgl1/include/PointSize.glsl.js +0 -31
- package/src/assets/shaders/webgl1/include/Shadow.glsl.js +0 -314
- package/src/assets/shaders/webgl1/include/SpotFactor.glsl.js +0 -14
- package/src/assets/shaders/webgl1/include/Texture.glsl.js +0 -532
- package/src/assets/shaders/webgl1/include/Vertex.glsl.js +0 -154
- package/src/assets/shaders/webgl2/Compose.fs.js +0 -29
- package/src/assets/shaders/webgl2/Compose.vs.js +0 -14
- package/src/assets/shaders/webgl2/Default.vs.js +0 -16
- package/src/assets/shaders/webgl2/Depth.fs.js +0 -28
- package/src/assets/shaders/webgl2/Depth.vs.js +0 -37
- package/src/assets/shaders/webgl2/Gouraud.fs.js +0 -42
- package/src/assets/shaders/webgl2/Gouraud.vs.js +0 -60
- package/src/assets/shaders/webgl2/LineTransform.fs.js +0 -7
- package/src/assets/shaders/webgl2/LineTransform.vs.js +0 -90
- package/src/assets/shaders/webgl2/PBR.fs.js +0 -373
- package/src/assets/shaders/webgl2/Phong.fs.js +0 -225
- package/src/assets/shaders/webgl2/Pointing.fs.js +0 -49
- package/src/assets/shaders/webgl2/Pointing.vs.js +0 -68
- package/src/assets/shaders/webgl2/Unlit.fs.js +0 -60
- package/src/assets/shaders/webgl2/include/ClipPlanes.glsl.js +0 -17
- package/src/assets/shaders/webgl2/include/Colors.glsl.js +0 -27
- package/src/assets/shaders/webgl2/include/Fog.glsl.js +0 -32
- package/src/assets/shaders/webgl2/include/Fragment.glsl.js +0 -162
- package/src/assets/shaders/webgl2/include/Hatch.glsl.js +0 -22
- package/src/assets/shaders/webgl2/include/Line2.glsl.js +0 -22
- package/src/assets/shaders/webgl2/include/Material.glsl.js +0 -59
- package/src/assets/shaders/webgl2/include/Normal.glsl.js +0 -50
- package/src/assets/shaders/webgl2/include/Particle.glsl.js +0 -34
- package/src/assets/shaders/webgl2/include/Perlin.glsl.js +0 -41
- package/src/assets/shaders/webgl2/include/Point.glsl.js +0 -47
- package/src/assets/shaders/webgl2/include/PointSize.glsl.js +0 -31
- package/src/assets/shaders/webgl2/include/Shadow.glsl.js +0 -328
- package/src/assets/shaders/webgl2/include/Skin.glsl.js +0 -88
- package/src/assets/shaders/webgl2/include/SpotFactor.glsl.js +0 -14
- package/src/assets/shaders/webgl2/include/Stipple.glsl.js +0 -43
- package/src/assets/shaders/webgl2/include/Texture.glsl.js +0 -527
- package/src/assets/shaders/webgl2/include/Utils.glsl.js +0 -13
- package/src/assets/shaders/webgl2/include/Vertex.glsl.js +0 -180
- package/src/bookmarks.js +0 -297
- package/src/example.html +0 -21
- package/src/examples.js +0 -156
- package/src/lib/ammojs/AmmoClass.js +0 -50
- package/src/lib/ammojs/Makefile +0 -25
- package/src/lib/ammojs/ammo.idl +0 -1031
- package/src/lib/ammojs/ammo.js +0 -35
- package/src/lib/jquery.js +0 -66
- package/src/lib/libgif/libgif.js +0 -1004
- package/src/lib/libtess.js +0 -1
- package/src/lib/nurbs/extras/sample.js +0 -233
- package/src/lib/nurbs/nurbs.js +0 -325
- package/src/lib/nurbs/src/evaluate.js +0 -402
- package/src/lib/nurbs/src/numerical-derivative.js +0 -49
- package/src/lib/nurbs/src/support.js +0 -140
- package/src/lib/nurbs/src/transform.js +0 -70
- package/src/lib/nurbs/src/utils/accessor-preamble.js +0 -27
- package/src/lib/nurbs/src/utils/bisection-search.js +0 -22
- package/src/lib/nurbs/src/utils/cache-key.js +0 -50
- package/src/lib/nurbs/src/utils/create-accessors.js +0 -103
- package/src/lib/nurbs/src/utils/infer-type.js +0 -44
- package/src/lib/nurbs/src/utils/is-array-like.js +0 -5
- package/src/lib/nurbs/src/utils/is-ndarray-like.js +0 -13
- package/src/lib/nurbs/src/utils/is-ndarray.js +0 -16
- package/src/lib/nurbs/src/utils/ndloop.js +0 -18
- package/src/lib/nurbs/src/utils/size-getter.js +0 -16
- package/src/lib/nurbs/src/utils/variable.js +0 -26
- package/src/locale/de.po.js +0 -182
- package/src/locale/fr.po.js +0 -179
- package/src/locale/gettext.js +0 -120
- package/src/shim.js +0 -81
- package/src/standard/Geospatial/Geodetic.js +0 -257
- package/src/standard/Geospatial/ReferenceEllipsoids.js +0 -92
- package/src/standard/Geospatial/UniversalTransverseMercator.js +0 -205
- package/src/standard/Math/Algorithm.js +0 -237
- package/src/standard/Math/Algorithms/Bezier.js +0 -232
- package/src/standard/Math/Algorithms/MergeSort.js +0 -104
- package/src/standard/Math/Algorithms/PartialSort.js +0 -92
- package/src/standard/Math/Algorithms/QuickSort.js +0 -106
- package/src/standard/Math/Algorithms/SAT.js +0 -109
- package/src/standard/Math/Algorithms/eigen_decomposition.js +0 -190
- package/src/standard/Math/Geometry/Box2.js +0 -257
- package/src/standard/Math/Geometry/Box3.js +0 -665
- package/src/standard/Math/Geometry/Camera.js +0 -127
- package/src/standard/Math/Geometry/Cylinder3.js +0 -159
- package/src/standard/Math/Geometry/Line2.js +0 -155
- package/src/standard/Math/Geometry/Line3.js +0 -235
- package/src/standard/Math/Geometry/Plane3.js +0 -163
- package/src/standard/Math/Geometry/Sphere3.js +0 -191
- package/src/standard/Math/Geometry/Spheroid3.js +0 -86
- package/src/standard/Math/Geometry/Triangle2.js +0 -78
- package/src/standard/Math/Geometry/Triangle3.js +0 -140
- package/src/standard/Math/Geometry/ViewVolume.js +0 -422
- package/src/standard/Math/Numbers/Color3.js +0 -258
- package/src/standard/Math/Numbers/Color4.js +0 -188
- package/src/standard/Math/Numbers/Complex.js +0 -246
- package/src/standard/Math/Numbers/Matrix2.js +0 -274
- package/src/standard/Math/Numbers/Matrix3.js +0 -673
- package/src/standard/Math/Numbers/Matrix4.js +0 -794
- package/src/standard/Math/Numbers/Quaternion.js +0 -665
- package/src/standard/Math/Numbers/Rotation4.js +0 -478
- package/src/standard/Math/Numbers/Vector2.js +0 -238
- package/src/standard/Math/Numbers/Vector3.js +0 -292
- package/src/standard/Math/Numbers/Vector4.js +0 -307
- package/src/standard/Math/Utility/BVH.js +0 -378
- package/src/standard/Math/Utility/MatrixStack.js +0 -114
- package/src/standard/Time/StopWatch.js +0 -84
- package/src/standard/Utility/BitSet.js +0 -117
- package/src/standard/Utility/DataStorage.js +0 -132
- package/src/standard/Utility/MapUtilities.js +0 -83
- package/src/standard/Utility/ObjectCache.js +0 -72
- package/src/standard/Utility/Shuffle.js +0 -66
- package/src/tests.js +0 -399
- package/src/x_ite/Base/Events.js +0 -73
- package/src/x_ite/Base/FieldArray.js +0 -70
- package/src/x_ite/Base/FieldDefinitionArray.js +0 -70
- package/src/x_ite/Base/X3DArrayField.js +0 -138
- package/src/x_ite/Base/X3DBaseNode.js +0 -639
- package/src/x_ite/Base/X3DCast.js +0 -75
- package/src/x_ite/Base/X3DChildObject.js +0 -265
- package/src/x_ite/Base/X3DConstants.js +0 -146
- package/src/x_ite/Base/X3DField.js +0 -429
- package/src/x_ite/Base/X3DFieldDefinition.js +0 -75
- package/src/x_ite/Base/X3DInfoArray.js +0 -381
- package/src/x_ite/Base/X3DObject.js +0 -254
- package/src/x_ite/Base/X3DObjectArrayField.js +0 -541
- package/src/x_ite/Base/X3DTypedArrayField.js +0 -1018
- package/src/x_ite/Browser/Core/BrowserOptions.js +0 -388
- package/src/x_ite/Browser/Core/BrowserProperties.js +0 -84
- package/src/x_ite/Browser/Core/BrowserTimings.js +0 -300
- package/src/x_ite/Browser/Core/Context.js +0 -278
- package/src/x_ite/Browser/Core/ContextMenu.js +0 -718
- package/src/x_ite/Browser/Core/Notification.js +0 -117
- package/src/x_ite/Browser/Core/PrimitiveQuality.js +0 -57
- package/src/x_ite/Browser/Core/RenderingProperties.js +0 -104
- package/src/x_ite/Browser/Core/Shading.js +0 -59
- package/src/x_ite/Browser/Core/TextureQuality.js +0 -57
- package/src/x_ite/Browser/Core/X3DCoreContext.js +0 -758
- package/src/x_ite/Browser/DOMIntegration.js +0 -383
- package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +0 -76
- package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +0 -78
- package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +0 -176
- package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +0 -70
- package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +0 -70
- package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +0 -106
- package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +0 -159
- package/src/x_ite/Browser/Geometry2D/Rectangle2DOptions.js +0 -112
- package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +0 -134
- package/src/x_ite/Browser/Geometry3D/BoxOptions.js +0 -123
- package/src/x_ite/Browser/Geometry3D/ConeOptions.js +0 -71
- package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +0 -71
- package/src/x_ite/Browser/Geometry3D/IcoSphere.js +0 -404
- package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +0 -115
- package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +0 -287
- package/src/x_ite/Browser/Geometry3D/X3DGeometry3DContext.js +0 -128
- package/src/x_ite/Browser/Geospatial/Geocentric.js +0 -75
- package/src/x_ite/Browser/Geospatial/Geospatial.js +0 -205
- package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +0 -84
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator.js +0 -186
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1.js +0 -87
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator2.js +0 -53
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator3.js +0 -53
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +0 -107
- package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +0 -112
- package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +0 -97
- package/src/x_ite/Browser/Layering/X3DLayeringContext.js +0 -70
- package/src/x_ite/Browser/Layout/ScreenText.js +0 -412
- package/src/x_ite/Browser/Layout/X3DLayoutContext.js +0 -131
- package/src/x_ite/Browser/Legacy.js +0 -84
- package/src/x_ite/Browser/Lighting/X3DLightingContext.js +0 -105
- package/src/x_ite/Browser/NURBS/NURBS.js +0 -471
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +0 -866
- package/src/x_ite/Browser/Navigation/FlyViewer.js +0 -99
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +0 -519
- package/src/x_ite/Browser/Navigation/NoneViewer.js +0 -77
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +0 -243
- package/src/x_ite/Browser/Navigation/WalkViewer.js +0 -130
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +0 -727
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +0 -240
- package/src/x_ite/Browser/Navigation/X3DViewer.js +0 -204
- package/src/x_ite/Browser/Networking/URLs.js +0 -103
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +0 -227
- package/src/x_ite/Browser/ParticleSystems/BVH.glsl.js +0 -185
- package/src/x_ite/Browser/ParticleSystems/Box3.glsl.js +0 -49
- package/src/x_ite/Browser/ParticleSystems/GeometryTypes.js +0 -59
- package/src/x_ite/Browser/ParticleSystems/Line3.glsl.js +0 -57
- package/src/x_ite/Browser/ParticleSystems/Plane3.glsl.js +0 -162
- package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +0 -72
- package/src/x_ite/Browser/Picking/IntersectionType.js +0 -56
- package/src/x_ite/Browser/Picking/MatchCriterion.js +0 -57
- package/src/x_ite/Browser/Picking/SortOrder.js +0 -58
- package/src/x_ite/Browser/Picking/VolumePicker.js +0 -177
- package/src/x_ite/Browser/Picking/X3DPickingContext.js +0 -132
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +0 -279
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer.js +0 -85
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +0 -395
- package/src/x_ite/Browser/Rendering/GeometryContext.js +0 -83
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +0 -270
- package/src/x_ite/Browser/RigidBodyPhysics/AppliedParametersType.js +0 -63
- package/src/x_ite/Browser/Scripting/X3DScriptingContext.js +0 -67
- package/src/x_ite/Browser/Scripting/evaluate.js +0 -68
- package/src/x_ite/Browser/Shaders/ShaderCompiler.js +0 -97
- package/src/x_ite/Browser/Shaders/ShaderSource.js +0 -204
- package/src/x_ite/Browser/Shaders/Shaders.js +0 -191
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +0 -190
- package/src/x_ite/Browser/Shape/AlphaMode.js +0 -58
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +0 -209
- package/src/x_ite/Browser/Sound/X3DSoundContext.js +0 -57
- package/src/x_ite/Browser/Text/PolygonText.js +0 -360
- package/src/x_ite/Browser/Text/TextAlignment.js +0 -58
- package/src/x_ite/Browser/Text/X3DTextContext.js +0 -134
- package/src/x_ite/Browser/Text/X3DTextGeometry.js +0 -614
- package/src/x_ite/Browser/Texturing/FunctionType.js +0 -57
- package/src/x_ite/Browser/Texturing/GifMedia.js +0 -113
- package/src/x_ite/Browser/Texturing/ModeType.js +0 -74
- package/src/x_ite/Browser/Texturing/SourceType.js +0 -58
- package/src/x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType.js +0 -66
- package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +0 -340
- package/src/x_ite/Browser/Texturing3D/DICOMParser.js +0 -1097
- package/src/x_ite/Browser/Texturing3D/NRRDParser.js +0 -458
- package/src/x_ite/Browser/Time/X3DTimeContext.js +0 -108
- package/src/x_ite/Browser/VERSION.js +0 -48
- package/src/x_ite/Browser/VolumeRendering/VolumeMaterial.js +0 -145
- package/src/x_ite/Browser/VolumeRendering/VolumeStyle.fs.js +0 -60
- package/src/x_ite/Browser/VolumeRendering/VolumeStyle.vs.js +0 -26
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +0 -131
- package/src/x_ite/Browser/X3DBrowser.js +0 -1060
- package/src/x_ite/Browser/X3DBrowserContext.js +0 -436
- package/src/x_ite/Components/Annotation/AnnotationLayer.js +0 -109
- package/src/x_ite/Components/Annotation/AnnotationTarget.js +0 -104
- package/src/x_ite/Components/Annotation/GroupAnnotation.js +0 -119
- package/src/x_ite/Components/Annotation/IconAnnotation.js +0 -117
- package/src/x_ite/Components/Annotation/TextAnnotation.js +0 -105
- package/src/x_ite/Components/Annotation/URLAnnotation.js +0 -104
- package/src/x_ite/Components/Annotation/X3DAnnotationNode.js +0 -80
- package/src/x_ite/Components/CADGeometry/CADAssembly.js +0 -107
- package/src/x_ite/Components/CADGeometry/CADFace.js +0 -252
- package/src/x_ite/Components/CADGeometry/CADLayer.js +0 -102
- package/src/x_ite/Components/CADGeometry/CADPart.js +0 -112
- package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +0 -132
- package/src/x_ite/Components/CADGeometry/QuadSet.js +0 -127
- package/src/x_ite/Components/CADGeometry/X3DProductStructureChildNode.js +0 -74
- package/src/x_ite/Components/Core/MetadataBoolean.js +0 -119
- package/src/x_ite/Components/Core/MetadataDouble.js +0 -119
- package/src/x_ite/Components/Core/MetadataFloat.js +0 -119
- package/src/x_ite/Components/Core/MetadataInteger.js +0 -119
- package/src/x_ite/Components/Core/MetadataSet.js +0 -119
- package/src/x_ite/Components/Core/MetadataString.js +0 -119
- package/src/x_ite/Components/Core/WorldInfo.js +0 -110
- package/src/x_ite/Components/Core/X3DBindableNode.js +0 -108
- package/src/x_ite/Components/Core/X3DChildNode.js +0 -101
- package/src/x_ite/Components/Core/X3DInfoNode.js +0 -74
- package/src/x_ite/Components/Core/X3DMetadataObject.js +0 -75
- package/src/x_ite/Components/Core/X3DNode.js +0 -1393
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +0 -1012
- package/src/x_ite/Components/Core/X3DSensorNode.js +0 -74
- package/src/x_ite/Components/Core.js +0 -85
- package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +0 -250
- package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +0 -295
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +0 -278
- package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +0 -141
- package/src/x_ite/Components/DIS/DISEntityManager.js +0 -104
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +0 -120
- package/src/x_ite/Components/DIS/EspduTransform.js +0 -194
- package/src/x_ite/Components/DIS/ReceiverPdu.js +0 -139
- package/src/x_ite/Components/DIS/SignalPdu.js +0 -139
- package/src/x_ite/Components/DIS/TransmitterPdu.js +0 -155
- package/src/x_ite/Components/EnvironmentalEffects/Background.js +0 -159
- package/src/x_ite/Components/EnvironmentalEffects/Fog.js +0 -132
- package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +0 -153
- package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +0 -129
- package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +0 -133
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +0 -613
- package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +0 -176
- package/src/x_ite/Components/EnvironmentalEffects.js +0 -71
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +0 -280
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +0 -319
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +0 -177
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +0 -143
- package/src/x_ite/Components/EnvironmentalSensor.js +0 -65
- package/src/x_ite/Components/EventUtilities/BooleanFilter.js +0 -118
- package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +0 -116
- package/src/x_ite/Components/EventUtilities/BooleanToggle.js +0 -109
- package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +0 -108
- package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +0 -116
- package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +0 -109
- package/src/x_ite/Components/EventUtilities/TimeTrigger.js +0 -108
- package/src/x_ite/Components/EventUtilities/X3DSequencerNode.js +0 -153
- package/src/x_ite/Components/EventUtilities/X3DTriggerNode.js +0 -74
- package/src/x_ite/Components/Followers/ColorChaser.js +0 -147
- package/src/x_ite/Components/Followers/ColorDamper.js +0 -145
- package/src/x_ite/Components/Followers/CoordinateChaser.js +0 -113
- package/src/x_ite/Components/Followers/CoordinateDamper.js +0 -115
- package/src/x_ite/Components/Followers/OrientationChaser.js +0 -134
- package/src/x_ite/Components/Followers/OrientationDamper.js +0 -130
- package/src/x_ite/Components/Followers/PositionChaser.js +0 -108
- package/src/x_ite/Components/Followers/PositionChaser2D.js +0 -108
- package/src/x_ite/Components/Followers/PositionDamper.js +0 -110
- package/src/x_ite/Components/Followers/PositionDamper2D.js +0 -110
- package/src/x_ite/Components/Followers/ScalarChaser.js +0 -136
- package/src/x_ite/Components/Followers/ScalarDamper.js +0 -126
- package/src/x_ite/Components/Followers/TexCoordChaser2D.js +0 -113
- package/src/x_ite/Components/Followers/TexCoordDamper2D.js +0 -115
- package/src/x_ite/Components/Followers/X3DChaserNode.js +0 -241
- package/src/x_ite/Components/Followers/X3DDamperNode.js +0 -176
- package/src/x_ite/Components/Followers/X3DFollowerNode.js +0 -151
- package/src/x_ite/Components/Followers.js +0 -91
- package/src/x_ite/Components/Geometry2D/Arc2D.js +0 -162
- package/src/x_ite/Components/Geometry2D/ArcClose2D.js +0 -227
- package/src/x_ite/Components/Geometry2D/Circle2D.js +0 -130
- package/src/x_ite/Components/Geometry2D/Disk2D.js +0 -257
- package/src/x_ite/Components/Geometry2D/Polyline2D.js +0 -111
- package/src/x_ite/Components/Geometry2D/Polypoint2D.js +0 -110
- package/src/x_ite/Components/Geometry2D/Rectangle2D.js +0 -148
- package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +0 -142
- package/src/x_ite/Components/Geometry3D/Box.js +0 -146
- package/src/x_ite/Components/Geometry3D/Cone.js +0 -248
- package/src/x_ite/Components/Geometry3D/Cylinder.js +0 -309
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +0 -439
- package/src/x_ite/Components/Geometry3D/Extrusion.js +0 -729
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +0 -473
- package/src/x_ite/Components/Geometry3D/Sphere.js +0 -146
- package/src/x_ite/Components/Geometry3D.js +0 -71
- package/src/x_ite/Components/Geospatial/GeoCoordinate.js +0 -238
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +0 -433
- package/src/x_ite/Components/Geospatial/GeoLOD.js +0 -466
- package/src/x_ite/Components/Geospatial/GeoLocation.js +0 -130
- package/src/x_ite/Components/Geospatial/GeoMetadata.js +0 -117
- package/src/x_ite/Components/Geospatial/GeoOrigin.js +0 -118
- package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +0 -156
- package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +0 -163
- package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +0 -135
- package/src/x_ite/Components/Geospatial/GeoTransform.js +0 -145
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +0 -290
- package/src/x_ite/Components/Geospatial/X3DGeospatialObject.js +0 -272
- package/src/x_ite/Components/Grouping/Group.js +0 -101
- package/src/x_ite/Components/Grouping/StaticGroup.js +0 -244
- package/src/x_ite/Components/Grouping/Switch.js +0 -257
- package/src/x_ite/Components/Grouping/Transform.js +0 -106
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +0 -150
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +0 -722
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +0 -135
- package/src/x_ite/Components/Grouping/X3DTransformNode.js +0 -95
- package/src/x_ite/Components/Grouping.js +0 -73
- package/src/x_ite/Components/HAnim/HAnimDisplacer.js +0 -101
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +0 -640
- package/src/x_ite/Components/HAnim/HAnimJoint.js +0 -198
- package/src/x_ite/Components/HAnim/HAnimMotion.js +0 -434
- package/src/x_ite/Components/HAnim/HAnimSegment.js +0 -110
- package/src/x_ite/Components/HAnim/HAnimSite.js +0 -108
- package/src/x_ite/Components/Interpolation/ColorInterpolator.js +0 -132
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +0 -132
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +0 -129
- package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +0 -149
- package/src/x_ite/Components/Interpolation/NormalInterpolator.js +0 -158
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +0 -134
- package/src/x_ite/Components/Interpolation/PositionInterpolator.js +0 -125
- package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +0 -125
- package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +0 -120
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +0 -147
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +0 -147
- package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +0 -147
- package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +0 -137
- package/src/x_ite/Components/Interpolation/X3DInterpolatorNode.js +0 -137
- package/src/x_ite/Components/Interpolation.js +0 -85
- package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +0 -379
- package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +0 -164
- package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +0 -120
- package/src/x_ite/Components/Layering/Layer.js +0 -120
- package/src/x_ite/Components/Layering/LayerSet.js +0 -208
- package/src/x_ite/Components/Layering/Viewport.js +0 -180
- package/src/x_ite/Components/Layering/X3DLayerNode.js +0 -407
- package/src/x_ite/Components/Layering/X3DViewportNode.js +0 -74
- package/src/x_ite/Components/Layering.js +0 -67
- package/src/x_ite/Components/Layout/Layout.js +0 -642
- package/src/x_ite/Components/Layout/LayoutGroup.js +0 -188
- package/src/x_ite/Components/Layout/LayoutLayer.js +0 -124
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +0 -120
- package/src/x_ite/Components/Layout/ScreenGroup.js +0 -138
- package/src/x_ite/Components/Layout/X3DLayoutNode.js +0 -74
- package/src/x_ite/Components/Lighting/DirectionalLight.js +0 -291
- package/src/x_ite/Components/Lighting/EnvironmentLight.js +0 -157
- package/src/x_ite/Components/Lighting/PointLight.js +0 -341
- package/src/x_ite/Components/Lighting/SpotLight.js +0 -360
- package/src/x_ite/Components/Lighting/X3DLightNode.js +0 -222
- package/src/x_ite/Components/Lighting.js +0 -67
- package/src/x_ite/Components/NURBS/Contour2D.js +0 -170
- package/src/x_ite/Components/NURBS/ContourPolyline2D.js +0 -165
- package/src/x_ite/Components/NURBS/CoordinateDouble.js +0 -95
- package/src/x_ite/Components/NURBS/NurbsCurve.js +0 -234
- package/src/x_ite/Components/NURBS/NurbsCurve2D.js +0 -212
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +0 -229
- package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +0 -108
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +0 -217
- package/src/x_ite/Components/NURBS/NurbsSet.js +0 -186
- package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +0 -189
- package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +0 -181
- package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +0 -181
- package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +0 -156
- package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +0 -177
- package/src/x_ite/Components/NURBS/X3DNurbsControlCurveNode.js +0 -74
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +0 -393
- package/src/x_ite/Components/NURBS/X3DParametricGeometryNode.js +0 -81
- package/src/x_ite/Components/Navigation/Billboard.js +0 -188
- package/src/x_ite/Components/Navigation/Collision.js +0 -184
- package/src/x_ite/Components/Navigation/LOD.js +0 -335
- package/src/x_ite/Components/Navigation/NavigationInfo.js +0 -344
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +0 -356
- package/src/x_ite/Components/Navigation/Viewpoint.js +0 -200
- package/src/x_ite/Components/Navigation/ViewpointGroup.js +0 -257
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +0 -594
- package/src/x_ite/Components/Navigation.js +0 -73
- package/src/x_ite/Components/Networking/Anchor.js +0 -220
- package/src/x_ite/Components/Networking/Inline.js +0 -314
- package/src/x_ite/Components/Networking/LoadSensor.js +0 -265
- package/src/x_ite/Components/Networking/X3DNetworkSensorNode.js +0 -74
- package/src/x_ite/Components/Networking/X3DUrlObject.js +0 -296
- package/src/x_ite/Components/Networking.js +0 -67
- package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +0 -132
- package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +0 -162
- package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +0 -137
- package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +0 -120
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +0 -1081
- package/src/x_ite/Components/ParticleSystems/PointEmitter.js +0 -153
- package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +0 -244
- package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +0 -252
- package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +0 -289
- package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +0 -142
- package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +0 -1004
- package/src/x_ite/Components/ParticleSystems/X3DParticlePhysicsModelNode.js +0 -78
- package/src/x_ite/Components/Picking/LinePickSensor.js +0 -339
- package/src/x_ite/Components/Picking/PickableGroup.js +0 -223
- package/src/x_ite/Components/Picking/PointPickSensor.js +0 -350
- package/src/x_ite/Components/Picking/PrimitivePickSensor.js +0 -270
- package/src/x_ite/Components/Picking/VolumePickSensor.js +0 -245
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +0 -441
- package/src/x_ite/Components/Picking/X3DPickableObject.js +0 -95
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +0 -303
- package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +0 -300
- package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +0 -220
- package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +0 -104
- package/src/x_ite/Components/PointingDeviceSensor/X3DDragSensorNode.js +0 -76
- package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +0 -132
- package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +0 -106
- package/src/x_ite/Components/PointingDeviceSensor.js +0 -71
- package/src/x_ite/Components/Rendering/ClipPlane.js +0 -180
- package/src/x_ite/Components/Rendering/Color.js +0 -163
- package/src/x_ite/Components/Rendering/ColorRGBA.js +0 -166
- package/src/x_ite/Components/Rendering/Coordinate.js +0 -97
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +0 -307
- package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +0 -165
- package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +0 -122
- package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +0 -173
- package/src/x_ite/Components/Rendering/LineSet.js +0 -240
- package/src/x_ite/Components/Rendering/Normal.js +0 -193
- package/src/x_ite/Components/Rendering/PointSet.js +0 -222
- package/src/x_ite/Components/Rendering/TriangleFanSet.js +0 -147
- package/src/x_ite/Components/Rendering/TriangleSet.js +0 -117
- package/src/x_ite/Components/Rendering/TriangleStripSet.js +0 -151
- package/src/x_ite/Components/Rendering/X3DColorNode.js +0 -88
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +0 -363
- package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +0 -193
- package/src/x_ite/Components/Rendering/X3DGeometricPropertyNode.js +0 -74
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +0 -1189
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +0 -489
- package/src/x_ite/Components/Rendering/X3DNormalNode.js +0 -74
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +0 -182
- package/src/x_ite/Components/Rendering.js +0 -99
- package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +0 -210
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +0 -261
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +0 -497
- package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +0 -214
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +0 -281
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +0 -180
- package/src/x_ite/Components/RigidBodyPhysics/Contact.js +0 -118
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +0 -292
- package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +0 -132
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +0 -518
- package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +0 -389
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +0 -251
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +0 -230
- package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +0 -114
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +0 -167
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +0 -89
- package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +0 -221
- package/src/x_ite/Components/Scripting/Script.js +0 -510
- package/src/x_ite/Components/Scripting/X3DScriptNode.js +0 -89
- package/src/x_ite/Components/Shaders/ComposedShader.js +0 -228
- package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +0 -151
- package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +0 -142
- package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +0 -141
- package/src/x_ite/Components/Shaders/PackagedShader.js +0 -129
- package/src/x_ite/Components/Shaders/ProgramShader.js +0 -99
- package/src/x_ite/Components/Shaders/ShaderPart.js +0 -238
- package/src/x_ite/Components/Shaders/ShaderProgram.js +0 -126
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +0 -1357
- package/src/x_ite/Components/Shaders/X3DShaderNode.js +0 -105
- package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +0 -89
- package/src/x_ite/Components/Shaders.js +0 -79
- package/src/x_ite/Components/Shape/AcousticProperties.js +0 -100
- package/src/x_ite/Components/Shape/Appearance.js +0 -458
- package/src/x_ite/Components/Shape/FillProperties.js +0 -181
- package/src/x_ite/Components/Shape/LineProperties.js +0 -184
- package/src/x_ite/Components/Shape/Material.js +0 -412
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +0 -308
- package/src/x_ite/Components/Shape/PointProperties.js +0 -169
- package/src/x_ite/Components/Shape/Shape.js +0 -205
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +0 -292
- package/src/x_ite/Components/Shape/UnlitMaterial.js +0 -142
- package/src/x_ite/Components/Shape/X3DAppearanceChildNode.js +0 -74
- package/src/x_ite/Components/Shape/X3DAppearanceNode.js +0 -88
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +0 -350
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +0 -212
- package/src/x_ite/Components/Shape/X3DShapeNode.js +0 -211
- package/src/x_ite/Components/Shape.js +0 -87
- package/src/x_ite/Components/Sound/Analyser.js +0 -118
- package/src/x_ite/Components/Sound/AudioClip.js +0 -212
- package/src/x_ite/Components/Sound/AudioDestination.js +0 -107
- package/src/x_ite/Components/Sound/BiquadFilter.js +0 -117
- package/src/x_ite/Components/Sound/BufferAudioSource.js +0 -142
- package/src/x_ite/Components/Sound/ChannelMerger.js +0 -104
- package/src/x_ite/Components/Sound/ChannelSelector.js +0 -105
- package/src/x_ite/Components/Sound/ChannelSplitter.js +0 -105
- package/src/x_ite/Components/Sound/Convolver.js +0 -115
- package/src/x_ite/Components/Sound/Delay.js +0 -115
- package/src/x_ite/Components/Sound/DynamicsCompressor.js +0 -119
- package/src/x_ite/Components/Sound/Gain.js +0 -113
- package/src/x_ite/Components/Sound/ListenerPointSource.js +0 -116
- package/src/x_ite/Components/Sound/MicrophoneSource.js +0 -110
- package/src/x_ite/Components/Sound/OscillatorSource.js +0 -112
- package/src/x_ite/Components/Sound/PeriodicWave.js +0 -99
- package/src/x_ite/Components/Sound/Sound.js +0 -302
- package/src/x_ite/Components/Sound/SpatialSound.js +0 -116
- package/src/x_ite/Components/Sound/StreamAudioDestination.js +0 -107
- package/src/x_ite/Components/Sound/StreamAudioSource.js +0 -110
- package/src/x_ite/Components/Sound/WaveShaper.js +0 -115
- package/src/x_ite/Components/Sound/X3DSoundChannelNode.js +0 -74
- package/src/x_ite/Components/Sound/X3DSoundDestinationNode.js +0 -74
- package/src/x_ite/Components/Sound/X3DSoundNode.js +0 -74
- package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +0 -92
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +0 -227
- package/src/x_ite/Components/Sound.js +0 -109
- package/src/x_ite/Components/Text/FontStyle.js +0 -116
- package/src/x_ite/Components/Text/Text.js +0 -185
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +0 -261
- package/src/x_ite/Components/TextureProjector/TextureProjector.js +0 -213
- package/src/x_ite/Components/TextureProjector/TextureProjectorParallel.js +0 -268
- package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +0 -224
- package/src/x_ite/Components/Texturing/ImageTexture.js +0 -294
- package/src/x_ite/Components/Texturing/MovieTexture.js +0 -287
- package/src/x_ite/Components/Texturing/MultiTexture.js +0 -345
- package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +0 -200
- package/src/x_ite/Components/Texturing/MultiTextureTransform.js +0 -154
- package/src/x_ite/Components/Texturing/PixelTexture.js +0 -284
- package/src/x_ite/Components/Texturing/TextureCoordinate.js +0 -179
- package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +0 -163
- package/src/x_ite/Components/Texturing/TextureProperties.js +0 -226
- package/src/x_ite/Components/Texturing/TextureTransform.js +0 -162
- package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +0 -101
- package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +0 -195
- package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +0 -99
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +0 -172
- package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +0 -74
- package/src/x_ite/Components/Texturing/X3DTextureNode.js +0 -88
- package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +0 -74
- package/src/x_ite/Components/Texturing.js +0 -91
- package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +0 -201
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +0 -183
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +0 -245
- package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +0 -221
- package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +0 -179
- package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +0 -179
- package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +0 -151
- package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +0 -114
- package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +0 -173
- package/src/x_ite/Components/Time/TimeSensor.js +0 -223
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +0 -369
- package/src/x_ite/Components/Time.js +0 -61
- package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +0 -355
- package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +0 -154
- package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +0 -311
- package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +0 -204
- package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +0 -180
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +0 -367
- package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +0 -179
- package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +0 -230
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +0 -280
- package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +0 -280
- package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +0 -179
- package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +0 -186
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +0 -214
- package/src/x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode.js +0 -74
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +0 -241
- package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +0 -138
- package/src/x_ite/Components/X_ITE/BlendMode.js +0 -206
- package/src/x_ite/Components.js +0 -99
- package/src/x_ite/Configuration/AbstractNodes.js +0 -50
- package/src/x_ite/Configuration/AbstractNodesArray.js +0 -78
- package/src/x_ite/Configuration/ComponentInfo.js +0 -137
- package/src/x_ite/Configuration/ComponentInfoArray.js +0 -76
- package/src/x_ite/Configuration/ConcreteNodes.js +0 -50
- package/src/x_ite/Configuration/ConcreteNodesArray.js +0 -87
- package/src/x_ite/Configuration/ProfileInfo.js +0 -92
- package/src/x_ite/Configuration/ProfileInfoArray.js +0 -77
- package/src/x_ite/Configuration/SupportedComponents.js +0 -307
- package/src/x_ite/Configuration/SupportedProfiles.js +0 -245
- package/src/x_ite/Configuration/UnitInfo.js +0 -158
- package/src/x_ite/Configuration/UnitInfoArray.js +0 -70
- package/src/x_ite/DEVELOPMENT.js +0 -50
- package/src/x_ite/Execution/BindableList.js +0 -203
- package/src/x_ite/Execution/BindableStack.js +0 -163
- package/src/x_ite/Execution/ExportedNodesArray.js +0 -70
- package/src/x_ite/Execution/ImportedNodesArray.js +0 -70
- package/src/x_ite/Execution/NamedNodesArray.js +0 -70
- package/src/x_ite/Execution/NamedNodesHandling.js +0 -84
- package/src/x_ite/Execution/X3DExecutionContext.js +0 -1022
- package/src/x_ite/Execution/X3DExportedNode.js +0 -201
- package/src/x_ite/Execution/X3DImportedNode.js +0 -565
- package/src/x_ite/Execution/X3DScene.js +0 -1112
- package/src/x_ite/Execution/X3DWorld.js +0 -160
- package/src/x_ite/Features.js +0 -59
- package/src/x_ite/Fields/ArrayFields.js +0 -492
- package/src/x_ite/Fields/SFBool.js +0 -104
- package/src/x_ite/Fields/SFColor.js +0 -231
- package/src/x_ite/Fields/SFColorRGBA.js +0 -198
- package/src/x_ite/Fields/SFDouble.js +0 -108
- package/src/x_ite/Fields/SFFloat.js +0 -108
- package/src/x_ite/Fields/SFImage.js +0 -370
- package/src/x_ite/Fields/SFInt32.js +0 -104
- package/src/x_ite/Fields/SFMatrix3.js +0 -140
- package/src/x_ite/Fields/SFMatrix4.js +0 -133
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +0 -191
- package/src/x_ite/Fields/SFNode.js +0 -435
- package/src/x_ite/Fields/SFNodeCache.js +0 -108
- package/src/x_ite/Fields/SFRotation.js +0 -275
- package/src/x_ite/Fields/SFString.js +0 -134
- package/src/x_ite/Fields/SFTime.js +0 -104
- package/src/x_ite/Fields/SFVec2.js +0 -120
- package/src/x_ite/Fields/SFVec3.js +0 -140
- package/src/x_ite/Fields/SFVec4.js +0 -148
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +0 -201
- package/src/x_ite/Fields.js +0 -87
- package/src/x_ite/InputOutput/FileLoader.js +0 -340
- package/src/x_ite/InputOutput/Generator.js +0 -592
- package/src/x_ite/Namespace.js +0 -52
- package/src/x_ite/Parser/Expressions.js +0 -85
- package/src/x_ite/Parser/GLB2Parser.js +0 -146
- package/src/x_ite/Parser/GLTF2Parser.js +0 -2800
- package/src/x_ite/Parser/GoldenGate.js +0 -163
- package/src/x_ite/Parser/HTMLSupport.js +0 -74
- package/src/x_ite/Parser/JSONParser.js +0 -414
- package/src/x_ite/Parser/OBJParser.js +0 -1091
- package/src/x_ite/Parser/PLYAParser.js +0 -615
- package/src/x_ite/Parser/PLYBParser.js +0 -222
- package/src/x_ite/Parser/STLAParser.js +0 -377
- package/src/x_ite/Parser/STLBParser.js +0 -155
- package/src/x_ite/Parser/SVGParser.js +0 -2762
- package/src/x_ite/Parser/VRMLParser.js +0 -2548
- package/src/x_ite/Parser/X3DOptimizer.js +0 -220
- package/src/x_ite/Parser/X3DParser.js +0 -152
- package/src/x_ite/Parser/XMLParser.js +0 -1189
- package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +0 -70
- package/src/x_ite/Prototype/ProtoDeclarationArray.js +0 -70
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +0 -446
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +0 -571
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +0 -112
- package/src/x_ite/Rendering/DependentRenderer.js +0 -132
- package/src/x_ite/Rendering/MultiSampleFrameBuffer.js +0 -394
- package/src/x_ite/Rendering/PointingBuffer.js +0 -189
- package/src/x_ite/Rendering/TextureBuffer.js +0 -231
- package/src/x_ite/Rendering/TraverseType.js +0 -60
- package/src/x_ite/Rendering/VertexArray.js +0 -95
- package/src/x_ite/Rendering/X3DRenderObject.js +0 -1144
- package/src/x_ite/Routing/RouteArray.js +0 -70
- package/src/x_ite/Routing/X3DRoute.js +0 -316
- package/src/x_ite/Routing/X3DRoutingContext.js +0 -116
- package/src/x_ite/X3D.js +0 -250
- package/src/x_ite/X3DCanvasElement.js +0 -126
- package/src/x_ite.css +0 -587
- package/src/x_ite.html +0 -470
- package/src/x_ite.js +0 -60
- package/webpack.config.js +0 -341
- package/x_ite.min.html +0 -451
|
@@ -1,2762 +0,0 @@
|
|
|
1
|
-
/*******************************************************************************
|
|
2
|
-
*
|
|
3
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
4
|
-
*
|
|
5
|
-
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011 - 2022.
|
|
6
|
-
*
|
|
7
|
-
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
8
|
-
*
|
|
9
|
-
* The copyright notice above does not evidence any actual of intended
|
|
10
|
-
* publication of such source code, and is an unpublished work by create3000.
|
|
11
|
-
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
12
|
-
* create3000.
|
|
13
|
-
*
|
|
14
|
-
* No permission is granted to copy, distribute, or create derivative works from
|
|
15
|
-
* the contents of this software, in whole or in part, without the prior written
|
|
16
|
-
* permission of create3000.
|
|
17
|
-
*
|
|
18
|
-
* NON-MILITARY USE ONLY
|
|
19
|
-
*
|
|
20
|
-
* All create3000 software are effectively free software with a non-military use
|
|
21
|
-
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
22
|
-
* source in any way you please with the exception anything that uses it must be
|
|
23
|
-
* marked to indicate is contains 'non-military use only' components.
|
|
24
|
-
*
|
|
25
|
-
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
26
|
-
*
|
|
27
|
-
* Copyright 2011 - 2022, Holger Seelig <holger.seelig@yahoo.de>.
|
|
28
|
-
*
|
|
29
|
-
* This file is part of the X_ITE Project.
|
|
30
|
-
*
|
|
31
|
-
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
32
|
-
* terms of the GNU General Public License version 3 only, as published by the
|
|
33
|
-
* Free Software Foundation.
|
|
34
|
-
*
|
|
35
|
-
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
36
|
-
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
37
|
-
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
38
|
-
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
39
|
-
*
|
|
40
|
-
* You should have received a copy of the GNU General Public License version 3
|
|
41
|
-
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
42
|
-
* copy of the GPLv3 License.
|
|
43
|
-
*
|
|
44
|
-
* For Silvio, Joy and Adi.
|
|
45
|
-
*
|
|
46
|
-
******************************************************************************/
|
|
47
|
-
|
|
48
|
-
import X3DParser from "./X3DParser.js";
|
|
49
|
-
import X3DOptimizer from "./X3DOptimizer.js";
|
|
50
|
-
import Expressions from "./Expressions.js";
|
|
51
|
-
import Algorithm from "../../standard/Math/Algorithm.js";
|
|
52
|
-
import Color3 from "../../standard/Math/Numbers/Color3.js";
|
|
53
|
-
import Color4 from "../../standard/Math/Numbers/Color4.js";
|
|
54
|
-
import Vector2 from "../../standard/Math/Numbers/Vector2.js";
|
|
55
|
-
import Vector3 from "../../standard/Math/Numbers/Vector3.js";
|
|
56
|
-
import Vector4 from "../../standard/Math/Numbers/Vector4.js";
|
|
57
|
-
import Rotation4 from "../../standard/Math/Numbers/Rotation4.js";
|
|
58
|
-
import Matrix3 from "../../standard/Math/Numbers/Matrix3.js";
|
|
59
|
-
import Matrix4 from "../../standard/Math/Numbers/Matrix4.js";
|
|
60
|
-
import Complex from "../../standard/Math/Numbers/Complex.js";
|
|
61
|
-
import Box2 from "../../standard/Math/Geometry/Box2.js"
|
|
62
|
-
import Bezier from "../../standard/Math/Algorithms/Bezier.js";
|
|
63
|
-
import MatrixStack from "../../standard/Math/Utility/MatrixStack.js";
|
|
64
|
-
|
|
65
|
-
/*
|
|
66
|
-
* Grammar
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
// Lexical elements
|
|
70
|
-
const Grammar = Expressions ({
|
|
71
|
-
// General
|
|
72
|
-
whitespaces: /[\x20\n\t\r]+/gy,
|
|
73
|
-
comma: /,/gy,
|
|
74
|
-
openParenthesis: /\(/gy,
|
|
75
|
-
closeParenthesis: /\)/gy,
|
|
76
|
-
|
|
77
|
-
// Units
|
|
78
|
-
length: /(em|ex|px|in|cm|mm|pt|pc|%)/gy,
|
|
79
|
-
percent: /%/gy,
|
|
80
|
-
|
|
81
|
-
// Values
|
|
82
|
-
int32: /((?:0[xX][\da-fA-F]+)|(?:[+-]?\d+))/gy,
|
|
83
|
-
double: /([+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?))/gy,
|
|
84
|
-
constants: /([+-])((?:NAN|INF|INFINITY))/igy,
|
|
85
|
-
matrix: /matrix/gy,
|
|
86
|
-
translate: /translate/gy,
|
|
87
|
-
rotate: /rotate/gy,
|
|
88
|
-
scale: /scale/gy,
|
|
89
|
-
skewX: /skewX/gy,
|
|
90
|
-
skewY: /skewY/gy,
|
|
91
|
-
color: /([a-zA-Z]+|#[\da-fA-F]+|rgba?\(.*?\))/gy,
|
|
92
|
-
url: /url\("?(.*?)"?\)/gy,
|
|
93
|
-
path: /([mMlLhHvVqQtTcCsSaAzZ])/gy,
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
/*
|
|
97
|
-
* Constants
|
|
98
|
-
*/
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
MM = 0.001, // One mm in meters.
|
|
102
|
-
CM = 0.01, // One cm in meters.
|
|
103
|
-
INCH = 0.0254, // One inch in meters.
|
|
104
|
-
POINT = INCH / 72, // One point in meters.
|
|
105
|
-
PICA = INCH / 6, // One pica in meters.
|
|
106
|
-
PIXEL = INCH / 90, // One pixel in meters.
|
|
107
|
-
EM = 16, // One em in pixels.
|
|
108
|
-
SPREAD = 16; // Spread factor, Integer.
|
|
109
|
-
|
|
110
|
-
/*
|
|
111
|
-
* Parser
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
function SVGParser (scene)
|
|
115
|
-
{
|
|
116
|
-
X3DParser .call (this, scene);
|
|
117
|
-
X3DOptimizer .call (this);
|
|
118
|
-
|
|
119
|
-
// Optimizer
|
|
120
|
-
|
|
121
|
-
this .removeGroups = true;
|
|
122
|
-
this .removeEmptyGroups = true;
|
|
123
|
-
this .combineGroupingNodes = false;
|
|
124
|
-
|
|
125
|
-
// Options
|
|
126
|
-
|
|
127
|
-
this .solid = false; // Are 2D primitives solid?
|
|
128
|
-
|
|
129
|
-
// Globals
|
|
130
|
-
|
|
131
|
-
this .viewBox = new Vector4 (0, 0, 100, 100);
|
|
132
|
-
this .modelMatrix = new MatrixStack (Matrix4);
|
|
133
|
-
this .fillGeometries = new Map ();
|
|
134
|
-
this .strokeGeometries = new Map ();
|
|
135
|
-
this .lineProperties = new Map ();
|
|
136
|
-
this .tessy = this .createTesselator ();
|
|
137
|
-
this .canvas = document .createElement ("canvas");
|
|
138
|
-
this .context = this .canvas .getContext ("2d");
|
|
139
|
-
|
|
140
|
-
this .styles = [{
|
|
141
|
-
display: "inline",
|
|
142
|
-
fillType: "COLOR",
|
|
143
|
-
fillColor: Color4 .Black,
|
|
144
|
-
fillURL: "",
|
|
145
|
-
fillOpacity: 1,
|
|
146
|
-
fillRule: "nonzero",
|
|
147
|
-
strokeType: "none",
|
|
148
|
-
strokeColor: Color4 .Black,
|
|
149
|
-
strokeURL: "",
|
|
150
|
-
strokeOpacity: 1,
|
|
151
|
-
strokeWidth: 1,
|
|
152
|
-
opacity: 1,
|
|
153
|
-
stopColor: Color4 .Black,
|
|
154
|
-
stopOpacity: 1,
|
|
155
|
-
vectorEffect: "none",
|
|
156
|
-
}];
|
|
157
|
-
|
|
158
|
-
// Constants
|
|
159
|
-
|
|
160
|
-
const browser = scene .getBrowser ()
|
|
161
|
-
|
|
162
|
-
switch (browser .getBrowserOption ("PrimitiveQuality"))
|
|
163
|
-
{
|
|
164
|
-
case "LOW":
|
|
165
|
-
this .BEZIER_STEPS = 6; // Subdivisions of a span.
|
|
166
|
-
this .CIRCLE_STEPS = 20; // Subdivisions of a circle, used for arc and rounded rect.
|
|
167
|
-
break;
|
|
168
|
-
case "HIGH":
|
|
169
|
-
this .BEZIER_STEPS = 10; // Subdivisions of a span.
|
|
170
|
-
this .CIRCLE_STEPS = 64; // Subdivisions of a circle, used for arc and rounded rect.
|
|
171
|
-
break;
|
|
172
|
-
default:
|
|
173
|
-
this .BEZIER_STEPS = 8; // Subdivisions of a span.
|
|
174
|
-
this .CIRCLE_STEPS = 32; // Subdivisions of a circle, used for arc and rounded rect.
|
|
175
|
-
break;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
switch (browser .getBrowserOption ("TextureQuality"))
|
|
179
|
-
{
|
|
180
|
-
case "LOW":
|
|
181
|
-
this .GRADIENT_SIZE = 128; // In pixels.
|
|
182
|
-
break;
|
|
183
|
-
case "HIGH":
|
|
184
|
-
this .GRADIENT_SIZE = 512; // In pixels.
|
|
185
|
-
break;
|
|
186
|
-
default:
|
|
187
|
-
this .GRADIENT_SIZE = 256; // In pixels.
|
|
188
|
-
break;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
this .canvas .width = this .GRADIENT_SIZE;
|
|
192
|
-
this .canvas .height = this .GRADIENT_SIZE;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
Object .assign (Object .setPrototypeOf (SVGParser .prototype, X3DParser .prototype),
|
|
196
|
-
X3DOptimizer .prototype,
|
|
197
|
-
{
|
|
198
|
-
CONSTANTS: new Map ([
|
|
199
|
-
["NAN", NaN],
|
|
200
|
-
["INF", Infinity],
|
|
201
|
-
["INFINITY", Infinity],
|
|
202
|
-
]),
|
|
203
|
-
getEncoding ()
|
|
204
|
-
{
|
|
205
|
-
return "XML";
|
|
206
|
-
},
|
|
207
|
-
setInput (xmlElement)
|
|
208
|
-
{
|
|
209
|
-
try
|
|
210
|
-
{
|
|
211
|
-
if (typeof xmlElement === "string")
|
|
212
|
-
xmlElement = $.parseXML (xmlElement);
|
|
213
|
-
|
|
214
|
-
this .input = xmlElement;
|
|
215
|
-
}
|
|
216
|
-
catch
|
|
217
|
-
{
|
|
218
|
-
this .input = undefined;
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
isValid ()
|
|
222
|
-
{
|
|
223
|
-
if (!(this .input instanceof XMLDocument))
|
|
224
|
-
return false;
|
|
225
|
-
|
|
226
|
-
if ($(this .input) .children ("svg") .length)
|
|
227
|
-
return true;
|
|
228
|
-
|
|
229
|
-
if (this .input .nodeName === "svg")
|
|
230
|
-
return true;
|
|
231
|
-
|
|
232
|
-
return false;
|
|
233
|
-
},
|
|
234
|
-
parseIntoScene (resolve, reject)
|
|
235
|
-
{
|
|
236
|
-
this .xmlElement (this .input)
|
|
237
|
-
.then (resolve)
|
|
238
|
-
.catch (reject);
|
|
239
|
-
},
|
|
240
|
-
xmlElement: async function (xmlElement)
|
|
241
|
-
{
|
|
242
|
-
switch (xmlElement .nodeName)
|
|
243
|
-
{
|
|
244
|
-
case "#document":
|
|
245
|
-
{
|
|
246
|
-
const svg = $(xmlElement) .children ("svg");
|
|
247
|
-
|
|
248
|
-
for (const xmlElement of svg)
|
|
249
|
-
await this .svgElement (xmlElement);
|
|
250
|
-
|
|
251
|
-
break;
|
|
252
|
-
}
|
|
253
|
-
case "svg":
|
|
254
|
-
{
|
|
255
|
-
await this .svgElement (xmlElement);
|
|
256
|
-
break;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
return this .getScene ();
|
|
261
|
-
},
|
|
262
|
-
svgElement: async function (xmlElement)
|
|
263
|
-
{
|
|
264
|
-
const
|
|
265
|
-
browser = this .getBrowser (),
|
|
266
|
-
scene = this .getScene ();
|
|
267
|
-
|
|
268
|
-
scene .setEncoding ("SVG");
|
|
269
|
-
scene .setProfile (browser .getProfile ("Interchange"));
|
|
270
|
-
scene .addComponent (browser .getComponent ("Geometry2D", 2));
|
|
271
|
-
|
|
272
|
-
await this .loadComponents ();
|
|
273
|
-
|
|
274
|
-
// Init nodes.
|
|
275
|
-
|
|
276
|
-
this .document = this .input;
|
|
277
|
-
this .rootTransform = scene .createNode ("Transform");
|
|
278
|
-
this .groupNodes = [this .rootTransform];
|
|
279
|
-
this .texturePropertiesNode = this .createTextureProperties ();
|
|
280
|
-
|
|
281
|
-
// Create background.
|
|
282
|
-
|
|
283
|
-
const background = scene .createNode ("Background");
|
|
284
|
-
|
|
285
|
-
background .skyColor = [1, 1, 1];
|
|
286
|
-
|
|
287
|
-
scene .getRootNodes () .push (background);
|
|
288
|
-
|
|
289
|
-
// Create navigation info.
|
|
290
|
-
|
|
291
|
-
const navigationInfo = scene .createNode ("NavigationInfo");
|
|
292
|
-
|
|
293
|
-
navigationInfo .type = ["PLANE_create3000.github.io", "PLANE", "EXAMINE", "ANY"];
|
|
294
|
-
|
|
295
|
-
scene .getRootNodes () .push (navigationInfo);
|
|
296
|
-
|
|
297
|
-
// Get attributes of svg element.
|
|
298
|
-
|
|
299
|
-
const
|
|
300
|
-
defaultWidth = this .lengthAttribute (xmlElement .getAttribute ("width"), 300, "width"),
|
|
301
|
-
defaultHeight = this .lengthAttribute (xmlElement .getAttribute ("height"), 150, "height"),
|
|
302
|
-
defaultViewBox = this .viewBox .set (0, 0, defaultWidth, defaultHeight),
|
|
303
|
-
viewBox = this .viewBoxAttribute (xmlElement .getAttribute ("viewBox"), defaultViewBox),
|
|
304
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"), viewBox [2], "width"),
|
|
305
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), viewBox [3], "height");
|
|
306
|
-
|
|
307
|
-
if (true) // default
|
|
308
|
-
{
|
|
309
|
-
// preserveAspectRatio = "xMidYMid meet"
|
|
310
|
-
|
|
311
|
-
const
|
|
312
|
-
r = width / height,
|
|
313
|
-
rv = viewBox [2] / viewBox [3];
|
|
314
|
-
|
|
315
|
-
if (rv > r)
|
|
316
|
-
viewBox [3] += viewBox [2] / r - viewBox [3];
|
|
317
|
-
else
|
|
318
|
-
viewBox [2] += viewBox [3] * r - viewBox [2];
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
// Create viewpoint.
|
|
322
|
-
|
|
323
|
-
const
|
|
324
|
-
viewpoint = scene .createNode ("OrthoViewpoint"),
|
|
325
|
-
x = (viewBox .x + width / 2) * PIXEL,
|
|
326
|
-
y = -(viewBox .y + height / 2) * PIXEL;
|
|
327
|
-
|
|
328
|
-
viewpoint .position = new Vector3 (x, y, 10);
|
|
329
|
-
viewpoint .centerOfRotation = new Vector3 (x, y, 0);
|
|
330
|
-
|
|
331
|
-
viewpoint .fieldOfView = [
|
|
332
|
-
-width / 2 * PIXEL,
|
|
333
|
-
-height / 2 * PIXEL,
|
|
334
|
-
width / 2 * PIXEL,
|
|
335
|
-
height / 2 * PIXEL,
|
|
336
|
-
];
|
|
337
|
-
|
|
338
|
-
scene .getRootNodes () .push (viewpoint);
|
|
339
|
-
|
|
340
|
-
// Create view matrix.
|
|
341
|
-
|
|
342
|
-
const
|
|
343
|
-
scale = new Vector3 (width * PIXEL / viewBox [2], -height * PIXEL / viewBox [3], 1),
|
|
344
|
-
translation = new Vector3 (-viewBox .x, viewBox .y, 0) .multVec (scale);
|
|
345
|
-
|
|
346
|
-
this .rootTransform .translation = translation;
|
|
347
|
-
this .rootTransform .scale = scale;
|
|
348
|
-
|
|
349
|
-
// Parse elements.
|
|
350
|
-
|
|
351
|
-
this .elements (xmlElement);
|
|
352
|
-
|
|
353
|
-
// Add root Transform node.
|
|
354
|
-
|
|
355
|
-
scene .addNamedNode (scene .getUniqueName ("ViewBox"), this .rootTransform);
|
|
356
|
-
scene .addExportedNode (scene .getUniqueExportName ("ViewBox"), this .rootTransform);
|
|
357
|
-
scene .getRootNodes () .push (this .rootTransform);
|
|
358
|
-
|
|
359
|
-
// Optimize scene graph.
|
|
360
|
-
|
|
361
|
-
this .optimizeSceneGraph (scene .getRootNodes ());
|
|
362
|
-
},
|
|
363
|
-
elements (xmlElement)
|
|
364
|
-
{
|
|
365
|
-
for (const childNode of xmlElement .childNodes)
|
|
366
|
-
this .element (childNode);
|
|
367
|
-
},
|
|
368
|
-
element (xmlElement)
|
|
369
|
-
{
|
|
370
|
-
switch (xmlElement .nodeName)
|
|
371
|
-
{
|
|
372
|
-
case "use":
|
|
373
|
-
return this .useElement (xmlElement);
|
|
374
|
-
case "g":
|
|
375
|
-
return this .gElement (xmlElement);
|
|
376
|
-
case "switch":
|
|
377
|
-
return this .switchElement (xmlElement);
|
|
378
|
-
case "a":
|
|
379
|
-
return this .aElement (xmlElement);
|
|
380
|
-
case "rect":
|
|
381
|
-
return this .rectElement (xmlElement);
|
|
382
|
-
case "circle":
|
|
383
|
-
return this .circleElement (xmlElement);
|
|
384
|
-
case "ellipse":
|
|
385
|
-
return this .ellipseElement (xmlElement);
|
|
386
|
-
case "text":
|
|
387
|
-
return this .textElement (xmlElement);
|
|
388
|
-
case "image":
|
|
389
|
-
return this .imageElement (xmlElement);
|
|
390
|
-
case "polyline":
|
|
391
|
-
return this .polylineElement (xmlElement);
|
|
392
|
-
case "polygon":
|
|
393
|
-
return this .polygonElement (xmlElement);
|
|
394
|
-
case "path":
|
|
395
|
-
return this .pathElement (xmlElement);
|
|
396
|
-
}
|
|
397
|
-
},
|
|
398
|
-
useElement (xmlElement)
|
|
399
|
-
{
|
|
400
|
-
// Get href.
|
|
401
|
-
|
|
402
|
-
const usedElement = this .hrefAttribute (xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href"));
|
|
403
|
-
|
|
404
|
-
if (!usedElement)
|
|
405
|
-
return;
|
|
406
|
-
|
|
407
|
-
// Determine style.
|
|
408
|
-
|
|
409
|
-
if (!this .styleAttributes (xmlElement))
|
|
410
|
-
return;
|
|
411
|
-
|
|
412
|
-
// Create Transform node.
|
|
413
|
-
|
|
414
|
-
const
|
|
415
|
-
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
416
|
-
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
417
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
418
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height");
|
|
419
|
-
|
|
420
|
-
const transformNode = this .createTransform (xmlElement, new Vector2 (x, y));
|
|
421
|
-
|
|
422
|
-
this .groupNodes .push (transformNode);
|
|
423
|
-
|
|
424
|
-
this .element (usedElement);
|
|
425
|
-
|
|
426
|
-
this .popAll ();
|
|
427
|
-
},
|
|
428
|
-
gElement (xmlElement)
|
|
429
|
-
{
|
|
430
|
-
// Determine style.
|
|
431
|
-
|
|
432
|
-
if (!this .styleAttributes (xmlElement))
|
|
433
|
-
return;
|
|
434
|
-
|
|
435
|
-
// Create Transform node.
|
|
436
|
-
|
|
437
|
-
const transformNode = this .createTransform (xmlElement);
|
|
438
|
-
|
|
439
|
-
// Get child elements.
|
|
440
|
-
|
|
441
|
-
this .groupNodes .push (transformNode);
|
|
442
|
-
|
|
443
|
-
this .elements (xmlElement);
|
|
444
|
-
|
|
445
|
-
this .popAll ();
|
|
446
|
-
},
|
|
447
|
-
switchElement (xmlElement)
|
|
448
|
-
{
|
|
449
|
-
// Determine style.
|
|
450
|
-
|
|
451
|
-
if (!this .styleAttributes (xmlElement))
|
|
452
|
-
return;
|
|
453
|
-
|
|
454
|
-
// Create Transform node.
|
|
455
|
-
|
|
456
|
-
const
|
|
457
|
-
scene = this .getExecutionContext (),
|
|
458
|
-
transformNode = this .createTransform (xmlElement),
|
|
459
|
-
switchNode = scene .createNode ("Switch");
|
|
460
|
-
|
|
461
|
-
transformNode .children .push (switchNode);
|
|
462
|
-
switchNode .whichChoice = 0;
|
|
463
|
-
|
|
464
|
-
// Get child elements.
|
|
465
|
-
|
|
466
|
-
this .groupNodes .push (switchNode);
|
|
467
|
-
|
|
468
|
-
this .elements (xmlElement);
|
|
469
|
-
|
|
470
|
-
this .popAll ();
|
|
471
|
-
},
|
|
472
|
-
aElement (xmlElement)
|
|
473
|
-
{
|
|
474
|
-
// Determine style.
|
|
475
|
-
|
|
476
|
-
if (!this .styleAttributes (xmlElement))
|
|
477
|
-
return;
|
|
478
|
-
|
|
479
|
-
// Get attributes.
|
|
480
|
-
|
|
481
|
-
const
|
|
482
|
-
href = xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href"),
|
|
483
|
-
title = xmlElement .getAttribute ("title") || xmlElement .getAttribute ("xlink:title"),
|
|
484
|
-
target = xmlElement .getAttribute ("target");
|
|
485
|
-
|
|
486
|
-
// Create Transform node.
|
|
487
|
-
|
|
488
|
-
const
|
|
489
|
-
scene = this .getExecutionContext (),
|
|
490
|
-
transformNode = this .createTransform (xmlElement),
|
|
491
|
-
anchorNode = scene .createNode ("Anchor");
|
|
492
|
-
|
|
493
|
-
transformNode .children .push (anchorNode);
|
|
494
|
-
|
|
495
|
-
anchorNode .description = title;
|
|
496
|
-
anchorNode .url = [href];
|
|
497
|
-
|
|
498
|
-
if (target)
|
|
499
|
-
anchorNode .parameter = [`target=${target}`];
|
|
500
|
-
|
|
501
|
-
// Get child elements.
|
|
502
|
-
|
|
503
|
-
this .groupNodes .push (anchorNode);
|
|
504
|
-
|
|
505
|
-
this .elements (xmlElement);
|
|
506
|
-
|
|
507
|
-
this .popAll ();
|
|
508
|
-
},
|
|
509
|
-
rectElement (xmlElement)
|
|
510
|
-
{
|
|
511
|
-
// Create Transform node.
|
|
512
|
-
|
|
513
|
-
const
|
|
514
|
-
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
515
|
-
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
516
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
517
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height");
|
|
518
|
-
|
|
519
|
-
let
|
|
520
|
-
rx = Math .max (0, this .lengthAttribute (xmlElement .getAttribute ("rx"), 0, "width")),
|
|
521
|
-
ry = Math .max (0, this .lengthAttribute (xmlElement .getAttribute ("ry"), 0, "height"));
|
|
522
|
-
|
|
523
|
-
if (rx === 0 && ry === 0)
|
|
524
|
-
{
|
|
525
|
-
// Determine style.
|
|
526
|
-
|
|
527
|
-
if (!this .styleAttributes (xmlElement))
|
|
528
|
-
return;
|
|
529
|
-
|
|
530
|
-
// Create Transform node.
|
|
531
|
-
|
|
532
|
-
const
|
|
533
|
-
scene = this .getExecutionContext (),
|
|
534
|
-
size = new Vector2 (width, height),
|
|
535
|
-
center = new Vector2 (x + width / 2, y + height / 2),
|
|
536
|
-
bbox = new Box2 (size, center),
|
|
537
|
-
transformNode = this .createTransform (xmlElement, center);
|
|
538
|
-
|
|
539
|
-
this .groupNodes .push (transformNode);
|
|
540
|
-
|
|
541
|
-
// Create nodes.
|
|
542
|
-
|
|
543
|
-
if (this .style .fillType !== "none")
|
|
544
|
-
{
|
|
545
|
-
const
|
|
546
|
-
shapeNode = scene .createNode ("Shape"),
|
|
547
|
-
rectangleNode = this .fillGeometries .get (xmlElement);
|
|
548
|
-
|
|
549
|
-
transformNode .children .push (shapeNode);
|
|
550
|
-
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
551
|
-
|
|
552
|
-
if (rectangleNode)
|
|
553
|
-
{
|
|
554
|
-
shapeNode .geometry = rectangleNode;
|
|
555
|
-
}
|
|
556
|
-
else
|
|
557
|
-
{
|
|
558
|
-
const rectangleNode = scene .createNode ("Rectangle2D");
|
|
559
|
-
|
|
560
|
-
this .fillGeometries .set (xmlElement, rectangleNode);
|
|
561
|
-
|
|
562
|
-
shapeNode .geometry = rectangleNode;
|
|
563
|
-
rectangleNode .solid = this .solid;
|
|
564
|
-
rectangleNode .size = size;
|
|
565
|
-
}
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
if (this .style .strokeType !== "none")
|
|
569
|
-
{
|
|
570
|
-
const
|
|
571
|
-
shapeNode = scene .createNode ("Shape"),
|
|
572
|
-
polylineNode = this .strokeGeometries .get (xmlElement);
|
|
573
|
-
|
|
574
|
-
transformNode .children .push (shapeNode);
|
|
575
|
-
shapeNode .appearance = this .createStrokeAppearance ();
|
|
576
|
-
|
|
577
|
-
if (polylineNode)
|
|
578
|
-
{
|
|
579
|
-
shapeNode .geometry = polylineNode;
|
|
580
|
-
}
|
|
581
|
-
else
|
|
582
|
-
{
|
|
583
|
-
const
|
|
584
|
-
polylineNode = scene .createNode ("Polyline2D"),
|
|
585
|
-
width1_2 = width / 2,
|
|
586
|
-
height1_2 = height / 2;
|
|
587
|
-
|
|
588
|
-
this .strokeGeometries .set (xmlElement, polylineNode);
|
|
589
|
-
|
|
590
|
-
shapeNode .geometry = polylineNode;
|
|
591
|
-
|
|
592
|
-
polylineNode .lineSegments = [ width1_2, height1_2,
|
|
593
|
-
-width1_2, height1_2,
|
|
594
|
-
-width1_2, -height1_2,
|
|
595
|
-
width1_2, -height1_2,
|
|
596
|
-
width1_2, height1_2];
|
|
597
|
-
}
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
this .popAll ();
|
|
601
|
-
}
|
|
602
|
-
else
|
|
603
|
-
{
|
|
604
|
-
// Create points.
|
|
605
|
-
|
|
606
|
-
if (rx && !ry) ry = rx;
|
|
607
|
-
if (ry && !rx) rx = ry;
|
|
608
|
-
|
|
609
|
-
rx = Math .min (rx, width / 2);
|
|
610
|
-
ry = Math .min (ry, height / 2);
|
|
611
|
-
|
|
612
|
-
const
|
|
613
|
-
xOffsets = [x + width - rx, x + rx , x + rx, x + width - rx],
|
|
614
|
-
yOffsets = [y + height - ry, y + height - ry, y + ry, y + ry],
|
|
615
|
-
points = Object .assign ([ ], { closed: true });
|
|
616
|
-
|
|
617
|
-
for (let c = 0; c < 4; ++ c)
|
|
618
|
-
{
|
|
619
|
-
const s = c * Math .PI / 2;
|
|
620
|
-
|
|
621
|
-
for (let i = 0, N = this .CIRCLE_STEPS / 4; i < N; ++ i)
|
|
622
|
-
{
|
|
623
|
-
const p = Complex .Polar (1, s + Math .PI / 2 * i / (N - 1));
|
|
624
|
-
|
|
625
|
-
points .push (new Vector3 (xOffsets [c] + p .real * rx, yOffsets [c] + p .imag * ry, 0));
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
|
|
629
|
-
points .pop ();
|
|
630
|
-
|
|
631
|
-
// Create nodes.
|
|
632
|
-
|
|
633
|
-
this .pathLikeElement (xmlElement, [points]);
|
|
634
|
-
}
|
|
635
|
-
},
|
|
636
|
-
circleElement (xmlElement)
|
|
637
|
-
{
|
|
638
|
-
// Determine style.
|
|
639
|
-
|
|
640
|
-
if (!this .styleAttributes (xmlElement))
|
|
641
|
-
return;
|
|
642
|
-
|
|
643
|
-
// Create Transform node.
|
|
644
|
-
|
|
645
|
-
const
|
|
646
|
-
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0, "width"),
|
|
647
|
-
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0, "height"),
|
|
648
|
-
r = this .lengthAttribute (xmlElement .getAttribute ("r"), 0);
|
|
649
|
-
|
|
650
|
-
const
|
|
651
|
-
scene = this .getExecutionContext (),
|
|
652
|
-
bbox = new Box2 (new Vector2 (r * 2, r * 2), new Vector2 (cx, cy)),
|
|
653
|
-
transformNode = this .createTransform (xmlElement, new Vector2 (cx, cy));
|
|
654
|
-
|
|
655
|
-
this .groupNodes .push (transformNode);
|
|
656
|
-
|
|
657
|
-
// Create nodes.
|
|
658
|
-
|
|
659
|
-
if (this .style .fillType !== "none")
|
|
660
|
-
{
|
|
661
|
-
const
|
|
662
|
-
shapeNode = scene .createNode ("Shape"),
|
|
663
|
-
diskNode = this .fillGeometries .get (xmlElement);
|
|
664
|
-
|
|
665
|
-
transformNode .children .push (shapeNode);
|
|
666
|
-
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
667
|
-
|
|
668
|
-
if (diskNode)
|
|
669
|
-
{
|
|
670
|
-
shapeNode .geometry = diskNode;
|
|
671
|
-
}
|
|
672
|
-
else
|
|
673
|
-
{
|
|
674
|
-
const diskNode = scene .createNode ("Disk2D");
|
|
675
|
-
|
|
676
|
-
this .fillGeometries .set (xmlElement, diskNode);
|
|
677
|
-
|
|
678
|
-
shapeNode .geometry = diskNode;
|
|
679
|
-
diskNode .solid = this .solid;
|
|
680
|
-
diskNode .outerRadius = r;
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
|
|
684
|
-
if (this .style .strokeType !== "none")
|
|
685
|
-
{
|
|
686
|
-
const
|
|
687
|
-
shapeNode = scene .createNode ("Shape"),
|
|
688
|
-
circleNode = this .strokeGeometries .get (xmlElement);
|
|
689
|
-
|
|
690
|
-
transformNode .children .push (shapeNode);
|
|
691
|
-
shapeNode .appearance = this .createStrokeAppearance ();
|
|
692
|
-
|
|
693
|
-
if (circleNode)
|
|
694
|
-
{
|
|
695
|
-
shapeNode .geometry = circleNode;
|
|
696
|
-
}
|
|
697
|
-
else
|
|
698
|
-
{
|
|
699
|
-
const circleNode = scene .createNode ("Circle2D");
|
|
700
|
-
|
|
701
|
-
this .strokeGeometries .set (xmlElement, circleNode);
|
|
702
|
-
|
|
703
|
-
shapeNode .geometry = circleNode;
|
|
704
|
-
circleNode .radius = r;
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
|
-
|
|
708
|
-
this .popAll ();
|
|
709
|
-
},
|
|
710
|
-
ellipseElement (xmlElement)
|
|
711
|
-
{
|
|
712
|
-
// Determine style.
|
|
713
|
-
|
|
714
|
-
if (!this .styleAttributes (xmlElement))
|
|
715
|
-
return;
|
|
716
|
-
|
|
717
|
-
// Create Transform node.
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), 0, "width"),
|
|
721
|
-
cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), 0, "height"),
|
|
722
|
-
rx = this .lengthAttribute (xmlElement .getAttribute ("rx"), 0, "width"),
|
|
723
|
-
ry = this .lengthAttribute (xmlElement .getAttribute ("ry"), 0, "height");
|
|
724
|
-
|
|
725
|
-
const
|
|
726
|
-
scene = this .getExecutionContext (),
|
|
727
|
-
rMin = Math .min (rx, ry),
|
|
728
|
-
bbox = new Box2 (new Vector2 (rx * 2, ry * 2), new Vector2 (cx, cy)),
|
|
729
|
-
transformNode = this .createTransform (xmlElement, new Vector2 (cx, cy), new Vector2 (rx / rMin, ry / rMin));
|
|
730
|
-
|
|
731
|
-
this .groupNodes .push (transformNode);
|
|
732
|
-
|
|
733
|
-
// Create nodes.
|
|
734
|
-
|
|
735
|
-
if (this .style .fillType !== "none")
|
|
736
|
-
{
|
|
737
|
-
const
|
|
738
|
-
shapeNode = scene .createNode ("Shape"),
|
|
739
|
-
diskNode = this .fillGeometries .get (xmlElement);
|
|
740
|
-
|
|
741
|
-
transformNode .children .push (shapeNode);
|
|
742
|
-
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
743
|
-
|
|
744
|
-
if (diskNode)
|
|
745
|
-
{
|
|
746
|
-
shapeNode .geometry = diskNode;
|
|
747
|
-
}
|
|
748
|
-
else
|
|
749
|
-
{
|
|
750
|
-
const diskNode = scene .createNode ("Disk2D");
|
|
751
|
-
|
|
752
|
-
this .fillGeometries .set (xmlElement, diskNode);
|
|
753
|
-
|
|
754
|
-
shapeNode .geometry = diskNode;
|
|
755
|
-
diskNode .solid = this .solid;
|
|
756
|
-
diskNode .outerRadius = rMin;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
if (this .style .strokeType !== "none")
|
|
761
|
-
{
|
|
762
|
-
const
|
|
763
|
-
shapeNode = scene .createNode ("Shape"),
|
|
764
|
-
circleNode = this .strokeGeometries .get (xmlElement);
|
|
765
|
-
|
|
766
|
-
transformNode .children .push (shapeNode);
|
|
767
|
-
shapeNode .appearance = this .createStrokeAppearance ();
|
|
768
|
-
|
|
769
|
-
if (circleNode)
|
|
770
|
-
{
|
|
771
|
-
shapeNode .geometry = circleNode;
|
|
772
|
-
}
|
|
773
|
-
else
|
|
774
|
-
{
|
|
775
|
-
const circleNode = scene .createNode ("Circle2D");
|
|
776
|
-
|
|
777
|
-
this .strokeGeometries .set (xmlElement, circleNode);
|
|
778
|
-
|
|
779
|
-
shapeNode .geometry = circleNode;
|
|
780
|
-
circleNode .radius = rMin;
|
|
781
|
-
}
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
this .popAll ();
|
|
785
|
-
},
|
|
786
|
-
textElement (xmlElement)
|
|
787
|
-
{
|
|
788
|
-
|
|
789
|
-
},
|
|
790
|
-
imageElement (xmlElement)
|
|
791
|
-
{
|
|
792
|
-
const transformNode = this .fillGeometries .get (xmlElement);
|
|
793
|
-
|
|
794
|
-
if (transformNode)
|
|
795
|
-
{
|
|
796
|
-
this .groupNodes .at (-1) .children .push (transformNode);
|
|
797
|
-
}
|
|
798
|
-
else
|
|
799
|
-
{
|
|
800
|
-
// Determine style.
|
|
801
|
-
|
|
802
|
-
if (!this .styleAttributes (xmlElement))
|
|
803
|
-
return;
|
|
804
|
-
|
|
805
|
-
// Create Transform node.
|
|
806
|
-
|
|
807
|
-
const
|
|
808
|
-
x = this .lengthAttribute (xmlElement .getAttribute ("x"), 0, "width"),
|
|
809
|
-
y = this .lengthAttribute (xmlElement .getAttribute ("y"), 0, "height"),
|
|
810
|
-
width = this .lengthAttribute (xmlElement .getAttribute ("width"), 0, "width"),
|
|
811
|
-
height = this .lengthAttribute (xmlElement .getAttribute ("height"), 0, "height"),
|
|
812
|
-
href = xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href");
|
|
813
|
-
|
|
814
|
-
const
|
|
815
|
-
scene = this .getExecutionContext (),
|
|
816
|
-
transformNode = this .createTransform (xmlElement, new Vector2 (x + width / 2, y + height / 2), new Vector2 (1, -1));
|
|
817
|
-
|
|
818
|
-
this .fillGeometries .set (xmlElement, transformNode);
|
|
819
|
-
this .groupNodes .push (transformNode);
|
|
820
|
-
|
|
821
|
-
// Create nodes.
|
|
822
|
-
|
|
823
|
-
const
|
|
824
|
-
shapeNode = scene .createNode ("Shape"),
|
|
825
|
-
appearanceNode = scene .createNode ("Appearance"),
|
|
826
|
-
textureNode = scene .createNode ("ImageTexture"),
|
|
827
|
-
rectangleNode = scene .createNode ("Rectangle2D");
|
|
828
|
-
|
|
829
|
-
shapeNode .appearance = appearanceNode;
|
|
830
|
-
shapeNode .geometry = rectangleNode;
|
|
831
|
-
appearanceNode .texture = textureNode;
|
|
832
|
-
textureNode .url = [href];
|
|
833
|
-
textureNode .textureProperties = this .texturePropertiesNode;
|
|
834
|
-
rectangleNode .solid = this .solid;
|
|
835
|
-
rectangleNode .size = new Vector2 (width, height);
|
|
836
|
-
|
|
837
|
-
transformNode .children .push (shapeNode);
|
|
838
|
-
|
|
839
|
-
this .popAll ();
|
|
840
|
-
}
|
|
841
|
-
},
|
|
842
|
-
polylineElement (xmlElement)
|
|
843
|
-
{
|
|
844
|
-
// Get points.
|
|
845
|
-
|
|
846
|
-
const points = [ ];
|
|
847
|
-
|
|
848
|
-
if (!this .pointsAttribute (xmlElement .getAttribute ("points"), points))
|
|
849
|
-
return;
|
|
850
|
-
|
|
851
|
-
// Create nodes.
|
|
852
|
-
|
|
853
|
-
this .pathLikeElement (xmlElement, [points]);
|
|
854
|
-
},
|
|
855
|
-
polygonElement (xmlElement)
|
|
856
|
-
{
|
|
857
|
-
// Get points.
|
|
858
|
-
|
|
859
|
-
const points = Object .assign ([ ], { closed: true });
|
|
860
|
-
|
|
861
|
-
if (!this .pointsAttribute (xmlElement .getAttribute ("points"), points))
|
|
862
|
-
return;
|
|
863
|
-
|
|
864
|
-
// Create nodes.
|
|
865
|
-
|
|
866
|
-
this .pathLikeElement (xmlElement, [points]);
|
|
867
|
-
},
|
|
868
|
-
pathElement (xmlElement)
|
|
869
|
-
{
|
|
870
|
-
// Get path points.
|
|
871
|
-
|
|
872
|
-
const contours = [ ];
|
|
873
|
-
|
|
874
|
-
if (!this .dAttribute (xmlElement .getAttribute ("d"), contours))
|
|
875
|
-
return;
|
|
876
|
-
|
|
877
|
-
// Create nodes.
|
|
878
|
-
|
|
879
|
-
this .pathLikeElement (xmlElement, contours);
|
|
880
|
-
},
|
|
881
|
-
pathLikeElement (xmlElement, contours)
|
|
882
|
-
{
|
|
883
|
-
// Determine style.
|
|
884
|
-
|
|
885
|
-
if (!this .styleAttributes (xmlElement))
|
|
886
|
-
return;
|
|
887
|
-
|
|
888
|
-
// Filter consecutive equal points.
|
|
889
|
-
|
|
890
|
-
const EPSILON = 1e-9; // Min point distance.
|
|
891
|
-
|
|
892
|
-
contours = contours .map (points =>
|
|
893
|
-
{
|
|
894
|
-
if (points .closed)
|
|
895
|
-
{
|
|
896
|
-
return Object .assign (points .filter ((p, i, a) => p .distance (a [(i + 1) % a .length]) > EPSILON),
|
|
897
|
-
{
|
|
898
|
-
closed: true,
|
|
899
|
-
});
|
|
900
|
-
}
|
|
901
|
-
else
|
|
902
|
-
{
|
|
903
|
-
return points .filter ((p, i, a) => !i || p .distance (a [i - 1]) > EPSILON);
|
|
904
|
-
}
|
|
905
|
-
})
|
|
906
|
-
.filter (points => points .length > 2);
|
|
907
|
-
|
|
908
|
-
// Add index property to points.
|
|
909
|
-
|
|
910
|
-
contours .forEach ((points, i, a) => points .index = i ? a [i - 1] .index + a [i - 1] .length : 0);
|
|
911
|
-
|
|
912
|
-
// Create Transform node.
|
|
913
|
-
|
|
914
|
-
const
|
|
915
|
-
scene = this .getExecutionContext (),
|
|
916
|
-
transformNode = this .createTransform (xmlElement),
|
|
917
|
-
bbox = new Box2 ();
|
|
918
|
-
|
|
919
|
-
for (const points of contours)
|
|
920
|
-
bbox .add (Box2 .Points (points));
|
|
921
|
-
|
|
922
|
-
this .groupNodes .push (transformNode);
|
|
923
|
-
|
|
924
|
-
// Create nodes.
|
|
925
|
-
|
|
926
|
-
const coordinateNode = scene .createNode ("Coordinate");
|
|
927
|
-
|
|
928
|
-
for (const points of contours)
|
|
929
|
-
coordinateNode .point .push (... points);
|
|
930
|
-
|
|
931
|
-
if (this .style .fillType !== "none")
|
|
932
|
-
{
|
|
933
|
-
const
|
|
934
|
-
shapeNode = scene .createNode ("Shape"),
|
|
935
|
-
geometryNode = this .fillGeometries .get (xmlElement);
|
|
936
|
-
|
|
937
|
-
transformNode .children .push (shapeNode);
|
|
938
|
-
shapeNode .appearance = this .createFillAppearance (bbox);
|
|
939
|
-
|
|
940
|
-
if (geometryNode)
|
|
941
|
-
{
|
|
942
|
-
shapeNode .geometry = geometryNode;
|
|
943
|
-
}
|
|
944
|
-
else
|
|
945
|
-
{
|
|
946
|
-
const geometryNode = scene .createNode ("IndexedTriangleSet");
|
|
947
|
-
|
|
948
|
-
this .fillGeometries .set (xmlElement, geometryNode);
|
|
949
|
-
|
|
950
|
-
shapeNode .geometry = geometryNode;
|
|
951
|
-
geometryNode .solid = this .solid;
|
|
952
|
-
geometryNode .index = this .triangulatePolygon (contours, coordinateNode);
|
|
953
|
-
geometryNode .texCoord = this .createTextureCoordinate (coordinateNode, bbox, shapeNode .appearance);
|
|
954
|
-
geometryNode .coord = coordinateNode;
|
|
955
|
-
}
|
|
956
|
-
}
|
|
957
|
-
|
|
958
|
-
if (this .style .strokeType !== "none")
|
|
959
|
-
{
|
|
960
|
-
const
|
|
961
|
-
shapeNode = scene .createNode ("Shape"),
|
|
962
|
-
geometryNode = this .strokeGeometries .get (xmlElement);
|
|
963
|
-
|
|
964
|
-
transformNode .children .push (shapeNode);
|
|
965
|
-
shapeNode .appearance = this .createStrokeAppearance ();
|
|
966
|
-
|
|
967
|
-
if (geometryNode)
|
|
968
|
-
{
|
|
969
|
-
shapeNode .geometry = geometryNode;
|
|
970
|
-
}
|
|
971
|
-
else
|
|
972
|
-
{
|
|
973
|
-
const geometryNode = scene .createNode ("IndexedLineSet");
|
|
974
|
-
|
|
975
|
-
this .strokeGeometries .set (xmlElement, geometryNode);
|
|
976
|
-
|
|
977
|
-
shapeNode .geometry = geometryNode;
|
|
978
|
-
geometryNode .coord = coordinateNode;
|
|
979
|
-
|
|
980
|
-
// Create contour indices.
|
|
981
|
-
|
|
982
|
-
const indices = geometryNode .coordIndex;
|
|
983
|
-
|
|
984
|
-
for (const points of contours)
|
|
985
|
-
{
|
|
986
|
-
for (const i of points .keys ())
|
|
987
|
-
indices .push (points .index + i);
|
|
988
|
-
|
|
989
|
-
if (points .closed)
|
|
990
|
-
indices .push (points .index);
|
|
991
|
-
|
|
992
|
-
indices .push (-1);
|
|
993
|
-
}
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
this .popAll ();
|
|
998
|
-
},
|
|
999
|
-
linearGradientElementUrl (xmlElement, bbox)
|
|
1000
|
-
{
|
|
1001
|
-
const
|
|
1002
|
-
g = this .linearGradientElement (xmlElement, bbox, { stops: [ ] }),
|
|
1003
|
-
gradient = this .context .createLinearGradient (g .x1, g .y1, g .x2, g .y2);
|
|
1004
|
-
|
|
1005
|
-
return this .drawGradient (gradient, g, bbox);
|
|
1006
|
-
},
|
|
1007
|
-
linearGradientElement (xmlElement, bbox, gradient)
|
|
1008
|
-
{
|
|
1009
|
-
if (xmlElement .nodeName !== "linearGradient")
|
|
1010
|
-
return;
|
|
1011
|
-
|
|
1012
|
-
// Attribute xlink:href
|
|
1013
|
-
|
|
1014
|
-
const refElement = this .hrefAttribute (xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href"));
|
|
1015
|
-
|
|
1016
|
-
if (refElement)
|
|
1017
|
-
this .gradientElement (refElement, bbox, gradient);
|
|
1018
|
-
|
|
1019
|
-
// Attributes
|
|
1020
|
-
|
|
1021
|
-
gradient .x1 = this .lengthAttribute (xmlElement .getAttribute ("x1"), gradient .x1 || 0, "width");
|
|
1022
|
-
gradient .y1 = this .lengthAttribute (xmlElement .getAttribute ("y1"), gradient .y1 || 0, "height");
|
|
1023
|
-
gradient .x2 = this .lengthAttribute (xmlElement .getAttribute ("x2"), gradient .x2 || 1, "width");
|
|
1024
|
-
gradient .y2 = this .lengthAttribute (xmlElement .getAttribute ("y2"), gradient .y2 || 0, "height");
|
|
1025
|
-
gradient .units = xmlElement .getAttribute ("gradientUnits") || "objectBoundingBox";
|
|
1026
|
-
gradient .transform = this .transformAttribute (xmlElement .getAttribute ("gradientTransform"));
|
|
1027
|
-
|
|
1028
|
-
// Spread matrix
|
|
1029
|
-
|
|
1030
|
-
const
|
|
1031
|
-
s = new Matrix3 (),
|
|
1032
|
-
c = new Vector2 (gradient .x1, gradient .y1);
|
|
1033
|
-
|
|
1034
|
-
s .translate (c);
|
|
1035
|
-
s .scale (new Vector2 (SPREAD, SPREAD));
|
|
1036
|
-
s .translate (c .negate ());
|
|
1037
|
-
|
|
1038
|
-
gradient .spreadMatrix = s;
|
|
1039
|
-
|
|
1040
|
-
// Stops
|
|
1041
|
-
|
|
1042
|
-
for (const childNode of xmlElement .childNodes)
|
|
1043
|
-
this .gradientChild (childNode, gradient);
|
|
1044
|
-
|
|
1045
|
-
return gradient;
|
|
1046
|
-
},
|
|
1047
|
-
radialGradientElementUrl (xmlElement, bbox)
|
|
1048
|
-
{
|
|
1049
|
-
const
|
|
1050
|
-
g = this .radialGradientElement (xmlElement, bbox, { stops: [ ] }),
|
|
1051
|
-
gradient = this .context .createRadialGradient (g .fx, g .fy, g. fr, g .cx, g .cy, g .r);
|
|
1052
|
-
|
|
1053
|
-
return this .drawGradient (gradient, g, bbox);
|
|
1054
|
-
},
|
|
1055
|
-
radialGradientElement (xmlElement, bbox, gradient)
|
|
1056
|
-
{
|
|
1057
|
-
// Attribute xlink:href
|
|
1058
|
-
|
|
1059
|
-
const refElement = this .hrefAttribute (xmlElement .getAttribute ("href") || xmlElement .getAttribute ("xlink:href"));
|
|
1060
|
-
|
|
1061
|
-
if (refElement)
|
|
1062
|
-
this .gradientElement (refElement, bbox, gradient);
|
|
1063
|
-
|
|
1064
|
-
// Attributes
|
|
1065
|
-
|
|
1066
|
-
gradient .cx = this .lengthAttribute (xmlElement .getAttribute ("cx"), gradient .cx || 0.5, "width"),
|
|
1067
|
-
gradient .cy = this .lengthAttribute (xmlElement .getAttribute ("cy"), gradient .cy || 0.5, "height"),
|
|
1068
|
-
gradient .r = this .lengthAttribute (xmlElement .getAttribute ("r"), gradient .r || 0.5),
|
|
1069
|
-
gradient .fx = this .lengthAttribute (xmlElement .getAttribute ("fx"), gradient .fx || gradient .cx, "width"),
|
|
1070
|
-
gradient .fy = this .lengthAttribute (xmlElement .getAttribute ("fy"), gradient .fy || gradient .cy, "height"),
|
|
1071
|
-
gradient .fr = this .lengthAttribute (xmlElement .getAttribute ("fr"), gradient .fr || 0),
|
|
1072
|
-
gradient .units = xmlElement .getAttribute ("gradientUnits") || "objectBoundingBox";
|
|
1073
|
-
gradient .spreadMethod = xmlElement .getAttribute ("spreadMethod");
|
|
1074
|
-
gradient .transform = this .transformAttribute (xmlElement .getAttribute ("gradientTransform"));
|
|
1075
|
-
|
|
1076
|
-
// Spread matrix
|
|
1077
|
-
|
|
1078
|
-
const
|
|
1079
|
-
s = new Matrix3 (),
|
|
1080
|
-
c = new Vector2 (gradient .fx, gradient .fy);
|
|
1081
|
-
|
|
1082
|
-
s .translate (c);
|
|
1083
|
-
s .scale (new Vector2 (SPREAD, SPREAD));
|
|
1084
|
-
s .translate (c .negate ());
|
|
1085
|
-
|
|
1086
|
-
gradient .spreadMatrix = s;
|
|
1087
|
-
|
|
1088
|
-
// Stops
|
|
1089
|
-
|
|
1090
|
-
for (const childNode of xmlElement .childNodes)
|
|
1091
|
-
this .gradientChild (childNode, gradient);
|
|
1092
|
-
|
|
1093
|
-
return gradient;
|
|
1094
|
-
},
|
|
1095
|
-
gradientElement (xmlElement, bbox, gradient)
|
|
1096
|
-
{
|
|
1097
|
-
if (!xmlElement)
|
|
1098
|
-
return;
|
|
1099
|
-
|
|
1100
|
-
switch (xmlElement .nodeName)
|
|
1101
|
-
{
|
|
1102
|
-
case "linearGradient":
|
|
1103
|
-
return this .linearGradientElement (xmlElement, bbox, gradient);
|
|
1104
|
-
case "radialGradient":
|
|
1105
|
-
return this .radialGradientElement (xmlElement, bbox, gradient);
|
|
1106
|
-
}
|
|
1107
|
-
},
|
|
1108
|
-
gradientChild (xmlElement, gradient)
|
|
1109
|
-
{
|
|
1110
|
-
if (xmlElement .nodeName === "stop")
|
|
1111
|
-
return this .stopElement (xmlElement, gradient);
|
|
1112
|
-
},
|
|
1113
|
-
stopElement (xmlElement, gradient)
|
|
1114
|
-
{
|
|
1115
|
-
if (!this .styleAttributes (xmlElement))
|
|
1116
|
-
return;
|
|
1117
|
-
|
|
1118
|
-
const offset = this .percentAttribute (xmlElement .getAttribute ("offset"), 0);
|
|
1119
|
-
|
|
1120
|
-
if (offset < 0 || offset > 1)
|
|
1121
|
-
return;
|
|
1122
|
-
|
|
1123
|
-
const { stopColor, stopOpacity } = this .style;
|
|
1124
|
-
|
|
1125
|
-
gradient .stops .push ([offset, stopColor, stopOpacity]);
|
|
1126
|
-
|
|
1127
|
-
this .styles .pop ();
|
|
1128
|
-
},
|
|
1129
|
-
drawGradient (gradient, g, bbox)
|
|
1130
|
-
{
|
|
1131
|
-
// Add color stops.
|
|
1132
|
-
|
|
1133
|
-
switch (g .spreadMethod)
|
|
1134
|
-
{
|
|
1135
|
-
default: // pad
|
|
1136
|
-
{
|
|
1137
|
-
g .spreadMatrix .identity ();
|
|
1138
|
-
|
|
1139
|
-
for (const [o, c, a] of g .stops)
|
|
1140
|
-
gradient .addColorStop (o, this .cssColor (c, a));
|
|
1141
|
-
|
|
1142
|
-
break;
|
|
1143
|
-
}
|
|
1144
|
-
case "repeat":
|
|
1145
|
-
{
|
|
1146
|
-
for (let i = 0; i < SPREAD; ++ i)
|
|
1147
|
-
{
|
|
1148
|
-
const s = i / SPREAD;
|
|
1149
|
-
|
|
1150
|
-
for (const [o, c, a] of g .stops)
|
|
1151
|
-
gradient .addColorStop (s + o / SPREAD, this .cssColor (c, a));
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
break;
|
|
1155
|
-
}
|
|
1156
|
-
case "reflect":
|
|
1157
|
-
{
|
|
1158
|
-
for (let i = 0; i < SPREAD; ++ i)
|
|
1159
|
-
{
|
|
1160
|
-
const s = i / SPREAD;
|
|
1161
|
-
|
|
1162
|
-
for (const [o, c, a] of g .stops)
|
|
1163
|
-
gradient .addColorStop (s + (i % 2 ? 1 - o : o) / SPREAD, this .cssColor (c, a));
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
break;
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1170
|
-
// Create Matrix.
|
|
1171
|
-
|
|
1172
|
-
const m = new Matrix3 ();
|
|
1173
|
-
|
|
1174
|
-
m .scale (new Vector2 (this .GRADIENT_SIZE / 2, this .GRADIENT_SIZE / 2));
|
|
1175
|
-
m .translate (Vector2 .One);
|
|
1176
|
-
m .scale (new Vector2 (1, -1));
|
|
1177
|
-
|
|
1178
|
-
if (g .units === "userSpaceOnUse")
|
|
1179
|
-
m .multLeft (bbox .matrix .copy () .inverse ());
|
|
1180
|
-
else
|
|
1181
|
-
m .multLeft (new Matrix3 (2, 0, 0, 0, 2, 0, -1, -1, 1));
|
|
1182
|
-
|
|
1183
|
-
m .multLeft (g .transform);
|
|
1184
|
-
m .multLeft (g .spreadMatrix);
|
|
1185
|
-
|
|
1186
|
-
// Paint.
|
|
1187
|
-
|
|
1188
|
-
const cx = this .context;
|
|
1189
|
-
|
|
1190
|
-
cx .fillStyle = gradient;
|
|
1191
|
-
cx .save ();
|
|
1192
|
-
cx .clearRect (0, 0, this .GRADIENT_SIZE, this .GRADIENT_SIZE);
|
|
1193
|
-
cx .rect (0, 0, this .GRADIENT_SIZE, this .GRADIENT_SIZE);
|
|
1194
|
-
cx .transform (m [0], m [1], m [3], m [4], m [6], m [7]);
|
|
1195
|
-
cx .fill ();
|
|
1196
|
-
cx .restore ();
|
|
1197
|
-
|
|
1198
|
-
// Use PNG because image can have alpha channel.
|
|
1199
|
-
return this .canvas .toDataURL ("image/png");
|
|
1200
|
-
},
|
|
1201
|
-
patternUrl (xmlElement)
|
|
1202
|
-
{
|
|
1203
|
-
//console .debug ("pattern");
|
|
1204
|
-
},
|
|
1205
|
-
idAttribute (attribute, node)
|
|
1206
|
-
{
|
|
1207
|
-
if (attribute === null)
|
|
1208
|
-
return;
|
|
1209
|
-
|
|
1210
|
-
const
|
|
1211
|
-
scene = this .getExecutionContext (),
|
|
1212
|
-
name = this .sanitizeName (attribute);
|
|
1213
|
-
|
|
1214
|
-
if (name)
|
|
1215
|
-
{
|
|
1216
|
-
scene .addNamedNode (scene .getUniqueName (name), node);
|
|
1217
|
-
scene .addExportedNode (scene .getUniqueExportName (name), node);
|
|
1218
|
-
}
|
|
1219
|
-
},
|
|
1220
|
-
viewBoxAttribute (attribute, defaultValue)
|
|
1221
|
-
{
|
|
1222
|
-
if (attribute === null)
|
|
1223
|
-
return defaultValue;
|
|
1224
|
-
|
|
1225
|
-
this .parseValue (attribute);
|
|
1226
|
-
|
|
1227
|
-
if (this .double ())
|
|
1228
|
-
{
|
|
1229
|
-
const x = this .value;
|
|
1230
|
-
|
|
1231
|
-
if (this .double ())
|
|
1232
|
-
{
|
|
1233
|
-
const y = this .value;
|
|
1234
|
-
|
|
1235
|
-
if (this .double ())
|
|
1236
|
-
{
|
|
1237
|
-
const width = this .value;
|
|
1238
|
-
|
|
1239
|
-
if (this .double ())
|
|
1240
|
-
{
|
|
1241
|
-
const height = this .value;
|
|
1242
|
-
|
|
1243
|
-
return new Vector4 (x, y, width, height);
|
|
1244
|
-
}
|
|
1245
|
-
}
|
|
1246
|
-
}
|
|
1247
|
-
}
|
|
1248
|
-
|
|
1249
|
-
return defaultValue;
|
|
1250
|
-
},
|
|
1251
|
-
hrefAttribute (attribute)
|
|
1252
|
-
{
|
|
1253
|
-
if (!attribute)
|
|
1254
|
-
return;
|
|
1255
|
-
|
|
1256
|
-
const
|
|
1257
|
-
scene = this .getExecutionContext (),
|
|
1258
|
-
hash = new URL (attribute, scene .getWorldURL ()) .hash .slice (1);
|
|
1259
|
-
|
|
1260
|
-
return this .document .getElementById (hash);
|
|
1261
|
-
},
|
|
1262
|
-
lengthAttribute (attribute, defaultValue, percent)
|
|
1263
|
-
{
|
|
1264
|
-
// Returns length in pixel.
|
|
1265
|
-
|
|
1266
|
-
if (attribute === null)
|
|
1267
|
-
return defaultValue;
|
|
1268
|
-
|
|
1269
|
-
this .parseValue (attribute);
|
|
1270
|
-
|
|
1271
|
-
if (this .double ())
|
|
1272
|
-
{
|
|
1273
|
-
let value = this .value;
|
|
1274
|
-
|
|
1275
|
-
// Parse unit
|
|
1276
|
-
|
|
1277
|
-
if (Grammar .length .parse (this))
|
|
1278
|
-
{
|
|
1279
|
-
switch (this .result [1])
|
|
1280
|
-
{
|
|
1281
|
-
case "em":
|
|
1282
|
-
value *= EM;
|
|
1283
|
-
break;
|
|
1284
|
-
case "ex":
|
|
1285
|
-
// TODO
|
|
1286
|
-
break;
|
|
1287
|
-
case "px":
|
|
1288
|
-
// We are pixels :)
|
|
1289
|
-
break;
|
|
1290
|
-
case "in":
|
|
1291
|
-
value *= INCH / PIXEL;
|
|
1292
|
-
break;
|
|
1293
|
-
case "cm":
|
|
1294
|
-
value *= CM / PIXEL;
|
|
1295
|
-
break;
|
|
1296
|
-
case "mm":
|
|
1297
|
-
value *= MM / PIXEL;
|
|
1298
|
-
break;
|
|
1299
|
-
case "pt":
|
|
1300
|
-
value *= POINT / PIXEL;
|
|
1301
|
-
break;
|
|
1302
|
-
case "pc":
|
|
1303
|
-
value *= PICA / PIXEL;
|
|
1304
|
-
break;
|
|
1305
|
-
case "%":
|
|
1306
|
-
{
|
|
1307
|
-
switch (percent)
|
|
1308
|
-
{
|
|
1309
|
-
case "width":
|
|
1310
|
-
value *= this .viewBox [2] / 100;
|
|
1311
|
-
break;
|
|
1312
|
-
case "height":
|
|
1313
|
-
value *= this .viewBox [3] / 100;
|
|
1314
|
-
break;
|
|
1315
|
-
default:
|
|
1316
|
-
value *= Math .hypot (this .viewBox [2], this .viewBox [3]) / 100;
|
|
1317
|
-
break;
|
|
1318
|
-
}
|
|
1319
|
-
|
|
1320
|
-
break;
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
}
|
|
1324
|
-
|
|
1325
|
-
return value;
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
return defaultValue;
|
|
1329
|
-
},
|
|
1330
|
-
percentAttribute (attribute, defaultValue)
|
|
1331
|
-
{
|
|
1332
|
-
this .parseValue (attribute);
|
|
1333
|
-
|
|
1334
|
-
if (this .double ())
|
|
1335
|
-
{
|
|
1336
|
-
let value = this .value;
|
|
1337
|
-
|
|
1338
|
-
// Parse unit
|
|
1339
|
-
|
|
1340
|
-
if (Grammar .percent .parse (this))
|
|
1341
|
-
value /= 100;
|
|
1342
|
-
|
|
1343
|
-
return Algorithm .clamp (value, 0, 1);
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
return defaultValue;
|
|
1347
|
-
},
|
|
1348
|
-
pointsAttribute (attribute, points)
|
|
1349
|
-
{
|
|
1350
|
-
if (attribute === null)
|
|
1351
|
-
return false;
|
|
1352
|
-
|
|
1353
|
-
this .parseValue (attribute);
|
|
1354
|
-
|
|
1355
|
-
while (true)
|
|
1356
|
-
{
|
|
1357
|
-
if (this .double ())
|
|
1358
|
-
{
|
|
1359
|
-
const x = this .value;
|
|
1360
|
-
|
|
1361
|
-
if (this .comma ())
|
|
1362
|
-
{
|
|
1363
|
-
if (this .double ())
|
|
1364
|
-
{
|
|
1365
|
-
const y = this .value;
|
|
1366
|
-
|
|
1367
|
-
points .push (new Vector3 (x, y, 0));
|
|
1368
|
-
|
|
1369
|
-
if (this .comma ())
|
|
1370
|
-
continue;
|
|
1371
|
-
}
|
|
1372
|
-
}
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
break;
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
return !! points .length;
|
|
1379
|
-
},
|
|
1380
|
-
dAttribute (attribute, contours)
|
|
1381
|
-
{
|
|
1382
|
-
if (attribute === null)
|
|
1383
|
-
return false;
|
|
1384
|
-
|
|
1385
|
-
this .parseValue (attribute);
|
|
1386
|
-
|
|
1387
|
-
let
|
|
1388
|
-
points = [ ],
|
|
1389
|
-
previous = "",
|
|
1390
|
-
command = "",
|
|
1391
|
-
relative = false,
|
|
1392
|
-
ax = 0,
|
|
1393
|
-
ay = 0,
|
|
1394
|
-
px = 0,
|
|
1395
|
-
py = 0;
|
|
1396
|
-
|
|
1397
|
-
while (true)
|
|
1398
|
-
{
|
|
1399
|
-
this .whitespaces ();
|
|
1400
|
-
|
|
1401
|
-
if (!Grammar .path .parse (this))
|
|
1402
|
-
break;
|
|
1403
|
-
|
|
1404
|
-
previous = command;
|
|
1405
|
-
command = this .result [1];
|
|
1406
|
-
relative = command === command .toLowerCase ();
|
|
1407
|
-
|
|
1408
|
-
switch (command)
|
|
1409
|
-
{
|
|
1410
|
-
case "m":
|
|
1411
|
-
case "M":
|
|
1412
|
-
{
|
|
1413
|
-
// moveto
|
|
1414
|
-
|
|
1415
|
-
if (points .length > 2)
|
|
1416
|
-
contours .push (Object .assign (points, { closed: false }));
|
|
1417
|
-
|
|
1418
|
-
points = [ ];
|
|
1419
|
-
|
|
1420
|
-
while (true)
|
|
1421
|
-
{
|
|
1422
|
-
if (this .double ())
|
|
1423
|
-
{
|
|
1424
|
-
let x = this .value;
|
|
1425
|
-
|
|
1426
|
-
this .comma ();
|
|
1427
|
-
|
|
1428
|
-
if (this .double ())
|
|
1429
|
-
{
|
|
1430
|
-
let y = this .value;
|
|
1431
|
-
|
|
1432
|
-
if (relative)
|
|
1433
|
-
{
|
|
1434
|
-
x += ax;
|
|
1435
|
-
y += ay;
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
points .push (new Vector3 (x, y, 0));
|
|
1439
|
-
|
|
1440
|
-
ax = x;
|
|
1441
|
-
ay = y;
|
|
1442
|
-
|
|
1443
|
-
this .comma ();
|
|
1444
|
-
continue;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
|
|
1448
|
-
break;
|
|
1449
|
-
}
|
|
1450
|
-
|
|
1451
|
-
continue;
|
|
1452
|
-
}
|
|
1453
|
-
case "l":
|
|
1454
|
-
case "L":
|
|
1455
|
-
{
|
|
1456
|
-
// lineto
|
|
1457
|
-
|
|
1458
|
-
while (true)
|
|
1459
|
-
{
|
|
1460
|
-
if (this .double ())
|
|
1461
|
-
{
|
|
1462
|
-
let x = this .value;
|
|
1463
|
-
|
|
1464
|
-
this .comma ();
|
|
1465
|
-
|
|
1466
|
-
if (this .double ())
|
|
1467
|
-
{
|
|
1468
|
-
let y = this .value;
|
|
1469
|
-
|
|
1470
|
-
if (relative)
|
|
1471
|
-
{
|
|
1472
|
-
x += ax;
|
|
1473
|
-
y += ay;
|
|
1474
|
-
}
|
|
1475
|
-
|
|
1476
|
-
points .push (new Vector3 (x, y, 0));
|
|
1477
|
-
|
|
1478
|
-
ax = x;
|
|
1479
|
-
ay = y;
|
|
1480
|
-
|
|
1481
|
-
this .comma ();
|
|
1482
|
-
continue;
|
|
1483
|
-
}
|
|
1484
|
-
}
|
|
1485
|
-
|
|
1486
|
-
break;
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
|
-
continue;
|
|
1490
|
-
}
|
|
1491
|
-
case "h":
|
|
1492
|
-
case "H":
|
|
1493
|
-
{
|
|
1494
|
-
// horizontal lineto
|
|
1495
|
-
|
|
1496
|
-
while (true)
|
|
1497
|
-
{
|
|
1498
|
-
if (this .double ())
|
|
1499
|
-
{
|
|
1500
|
-
let x = this .value;
|
|
1501
|
-
|
|
1502
|
-
if (relative)
|
|
1503
|
-
x += ax;
|
|
1504
|
-
|
|
1505
|
-
points .push (new Vector3 (x, ay, 0));
|
|
1506
|
-
|
|
1507
|
-
ax = x;
|
|
1508
|
-
|
|
1509
|
-
this .comma ();
|
|
1510
|
-
continue;
|
|
1511
|
-
}
|
|
1512
|
-
|
|
1513
|
-
break;
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
continue;
|
|
1517
|
-
}
|
|
1518
|
-
case "v":
|
|
1519
|
-
case "V":
|
|
1520
|
-
{
|
|
1521
|
-
// vertical lineto
|
|
1522
|
-
|
|
1523
|
-
while (this)
|
|
1524
|
-
{
|
|
1525
|
-
if (this .double ())
|
|
1526
|
-
{
|
|
1527
|
-
let y = this .value;
|
|
1528
|
-
|
|
1529
|
-
if (relative)
|
|
1530
|
-
y += ay;
|
|
1531
|
-
|
|
1532
|
-
points .push (new Vector3 (ax, y, 0));
|
|
1533
|
-
|
|
1534
|
-
ay = y;
|
|
1535
|
-
|
|
1536
|
-
this .comma ();
|
|
1537
|
-
continue;
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
break;
|
|
1541
|
-
}
|
|
1542
|
-
|
|
1543
|
-
continue;
|
|
1544
|
-
}
|
|
1545
|
-
case "q":
|
|
1546
|
-
case "Q":
|
|
1547
|
-
{
|
|
1548
|
-
// quadratic Bézier curveto
|
|
1549
|
-
|
|
1550
|
-
while (true)
|
|
1551
|
-
{
|
|
1552
|
-
if (this .double ())
|
|
1553
|
-
{
|
|
1554
|
-
let x1 = this .value;
|
|
1555
|
-
|
|
1556
|
-
this .comma ();
|
|
1557
|
-
|
|
1558
|
-
if (this .double ())
|
|
1559
|
-
{
|
|
1560
|
-
let y1 = this .value;
|
|
1561
|
-
|
|
1562
|
-
this .comma ();
|
|
1563
|
-
|
|
1564
|
-
if (this .double ())
|
|
1565
|
-
{
|
|
1566
|
-
let x = this .value;
|
|
1567
|
-
|
|
1568
|
-
this .comma ();
|
|
1569
|
-
|
|
1570
|
-
if (this .double ())
|
|
1571
|
-
{
|
|
1572
|
-
let y = this .value;
|
|
1573
|
-
|
|
1574
|
-
if (relative)
|
|
1575
|
-
{
|
|
1576
|
-
x1 += ax;
|
|
1577
|
-
y1 += ay;
|
|
1578
|
-
x += ax;
|
|
1579
|
-
y += ay;
|
|
1580
|
-
}
|
|
1581
|
-
|
|
1582
|
-
Bezier .quadric (ax, ay, 0, x1, y1, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
1583
|
-
|
|
1584
|
-
ax = x;
|
|
1585
|
-
ay = y;
|
|
1586
|
-
px = x1;
|
|
1587
|
-
py = y1;
|
|
1588
|
-
|
|
1589
|
-
this .comma ();
|
|
1590
|
-
continue;
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
}
|
|
1594
|
-
}
|
|
1595
|
-
|
|
1596
|
-
break;
|
|
1597
|
-
}
|
|
1598
|
-
|
|
1599
|
-
continue;
|
|
1600
|
-
}
|
|
1601
|
-
case "t":
|
|
1602
|
-
case "T":
|
|
1603
|
-
{
|
|
1604
|
-
// Shorthand/smooth quadratic Bézier curveto
|
|
1605
|
-
|
|
1606
|
-
while (true)
|
|
1607
|
-
{
|
|
1608
|
-
if (this .double ())
|
|
1609
|
-
{
|
|
1610
|
-
let x = this .value;
|
|
1611
|
-
|
|
1612
|
-
this .comma ();
|
|
1613
|
-
|
|
1614
|
-
if (this .double ())
|
|
1615
|
-
{
|
|
1616
|
-
let y = this .value;
|
|
1617
|
-
|
|
1618
|
-
if (relative)
|
|
1619
|
-
{
|
|
1620
|
-
x += ax;
|
|
1621
|
-
y += ay;
|
|
1622
|
-
}
|
|
1623
|
-
|
|
1624
|
-
switch (previous)
|
|
1625
|
-
{
|
|
1626
|
-
case 'Q':
|
|
1627
|
-
case 'q':
|
|
1628
|
-
case 'T':
|
|
1629
|
-
case 't':
|
|
1630
|
-
{
|
|
1631
|
-
x1 = ax + (ax - px);
|
|
1632
|
-
y1 = ay + (ay - py);
|
|
1633
|
-
break;
|
|
1634
|
-
}
|
|
1635
|
-
default:
|
|
1636
|
-
{
|
|
1637
|
-
x1 = ax;
|
|
1638
|
-
y1 = ay;
|
|
1639
|
-
break;
|
|
1640
|
-
}
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
Bezier .quadric (ax, ay, 0, x1, y1, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
1644
|
-
|
|
1645
|
-
ax = x;
|
|
1646
|
-
ay = y;
|
|
1647
|
-
|
|
1648
|
-
this .comma ();
|
|
1649
|
-
continue;
|
|
1650
|
-
}
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
break;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
continue;
|
|
1657
|
-
}
|
|
1658
|
-
case "c":
|
|
1659
|
-
case "C":
|
|
1660
|
-
{
|
|
1661
|
-
// curveto, cubic Bézier curve
|
|
1662
|
-
|
|
1663
|
-
while (true)
|
|
1664
|
-
{
|
|
1665
|
-
if (this .double ())
|
|
1666
|
-
{
|
|
1667
|
-
let x1 = this .value;
|
|
1668
|
-
|
|
1669
|
-
this .comma ();
|
|
1670
|
-
|
|
1671
|
-
if (this .double ())
|
|
1672
|
-
{
|
|
1673
|
-
let y1 = this .value;
|
|
1674
|
-
|
|
1675
|
-
this .comma ();
|
|
1676
|
-
|
|
1677
|
-
if (this .double ())
|
|
1678
|
-
{
|
|
1679
|
-
let x2 = this .value;
|
|
1680
|
-
|
|
1681
|
-
this .comma ();
|
|
1682
|
-
|
|
1683
|
-
if (this .double ())
|
|
1684
|
-
{
|
|
1685
|
-
let y2 = this .value;
|
|
1686
|
-
|
|
1687
|
-
this .comma ();
|
|
1688
|
-
|
|
1689
|
-
if (this .double ())
|
|
1690
|
-
{
|
|
1691
|
-
let x = this .value;
|
|
1692
|
-
|
|
1693
|
-
this .comma ();
|
|
1694
|
-
|
|
1695
|
-
if (this .double ())
|
|
1696
|
-
{
|
|
1697
|
-
let y = this .value;
|
|
1698
|
-
|
|
1699
|
-
if (relative)
|
|
1700
|
-
{
|
|
1701
|
-
x1 += ax;
|
|
1702
|
-
y1 += ay;
|
|
1703
|
-
x2 += ax;
|
|
1704
|
-
y2 += ay;
|
|
1705
|
-
x += ax;
|
|
1706
|
-
y += ay;
|
|
1707
|
-
}
|
|
1708
|
-
|
|
1709
|
-
Bezier .cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
1710
|
-
|
|
1711
|
-
ax = x;
|
|
1712
|
-
ay = y;
|
|
1713
|
-
px = x2;
|
|
1714
|
-
py = y2;
|
|
1715
|
-
|
|
1716
|
-
this .comma ();
|
|
1717
|
-
continue;
|
|
1718
|
-
}
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
|
-
}
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
break;
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
continue;
|
|
1729
|
-
}
|
|
1730
|
-
case "s":
|
|
1731
|
-
case "S":
|
|
1732
|
-
{
|
|
1733
|
-
// shorthand/smooth curveto, cubic Bézier curve
|
|
1734
|
-
|
|
1735
|
-
while (true)
|
|
1736
|
-
{
|
|
1737
|
-
if (this .double ())
|
|
1738
|
-
{
|
|
1739
|
-
let x2 = this .value;
|
|
1740
|
-
|
|
1741
|
-
this .comma ();
|
|
1742
|
-
|
|
1743
|
-
if (this .double ())
|
|
1744
|
-
{
|
|
1745
|
-
let y2 = this .value;
|
|
1746
|
-
|
|
1747
|
-
this .comma ();
|
|
1748
|
-
|
|
1749
|
-
if (this .double ())
|
|
1750
|
-
{
|
|
1751
|
-
let x = this .value;
|
|
1752
|
-
|
|
1753
|
-
this .comma ();
|
|
1754
|
-
|
|
1755
|
-
if (this .double ())
|
|
1756
|
-
{
|
|
1757
|
-
let y = this .value;
|
|
1758
|
-
|
|
1759
|
-
if (relative)
|
|
1760
|
-
{
|
|
1761
|
-
x2 += ax;
|
|
1762
|
-
y2 += ay;
|
|
1763
|
-
x += ax;
|
|
1764
|
-
y += ay;
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
switch (previous)
|
|
1768
|
-
{
|
|
1769
|
-
case 'C':
|
|
1770
|
-
case 'c':
|
|
1771
|
-
case 'S':
|
|
1772
|
-
case 's':
|
|
1773
|
-
{
|
|
1774
|
-
var x1 = ax + (ax - px);
|
|
1775
|
-
var y1 = ay + (ay - py);
|
|
1776
|
-
break;
|
|
1777
|
-
}
|
|
1778
|
-
default:
|
|
1779
|
-
{
|
|
1780
|
-
var x1 = ax;
|
|
1781
|
-
var y1 = ay;
|
|
1782
|
-
break;
|
|
1783
|
-
}
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
Bezier .cubic (ax, ay, 0, x1, y1, 0, x2, y2, 0, x, y, 0, this .BEZIER_STEPS, points);
|
|
1787
|
-
|
|
1788
|
-
ax = x;
|
|
1789
|
-
ay = y;
|
|
1790
|
-
px = x2;
|
|
1791
|
-
py = y2;
|
|
1792
|
-
|
|
1793
|
-
this .comma ();
|
|
1794
|
-
continue;
|
|
1795
|
-
}
|
|
1796
|
-
}
|
|
1797
|
-
}
|
|
1798
|
-
}
|
|
1799
|
-
|
|
1800
|
-
break;
|
|
1801
|
-
}
|
|
1802
|
-
|
|
1803
|
-
continue;
|
|
1804
|
-
}
|
|
1805
|
-
case "a":
|
|
1806
|
-
case "A":
|
|
1807
|
-
{
|
|
1808
|
-
// elliptical arc
|
|
1809
|
-
|
|
1810
|
-
while (true)
|
|
1811
|
-
{
|
|
1812
|
-
if (this .double ())
|
|
1813
|
-
{
|
|
1814
|
-
let rx = this .value;
|
|
1815
|
-
|
|
1816
|
-
this .comma ();
|
|
1817
|
-
|
|
1818
|
-
if (this .double ())
|
|
1819
|
-
{
|
|
1820
|
-
let ry = this .value;
|
|
1821
|
-
|
|
1822
|
-
this .comma ();
|
|
1823
|
-
|
|
1824
|
-
if (this .double ())
|
|
1825
|
-
{
|
|
1826
|
-
let xAxisRotation = Algorithm .radians (this .value);
|
|
1827
|
-
|
|
1828
|
-
this .comma ();
|
|
1829
|
-
|
|
1830
|
-
if (this .int32 ())
|
|
1831
|
-
{
|
|
1832
|
-
let largeArcFlag = this .value;
|
|
1833
|
-
|
|
1834
|
-
this .comma ();
|
|
1835
|
-
|
|
1836
|
-
if (this .int32 ())
|
|
1837
|
-
{
|
|
1838
|
-
let sweepFlag = this .value;
|
|
1839
|
-
|
|
1840
|
-
this .comma ();
|
|
1841
|
-
|
|
1842
|
-
if (this .double ())
|
|
1843
|
-
{
|
|
1844
|
-
let x = this .value;
|
|
1845
|
-
|
|
1846
|
-
this .comma ();
|
|
1847
|
-
|
|
1848
|
-
if (this .double ())
|
|
1849
|
-
{
|
|
1850
|
-
let y = this .value;
|
|
1851
|
-
|
|
1852
|
-
if (relative)
|
|
1853
|
-
{
|
|
1854
|
-
x += ax;
|
|
1855
|
-
y += ay;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
Bezier .arc (ax, ay, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y, this .CIRCLE_STEPS, points);
|
|
1859
|
-
|
|
1860
|
-
ax = x;
|
|
1861
|
-
ay = y;
|
|
1862
|
-
|
|
1863
|
-
this .comma ();
|
|
1864
|
-
continue;
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
}
|
|
1871
|
-
}
|
|
1872
|
-
|
|
1873
|
-
break;
|
|
1874
|
-
}
|
|
1875
|
-
|
|
1876
|
-
continue;
|
|
1877
|
-
}
|
|
1878
|
-
case "z":
|
|
1879
|
-
case "Z":
|
|
1880
|
-
{
|
|
1881
|
-
// closepath
|
|
1882
|
-
|
|
1883
|
-
if (points .length > 2)
|
|
1884
|
-
{
|
|
1885
|
-
ax = points [0] .x;
|
|
1886
|
-
ay = points [0] .y;
|
|
1887
|
-
|
|
1888
|
-
contours .push (Object .assign (points, { closed: true }));
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
points = [ ];
|
|
1892
|
-
|
|
1893
|
-
this .comma ();
|
|
1894
|
-
continue;
|
|
1895
|
-
}
|
|
1896
|
-
}
|
|
1897
|
-
|
|
1898
|
-
break;
|
|
1899
|
-
}
|
|
1900
|
-
|
|
1901
|
-
if (points .length > 2)
|
|
1902
|
-
contours .push (Object .assign (points, { closed: false }));
|
|
1903
|
-
|
|
1904
|
-
return !! contours .length;
|
|
1905
|
-
},
|
|
1906
|
-
transformAttribute (attribute)
|
|
1907
|
-
{
|
|
1908
|
-
const matrix = new Matrix3 ();
|
|
1909
|
-
|
|
1910
|
-
if (attribute === null)
|
|
1911
|
-
return matrix;
|
|
1912
|
-
|
|
1913
|
-
this .parseValue (attribute);
|
|
1914
|
-
|
|
1915
|
-
while (true)
|
|
1916
|
-
{
|
|
1917
|
-
this .comma ();
|
|
1918
|
-
this .whitespaces ();
|
|
1919
|
-
|
|
1920
|
-
if (Grammar .matrix .parse (this))
|
|
1921
|
-
{
|
|
1922
|
-
this .whitespaces ();
|
|
1923
|
-
|
|
1924
|
-
if (Grammar .openParenthesis .parse (this))
|
|
1925
|
-
{
|
|
1926
|
-
if (this .double ())
|
|
1927
|
-
{
|
|
1928
|
-
const a = this .value;
|
|
1929
|
-
|
|
1930
|
-
if (this .comma ())
|
|
1931
|
-
{
|
|
1932
|
-
if (this .double ())
|
|
1933
|
-
{
|
|
1934
|
-
const b = this .value;
|
|
1935
|
-
|
|
1936
|
-
if (this .comma ())
|
|
1937
|
-
{
|
|
1938
|
-
if (this .double ())
|
|
1939
|
-
{
|
|
1940
|
-
const c = this .value;
|
|
1941
|
-
|
|
1942
|
-
if (this .comma ())
|
|
1943
|
-
{
|
|
1944
|
-
if (this .double ())
|
|
1945
|
-
{
|
|
1946
|
-
const d = this .value;
|
|
1947
|
-
|
|
1948
|
-
if (this .comma ())
|
|
1949
|
-
{
|
|
1950
|
-
if (this .double ())
|
|
1951
|
-
{
|
|
1952
|
-
const e = this .value;
|
|
1953
|
-
|
|
1954
|
-
if (this .comma ())
|
|
1955
|
-
{
|
|
1956
|
-
if (this .double ())
|
|
1957
|
-
{
|
|
1958
|
-
const f = this .value;
|
|
1959
|
-
|
|
1960
|
-
this .whitespaces ();
|
|
1961
|
-
|
|
1962
|
-
if (Grammar .closeParenthesis .parse (this))
|
|
1963
|
-
{
|
|
1964
|
-
matrix .multLeft (new Matrix3 (a, b, 0, c, d, 0, e, f, 1));
|
|
1965
|
-
continue;
|
|
1966
|
-
}
|
|
1967
|
-
}
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
}
|
|
1971
|
-
}
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
}
|
|
1975
|
-
}
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
}
|
|
1979
|
-
}
|
|
1980
|
-
else if (Grammar .translate .parse (this))
|
|
1981
|
-
{
|
|
1982
|
-
this .whitespaces ();
|
|
1983
|
-
|
|
1984
|
-
if (Grammar .openParenthesis .parse (this))
|
|
1985
|
-
{
|
|
1986
|
-
if (this .double ())
|
|
1987
|
-
{
|
|
1988
|
-
const tx = this .value;
|
|
1989
|
-
|
|
1990
|
-
if (this .comma ())
|
|
1991
|
-
{
|
|
1992
|
-
if (this .double ())
|
|
1993
|
-
{
|
|
1994
|
-
var ty = this .value;
|
|
1995
|
-
}
|
|
1996
|
-
}
|
|
1997
|
-
else
|
|
1998
|
-
{
|
|
1999
|
-
var ty = 0;
|
|
2000
|
-
}
|
|
2001
|
-
|
|
2002
|
-
this .whitespaces ();
|
|
2003
|
-
|
|
2004
|
-
if (Grammar .closeParenthesis .parse (this))
|
|
2005
|
-
{
|
|
2006
|
-
matrix .translate (new Vector2 (tx, ty));
|
|
2007
|
-
continue;
|
|
2008
|
-
}
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
}
|
|
2012
|
-
else if (Grammar .rotate .parse (this))
|
|
2013
|
-
{
|
|
2014
|
-
this .whitespaces ();
|
|
2015
|
-
|
|
2016
|
-
if (Grammar .openParenthesis .parse (this))
|
|
2017
|
-
{
|
|
2018
|
-
if (this .double ())
|
|
2019
|
-
{
|
|
2020
|
-
const angle = this .value;
|
|
2021
|
-
|
|
2022
|
-
this .whitespaces ();
|
|
2023
|
-
|
|
2024
|
-
if (Grammar .closeParenthesis .parse (this))
|
|
2025
|
-
{
|
|
2026
|
-
matrix .rotate (Algorithm .radians (angle));
|
|
2027
|
-
continue;
|
|
2028
|
-
}
|
|
2029
|
-
else
|
|
2030
|
-
{
|
|
2031
|
-
if (this .comma ())
|
|
2032
|
-
{
|
|
2033
|
-
if (this .double ())
|
|
2034
|
-
{
|
|
2035
|
-
const cx = this .value;
|
|
2036
|
-
|
|
2037
|
-
if (this .comma ())
|
|
2038
|
-
{
|
|
2039
|
-
if (this .double ())
|
|
2040
|
-
{
|
|
2041
|
-
const cy = this .value;
|
|
2042
|
-
|
|
2043
|
-
this .whitespaces ();
|
|
2044
|
-
|
|
2045
|
-
if (Grammar .closeParenthesis .parse (this))
|
|
2046
|
-
{
|
|
2047
|
-
matrix .translate (new Vector2 (cx, cy));
|
|
2048
|
-
matrix .rotate (Algorithm .radians (angle));
|
|
2049
|
-
matrix .translate (new Vector2 (-cx, -cy));
|
|
2050
|
-
continue;
|
|
2051
|
-
}
|
|
2052
|
-
}
|
|
2053
|
-
}
|
|
2054
|
-
}
|
|
2055
|
-
}
|
|
2056
|
-
}
|
|
2057
|
-
}
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2060
|
-
else if (Grammar .scale .parse (this))
|
|
2061
|
-
{
|
|
2062
|
-
this .whitespaces ();
|
|
2063
|
-
|
|
2064
|
-
if (Grammar .openParenthesis .parse (this))
|
|
2065
|
-
{
|
|
2066
|
-
if (this .double ())
|
|
2067
|
-
{
|
|
2068
|
-
const sx = this .value;
|
|
2069
|
-
|
|
2070
|
-
if (this .comma ())
|
|
2071
|
-
{
|
|
2072
|
-
if (this .double ())
|
|
2073
|
-
{
|
|
2074
|
-
var sy = this .value;
|
|
2075
|
-
}
|
|
2076
|
-
}
|
|
2077
|
-
else
|
|
2078
|
-
{
|
|
2079
|
-
var sy = sx;
|
|
2080
|
-
}
|
|
2081
|
-
|
|
2082
|
-
this .whitespaces ();
|
|
2083
|
-
|
|
2084
|
-
if (Grammar .closeParenthesis .parse (this))
|
|
2085
|
-
{
|
|
2086
|
-
matrix .scale (new Vector2 (sx, sy));
|
|
2087
|
-
continue;
|
|
2088
|
-
}
|
|
2089
|
-
}
|
|
2090
|
-
}
|
|
2091
|
-
}
|
|
2092
|
-
else if (Grammar .skewX .parse (this))
|
|
2093
|
-
{
|
|
2094
|
-
this .whitespaces ();
|
|
2095
|
-
|
|
2096
|
-
if (Grammar .openParenthesis .parse (this))
|
|
2097
|
-
{
|
|
2098
|
-
if (this .double ())
|
|
2099
|
-
{
|
|
2100
|
-
const angle = this .value;
|
|
2101
|
-
|
|
2102
|
-
this .whitespaces ();
|
|
2103
|
-
|
|
2104
|
-
if (Grammar .closeParenthesis .parse (this))
|
|
2105
|
-
{
|
|
2106
|
-
matrix .skewX (Algorithm .radians (angle));
|
|
2107
|
-
continue;
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
}
|
|
2111
|
-
}
|
|
2112
|
-
else if (Grammar .skewY .parse (this))
|
|
2113
|
-
{
|
|
2114
|
-
this .whitespaces ();
|
|
2115
|
-
|
|
2116
|
-
if (Grammar .openParenthesis .parse (this))
|
|
2117
|
-
{
|
|
2118
|
-
if (this .double ())
|
|
2119
|
-
{
|
|
2120
|
-
const angle = this .value;
|
|
2121
|
-
|
|
2122
|
-
this .whitespaces ();
|
|
2123
|
-
|
|
2124
|
-
if (Grammar .closeParenthesis .parse (this))
|
|
2125
|
-
{
|
|
2126
|
-
matrix .skewY (Algorithm .radians (angle));
|
|
2127
|
-
continue;
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
|
|
2133
|
-
break;
|
|
2134
|
-
}
|
|
2135
|
-
|
|
2136
|
-
return matrix;
|
|
2137
|
-
},
|
|
2138
|
-
styleAttributes (xmlElement)
|
|
2139
|
-
{
|
|
2140
|
-
const style = Object .assign ({ }, this .styles .at (-1));
|
|
2141
|
-
|
|
2142
|
-
if (this .style .display === "none")
|
|
2143
|
-
return false;
|
|
2144
|
-
|
|
2145
|
-
this .styles .push (style);
|
|
2146
|
-
|
|
2147
|
-
for (const attribute of xmlElement .attributes)
|
|
2148
|
-
this .parseStyle (attribute .name, attribute .value)
|
|
2149
|
-
|
|
2150
|
-
// Style attribute has higher precedence.
|
|
2151
|
-
|
|
2152
|
-
this .styleAttribute (xmlElement .getAttribute ("style"));
|
|
2153
|
-
|
|
2154
|
-
return true;
|
|
2155
|
-
},
|
|
2156
|
-
styleAttribute (attribute)
|
|
2157
|
-
{
|
|
2158
|
-
if (attribute === null)
|
|
2159
|
-
return;
|
|
2160
|
-
|
|
2161
|
-
const values = attribute .split (";");
|
|
2162
|
-
|
|
2163
|
-
for (const value of values)
|
|
2164
|
-
{
|
|
2165
|
-
const pair = value .split (":");
|
|
2166
|
-
|
|
2167
|
-
if (pair .length !== 2)
|
|
2168
|
-
continue;
|
|
2169
|
-
|
|
2170
|
-
this .parseStyle (pair [0] .trim (), pair [1] .trim ());
|
|
2171
|
-
}
|
|
2172
|
-
},
|
|
2173
|
-
parseStyle (style, value)
|
|
2174
|
-
{
|
|
2175
|
-
if (value === "inherit" || value == "unset")
|
|
2176
|
-
return;
|
|
2177
|
-
|
|
2178
|
-
this .parseValue (value);
|
|
2179
|
-
|
|
2180
|
-
switch (style)
|
|
2181
|
-
{
|
|
2182
|
-
case "display":
|
|
2183
|
-
this .displayStyle (value);
|
|
2184
|
-
break;
|
|
2185
|
-
case "fill":
|
|
2186
|
-
this .fillStyle (value);
|
|
2187
|
-
break;
|
|
2188
|
-
case "fill-opacity":
|
|
2189
|
-
this .fillOpacityStyle (value);
|
|
2190
|
-
break;
|
|
2191
|
-
case "fill-rule":
|
|
2192
|
-
this .fillRuleStyle (value);
|
|
2193
|
-
break;
|
|
2194
|
-
case "stroke":
|
|
2195
|
-
this .strokeStyle (value);
|
|
2196
|
-
break;
|
|
2197
|
-
case "stroke-opacity":
|
|
2198
|
-
this .strokeOpacityStyle (value);
|
|
2199
|
-
break;
|
|
2200
|
-
case "stroke-width":
|
|
2201
|
-
this .strokeWidthStyle (value);
|
|
2202
|
-
break;
|
|
2203
|
-
case "opacity":
|
|
2204
|
-
this .opacityStyle (value);
|
|
2205
|
-
break;
|
|
2206
|
-
case "stop-color":
|
|
2207
|
-
this .stopColorStyle (value);
|
|
2208
|
-
break;
|
|
2209
|
-
case "stop-opacity":
|
|
2210
|
-
this .stopOpacityStyle (value);
|
|
2211
|
-
break;
|
|
2212
|
-
case "vector-effect":
|
|
2213
|
-
this .vectorEffectStyle (value);
|
|
2214
|
-
break;
|
|
2215
|
-
}
|
|
2216
|
-
},
|
|
2217
|
-
displayStyle (value)
|
|
2218
|
-
{
|
|
2219
|
-
if (value === "default")
|
|
2220
|
-
{
|
|
2221
|
-
this .style .display = "inline";
|
|
2222
|
-
return;
|
|
2223
|
-
}
|
|
2224
|
-
|
|
2225
|
-
this .style .display = value;
|
|
2226
|
-
},
|
|
2227
|
-
fillStyle (value)
|
|
2228
|
-
{
|
|
2229
|
-
if (value === "default")
|
|
2230
|
-
{
|
|
2231
|
-
this .style .fillType = this .styles [0] .fillType;
|
|
2232
|
-
this .style .fillColor = this .styles [0] .fillColor;
|
|
2233
|
-
this .style .fillURL = this .styles [0] .fillURL;
|
|
2234
|
-
return;
|
|
2235
|
-
}
|
|
2236
|
-
|
|
2237
|
-
if (value === "transparent")
|
|
2238
|
-
{
|
|
2239
|
-
this .style .fillType = "none";
|
|
2240
|
-
return;
|
|
2241
|
-
}
|
|
2242
|
-
|
|
2243
|
-
if (value === "none")
|
|
2244
|
-
{
|
|
2245
|
-
this .style .fillType = "none";
|
|
2246
|
-
return;
|
|
2247
|
-
}
|
|
2248
|
-
|
|
2249
|
-
if (this .urlValue ())
|
|
2250
|
-
{
|
|
2251
|
-
this .style .fillType = "URL";
|
|
2252
|
-
this .style .fillURL = this .result [1] .trim ();
|
|
2253
|
-
return;
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
if (this .colorValue (this .styles .at (-1) .fillColor))
|
|
2257
|
-
{
|
|
2258
|
-
this .style .fillType = "COLOR";
|
|
2259
|
-
this .style .fillColor = this .value .copy ();
|
|
2260
|
-
return;
|
|
2261
|
-
}
|
|
2262
|
-
},
|
|
2263
|
-
fillOpacityStyle (value)
|
|
2264
|
-
{
|
|
2265
|
-
if (value === "default")
|
|
2266
|
-
{
|
|
2267
|
-
this .style .fillOpacity = this .styles [0] .fillOpacity;
|
|
2268
|
-
return;
|
|
2269
|
-
}
|
|
2270
|
-
|
|
2271
|
-
if (value === "transparent")
|
|
2272
|
-
{
|
|
2273
|
-
this .style .fillOpacity = 0;
|
|
2274
|
-
return;
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
if (this .double ())
|
|
2278
|
-
{
|
|
2279
|
-
this .style .fillOpacity = Algorithm .clamp (this .value, 0, 1);
|
|
2280
|
-
return;
|
|
2281
|
-
}
|
|
2282
|
-
},
|
|
2283
|
-
fillRuleStyle (value)
|
|
2284
|
-
{
|
|
2285
|
-
if (value === "default")
|
|
2286
|
-
{
|
|
2287
|
-
this .style .fillRule = this .styles [0] .fillRule;
|
|
2288
|
-
return;
|
|
2289
|
-
}
|
|
2290
|
-
|
|
2291
|
-
this .style .fillRule = value;
|
|
2292
|
-
},
|
|
2293
|
-
strokeStyle (value)
|
|
2294
|
-
{
|
|
2295
|
-
if (value === "default")
|
|
2296
|
-
{
|
|
2297
|
-
this .style .strokeType = this .styles [0] .strokeType;
|
|
2298
|
-
this .style .strokeColor = this .styles [0] .strokeColor;
|
|
2299
|
-
this .style .strokeURL = this .styles [0] .strokeURL;
|
|
2300
|
-
return;
|
|
2301
|
-
}
|
|
2302
|
-
|
|
2303
|
-
if (value === "transparent")
|
|
2304
|
-
{
|
|
2305
|
-
this .style .strokeType = "none";
|
|
2306
|
-
return;
|
|
2307
|
-
}
|
|
2308
|
-
|
|
2309
|
-
if (value === "none")
|
|
2310
|
-
{
|
|
2311
|
-
this .style .strokeType = "none";
|
|
2312
|
-
return;
|
|
2313
|
-
}
|
|
2314
|
-
|
|
2315
|
-
if (this .urlValue ())
|
|
2316
|
-
{
|
|
2317
|
-
this .style .strokeType = "URL";
|
|
2318
|
-
this .style .strokeURL = this .result [1] .trim ();
|
|
2319
|
-
return;
|
|
2320
|
-
}
|
|
2321
|
-
|
|
2322
|
-
if (this .colorValue (this .styles .at (-1) .strokeColor))
|
|
2323
|
-
{
|
|
2324
|
-
this .style .strokeType = "COLOR";
|
|
2325
|
-
this .style .strokeColor = this .value .copy ();
|
|
2326
|
-
return;
|
|
2327
|
-
}
|
|
2328
|
-
},
|
|
2329
|
-
strokeOpacityStyle (value)
|
|
2330
|
-
{
|
|
2331
|
-
if (value === "default")
|
|
2332
|
-
{
|
|
2333
|
-
this .style .strokeOpacity = this .styles [0] .strokeOpacity;
|
|
2334
|
-
return;
|
|
2335
|
-
}
|
|
2336
|
-
|
|
2337
|
-
if (value === "transparent")
|
|
2338
|
-
{
|
|
2339
|
-
this .style .strokeOpacity = 0;
|
|
2340
|
-
return;
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
if (this .double ())
|
|
2344
|
-
{
|
|
2345
|
-
this .style .strokeOpacity = Algorithm .clamp (this .value, 0, 1);
|
|
2346
|
-
return;
|
|
2347
|
-
}
|
|
2348
|
-
},
|
|
2349
|
-
strokeWidthStyle (value)
|
|
2350
|
-
{
|
|
2351
|
-
if (value === "default")
|
|
2352
|
-
{
|
|
2353
|
-
this .style .strokeWidth = this .styles [0] .strokeWidth;
|
|
2354
|
-
return;
|
|
2355
|
-
}
|
|
2356
|
-
|
|
2357
|
-
if (value === "none")
|
|
2358
|
-
{
|
|
2359
|
-
this .style .strokeWidth = 0;
|
|
2360
|
-
return;
|
|
2361
|
-
}
|
|
2362
|
-
|
|
2363
|
-
if (this .double ())
|
|
2364
|
-
{
|
|
2365
|
-
this .style .strokeWidth = this .lengthAttribute (this .value, 1);
|
|
2366
|
-
return;
|
|
2367
|
-
}
|
|
2368
|
-
},
|
|
2369
|
-
opacityStyle (value)
|
|
2370
|
-
{
|
|
2371
|
-
if (value === "default")
|
|
2372
|
-
{
|
|
2373
|
-
this .style .opacity = this .styles [0] .opacity;
|
|
2374
|
-
return;
|
|
2375
|
-
}
|
|
2376
|
-
|
|
2377
|
-
if (value === "transparent")
|
|
2378
|
-
{
|
|
2379
|
-
this .style .opacity = 0;
|
|
2380
|
-
return;
|
|
2381
|
-
}
|
|
2382
|
-
|
|
2383
|
-
if (this .double ())
|
|
2384
|
-
{
|
|
2385
|
-
this .style .opacity = Algorithm .clamp (this .value, 0, 1) * this .styles .at (-1) .opacity;
|
|
2386
|
-
return;
|
|
2387
|
-
}
|
|
2388
|
-
},
|
|
2389
|
-
stopColorStyle (value)
|
|
2390
|
-
{
|
|
2391
|
-
if (value === "default")
|
|
2392
|
-
{
|
|
2393
|
-
this .style .stopColor = this .styles [0] .stopColor;
|
|
2394
|
-
return;
|
|
2395
|
-
}
|
|
2396
|
-
|
|
2397
|
-
if (this .colorValue (Color4 .Black))
|
|
2398
|
-
{
|
|
2399
|
-
this .style .stopColor = this .value .copy ();
|
|
2400
|
-
return;
|
|
2401
|
-
}
|
|
2402
|
-
},
|
|
2403
|
-
stopOpacityStyle (value)
|
|
2404
|
-
{
|
|
2405
|
-
if (value === "default")
|
|
2406
|
-
{
|
|
2407
|
-
this .style .stopOpacity = this .styles [0] .stopOpacity;
|
|
2408
|
-
return;
|
|
2409
|
-
}
|
|
2410
|
-
|
|
2411
|
-
if (value === "transparent")
|
|
2412
|
-
{
|
|
2413
|
-
this .style .stopOpacity = 0;
|
|
2414
|
-
return;
|
|
2415
|
-
}
|
|
2416
|
-
|
|
2417
|
-
if (this .double ())
|
|
2418
|
-
{
|
|
2419
|
-
this .style .stopOpacity = Algorithm .clamp (this .value, 0, 1);
|
|
2420
|
-
return;
|
|
2421
|
-
}
|
|
2422
|
-
},
|
|
2423
|
-
vectorEffectStyle (value)
|
|
2424
|
-
{
|
|
2425
|
-
if (value === "default")
|
|
2426
|
-
{
|
|
2427
|
-
this .style .vectorEffect = this .styles [0] .vectorEffect;
|
|
2428
|
-
return;
|
|
2429
|
-
}
|
|
2430
|
-
|
|
2431
|
-
this .style .vectorEffect = value;
|
|
2432
|
-
},
|
|
2433
|
-
parseValue (value)
|
|
2434
|
-
{
|
|
2435
|
-
this .input = value;
|
|
2436
|
-
this .lastIndex = 0;
|
|
2437
|
-
this .value = undefined;
|
|
2438
|
-
},
|
|
2439
|
-
whitespaces ()
|
|
2440
|
-
{
|
|
2441
|
-
return Grammar .whitespaces .parse (this);
|
|
2442
|
-
},
|
|
2443
|
-
comma ()
|
|
2444
|
-
{
|
|
2445
|
-
return !! (this .whitespaces () | Grammar .comma .parse (this));
|
|
2446
|
-
},
|
|
2447
|
-
int32 ()
|
|
2448
|
-
{
|
|
2449
|
-
this .whitespaces ();
|
|
2450
|
-
|
|
2451
|
-
if (Grammar .int32 .parse (this))
|
|
2452
|
-
{
|
|
2453
|
-
this .value = parseInt (this .result [1]);
|
|
2454
|
-
|
|
2455
|
-
return true;
|
|
2456
|
-
}
|
|
2457
|
-
|
|
2458
|
-
return false;
|
|
2459
|
-
},
|
|
2460
|
-
double ()
|
|
2461
|
-
{
|
|
2462
|
-
this .whitespaces ();
|
|
2463
|
-
|
|
2464
|
-
if (Grammar .double .parse (this))
|
|
2465
|
-
{
|
|
2466
|
-
this .value = parseFloat (this .result [1]);
|
|
2467
|
-
|
|
2468
|
-
return true;
|
|
2469
|
-
}
|
|
2470
|
-
|
|
2471
|
-
if (Grammar .constants .parse (this))
|
|
2472
|
-
{
|
|
2473
|
-
this .value = this .CONSTANTS .get (this .result [2] .toUpperCase ());
|
|
2474
|
-
|
|
2475
|
-
if (this .result [1] === "-")
|
|
2476
|
-
this .value = - this .value;
|
|
2477
|
-
|
|
2478
|
-
return true;
|
|
2479
|
-
}
|
|
2480
|
-
|
|
2481
|
-
return false;
|
|
2482
|
-
},
|
|
2483
|
-
colorValue: (() =>
|
|
2484
|
-
{
|
|
2485
|
-
const color = new Color4 (0, 0, 0, 0);
|
|
2486
|
-
|
|
2487
|
-
return function (c)
|
|
2488
|
-
{
|
|
2489
|
-
if (!Grammar .color .parse (this))
|
|
2490
|
-
return false;
|
|
2491
|
-
|
|
2492
|
-
const defaultColor = this .cssColor (c);
|
|
2493
|
-
|
|
2494
|
-
this .value = color .set (... this .convertColor (this .result [1], defaultColor));
|
|
2495
|
-
|
|
2496
|
-
return true;
|
|
2497
|
-
};
|
|
2498
|
-
})(),
|
|
2499
|
-
urlValue ()
|
|
2500
|
-
{
|
|
2501
|
-
return Grammar .url .parse (this);
|
|
2502
|
-
},
|
|
2503
|
-
cssColor (c, a = c .a)
|
|
2504
|
-
{
|
|
2505
|
-
return `rgba(${c .r * 255},${c .g * 255},${c .b * 255},${a})`;
|
|
2506
|
-
},
|
|
2507
|
-
createTransform (xmlElement, t = Vector2 .Zero, s = Vector2 .One)
|
|
2508
|
-
{
|
|
2509
|
-
// Determine matrix.
|
|
2510
|
-
|
|
2511
|
-
const
|
|
2512
|
-
scene = this .getExecutionContext (),
|
|
2513
|
-
m = this .transformAttribute (xmlElement .getAttribute ("transform"));
|
|
2514
|
-
|
|
2515
|
-
this .modelMatrix .push ();
|
|
2516
|
-
this .modelMatrix .multLeft (Matrix4 .Matrix3 (m));
|
|
2517
|
-
|
|
2518
|
-
m .translate (t);
|
|
2519
|
-
m .scale (s);
|
|
2520
|
-
|
|
2521
|
-
// Create node.
|
|
2522
|
-
|
|
2523
|
-
const
|
|
2524
|
-
transformNode = scene .createNode ("Transform"),
|
|
2525
|
-
matrix = Matrix4 .Matrix3 (m),
|
|
2526
|
-
translation = new Vector3 (0, 0, 0),
|
|
2527
|
-
rotation = new Rotation4 (),
|
|
2528
|
-
scale = new Vector3 (1, 1, 1),
|
|
2529
|
-
scaleOrientation = new Rotation4 ();
|
|
2530
|
-
|
|
2531
|
-
matrix .get (translation, rotation, scale, scaleOrientation);
|
|
2532
|
-
|
|
2533
|
-
transformNode .translation = translation;
|
|
2534
|
-
transformNode .rotation = rotation;
|
|
2535
|
-
transformNode .scale = scale;
|
|
2536
|
-
transformNode .scaleOrientation = scaleOrientation;
|
|
2537
|
-
|
|
2538
|
-
// Set name.
|
|
2539
|
-
|
|
2540
|
-
this .idAttribute (xmlElement .getAttribute ("id"), transformNode);
|
|
2541
|
-
|
|
2542
|
-
// Add node to parent.
|
|
2543
|
-
|
|
2544
|
-
this .groupNodes .at (-1) .children .push (transformNode);
|
|
2545
|
-
|
|
2546
|
-
return transformNode;
|
|
2547
|
-
},
|
|
2548
|
-
popAll ()
|
|
2549
|
-
{
|
|
2550
|
-
this .groupNodes .pop ();
|
|
2551
|
-
this .modelMatrix .pop ();
|
|
2552
|
-
this .styles .pop ();
|
|
2553
|
-
},
|
|
2554
|
-
createFillAppearance (bbox)
|
|
2555
|
-
{
|
|
2556
|
-
const
|
|
2557
|
-
scene = this .getExecutionContext (),
|
|
2558
|
-
appearanceNode = scene .createNode ("Appearance");
|
|
2559
|
-
|
|
2560
|
-
switch (this .style .fillType)
|
|
2561
|
-
{
|
|
2562
|
-
case "none":
|
|
2563
|
-
{
|
|
2564
|
-
return null;
|
|
2565
|
-
}
|
|
2566
|
-
case "COLOR":
|
|
2567
|
-
{
|
|
2568
|
-
const materialNode = scene .createNode ("UnlitMaterial");
|
|
2569
|
-
|
|
2570
|
-
appearanceNode .material = materialNode;
|
|
2571
|
-
materialNode .emissiveColor = new Color3 (... this .style .fillColor);
|
|
2572
|
-
materialNode .transparency = 1 - this .style .fillOpacity * this .style .opacity;
|
|
2573
|
-
|
|
2574
|
-
break;
|
|
2575
|
-
}
|
|
2576
|
-
case "URL":
|
|
2577
|
-
{
|
|
2578
|
-
// Gradient
|
|
2579
|
-
|
|
2580
|
-
const
|
|
2581
|
-
scene = this .getExecutionContext (),
|
|
2582
|
-
textureNode = scene .createNode ("ImageTexture"),
|
|
2583
|
-
url = this .getFillUrl (this .style .fillURL, bbox);
|
|
2584
|
-
|
|
2585
|
-
// Get image from url.
|
|
2586
|
-
|
|
2587
|
-
if (!url)
|
|
2588
|
-
return null;
|
|
2589
|
-
|
|
2590
|
-
textureNode .url = [url];
|
|
2591
|
-
textureNode .textureProperties = this .texturePropertiesNode;
|
|
2592
|
-
appearanceNode .texture = textureNode;
|
|
2593
|
-
|
|
2594
|
-
break;
|
|
2595
|
-
}
|
|
2596
|
-
}
|
|
2597
|
-
|
|
2598
|
-
return appearanceNode;
|
|
2599
|
-
},
|
|
2600
|
-
getFillUrl (fillURL, bbox)
|
|
2601
|
-
{
|
|
2602
|
-
const xmlElement = this .hrefAttribute (fillURL);
|
|
2603
|
-
|
|
2604
|
-
if (!xmlElement)
|
|
2605
|
-
return;
|
|
2606
|
-
|
|
2607
|
-
switch (xmlElement .nodeName)
|
|
2608
|
-
{
|
|
2609
|
-
case "linearGradient":
|
|
2610
|
-
return this .linearGradientElementUrl (xmlElement, bbox);
|
|
2611
|
-
|
|
2612
|
-
case "radialGradient":
|
|
2613
|
-
return this .radialGradientElementUrl (xmlElement, bbox);
|
|
2614
|
-
|
|
2615
|
-
case "pattern":
|
|
2616
|
-
return this .patternUrl (xmlElement);
|
|
2617
|
-
}
|
|
2618
|
-
},
|
|
2619
|
-
createStrokeAppearance ()
|
|
2620
|
-
{
|
|
2621
|
-
const
|
|
2622
|
-
scene = this .getExecutionContext (),
|
|
2623
|
-
appearanceNode = scene .createNode ("Appearance"),
|
|
2624
|
-
materialNode = scene .createNode ("UnlitMaterial");
|
|
2625
|
-
|
|
2626
|
-
appearanceNode .material = materialNode;
|
|
2627
|
-
materialNode .emissiveColor = new Color3 (... this .style .strokeColor);
|
|
2628
|
-
materialNode .transparency = 1 - this .style .strokeOpacity * this .style .opacity;
|
|
2629
|
-
|
|
2630
|
-
const strokeWidth = this .vectorEffect === "non-scaling-stroke"
|
|
2631
|
-
? this .style .strokeWidth
|
|
2632
|
-
: this .getStokeWidth ();
|
|
2633
|
-
|
|
2634
|
-
if (strokeWidth > 1)
|
|
2635
|
-
appearanceNode .lineProperties = this .getLineProperties (strokeWidth);
|
|
2636
|
-
|
|
2637
|
-
return appearanceNode;
|
|
2638
|
-
},
|
|
2639
|
-
getStokeWidth ()
|
|
2640
|
-
{
|
|
2641
|
-
const
|
|
2642
|
-
modelMatrix = this .modelMatrix .get (),
|
|
2643
|
-
strokeWidth = modelMatrix .multDirMatrix (new Vector3 (this .style .strokeWidth, this .style .strokeWidth, 0));
|
|
2644
|
-
|
|
2645
|
-
return (strokeWidth .x + strokeWidth .y) / 2;
|
|
2646
|
-
},
|
|
2647
|
-
getLineProperties (strokeWidth)
|
|
2648
|
-
{
|
|
2649
|
-
const lineProperties = this .lineProperties .get (strokeWidth);
|
|
2650
|
-
|
|
2651
|
-
if (lineProperties)
|
|
2652
|
-
{
|
|
2653
|
-
return lineProperties;
|
|
2654
|
-
}
|
|
2655
|
-
else
|
|
2656
|
-
{
|
|
2657
|
-
const
|
|
2658
|
-
scene = this .getExecutionContext (),
|
|
2659
|
-
lineProperties = scene .createNode ("LineProperties");
|
|
2660
|
-
|
|
2661
|
-
lineProperties .linewidthScaleFactor = strokeWidth;
|
|
2662
|
-
|
|
2663
|
-
this .lineProperties .set (strokeWidth, lineProperties);
|
|
2664
|
-
|
|
2665
|
-
return lineProperties;
|
|
2666
|
-
}
|
|
2667
|
-
},
|
|
2668
|
-
createTextureProperties ()
|
|
2669
|
-
{
|
|
2670
|
-
const
|
|
2671
|
-
scene = this .getExecutionContext (),
|
|
2672
|
-
texturePropertiesNode = scene .createNode ("TextureProperties");
|
|
2673
|
-
|
|
2674
|
-
texturePropertiesNode .generateMipMaps = true;
|
|
2675
|
-
texturePropertiesNode .minificationFilter = "NICEST";
|
|
2676
|
-
texturePropertiesNode .magnificationFilter = "NICEST";
|
|
2677
|
-
texturePropertiesNode .boundaryModeS = "CLAMP_TO_EDGE";
|
|
2678
|
-
texturePropertiesNode .boundaryModeT = "CLAMP_TO_EDGE";
|
|
2679
|
-
texturePropertiesNode .boundaryModeR = "CLAMP_TO_EDGE";
|
|
2680
|
-
texturePropertiesNode .textureCompression = "DEFAULT";
|
|
2681
|
-
|
|
2682
|
-
return texturePropertiesNode;
|
|
2683
|
-
},
|
|
2684
|
-
createTextureCoordinate (coordinateNode, bbox, appearance)
|
|
2685
|
-
{
|
|
2686
|
-
if (!appearance || !appearance .texture)
|
|
2687
|
-
return null;
|
|
2688
|
-
|
|
2689
|
-
const
|
|
2690
|
-
scene = this .getExecutionContext (),
|
|
2691
|
-
texCoordNode = scene .createNode ("TextureCoordinate"),
|
|
2692
|
-
invMatrix = bbox .matrix .copy () .inverse ();
|
|
2693
|
-
|
|
2694
|
-
for (const point of coordinateNode .point)
|
|
2695
|
-
texCoordNode .point .push (invMatrix .multVecMatrix (new Vector2 (point .x, point .y)) .add (Vector2 .One) .divide (2));
|
|
2696
|
-
|
|
2697
|
-
return texCoordNode;
|
|
2698
|
-
},
|
|
2699
|
-
createTesselator ()
|
|
2700
|
-
{
|
|
2701
|
-
// Function called for each vertex of tessellator output.
|
|
2702
|
-
|
|
2703
|
-
function vertexCallback (index, triangles)
|
|
2704
|
-
{
|
|
2705
|
-
triangles .push (index);
|
|
2706
|
-
}
|
|
2707
|
-
|
|
2708
|
-
const tessy = new libtess .GluTesselator ();
|
|
2709
|
-
|
|
2710
|
-
tessy .gluTessCallback (libtess .gluEnum .GLU_TESS_VERTEX_DATA, vertexCallback);
|
|
2711
|
-
tessy .gluTessNormal (0, 0, 1);
|
|
2712
|
-
|
|
2713
|
-
return tessy;
|
|
2714
|
-
},
|
|
2715
|
-
triangulatePolygon (contours, coordinateNode)
|
|
2716
|
-
{
|
|
2717
|
-
// Callback for when segments intersect and must be split.
|
|
2718
|
-
|
|
2719
|
-
function combineCallback (coords, data, weight)
|
|
2720
|
-
{
|
|
2721
|
-
const index = coordinateNode .point .length;
|
|
2722
|
-
|
|
2723
|
-
coordinateNode .point .push (new Vector3 (... coords));
|
|
2724
|
-
|
|
2725
|
-
return index;
|
|
2726
|
-
}
|
|
2727
|
-
|
|
2728
|
-
const
|
|
2729
|
-
tessy = this .tessy,
|
|
2730
|
-
winding = this .style .fillRule === "evenodd" ? "GLU_TESS_WINDING_ODD" : "GLU_TESS_WINDING_NONZERO",
|
|
2731
|
-
triangles = [ ];
|
|
2732
|
-
|
|
2733
|
-
tessy .gluTessProperty (libtess .gluEnum .GLU_TESS_WINDING_RULE, libtess .windingRule [winding]);
|
|
2734
|
-
tessy .gluTessCallback (libtess .gluEnum .GLU_TESS_COMBINE, combineCallback);
|
|
2735
|
-
tessy .gluTessBeginPolygon (triangles);
|
|
2736
|
-
|
|
2737
|
-
for (const points of contours)
|
|
2738
|
-
{
|
|
2739
|
-
tessy .gluTessBeginContour ();
|
|
2740
|
-
|
|
2741
|
-
for (const [i, point] of points .entries ())
|
|
2742
|
-
tessy .gluTessVertex (point, points .index + i);
|
|
2743
|
-
|
|
2744
|
-
tessy .gluTessEndContour ();
|
|
2745
|
-
}
|
|
2746
|
-
|
|
2747
|
-
tessy .gluTessEndPolygon ();
|
|
2748
|
-
|
|
2749
|
-
// Array of indices of triangles.
|
|
2750
|
-
return triangles;
|
|
2751
|
-
},
|
|
2752
|
-
});
|
|
2753
|
-
|
|
2754
|
-
Object .defineProperty (SVGParser .prototype, "style",
|
|
2755
|
-
{
|
|
2756
|
-
get ()
|
|
2757
|
-
{
|
|
2758
|
-
return this .styles .at (-1);
|
|
2759
|
-
},
|
|
2760
|
-
})
|
|
2761
|
-
|
|
2762
|
-
export default SVGParser;
|