x_ite 8.0.0 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/pages-deploy.yml +64 -0
- package/.gitmodules +3 -0
- package/.vscode/settings.json +3 -2
- package/Makefile +9 -4
- package/README.md +6 -6
- package/build/bin/version.pl +3 -11
- package/dist/LICENSE.md +0 -2
- package/dist/assets/components/Annotation.js +55 -28
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +55 -28
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +197 -38
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +50 -26
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +61 -28
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +96 -48
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +186 -193
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +92 -53
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +35 -17
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +77 -45
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +209 -96
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +125 -62
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +105 -70
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/ProjectiveTextureMapping.js +69 -46
- package/dist/assets/components/ProjectiveTextureMapping.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +125 -63
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +56 -38
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +16857 -0
- package/dist/assets/components/Text.min.js +1 -0
- package/dist/assets/components/Texturing3D.js +114 -77
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +126 -60
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +21 -12
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +17800 -31195
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/Gemfile +11 -33
- package/docs/Gemfile.lock +53 -59
- package/docs/LICENSE +21 -0
- package/docs/README.md +46 -0
- package/docs/_config.yml +320 -127
- package/docs/_data/assets/cross_origin.yml +62 -0
- package/docs/_data/assets/self_host.yml +51 -0
- package/docs/_data/contact.yml +30 -0
- package/docs/_data/locales/bg-BG.yml +83 -0
- package/docs/_data/locales/de-DE.yml +82 -0
- package/docs/_data/locales/en.yml +93 -0
- package/docs/_data/locales/es-ES.yml +79 -0
- package/docs/_data/locales/fr-FR.yml +79 -0
- package/docs/_data/locales/hu-HU.yml +81 -0
- package/docs/_data/locales/id-ID.yml +79 -0
- package/docs/_data/locales/ko-KR.yml +86 -0
- package/docs/_data/locales/my-MM.yml +79 -0
- package/docs/_data/locales/pt-BR.yml +79 -0
- package/docs/_data/locales/ru-RU.yml +79 -0
- package/docs/_data/locales/tr-TR.yml +79 -0
- package/docs/_data/locales/uk-UA.yml +79 -0
- package/docs/_data/locales/vi-VN.yml +77 -0
- package/docs/_data/locales/zh-CN.yml +85 -0
- package/docs/_data/share.yml +27 -0
- package/docs/_includes/nav.html +19 -0
- package/docs/_includes/scripts.html +15 -0
- package/docs/_layouts/compress.html +11 -0
- package/docs/_layouts/redirect-page.html +6 -0
- package/docs/_layouts/wide.html +52 -0
- package/docs/_layouts/wrap.html +4 -0
- package/docs/_layouts/x_ite.html +8 -0
- package/docs/_plugins/no_date.rb +11 -0
- package/docs/_plugins/posts-lastmod-hook.rb +14 -0
- package/docs/{Accessing-the-External-Browser.md → _posts/accessing-the-external-browser.md} +26 -25
- package/docs/_posts/browser-support.md +53 -0
- package/docs/{Custom-Shaders.md → _posts/custom-shaders.md} +18 -14
- package/docs/{DOM-Integration.md → _posts/dom-integration.md} +29 -22
- package/docs/{Features.md → _posts/features.md} +11 -12
- package/docs/{index.md → _posts/getting-started.md} +203 -245
- package/docs/{Glossary.md → _posts/glossary.md} +5 -6
- package/docs/{How-To-Configure-Your-Web-Server.md → _posts/how-to-configure-your-web-server.md} +5 -6
- package/docs/{reference/Browser-Services.md → _posts/reference/browser-services.md} +8 -9
- package/docs/{reference/Constants-Services.md → _posts/reference/constants-services.md} +14 -15
- package/docs/{reference/ECMAScript-Object-and-Function-Definitions.md → _posts/reference/ecmascript-object-and-function-definitions.md} +14 -15
- package/docs/_posts/reference/field-services-and-objects.md +1127 -0
- package/docs/{reference/Prototype-Services.md → _posts/reference/prototype-services.md} +8 -14
- package/docs/{reference/Route-Services.md → _posts/reference/route-services.md} +6 -10
- package/docs/{reference/Scene-Services.md → _posts/reference/scene-services.md} +11 -21
- package/docs/{reference/Script-Node-Authoring-Interface.md → _posts/reference/script-node-authoring-interface.md} +10 -11
- package/docs/_posts/report-a-bug.md +15 -0
- package/docs/_posts/setup-a-localhost-server.md +42 -0
- package/docs/_posts/supported-nodes.md +377 -0
- package/docs/{tutorials/Adding-backgrounds.md → _posts/tutorials/adding-backgrounds.md} +13 -14
- package/docs/{tutorials/Adding-fog.md → _posts/tutorials/adding-fog.md} +6 -7
- package/docs/{tutorials/Adding-sound.md → _posts/tutorials/adding-sound.md} +27 -26
- package/docs/{tutorials/Animating-transforms.md → _posts/tutorials/animating-transforms.md} +36 -37
- package/docs/{tutorials/Basic-Nodes.md → _posts/tutorials/basic-nodes.md} +38 -49
- package/docs/{tutorials/Building-a-X3D-world.md → _posts/tutorials/building-a-x3d-world.md} +16 -16
- package/docs/{tutorials/Building-elevation-grids.md → _posts/tutorials/building-elevation-grids.md} +15 -14
- package/docs/{tutorials/Building-extruded-shapes.md → _posts/tutorials/building-extruded-shapes.md} +11 -12
- package/docs/{tutorials/Building-primitive-shapes.md → _posts/tutorials/building-primitive-shapes.md} +29 -28
- package/docs/{tutorials/Building-shapes-out-of-points,-lines,-and-faces.md → _posts/tutorials/building-shapes-out-of-points-lines-and-faces.md} +25 -27
- package/docs/{tutorials/Controlling-appearance-with-materials.md → _posts/tutorials/controlling-appearance-with-materials.md} +20 -19
- package/docs/{tutorials/Controlling-color-on-coordinate-based-geometry.md → _posts/tutorials/controlling-color-on-coordinate-based-geometry.md} +15 -16
- package/docs/{tutorials/Controlling-detail.md → _posts/tutorials/controlling-detail.md} +12 -11
- package/docs/{tutorials/Controlling-how-textures-are-mapped.md → _posts/tutorials/controlling-how-textures-are-mapped.md} +11 -12
- package/docs/{tutorials/Controlling-navigation.md → _posts/tutorials/controlling-navigation.md} +7 -8
- package/docs/{tutorials/Controlling-shading-on-coordinate-based-geometry.md → _posts/tutorials/controlling-shading-on-coordinate-based-geometry.md} +19 -20
- package/docs/{tutorials/Controlling-the-viewpoint.md → _posts/tutorials/controlling-the-viewpoint.md} +7 -8
- package/docs/{tutorials/Creating-new-node-types.md → _posts/tutorials/creating-new-node-types.md} +8 -9
- package/docs/{tutorials/Grouping-nodes.md → _posts/tutorials/grouping-nodes.md} +17 -18
- package/docs/{tutorials/Hello,-World!.md → _posts/tutorials/hello-world.md} +16 -28
- package/docs/{tutorials/Improving-Performance.md → _posts/tutorials/improving-performance.md} +7 -11
- package/docs/{tutorials/Increasing-Rendering-Speed.md → _posts/tutorials/increasing-rendering-speed.md} +5 -6
- package/docs/{tutorials/Introducing-animation.md → _posts/tutorials/introducing-animation.md} +14 -15
- package/docs/{tutorials/Introducing-script-use.md → _posts/tutorials/introducing-script-use.md} +7 -8
- package/docs/{tutorials/Introducing-X3D.md → _posts/tutorials/introducing-x3d.md} +7 -7
- package/docs/{tutorials/Lighting-your-world.md → _posts/tutorials/lighting-your-world.md} +8 -9
- package/docs/{tutorials/Mapping-textures.md → _posts/tutorials/mapping-textures.md} +11 -12
- package/docs/{tutorials/Naming-nodes.md → _posts/tutorials/naming-nodes.md} +9 -8
- package/docs/_posts/tutorials/overview.md +83 -0
- package/docs/{tutorials/Providing-information-about-your-world.md → _posts/tutorials/providing-information-about-your-world.md} +6 -7
- package/docs/{tutorials/Sensing-the-viewer.md → _posts/tutorials/sensing-the-viewer.md} +19 -20
- package/docs/{tutorials/Sensing-viewer-actions.md → _posts/tutorials/sensing-viewer-actions.md} +14 -15
- package/docs/{tutorials/Transforming-Shapes.md → _posts/tutorials/transforming-shapes.md} +8 -9
- package/docs/{tutorials/Writing-program-scripts-with-ECMAScript.md → _posts/tutorials/writing-program-scripts-with-ecmascript.md} +15 -15
- package/docs/{What's-New.md → _posts/what's-new.md} +152 -530
- package/docs/_tabs/imprint.md +52 -0
- package/docs/_tabs/laboratory.md +14 -0
- package/docs/_tabs/playground.html +246 -0
- package/docs/_tabs/reference.md +7 -0
- package/docs/_tabs/tags.md +5 -0
- package/docs/_tabs/tutorials.md +7 -0
- package/docs/assets/css/style.scss +194 -0
- 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 +71 -0
- package/docs/assets/{images → img}/logo.png +0 -0
- package/docs/assets/js/example.js +34 -0
- package/docs/laboratory/3d-l-system-generator.html +169 -0
- package/docs/laboratory/online-dicom-and-nrrd-file-viewer.html +72 -0
- package/docs/laboratory/real-time-earth-quake-information.html +50 -0
- package/docs/laboratory/x3d-visual-blend-mode-editor.html +227 -0
- package/package.json +4 -4
- package/src/LICENSE.txt +1 -1
- package/src/assets/components/Annotation.js +1 -1
- package/src/assets/components/CADGeometry.js +1 -1
- package/src/assets/components/CubeMapTexturing.js +1 -1
- package/src/assets/components/DIS.js +1 -1
- package/src/assets/components/EventUtilities.js +1 -1
- package/src/assets/components/Geometry2D.js +1 -1
- package/src/assets/components/Geospatial.js +1 -1
- package/src/assets/components/HAnim.js +1 -1
- package/src/assets/components/KeyDeviceSensor.js +1 -1
- package/src/assets/components/Layout.js +1 -1
- package/src/assets/components/NURBS.js +1 -1
- package/src/assets/components/ParticleSystems.js +1 -1
- package/src/assets/components/Picking.js +1 -1
- package/src/assets/components/ProjectiveTextureMapping.js +6 -6
- package/src/assets/components/RigidBodyPhysics.js +1 -6
- package/src/assets/components/Scripting.js +1 -1
- package/src/{x_ite/Components → assets/components}/Text.js +19 -21
- package/src/assets/components/Texturing3D.js +1 -1
- package/src/assets/components/VolumeRendering.js +1 -1
- package/src/assets/components/X_ITE.js +1 -1
- package/src/assets/shaders/Types.glsl.js +1 -1
- package/src/assets/shaders/webgl1/include/Fragment.glsl.js +1 -1
- package/src/assets/shaders/webgl1/include/PointSize.glsl.js +6 -6
- package/src/assets/shaders/webgl1/include/Vertex.glsl.js +4 -4
- package/src/assets/shaders/webgl2/LineTransform.vs.js +11 -11
- package/src/assets/shaders/webgl2/include/Fragment.glsl.js +1 -1
- package/src/assets/shaders/webgl2/include/PointSize.glsl.js +6 -6
- package/src/assets/shaders/webgl2/include/Vertex.glsl.js +4 -4
- package/src/bookmarks.js +1 -1
- package/src/examples.js +3 -3
- package/src/lib/ammojs/AmmoClass.js +1 -1
- package/src/lib/jquery.js +1 -1
- package/src/locale/gettext.js +1 -1
- package/src/shim.js +1 -2
- package/src/standard/Geospatial/Geodetic.js +1 -1
- package/src/standard/Geospatial/ReferenceEllipsoids.js +3 -3
- package/src/standard/Geospatial/UniversalTransverseMercator.js +1 -1
- package/src/standard/Math/Algorithm.js +55 -45
- package/src/standard/Math/Algorithms/Bezier.js +1 -1
- package/src/standard/Math/Algorithms/MergeSort.js +1 -1
- package/src/standard/Math/Algorithms/PartialSort.js +1 -1
- package/src/standard/Math/Algorithms/QuickSort.js +1 -1
- package/src/standard/Math/Algorithms/SAT.js +2 -2
- package/src/standard/Math/Algorithms/eigen_decomposition.js +5 -3
- package/src/standard/Math/Geometry/Box2.js +1 -1
- package/src/standard/Math/Geometry/Box3.js +1 -1
- package/src/standard/Math/Geometry/Camera.js +4 -2
- package/src/standard/Math/Geometry/Cylinder3.js +1 -1
- package/src/standard/Math/Geometry/Line2.js +1 -1
- package/src/standard/Math/Geometry/Line3.js +1 -1
- package/src/standard/Math/Geometry/Plane3.js +1 -1
- package/src/standard/Math/Geometry/Sphere3.js +1 -1
- package/src/standard/Math/Geometry/Spheroid3.js +1 -1
- package/src/standard/Math/Geometry/Triangle2.js +4 -2
- package/src/standard/Math/Geometry/Triangle3.js +4 -2
- package/src/standard/Math/Geometry/ViewVolume.js +1 -1
- package/src/standard/Math/Numbers/Color3.js +3 -1
- package/src/standard/Math/Numbers/Color4.js +4 -1
- package/src/standard/Math/Numbers/Complex.js +1 -1
- package/src/standard/Math/Numbers/Matrix2.js +1 -1
- package/src/standard/Math/Numbers/Matrix3.js +1 -1
- package/src/standard/Math/Numbers/Matrix4.js +1 -1
- package/src/standard/Math/Numbers/Quaternion.js +1 -1
- package/src/standard/Math/Numbers/Rotation4.js +1 -1
- package/src/standard/Math/Numbers/Vector2.js +1 -1
- package/src/standard/Math/Numbers/Vector3.js +1 -1
- package/src/standard/Math/Numbers/Vector4.js +1 -1
- package/src/standard/Math/Utility/BVH.js +1 -1
- package/src/standard/Math/Utility/MatrixStack.js +1 -1
- package/src/standard/Networking/BinaryTransport.js +5 -3
- package/src/standard/Time/MicroTime.js +1 -1
- package/src/standard/Utility/BitSet.js +1 -1
- package/src/standard/Utility/DataStorage.js +1 -1
- package/src/standard/Utility/MapUtilities.js +1 -1
- package/src/standard/Utility/ObjectCache.js +5 -3
- package/src/standard/Utility/Shuffle.js +5 -3
- package/src/tests.js +3 -0
- package/src/x_ite/Base/Events.js +4 -2
- package/src/x_ite/Base/FieldArray.js +1 -1
- package/src/x_ite/Base/FieldDefinitionArray.js +1 -1
- package/src/x_ite/Base/X3DArrayField.js +8 -4
- package/src/x_ite/Base/X3DBaseNode.js +1 -1
- package/src/x_ite/Base/X3DCast.js +5 -3
- package/src/x_ite/Base/X3DChildObject.js +1 -1
- package/src/x_ite/Base/X3DConstants.js +1 -1
- package/src/x_ite/Base/X3DEventObject.js +1 -1
- package/src/x_ite/Base/X3DField.js +2 -13
- package/src/x_ite/Base/X3DFieldDefinition.js +1 -1
- package/src/x_ite/Base/X3DInfoArray.js +1 -1
- package/src/x_ite/Base/X3DObject.js +1 -1
- package/src/x_ite/Base/X3DObjectArrayField.js +1 -1
- package/src/x_ite/Base/X3DTypedArrayField.js +59 -33
- package/src/x_ite/Browser/Core/BrowserOptions.js +22 -30
- package/src/x_ite/Browser/Core/BrowserProperties.js +1 -1
- package/src/x_ite/Browser/Core/BrowserTimings.js +1 -1
- package/src/x_ite/Browser/Core/Context.js +1 -1
- package/src/x_ite/Browser/Core/ContextMenu.js +1 -1
- package/src/x_ite/Browser/Core/Notification.js +1 -1
- package/src/x_ite/Browser/Core/PrimitiveQuality.js +1 -1
- package/src/x_ite/Browser/Core/RenderingProperties.js +1 -1
- package/src/x_ite/Browser/Core/Shading.js +1 -1
- package/src/x_ite/Browser/Core/TextureQuality.js +1 -1
- package/src/x_ite/Browser/Core/X3DCoreContext.js +11 -8
- package/src/x_ite/Browser/DOMIntegration.js +25 -26
- package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +1 -1
- package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +5 -3
- package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +5 -3
- package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +1 -1
- package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +1 -1
- package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +1 -1
- package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +1 -1
- package/src/x_ite/Browser/Geometry2D/Rectangle2DOptions.js +1 -1
- package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +1 -1
- package/src/x_ite/Browser/Geometry3D/BoxOptions.js +1 -1
- package/src/x_ite/Browser/Geometry3D/ConeOptions.js +1 -1
- package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +1 -1
- package/src/x_ite/Browser/Geometry3D/IcoSphere.js +1 -1
- package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +1 -1
- package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +1 -1
- package/src/x_ite/Browser/Geometry3D/X3DGeometry3DContext.js +1 -1
- package/src/x_ite/Browser/Geospatial/Geocentric.js +1 -2
- package/src/x_ite/Browser/Geospatial/Geospatial.js +1 -1
- package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +1 -1
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator.js +1 -1
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1.js +1 -1
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator2.js +4 -2
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator3.js +4 -2
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +5 -3
- package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +1 -1
- package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +1 -1
- package/src/x_ite/Browser/Layering/X3DLayeringContext.js +1 -1
- package/src/x_ite/Browser/Layout/ScreenText.js +1 -1
- package/src/x_ite/Browser/Layout/X3DLayoutContext.js +1 -1
- package/src/x_ite/Browser/Legacy.js +64 -0
- package/src/x_ite/Browser/Lighting/X3DLightingContext.js +1 -1
- package/src/x_ite/Browser/NURBS/NURBS.js +1 -1
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +6 -39
- package/src/x_ite/Browser/Navigation/FlyViewer.js +1 -1
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +1 -1
- package/src/x_ite/Browser/Navigation/NoneViewer.js +1 -1
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +1 -4
- package/src/x_ite/Browser/Navigation/WalkViewer.js +1 -1
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +1 -1
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +3 -2
- package/src/x_ite/Browser/Navigation/X3DViewer.js +3 -3
- package/src/x_ite/Browser/Networking/Features.js +52 -0
- package/src/x_ite/Browser/Networking/URLs.js +11 -12
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +9 -22
- package/src/x_ite/Browser/ParticleSystems/GeometryTypes.js +1 -1
- package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +1 -1
- package/src/x_ite/Browser/Picking/IntersectionType.js +1 -1
- package/src/x_ite/Browser/Picking/MatchCriterion.js +1 -1
- package/src/x_ite/Browser/Picking/SortOrder.js +1 -1
- package/src/x_ite/Browser/Picking/VolumePicker.js +2 -4
- package/src/x_ite/Browser/Picking/X3DPickingContext.js +1 -1
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +1 -1
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer.js +1 -1
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +1 -1
- package/src/x_ite/Browser/Rendering/GeometryContext.js +1 -1
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +1 -1
- package/src/x_ite/Browser/RigidBodyPhysics/AppliedParametersType.js +1 -1
- package/src/x_ite/Browser/Scripting/X3DScriptingContext.js +1 -1
- package/src/x_ite/Browser/Scripting/evaluate.js +5 -3
- package/src/x_ite/Browser/Shaders/ShaderCompiler.js +1 -1
- package/src/x_ite/Browser/Shaders/ShaderSource.js +5 -5
- package/src/x_ite/Browser/Shaders/Shaders.js +1 -1
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +1 -1
- package/src/x_ite/Browser/Shape/AlphaMode.js +1 -1
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +4 -4
- package/src/x_ite/Browser/Sound/X3DSoundContext.js +1 -1
- package/src/x_ite/Browser/Text/PolygonText.js +1 -1
- package/src/x_ite/Browser/Text/TextAlignment.js +1 -1
- package/src/x_ite/Browser/Text/X3DTextContext.js +1 -1
- package/src/x_ite/Browser/Text/X3DTextGeometry.js +1 -1
- package/src/x_ite/Browser/Texturing/FunctionType.js +1 -1
- package/src/x_ite/Browser/Texturing/ModeType.js +1 -1
- package/src/x_ite/Browser/Texturing/SourceType.js +1 -1
- package/src/x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType.js +1 -1
- package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +1 -1
- package/src/x_ite/Browser/Texturing3D/DICOMParser.js +3 -3
- package/src/x_ite/Browser/Texturing3D/NRRDParser.js +2 -2
- package/src/x_ite/Browser/Time/X3DTimeContext.js +1 -1
- package/src/x_ite/Browser/VERSION.js +2 -2
- package/src/x_ite/Browser/VolumeRendering/VolumeMaterial.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +43 -52
- package/src/x_ite/Browser/X3DBrowserContext.js +1 -5
- package/src/x_ite/Components/Annotation/AnnotationLayer.js +1 -1
- package/src/x_ite/Components/Annotation/AnnotationTarget.js +1 -1
- package/src/x_ite/Components/Annotation/GroupAnnotation.js +1 -1
- package/src/x_ite/Components/Annotation/IconAnnotation.js +1 -1
- package/src/x_ite/Components/Annotation/TextAnnotation.js +1 -1
- package/src/x_ite/Components/Annotation/URLAnnotation.js +1 -1
- package/src/x_ite/Components/Annotation/X3DAnnotationNode.js +1 -1
- package/src/x_ite/Components/CADGeometry/CADAssembly.js +1 -1
- package/src/x_ite/Components/CADGeometry/CADFace.js +1 -1
- package/src/x_ite/Components/CADGeometry/CADLayer.js +1 -1
- package/src/x_ite/Components/CADGeometry/CADPart.js +1 -1
- package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +1 -1
- package/src/x_ite/Components/CADGeometry/QuadSet.js +1 -1
- package/src/x_ite/Components/CADGeometry/X3DProductStructureChildNode.js +1 -1
- package/src/x_ite/Components/Core/MetadataBoolean.js +1 -1
- package/src/x_ite/Components/Core/MetadataDouble.js +1 -1
- package/src/x_ite/Components/Core/MetadataFloat.js +1 -1
- package/src/x_ite/Components/Core/MetadataInteger.js +1 -1
- package/src/x_ite/Components/Core/MetadataSet.js +1 -1
- package/src/x_ite/Components/Core/MetadataString.js +1 -1
- package/src/x_ite/Components/Core/WorldInfo.js +1 -1
- package/src/x_ite/Components/Core/X3DBindableNode.js +1 -1
- package/src/x_ite/Components/Core/X3DChildNode.js +1 -1
- package/src/x_ite/Components/Core/X3DInfoNode.js +1 -1
- package/src/x_ite/Components/Core/X3DMetadataObject.js +1 -1
- package/src/x_ite/Components/Core/X3DNode.js +5 -5
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +2 -2
- package/src/x_ite/Components/Core/X3DSensorNode.js +1 -1
- package/src/x_ite/Components/Core.js +1 -1
- package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +1 -1
- package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +1 -1
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +1 -1
- package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +1 -1
- package/src/x_ite/Components/DIS/DISEntityManager.js +1 -1
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +1 -1
- package/src/x_ite/Components/DIS/EspduTransform.js +1 -1
- package/src/x_ite/Components/DIS/ReceiverPdu.js +1 -1
- package/src/x_ite/Components/DIS/SignalPdu.js +1 -1
- package/src/x_ite/Components/DIS/TransmitterPdu.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects/Background.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects/Fog.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +6 -12
- package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +1 -1
- package/src/x_ite/Components/EnvironmentalEffects.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +1 -1
- package/src/x_ite/Components/EnvironmentalSensor.js +1 -1
- package/src/x_ite/Components/EventUtilities/BooleanFilter.js +1 -1
- package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +1 -1
- package/src/x_ite/Components/EventUtilities/BooleanToggle.js +1 -1
- package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +1 -1
- package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +1 -1
- package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +1 -1
- package/src/x_ite/Components/EventUtilities/TimeTrigger.js +1 -1
- package/src/x_ite/Components/EventUtilities/X3DSequencerNode.js +1 -1
- package/src/x_ite/Components/EventUtilities/X3DTriggerNode.js +1 -1
- package/src/x_ite/Components/Followers/ColorChaser.js +1 -1
- package/src/x_ite/Components/Followers/ColorDamper.js +1 -1
- package/src/x_ite/Components/Followers/CoordinateChaser.js +1 -1
- package/src/x_ite/Components/Followers/CoordinateDamper.js +1 -1
- package/src/x_ite/Components/Followers/OrientationChaser.js +1 -1
- package/src/x_ite/Components/Followers/OrientationDamper.js +1 -1
- package/src/x_ite/Components/Followers/PositionChaser.js +1 -1
- package/src/x_ite/Components/Followers/PositionChaser2D.js +1 -1
- package/src/x_ite/Components/Followers/PositionDamper.js +1 -1
- package/src/x_ite/Components/Followers/PositionDamper2D.js +1 -1
- package/src/x_ite/Components/Followers/ScalarChaser.js +1 -1
- package/src/x_ite/Components/Followers/ScalarDamper.js +1 -1
- package/src/x_ite/Components/Followers/TexCoordChaser2D.js +1 -1
- package/src/x_ite/Components/Followers/TexCoordDamper2D.js +1 -1
- package/src/x_ite/Components/Followers/X3DChaserNode.js +1 -1
- package/src/x_ite/Components/Followers/X3DDamperNode.js +1 -1
- package/src/x_ite/Components/Followers/X3DFollowerNode.js +1 -1
- package/src/x_ite/Components/Followers.js +1 -1
- package/src/x_ite/Components/Geometry2D/Arc2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/ArcClose2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/Circle2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/Disk2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/Polyline2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/Polypoint2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/Rectangle2D.js +1 -1
- package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +1 -1
- package/src/x_ite/Components/Geometry3D/Box.js +1 -1
- package/src/x_ite/Components/Geometry3D/Cone.js +3 -3
- package/src/x_ite/Components/Geometry3D/Cylinder.js +4 -4
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +1 -1
- package/src/x_ite/Components/Geometry3D/Extrusion.js +1 -1
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +1 -1
- package/src/x_ite/Components/Geometry3D/Sphere.js +1 -1
- package/src/x_ite/Components/Geometry3D.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoCoordinate.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoLOD.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoLocation.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoMetadata.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoOrigin.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +17 -13
- package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoTransform.js +1 -1
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +39 -106
- package/src/x_ite/Components/Geospatial/X3DGeospatialObject.js +1 -1
- package/src/x_ite/Components/Grouping/Group.js +1 -1
- package/src/x_ite/Components/Grouping/StaticGroup.js +1 -1
- package/src/x_ite/Components/Grouping/Switch.js +1 -1
- package/src/x_ite/Components/Grouping/Transform.js +1 -1
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +1 -1
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +1 -1
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +1 -1
- package/src/x_ite/Components/Grouping/X3DTransformNode.js +1 -1
- package/src/x_ite/Components/Grouping.js +1 -1
- package/src/x_ite/Components/HAnim/HAnimDisplacer.js +2 -1
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +32 -23
- package/src/x_ite/Components/HAnim/HAnimJoint.js +2 -1
- package/src/x_ite/Components/HAnim/HAnimMotion.js +3 -1
- package/src/x_ite/Components/HAnim/HAnimSegment.js +2 -1
- package/src/x_ite/Components/HAnim/HAnimSite.js +2 -1
- package/src/x_ite/Components/Interpolation/ColorInterpolator.js +2 -2
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +1 -1
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +1 -1
- package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +1 -1
- package/src/x_ite/Components/Interpolation/NormalInterpolator.js +1 -1
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +1 -1
- package/src/x_ite/Components/Interpolation/PositionInterpolator.js +1 -1
- package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +1 -1
- package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +1 -1
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +1 -1
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +1 -1
- package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +1 -1
- package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +1 -1
- package/src/x_ite/Components/Interpolation/X3DInterpolatorNode.js +1 -1
- package/src/x_ite/Components/Interpolation.js +1 -1
- package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +1 -1
- package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +1 -1
- package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +1 -1
- package/src/x_ite/Components/Layering/Layer.js +4 -2
- package/src/x_ite/Components/Layering/LayerSet.js +1 -1
- package/src/x_ite/Components/Layering/Viewport.js +4 -4
- package/src/x_ite/Components/Layering/X3DLayerNode.js +66 -49
- package/src/x_ite/Components/Layering/X3DViewportNode.js +1 -1
- package/src/x_ite/Components/Layering.js +1 -1
- package/src/x_ite/Components/Layout/Layout.js +1 -1
- package/src/x_ite/Components/Layout/LayoutGroup.js +1 -1
- package/src/x_ite/Components/Layout/LayoutLayer.js +4 -2
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +1 -1
- package/src/x_ite/Components/Layout/ScreenGroup.js +1 -1
- package/src/x_ite/Components/Layout/X3DLayoutNode.js +1 -1
- package/src/x_ite/Components/Lighting/DirectionalLight.js +9 -5
- package/src/x_ite/Components/Lighting/EnvironmentLight.js +143 -0
- package/src/x_ite/Components/Lighting/PointLight.js +9 -5
- package/src/x_ite/Components/Lighting/SpotLight.js +9 -5
- package/src/x_ite/Components/Lighting/X3DLightNode.js +1 -1
- package/src/x_ite/Components/Lighting.js +3 -1
- package/src/x_ite/Components/NURBS/Contour2D.js +1 -1
- package/src/x_ite/Components/NURBS/ContourPolyline2D.js +1 -1
- package/src/x_ite/Components/NURBS/CoordinateDouble.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsCurve.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsCurve2D.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsSet.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +1 -1
- package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +1 -1
- package/src/x_ite/Components/NURBS/X3DNurbsControlCurveNode.js +1 -1
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +1 -1
- package/src/x_ite/Components/NURBS/X3DParametricGeometryNode.js +1 -1
- package/src/x_ite/Components/Navigation/Billboard.js +1 -1
- package/src/x_ite/Components/Navigation/Collision.js +1 -1
- package/src/x_ite/Components/Navigation/LOD.js +1 -1
- package/src/x_ite/Components/Navigation/NavigationInfo.js +2 -1
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +100 -68
- package/src/x_ite/Components/Navigation/Viewpoint.js +16 -16
- package/src/x_ite/Components/Navigation/ViewpointGroup.js +1 -1
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +219 -111
- package/src/x_ite/Components/Navigation.js +1 -1
- package/src/x_ite/Components/Networking/Anchor.js +1 -1
- package/src/x_ite/Components/Networking/Inline.js +99 -14
- package/src/x_ite/Components/Networking/LoadSensor.js +9 -9
- package/src/x_ite/Components/Networking/X3DNetworkSensorNode.js +1 -1
- package/src/x_ite/Components/Networking/X3DUrlObject.js +3 -3
- package/src/x_ite/Components/Networking.js +1 -1
- package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +1 -1
- package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +1 -1
- package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +1 -1
- package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +1 -1
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +1 -1
- package/src/x_ite/Components/ParticleSystems/PointEmitter.js +1 -1
- package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +1 -1
- package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +1 -1
- package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +1 -1
- package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +1 -1
- package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +1 -1
- package/src/x_ite/Components/ParticleSystems/X3DParticlePhysicsModelNode.js +1 -1
- package/src/x_ite/Components/Picking/LinePickSensor.js +1 -1
- package/src/x_ite/Components/Picking/PickableGroup.js +1 -1
- package/src/x_ite/Components/Picking/PointPickSensor.js +2 -4
- package/src/x_ite/Components/Picking/PrimitivePickSensor.js +1 -1
- package/src/x_ite/Components/Picking/VolumePickSensor.js +1 -1
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +1 -1
- package/src/x_ite/Components/Picking/X3DPickableObject.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/X3DDragSensorNode.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +1 -1
- package/src/x_ite/Components/PointingDeviceSensor.js +1 -1
- package/src/x_ite/Components/ProjectiveTextureMapping/{TextureProjectorPerspective.js → TextureProjector.js} +17 -13
- package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorParallel.js +17 -13
- package/src/x_ite/Components/ProjectiveTextureMapping/X3DTextureProjectorNode.js +1 -1
- package/src/x_ite/Components/Rendering/ClipPlane.js +1 -1
- package/src/x_ite/Components/Rendering/Color.js +1 -1
- package/src/x_ite/Components/Rendering/ColorRGBA.js +1 -1
- package/src/x_ite/Components/Rendering/Coordinate.js +1 -1
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +6 -1
- package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +1 -1
- package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +1 -1
- package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +1 -1
- package/src/x_ite/Components/Rendering/LineSet.js +6 -1
- package/src/x_ite/Components/Rendering/Normal.js +31 -1
- package/src/x_ite/Components/Rendering/PointSet.js +6 -1
- package/src/x_ite/Components/Rendering/TriangleFanSet.js +1 -1
- package/src/x_ite/Components/Rendering/TriangleSet.js +1 -1
- package/src/x_ite/Components/Rendering/TriangleStripSet.js +1 -1
- package/src/x_ite/Components/Rendering/X3DColorNode.js +1 -1
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +1 -1
- package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +1 -1
- package/src/x_ite/Components/Rendering/X3DGeometricPropertyNode.js +1 -1
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +40 -35
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +24 -6
- package/src/x_ite/Components/Rendering/X3DNormalNode.js +1 -1
- package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +7 -1
- package/src/x_ite/Components/Rendering.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/Contact.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +3 -2
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +1 -1
- package/src/x_ite/Components/Scripting/Script.js +2 -1
- package/src/x_ite/Components/Scripting/X3DScriptNode.js +1 -1
- package/src/x_ite/Components/Shaders/ComposedShader.js +1 -1
- package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +1 -1
- package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +1 -1
- package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +1 -1
- package/src/x_ite/Components/Shaders/PackagedShader.js +2 -1
- package/src/x_ite/Components/Shaders/ProgramShader.js +1 -1
- package/src/x_ite/Components/Shaders/ShaderPart.js +2 -1
- package/src/x_ite/Components/Shaders/ShaderProgram.js +2 -1
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +13 -10
- package/src/x_ite/Components/Shaders/X3DShaderNode.js +1 -1
- package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +1 -1
- package/src/x_ite/Components/Shaders.js +1 -1
- package/src/x_ite/Components/Shape/AcousticProperties.js +1 -1
- package/src/x_ite/Components/Shape/Appearance.js +2 -2
- package/src/x_ite/Components/Shape/FillProperties.js +4 -1
- package/src/x_ite/Components/Shape/LineProperties.js +4 -1
- package/src/x_ite/Components/Shape/Material.js +24 -16
- package/src/x_ite/Components/Shape/PhysicalMaterial.js +1 -1
- package/src/x_ite/Components/Shape/PointProperties.js +14 -20
- package/src/x_ite/Components/Shape/Shape.js +1 -1
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +1 -1
- package/src/x_ite/Components/Shape/UnlitMaterial.js +1 -1
- package/src/x_ite/Components/Shape/X3DAppearanceChildNode.js +1 -1
- package/src/x_ite/Components/Shape/X3DAppearanceNode.js +1 -1
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +1 -1
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +2 -2
- package/src/x_ite/Components/Shape/X3DShapeNode.js +1 -1
- package/src/x_ite/Components/Shape.js +1 -1
- package/src/x_ite/Components/Sound/Analyser.js +105 -0
- package/src/x_ite/Components/Sound/AudioClip.js +1 -1
- package/src/x_ite/Components/Sound/AudioDestination.js +94 -0
- package/src/x_ite/Components/Sound/BiquadFilter.js +104 -0
- package/src/x_ite/Components/Sound/BufferAudioSource.js +127 -0
- package/src/x_ite/Components/Sound/ChannelMerger.js +91 -0
- package/src/x_ite/Components/Sound/ChannelSelector.js +92 -0
- package/src/x_ite/Components/Sound/ChannelSplitter.js +92 -0
- package/src/x_ite/Components/Sound/Convolver.js +102 -0
- package/src/x_ite/Components/Sound/Delay.js +102 -0
- package/src/x_ite/Components/Sound/DynamicsCompressor.js +106 -0
- package/src/x_ite/Components/Sound/Gain.js +100 -0
- package/src/x_ite/Components/Sound/ListenerPointSource.js +102 -0
- package/src/x_ite/Components/Sound/MicrophoneSource.js +96 -0
- package/src/x_ite/Components/Sound/OscillatorSource.js +98 -0
- package/src/x_ite/Components/Sound/PeriodicWave.js +86 -0
- package/src/x_ite/Components/Sound/Sound.js +16 -13
- package/src/x_ite/Components/Sound/SpatialSound.js +103 -0
- package/src/x_ite/Components/Sound/StreamAudioDestination.js +94 -0
- package/src/x_ite/Components/Sound/StreamAudioSource.js +96 -0
- package/src/x_ite/Components/Sound/WaveShaper.js +102 -0
- package/src/x_ite/Components/Sound/X3DSoundChannelNode.js +63 -0
- package/src/x_ite/Components/Sound/X3DSoundDestinationNode.js +63 -0
- package/src/x_ite/Components/Sound/X3DSoundNode.js +1 -1
- package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +63 -0
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +1 -1
- package/src/x_ite/Components/Sound.js +54 -10
- package/src/x_ite/Components/Text/FontStyle.js +1 -1
- package/src/x_ite/Components/Text/Text.js +1 -1
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +1 -1
- package/src/x_ite/Components/Texturing/ImageTexture.js +1 -1
- package/src/x_ite/Components/Texturing/MovieTexture.js +1 -1
- package/src/x_ite/Components/Texturing/MultiTexture.js +1 -1
- package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +1 -1
- package/src/x_ite/Components/Texturing/MultiTextureTransform.js +1 -1
- package/src/x_ite/Components/Texturing/PixelTexture.js +1 -1
- package/src/x_ite/Components/Texturing/TextureCoordinate.js +1 -1
- package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +1 -1
- package/src/x_ite/Components/Texturing/TextureProperties.js +8 -1
- package/src/x_ite/Components/Texturing/TextureTransform.js +1 -1
- package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +1 -1
- package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +1 -1
- package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +1 -1
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +1 -1
- package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +1 -1
- package/src/x_ite/Components/Texturing/X3DTextureNode.js +1 -1
- package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +1 -1
- package/src/x_ite/Components/Texturing.js +1 -1
- package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +1 -1
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +1 -1
- package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +1 -1
- package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +1 -1
- package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +1 -1
- package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +1 -1
- package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +1 -1
- package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +1 -1
- package/src/x_ite/Components/Time/TimeSensor.js +2 -1
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +1 -1
- package/src/x_ite/Components/Time.js +1 -1
- package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +1 -1
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +1 -1
- package/src/x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode.js +1 -1
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +1 -1
- package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +1 -1
- package/src/x_ite/Components/X_ITE/BlendMode.js +1 -1
- package/src/x_ite/Components.js +6 -28
- package/src/x_ite/Configuration/ComponentInfo.js +10 -7
- package/src/x_ite/Configuration/ComponentInfoArray.js +2 -6
- package/src/x_ite/Configuration/ProfileInfo.js +1 -1
- package/src/x_ite/Configuration/ProfileInfoArray.js +1 -1
- package/src/x_ite/Configuration/SupportedComponents.js +136 -154
- package/src/x_ite/Configuration/SupportedNodes.js +7 -10
- package/src/x_ite/Configuration/SupportedProfiles.js +1 -1
- package/src/x_ite/Configuration/UnitInfo.js +1 -1
- package/src/x_ite/Configuration/UnitInfoArray.js +1 -1
- package/src/x_ite/DEBUG.js +1 -1
- package/src/x_ite/Execution/BindableList.js +1 -1
- package/src/x_ite/Execution/BindableStack.js +12 -12
- package/src/x_ite/Execution/ExportedNodesArray.js +1 -1
- package/src/x_ite/Execution/ImportedNodesArray.js +1 -1
- package/src/x_ite/Execution/NamedNodesArray.js +1 -1
- package/src/x_ite/Execution/Scene.js +13 -13
- package/src/x_ite/Execution/X3DExecutionContext.js +882 -882
- package/src/x_ite/Execution/X3DExportedNode.js +1 -1
- package/src/x_ite/Execution/X3DImportedNode.js +1 -1
- package/src/x_ite/Execution/X3DScene.js +14 -22
- package/src/x_ite/Execution/X3DWorld.js +1 -1
- package/src/x_ite/Fallback.js +1 -6
- package/src/x_ite/Fields/ArrayFields.js +1 -1
- package/src/x_ite/Fields/SFBool.js +1 -1
- package/src/x_ite/Fields/SFColor.js +2 -5
- package/src/x_ite/Fields/SFColorRGBA.js +2 -6
- package/src/x_ite/Fields/SFDouble.js +1 -1
- package/src/x_ite/Fields/SFFloat.js +1 -1
- package/src/x_ite/Fields/SFImage.js +1 -1
- package/src/x_ite/Fields/SFInt32.js +1 -1
- package/src/x_ite/Fields/SFMatrix3.js +16 -11
- package/src/x_ite/Fields/SFMatrix4.js +18 -11
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +15 -4
- package/src/x_ite/Fields/SFNode.js +1 -1
- package/src/x_ite/Fields/SFNodeCache.js +3 -5
- package/src/x_ite/Fields/SFRotation.js +27 -6
- package/src/x_ite/Fields/SFString.js +1 -1
- package/src/x_ite/Fields/SFTime.js +1 -1
- package/src/x_ite/Fields/SFVec2.js +5 -11
- package/src/x_ite/Fields/SFVec3.js +5 -11
- package/src/x_ite/Fields/SFVec4.js +5 -11
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +27 -17
- package/src/x_ite/Fields.js +1 -1
- package/src/x_ite/InputOutput/FileLoader.js +3 -3
- package/src/x_ite/InputOutput/Generator.js +1 -1
- package/src/x_ite/Namespace.js +2 -758
- package/src/x_ite/Parser/GoldenGate.js +1 -1
- package/src/x_ite/Parser/HTMLSupport.js +1 -1
- package/src/x_ite/Parser/JSONParser.js +4 -4
- package/src/x_ite/Parser/VRMLParser.js +15 -1
- package/src/x_ite/Parser/X3DParser.js +1 -1
- package/src/x_ite/Parser/XMLParser.js +1 -1
- package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +1 -1
- package/src/x_ite/Prototype/ProtoDeclarationArray.js +1 -1
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +1 -1
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +1 -1
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +1 -1
- package/src/x_ite/Rendering/DependentRenderer.js +1 -1
- package/src/x_ite/Rendering/TextureBuffer.js +1 -1
- package/src/x_ite/Rendering/TraverseType.js +1 -1
- package/src/x_ite/Rendering/VertexArray.js +2 -2
- package/src/x_ite/Rendering/X3DRenderObject.js +10 -7
- package/src/x_ite/Routing/RouteArray.js +1 -1
- package/src/x_ite/Routing/X3DRoute.js +1 -1
- package/src/x_ite/Routing/X3DRoutingContext.js +1 -1
- package/src/x_ite/X3D.js +25 -37
- package/src/x_ite/X3DCanvas.js +10 -12
- package/src/x_ite.css +20 -0
- package/src/x_ite.html +80 -77
- package/src/x_ite.js +1 -1
- package/webpack.config.js +79 -8
- package/x_ite.min.html +78 -76
- package/build/bin/namespace.mjs +0 -86
- package/docs/404.md +0 -11
- package/docs/Browser-Support.md +0 -53
- package/docs/Supported-Nodes.md +0 -378
- package/docs/_data/navigation.yml +0 -137
- package/docs/assets/css/main.scss +0 -126
- package/docs/reference/Field-Services-and-Objects.md +0 -1110
- package/docs/tutorials/index.md +0 -84
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
39
39
|
*
|
|
40
40
|
* You should have received a copy of the GNU General Public License version 3
|
|
41
|
-
* along with X_ITE. If not, see <
|
|
41
|
+
* along with X_ITE. If not, see <https://www.gnu.org/licenses/gpl.html> for a
|
|
42
42
|
* copy of the GPLv3 License.
|
|
43
43
|
*
|
|
44
44
|
* For Silvio, Joy and Adi.
|
|
@@ -63,939 +63,939 @@ import Generator from "../InputOutput/Generator.js";
|
|
|
63
63
|
import SFNodeCache from "../Fields/SFNodeCache.js";
|
|
64
64
|
import Algorithm from "../../standard/Math/Algorithm.js";
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
66
|
+
SupportedNodes .addAbstractType ("X3DExecutionContext", X3DExecutionContext);
|
|
67
|
+
|
|
68
|
+
const
|
|
69
|
+
_namedNodes = Symbol (),
|
|
70
|
+
_importedNodes = Symbol (),
|
|
71
|
+
_protos = Symbol (),
|
|
72
|
+
_externprotos = Symbol (),
|
|
73
|
+
_routes = Symbol (),
|
|
74
|
+
_outerNode = Symbol ();
|
|
75
|
+
|
|
76
|
+
function X3DExecutionContext (executionContext)
|
|
77
|
+
{
|
|
78
|
+
X3DBaseNode .call (this, executionContext);
|
|
79
|
+
|
|
80
|
+
this .addType (X3DConstants .X3DExecutionContext)
|
|
81
|
+
|
|
82
|
+
this .addChildObjects ("rootNodes", new Fields .MFNode (),
|
|
83
|
+
"worldInfos", new Fields .MFNode (),
|
|
84
|
+
"sceneGraph_changed", new Fields .SFTime ());
|
|
85
|
+
|
|
86
|
+
this ._rootNodes .setAccessType (X3DConstants .initializeOnly);
|
|
87
|
+
this ._rootNodes .addCloneCount (1);
|
|
88
|
+
|
|
89
|
+
this [_namedNodes] = new NamedNodesArray ();
|
|
90
|
+
this [_importedNodes] = new ImportedNodesArray ();
|
|
91
|
+
this [_protos] = new ProtoDeclarationArray ();
|
|
92
|
+
this [_externprotos] = new ExternProtoDeclarationArray ();
|
|
93
|
+
this [_routes] = new RouteArray ();
|
|
94
|
+
|
|
95
|
+
this .addChildObjects ("namedNodes_changed", new Fields .SFTime (),
|
|
96
|
+
"importedNodes_changed", new Fields .SFTime (),
|
|
97
|
+
"protos_changed", new Fields .SFTime (),
|
|
98
|
+
"externprotos_changed", new Fields .SFTime (),
|
|
99
|
+
"routes_changed", new Fields .SFTime ())
|
|
100
|
+
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
104
|
+
{
|
|
105
|
+
constructor: X3DExecutionContext,
|
|
106
|
+
initialize: function ()
|
|
107
|
+
{
|
|
108
|
+
X3DBaseNode .prototype .initialize .call (this);
|
|
109
|
+
|
|
110
|
+
if (! this .isScene ())
|
|
111
|
+
this ._sceneGraph_changed .addInterest ("set_sceneGraph", this)
|
|
112
|
+
},
|
|
113
|
+
set_sceneGraph: function ()
|
|
114
|
+
{
|
|
115
|
+
this .getExecutionContext () ._sceneGraph_changed = this .getBrowser () .getCurrentTime ();
|
|
116
|
+
},
|
|
117
|
+
isScene: function ()
|
|
118
|
+
{
|
|
119
|
+
return false;
|
|
120
|
+
},
|
|
121
|
+
getTypeName: function ()
|
|
122
|
+
{
|
|
123
|
+
return "X3DExecutionContext";
|
|
124
|
+
},
|
|
125
|
+
[_outerNode]: null,
|
|
126
|
+
getOuterNode: function ()
|
|
127
|
+
{
|
|
128
|
+
// Can be either of type X3DProtoDeclaration or X3DPrototypeInstance, or null.
|
|
129
|
+
return this [_outerNode];
|
|
130
|
+
},
|
|
131
|
+
setOuterNode: function (value)
|
|
132
|
+
{
|
|
133
|
+
this [_outerNode] = value;
|
|
134
|
+
},
|
|
135
|
+
getSpecificationVersion: function ()
|
|
136
|
+
{
|
|
137
|
+
return this .getExecutionContext () .getSpecificationVersion ();
|
|
138
|
+
},
|
|
139
|
+
getEncoding: function ()
|
|
140
|
+
{
|
|
141
|
+
return this .getExecutionContext () .getEncoding ();
|
|
142
|
+
},
|
|
143
|
+
getWorldURL: function ()
|
|
144
|
+
{
|
|
145
|
+
return this .getExecutionContext () .getWorldURL ();
|
|
146
|
+
},
|
|
147
|
+
getProfile: function ()
|
|
148
|
+
{
|
|
149
|
+
return this .getExecutionContext () .getProfile ();
|
|
150
|
+
},
|
|
151
|
+
getComponents: function ()
|
|
152
|
+
{
|
|
153
|
+
return this .getExecutionContext () .getComponents ();
|
|
154
|
+
},
|
|
155
|
+
fromUnit: function (category, value)
|
|
156
|
+
{
|
|
157
|
+
return this .getExecutionContext () .fromUnit (category, value);
|
|
158
|
+
},
|
|
159
|
+
toUnit: function (category, value)
|
|
160
|
+
{
|
|
161
|
+
return this .getExecutionContext () .toUnit (category, value);
|
|
162
|
+
},
|
|
163
|
+
getUnits: function ()
|
|
164
|
+
{
|
|
165
|
+
return this .getExecutionContext () .getUnits ();
|
|
166
|
+
},
|
|
167
|
+
createNode: function (typeName, setup = true)
|
|
168
|
+
{
|
|
169
|
+
typeName = String (typeName);
|
|
170
|
+
|
|
171
|
+
if (setup === false)
|
|
172
|
+
{
|
|
173
|
+
const Type = this .getBrowser () .getSupportedNode (typeName);
|
|
174
|
+
|
|
175
|
+
if (! Type)
|
|
176
|
+
return null;
|
|
177
|
+
|
|
178
|
+
return new Type (this);
|
|
179
|
+
}
|
|
180
|
+
else
|
|
181
|
+
{
|
|
182
|
+
const Type = this .getBrowser () .getSupportedNode (typeName);
|
|
183
|
+
|
|
184
|
+
if (! Type)
|
|
185
|
+
throw new Error ("Unknown node type '" + typeName + "'.");
|
|
186
|
+
|
|
187
|
+
const baseNode = new Type (this);
|
|
188
|
+
|
|
189
|
+
baseNode .setup ();
|
|
190
|
+
|
|
191
|
+
return SFNodeCache .get (baseNode);
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
createProto: function (name, setup = true)
|
|
195
|
+
{
|
|
196
|
+
name = String (name);
|
|
197
|
+
|
|
198
|
+
let executionContext = this;
|
|
199
|
+
|
|
200
|
+
for (;;)
|
|
201
|
+
{
|
|
202
|
+
const proto = executionContext .protos .get (name);
|
|
203
|
+
|
|
204
|
+
if (proto)
|
|
205
|
+
return proto .createInstance (this, setup);
|
|
206
|
+
|
|
207
|
+
const externproto = executionContext .externprotos .get (name);
|
|
208
|
+
|
|
209
|
+
if (externproto)
|
|
210
|
+
return externproto .createInstance (this, setup);
|
|
211
|
+
|
|
212
|
+
if (executionContext .isScene ())
|
|
213
|
+
break;
|
|
214
|
+
|
|
215
|
+
executionContext = executionContext .getExecutionContext ();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
if (setup === false)
|
|
219
|
+
return null;
|
|
220
|
+
|
|
221
|
+
throw new Error ("Unknown proto or externproto type '" + name + "'.");
|
|
222
|
+
},
|
|
223
|
+
addNamedNode: function (name, node)
|
|
224
|
+
{
|
|
225
|
+
if (this [_namedNodes] .has (name))
|
|
226
|
+
throw new Error ("Couldn't add named node: node named '" + name + "' is already in use.");
|
|
227
|
+
|
|
228
|
+
this .updateNamedNode (name, node);
|
|
229
|
+
},
|
|
230
|
+
updateNamedNode: function (name, node)
|
|
231
|
+
{
|
|
232
|
+
name = String (name);
|
|
233
|
+
node = X3DCast (X3DConstants .X3DNode, node, false);
|
|
234
|
+
|
|
235
|
+
if (! node)
|
|
236
|
+
throw new Error ("Couldn't update named node: node must be of type X3DNode.");
|
|
237
|
+
|
|
238
|
+
if (node .getExecutionContext () !== this)
|
|
239
|
+
throw new Error ("Couldn't update named node: node does not belong to this execution context.");
|
|
240
|
+
|
|
241
|
+
if (name .length === 0)
|
|
242
|
+
throw new Error ("Couldn't update named node: node name is empty.");
|
|
243
243
|
|
|
244
|
-
|
|
244
|
+
// Remove named node.
|
|
245
245
|
|
|
246
|
-
|
|
247
|
-
|
|
246
|
+
this .removeNamedNode (node .getName ());
|
|
247
|
+
this .removeNamedNode (name);
|
|
248
248
|
|
|
249
|
-
|
|
249
|
+
// Update named node.
|
|
250
250
|
|
|
251
|
-
|
|
251
|
+
node .setName (name);
|
|
252
252
|
|
|
253
|
-
|
|
253
|
+
this [_namedNodes] .add (name, node);
|
|
254
254
|
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
255
|
+
this ._namedNodes_changed = this .getBrowser () .getCurrentTime ();
|
|
256
|
+
},
|
|
257
|
+
removeNamedNode: function (name)
|
|
258
|
+
{
|
|
259
|
+
name = String (name);
|
|
260
260
|
|
|
261
|
-
|
|
261
|
+
const node = this [_namedNodes] .get (name);
|
|
262
262
|
|
|
263
|
-
|
|
264
|
-
|
|
263
|
+
if (! node)
|
|
264
|
+
return;
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
node .setName ("");
|
|
267
267
|
|
|
268
|
-
|
|
268
|
+
this [_namedNodes] .remove (name);
|
|
269
269
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
this ._namedNodes_changed = this .getBrowser () .getCurrentTime ();
|
|
271
|
+
},
|
|
272
|
+
getNamedNode: function (name)
|
|
273
|
+
{
|
|
274
|
+
name = String (name);
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
const node = this [_namedNodes] .get (name);
|
|
277
277
|
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
if (node)
|
|
279
|
+
return SFNodeCache .get (node);
|
|
280
280
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
281
|
+
throw new Error ("Named node '" + name + "' not found.");
|
|
282
|
+
},
|
|
283
|
+
getNamedNodes: function ()
|
|
284
|
+
{
|
|
285
|
+
return this [_namedNodes];
|
|
286
|
+
},
|
|
287
|
+
getUniqueName: function (name = "")
|
|
288
|
+
{
|
|
289
|
+
return getUniqueName .call (this, _namedNodes, name);
|
|
290
|
+
},
|
|
291
|
+
addImportedNode: function (inlineNode, exportedName, importedName)
|
|
292
|
+
{
|
|
293
|
+
if (importedName === undefined)
|
|
294
|
+
importedName = exportedName;
|
|
295
295
|
|
|
296
|
-
|
|
297
|
-
|
|
296
|
+
exportedName = String (exportedName);
|
|
297
|
+
importedName = String (importedName);
|
|
298
298
|
|
|
299
|
-
|
|
300
|
-
|
|
299
|
+
if (this [_importedNodes] .has (importedName))
|
|
300
|
+
throw new Error ("Couldn't add imported node: imported name '" + importedName + "' already in use.");
|
|
301
301
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
302
|
+
this .updateImportedNode (inlineNode, exportedName, importedName);
|
|
303
|
+
},
|
|
304
|
+
updateImportedNode: function (inlineNode, exportedName, importedName)
|
|
305
|
+
{
|
|
306
|
+
inlineNode = X3DCast (X3DConstants .Inline, inlineNode, false);
|
|
307
|
+
exportedName = String (exportedName);
|
|
308
|
+
importedName = importedName === undefined ? exportedName : String (importedName);
|
|
309
309
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
310
|
+
if (! inlineNode)
|
|
311
|
+
throw new Error ("Node must be of type Inline node.");
|
|
312
|
+
|
|
313
|
+
if (inlineNode .getExecutionContext () !== this)
|
|
314
|
+
throw new Error ("Couldn't update imported node: Inline node does not belong to this execution context.");
|
|
315
|
+
|
|
316
|
+
if (exportedName .length === 0)
|
|
317
|
+
throw new Error ("Couldn't update imported node: exported name is empty.");
|
|
318
|
+
|
|
319
|
+
if (importedName .length === 0)
|
|
320
|
+
throw new Error ("Couldn't update imported node: imported name is empty.");
|
|
321
|
+
|
|
322
|
+
// Update imported node.
|
|
323
|
+
|
|
324
|
+
this .removeImportedNode (importedName);
|
|
325
|
+
|
|
326
|
+
const importedNode = new X3DImportedNode (this, inlineNode, exportedName, importedName);
|
|
327
327
|
|
|
328
|
-
|
|
328
|
+
this [_importedNodes] .add (importedName, importedNode);
|
|
329
329
|
|
|
330
|
-
|
|
330
|
+
importedNode .setup ();
|
|
331
331
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
332
|
+
this ._importedNodes_changed = this .getBrowser () .getCurrentTime ();
|
|
333
|
+
},
|
|
334
|
+
removeImportedNode: function (importedName)
|
|
335
|
+
{
|
|
336
|
+
importedName = String (importedName);
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
const importedNode = this [_importedNodes] .get (importedName);
|
|
339
339
|
|
|
340
|
-
|
|
341
|
-
|
|
340
|
+
if (! importedNode)
|
|
341
|
+
return;
|
|
342
342
|
|
|
343
|
-
|
|
343
|
+
importedNode .dispose ();
|
|
344
344
|
|
|
345
|
-
|
|
345
|
+
this [_importedNodes] .remove (importedName);
|
|
346
346
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
347
|
+
this ._importedNodes_changed = this .getBrowser () .getCurrentTime ();
|
|
348
|
+
},
|
|
349
|
+
getImportedNode: function (importedName)
|
|
350
|
+
{
|
|
351
|
+
importedName = String (importedName);
|
|
352
352
|
|
|
353
|
-
|
|
353
|
+
const importedNode = this [_importedNodes] .get (importedName);
|
|
354
354
|
|
|
355
|
-
|
|
356
|
-
|
|
355
|
+
if (importedNode)
|
|
356
|
+
return SFNodeCache .get (importedNode .getExportedNode ());
|
|
357
357
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
358
|
+
throw new Error ("Imported node '" + importedName + "' not found.");
|
|
359
|
+
},
|
|
360
|
+
getImportedNodes: function ()
|
|
361
|
+
{
|
|
362
|
+
return this [_importedNodes];
|
|
363
|
+
},
|
|
364
|
+
getLocalNode: function (name)
|
|
365
|
+
{
|
|
366
|
+
name = String (name);
|
|
367
|
+
|
|
368
|
+
try
|
|
369
|
+
{
|
|
370
|
+
return this .getNamedNode (name);
|
|
371
|
+
}
|
|
372
|
+
catch (error)
|
|
373
|
+
{
|
|
374
|
+
const importedNode = this [_importedNodes] .get (name);
|
|
375
|
+
|
|
376
|
+
if (importedNode)
|
|
377
|
+
return SFNodeCache .get (importedNode);
|
|
378
|
+
|
|
379
|
+
throw new Error ("Unknown named or imported node '" + name + "'.");
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
getLocalName: function (node)
|
|
383
|
+
{
|
|
384
|
+
node = X3DCast (X3DConstants .X3DNode, node, false);
|
|
385
|
+
|
|
386
|
+
if (! node)
|
|
387
|
+
throw new Error ("Couldn't get local name: node must be of type X3DNode.");
|
|
388
|
+
|
|
389
|
+
if (node .getExecutionContext () === this)
|
|
390
|
+
return node .getName ();
|
|
391
|
+
|
|
392
|
+
for (const importedNode of this [_importedNodes])
|
|
393
|
+
{
|
|
394
|
+
try
|
|
395
|
+
{
|
|
396
|
+
if (importedNode .getExportedNode () === node)
|
|
397
|
+
return importedNode .getImportedName ();
|
|
398
|
+
}
|
|
399
|
+
catch (error)
|
|
400
|
+
{
|
|
401
|
+
//console .error (error);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
404
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
405
|
+
throw new Error ("Couldn't get local name: node is shared.");
|
|
406
|
+
},
|
|
407
|
+
setRootNodes: function () { },
|
|
408
|
+
getRootNodes: function ()
|
|
409
|
+
{
|
|
410
|
+
return this ._rootNodes;
|
|
411
|
+
},
|
|
412
|
+
getProtoDeclaration: function (name)
|
|
413
|
+
{
|
|
414
|
+
name = String (name);
|
|
415
415
|
|
|
416
|
-
|
|
416
|
+
const proto = this [_protos] .get (name);
|
|
417
417
|
|
|
418
|
-
|
|
419
|
-
|
|
418
|
+
if (proto)
|
|
419
|
+
return proto;
|
|
420
420
|
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
421
|
+
throw new Error ("Proto declaration '" + name + "' not found.");
|
|
422
|
+
},
|
|
423
|
+
addProtoDeclaration (name, proto)
|
|
424
|
+
{
|
|
425
|
+
name = String (name);
|
|
426
|
+
|
|
427
|
+
if (! (proto instanceof X3DProtoDeclaration))
|
|
428
|
+
throw new Error ("Couldn't add proto declaration: proto must be of type X3DProtoDeclaration.");
|
|
429
|
+
|
|
430
|
+
if (this [_protos] .get (name))
|
|
431
|
+
throw new Error ("Couldn't add proto declaration: proto '" + name + "' already in use.");
|
|
432
|
+
|
|
433
|
+
name = String (name);
|
|
434
|
+
|
|
435
|
+
if (name .length === 0)
|
|
436
|
+
throw new Error ("Couldn't add proto declaration: proto name is empty.");
|
|
437
|
+
|
|
438
|
+
this [_protos] .add (name, proto);
|
|
439
|
+
proto .setName (name);
|
|
440
|
+
|
|
441
|
+
this ._protos_changed = this .getBrowser () .getCurrentTime ();
|
|
442
|
+
},
|
|
443
|
+
updateProtoDeclaration (name, proto)
|
|
444
|
+
{
|
|
445
|
+
name = String (name);
|
|
446
|
+
|
|
447
|
+
if (! (proto instanceof X3DProtoDeclaration))
|
|
448
|
+
throw new Error ("Couldn't add proto declaration: proto must be of type X3DProtoDeclaration.");
|
|
449
|
+
|
|
450
|
+
name = String (name);
|
|
451
|
+
|
|
452
|
+
if (name .length === 0)
|
|
453
|
+
throw new Error ("Couldn't add proto declaration: proto name is empty.");
|
|
454
|
+
|
|
455
|
+
this [_protos] .update (proto .getName (), name, proto);
|
|
456
|
+
proto .setName (name);
|
|
457
|
+
|
|
458
|
+
this ._protos_changed = this .getBrowser () .getCurrentTime ();
|
|
459
|
+
},
|
|
460
|
+
removeProtoDeclaration (name)
|
|
461
|
+
{
|
|
462
|
+
name = String (name);
|
|
463
|
+
|
|
464
|
+
this [_protos] .remove (name);
|
|
465
|
+
|
|
466
|
+
this ._protos_changed = this .getBrowser () .getCurrentTime ();
|
|
467
|
+
},
|
|
468
|
+
getProtoDeclarations: function ()
|
|
469
|
+
{
|
|
470
|
+
return this [_protos];
|
|
471
|
+
},
|
|
472
|
+
getUniqueProtoName: function (name = "")
|
|
473
|
+
{
|
|
474
|
+
return getUniqueName .call (this, _protos, name);
|
|
475
|
+
},
|
|
476
|
+
getExternProtoDeclaration: function (name)
|
|
477
|
+
{
|
|
478
|
+
name = String (name);
|
|
479
|
+
|
|
480
|
+
const externproto = this [_externprotos] .get (name);
|
|
481
|
+
|
|
482
|
+
if (externproto)
|
|
483
|
+
return externproto;
|
|
484
|
+
|
|
485
|
+
throw new Error ("Extern proto declaration '" + name + "' not found.");
|
|
486
|
+
},
|
|
487
|
+
addExternProtoDeclaration (name, externproto)
|
|
488
|
+
{
|
|
489
|
+
name = String (name);
|
|
490
|
+
|
|
491
|
+
if (! (externproto instanceof X3DExternProtoDeclaration))
|
|
492
|
+
throw new Error ("Couldn't add extern proto declaration: extern proto must be of type X3DExternProtoDeclaration.");
|
|
493
|
+
|
|
494
|
+
if (this [_externprotos] .get (name))
|
|
495
|
+
throw new Error ("Couldn't add extern proto declaration: extern proto '" + name + "' already in use.");
|
|
496
|
+
|
|
497
|
+
name = String (name);
|
|
498
|
+
|
|
499
|
+
if (name .length === 0)
|
|
500
|
+
throw new Error ("Couldn't add extern proto declaration: extern proto name is empty.");
|
|
501
|
+
|
|
502
|
+
this [_externprotos] .add (name, externproto);
|
|
503
|
+
externproto .setName (name);
|
|
504
|
+
|
|
505
|
+
this ._externprotos_changed = this .getBrowser () .getCurrentTime ();
|
|
506
|
+
},
|
|
507
|
+
updateExternProtoDeclaration (name, externproto)
|
|
508
|
+
{
|
|
509
|
+
name = String (name);
|
|
510
|
+
|
|
511
|
+
if (! (externproto instanceof X3DExternProtoDeclaration))
|
|
512
|
+
throw new Error ("Couldn't add extern proto declaration: extern proto must be of type X3DExternProtoDeclaration.");
|
|
513
|
+
|
|
514
|
+
name = String (name);
|
|
515
|
+
|
|
516
|
+
if (name .length === 0)
|
|
517
|
+
throw new Error ("Couldn't add extern proto declaration: extern proto name is empty.");
|
|
518
|
+
|
|
519
|
+
this [_externprotos] .update (externproto .getName (), name, externproto);
|
|
520
|
+
externproto .setName (name);
|
|
521
|
+
|
|
522
|
+
this ._externprotos_changed = this .getBrowser () .getCurrentTime ();
|
|
523
|
+
},
|
|
524
|
+
removeExternProtoDeclaration (name)
|
|
525
|
+
{
|
|
526
|
+
name = String (name);
|
|
527
|
+
|
|
528
|
+
this [_externprotos] .remove (name);
|
|
529
|
+
|
|
530
|
+
this ._externprotos_changed = this .getBrowser () .getCurrentTime ();
|
|
531
|
+
},
|
|
532
|
+
getExternProtoDeclarations: function ()
|
|
533
|
+
{
|
|
534
|
+
return this [_externprotos];
|
|
535
|
+
},
|
|
536
|
+
getUniqueExternProtoName: function (name = "")
|
|
537
|
+
{
|
|
538
|
+
return getUniqueName .call (this, _externprotos, name);
|
|
539
|
+
},
|
|
540
|
+
addRoute: function (sourceNode, sourceField, destinationNode, destinationField)
|
|
541
|
+
{
|
|
542
|
+
sourceNode = X3DCast (X3DConstants .X3DNode, sourceNode, false);
|
|
543
|
+
sourceField = String (sourceField);
|
|
544
|
+
destinationNode = X3DCast (X3DConstants .X3DNode, destinationNode, false);
|
|
545
|
+
destinationField = String (destinationField);
|
|
546
|
+
|
|
547
|
+
if (! sourceNode)
|
|
548
|
+
throw new Error ("Bad ROUTE specification: source node must be of type X3DNode.");
|
|
549
|
+
|
|
550
|
+
if (! destinationNode)
|
|
551
|
+
throw new Error ("Bad ROUTE specification: destination node must be of type X3DNode.");
|
|
552
|
+
|
|
553
|
+
// Imported nodes handling.
|
|
554
|
+
|
|
555
|
+
let
|
|
556
|
+
importedSourceNode = sourceNode instanceof X3DImportedNode ? sourceNode : null,
|
|
557
|
+
importedDestinationNode = destinationNode instanceof X3DImportedNode ? destinationNode : null;
|
|
558
|
+
|
|
559
|
+
try
|
|
560
|
+
{
|
|
561
|
+
// If sourceNode is shared node try to find the corresponding X3DImportedNode.
|
|
562
|
+
if (sourceNode .getExecutionContext () !== this)
|
|
563
|
+
importedSourceNode = this .getLocalNode (this .getLocalName (sourceNode)) .getValue ();
|
|
564
|
+
}
|
|
565
|
+
catch (error)
|
|
566
|
+
{
|
|
567
|
+
// Source node is shared but not imported.
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
try
|
|
571
|
+
{
|
|
572
|
+
// If destinationNode is shared node try to find the corresponding X3DImportedNode.
|
|
573
|
+
if (destinationNode .getExecutionContext () !== this)
|
|
574
|
+
importedDestinationNode = this .getLocalNode (this .getLocalName (destinationNode)) .getValue ();
|
|
575
|
+
}
|
|
576
|
+
catch (error)
|
|
577
|
+
{
|
|
578
|
+
// Destination node is shared but not imported.
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
if (importedSourceNode instanceof X3DImportedNode && importedDestinationNode instanceof X3DImportedNode)
|
|
582
|
+
{
|
|
583
|
+
importedSourceNode .addRoute (importedSourceNode, sourceField, importedDestinationNode, destinationField);
|
|
584
|
+
importedDestinationNode .addRoute (importedSourceNode, sourceField, importedDestinationNode, destinationField);
|
|
585
|
+
}
|
|
586
|
+
else if (importedSourceNode instanceof X3DImportedNode)
|
|
587
|
+
{
|
|
588
|
+
importedSourceNode .addRoute (importedSourceNode, sourceField, destinationNode, destinationField);
|
|
589
|
+
}
|
|
590
|
+
else if (importedDestinationNode instanceof X3DImportedNode)
|
|
591
|
+
{
|
|
592
|
+
importedDestinationNode .addRoute (sourceNode, sourceField, importedDestinationNode, destinationField);
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
// If either sourceNode or destinationNode is an X3DImportedNode return here without value.
|
|
596
|
+
if (importedSourceNode === sourceNode || importedDestinationNode === destinationNode)
|
|
597
|
+
return;
|
|
598
|
+
|
|
599
|
+
// Create route and return.
|
|
600
|
+
|
|
601
|
+
return this .addSimpleRoute (sourceNode, sourceField, destinationNode, destinationField);
|
|
602
|
+
},
|
|
603
|
+
addSimpleRoute: function (sourceNode, sourceField, destinationNode, destinationField)
|
|
604
|
+
{
|
|
605
|
+
// Source and dest node are here X3DBaseNode.
|
|
606
|
+
|
|
607
|
+
try
|
|
608
|
+
{
|
|
609
|
+
// Private function.
|
|
610
|
+
// Create route and return.
|
|
611
|
+
|
|
612
|
+
sourceField = sourceNode .getField (sourceField),
|
|
613
|
+
destinationField = destinationNode .getField (destinationField);
|
|
614
|
+
|
|
615
|
+
if (! sourceField .isOutput ())
|
|
616
|
+
throw new Error ("Field named '" + sourceField .getName () + "' in node named '" + sourceNode .getName () + "' of type " + sourceNode .getTypeName () + " is not an output field.");
|
|
617
|
+
|
|
618
|
+
if (! destinationField .isInput ())
|
|
619
|
+
throw new Error ("Field named '" + destinationField .getName () + "' in node named '" + destinationNode .getName () + "' of type " + destinationNode .getTypeName () + " is not an input field.");
|
|
620
|
+
|
|
621
|
+
if (sourceField .getType () !== destinationField .getType ())
|
|
622
|
+
throw new Error ("ROUTE types " + sourceField .getTypeName () + " and " + destinationField .getTypeName () + " do not match.");
|
|
623
|
+
|
|
624
|
+
const id = sourceField .getId () + "." + destinationField .getId ();
|
|
625
|
+
|
|
626
|
+
let route = this [_routes] .get (id);
|
|
627
|
+
|
|
628
|
+
if (route)
|
|
629
|
+
return route;
|
|
630
|
+
|
|
631
|
+
route = new X3DRoute (this, sourceNode, sourceField, destinationNode, destinationField);
|
|
632
|
+
|
|
633
|
+
this [_routes] .add (id, route);
|
|
634
|
+
|
|
635
|
+
this ._routes_changed = this .getBrowser () .getCurrentTime ();
|
|
636
|
+
|
|
637
|
+
return route;
|
|
638
|
+
}
|
|
639
|
+
catch (error)
|
|
640
|
+
{
|
|
641
|
+
throw new Error ("Bad ROUTE specification: " + error .message);
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
deleteRoute: function (route)
|
|
645
|
+
{
|
|
646
|
+
// sourceNode, sourceField, destinationNode, destinationField
|
|
647
|
+
if (arguments .length === 4)
|
|
648
|
+
{
|
|
649
|
+
route = this .getRoute .apply (this, arguments);
|
|
650
|
+
|
|
651
|
+
if (! route)
|
|
652
|
+
return false;
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
if (this .deleteSimpleRoute (route))
|
|
656
|
+
this .deleteImportedRoute (route .sourceNode, route .destinationNode, route);
|
|
657
|
+
},
|
|
658
|
+
deleteSimpleRoute: function (route)
|
|
659
|
+
{
|
|
660
|
+
try
|
|
661
|
+
{
|
|
662
|
+
const
|
|
663
|
+
sourceField = route .getSourceField (),
|
|
664
|
+
destinationField = route .getDestinationField (),
|
|
665
|
+
id = sourceField .getId () + "." + destinationField .getId ();
|
|
666
|
+
|
|
667
|
+
this [_routes] .remove (id);
|
|
668
|
+
route .disconnect ();
|
|
669
|
+
|
|
670
|
+
this ._routes_changed = this .getBrowser () .getCurrentTime ();
|
|
671
|
+
|
|
672
|
+
return true;
|
|
673
|
+
}
|
|
674
|
+
catch (error)
|
|
675
|
+
{
|
|
676
|
+
console .error (error);
|
|
677
|
+
return false;
|
|
678
|
+
}
|
|
679
|
+
},
|
|
680
|
+
deleteImportedRoute (sourceNode, destinationNode, route)
|
|
681
|
+
{
|
|
682
|
+
// Imported nodes handling.
|
|
683
|
+
|
|
684
|
+
let
|
|
685
|
+
importedSourceNode = null,
|
|
686
|
+
importedDestinationNode = null;
|
|
687
|
+
|
|
688
|
+
try
|
|
689
|
+
{
|
|
690
|
+
// If sourceNode is shared node try to find the corresponding X3DImportedNode.
|
|
691
|
+
if (sourceNode .getValue () .getExecutionContext () !== this)
|
|
692
|
+
importedSourceNode = this .getLocalNode (this .getLocalName (sourceNode)) .getValue ();
|
|
693
|
+
}
|
|
694
|
+
catch (error)
|
|
695
|
+
{
|
|
696
|
+
// Source node is shared but not imported.
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
try
|
|
700
|
+
{
|
|
701
|
+
// If destinationNode is shared node try to find the corresponding X3DImportedNode.
|
|
702
|
+
if (destinationNode .getValue () .getExecutionContext () !== this)
|
|
703
|
+
importedDestinationNode = this .getLocalNode (this .getLocalName (destinationNode)) .getValue ();
|
|
704
|
+
}
|
|
705
|
+
catch (error)
|
|
706
|
+
{
|
|
707
|
+
// Destination node is shared but not imported.
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
if (importedSourceNode instanceof X3DImportedNode && importedDestinationNode instanceof X3DImportedNode)
|
|
711
|
+
{
|
|
712
|
+
importedSourceNode .deleteRoute (route);
|
|
713
|
+
importedDestinationNode .deleteRoute (route);
|
|
714
|
+
}
|
|
715
|
+
else if (importedSourceNode instanceof X3DImportedNode)
|
|
716
|
+
{
|
|
717
|
+
importedSourceNode .deleteRoute (route);
|
|
718
|
+
}
|
|
719
|
+
else if (importedDestinationNode instanceof X3DImportedNode)
|
|
720
|
+
{
|
|
721
|
+
importedDestinationNode .deleteRoute (route);
|
|
722
|
+
}
|
|
723
|
+
},
|
|
724
|
+
getRoute: function (sourceNode, sourceField, destinationNode, destinationField)
|
|
725
|
+
{
|
|
726
|
+
sourceNode = X3DCast (X3DConstants .X3DNode, sourceNode, false);
|
|
727
|
+
sourceField = String (sourceField)
|
|
728
|
+
destinationNode = X3DCast (X3DConstants .X3DNode, destinationNode, false);
|
|
729
|
+
destinationField = String (destinationField)
|
|
730
|
+
|
|
731
|
+
if (! sourceNode)
|
|
732
|
+
throw new Error ("Bad ROUTE specification: sourceNode must be of type X3DNode.");
|
|
733
|
+
|
|
734
|
+
if (! destinationNode)
|
|
735
|
+
throw new Error ("Bad ROUTE specification: destinationNode must be of type X3DNode.");
|
|
736
|
+
|
|
737
|
+
sourceField = sourceNode .getField (sourceField);
|
|
738
|
+
destinationField = destinationNode .getField (destinationField);
|
|
739
|
+
|
|
740
|
+
const id = sourceField .getId () + "." + destinationField .getId ();
|
|
741
|
+
|
|
742
|
+
return this [_routes] .get (id);
|
|
743
|
+
},
|
|
744
|
+
getRoutes: function ()
|
|
745
|
+
{
|
|
746
|
+
return this [_routes];
|
|
747
|
+
},
|
|
748
|
+
getWorldInfos: function ()
|
|
749
|
+
{
|
|
750
|
+
return this ._worldInfos;
|
|
751
|
+
},
|
|
752
|
+
addWorldInfo: function (worldInfoNode)
|
|
753
|
+
{
|
|
754
|
+
this ._worldInfos .push (worldInfoNode);
|
|
755
|
+
},
|
|
756
|
+
removeWorldInfo: function (worldInfoNode)
|
|
757
|
+
{
|
|
758
|
+
for (let i = this ._worldInfos .length - 1; i >= 0; -- i)
|
|
759
|
+
{
|
|
760
|
+
if (this ._worldInfos [i] .getValue () === worldInfoNode)
|
|
761
|
+
this ._worldInfos .splice (i, 1);
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
toVRMLStream: function (stream)
|
|
765
|
+
{
|
|
766
|
+
const generator = Generator .Get (stream);
|
|
767
|
+
|
|
768
|
+
generator .PushExecutionContext (this);
|
|
769
|
+
generator .EnterScope ();
|
|
770
|
+
generator .ImportedNodes (this .getImportedNodes ());
|
|
771
|
+
|
|
772
|
+
// Output extern protos
|
|
773
|
+
|
|
774
|
+
this .getExternProtoDeclarations () .toVRMLStream (stream);
|
|
775
|
+
|
|
776
|
+
// Output protos
|
|
777
|
+
|
|
778
|
+
this .getProtoDeclarations () .toVRMLStream (stream);
|
|
779
|
+
|
|
780
|
+
// Output root nodes
|
|
781
|
+
|
|
782
|
+
const rootNodes = this .getRootNodes ();
|
|
783
|
+
|
|
784
|
+
for (let i = 0, length = rootNodes .length; i < length; ++ i)
|
|
785
|
+
{
|
|
786
|
+
const rootNode = rootNodes [i];
|
|
787
|
+
|
|
788
|
+
stream .string += generator .Indent ();
|
|
789
|
+
|
|
790
|
+
if (rootNode)
|
|
791
|
+
rootNode .toVRMLStream (stream);
|
|
792
|
+
else
|
|
793
|
+
stream .string += "NULL";
|
|
794
|
+
|
|
795
|
+
stream .string += "\n";
|
|
796
|
+
|
|
797
|
+
if (i !== length - 1)
|
|
798
|
+
stream .string += "\n";
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
// Output imported nodes
|
|
802
|
+
|
|
803
|
+
const importedNodes = this .getImportedNodes ();
|
|
804
|
+
|
|
805
|
+
if (importedNodes .size)
|
|
806
|
+
{
|
|
807
|
+
stream .string += "\n";
|
|
808
808
|
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
809
|
+
importedNodes .forEach (function (importedNode)
|
|
810
|
+
{
|
|
811
|
+
try
|
|
812
|
+
{
|
|
813
|
+
importedNode .toVRMLStream (stream);
|
|
814
814
|
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
815
|
+
stream .string += "\n";
|
|
816
|
+
}
|
|
817
|
+
catch (error)
|
|
818
|
+
{ }
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
821
|
|
|
822
|
-
|
|
822
|
+
// Output routes
|
|
823
823
|
|
|
824
|
-
|
|
824
|
+
const routes = this .getRoutes ();
|
|
825
825
|
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
826
|
+
if (routes .length)
|
|
827
|
+
{
|
|
828
|
+
stream .string += "\n";
|
|
829
829
|
|
|
830
|
-
|
|
831
|
-
|
|
830
|
+
routes .toVRMLStream (stream);
|
|
831
|
+
}
|
|
832
832
|
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
833
|
+
generator .LeaveScope ();
|
|
834
|
+
generator .PopExecutionContext ();
|
|
835
|
+
},
|
|
836
|
+
toXMLStream: function (stream)
|
|
837
|
+
{
|
|
838
|
+
const generator = Generator .Get (stream);
|
|
839
839
|
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
840
|
+
generator .PushExecutionContext (this);
|
|
841
|
+
generator .EnterScope ();
|
|
842
|
+
generator .ImportedNodes (this .getImportedNodes ());
|
|
843
843
|
|
|
844
|
-
|
|
844
|
+
// Output extern protos
|
|
845
845
|
|
|
846
|
-
|
|
846
|
+
this .getExternProtoDeclarations () .toXMLStream (stream);
|
|
847
847
|
|
|
848
|
-
|
|
848
|
+
// Output protos
|
|
849
849
|
|
|
850
|
-
|
|
850
|
+
this .getProtoDeclarations () .toXMLStream (stream);
|
|
851
851
|
|
|
852
|
-
|
|
852
|
+
// Output root nodes
|
|
853
853
|
|
|
854
|
-
|
|
854
|
+
const rootNodes = this .getRootNodes ();
|
|
855
855
|
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
856
|
+
if (rootNodes .length)
|
|
857
|
+
{
|
|
858
|
+
rootNodes .toXMLStream (stream);
|
|
859
859
|
|
|
860
|
-
|
|
861
|
-
|
|
860
|
+
stream .string += "\n";
|
|
861
|
+
}
|
|
862
862
|
|
|
863
|
-
|
|
863
|
+
// Output imported nodes
|
|
864
864
|
|
|
865
|
-
|
|
865
|
+
const importedNodes = this .getImportedNodes ();
|
|
866
866
|
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
867
|
+
importedNodes .forEach (function (importedNode)
|
|
868
|
+
{
|
|
869
|
+
try
|
|
870
|
+
{
|
|
871
|
+
importedNode .toXMLStream (stream);
|
|
872
872
|
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
873
|
+
stream .string += "\n";
|
|
874
|
+
}
|
|
875
|
+
catch (error)
|
|
876
|
+
{ }
|
|
877
|
+
});
|
|
878
878
|
|
|
879
|
-
|
|
879
|
+
// Output routes
|
|
880
880
|
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
881
|
+
this .getRoutes () .toXMLStream (stream);
|
|
882
|
+
|
|
883
|
+
generator .LeaveScope ();
|
|
884
|
+
generator .PopExecutionContext ();
|
|
885
|
+
},
|
|
886
|
+
dispose: function ()
|
|
887
|
+
{
|
|
888
|
+
this ._rootNodes .dispose ();
|
|
889
|
+
|
|
890
|
+
for (const route of this [_routes])
|
|
891
|
+
this .deleteRoute (route);
|
|
892
|
+
|
|
893
|
+
X3DBaseNode .prototype .dispose .call (this);
|
|
894
|
+
},
|
|
895
|
+
});
|
|
896
|
+
|
|
897
|
+
const getUniqueName = (function ()
|
|
898
|
+
{
|
|
899
|
+
const _TrailingNumbers = /_\d+$/;
|
|
900
|
+
|
|
901
|
+
return function (array, name = "")
|
|
902
|
+
{
|
|
903
|
+
name = String (name) .replace (_TrailingNumbers, "");
|
|
904
|
+
|
|
905
|
+
let
|
|
906
|
+
newName = name,
|
|
907
|
+
i = 64;
|
|
908
|
+
|
|
909
|
+
for (; i;)
|
|
910
|
+
{
|
|
911
|
+
if (! (this [array] .has (newName) || newName .length === 0))
|
|
912
|
+
break;
|
|
913
|
+
|
|
914
|
+
const
|
|
915
|
+
min = i,
|
|
916
|
+
max = i <<= 1;
|
|
917
|
+
|
|
918
|
+
newName = name;
|
|
919
|
+
newName += '_';
|
|
920
|
+
newName += Math .round (Algorithm .random (min, max));
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
return newName;
|
|
924
|
+
};
|
|
925
|
+
})();
|
|
926
|
+
|
|
927
|
+
for (const key of Reflect .ownKeys (X3DExecutionContext .prototype))
|
|
928
|
+
Object .defineProperty (X3DExecutionContext .prototype, key, { enumerable: false });
|
|
929
|
+
|
|
930
|
+
Object .defineProperty (X3DExecutionContext .prototype, "specificationVersion",
|
|
931
|
+
{
|
|
932
|
+
get: function () { return this .getSpecificationVersion (); },
|
|
933
|
+
enumerable: true,
|
|
934
|
+
configurable: false
|
|
935
|
+
});
|
|
936
|
+
|
|
937
|
+
Object .defineProperty (X3DExecutionContext .prototype, "encoding",
|
|
938
|
+
{
|
|
939
|
+
get: function () { return this .getEncoding (); },
|
|
940
|
+
enumerable: true,
|
|
941
|
+
configurable: false
|
|
942
|
+
});
|
|
943
|
+
|
|
944
|
+
Object .defineProperty (X3DExecutionContext .prototype, "profile",
|
|
945
|
+
{
|
|
946
|
+
get: function () { return this .getProfile (); },
|
|
947
|
+
enumerable: true,
|
|
948
|
+
configurable: false
|
|
949
|
+
});
|
|
950
|
+
|
|
951
|
+
Object .defineProperty (X3DExecutionContext .prototype, "components",
|
|
952
|
+
{
|
|
953
|
+
get: function () { return this .getComponents (); },
|
|
954
|
+
enumerable: true,
|
|
955
|
+
configurable: false
|
|
956
|
+
});
|
|
957
|
+
|
|
958
|
+
Object .defineProperty (X3DExecutionContext .prototype, "worldURL",
|
|
959
|
+
{
|
|
960
|
+
get: function () { return this .getWorldURL (); },
|
|
961
|
+
enumerable: true,
|
|
962
|
+
configurable: false
|
|
963
|
+
});
|
|
964
|
+
|
|
965
|
+
Object .defineProperty (X3DExecutionContext .prototype, "units",
|
|
966
|
+
{
|
|
967
|
+
get: function () { return this .getUnits (); },
|
|
968
|
+
enumerable: true,
|
|
969
|
+
configurable: false
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
Object .defineProperty (X3DExecutionContext .prototype, "rootNodes",
|
|
973
|
+
{
|
|
974
|
+
get: function () { return this .getRootNodes (); },
|
|
975
|
+
set: function (value) { this .setRootNodes (value); },
|
|
976
|
+
enumerable: true,
|
|
977
|
+
configurable: false
|
|
978
|
+
});
|
|
979
|
+
|
|
980
|
+
Object .defineProperty (X3DExecutionContext .prototype, "protos",
|
|
981
|
+
{
|
|
982
|
+
get: function () { return this .getProtoDeclarations (); },
|
|
983
|
+
enumerable: true,
|
|
984
|
+
configurable: false
|
|
985
|
+
});
|
|
986
|
+
|
|
987
|
+
Object .defineProperty (X3DExecutionContext .prototype, "externprotos",
|
|
988
|
+
{
|
|
989
|
+
get: function () { return this .getExternProtoDeclarations (); },
|
|
990
|
+
enumerable: true,
|
|
991
|
+
configurable: false
|
|
992
|
+
});
|
|
993
|
+
|
|
994
|
+
Object .defineProperty (X3DExecutionContext .prototype, "routes",
|
|
995
|
+
{
|
|
996
|
+
get: function () { return this .getRoutes (); },
|
|
997
|
+
enumerable: true,
|
|
998
|
+
configurable: false
|
|
999
|
+
});
|
|
1000
|
+
|
|
1001
|
+
export default X3DExecutionContext;
|