x_ite 8.4.3 → 8.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +5 -1
- package/Makefile +0 -3
- package/build/bin/components.js +173 -0
- package/build/bin/tags.pl +28 -0
- package/build/bin/tests.pl +80 -2
- package/build/bin/version.pl +12 -7
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +28 -29
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +63 -42
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +37 -29
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +29 -31
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +23 -23
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +19 -19
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +24 -19
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +30 -30
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +172 -594
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +31 -47
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +367 -346
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +19 -19
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +12174 -3553
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +5 -136
- package/docs/_data/nav/components-CADGeometry.yml +14 -0
- package/docs/_data/nav/components-Core.yml +16 -0
- package/docs/_data/nav/components-CubeMapTexturing.yml +8 -0
- package/docs/_data/nav/components-DIS.yml +14 -0
- package/docs/_data/nav/components-EnvironmentalEffects.yml +12 -0
- package/docs/_data/nav/components-EnvironmentalSensor.yml +8 -0
- package/docs/_data/nav/components-EventUtilities.yml +16 -0
- package/docs/_data/nav/components-Followers.yml +30 -0
- package/docs/_data/nav/components-Geometry2D.yml +18 -0
- package/docs/_data/nav/components-Geometry3D.yml +16 -0
- package/docs/_data/nav/components-Geospatial.yml +24 -0
- package/docs/_data/nav/components-Grouping.yml +10 -0
- package/docs/_data/nav/components-HAnim.yml +14 -0
- package/docs/_data/nav/components-Interpolation.yml +28 -0
- package/docs/_data/nav/components-KeyDeviceSensor.yml +6 -0
- package/docs/_data/nav/components-Layering.yml +8 -0
- package/docs/_data/nav/components-Layout.yml +12 -0
- package/docs/_data/nav/components-Lighting.yml +10 -0
- package/docs/_data/nav/components-NURBS.yml +30 -0
- package/docs/_data/nav/components-Navigation.yml +16 -0
- package/docs/_data/nav/components-Networking.yml +8 -0
- package/docs/_data/nav/components-ParticleSystems.yml +22 -0
- package/docs/_data/nav/components-Picking.yml +12 -0
- package/docs/_data/nav/components-PointingDeviceSensor.yml +10 -0
- package/docs/_data/nav/components-Rendering.yml +30 -0
- package/docs/_data/nav/components-RigidBodyPhysics.yml +30 -0
- package/docs/_data/nav/components-Scripting.yml +4 -0
- package/docs/_data/nav/components-Shaders.yml +18 -0
- package/docs/_data/nav/components-Shape.yml +22 -0
- package/docs/_data/nav/components-Sound.yml +44 -0
- package/docs/_data/nav/components-Text.yml +6 -0
- package/docs/_data/nav/components-TextureProjector.yml +6 -0
- package/docs/_data/nav/components-Texturing.yml +22 -0
- package/docs/_data/nav/components-Texturing3D.yml +18 -0
- package/docs/_data/nav/components-Time.yml +4 -0
- package/docs/_data/nav/components-VolumeRendering.yml +28 -0
- package/docs/_data/nav/components-X_ITE.yml +4 -0
- package/docs/_data/nav/main.yml +26 -0
- package/docs/_data/nav/reference.yml +18 -0
- package/docs/_data/nav/tutorials-animation-sensors-and-geometry.yml +18 -0
- package/docs/_data/nav/tutorials-basic.yml +6 -0
- package/docs/_data/nav/tutorials-optimize-your-scene.yml +6 -0
- package/docs/_data/nav/tutorials-scripts-and-prototypes.yml +12 -0
- package/docs/_data/nav/tutorials-shapes-geometry-and-appearance.yml +16 -0
- package/docs/_data/nav/tutorials-textures-lights-and-environment.yml +20 -0
- package/docs/_includes/nav.html +2 -2
- package/docs/_includes/scripts.html +2 -1
- package/docs/_posts/accessing-the-external-browser.md +1 -1
- package/docs/_posts/browser-support.md +1 -1
- package/docs/_posts/components/CADGeometry/CADAssembly.md +83 -0
- package/docs/_posts/components/CADGeometry/CADFace.md +70 -0
- package/docs/_posts/components/CADGeometry/CADLayer.md +84 -0
- package/docs/_posts/components/CADGeometry/CADPart.md +117 -0
- package/docs/_posts/components/CADGeometry/IndexedQuadSet.md +125 -0
- package/docs/_posts/components/CADGeometry/QuadSet.md +113 -0
- package/docs/_posts/components/Core/MetadataBoolean.md +90 -0
- package/docs/_posts/components/Core/MetadataDouble.md +67 -0
- package/docs/_posts/components/Core/MetadataFloat.md +67 -0
- package/docs/_posts/components/Core/MetadataInteger.md +66 -0
- package/docs/_posts/components/Core/MetadataSet.md +63 -0
- package/docs/_posts/components/Core/MetadataString.md +66 -0
- package/docs/_posts/components/Core/WorldInfo.md +54 -0
- package/docs/_posts/components/CubeMapTexturing/ComposedCubeMapTexture.md +76 -0
- package/docs/_posts/components/CubeMapTexturing/GeneratedCubeMapTexture.md +65 -0
- package/docs/_posts/components/CubeMapTexturing/ImageCubeMapTexture.md +66 -0
- package/docs/_posts/components/DIS/DISEntityManager.md +73 -0
- package/docs/_posts/components/DIS/DISEntityTypeMapping.md +88 -0
- package/docs/_posts/components/DIS/EspduTransform.md +416 -0
- package/docs/_posts/components/DIS/ReceiverPdu.md +168 -0
- package/docs/_posts/components/DIS/SignalPdu.md +168 -0
- package/docs/_posts/components/DIS/TransmitterPdu.md +232 -0
- package/docs/_posts/components/EnvironmentalEffects/Background.md +189 -0
- package/docs/_posts/components/EnvironmentalEffects/Fog.md +97 -0
- package/docs/_posts/components/EnvironmentalEffects/FogCoordinate.md +40 -0
- package/docs/_posts/components/EnvironmentalEffects/LocalFog.md +84 -0
- package/docs/_posts/components/EnvironmentalEffects/TextureBackground.md +142 -0
- package/docs/_posts/components/EnvironmentalSensor/ProximitySensor.md +90 -0
- package/docs/_posts/components/EnvironmentalSensor/TransformSensor.md +91 -0
- package/docs/_posts/components/EnvironmentalSensor/VisibilitySensor.md +73 -0
- package/docs/_posts/components/EventUtilities/BooleanFilter.md +62 -0
- package/docs/_posts/components/EventUtilities/BooleanSequencer.md +86 -0
- package/docs/_posts/components/EventUtilities/BooleanToggle.md +46 -0
- package/docs/_posts/components/EventUtilities/BooleanTrigger.md +47 -0
- package/docs/_posts/components/EventUtilities/IntegerSequencer.md +90 -0
- package/docs/_posts/components/EventUtilities/IntegerTrigger.md +51 -0
- package/docs/_posts/components/EventUtilities/TimeTrigger.md +47 -0
- package/docs/_posts/components/Followers/ColorChaser.md +77 -0
- package/docs/_posts/components/Followers/ColorDamper.md +85 -0
- package/docs/_posts/components/Followers/CoordinateChaser.md +76 -0
- package/docs/_posts/components/Followers/CoordinateDamper.md +80 -0
- package/docs/_posts/components/Followers/OrientationChaser.md +72 -0
- package/docs/_posts/components/Followers/OrientationDamper.md +80 -0
- package/docs/_posts/components/Followers/PositionChaser.md +72 -0
- package/docs/_posts/components/Followers/PositionChaser2D.md +72 -0
- package/docs/_posts/components/Followers/PositionDamper.md +80 -0
- package/docs/_posts/components/Followers/PositionDamper2D.md +80 -0
- package/docs/_posts/components/Followers/ScalarChaser.md +76 -0
- package/docs/_posts/components/Followers/ScalarDamper.md +80 -0
- package/docs/_posts/components/Followers/TexCoordChaser2D.md +72 -0
- package/docs/_posts/components/Followers/TexCoordDamper2D.md +80 -0
- package/docs/_posts/components/Geometry2D/Arc2D.md +71 -0
- package/docs/_posts/components/Geometry2D/ArcClose2D.md +91 -0
- package/docs/_posts/components/Geometry2D/Circle2D.md +55 -0
- package/docs/_posts/components/Geometry2D/Disk2D.md +75 -0
- package/docs/_posts/components/Geometry2D/Polyline2D.md +54 -0
- package/docs/_posts/components/Geometry2D/Polypoint2D.md +54 -0
- package/docs/_posts/components/Geometry2D/Rectangle2D.md +66 -0
- package/docs/_posts/components/Geometry2D/TriangleSet2D.md +66 -0
- package/docs/_posts/components/Geometry3D/Box.md +66 -0
- package/docs/_posts/components/Geometry3D/Cone.md +90 -0
- package/docs/_posts/components/Geometry3D/Cylinder.md +98 -0
- package/docs/_posts/components/Geometry3D/ElevationGrid.md +162 -0
- package/docs/_posts/components/Geometry3D/Extrusion.md +170 -0
- package/docs/_posts/components/Geometry3D/IndexedFaceSet.md +208 -0
- package/docs/_posts/components/Geometry3D/Sphere.md +66 -0
- package/docs/_posts/components/Geospatial/GeoCoordinate.md +65 -0
- package/docs/_posts/components/Geospatial/GeoElevationGrid.md +180 -0
- package/docs/_posts/components/Geospatial/GeoLOD.md +128 -0
- package/docs/_posts/components/Geospatial/GeoLocation.md +93 -0
- package/docs/_posts/components/Geospatial/GeoMetadata.md +75 -0
- package/docs/_posts/components/Geospatial/GeoOrigin.md +69 -0
- package/docs/_posts/components/Geospatial/GeoPositionInterpolator.md +95 -0
- package/docs/_posts/components/Geospatial/GeoProximitySensor.md +109 -0
- package/docs/_posts/components/Geospatial/GeoTouchSensor.md +108 -0
- package/docs/_posts/components/Geospatial/GeoTransform.md +121 -0
- package/docs/_posts/components/Geospatial/GeoViewpoint.md +126 -0
- package/docs/_posts/components/Grouping/Group.md +75 -0
- package/docs/_posts/components/Grouping/StaticGroup.md +65 -0
- package/docs/_posts/components/Grouping/Switch.md +89 -0
- package/docs/_posts/components/Grouping/Transform.md +126 -0
- package/docs/_posts/components/HAnim/HAnimDisplacer.md +89 -0
- package/docs/_posts/components/HAnim/HAnimHumanoid.md +136 -0
- package/docs/_posts/components/HAnim/HAnimJoint.md +165 -0
- package/docs/_posts/components/HAnim/HAnimMotion.md +68 -0
- package/docs/_posts/components/HAnim/HAnimSegment.md +107 -0
- package/docs/_posts/components/HAnim/HAnimSite.md +108 -0
- package/docs/_posts/components/Interpolation/ColorInterpolator.md +73 -0
- package/docs/_posts/components/Interpolation/CoordinateInterpolator.md +76 -0
- package/docs/_posts/components/Interpolation/CoordinateInterpolator2D.md +73 -0
- package/docs/_posts/components/Interpolation/EaseInEaseOut.md +67 -0
- package/docs/_posts/components/Interpolation/NormalInterpolator.md +68 -0
- package/docs/_posts/components/Interpolation/OrientationInterpolator.md +72 -0
- package/docs/_posts/components/Interpolation/PositionInterpolator.md +72 -0
- package/docs/_posts/components/Interpolation/PositionInterpolator2D.md +77 -0
- package/docs/_posts/components/Interpolation/ScalarInterpolator.md +76 -0
- package/docs/_posts/components/Interpolation/SplinePositionInterpolator.md +93 -0
- package/docs/_posts/components/Interpolation/SplinePositionInterpolator2D.md +93 -0
- package/docs/_posts/components/Interpolation/SplineScalarInterpolator.md +106 -0
- package/docs/_posts/components/Interpolation/SquadOrientationInterpolator.md +78 -0
- package/docs/_posts/components/KeyDeviceSensor/KeySensor.md +78 -0
- package/docs/_posts/components/KeyDeviceSensor/StringSensor.md +70 -0
- package/docs/_posts/components/Layering/Layer.md +67 -0
- package/docs/_posts/components/Layering/LayerSet.md +78 -0
- package/docs/_posts/components/Layering/Viewport.md +80 -0
- package/docs/_posts/components/Layout/Layout.md +107 -0
- package/docs/_posts/components/Layout/LayoutGroup.md +85 -0
- package/docs/_posts/components/Layout/LayoutLayer.md +74 -0
- package/docs/_posts/components/Layout/ScreenFontStyle.md +137 -0
- package/docs/_posts/components/Layout/ScreenGroup.md +71 -0
- package/docs/_posts/components/Lighting/DirectionalLight.md +100 -0
- package/docs/_posts/components/Lighting/EnvironmentLight.md +91 -0
- package/docs/_posts/components/Lighting/PointLight.md +103 -0
- package/docs/_posts/components/Lighting/SpotLight.md +132 -0
- package/docs/_posts/components/NURBS/Contour2D.md +57 -0
- package/docs/_posts/components/NURBS/ContourPolyline2D.md +46 -0
- package/docs/_posts/components/NURBS/CoordinateDouble.md +47 -0
- package/docs/_posts/components/NURBS/NurbsCurve.md +71 -0
- package/docs/_posts/components/NURBS/NurbsCurve2D.md +66 -0
- package/docs/_posts/components/NURBS/NurbsOrientationInterpolator.md +70 -0
- package/docs/_posts/components/NURBS/NurbsPatchSurface.md +106 -0
- package/docs/_posts/components/NURBS/NurbsPositionInterpolator.md +70 -0
- package/docs/_posts/components/NURBS/NurbsSet.md +66 -0
- package/docs/_posts/components/NURBS/NurbsSurfaceInterpolator.md +90 -0
- package/docs/_posts/components/NURBS/NurbsSweptSurface.md +69 -0
- package/docs/_posts/components/NURBS/NurbsSwungSurface.md +65 -0
- package/docs/_posts/components/NURBS/NurbsTextureCoordinate.md +77 -0
- package/docs/_posts/components/NURBS/NurbsTrimmedSurface.md +114 -0
- package/docs/_posts/components/Navigation/Billboard.md +88 -0
- package/docs/_posts/components/Navigation/Collision.md +102 -0
- package/docs/_posts/components/Navigation/LOD.md +99 -0
- package/docs/_posts/components/Navigation/NavigationInfo.md +122 -0
- package/docs/_posts/components/Navigation/OrthoViewpoint.md +117 -0
- package/docs/_posts/components/Navigation/Viewpoint.md +117 -0
- package/docs/_posts/components/Navigation/ViewpointGroup.md +80 -0
- package/docs/_posts/components/Networking/Anchor.md +111 -0
- package/docs/_posts/components/Networking/Inline.md +115 -0
- package/docs/_posts/components/Networking/LoadSensor.md +91 -0
- package/docs/_posts/components/ParticleSystems/BoundedPhysicsModel.md +54 -0
- package/docs/_posts/components/ParticleSystems/ConeEmitter.md +76 -0
- package/docs/_posts/components/ParticleSystems/ExplosionEmitter.md +72 -0
- package/docs/_posts/components/ParticleSystems/ForcePhysicsModel.md +58 -0
- package/docs/_posts/components/ParticleSystems/ParticleSystem.md +177 -0
- package/docs/_posts/components/ParticleSystems/PointEmitter.md +76 -0
- package/docs/_posts/components/ParticleSystems/PolylineEmitter.md +94 -0
- package/docs/_posts/components/ParticleSystems/SurfaceEmitter.md +90 -0
- package/docs/_posts/components/ParticleSystems/VolumeEmitter.md +90 -0
- package/docs/_posts/components/ParticleSystems/WindPhysicsModel.md +68 -0
- package/docs/_posts/components/Picking/LinePickSensor.md +125 -0
- package/docs/_posts/components/Picking/PickableGroup.md +93 -0
- package/docs/_posts/components/Picking/PointPickSensor.md +112 -0
- package/docs/_posts/components/Picking/PrimitivePickSensor.md +114 -0
- package/docs/_posts/components/Picking/VolumePickSensor.md +107 -0
- package/docs/_posts/components/PointingDeviceSensor/CylinderSensor.md +122 -0
- package/docs/_posts/components/PointingDeviceSensor/PlaneSensor.md +114 -0
- package/docs/_posts/components/PointingDeviceSensor/SphereSensor.md +89 -0
- package/docs/_posts/components/PointingDeviceSensor/TouchSensor.md +87 -0
- package/docs/_posts/components/Rendering/ClipPlane.md +67 -0
- package/docs/_posts/components/Rendering/Color.md +56 -0
- package/docs/_posts/components/Rendering/ColorRGBA.md +61 -0
- package/docs/_posts/components/Rendering/Coordinate.md +45 -0
- package/docs/_posts/components/Rendering/IndexedLineSet.md +128 -0
- package/docs/_posts/components/Rendering/IndexedTriangleFanSet.md +128 -0
- package/docs/_posts/components/Rendering/IndexedTriangleSet.md +128 -0
- package/docs/_posts/components/Rendering/IndexedTriangleStripSet.md +116 -0
- package/docs/_posts/components/Rendering/LineSet.md +85 -0
- package/docs/_posts/components/Rendering/Normal.md +41 -0
- package/docs/_posts/components/Rendering/PointSet.md +76 -0
- package/docs/_posts/components/Rendering/TriangleFanSet.md +112 -0
- package/docs/_posts/components/Rendering/TriangleSet.md +108 -0
- package/docs/_posts/components/Rendering/TriangleStripSet.md +116 -0
- package/docs/_posts/components/RigidBodyPhysics/BallJoint.md +78 -0
- package/docs/_posts/components/RigidBodyPhysics/CollidableOffset.md +75 -0
- package/docs/_posts/components/RigidBodyPhysics/CollidableShape.md +83 -0
- package/docs/_posts/components/RigidBodyPhysics/CollisionCollection.md +90 -0
- package/docs/_posts/components/RigidBodyPhysics/CollisionSensor.md +65 -0
- package/docs/_posts/components/RigidBodyPhysics/CollisionSpace.md +70 -0
- package/docs/_posts/components/RigidBodyPhysics/Contact.md +117 -0
- package/docs/_posts/components/RigidBodyPhysics/DoubleAxisHingeJoint.md +162 -0
- package/docs/_posts/components/RigidBodyPhysics/MotorJoint.md +183 -0
- package/docs/_posts/components/RigidBodyPhysics/RigidBody.md +175 -0
- package/docs/_posts/components/RigidBodyPhysics/RigidBodyCollection.md +120 -0
- package/docs/_posts/components/RigidBodyPhysics/SingleAxisHingeJoint.md +108 -0
- package/docs/_posts/components/RigidBodyPhysics/SliderJoint.md +106 -0
- package/docs/_posts/components/RigidBodyPhysics/UniversalJoint.md +119 -0
- package/docs/_posts/components/Scripting/Script.md +81 -0
- package/docs/_posts/components/Shaders/ComposedShader.md +81 -0
- package/docs/_posts/components/Shaders/FloatVertexAttribute.md +65 -0
- package/docs/_posts/components/Shaders/Matrix3VertexAttribute.md +53 -0
- package/docs/_posts/components/Shaders/Matrix4VertexAttribute.md +53 -0
- package/docs/_posts/components/Shaders/PackagedShader.md +77 -0
- package/docs/_posts/components/Shaders/ProgramShader.md +71 -0
- package/docs/_posts/components/Shaders/ShaderPart.md +76 -0
- package/docs/_posts/components/Shaders/ShaderProgram.md +68 -0
- package/docs/_posts/components/Shape/AcousticProperties.md +52 -0
- package/docs/_posts/components/Shape/Appearance.md +123 -0
- package/docs/_posts/components/Shape/FillProperties.md +67 -0
- package/docs/_posts/components/Shape/LineProperties.md +63 -0
- package/docs/_posts/components/Shape/Material.md +217 -0
- package/docs/_posts/components/Shape/PhysicalMaterial.md +173 -0
- package/docs/_posts/components/Shape/PointProperties.md +84 -0
- package/docs/_posts/components/Shape/Shape.md +63 -0
- package/docs/_posts/components/Shape/TwoSidedMaterial.md +149 -0
- package/docs/_posts/components/Shape/UnlitMaterial.md +115 -0
- package/docs/_posts/components/Sound/Analyser.md +72 -0
- package/docs/_posts/components/Sound/AudioClip.md +139 -0
- package/docs/_posts/components/Sound/AudioDestination.md +52 -0
- package/docs/_posts/components/Sound/BiquadFilter.md +70 -0
- package/docs/_posts/components/Sound/BufferAudioSource.md +86 -0
- package/docs/_posts/components/Sound/ChannelMerger.md +46 -0
- package/docs/_posts/components/Sound/ChannelSelector.md +48 -0
- package/docs/_posts/components/Sound/ChannelSplitter.md +48 -0
- package/docs/_posts/components/Sound/Convolver.md +66 -0
- package/docs/_posts/components/Sound/Delay.md +66 -0
- package/docs/_posts/components/Sound/DynamicsCompressor.md +74 -0
- package/docs/_posts/components/Sound/Gain.md +62 -0
- package/docs/_posts/components/Sound/ListenerPointSource.md +62 -0
- package/docs/_posts/components/Sound/MicrophoneSource.md +54 -0
- package/docs/_posts/components/Sound/OscillatorSource.md +58 -0
- package/docs/_posts/components/Sound/PeriodicWave.md +42 -0
- package/docs/_posts/components/Sound/Sound.md +92 -0
- package/docs/_posts/components/Sound/SpatialSound.md +68 -0
- package/docs/_posts/components/Sound/StreamAudioDestination.md +52 -0
- package/docs/_posts/components/Sound/StreamAudioSource.md +54 -0
- package/docs/_posts/components/Sound/WaveShaper.md +66 -0
- package/docs/_posts/components/Text/FontStyle.md +145 -0
- package/docs/_posts/components/Text/Text.md +102 -0
- package/docs/_posts/components/TextureProjector/TextureProjector.md +52 -0
- package/docs/_posts/components/TextureProjector/TextureProjectorParallel.md +52 -0
- package/docs/_posts/components/Texturing/ImageTexture.md +134 -0
- package/docs/_posts/components/Texturing/MovieTexture.md +221 -0
- package/docs/_posts/components/Texturing/MultiTexture.md +100 -0
- package/docs/_posts/components/Texturing/MultiTextureCoordinate.md +47 -0
- package/docs/_posts/components/Texturing/MultiTextureTransform.md +47 -0
- package/docs/_posts/components/Texturing/PixelTexture.md +80 -0
- package/docs/_posts/components/Texturing/TextureCoordinate.md +52 -0
- package/docs/_posts/components/Texturing/TextureCoordinateGenerator.md +64 -0
- package/docs/_posts/components/Texturing/TextureProperties.md +137 -0
- package/docs/_posts/components/Texturing/TextureTransform.md +73 -0
- package/docs/_posts/components/Texturing3D/ComposedTexture3D.md +76 -0
- package/docs/_posts/components/Texturing3D/ImageTexture3D.md +132 -0
- package/docs/_posts/components/Texturing3D/ImageTextureAtlas.md +131 -0
- package/docs/_posts/components/Texturing3D/PixelTexture3D.md +75 -0
- package/docs/_posts/components/Texturing3D/TextureCoordinate3D.md +53 -0
- package/docs/_posts/components/Texturing3D/TextureCoordinate4D.md +52 -0
- package/docs/_posts/components/Texturing3D/TextureTransform3D.md +69 -0
- package/docs/_posts/components/Texturing3D/TextureTransformMatrix3D.md +57 -0
- package/docs/_posts/components/Time/TimeSensor.md +136 -0
- package/docs/_posts/components/VolumeRendering/BlendedVolumeStyle.md +92 -0
- package/docs/_posts/components/VolumeRendering/BoundaryEnhancementVolumeStyle.md +53 -0
- package/docs/_posts/components/VolumeRendering/CartoonVolumeStyle.md +83 -0
- package/docs/_posts/components/VolumeRendering/ComposedVolumeStyle.md +51 -0
- package/docs/_posts/components/VolumeRendering/EdgeEnhancementVolumeStyle.md +67 -0
- package/docs/_posts/components/VolumeRendering/IsoSurfaceVolumeData.md +99 -0
- package/docs/_posts/components/VolumeRendering/OpacityMapVolumeStyle.md +51 -0
- package/docs/_posts/components/VolumeRendering/ProjectionVolumeStyle.md +48 -0
- package/docs/_posts/components/VolumeRendering/SegmentedVolumeData.md +80 -0
- package/docs/_posts/components/VolumeRendering/ShadedVolumeStyle.md +75 -0
- package/docs/_posts/components/VolumeRendering/SilhouetteEnhancementVolumeStyle.md +63 -0
- package/docs/_posts/components/VolumeRendering/ToneMappedVolumeStyle.md +71 -0
- package/docs/_posts/components/VolumeRendering/VolumeData.md +71 -0
- package/docs/_posts/components/X_ITE/BlendMode.md +94 -0
- package/docs/_posts/custom-shaders.md +9 -4
- package/docs/_posts/dom-integration.md +1 -6
- package/docs/_posts/features.md +2 -2
- package/docs/_posts/getting-started.md +100 -57
- package/docs/_posts/glossary.md +1 -1
- package/docs/_posts/how-to-configure-your-web-server.md +1 -1
- package/docs/_posts/reference/browser-services.md +78 -18
- package/docs/_posts/reference/constants-services.md +1 -1
- package/docs/_posts/reference/ecmascript-object-and-function-definitions.md +1 -1
- package/docs/_posts/reference/field-services-and-objects.md +8 -8
- package/docs/_posts/reference/prototype-services.md +7 -7
- package/docs/_posts/reference/route-services.md +1 -1
- package/docs/_posts/reference/scene-services.md +5 -5
- package/docs/_posts/reference/script-node-authoring-interface.md +1 -1
- package/docs/_posts/report-a-bug.md +1 -1
- package/docs/_posts/setup-a-localhost-server.md +5 -1
- package/docs/_posts/supported-nodes.md +239 -238
- package/docs/_posts/tutorials/adding-backgrounds.md +3 -3
- package/docs/_posts/tutorials/adding-fog.md +2 -2
- package/docs/_posts/tutorials/adding-sound.md +19 -19
- package/docs/_posts/tutorials/animating-transforms.md +17 -17
- package/docs/_posts/tutorials/basic-nodes.md +30 -30
- package/docs/_posts/tutorials/building-a-x3d-world.md +3 -3
- package/docs/_posts/tutorials/building-elevation-grids.md +7 -7
- package/docs/_posts/tutorials/building-extruded-shapes.md +7 -7
- package/docs/_posts/tutorials/building-primitive-shapes.md +13 -13
- package/docs/_posts/tutorials/building-shapes-out-of-points-lines-and-faces.md +21 -21
- package/docs/_posts/tutorials/controlling-appearance-with-materials.md +7 -7
- package/docs/_posts/tutorials/controlling-color-on-coordinate-based-geometry.md +11 -11
- package/docs/_posts/tutorials/controlling-detail.md +4 -4
- package/docs/_posts/tutorials/controlling-how-textures-are-mapped.md +7 -7
- package/docs/_posts/tutorials/controlling-navigation.md +3 -3
- package/docs/_posts/tutorials/controlling-shading-on-coordinate-based-geometry.md +13 -13
- package/docs/_posts/tutorials/controlling-the-viewpoint.md +3 -3
- package/docs/_posts/tutorials/creating-new-node-types.md +4 -4
- package/docs/_posts/tutorials/grouping-nodes.md +13 -13
- package/docs/_posts/tutorials/hello-world.md +1 -1
- package/docs/_posts/tutorials/improving-performance.md +1 -1
- package/docs/_posts/tutorials/increasing-rendering-speed.md +1 -1
- package/docs/_posts/tutorials/introducing-animation.md +10 -10
- package/docs/_posts/tutorials/introducing-script-use.md +3 -3
- package/docs/_posts/tutorials/introducing-x3d.md +1 -1
- package/docs/_posts/tutorials/lighting-your-world.md +4 -4
- package/docs/_posts/tutorials/mapping-textures.md +7 -7
- package/docs/_posts/tutorials/naming-nodes.md +1 -1
- package/docs/_posts/tutorials/overview.md +1 -1
- package/docs/_posts/tutorials/providing-information-about-your-world.md +2 -2
- package/docs/_posts/tutorials/sensing-the-viewer.md +15 -15
- package/docs/_posts/tutorials/sensing-viewer-actions.md +10 -10
- package/docs/_posts/tutorials/transforming-shapes.md +4 -4
- package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +5 -5
- package/docs/_posts/what's-new.md +40 -2
- package/docs/_tabs/components.md +383 -0
- package/docs/_tabs/imprint.md +1 -1
- package/docs/_tabs/laboratory.md +38 -6
- package/docs/_tabs/playground.html +22 -66
- package/docs/_tabs/reference.md +2 -1
- package/docs/_tabs/tags.md +1 -1
- package/docs/_tabs/tutorials.md +1 -1
- package/docs/assets/X3D/Michroma-Regular.ttf +0 -0
- package/docs/assets/X3D/peakpx.jpg +0 -0
- package/docs/assets/X3D/teaser.x3d +55 -0
- package/docs/assets/css/style.scss +120 -11
- package/docs/assets/img/laboratory/blend-mode.png +0 -0
- package/docs/assets/img/laboratory/dicom-nrrd.png +0 -0
- package/docs/assets/img/laboratory/earthquake.png +0 -0
- package/docs/assets/img/laboratory/gltf.png +0 -0
- package/docs/assets/img/laboratory/l-system.png +0 -0
- package/docs/assets/js/autoupdate.js +25 -0
- package/docs/laboratory/gltf-sample-viewer.html +318 -0
- package/docs/laboratory/x3d-visual-blend-mode-editor.html +1 -0
- package/package.json +9 -2
- package/src/assets/components/Texturing3D.js +5 -3
- package/src/assets/shaders/Types.glsl.js +5 -5
- package/src/assets/shaders/webgl1/PBR.fs.js +1 -1
- package/src/assets/shaders/webgl1/include/Colors.glsl.js +5 -7
- package/src/assets/shaders/webgl1/include/Fragment.glsl.js +4 -0
- package/src/assets/shaders/webgl1/include/Hatch.glsl.js +1 -1
- package/src/assets/shaders/webgl1/include/Texture.glsl.js +3 -3
- package/src/assets/shaders/webgl2/include/Colors.glsl.js +5 -7
- package/src/assets/shaders/webgl2/include/Hatch.glsl.js +1 -1
- package/src/assets/shaders/webgl2/include/Particle.glsl.js +2 -2
- package/src/assets/shaders/webgl2/include/Texture.glsl.js +2 -2
- package/src/bookmarks.js +12 -8
- package/src/examples.js +3 -0
- package/src/lib/jquery.js +20 -0
- package/src/lib/libgif/libgif.js +1004 -0
- package/src/lib/libtess.js +1 -0
- package/src/lib/nurbs/extras/sample.js +5 -7
- package/src/standard/Math/Algorithms/Bezier.js +175 -33
- package/src/standard/Math/Geometry/Box2.js +15 -55
- package/src/standard/Math/Geometry/Box3.js +19 -66
- package/src/standard/Math/Geometry/Triangle3.js +14 -79
- package/src/standard/Math/Numbers/Color3.js +4 -0
- package/src/standard/Math/Numbers/Color4.js +4 -0
- package/src/standard/Math/Numbers/Matrix3.js +11 -3
- package/src/standard/Math/Numbers/Matrix4.js +9 -6
- package/src/standard/Math/Numbers/Rotation4.js +72 -65
- package/src/tests.js +3 -0
- package/src/x_ite/Base/X3DArrayField.js +0 -2
- package/src/x_ite/Base/X3DInfoArray.js +2 -2
- package/src/x_ite/Base/X3DObjectArrayField.js +19 -0
- package/src/x_ite/Base/X3DTypedArrayField.js +149 -0
- package/src/x_ite/Browser/Core/BrowserOptions.js +108 -64
- package/src/x_ite/Browser/Core/Context.js +1 -1
- package/src/x_ite/Browser/Core/ContextMenu.js +2 -2
- package/src/x_ite/Browser/Core/Notification.js +1 -1
- package/src/x_ite/Browser/Core/RenderingProperties.js +4 -0
- package/src/x_ite/Browser/Core/X3DCoreContext.js +99 -54
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +4 -14
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -13
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -12
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +25 -22
- package/src/x_ite/Browser/Navigation/X3DViewer.js +12 -3
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +2 -2
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +19 -15
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +30 -10
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +1 -1
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +30 -3
- package/src/x_ite/Browser/Text/PolygonText.js +137 -134
- package/src/x_ite/Browser/Texturing/GifMedia.js +113 -0
- package/src/x_ite/Browser/Texturing3D/DICOMParser.js +1 -6
- package/src/x_ite/Browser/Texturing3D/NRRDParser.js +81 -310
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +162 -122
- package/src/x_ite/Browser/X3DBrowserContext.js +7 -5
- package/src/x_ite/Components/Core/WorldInfo.js +3 -3
- package/src/x_ite/Components/Core/X3DNode.js +7 -7
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +1 -1
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +2 -3
- package/src/x_ite/Components/Geometry3D/Extrusion.js +27 -23
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +10 -19
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +1 -3
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +39 -15
- package/src/x_ite/Components/HAnim/HAnimJoint.js +6 -9
- package/src/x_ite/Components/Layering/X3DLayerNode.js +21 -2
- package/src/x_ite/Components/Layout/Layout.js +4 -2
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +6 -0
- package/src/x_ite/Components/Lighting/DirectionalLight.js +4 -11
- package/src/x_ite/Components/Lighting/EnvironmentLight.js +1 -1
- package/src/x_ite/Components/Lighting/PointLight.js +4 -11
- package/src/x_ite/Components/Lighting/SpotLight.js +4 -11
- package/src/x_ite/Components/Lighting/X3DLightNode.js +7 -9
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +2 -2
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +14 -6
- package/src/x_ite/Components/Networking/Inline.js +48 -59
- package/src/x_ite/Components/Networking/X3DUrlObject.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +2 -2
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +7 -13
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +4 -2
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +4 -2
- package/src/x_ite/Components/Scripting/Script.js +2 -2
- package/src/x_ite/Components/Shaders/ShaderPart.js +1 -1
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +1 -3
- package/src/x_ite/Components/Shape/Appearance.js +27 -1
- package/src/x_ite/Components/Shape/FillProperties.js +1 -0
- package/src/x_ite/Components/Shape/LineProperties.js +15 -9
- package/src/x_ite/Components/Shape/Material.js +33 -22
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +22 -15
- package/src/x_ite/Components/Shape/PointProperties.js +23 -7
- package/src/x_ite/Components/Shape/UnlitMaterial.js +3 -2
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +25 -19
- package/src/x_ite/Components/Sound/AudioClip.js +5 -5
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +26 -34
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +1 -1
- package/src/x_ite/Components/TextureProjector/TextureProjector.js +4 -12
- package/src/x_ite/Components/TextureProjector/TextureProjectorParallel.js +6 -14
- package/src/x_ite/Components/TextureProjector/X3DTextureProjectorNode.js +7 -7
- package/src/x_ite/Components/Texturing/ImageTexture.js +15 -10
- package/src/x_ite/Components/Texturing/MovieTexture.js +51 -11
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +2 -2
- package/src/x_ite/Components/Texturing3D/ImageTextureAtlas.js +230 -0
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +12 -10
- package/src/x_ite/Execution/BindableList.js +35 -37
- package/src/x_ite/Execution/BindableStack.js +25 -7
- package/src/x_ite/Execution/X3DScene.js +2 -2
- package/src/x_ite/Execution/X3DWorld.js +1 -1
- package/src/x_ite/Fields/SFRotation.js +2 -1
- package/src/x_ite/Fields/SFString.js +1 -1
- package/src/x_ite/InputOutput/FileLoader.js +105 -236
- package/src/x_ite/InputOutput/Generator.js +12 -8
- package/src/x_ite/Parser/Expressions.js +85 -0
- package/src/x_ite/Parser/GLB2Parser.js +147 -0
- package/src/x_ite/Parser/GLTF2Parser.js +2221 -0
- package/src/x_ite/Parser/GoldenGate.js +64 -13
- package/src/x_ite/Parser/JSONParser.js +7 -36
- package/src/x_ite/Parser/OBJParser.js +1076 -0
- package/src/x_ite/Parser/STLAParser.js +376 -0
- package/src/x_ite/Parser/STLBParser.js +156 -0
- package/src/x_ite/Parser/SVGParser.js +2476 -0
- package/src/x_ite/Parser/VRMLParser.js +127 -183
- package/src/x_ite/Parser/X3DOptimizer.js +191 -0
- package/src/x_ite/Parser/X3DParser.js +34 -0
- package/src/x_ite/Parser/XMLParser.js +11 -109
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +2 -2
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +3 -3
- package/src/x_ite/Rendering/DependentRenderer.js +1 -1
- package/src/x_ite/Rendering/MultiSampleFrameBuffer.js +150 -0
- package/src/x_ite/Rendering/TextureBuffer.js +3 -5
- package/src/x_ite/Rendering/X3DRenderObject.js +2 -7
- package/src/x_ite/X3D.js +1 -0
- package/src/x_ite/X3DCanvas.js +10 -0
- package/src/x_ite.html +39 -17
- package/webpack.config.js +1 -0
- package/x_ite.min.html +38 -17
- package/src/standard/Networking/BinaryTransport.js +0 -116
|
@@ -121,8 +121,7 @@ ImageCubeMapTexture .prototype = Object .assign (Object .create (X3DEnvironmentT
|
|
|
121
121
|
|
|
122
122
|
this .image .on ("load", this .setImage .bind (this));
|
|
123
123
|
this .image .on ("abort error", this .setError .bind (this));
|
|
124
|
-
|
|
125
|
-
this .image [0] .crossOrigin = "Anonymous";
|
|
124
|
+
this .image .prop ("crossOrigin", "Anonymous");
|
|
126
125
|
|
|
127
126
|
this .requestImmediateLoad ();
|
|
128
127
|
},
|
|
@@ -150,7 +149,7 @@ ImageCubeMapTexture .prototype = Object .assign (Object .create (X3DEnvironmentT
|
|
|
150
149
|
|
|
151
150
|
if (this .URL .protocol !== "data:")
|
|
152
151
|
{
|
|
153
|
-
if (!this .
|
|
152
|
+
if (!this .getCache ())
|
|
154
153
|
this .URL .searchParams .set ("_", Date .now ());
|
|
155
154
|
}
|
|
156
155
|
|
|
@@ -590,6 +590,8 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
590
590
|
{
|
|
591
591
|
const
|
|
592
592
|
j = 0, // spine
|
|
593
|
+
convex = this ._convex .getValue (),
|
|
594
|
+
texCoord = { },
|
|
593
595
|
polygon = [ ],
|
|
594
596
|
triangles = [ ];
|
|
595
597
|
|
|
@@ -599,12 +601,12 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
599
601
|
index = INDEX (j, numCapPoints - 1 - k),
|
|
600
602
|
point = points [index] .copy ();
|
|
601
603
|
|
|
602
|
-
point .index
|
|
603
|
-
|
|
604
|
-
polygon .push (point);
|
|
604
|
+
point .index = index;
|
|
605
|
+
texCoord [index] = Vector2 .subtract (crossSection [numCapPoints - 1 - k] .getValue (), min) .divide (capMax);
|
|
606
|
+
polygon .push (convex ? index : point);
|
|
605
607
|
}
|
|
606
608
|
|
|
607
|
-
if (
|
|
609
|
+
if (convex)
|
|
608
610
|
Triangle3 .triangulateConvexPolygon (polygon, triangles);
|
|
609
611
|
|
|
610
612
|
else
|
|
@@ -612,15 +614,15 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
612
614
|
|
|
613
615
|
if (triangles .length >= 3)
|
|
614
616
|
{
|
|
615
|
-
const normal = Triangle3 .normal (points [triangles [0]
|
|
616
|
-
points [triangles [1]
|
|
617
|
-
points [triangles [2]
|
|
617
|
+
const normal = Triangle3 .normal (points [triangles [0]],
|
|
618
|
+
points [triangles [1]],
|
|
619
|
+
points [triangles [2]],
|
|
618
620
|
new Vector3 (0, 0, 0));
|
|
619
621
|
|
|
620
622
|
if (cw)
|
|
621
623
|
normal .negate ();
|
|
622
624
|
|
|
623
|
-
this .addCap (texCoordArray, normal, points, triangles);
|
|
625
|
+
this .addCap (texCoordArray, texCoord, normal, points, triangles);
|
|
624
626
|
}
|
|
625
627
|
}
|
|
626
628
|
|
|
@@ -628,6 +630,8 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
628
630
|
{
|
|
629
631
|
const
|
|
630
632
|
j = numSpines - 1, // spine
|
|
633
|
+
convex = this ._convex .getValue (),
|
|
634
|
+
texCoord = { },
|
|
631
635
|
polygon = [ ],
|
|
632
636
|
triangles = [ ];
|
|
633
637
|
|
|
@@ -637,12 +641,12 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
637
641
|
index = INDEX (j, k),
|
|
638
642
|
point = points [index] .copy ();
|
|
639
643
|
|
|
640
|
-
point .index
|
|
641
|
-
|
|
642
|
-
polygon .push (point);
|
|
644
|
+
point .index = index;
|
|
645
|
+
texCoord [index] = Vector2 .subtract (crossSection [k] .getValue (), min) .divide (capMax);
|
|
646
|
+
polygon .push (convex ? index : point);
|
|
643
647
|
}
|
|
644
648
|
|
|
645
|
-
if (
|
|
649
|
+
if (convex)
|
|
646
650
|
Triangle3 .triangulateConvexPolygon (polygon, triangles);
|
|
647
651
|
|
|
648
652
|
else
|
|
@@ -650,15 +654,15 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
650
654
|
|
|
651
655
|
if (triangles .length >= 3)
|
|
652
656
|
{
|
|
653
|
-
const normal = Triangle3 .normal (points [triangles [0]
|
|
654
|
-
points [triangles [1]
|
|
655
|
-
points [triangles [2]
|
|
657
|
+
const normal = Triangle3 .normal (points [triangles [0]],
|
|
658
|
+
points [triangles [1]],
|
|
659
|
+
points [triangles [2]],
|
|
656
660
|
new Vector3 (0, 0, 0));
|
|
657
661
|
|
|
658
662
|
if (cw)
|
|
659
663
|
normal .negate ();
|
|
660
664
|
|
|
661
|
-
this .addCap (texCoordArray, normal, points, triangles);
|
|
665
|
+
this .addCap (texCoordArray, texCoord, normal, points, triangles);
|
|
662
666
|
}
|
|
663
667
|
}
|
|
664
668
|
}
|
|
@@ -667,7 +671,7 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
667
671
|
this .setCCW (this ._ccw .getValue ());
|
|
668
672
|
};
|
|
669
673
|
})(),
|
|
670
|
-
addCap: function (texCoordArray, normal, vertices, triangles)
|
|
674
|
+
addCap: function (texCoordArray, texCoord, normal, vertices, triangles)
|
|
671
675
|
{
|
|
672
676
|
const
|
|
673
677
|
normalArray = this .getNormals (),
|
|
@@ -676,12 +680,12 @@ Extrusion .prototype = Object .assign (Object .create (X3DGeometryNode .prototyp
|
|
|
676
680
|
for (let i = 0, length = triangles .length; i < length; i += 3)
|
|
677
681
|
{
|
|
678
682
|
const
|
|
679
|
-
p0 = vertices [triangles [i]
|
|
680
|
-
p1 = vertices [triangles [i + 1]
|
|
681
|
-
p2 = vertices [triangles [i + 2]
|
|
682
|
-
t0 = triangles [i]
|
|
683
|
-
t1 = triangles [i + 1]
|
|
684
|
-
t2 = triangles [i + 2]
|
|
683
|
+
p0 = vertices [triangles [i]],
|
|
684
|
+
p1 = vertices [triangles [i + 1]],
|
|
685
|
+
p2 = vertices [triangles [i + 2]],
|
|
686
|
+
t0 = texCoord [triangles [i]],
|
|
687
|
+
t1 = texCoord [triangles [i + 1]],
|
|
688
|
+
t2 = texCoord [triangles [i + 2]];
|
|
685
689
|
|
|
686
690
|
texCoordArray .push (t0 .x, t0 .y, 0, 1);
|
|
687
691
|
texCoordArray .push (t1 .x, t1 .y, 0, 1);
|
|
@@ -294,7 +294,7 @@ IndexedFaceSet .prototype = Object .assign (Object .create (X3DComposedGeometryN
|
|
|
294
294
|
polygon = { vertices: vertices, triangles: triangles, face: face };
|
|
295
295
|
|
|
296
296
|
if (convex)
|
|
297
|
-
|
|
297
|
+
Triangle3 .triangulateConvexPolygon (vertices, triangles);
|
|
298
298
|
else
|
|
299
299
|
this .triangulatePolygon (vertices, triangles);
|
|
300
300
|
|
|
@@ -331,34 +331,25 @@ IndexedFaceSet .prototype = Object .assign (Object .create (X3DComposedGeometryN
|
|
|
331
331
|
coord = this .getCoord (),
|
|
332
332
|
length = vertices .length;
|
|
333
333
|
|
|
334
|
-
for (let
|
|
335
|
-
|
|
336
|
-
const i = vertices [v];
|
|
337
|
-
|
|
338
|
-
let vertex = polygon [v];
|
|
334
|
+
for (let i = polygon .length; i < length; ++ i)
|
|
335
|
+
polygon .push (new Vector3 (0, 0, 0));
|
|
339
336
|
|
|
340
|
-
|
|
341
|
-
|
|
337
|
+
for (let i = 0; i < length; ++ i)
|
|
338
|
+
{
|
|
339
|
+
const
|
|
340
|
+
index = vertices [i],
|
|
341
|
+
point = polygon [i];
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
point .index = index;
|
|
344
344
|
|
|
345
|
-
coord .get1Point (coordIndex [
|
|
345
|
+
coord .get1Point (coordIndex [index], point);
|
|
346
346
|
}
|
|
347
347
|
|
|
348
348
|
polygon .length = length;
|
|
349
349
|
|
|
350
350
|
Triangle3 .triangulatePolygon (polygon, triangles);
|
|
351
|
-
|
|
352
|
-
for (let i = 0, length = triangles .length; i < length; ++ i)
|
|
353
|
-
triangles [i] = triangles [i] .index;
|
|
354
351
|
};
|
|
355
352
|
})(),
|
|
356
|
-
triangulateConvexPolygon: function (vertices, triangles)
|
|
357
|
-
{
|
|
358
|
-
// Fallback: Very simple triangulation for convex polygons.
|
|
359
|
-
for (let i = 1, length = vertices .length - 1; i < length; ++ i)
|
|
360
|
-
triangles .push (vertices [0], vertices [i], vertices [i + 1]);
|
|
361
|
-
},
|
|
362
353
|
buildNormals: function (polygons)
|
|
363
354
|
{
|
|
364
355
|
const
|
|
@@ -87,10 +87,8 @@ X3DBoundedObject .prototype =
|
|
|
87
87
|
|
|
88
88
|
bbox .set ();
|
|
89
89
|
|
|
90
|
-
for (
|
|
90
|
+
for (const node of nodes)
|
|
91
91
|
{
|
|
92
|
-
const node = nodes [i];
|
|
93
|
-
|
|
94
92
|
if (node .getBBox)
|
|
95
93
|
bbox .add (node .getBBox (childBBox, shadows));
|
|
96
94
|
}
|
|
@@ -70,8 +70,8 @@ function HAnimHumanoid (executionContext)
|
|
|
70
70
|
this ._bboxSize .setUnit ("length");
|
|
71
71
|
this ._bboxCenter .setUnit ("length");
|
|
72
72
|
|
|
73
|
-
this .viewpointsNode = new Group (executionContext);
|
|
74
73
|
this .skeletonNode = new Group (executionContext);
|
|
74
|
+
this .viewpointsNode = new Group (executionContext);
|
|
75
75
|
this .skinNode = new Group (executionContext);
|
|
76
76
|
this .transformNode = new Transform (executionContext);
|
|
77
77
|
this .jointNodes = [ ];
|
|
@@ -79,6 +79,7 @@ function HAnimHumanoid (executionContext)
|
|
|
79
79
|
this .skinCoordNode = null;
|
|
80
80
|
this .restNormalNode = null;
|
|
81
81
|
this .restCoordNode = null;
|
|
82
|
+
this .changed = false;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototype),
|
|
@@ -106,12 +107,12 @@ HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototy
|
|
|
106
107
|
new X3DFieldDefinition (X3DConstants .inputOutput, "bboxDisplay", new Fields .SFBool ()),
|
|
107
108
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxSize", new Fields .SFVec3f (-1, -1, -1)),
|
|
108
109
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxCenter", new Fields .SFVec3f ()),
|
|
110
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "skeleton", new Fields .MFNode ()),
|
|
109
111
|
new X3DFieldDefinition (X3DConstants .inputOutput, "viewpoints", new Fields .MFNode ()),
|
|
110
112
|
new X3DFieldDefinition (X3DConstants .inputOutput, "sites", new Fields .MFNode ()),
|
|
111
|
-
new X3DFieldDefinition (X3DConstants .inputOutput, "joints", new Fields .MFNode ()),
|
|
112
113
|
new X3DFieldDefinition (X3DConstants .inputOutput, "segments", new Fields .MFNode ()),
|
|
114
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "joints", new Fields .MFNode ()),
|
|
113
115
|
new X3DFieldDefinition (X3DConstants .inputOutput, "motions", new Fields .MFNode ()),
|
|
114
|
-
new X3DFieldDefinition (X3DConstants .inputOutput, "skeleton", new Fields .MFNode ()),
|
|
115
116
|
new X3DFieldDefinition (X3DConstants .inputOutput, "skinBindingNormal", new Fields .SFNode ()),
|
|
116
117
|
new X3DFieldDefinition (X3DConstants .inputOutput, "skinBindingCoord", new Fields .SFNode ()),
|
|
117
118
|
new X3DFieldDefinition (X3DConstants .inputOutput, "skinNormal", new Fields .SFNode ()),
|
|
@@ -137,19 +138,19 @@ HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototy
|
|
|
137
138
|
|
|
138
139
|
// Groups
|
|
139
140
|
|
|
140
|
-
this .viewpointsNode .setAllowedTypes (X3DConstants .HAnimSite);
|
|
141
141
|
this .skeletonNode .setAllowedTypes (X3DConstants .HAnimJoint, X3DConstants .HAnimSite);
|
|
142
|
+
this .viewpointsNode .setAllowedTypes (X3DConstants .HAnimSite);
|
|
142
143
|
|
|
143
|
-
this ._viewpoints .addFieldInterest (this .viewpointsNode ._children);
|
|
144
144
|
this ._skeleton .addFieldInterest (this .skeletonNode ._children);
|
|
145
|
+
this ._viewpoints .addFieldInterest (this .viewpointsNode ._children);
|
|
145
146
|
this ._skin .addFieldInterest (this .skinNode ._children);
|
|
146
147
|
|
|
147
|
-
this .viewpointsNode ._children = this ._viewpoints;
|
|
148
148
|
this .skeletonNode ._children = this ._skeleton;
|
|
149
|
+
this .viewpointsNode ._children = this ._viewpoints;
|
|
149
150
|
this .skinNode ._children = this ._skin;
|
|
150
151
|
|
|
151
|
-
this .viewpointsNode .setPrivate (true);
|
|
152
152
|
this .skeletonNode .setPrivate (true);
|
|
153
|
+
this .viewpointsNode .setPrivate (true);
|
|
153
154
|
this .skinNode .setPrivate (true);
|
|
154
155
|
|
|
155
156
|
// Transform
|
|
@@ -173,15 +174,15 @@ HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototy
|
|
|
173
174
|
this .transformNode ._bboxDisplay = this ._bboxDisplay;
|
|
174
175
|
this .transformNode ._bboxSize = this ._bboxSize;
|
|
175
176
|
this .transformNode ._bboxCenter = this ._bboxCenter;
|
|
176
|
-
this .transformNode ._children = [ this .
|
|
177
|
+
this .transformNode ._children = [ this .skeletonNode, this .viewpointsNode, this .skinNode ];
|
|
177
178
|
|
|
178
179
|
this .transformNode ._isCameraObject .addFieldInterest (this ._isCameraObject);
|
|
179
180
|
this .transformNode ._isPickableObject .addFieldInterest (this ._isPickableObject);
|
|
180
181
|
|
|
181
182
|
// Setup
|
|
182
183
|
|
|
183
|
-
this .viewpointsNode .setup ();
|
|
184
184
|
this .skeletonNode .setup ();
|
|
185
|
+
this .viewpointsNode .setup ();
|
|
185
186
|
this .skinNode .setup ();
|
|
186
187
|
this .transformNode .setup ();
|
|
187
188
|
|
|
@@ -206,6 +207,9 @@ HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototy
|
|
|
206
207
|
{
|
|
207
208
|
const jointNodes = this .jointNodes;
|
|
208
209
|
|
|
210
|
+
for (const jointNode of jointNodes)
|
|
211
|
+
jointNode .removeInterest ("set_joint__", this);
|
|
212
|
+
|
|
209
213
|
jointNodes .length = 0;
|
|
210
214
|
|
|
211
215
|
for (const node of this ._joints)
|
|
@@ -215,6 +219,15 @@ HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototy
|
|
|
215
219
|
if (jointNode)
|
|
216
220
|
jointNodes .push (jointNode);
|
|
217
221
|
}
|
|
222
|
+
|
|
223
|
+
for (const jointNode of jointNodes)
|
|
224
|
+
jointNode .addInterest ("set_joint__", this);
|
|
225
|
+
|
|
226
|
+
this .set_joint__ ();
|
|
227
|
+
},
|
|
228
|
+
set_joint__: function ()
|
|
229
|
+
{
|
|
230
|
+
this .changed = true;
|
|
218
231
|
},
|
|
219
232
|
set_skinNormal__: function ()
|
|
220
233
|
{
|
|
@@ -224,6 +237,8 @@ HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototy
|
|
|
224
237
|
|
|
225
238
|
if (this .skinNormalNode)
|
|
226
239
|
this .restNormalNode = this .skinNormalNode .copy ();
|
|
240
|
+
|
|
241
|
+
this .changed = true;
|
|
227
242
|
},
|
|
228
243
|
set_skinCoord__: function ()
|
|
229
244
|
{
|
|
@@ -232,16 +247,23 @@ HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototy
|
|
|
232
247
|
this .skinCoordNode = X3DCast (X3DConstants .X3DCoordinateNode, this ._skinCoord);
|
|
233
248
|
|
|
234
249
|
if (this .skinCoordNode)
|
|
250
|
+
{
|
|
235
251
|
this .restCoordNode = this .skinCoordNode .copy ();
|
|
252
|
+
|
|
253
|
+
delete this .skinning;
|
|
254
|
+
}
|
|
255
|
+
else
|
|
256
|
+
{
|
|
257
|
+
this .skinning = Function .prototype
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
this .changed = true;
|
|
236
261
|
},
|
|
237
262
|
traverse: function (type, renderObject)
|
|
238
263
|
{
|
|
239
|
-
renderObject .getJoints () .length = 0;
|
|
240
|
-
|
|
241
264
|
this .transformNode .traverse (type, renderObject);
|
|
242
265
|
|
|
243
|
-
|
|
244
|
-
this .skinning (type, renderObject);
|
|
266
|
+
this .skinning (type, renderObject);
|
|
245
267
|
},
|
|
246
268
|
skinning: (function ()
|
|
247
269
|
{
|
|
@@ -257,11 +279,13 @@ HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototy
|
|
|
257
279
|
if (type !== TraverseType .CAMERA)
|
|
258
280
|
return;
|
|
259
281
|
|
|
260
|
-
if (!
|
|
282
|
+
if (!this .changed)
|
|
261
283
|
return;
|
|
262
284
|
|
|
285
|
+
this .changed = false;
|
|
286
|
+
|
|
263
287
|
const
|
|
264
|
-
jointNodes = this .jointNodes
|
|
288
|
+
jointNodes = this .jointNodes,
|
|
265
289
|
skinNormalNode = this .skinNormalNode,
|
|
266
290
|
skinCoordNode = this .skinCoordNode,
|
|
267
291
|
restNormalNode = this .restNormalNode,
|
|
@@ -111,7 +111,8 @@ HAnimJoint .prototype = Object .assign (Object .create (X3DTransformNode .protot
|
|
|
111
111
|
{
|
|
112
112
|
X3DTransformNode .prototype .initialize .call (this);
|
|
113
113
|
|
|
114
|
-
this .
|
|
114
|
+
this ._skinCoordIndex .addInterest ("set_skinCoordIndex__", this);
|
|
115
|
+
this ._displacers .addInterest ("set_displacers__", this);
|
|
115
116
|
|
|
116
117
|
this .set_displacers__ ();
|
|
117
118
|
},
|
|
@@ -127,6 +128,10 @@ HAnimJoint .prototype = Object .assign (Object .create (X3DTransformNode .protot
|
|
|
127
128
|
{
|
|
128
129
|
return this .displacerNodes;
|
|
129
130
|
},
|
|
131
|
+
set_skinCoordIndex__: function ()
|
|
132
|
+
{
|
|
133
|
+
this .set_cameraObjects__ ();
|
|
134
|
+
},
|
|
130
135
|
set_displacers__: function ()
|
|
131
136
|
{
|
|
132
137
|
const displacerNodes = this .displacerNodes;
|
|
@@ -146,11 +151,7 @@ HAnimJoint .prototype = Object .assign (Object .create (X3DTransformNode .protot
|
|
|
146
151
|
if (type === TraverseType .CAMERA)
|
|
147
152
|
{
|
|
148
153
|
if (this ._skinCoordIndex .length)
|
|
149
|
-
{
|
|
150
|
-
renderObject .getJoints () .push (this);
|
|
151
|
-
|
|
152
154
|
this .modelMatrix .assign (this .getMatrix ()) .multRight (renderObject .getModelViewMatrix () .get ());
|
|
153
|
-
}
|
|
154
155
|
}
|
|
155
156
|
|
|
156
157
|
X3DTransformNode .prototype .traverse .call (this, type, renderObject);
|
|
@@ -160,11 +161,7 @@ HAnimJoint .prototype = Object .assign (Object .create (X3DTransformNode .protot
|
|
|
160
161
|
if (type === TraverseType .CAMERA)
|
|
161
162
|
{
|
|
162
163
|
if (this ._skinCoordIndex .length)
|
|
163
|
-
{
|
|
164
|
-
renderObject .getJoints () .push (this);
|
|
165
|
-
|
|
166
164
|
this .modelMatrix .assign (renderObject .getModelViewMatrix () .get ());
|
|
167
|
-
}
|
|
168
165
|
}
|
|
169
166
|
|
|
170
167
|
X3DTransformNode .prototype .groupTraverse .call (this, type, renderObject);
|
|
@@ -69,8 +69,9 @@ function X3DLayerNode (executionContext, defaultViewpoint, groupNode)
|
|
|
69
69
|
if (executionContext .getSpecificationVersion () < 4.0)
|
|
70
70
|
this .addAlias ("isPickable", this ._pickable);
|
|
71
71
|
|
|
72
|
-
this .
|
|
73
|
-
this .
|
|
72
|
+
this .pickableGroupNode = executionContext .createNode ("PickableGroup", false);
|
|
73
|
+
this .groupNode = groupNode;
|
|
74
|
+
this .currentViewport = null;
|
|
74
75
|
|
|
75
76
|
this .defaultNavigationInfo = new NavigationInfo (executionContext);
|
|
76
77
|
this .defaultViewpoint = defaultViewpoint;
|
|
@@ -103,6 +104,21 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
103
104
|
X3DNode .prototype .initialize .call (this);
|
|
104
105
|
X3DRenderObject .prototype .initialize .call (this);
|
|
105
106
|
|
|
107
|
+
// if (this .pickableGroupNode)
|
|
108
|
+
// {
|
|
109
|
+
// this ._pickable .addFieldInterest (this .pickableGroupNode ._pickable);
|
|
110
|
+
// this ._objectType .addFieldInterest (this .pickableGroupNode ._objectType);
|
|
111
|
+
|
|
112
|
+
// this .pickableGroupNode ._pickable = this ._pickable;
|
|
113
|
+
// this .pickableGroupNode ._objectType = this ._objectType;
|
|
114
|
+
|
|
115
|
+
// this .pickableGroupNode .setup ();
|
|
116
|
+
// }
|
|
117
|
+
// else
|
|
118
|
+
// {
|
|
119
|
+
// this .pickableGroupNode = this .groupNode;
|
|
120
|
+
// }
|
|
121
|
+
|
|
106
122
|
this .defaultNavigationInfo .setup ();
|
|
107
123
|
this .defaultViewpoint .setup ();
|
|
108
124
|
this .defaultBackground .setup ();
|
|
@@ -238,6 +254,9 @@ X3DLayerNode .prototype = Object .assign (Object .create (X3DNode .prototype),
|
|
|
238
254
|
this .fogStack .pushOnTop (fogNode);
|
|
239
255
|
|
|
240
256
|
viewpointNode .resetUserOffsets ();
|
|
257
|
+
|
|
258
|
+
if (viewpointNode ._viewAll .getValue ())
|
|
259
|
+
viewpointNode .viewAll (this .getBBox (new Box3 ()));
|
|
241
260
|
},
|
|
242
261
|
traverse: function (type, renderObject)
|
|
243
262
|
{
|
|
@@ -446,6 +446,8 @@ Layout .prototype = Object .assign (Object .create (X3DLayoutNode .prototype),
|
|
|
446
446
|
// Calculate rectangleSize
|
|
447
447
|
|
|
448
448
|
var
|
|
449
|
+
browser = this .getBrowser (),
|
|
450
|
+
contentScale = browser .getRenderingProperty ("ContentScale"),
|
|
449
451
|
matrix = this .matrix,
|
|
450
452
|
viewpoint = renderObject .getViewpoint (),
|
|
451
453
|
nearValue = renderObject .getNavigationInfo () .getNearValue (), // in meters
|
|
@@ -457,8 +459,8 @@ Layout .prototype = Object .assign (Object .create (X3DLayoutNode .prototype),
|
|
|
457
459
|
rectangleSize = this .rectangleSize,
|
|
458
460
|
rectangleCenter = this .rectangleCenter;
|
|
459
461
|
|
|
460
|
-
viewportPixel .set (viewport [2], viewport [3]);
|
|
461
|
-
pixelSize .assign (viewportMeter) .divVec (viewportPixel);
|
|
462
|
+
viewportPixel .set (viewport [2], viewport [3]) .divide (contentScale); // in pixel
|
|
463
|
+
pixelSize .assign (viewportMeter) .divVec (viewportPixel); // size of one pixel in meter
|
|
462
464
|
|
|
463
465
|
switch (this .getSizeUnitX ())
|
|
464
466
|
{
|
|
@@ -86,6 +86,12 @@ ScreenFontStyle .prototype = Object .assign (Object .create (X3DFontStyleNode .p
|
|
|
86
86
|
{
|
|
87
87
|
return "fontStyle";
|
|
88
88
|
},
|
|
89
|
+
initialize: function ()
|
|
90
|
+
{
|
|
91
|
+
X3DFontStyleNode .prototype .initialize .call (this);
|
|
92
|
+
|
|
93
|
+
this .getBrowser () .getRenderingProperties () ._ContentScale .addInterest ("addNodeEvent", this);
|
|
94
|
+
},
|
|
89
95
|
getTextGeometry: function (text)
|
|
90
96
|
{
|
|
91
97
|
return new ScreenText (text, this);
|
|
@@ -92,6 +92,7 @@ DirectionalLightContainer .prototype =
|
|
|
92
92
|
this .browser = lightNode .getBrowser ();
|
|
93
93
|
this .lightNode = lightNode;
|
|
94
94
|
this .groupNode = groupNode;
|
|
95
|
+
this .global = lightNode .getGlobal ();
|
|
95
96
|
|
|
96
97
|
this .modelViewMatrix .pushMatrix (modelViewMatrix);
|
|
97
98
|
|
|
@@ -105,14 +106,6 @@ DirectionalLightContainer .prototype =
|
|
|
105
106
|
console .warn ("Couldn't create shadow buffer.");
|
|
106
107
|
}
|
|
107
108
|
},
|
|
108
|
-
setGroup: function (groupNode)
|
|
109
|
-
{
|
|
110
|
-
this .groupNode = groupNode;
|
|
111
|
-
},
|
|
112
|
-
getModelViewMatrix: function ()
|
|
113
|
-
{
|
|
114
|
-
return this .modelViewMatrix;
|
|
115
|
-
},
|
|
116
109
|
renderShadowMap: function (renderObject)
|
|
117
110
|
{
|
|
118
111
|
if (! this .shadowBuffer)
|
|
@@ -122,7 +115,7 @@ DirectionalLightContainer .prototype =
|
|
|
122
115
|
lightNode = this .lightNode,
|
|
123
116
|
cameraSpaceMatrix = renderObject .getCameraSpaceMatrix () .get (),
|
|
124
117
|
modelMatrix = this .modelMatrix .assign (this .modelViewMatrix .get ()) .multRight (cameraSpaceMatrix),
|
|
125
|
-
invLightSpaceMatrix = this .invLightSpaceMatrix .assign (
|
|
118
|
+
invLightSpaceMatrix = this .invLightSpaceMatrix .assign (this .global ? modelMatrix : Matrix4 .Identity);
|
|
126
119
|
|
|
127
120
|
invLightSpaceMatrix .rotate (this .rotation .setFromToVec (Vector3 .zAxis, this .direction .assign (lightNode .getDirection ()) .negate ()));
|
|
128
121
|
invLightSpaceMatrix .inverse ();
|
|
@@ -148,7 +141,7 @@ DirectionalLightContainer .prototype =
|
|
|
148
141
|
|
|
149
142
|
this .shadowBuffer .unbind ();
|
|
150
143
|
|
|
151
|
-
if (!
|
|
144
|
+
if (!this .global)
|
|
152
145
|
invLightSpaceMatrix .multLeft (modelMatrix .inverse ());
|
|
153
146
|
|
|
154
147
|
this .invLightSpaceProjectionMatrix .assign (invLightSpaceMatrix) .multRight (projectionMatrix) .multRight (lightNode .getBiasMatrix ());
|
|
@@ -169,7 +162,7 @@ DirectionalLightContainer .prototype =
|
|
|
169
162
|
|
|
170
163
|
if (this .shadowBuffer)
|
|
171
164
|
{
|
|
172
|
-
const textureUnit = this .
|
|
165
|
+
const textureUnit = this .global
|
|
173
166
|
? (this .textureUnit = this .textureUnit !== undefined
|
|
174
167
|
? this .textureUnit
|
|
175
168
|
: this .browser .popTexture2DUnit ())
|
|
@@ -106,11 +106,11 @@ EnvironmentLight .prototype = Object .assign (Object .create (X3DLightNode .prot
|
|
|
106
106
|
new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
|
|
107
107
|
new X3DFieldDefinition (X3DConstants .inputOutput, "global", new Fields .SFBool (false)),
|
|
108
108
|
new X3DFieldDefinition (X3DConstants .inputOutput, "on", new Fields .SFBool (true)),
|
|
109
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "rotation", new Fields .SFRotation ()),
|
|
109
110
|
new X3DFieldDefinition (X3DConstants .inputOutput, "color", new Fields .SFColor (1, 1, 1)),
|
|
110
111
|
new X3DFieldDefinition (X3DConstants .inputOutput, "intensity", new Fields .SFFloat (1)),
|
|
111
112
|
new X3DFieldDefinition (X3DConstants .inputOutput, "ambientIntensity", new Fields .SFFloat ()),
|
|
112
113
|
|
|
113
|
-
new X3DFieldDefinition (X3DConstants .inputOutput, "rotation", new Fields .SFRotation ()),
|
|
114
114
|
new X3DFieldDefinition (X3DConstants .inputOutput, "diffuseCoefficients", new Fields .MFFloat ()),
|
|
115
115
|
new X3DFieldDefinition (X3DConstants .inputOutput, "diffuse", new Fields .SFNode ()),
|
|
116
116
|
new X3DFieldDefinition (X3DConstants .inputOutput, "diffuseTexture", new Fields .SFNode ()),
|
|
@@ -118,6 +118,7 @@ PointLightContainer .prototype =
|
|
|
118
118
|
this .browser = lightNode .getBrowser ();
|
|
119
119
|
this .lightNode = lightNode;
|
|
120
120
|
this .groupNode = groupNode;
|
|
121
|
+
this .global = lightNode .getGlobal ();
|
|
121
122
|
|
|
122
123
|
this .matrixArray .set (modelViewMatrix .submatrix .inverse ());
|
|
123
124
|
|
|
@@ -133,14 +134,6 @@ PointLightContainer .prototype =
|
|
|
133
134
|
console .warn ("Couldn't create shadow buffer.");
|
|
134
135
|
}
|
|
135
136
|
},
|
|
136
|
-
setGroup: function (groupNode)
|
|
137
|
-
{
|
|
138
|
-
this .groupNode = groupNode;
|
|
139
|
-
},
|
|
140
|
-
getModelViewMatrix: function ()
|
|
141
|
-
{
|
|
142
|
-
return this .modelViewMatrix;
|
|
143
|
-
},
|
|
144
137
|
renderShadowMap: function (renderObject)
|
|
145
138
|
{
|
|
146
139
|
if (! this .shadowBuffer)
|
|
@@ -150,7 +143,7 @@ PointLightContainer .prototype =
|
|
|
150
143
|
lightNode = this .lightNode,
|
|
151
144
|
cameraSpaceMatrix = renderObject .getCameraSpaceMatrix () .get (),
|
|
152
145
|
modelMatrix = this .modelMatrix .assign (this .modelViewMatrix .get ()) .multRight (cameraSpaceMatrix),
|
|
153
|
-
invLightSpaceMatrix = this .invLightSpaceMatrix .assign (
|
|
146
|
+
invLightSpaceMatrix = this .invLightSpaceMatrix .assign (this .global ? modelMatrix : Matrix4 .Identity);
|
|
154
147
|
|
|
155
148
|
invLightSpaceMatrix .translate (lightNode .getLocation ());
|
|
156
149
|
invLightSpaceMatrix .inverse ();
|
|
@@ -180,7 +173,7 @@ PointLightContainer .prototype =
|
|
|
180
173
|
|
|
181
174
|
this .shadowBuffer .unbind ();
|
|
182
175
|
|
|
183
|
-
if (!
|
|
176
|
+
if (!this .global)
|
|
184
177
|
invLightSpaceMatrix .multLeft (modelMatrix .inverse ());
|
|
185
178
|
|
|
186
179
|
this .invLightSpaceProjectionMatrix .assign (invLightSpaceMatrix);
|
|
@@ -201,7 +194,7 @@ PointLightContainer .prototype =
|
|
|
201
194
|
|
|
202
195
|
if (this .shadowBuffer)
|
|
203
196
|
{
|
|
204
|
-
const textureUnit = this .
|
|
197
|
+
const textureUnit = this .global
|
|
205
198
|
? (this .textureUnit = this .textureUnit !== undefined
|
|
206
199
|
? this .textureUnit
|
|
207
200
|
: this .browser .popTexture2DUnit ())
|
|
@@ -99,6 +99,7 @@ SpotLightContainer .prototype =
|
|
|
99
99
|
this .browser = lightNode .getBrowser ();
|
|
100
100
|
this .lightNode = lightNode;
|
|
101
101
|
this .groupNode = groupNode;
|
|
102
|
+
this .global = lightNode .getGlobal ();
|
|
102
103
|
|
|
103
104
|
this .matrixArray .set (modelViewMatrix .submatrix .inverse ());
|
|
104
105
|
|
|
@@ -114,14 +115,6 @@ SpotLightContainer .prototype =
|
|
|
114
115
|
console .warn ("Couldn't create shadow buffer.");
|
|
115
116
|
}
|
|
116
117
|
},
|
|
117
|
-
setGroup: function (groupNode)
|
|
118
|
-
{
|
|
119
|
-
this .groupNode = groupNode;
|
|
120
|
-
},
|
|
121
|
-
getModelViewMatrix: function ()
|
|
122
|
-
{
|
|
123
|
-
return this .modelViewMatrix;
|
|
124
|
-
},
|
|
125
118
|
renderShadowMap: function (renderObject)
|
|
126
119
|
{
|
|
127
120
|
if (! this .shadowBuffer)
|
|
@@ -131,7 +124,7 @@ SpotLightContainer .prototype =
|
|
|
131
124
|
lightNode = this .lightNode,
|
|
132
125
|
cameraSpaceMatrix = renderObject .getCameraSpaceMatrix () .get (),
|
|
133
126
|
modelMatrix = this .modelMatrix .assign (this .modelViewMatrix .get ()) .multRight (cameraSpaceMatrix),
|
|
134
|
-
invLightSpaceMatrix = this .invLightSpaceMatrix .assign (
|
|
127
|
+
invLightSpaceMatrix = this .invLightSpaceMatrix .assign (this .global ? modelMatrix : Matrix4 .Identity);
|
|
135
128
|
|
|
136
129
|
invLightSpaceMatrix .translate (lightNode .getLocation ());
|
|
137
130
|
invLightSpaceMatrix .rotate (this .rotation .setFromToVec (Vector3 .zAxis, this .direction .assign (lightNode .getDirection ()) .negate ()));
|
|
@@ -162,7 +155,7 @@ SpotLightContainer .prototype =
|
|
|
162
155
|
|
|
163
156
|
this .shadowBuffer .unbind ();
|
|
164
157
|
|
|
165
|
-
if (!
|
|
158
|
+
if (!this .global)
|
|
166
159
|
invLightSpaceMatrix .multLeft (modelMatrix .inverse ());
|
|
167
160
|
|
|
168
161
|
this .invLightSpaceProjectionMatrix .assign (invLightSpaceMatrix) .multRight (projectionMatrix) .multRight (lightNode .getBiasMatrix ());
|
|
@@ -188,7 +181,7 @@ SpotLightContainer .prototype =
|
|
|
188
181
|
|
|
189
182
|
if (this .shadowBuffer)
|
|
190
183
|
{
|
|
191
|
-
const textureUnit = this .
|
|
184
|
+
const textureUnit = this .global
|
|
192
185
|
? (this .textureUnit = this .textureUnit !== undefined
|
|
193
186
|
? this .textureUnit
|
|
194
187
|
: this .browser .popTexture2DUnit ())
|