x_ite 4.2.17 → 4.7.7
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/ISSUE_TEMPLATE/bug_report.md +38 -0
- package/.vscode/launch.json +15 -0
- package/.vscode/settings.json +12 -0
- package/.vscode/tasks.json +25 -0
- package/Makefile +27 -10
- package/README.md +13 -145
- package/build/bin/dist.pl +65 -8
- package/build/bin/version-number.pl +25 -0
- package/build/bin/version.pl +54 -14
- package/build/components/annotation.build.js +15 -0
- package/build/components/cad-geometry.build.js +15 -0
- package/build/components/cube-map-texturing.build.js +15 -0
- package/build/components/dis.build.js +15 -0
- package/build/components/event-utilities.build.js +15 -0
- package/build/components/geometry2d.build.js +15 -0
- package/build/components/geospatial.build.js +15 -0
- package/build/components/h-anim.build.js +15 -0
- package/build/components/key-device-sensor.build.js +15 -0
- package/build/components/layout.build.js +15 -0
- package/build/components/nurbs.build.js +15 -0
- package/build/components/particle-systems.build.js +15 -0
- package/build/components/picking.build.js +15 -0
- package/build/components/projective-texture-mapping.build.js +15 -0
- package/build/components/rigid-body-physics.build.js +15 -0
- package/build/components/scripting.build.js +15 -0
- package/build/components/texturing-3d.build.js +15 -0
- package/build/components/volume-rendering.build.js +15 -0
- package/build/components/x_ite.build.js +15 -0
- package/build/parts/default.end.frag.js +3 -0
- package/build/parts/default.start.frag.js +15 -0
- package/build/parts/x_ite.end.frag.js +25 -0
- package/build/parts/x_ite.start.frag.js +16 -0
- package/build/x_ite.build.js +5 -2
- package/dist/{components/texturing-3d.js → assets/components/annotation.js} +341 -263
- package/dist/assets/components/annotation.min.js +1 -0
- package/dist/{components → assets/components}/cad-geometry.js +180 -76
- package/dist/assets/components/cad-geometry.min.js +1 -0
- package/dist/assets/components/cube-map-texturing.js +1222 -0
- package/dist/assets/components/cube-map-texturing.min.js +1 -0
- package/dist/assets/components/dis.js +918 -0
- package/dist/assets/components/dis.min.js +1 -0
- package/dist/assets/components/event-utilities.js +1124 -0
- package/dist/assets/components/event-utilities.min.js +1 -0
- package/dist/assets/components/geometry2d.js +2200 -0
- package/dist/assets/components/geometry2d.min.js +1 -0
- package/dist/{components → assets/components}/geospatial.js +364 -269
- package/dist/assets/components/geospatial.min.js +2 -0
- package/dist/{components → assets/components}/h-anim.js +224 -62
- package/dist/assets/components/h-anim.min.js +1 -0
- package/dist/assets/components/key-device-sensor.js +860 -0
- package/dist/assets/components/key-device-sensor.min.js +1 -0
- package/dist/assets/components/layout.js +2018 -0
- package/dist/assets/components/layout.min.js +1 -0
- package/dist/{components → assets/components}/nurbs.js +632 -348
- package/dist/assets/components/nurbs.min.js +2 -0
- package/dist/{components → assets/components}/particle-systems.js +514 -476
- package/dist/assets/components/particle-systems.min.js +2 -0
- package/dist/assets/components/picking.js +2491 -0
- package/dist/assets/components/picking.min.js +1 -0
- package/dist/assets/components/projective-texture-mapping.js +823 -0
- package/dist/assets/components/projective-texture-mapping.min.js +1 -0
- package/dist/assets/components/rigid-body-physics.js +4579 -0
- package/dist/assets/components/rigid-body-physics.min.js +59 -0
- package/dist/assets/components/scripting.js +816 -0
- package/dist/assets/components/scripting.min.js +1 -0
- package/dist/assets/components/texturing-3d.js +10064 -0
- package/dist/assets/components/texturing-3d.min.js +48 -0
- package/dist/assets/components/volume-rendering.js +3976 -0
- package/dist/assets/components/volume-rendering.min.js +3 -0
- package/dist/assets/components/x_ite.js +295 -0
- package/dist/assets/components/x_ite.min.js +1 -0
- package/{fonts → dist/assets/fonts}/DroidSerif-Bold.ttf +0 -0
- package/{fonts → dist/assets/fonts}/DroidSerif-BoldItalic.ttf +0 -0
- package/{fonts → dist/assets/fonts}/DroidSerif-Italic.ttf +0 -0
- package/{fonts → dist/assets/fonts}/DroidSerif-Regular.ttf +0 -0
- package/{fonts → dist/assets/fonts}/Ubuntu-B.ttf +0 -0
- package/{fonts → dist/assets/fonts}/Ubuntu-BI.ttf +0 -0
- package/{fonts → dist/assets/fonts}/Ubuntu-R.ttf +0 -0
- package/{fonts → dist/assets/fonts}/Ubuntu-RI.ttf +0 -0
- package/{fonts → dist/assets/fonts}/UbuntuMono-B.ttf +0 -0
- package/{fonts → dist/assets/fonts}/UbuntuMono-BI.ttf +0 -0
- package/{fonts → dist/assets/fonts}/UbuntuMono-R.ttf +0 -0
- package/{fonts → dist/assets/fonts}/UbuntuMono-RI.ttf +0 -0
- package/dist/assets/hatching/0.png +0 -0
- package/dist/assets/hatching/1.png +0 -0
- package/dist/assets/hatching/10.png +0 -0
- package/dist/assets/hatching/11.png +0 -0
- package/dist/assets/hatching/12.png +0 -0
- package/dist/assets/hatching/13.png +0 -0
- package/dist/assets/hatching/14.png +0 -0
- package/dist/assets/hatching/15.png +0 -0
- package/dist/assets/hatching/16.png +0 -0
- package/dist/assets/hatching/17.png +0 -0
- package/dist/assets/hatching/18.png +0 -0
- package/dist/assets/hatching/19.png +0 -0
- package/dist/assets/hatching/2.png +0 -0
- package/dist/assets/hatching/3.png +0 -0
- package/dist/assets/hatching/4.png +0 -0
- package/dist/assets/hatching/5.png +0 -0
- package/dist/assets/hatching/6.png +0 -0
- package/dist/assets/hatching/7.png +0 -0
- package/dist/assets/hatching/8.png +0 -0
- package/dist/assets/hatching/9.png +0 -0
- package/dist/{images → assets/images}/ExamineViewer.png +0 -0
- package/dist/{images → assets/images}/FlyViewer.png +0 -0
- package/dist/{images → assets/images}/NoneViewer.png +0 -0
- package/dist/{images → assets/images}/PlaneViewer.png +0 -0
- package/dist/{images → assets/images}/PrimitiveQuality.png +0 -0
- package/dist/{images → assets/images}/TextureQuality.png +0 -0
- package/dist/{images → assets/images}/Time.png +0 -0
- package/dist/{images → assets/images}/Viewpoint.png +0 -0
- package/dist/{images → assets/images}/WalkViewer.png +0 -0
- package/dist/assets/images/go-next.png +0 -0
- package/dist/{images → assets/images}/gtk-fullscreen.png +0 -0
- package/dist/{images → assets/images}/gtk-leave-fullscreen.png +0 -0
- package/dist/{images → assets/images}/gtk-zoom-fit.png +0 -0
- package/dist/{images → assets/images}/gtk-zoom-in.png +0 -0
- package/dist/{images → assets/images}/help-about.png +0 -0
- package/dist/{images → assets/images}/icon.bw.png +0 -0
- package/dist/{images → assets/images}/icon.png +0 -0
- package/dist/assets/images/logo.128.png +0 -0
- package/dist/{images → assets/images}/logo.bw.png +0 -0
- package/dist/{images → assets/images}/logo.png +0 -0
- package/dist/assets/linetype/0.png +0 -0
- package/dist/assets/linetype/1.png +0 -0
- package/dist/assets/linetype/10.png +0 -0
- package/dist/assets/linetype/11.png +0 -0
- package/dist/assets/linetype/12.png +0 -0
- package/dist/assets/linetype/13.png +0 -0
- package/dist/assets/linetype/14.png +0 -0
- package/dist/assets/linetype/15.png +0 -0
- package/dist/assets/linetype/16.png +0 -0
- package/dist/assets/linetype/2.png +0 -0
- package/dist/assets/linetype/3.png +0 -0
- package/dist/assets/linetype/4.png +0 -0
- package/dist/assets/linetype/5.png +0 -0
- package/dist/assets/linetype/6.png +0 -0
- package/dist/assets/linetype/7.png +0 -0
- package/dist/assets/linetype/8.png +0 -0
- package/dist/assets/linetype/9.png +0 -0
- package/dist/assets/shaders/webgl1/Background.fs +23 -0
- package/dist/assets/shaders/webgl1/Background.vs +16 -0
- package/dist/assets/shaders/webgl1/Depth.fs +60 -0
- package/dist/assets/shaders/webgl1/Depth.vs +13 -0
- package/dist/assets/shaders/webgl1/Fallback.fs +28 -0
- package/dist/assets/shaders/webgl1/Fallback.vs +24 -0
- package/dist/assets/shaders/webgl1/FallbackUnlit.fs +15 -0
- package/dist/assets/shaders/webgl1/FallbackUnlit.vs +18 -0
- package/dist/assets/shaders/webgl1/Gouraud.fs +529 -0
- package/dist/assets/shaders/webgl1/Gouraud.vs +107 -0
- package/dist/assets/shaders/webgl1/Phong.fs +837 -0
- package/dist/assets/shaders/webgl1/Phong.vs +52 -0
- package/dist/assets/shaders/webgl1/PointSet.fs +541 -0
- package/dist/assets/shaders/webgl1/PointSet.vs +48 -0
- package/dist/assets/shaders/webgl1/Unlit.fs +538 -0
- package/dist/assets/shaders/webgl1/Unlit.vs +52 -0
- package/dist/assets/shaders/webgl1/Wireframe.fs +93 -0
- package/dist/assets/shaders/webgl1/Wireframe.vs +47 -0
- package/dist/assets/shaders/webgl2/Background.fs +25 -0
- package/dist/assets/shaders/webgl2/Background.vs +17 -0
- package/dist/assets/shaders/webgl2/Depth.fs +62 -0
- package/dist/assets/shaders/webgl2/Depth.vs +14 -0
- package/dist/assets/shaders/webgl2/Gouraud.fs +684 -0
- package/dist/assets/shaders/webgl2/Gouraud.vs +108 -0
- package/dist/assets/shaders/webgl2/Phong.fs +1013 -0
- package/dist/assets/shaders/webgl2/Phong.vs +53 -0
- package/dist/assets/shaders/webgl2/PointSet.fs +696 -0
- package/dist/assets/shaders/webgl2/PointSet.vs +49 -0
- package/dist/assets/shaders/webgl2/Unlit.fs +693 -0
- package/dist/assets/shaders/webgl2/Unlit.vs +53 -0
- package/dist/assets/shaders/webgl2/Wireframe.fs +102 -0
- package/dist/assets/shaders/webgl2/Wireframe.vs +48 -0
- package/dist/example.html +8 -7
- package/dist/x_ite.css +167 -49
- package/dist/x_ite.js +66263 -60020
- package/dist/x_ite.min.js +41 -41
- package/dist/x_ite.zip +0 -0
- package/docs/404.md +5 -0
- package/docs/Accessing-the-External-Browser.md +319 -0
- package/docs/Browser-Support.md +47 -0
- package/docs/Custom-Shaders.md +896 -0
- package/docs/Features.md +49 -0
- package/docs/Glossary.md +339 -0
- package/docs/How-To-Configure-Your-Web-Server.md +56 -0
- package/docs/Supported-Nodes.md +370 -0
- package/docs/What's-New.md +1295 -0
- package/docs/XHTML-DOM-Integration.md +82 -0
- package/docs/_config.yml +140 -0
- package/docs/_data/navigation.yml +137 -0
- package/docs/assets/css/main.scss +100 -0
- package/docs/assets/images/logo.png +0 -0
- package/docs/google3696ee938394d7b6.html +1 -0
- package/docs/index.md +1033 -0
- package/docs/reference/Browser-Services.md +361 -0
- package/docs/reference/Constants-Services.md +376 -0
- package/docs/reference/ECMAScript-Object-and-Function-Definitions.md +128 -0
- package/docs/reference/Field-Services-and-Objects.md +1006 -0
- package/docs/reference/Prototype-Services.md +121 -0
- package/docs/reference/Route-Services.md +49 -0
- package/docs/reference/Scene-Services.md +360 -0
- package/docs/reference/Script-Node-Authoring-Interface.md +342 -0
- package/docs/tutorials/Adding-backgrounds.md +268 -0
- package/docs/tutorials/Adding-fog.md +67 -0
- package/docs/tutorials/Adding-sound.md +326 -0
- package/docs/tutorials/Animating-transforms.md +385 -0
- package/docs/tutorials/Basic-Nodes.md +317 -0
- package/docs/tutorials/Building-a-X3D-world.md +152 -0
- package/docs/tutorials/Building-elevation-grids.md +170 -0
- package/docs/tutorials/Building-extruded-shapes.md +145 -0
- package/docs/tutorials/Building-primitive-shapes.md +204 -0
- package/docs/tutorials/Building-shapes-out-of-points,-lines,-and-faces.md +311 -0
- package/docs/tutorials/Controlling-appearance-with-materials.md +186 -0
- package/docs/tutorials/Controlling-color-on-coordinate-based-geometry.md +208 -0
- package/docs/tutorials/Controlling-detail.md +130 -0
- package/docs/tutorials/Controlling-how-textures-are-mapped.md +277 -0
- package/docs/tutorials/Controlling-navigation.md +70 -0
- package/docs/tutorials/Controlling-shading-on-coordinate-based-geometry.md +180 -0
- package/docs/tutorials/Controlling-the-viewpoint.md +49 -0
- package/docs/tutorials/Creating-new-node-types.md +313 -0
- package/docs/tutorials/Grouping-nodes.md +237 -0
- package/docs/tutorials/Hello,-World!.md +204 -0
- package/docs/tutorials/Improving-Performance.md +227 -0
- package/docs/tutorials/Increasing-Rendering-Speed.md +110 -0
- package/docs/tutorials/Introducing-X3D.md +94 -0
- package/docs/tutorials/Introducing-animation.md +211 -0
- package/docs/tutorials/Introducing-script-use.md +127 -0
- package/docs/tutorials/Lighting-your-world.md +139 -0
- package/docs/tutorials/Mapping-textures.md +212 -0
- package/docs/tutorials/Naming-nodes.md +161 -0
- package/docs/tutorials/Providing-information-about-your-world.md +30 -0
- package/docs/tutorials/Sensing-the-viewer.md +205 -0
- package/docs/tutorials/Sensing-viewer-actions.md +214 -0
- package/docs/tutorials/Transforming-Shapes.md +270 -0
- package/docs/tutorials/Writing-program-scripts-with-ECMAScript.md +631 -0
- package/docs/tutorials/index.md +78 -0
- package/meta/logo/logo.png +0 -0
- package/meta/logo/logo.svg +216 -217
- package/meta/web3d.html +3 -3
- package/package.json +43 -28
- package/src/assets/components/annotation.js +87 -0
- package/src/{components → assets/components}/cad-geometry.js +0 -0
- package/src/{x_ite/Components/CubeMapTexturing.js → assets/components/cube-map-texturing.js} +15 -21
- package/src/assets/components/dis.js +84 -0
- package/src/{x_ite/Components/EventUtilities.js → assets/components/event-utilities.js} +20 -26
- package/src/{x_ite/Components/Geometry2D.js → assets/components/geometry2d.js} +22 -25
- package/src/{components → assets/components}/geospatial.js +0 -0
- package/src/{components → assets/components}/h-anim.js +9 -7
- package/src/{x_ite/Components/KeyDeviceSensor.js → assets/components/key-device-sensor.js} +17 -20
- package/src/{x_ite/Components/Layout.js → assets/components/layout.js} +20 -23
- package/src/{components → assets/components}/nurbs.js +0 -0
- package/src/{components → assets/components}/particle-systems.js +1 -1
- package/src/assets/components/picking.js +87 -0
- package/src/assets/components/projective-texture-mapping.js +75 -0
- package/src/{components → assets/components}/rigid-body-physics.js +7 -2
- package/src/{x_ite/Components/Scripting.js → assets/components/scripting.js} +13 -19
- package/src/{components → assets/components}/texturing-3d.js +12 -13
- package/src/assets/components/volume-rendering.js +118 -0
- package/src/{x_ite/Components/X_ITE.js → assets/components/x_ite.js} +12 -30
- package/src/assets/fonts/DroidSerif-Bold.ttf +0 -0
- package/src/assets/fonts/DroidSerif-BoldItalic.ttf +0 -0
- package/src/assets/fonts/DroidSerif-Italic.ttf +0 -0
- package/src/assets/fonts/DroidSerif-Regular.ttf +0 -0
- package/src/assets/fonts/Ubuntu-B.ttf +0 -0
- package/src/assets/fonts/Ubuntu-BI.ttf +0 -0
- package/src/assets/fonts/Ubuntu-R.ttf +0 -0
- package/src/assets/fonts/Ubuntu-RI.ttf +0 -0
- package/src/assets/fonts/UbuntuMono-B.ttf +0 -0
- package/src/assets/fonts/UbuntuMono-BI.ttf +0 -0
- package/src/assets/fonts/UbuntuMono-R.ttf +0 -0
- package/src/assets/fonts/UbuntuMono-RI.ttf +0 -0
- package/src/assets/hatching/0.png +0 -0
- package/src/assets/hatching/1.png +0 -0
- package/src/assets/hatching/10.png +0 -0
- package/src/assets/hatching/11.png +0 -0
- package/src/assets/hatching/12.png +0 -0
- package/src/assets/hatching/13.png +0 -0
- package/src/assets/hatching/14.png +0 -0
- package/src/assets/hatching/15.png +0 -0
- package/src/assets/hatching/16.png +0 -0
- package/src/assets/hatching/17.png +0 -0
- package/src/assets/hatching/18.png +0 -0
- package/src/assets/hatching/19.png +0 -0
- package/src/assets/hatching/2.png +0 -0
- package/src/assets/hatching/3.png +0 -0
- package/src/assets/hatching/4.png +0 -0
- package/src/assets/hatching/5.png +0 -0
- package/src/assets/hatching/6.png +0 -0
- package/src/assets/hatching/7.png +0 -0
- package/src/assets/hatching/8.png +0 -0
- package/src/assets/hatching/9.png +0 -0
- package/src/{images → assets/images}/ExamineViewer.png +0 -0
- package/src/{images → assets/images}/FlyViewer.png +0 -0
- package/src/{images → assets/images}/NoneViewer.png +0 -0
- package/src/{images → assets/images}/PlaneViewer.png +0 -0
- package/src/{images → assets/images}/PrimitiveQuality.png +0 -0
- package/src/{images → assets/images}/TextureQuality.png +0 -0
- package/src/{images → assets/images}/Time.png +0 -0
- package/src/{images → assets/images}/Viewpoint.png +0 -0
- package/src/{images → assets/images}/WalkViewer.png +0 -0
- package/src/assets/images/go-next.png +0 -0
- package/src/{images → assets/images}/gtk-fullscreen.png +0 -0
- package/src/{images → assets/images}/gtk-leave-fullscreen.png +0 -0
- package/src/{images → assets/images}/gtk-zoom-fit.png +0 -0
- package/src/{images → assets/images}/gtk-zoom-in.png +0 -0
- package/src/{images → assets/images}/help-about.png +0 -0
- package/src/{images → assets/images}/icon.bw.png +0 -0
- package/src/{images → assets/images}/icon.png +0 -0
- package/src/assets/images/logo.128.png +0 -0
- package/src/{images → assets/images}/logo.bw.png +0 -0
- package/src/{images → assets/images}/logo.png +0 -0
- package/src/assets/linetype/0.png +0 -0
- package/src/assets/linetype/1.png +0 -0
- package/src/assets/linetype/10.png +0 -0
- package/src/assets/linetype/11.png +0 -0
- package/src/assets/linetype/12.png +0 -0
- package/src/assets/linetype/13.png +0 -0
- package/src/assets/linetype/14.png +0 -0
- package/src/assets/linetype/15.png +0 -0
- package/src/assets/linetype/16.png +0 -0
- package/src/assets/linetype/2.png +0 -0
- package/src/assets/linetype/3.png +0 -0
- package/src/assets/linetype/4.png +0 -0
- package/src/assets/linetype/5.png +0 -0
- package/src/assets/linetype/6.png +0 -0
- package/src/assets/linetype/7.png +0 -0
- package/src/assets/linetype/8.png +0 -0
- package/src/assets/linetype/9.png +0 -0
- package/src/assets/shaders/Types.glsl +102 -0
- package/src/assets/shaders/webgl1/Background.fs +16 -0
- package/src/assets/shaders/webgl1/Background.vs +22 -0
- package/src/assets/shaders/webgl1/Depth.fs +16 -0
- package/src/assets/shaders/webgl1/Depth.vs +20 -0
- package/src/assets/shaders/webgl1/Fallback.fs +38 -0
- package/src/assets/shaders/webgl1/Fallback.vs +30 -0
- package/src/assets/shaders/webgl1/FallbackUnlit.fs +21 -0
- package/src/assets/shaders/webgl1/FallbackUnlit.vs +24 -0
- package/src/assets/shaders/webgl1/Gouraud.fs +66 -0
- package/src/assets/shaders/webgl1/Gouraud.vs +147 -0
- package/src/assets/shaders/webgl1/Phong.fs +172 -0
- package/src/assets/shaders/webgl1/Phong.vs +67 -0
- package/src/assets/shaders/webgl1/PointSet.fs +100 -0
- package/src/assets/shaders/webgl1/PointSet.vs +70 -0
- package/src/assets/shaders/webgl1/Unlit.fs +86 -0
- package/src/assets/shaders/webgl1/Unlit.vs +67 -0
- package/src/assets/shaders/webgl1/Wireframe.fs +74 -0
- package/src/assets/shaders/webgl1/Wireframe.vs +63 -0
- package/src/assets/shaders/webgl1/include/ClipPlanes.glsl +16 -0
- package/src/assets/shaders/webgl1/include/Fog.glsl +38 -0
- package/src/assets/shaders/webgl1/include/Hatch.glsl +18 -0
- package/src/{x_ite/Browser/Shaders/Include/Pack.h → assets/shaders/webgl1/include/Pack.glsl} +0 -1
- package/src/assets/shaders/webgl1/include/Perlin.glsl +40 -0
- package/src/{x_ite/Browser/Shaders/Include/Shadow.h → assets/shaders/webgl1/include/Shadow.glsl} +33 -33
- package/src/assets/shaders/webgl1/include/Texture.glsl +488 -0
- package/src/assets/shaders/webgl2/Background.fs +19 -0
- package/src/assets/shaders/webgl2/Background.vs +23 -0
- package/src/assets/shaders/webgl2/Depth.fs +19 -0
- package/src/assets/shaders/webgl2/Depth.vs +21 -0
- package/src/assets/shaders/webgl2/Gouraud.fs +64 -0
- package/src/assets/shaders/webgl2/Gouraud.vs +148 -0
- package/src/assets/shaders/webgl2/Phong.fs +170 -0
- package/src/assets/shaders/webgl2/Phong.vs +68 -0
- package/src/assets/shaders/webgl2/PointSet.fs +99 -0
- package/src/assets/shaders/webgl2/PointSet.vs +71 -0
- package/src/assets/shaders/webgl2/Unlit.fs +85 -0
- package/src/assets/shaders/webgl2/Unlit.vs +68 -0
- package/src/assets/shaders/webgl2/Wireframe.fs +73 -0
- package/src/assets/shaders/webgl2/Wireframe.vs +64 -0
- package/src/assets/shaders/webgl2/include/ClipPlanes.glsl +16 -0
- package/src/assets/shaders/webgl2/include/Fog.glsl +46 -0
- package/src/assets/shaders/webgl2/include/Hatch.glsl +18 -0
- package/src/assets/shaders/webgl2/include/Pack.glsl +51 -0
- package/src/assets/shaders/webgl2/include/Perlin.glsl +40 -0
- package/src/assets/shaders/webgl2/include/Shadow.glsl +324 -0
- package/src/assets/shaders/webgl2/include/Texture.glsl +623 -0
- package/src/bookmarks.js +33 -12
- package/src/dummy.js +1 -0
- package/src/example.html +8 -7
- package/src/examples.js +21 -3
- package/src/lib/ammojs/AmmoJS.js +58 -0
- package/src/lib/ammojs/Makefile +4 -0
- package/src/lib/ammojs/ammo.idl +72 -1
- package/src/lib/ammojs/ammo.js +25 -21
- package/src/lib/jpeg/jpeg.js +1019 -0
- package/src/lib/nurbs/extras/sample.js +137 -80
- package/src/locale/de.po +18 -73
- package/src/locale/fr.po +18 -74
- package/src/spinner.css +18 -6
- package/src/standard/Geospatial/Geodetic.js +43 -43
- package/src/standard/Geospatial/ReferenceEllipsoids.js +1 -1
- package/src/standard/Geospatial/UniversalTransverseMercator.js +42 -42
- package/src/standard/Math/Algorithm.js +22 -39
- package/src/standard/Math/Algorithms/Bezier.js +147 -0
- package/src/standard/Math/Algorithms/MergeSort.js +2 -2
- package/src/standard/Math/Algorithms/PartialSort.js +6 -6
- package/src/standard/Math/Algorithms/QuickSort.js +8 -6
- package/src/standard/Math/Algorithms/SAT.js +4 -8
- package/src/standard/Math/Algorithms/eigendecomposition.js +37 -33
- package/src/standard/Math/Geometry/Box2.js +84 -56
- package/src/standard/Math/Geometry/Box3.js +400 -358
- package/src/standard/Math/Geometry/Camera.js +19 -16
- package/src/standard/Math/Geometry/Cylinder3.js +13 -13
- package/src/standard/Math/Geometry/Line3.js +34 -34
- package/src/standard/Math/Geometry/Plane3.js +15 -15
- package/src/standard/Math/Geometry/Sphere3.js +122 -105
- package/src/standard/Math/Geometry/Spheroid3.js +1 -1
- package/src/standard/Math/Geometry/Triangle2.js +5 -5
- package/src/standard/Math/Geometry/Triangle3.js +12 -14
- package/src/standard/Math/Geometry/ViewVolume.js +303 -106
- package/src/standard/Math/Numbers/Color3.js +26 -23
- package/src/standard/Math/Numbers/Color4.js +9 -9
- package/src/standard/Math/Numbers/Complex.js +13 -17
- package/src/standard/Math/Numbers/Matrix2.js +20 -13
- package/src/standard/Math/Numbers/Matrix3.js +129 -205
- package/src/standard/Math/Numbers/Matrix4.js +136 -257
- package/src/standard/Math/Numbers/Quaternion.js +49 -138
- package/src/standard/Math/Numbers/Rotation4.js +42 -55
- package/src/standard/Math/Numbers/Vector2.js +32 -115
- package/src/standard/Math/Numbers/Vector3.js +46 -151
- package/src/standard/Math/Numbers/Vector4.js +44 -163
- package/src/standard/Math/Utility/BVH.js +21 -20
- package/src/standard/Math/Utility/MatrixStack.js +4 -4
- package/src/standard/Networking/BinaryTransport.js +8 -8
- package/src/standard/Time/MicroTime.js +81 -0
- package/src/standard/Utility/DataStorage.js +11 -14
- package/src/standard/Utility/MapUtilities.js +69 -0
- package/src/standard/Utility/ObjectCache.js +2 -3
- package/src/standard/Utility/Shuffle.js +5 -6
- package/src/tests.js +84 -5
- package/src/x_ite/Base/Events.js +9 -10
- package/src/x_ite/Base/X3DChildObject.js +20 -16
- package/src/x_ite/Base/X3DEventObject.js +3 -7
- package/src/x_ite/Base/X3DObject.js +44 -27
- package/src/x_ite/Basic/FieldDefinitionArray.js +11 -4
- package/src/x_ite/Basic/X3DBaseNode.js +427 -246
- package/src/x_ite/Basic/X3DField.js +48 -69
- package/src/x_ite/Basic/X3DFieldDefinition.js +0 -4
- package/src/x_ite/Basic/X3DObjectArrayField.js +102 -108
- package/src/x_ite/Basic/X3DTypedArrayField.js +194 -163
- package/src/x_ite/Bits/TraverseType.js +2 -5
- package/src/x_ite/Bits/X3DConstants.js +11 -2
- package/src/x_ite/Browser/Core/BrowserOptions.js +89 -68
- package/src/x_ite/Browser/Core/BrowserTimings.js +21 -29
- package/src/x_ite/Browser/Core/ContextMenu.js +139 -60
- package/src/x_ite/Browser/Core/Notification.js +3 -3
- package/src/x_ite/Browser/Core/PrimitiveQuality.js +3 -7
- package/src/x_ite/Browser/Core/Shading.js +3 -7
- package/src/x_ite/Browser/Core/TextureQuality.js +3 -7
- package/src/x_ite/Browser/Core/X3DCoreContext.js +398 -58
- package/src/x_ite/Browser/Core/X3DCoreContext.js.~1~ +714 -0
- package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +17 -28
- package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +5 -14
- package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +81 -28
- package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +53 -44
- package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +51 -12
- package/src/x_ite/Browser/Geometry3D/X3DGeometry3DContext.js +8 -9
- package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +98 -0
- package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +14 -206
- package/src/x_ite/Browser/Layout/ScreenText.js +226 -254
- package/src/x_ite/Browser/Layout/X3DLayoutContext.js +13 -11
- package/src/x_ite/Browser/Lighting/X3DLightingContext.js +15 -9
- package/src/x_ite/Browser/NURBS/NURBS.js +84 -72
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +125 -83
- package/src/x_ite/Browser/Navigation/FlyViewer.js +14 -9
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +60 -40
- package/src/x_ite/Browser/Navigation/NoneViewer.js +12 -1
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +39 -20
- package/src/x_ite/Browser/Navigation/WalkViewer.js +21 -6
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +110 -85
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +11 -6
- package/src/x_ite/Browser/Navigation/X3DViewer.js +73 -48
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +18 -24
- package/src/x_ite/Browser/Networking/urls.js +31 -16
- package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +5 -6
- package/src/x_ite/Browser/Picking/IntersectionType.js +63 -0
- package/src/x_ite/Browser/Picking/MatchCriterion.js +64 -0
- package/src/x_ite/Browser/Picking/SortOrder.js +65 -0
- package/src/x_ite/Browser/Picking/VolumePicker.js +197 -0
- package/src/x_ite/Browser/Picking/X3DPickingContext.js +130 -0
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +26 -20
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +17 -10
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +38 -27
- package/src/x_ite/Browser/RigidBodyPhysics/AppliedParametersType.js +70 -0
- package/src/x_ite/Browser/Shaders/Shader.js +112 -92
- package/src/x_ite/Browser/Shaders/ShaderSource.js +140 -0
- package/src/x_ite/Browser/Shaders/ShaderTest.js +92 -77
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +134 -74
- package/src/x_ite/Browser/Shape/AlphaMode.js +65 -0
- package/src/x_ite/Browser/Shape/LineStipples.xcf +0 -0
- package/src/x_ite/Browser/Shape/X3DShapeContext.js +108 -4
- package/src/x_ite/Browser/Text/PolygonText.js +153 -170
- package/src/x_ite/Browser/Text/TextAlignment.js +3 -7
- package/src/x_ite/Browser/Text/X3DTextContext.js +38 -30
- package/src/x_ite/Browser/Text/X3DTextGeometry.js +49 -74
- package/src/x_ite/Browser/Texturing/MultiTextureFunctionType.js +64 -0
- package/src/x_ite/Browser/Texturing/MultiTextureModeType.js +81 -0
- package/src/x_ite/Browser/Texturing/MultiTextureSourceType.js +65 -0
- package/src/x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType.js +73 -0
- package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +147 -45
- package/src/x_ite/Browser/Texturing3D/DICOMParser.js +1126 -0
- package/src/x_ite/Browser/Texturing3D/NRRDParser.js +686 -0
- package/src/x_ite/Browser/Time/X3DTimeContext.js +20 -17
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/VolumeRendering/VolumeStyle.fs +120 -0
- package/src/x_ite/Browser/VolumeRendering/VolumeStyle.vs +28 -0
- package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +114 -0
- package/src/x_ite/Browser/X3DBrowser.js +282 -224
- package/src/x_ite/Browser/X3DBrowserContext.js +60 -27
- package/src/x_ite/Components/Annotation/AnnotationLayer.js +108 -0
- package/src/x_ite/Components/Annotation/AnnotationTarget.js +101 -0
- package/src/x_ite/Components/Annotation/GroupAnnotation.js +112 -0
- package/src/x_ite/Components/Annotation/IconAnnotation.js +110 -0
- package/src/x_ite/Components/Annotation/TextAnnotation.js +102 -0
- package/src/x_ite/Components/Annotation/URLAnnotation.js +101 -0
- package/src/x_ite/Components/Annotation/X3DAnnotationNode.js +76 -0
- package/src/x_ite/Components/CADGeometry/CADAssembly.js +4 -4
- package/src/x_ite/Components/CADGeometry/CADFace.js +135 -30
- package/src/x_ite/Components/CADGeometry/CADLayer.js +3 -18
- package/src/x_ite/Components/CADGeometry/CADPart.js +4 -8
- package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +18 -10
- package/src/x_ite/Components/Core/WorldInfo.js +16 -6
- package/src/x_ite/Components/Core/X3DBindableNode.js +4 -33
- package/src/x_ite/Components/Core/X3DChildNode.js +14 -1
- package/src/x_ite/Components/Core/X3DNode.js +0 -63
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +128 -168
- package/src/x_ite/Components/Core.js +6 -9
- package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +38 -46
- package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +31 -30
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +42 -57
- package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +36 -48
- package/src/x_ite/Components/DIS/EspduTransform.js +12 -6
- package/src/x_ite/Components/DIS/ReceiverPdu.js +12 -6
- package/src/x_ite/Components/DIS/SignalPdu.js +12 -6
- package/src/x_ite/Components/DIS/TransmitterPdu.js +12 -6
- package/src/x_ite/Components/EnvironmentalEffects/Fog.js +5 -16
- package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +55 -3
- package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +3 -5
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +116 -116
- package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +5 -6
- package/src/x_ite/Components/EnvironmentalEffects.js +6 -9
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +116 -117
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +169 -49
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +31 -27
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +12 -5
- package/src/x_ite/Components/EnvironmentalSensor.js +6 -9
- package/src/x_ite/Components/Followers/ColorChaser.js +1 -3
- package/src/x_ite/Components/Followers/ColorDamper.js +1 -3
- package/src/x_ite/Components/Followers/CoordinateChaser.js +1 -7
- package/src/x_ite/Components/Followers/CoordinateDamper.js +0 -6
- package/src/x_ite/Components/Followers/OrientationChaser.js +7 -3
- package/src/x_ite/Components/Followers/OrientationDamper.js +7 -3
- package/src/x_ite/Components/Followers/PositionChaser.js +1 -3
- package/src/x_ite/Components/Followers/PositionChaser2D.js +1 -3
- package/src/x_ite/Components/Followers/PositionDamper.js +1 -3
- package/src/x_ite/Components/Followers/PositionDamper2D.js +1 -3
- package/src/x_ite/Components/Followers/ScalarChaser.js +1 -3
- package/src/x_ite/Components/Followers/ScalarDamper.js +1 -3
- package/src/x_ite/Components/Followers/TexCoordChaser2D.js +1 -7
- package/src/x_ite/Components/Followers/TexCoordDamper2D.js +1 -7
- package/src/x_ite/Components/Followers/X3DChaserNode.js +20 -18
- package/src/x_ite/Components/Followers/X3DDamperNode.js +5 -7
- package/src/x_ite/Components/Followers/X3DFollowerNode.js +5 -7
- package/src/x_ite/Components/Followers.js +6 -9
- package/src/x_ite/Components/Geometry2D/Arc2D.js +10 -14
- package/src/x_ite/Components/Geometry2D/ArcClose2D.js +87 -86
- package/src/x_ite/Components/Geometry2D/Circle2D.js +1 -3
- package/src/x_ite/Components/Geometry2D/Disk2D.js +43 -58
- package/src/x_ite/Components/Geometry2D/Polyline2D.js +4 -8
- package/src/x_ite/Components/Geometry2D/Polypoint2D.js +3 -5
- package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +20 -16
- package/src/x_ite/Components/Geometry3D/Cone.js +1 -3
- package/src/x_ite/Components/Geometry3D/Cylinder.js +3 -5
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +35 -17
- package/src/x_ite/Components/Geometry3D/Extrusion.js +125 -107
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +164 -142
- package/src/x_ite/Components/Geometry3D/Sphere.js +3 -5
- package/src/x_ite/Components/Geometry3D.js +6 -9
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +7 -7
- package/src/x_ite/Components/Geospatial/GeoLOD.js +207 -124
- package/src/x_ite/Components/Geospatial/GeoLocation.js +6 -6
- package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +5 -3
- package/src/x_ite/Components/Geospatial/GeoTransform.js +9 -9
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +27 -27
- package/src/x_ite/Components/Grouping/Group.js +3 -3
- package/src/x_ite/Components/Grouping/StaticGroup.js +49 -56
- package/src/x_ite/Components/Grouping/Switch.js +171 -21
- package/src/x_ite/Components/Grouping/Transform.js +3 -3
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +68 -15
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +339 -180
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +51 -25
- package/src/x_ite/Components/Grouping/X3DTransformNode.js +2 -4
- package/src/x_ite/Components/Grouping.js +6 -9
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimDisplacer.js +4 -4
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimHumanoid.js +24 -14
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimJoint.js +44 -20
- package/src/x_ite/Components/HAnim/HAnimMotion.js +113 -0
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimSegment.js +6 -4
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimSite.js +4 -4
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +8 -7
- package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +4 -3
- package/src/x_ite/Components/Interpolation.js +6 -9
- package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +1 -3
- package/src/x_ite/Components/Layering/Layer.js +12 -2
- package/src/x_ite/Components/Layering/LayerSet.js +4 -6
- package/src/x_ite/Components/Layering/Viewport.js +8 -8
- package/src/x_ite/Components/Layering/X3DLayerNode.js +67 -62
- package/src/x_ite/Components/Layering.js +6 -9
- package/src/x_ite/Components/Layout/LayoutGroup.js +18 -15
- package/src/x_ite/Components/Layout/LayoutLayer.js +10 -5
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +12 -14
- package/src/x_ite/Components/Layout/ScreenGroup.js +25 -31
- package/src/x_ite/Components/Lighting/DirectionalLight.js +27 -22
- package/src/x_ite/Components/Lighting/PointLight.js +26 -29
- package/src/x_ite/Components/Lighting/SpotLight.js +29 -24
- package/src/x_ite/Components/Lighting/X3DLightNode.js +85 -66
- package/src/x_ite/Components/Lighting.js +6 -9
- package/src/x_ite/Components/NURBS/Contour2D.js +45 -1
- package/src/x_ite/Components/NURBS/ContourPolyline2D.js +53 -25
- package/src/x_ite/Components/NURBS/NurbsCurve.js +21 -24
- package/src/x_ite/Components/NURBS/NurbsCurve2D.js +44 -25
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +19 -21
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +18 -20
- package/src/x_ite/Components/NURBS/NurbsSet.js +17 -6
- package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +2 -2
- package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +2 -2
- package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +15 -16
- package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +38 -1
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +116 -43
- package/src/x_ite/Components/Navigation/Billboard.js +12 -11
- package/src/x_ite/Components/Navigation/Collision.js +10 -8
- package/src/x_ite/Components/Navigation/LOD.js +207 -59
- package/src/x_ite/Components/Navigation/NavigationInfo.js +29 -43
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +99 -18
- package/src/x_ite/Components/Navigation/Viewpoint.js +15 -15
- package/src/x_ite/Components/Navigation/ViewpointGroup.js +12 -5
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +137 -148
- package/src/x_ite/Components/Navigation.js +6 -9
- package/src/x_ite/Components/Networking/Anchor.js +22 -24
- package/src/x_ite/Components/Networking/Inline.js +63 -44
- package/src/x_ite/Components/Networking/X3DUrlObject.js +88 -8
- package/src/x_ite/Components/Networking.js +6 -9
- package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +2 -2
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +215 -199
- package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +44 -39
- package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +48 -46
- package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +121 -117
- package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +21 -18
- package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +20 -22
- package/src/x_ite/Components/Picking/LinePickSensor.js +251 -6
- package/src/x_ite/Components/Picking/PickableGroup.js +120 -7
- package/src/x_ite/Components/Picking/PointPickSensor.js +260 -8
- package/src/x_ite/Components/Picking/PrimitivePickSensor.js +174 -4
- package/src/x_ite/Components/Picking/VolumePickSensor.js +150 -4
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +377 -4
- package/src/x_ite/Components/Picking/X3DPickableObject.js +21 -1
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +26 -11
- package/src/x_ite/Components/PointingDeviceSensor.js +6 -9
- package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorParallel.js +282 -0
- package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorPerspective.js +227 -0
- package/src/x_ite/Components/ProjectiveTextureMapping/X3DTextureProjectorNode.js +217 -0
- package/src/x_ite/Components/Rendering/ClipPlane.js +8 -10
- package/src/x_ite/Components/Rendering/Color.js +22 -13
- package/src/x_ite/Components/Rendering/ColorRGBA.js +28 -16
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +52 -33
- package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +17 -14
- package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +9 -4
- package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +17 -17
- package/src/x_ite/Components/Rendering/LineSet.js +44 -27
- package/src/x_ite/Components/Rendering/Normal.js +20 -4
- package/src/x_ite/Components/Rendering/PointSet.js +38 -16
- package/src/x_ite/Components/Rendering/TriangleFanSet.js +7 -9
- package/src/x_ite/Components/Rendering/TriangleStripSet.js +6 -8
- package/src/x_ite/Components/Rendering/X3DColorNode.js +16 -1
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +80 -55
- package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +11 -13
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +622 -477
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +159 -90
- package/src/x_ite/Components/Rendering.js +6 -9
- package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +8 -10
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +142 -26
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +312 -128
- package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +91 -7
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +189 -4
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +82 -4
- package/src/x_ite/Components/RigidBodyPhysics/Contact.js +1 -1
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +49 -37
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +45 -39
- package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +41 -34
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +25 -20
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +8 -10
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +15 -16
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +2 -4
- package/src/x_ite/Components/Scripting/Script.js +147 -101
- package/src/x_ite/Components/Scripting/X3DScriptNode.js +2 -4
- package/src/x_ite/Components/Shaders/ComposedShader.js +17 -19
- package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +9 -3
- package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +10 -3
- package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +10 -3
- package/src/x_ite/Components/Shaders/PackagedShader.js +18 -14
- package/src/x_ite/Components/Shaders/ShaderPart.js +30 -18
- package/src/x_ite/Components/Shaders/ShaderProgram.js +15 -11
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +681 -558
- package/src/x_ite/Components/Shaders/X3DShaderNode.js +48 -12
- package/src/x_ite/Components/Shaders.js +15 -18
- package/src/x_ite/Components/Shape/Appearance.js +153 -77
- package/src/x_ite/Components/Shape/FillProperties.js +63 -4
- package/src/x_ite/Components/Shape/LineProperties.js +27 -5
- package/src/x_ite/Components/Shape/Material.js +48 -62
- package/src/x_ite/Components/Shape/PointProperties.js +162 -0
- package/src/x_ite/Components/Shape/Shape.js +86 -39
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +53 -59
- package/src/x_ite/Components/Shape/UnlitMaterial.js +109 -0
- package/src/x_ite/Components/Shape/X3DAppearanceNode.js +9 -6
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +16 -3
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +111 -0
- package/src/x_ite/Components/Shape/X3DShapeNode.js +41 -17
- package/src/x_ite/Components/Shape.js +22 -16
- package/src/x_ite/Components/Sound/AudioClip.js +36 -50
- package/src/x_ite/Components/Sound/Sound.js +36 -36
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +18 -6
- package/src/x_ite/Components/Sound.js +6 -9
- package/src/x_ite/Components/Text/FontStyle.js +10 -12
- package/src/x_ite/Components/Text/Text.js +6 -6
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +56 -87
- package/src/x_ite/Components/Text.js +6 -9
- package/src/x_ite/Components/Texturing/ImageTexture.js +48 -63
- package/src/x_ite/Components/Texturing/MovieTexture.js +42 -56
- package/src/x_ite/Components/Texturing/MultiTexture.js +236 -11
- package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +73 -6
- package/src/x_ite/Components/Texturing/MultiTextureTransform.js +45 -4
- package/src/x_ite/Components/Texturing/PixelTexture.js +45 -11
- package/src/x_ite/Components/Texturing/TextureCoordinate.js +32 -17
- package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +68 -8
- package/src/x_ite/Components/Texturing/TextureProperties.js +96 -65
- package/src/x_ite/Components/Texturing/TextureTransform.js +55 -47
- package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +91 -0
- package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +183 -0
- package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +77 -0
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +42 -95
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js.~1~ +209 -0
- package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +3 -17
- package/src/x_ite/Components/Texturing/X3DTextureNode.js +6 -67
- package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +4 -11
- package/src/x_ite/Components/Texturing.js +31 -25
- package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +88 -4
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +105 -13
- package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +124 -4
- package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +35 -18
- package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +35 -18
- package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +41 -31
- package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +18 -11
- package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +110 -6
- package/src/x_ite/Components/Time/TimeSensor.js +23 -19
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +11 -7
- package/src/x_ite/Components/Time.js +6 -9
- package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +309 -8
- package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +58 -4
- package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +217 -6
- package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +132 -3
- package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +86 -5
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +309 -11
- package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +85 -3
- package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +134 -2
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +222 -9
- package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +191 -8
- package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +85 -6
- package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +95 -5
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +153 -8
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +155 -3
- package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +62 -0
- package/src/x_ite/Components/X_ITE/BlendMode.js +51 -51
- package/src/x_ite/Components.js +11 -16
- package/src/x_ite/Configuration/ComponentInfo.js +12 -6
- package/src/x_ite/Configuration/ComponentInfoArray.js +4 -7
- package/src/x_ite/Configuration/ProfileInfo.js +10 -6
- package/src/x_ite/Configuration/SupportedComponents.js +66 -40
- package/src/x_ite/Configuration/SupportedNodes.js +22 -6
- package/src/x_ite/Configuration/SupportedProfiles.js +91 -89
- package/src/x_ite/Configuration/UnitInfo.js +12 -2
- package/src/x_ite/Configuration/X3DInfoArray.js +37 -18
- package/src/x_ite/Execution/BindableList.js +63 -38
- package/src/x_ite/Execution/BindableStack.js +63 -71
- package/src/x_ite/Execution/ExportedNode.js +25 -2
- package/src/x_ite/Execution/ImportedNode.js +122 -39
- package/src/x_ite/Execution/Scene.js +22 -14
- package/src/x_ite/Execution/World.js +22 -19
- package/src/x_ite/Execution/X3DExecutionContext.js +381 -221
- package/src/x_ite/Execution/X3DScene.js +213 -53
- package/src/x_ite/{Error.js → Fallback.js} +26 -29
- package/src/x_ite/Fields/ArrayFields.js +176 -57
- package/src/x_ite/Fields/SFBool.js +6 -5
- package/src/x_ite/Fields/SFColor.js +24 -21
- package/src/x_ite/Fields/SFColorRGBA.js +23 -23
- package/src/x_ite/Fields/SFDouble.js +6 -5
- package/src/x_ite/Fields/SFFloat.js +7 -6
- package/src/x_ite/Fields/SFImage.js +37 -36
- package/src/x_ite/Fields/SFInt32.js +5 -4
- package/src/x_ite/Fields/SFMatrix3.js +19 -15
- package/src/x_ite/Fields/SFMatrix4.js +19 -15
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +10 -2
- package/src/x_ite/Fields/SFNode.js +105 -53
- package/src/x_ite/Fields/SFNodeCache.js +93 -0
- package/src/x_ite/Fields/SFRotation.js +31 -27
- package/src/x_ite/Fields/SFString.js +9 -8
- package/src/x_ite/Fields/SFTime.js +6 -5
- package/src/x_ite/Fields/SFVec2.js +17 -13
- package/src/x_ite/Fields/SFVec3.js +21 -17
- package/src/x_ite/Fields/SFVec4.js +24 -20
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +8 -4
- package/src/x_ite/Fields.js +2 -6
- package/src/x_ite/InputOutput/FileLoader.js +174 -190
- package/src/x_ite/InputOutput/Generator.js +133 -104
- package/src/x_ite/Parser/HTMLSupport.js +3 -596
- package/src/x_ite/Parser/JSONParser.js +348 -245
- package/src/x_ite/Parser/Parser.js +314 -303
- package/src/x_ite/Parser/X3DParser.js +41 -20
- package/src/x_ite/Parser/XMLParser.js +178 -60
- package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +17 -0
- package/src/x_ite/Prototype/ProtoDeclarationArray.js +17 -0
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +104 -44
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +111 -42
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +16 -14
- package/src/x_ite/Rendering/DependentRenderer.js +7 -9
- package/src/x_ite/Rendering/TextureBuffer.js +24 -19
- package/src/x_ite/Rendering/X3DRenderObject.js +455 -428
- package/src/x_ite/Routing/RouteArray.js +34 -11
- package/src/x_ite/Routing/X3DRoute.js +60 -60
- package/src/x_ite/Routing/X3DRoutingContext.js +6 -6
- package/src/x_ite/X3D.js +30 -37
- package/src/x_ite.config.js +40 -5
- package/src/x_ite.css +165 -45
- package/src/x_ite.html +49 -29
- package/src/x_ite.js +86 -25
- package/x_ite.min.html +49 -22
- package/.bzrignore +0 -3
- package/AUTHORS.md +0 -6
- package/STYLE_GUIDE.md +0 -51
- package/X_ITE.sln +0 -54
- package/X_ITE.userprefs +0 -14
- package/build/build.mdproj +0 -47
- package/build/cad-geometry.build.js +0 -15
- package/build/geospatial.build.js +0 -15
- package/build/h-anim.build.js +0 -15
- package/build/nurbs.build.js +0 -15
- package/build/particle-systems.build.js +0 -15
- package/build/parts/cad-geometry.end.frag +0 -2
- package/build/parts/cad-geometry.start.frag +0 -6
- package/build/parts/geospatial.end.frag +0 -2
- package/build/parts/geospatial.start.frag +0 -6
- package/build/parts/h-anim.end.frag +0 -2
- package/build/parts/h-anim.start.frag +0 -6
- package/build/parts/nurbs.end.frag +0 -2
- package/build/parts/nurbs.start.frag +0 -6
- package/build/parts/particle-systems.end.frag +0 -2
- package/build/parts/particle-systems.start.frag +0 -6
- package/build/parts/rigid-body-physics.end.frag +0 -2
- package/build/parts/rigid-body-physics.start.frag +0 -6
- package/build/parts/texturing-3d.end.frag +0 -2
- package/build/parts/texturing-3d.start.frag +0 -6
- package/build/parts/x_ite.end.frag +0 -9
- package/build/parts/x_ite.start.frag +0 -6
- package/build/rigid-body-physics.build.js +0 -15
- package/build/texturing-3d.build.js +0 -15
- package/dist/components/README +0 -3
- package/dist/components/cad-geometry.min.js +0 -1
- package/dist/components/geospatial.min.js +0 -2
- package/dist/components/h-anim.min.js +0 -1
- package/dist/components/nurbs.min.js +0 -2
- package/dist/components/particle-systems.min.js +0 -2
- package/dist/components/rigid-body-physics.js +0 -3761
- package/dist/components/rigid-body-physics.min.js +0 -56
- package/dist/components/texturing-3d.min.js +0 -1
- package/dist/dist.mdproj +0 -61
- package/dist/images/logo.128.png +0 -0
- package/fonts/fonts.mdproj +0 -29
- package/meta/meta.mdproj +0 -35
- package/src/components/cad-geometry.config.js +0 -56
- package/src/components/geospatial.config.js +0 -56
- package/src/components/h-anim.config.js +0 -56
- package/src/components/nurbs.config.js +0 -61
- package/src/components/particle-systems.config.js +0 -56
- package/src/components/rigid-body-physics.config.js +0 -61
- package/src/components/texturing-3d.config.js +0 -56
- package/src/images/logo.128.png +0 -0
- package/src/locale/de.mo +0 -0
- package/src/locale/fr.mo +0 -0
- package/src/src.mdproj +0 -698
- package/src/standard/Networking/URI.js +0 -785
- package/src/test.x3d +0 -225
- package/src/x_ite/Browser/Shaders/Background.fs +0 -31
- package/src/x_ite/Browser/Shaders/Background.vs +0 -23
- package/src/x_ite/Browser/Shaders/Depth.fs +0 -32
- package/src/x_ite/Browser/Shaders/Depth.vs +0 -21
- package/src/x_ite/Browser/Shaders/Gouraud.fs +0 -135
- package/src/x_ite/Browser/Shaders/Gouraud.vs +0 -145
- package/src/x_ite/Browser/Shaders/Phong.fs +0 -269
- package/src/x_ite/Browser/Shaders/Phong.vs +0 -47
- package/src/x_ite/Browser/Shaders/PointSet.fs +0 -86
- package/src/x_ite/Browser/Shaders/Types.h +0 -55
- package/src/x_ite/Browser/Shaders/Wireframe.fs +0 -82
- package/src/x_ite/Browser/Shaders/Wireframe.vs +0 -61
- package/src/x_ite/Components/DIS.js +0 -91
- package/src/x_ite/Components/Picking.js +0 -94
- package/src/x_ite/Components/VolumeRendering.js +0 -121
|
@@ -49,10 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
define ([
|
|
51
51
|
"x_ite/Fields",
|
|
52
|
-
"x_ite/Basic/X3DFieldDefinition",
|
|
53
|
-
"x_ite/Basic/FieldDefinitionArray",
|
|
54
52
|
"x_ite/Basic/X3DBaseNode",
|
|
55
|
-
"x_ite/Configuration/ComponentInfoArray",
|
|
56
53
|
"x_ite/Execution/ImportedNode",
|
|
57
54
|
"x_ite/Prototype/ExternProtoDeclarationArray",
|
|
58
55
|
"x_ite/Prototype/ProtoDeclarationArray",
|
|
@@ -60,15 +57,12 @@ define ([
|
|
|
60
57
|
"x_ite/Routing/X3DRoute",
|
|
61
58
|
"x_ite/Bits/X3DCast",
|
|
62
59
|
"x_ite/Bits/X3DConstants",
|
|
63
|
-
"standard/Networking/URI",
|
|
64
|
-
"standard/Math/Algorithm",
|
|
65
60
|
"x_ite/InputOutput/Generator",
|
|
61
|
+
"x_ite/Fields/SFNodeCache",
|
|
62
|
+
"standard/Math/Algorithm",
|
|
66
63
|
],
|
|
67
64
|
function (Fields,
|
|
68
|
-
X3DFieldDefinition,
|
|
69
|
-
FieldDefinitionArray,
|
|
70
65
|
X3DBaseNode,
|
|
71
|
-
ComponentInfoArray,
|
|
72
66
|
ImportedNode,
|
|
73
67
|
ExternProtoDeclarationArray,
|
|
74
68
|
ProtoDeclarationArray,
|
|
@@ -76,9 +70,9 @@ function (Fields,
|
|
|
76
70
|
X3DRoute,
|
|
77
71
|
X3DCast,
|
|
78
72
|
X3DConstants,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
73
|
+
Generator,
|
|
74
|
+
SFNodeCache,
|
|
75
|
+
Algorithm)
|
|
82
76
|
{
|
|
83
77
|
"use strict";
|
|
84
78
|
|
|
@@ -86,53 +80,24 @@ function (Fields,
|
|
|
86
80
|
{
|
|
87
81
|
X3DBaseNode .call (this, executionContext);
|
|
88
82
|
|
|
89
|
-
this .addChildObjects ("rootNodes",
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
this .
|
|
94
|
-
|
|
95
|
-
this .
|
|
96
|
-
this .
|
|
97
|
-
this .
|
|
98
|
-
this .
|
|
99
|
-
this .
|
|
100
|
-
this .
|
|
101
|
-
this .importedNodes = { };
|
|
102
|
-
this .protos = new ProtoDeclarationArray ();
|
|
103
|
-
this .externprotos = new ExternProtoDeclarationArray ();
|
|
104
|
-
this .routes = new RouteArray ();
|
|
105
|
-
this .routeIndex = { };
|
|
83
|
+
this .addChildObjects ("rootNodes", new Fields .MFNode (),
|
|
84
|
+
"worldInfos", new Fields .MFNode ());
|
|
85
|
+
|
|
86
|
+
this .rootNodes_ .setAccessType (X3DConstants .initializeOnly);
|
|
87
|
+
this .rootNodes_ .addCloneCount (1);
|
|
88
|
+
|
|
89
|
+
this ._namedNodes = new Map ();
|
|
90
|
+
this ._importedNodes = new Map ();
|
|
91
|
+
this ._protos = new ProtoDeclarationArray ();
|
|
92
|
+
this ._externprotos = new ExternProtoDeclarationArray ();
|
|
93
|
+
this ._routes = new RouteArray ();
|
|
94
|
+
this ._routeIndex = new Map ();
|
|
106
95
|
}
|
|
107
96
|
|
|
108
97
|
X3DExecutionContext .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
109
98
|
{
|
|
110
99
|
constructor: X3DExecutionContext,
|
|
111
|
-
|
|
112
|
-
{
|
|
113
|
-
X3DBaseNode .prototype .setup .call (this);
|
|
114
|
-
|
|
115
|
-
var X3DProtoDeclaration = require ("x_ite/Prototype/X3DProtoDeclaration")
|
|
116
|
-
|
|
117
|
-
if (! (this instanceof X3DProtoDeclaration))
|
|
118
|
-
{
|
|
119
|
-
// Setup nodes.
|
|
120
|
-
|
|
121
|
-
while (this .uninitializedNodes .length)
|
|
122
|
-
{
|
|
123
|
-
var uninitializedNodes = this .uninitializedNodes;
|
|
124
|
-
|
|
125
|
-
this .uninitializedNodes = this .uninitializedNodes2;
|
|
126
|
-
this .uninitializedNodes2 = uninitializedNodes;
|
|
127
|
-
|
|
128
|
-
for (var i = 0, length = uninitializedNodes .length; i < length; ++ i)
|
|
129
|
-
uninitializedNodes [i] .setup ();
|
|
130
|
-
|
|
131
|
-
uninitializedNodes .length = 0;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
isMasterContext: function ()
|
|
100
|
+
isMainContext: function ()
|
|
136
101
|
{
|
|
137
102
|
return false;
|
|
138
103
|
},
|
|
@@ -140,78 +105,99 @@ function (Fields,
|
|
|
140
105
|
{
|
|
141
106
|
return false;
|
|
142
107
|
},
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
return this .specificationVersion;
|
|
146
|
-
},
|
|
147
|
-
setEncoding: function (value)
|
|
108
|
+
getPrototype: function ()
|
|
148
109
|
{
|
|
149
|
-
|
|
110
|
+
const X3DProtoDeclaration = require ("x_ite/Prototype/X3DProtoDeclaration");
|
|
111
|
+
|
|
112
|
+
for (const node of this .getParents ())
|
|
113
|
+
{
|
|
114
|
+
if (node instanceof X3DProtoDeclaration)
|
|
115
|
+
return node;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return null;
|
|
150
119
|
},
|
|
151
|
-
|
|
120
|
+
getInstance: function ()
|
|
152
121
|
{
|
|
153
|
-
|
|
122
|
+
const X3DPrototypeInstance = require ("x_ite/Components/Core/X3DPrototypeInstance");
|
|
123
|
+
|
|
124
|
+
for (const node of this .getParents ())
|
|
125
|
+
{
|
|
126
|
+
if (node instanceof X3DPrototypeInstance)
|
|
127
|
+
return node;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return null;
|
|
154
131
|
},
|
|
155
|
-
|
|
132
|
+
getSpecificationVersion: function ()
|
|
156
133
|
{
|
|
157
|
-
return this .
|
|
134
|
+
return this .getExecutionContext () .getSpecificationVersion ();
|
|
158
135
|
},
|
|
159
|
-
|
|
136
|
+
getEncoding: function ()
|
|
160
137
|
{
|
|
161
|
-
this .
|
|
138
|
+
return this .getExecutionContext () .getEncoding ();
|
|
162
139
|
},
|
|
163
|
-
|
|
140
|
+
getWorldURL: function ()
|
|
164
141
|
{
|
|
165
|
-
return this .
|
|
142
|
+
return this .getExecutionContext () .getWorldURL ();
|
|
166
143
|
},
|
|
167
|
-
|
|
144
|
+
getProfile: function ()
|
|
168
145
|
{
|
|
169
|
-
this .
|
|
146
|
+
return this .getExecutionContext () .getProfile ();
|
|
170
147
|
},
|
|
171
|
-
|
|
148
|
+
getComponents: function ()
|
|
172
149
|
{
|
|
173
|
-
return this .
|
|
150
|
+
return this .getExecutionContext () .getComponents ();
|
|
174
151
|
},
|
|
175
|
-
|
|
152
|
+
fromUnit: function (category, value)
|
|
176
153
|
{
|
|
177
|
-
this .
|
|
154
|
+
return this .getExecutionContext () .fromUnit (category, value);
|
|
178
155
|
},
|
|
179
|
-
|
|
156
|
+
toUnit: function (category, value)
|
|
180
157
|
{
|
|
181
|
-
return this .
|
|
158
|
+
return this .getExecutionContext () .toUnit (category, value);
|
|
182
159
|
},
|
|
183
160
|
getUnits: function ()
|
|
184
161
|
{
|
|
185
162
|
return this .getExecutionContext () .getUnits ();
|
|
186
163
|
},
|
|
187
|
-
createNode: function (typeName, setup)
|
|
164
|
+
createNode: function (typeName, setup = true)
|
|
188
165
|
{
|
|
189
|
-
|
|
166
|
+
if (setup === false)
|
|
167
|
+
{
|
|
168
|
+
const Type = this .getBrowser () .getSupportedNode (typeName);
|
|
169
|
+
|
|
170
|
+
if (! Type)
|
|
171
|
+
return null;
|
|
190
172
|
|
|
191
|
-
|
|
192
|
-
|
|
173
|
+
return new Type (this);
|
|
174
|
+
}
|
|
175
|
+
else
|
|
176
|
+
{
|
|
177
|
+
const Type = this .getBrowser () .getSupportedNode (typeName);
|
|
193
178
|
|
|
194
|
-
|
|
179
|
+
if (! Type)
|
|
180
|
+
throw new Error ("Unknown node type '" + typeName + "'.");
|
|
195
181
|
|
|
196
|
-
|
|
197
|
-
return node;
|
|
182
|
+
const baseNode = new Type (this);
|
|
198
183
|
|
|
199
|
-
|
|
184
|
+
baseNode .setup ();
|
|
200
185
|
|
|
201
|
-
|
|
186
|
+
return SFNodeCache .add (baseNode);
|
|
187
|
+
}
|
|
202
188
|
},
|
|
203
|
-
createProto: function (name, setup)
|
|
189
|
+
createProto: function (name, setup = true)
|
|
204
190
|
{
|
|
205
|
-
|
|
191
|
+
let executionContext = this;
|
|
206
192
|
|
|
207
193
|
for (;;)
|
|
208
194
|
{
|
|
209
|
-
|
|
195
|
+
const proto = executionContext .protos .get (name);
|
|
210
196
|
|
|
211
197
|
if (proto)
|
|
212
198
|
return proto .createInstance (this, setup);
|
|
213
199
|
|
|
214
|
-
|
|
200
|
+
const externproto = executionContext .externprotos .get (name);
|
|
215
201
|
|
|
216
202
|
if (externproto)
|
|
217
203
|
return externproto .createInstance (this, setup);
|
|
@@ -222,15 +208,14 @@ function (Fields,
|
|
|
222
208
|
executionContext = executionContext .getExecutionContext ();
|
|
223
209
|
}
|
|
224
210
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
this .uninitializedNodes .push (node);
|
|
211
|
+
if (setup === false)
|
|
212
|
+
return null;
|
|
213
|
+
else
|
|
214
|
+
throw new Error ("Unknown proto or externproto type '" + name + "'.");
|
|
230
215
|
},
|
|
231
216
|
addNamedNode: function (name, node)
|
|
232
217
|
{
|
|
233
|
-
if (this .
|
|
218
|
+
if (this ._namedNodes .has (name))
|
|
234
219
|
throw new Error ("Couldn't add named node: node named '" + name + "' is already in use.");
|
|
235
220
|
|
|
236
221
|
this .updateNamedNode (name, node);
|
|
@@ -241,12 +226,13 @@ function (Fields,
|
|
|
241
226
|
throw new Error ("Couldn't update named node: node must be of type SFNode.");
|
|
242
227
|
|
|
243
228
|
name = String (name);
|
|
244
|
-
node = new Fields .SFNode (node instanceof Fields .SFNode ? node .getValue () : node);
|
|
245
229
|
|
|
246
|
-
|
|
230
|
+
const baseNode = node instanceof Fields .SFNode ? node .getValue () : node;
|
|
231
|
+
|
|
232
|
+
if (! baseNode)
|
|
247
233
|
throw new Error ("Couldn't update named node: node IS NULL.");
|
|
248
234
|
|
|
249
|
-
if (
|
|
235
|
+
if (baseNode .getExecutionContext () !== this)
|
|
250
236
|
throw new Error ("Couldn't update named node: node does not belong to this execution context.");
|
|
251
237
|
|
|
252
238
|
if (name .length === 0)
|
|
@@ -254,46 +240,50 @@ function (Fields,
|
|
|
254
240
|
|
|
255
241
|
// Remove named node.
|
|
256
242
|
|
|
257
|
-
this .removeNamedNode (
|
|
243
|
+
this .removeNamedNode (baseNode .getName ());
|
|
258
244
|
this .removeNamedNode (name);
|
|
259
245
|
|
|
260
246
|
// Update named node.
|
|
261
247
|
|
|
262
|
-
|
|
248
|
+
baseNode .setName (name);
|
|
263
249
|
|
|
264
|
-
this .
|
|
250
|
+
this ._namedNodes .set (name, baseNode);
|
|
265
251
|
},
|
|
266
252
|
removeNamedNode: function (name)
|
|
267
253
|
{
|
|
268
|
-
|
|
254
|
+
this ._namedNodes .delete (name);
|
|
269
255
|
},
|
|
270
256
|
getNamedNode: function (name)
|
|
271
257
|
{
|
|
272
|
-
|
|
258
|
+
const baseNode = this ._namedNodes .get (name);
|
|
273
259
|
|
|
274
|
-
if (
|
|
275
|
-
|
|
260
|
+
if (baseNode)
|
|
261
|
+
return SFNodeCache .get (baseNode);
|
|
276
262
|
|
|
277
|
-
|
|
263
|
+
throw new Error ("Named node '" + name + "' not found.");
|
|
264
|
+
},
|
|
265
|
+
getNamedNodes: function ()
|
|
266
|
+
{
|
|
267
|
+
return this ._namedNodes;
|
|
278
268
|
},
|
|
279
269
|
getUniqueName: function (name)
|
|
280
270
|
{
|
|
281
|
-
|
|
271
|
+
const _TrailingNumbers = /(_\d+$)/;
|
|
282
272
|
|
|
283
273
|
name = name .replace (_TrailingNumbers, "");
|
|
284
274
|
|
|
285
|
-
|
|
275
|
+
let
|
|
286
276
|
newName = name,
|
|
287
277
|
i = 64;
|
|
288
278
|
|
|
289
279
|
for (; i;)
|
|
290
280
|
{
|
|
291
|
-
if (this .
|
|
281
|
+
if (this ._namedNodes .has (newName) || newName .length === 0)
|
|
292
282
|
{
|
|
293
|
-
|
|
283
|
+
const
|
|
294
284
|
min = i,
|
|
295
285
|
max = i <<= 1;
|
|
296
|
-
|
|
286
|
+
|
|
297
287
|
newName = name;
|
|
298
288
|
newName += '_';
|
|
299
289
|
newName += Math .round (Algorithm .random (min, max));
|
|
@@ -301,7 +291,7 @@ function (Fields,
|
|
|
301
291
|
else
|
|
302
292
|
break;
|
|
303
293
|
}
|
|
304
|
-
|
|
294
|
+
|
|
305
295
|
return newName;
|
|
306
296
|
},
|
|
307
297
|
addImportedNode: function (inlineNode, exportedName, importedName)
|
|
@@ -309,7 +299,7 @@ function (Fields,
|
|
|
309
299
|
if (importedName === undefined)
|
|
310
300
|
importedName = exportedName;
|
|
311
301
|
|
|
312
|
-
if (this .
|
|
302
|
+
if (this ._importedNodes .has (importedName))
|
|
313
303
|
throw new Error ("Couldn't add imported node: imported name '" + importedName + "' already in use.");
|
|
314
304
|
|
|
315
305
|
this .updateImportedNode (inlineNode, exportedName, importedName);
|
|
@@ -332,51 +322,39 @@ function (Fields,
|
|
|
332
322
|
if (importedName .length === 0)
|
|
333
323
|
throw new Error ("Couldn't update imported node: imported name is empty.");
|
|
334
324
|
|
|
335
|
-
// Update
|
|
325
|
+
// Update imported node.
|
|
336
326
|
|
|
337
|
-
|
|
338
|
-
{
|
|
339
|
-
var importedNode = this .importedNodes [key];
|
|
340
|
-
|
|
341
|
-
if (importedNode .getInlineNode () === inlineNode && importedNode .getExportedName () === exportedName)
|
|
342
|
-
{
|
|
343
|
-
delete this .importedNodes [key];
|
|
344
|
-
|
|
345
|
-
this .importedNodes [importedName] = importedNode;
|
|
346
|
-
|
|
347
|
-
importedNode .setImportedName (importedName);
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
327
|
+
this .removeImportedNode (importedName);
|
|
351
328
|
|
|
352
|
-
|
|
329
|
+
const importedNode = new ImportedNode (this, inlineNode, exportedName, importedName);
|
|
353
330
|
|
|
354
|
-
this .
|
|
331
|
+
this ._importedNodes .set (importedName, importedNode);
|
|
355
332
|
|
|
356
|
-
|
|
357
|
-
this .importedNodes [importedName] .setup ();
|
|
333
|
+
importedNode .setup ();
|
|
358
334
|
},
|
|
359
335
|
removeImportedNode: function (importedName)
|
|
360
336
|
{
|
|
361
|
-
|
|
337
|
+
const importedNode = this ._importedNodes .get (importedName);
|
|
362
338
|
|
|
363
|
-
if (importedNode)
|
|
364
|
-
|
|
339
|
+
if (! importedNode)
|
|
340
|
+
return;
|
|
341
|
+
|
|
342
|
+
importedNode .dispose ();
|
|
365
343
|
|
|
366
|
-
|
|
344
|
+
this ._importedNodes .delete (importedName);
|
|
367
345
|
},
|
|
368
346
|
getImportedNode: function (importedName)
|
|
369
347
|
{
|
|
370
|
-
|
|
348
|
+
const importedNode = this ._importedNodes .get (importedName);
|
|
371
349
|
|
|
372
350
|
if (importedNode)
|
|
373
|
-
return importedNode .getExportedNode ();
|
|
351
|
+
return importedNode .getExportedNode () .valueOf ();
|
|
374
352
|
|
|
375
353
|
throw new Error ("Imported node '" + importedName + "' not found.");
|
|
376
354
|
},
|
|
377
355
|
getImportedNodes: function ()
|
|
378
356
|
{
|
|
379
|
-
return this .
|
|
357
|
+
return this ._importedNodes;
|
|
380
358
|
},
|
|
381
359
|
getLocalNode: function (name)
|
|
382
360
|
{
|
|
@@ -386,10 +364,10 @@ function (Fields,
|
|
|
386
364
|
}
|
|
387
365
|
catch (error)
|
|
388
366
|
{
|
|
389
|
-
|
|
367
|
+
const importedNode = this ._importedNodes .get (name);
|
|
390
368
|
|
|
391
369
|
if (importedNode)
|
|
392
|
-
return
|
|
370
|
+
return SFNodeCache .get (importedNode);
|
|
393
371
|
|
|
394
372
|
throw new Error ("Unknown named or imported node '" + name + "'.");
|
|
395
373
|
}
|
|
@@ -398,21 +376,21 @@ function (Fields,
|
|
|
398
376
|
{
|
|
399
377
|
if (! (node instanceof Fields .SFNode))
|
|
400
378
|
throw new Error ("Couldn't get local name: node is NULL.");
|
|
401
|
-
|
|
379
|
+
|
|
402
380
|
if (node .getValue () .getExecutionContext () === this)
|
|
403
381
|
return node .getValue () .getName ();
|
|
404
382
|
|
|
405
|
-
for (
|
|
383
|
+
for (const importedNode of this ._importedNodes .values ())
|
|
406
384
|
{
|
|
407
385
|
try
|
|
408
386
|
{
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
if (importedNode .getExportedNode () === node)
|
|
412
|
-
return key;
|
|
387
|
+
if (importedNode .getExportedNode () .getValue () === node .getValue ())
|
|
388
|
+
return importedNode .getImportedName ();
|
|
413
389
|
}
|
|
414
390
|
catch (error)
|
|
415
|
-
{
|
|
391
|
+
{
|
|
392
|
+
//console .log (error);
|
|
393
|
+
}
|
|
416
394
|
}
|
|
417
395
|
|
|
418
396
|
throw new Error ("Couldn't get local name: node is shared.");
|
|
@@ -424,19 +402,29 @@ function (Fields,
|
|
|
424
402
|
},
|
|
425
403
|
getProtoDeclaration: function (name)
|
|
426
404
|
{
|
|
427
|
-
|
|
405
|
+
const proto = this ._protos .get (name);
|
|
406
|
+
|
|
407
|
+
if (proto)
|
|
408
|
+
return proto;
|
|
409
|
+
|
|
410
|
+
throw new Error ("Proto declaration '" + name + "' not found.");
|
|
428
411
|
},
|
|
429
412
|
getProtoDeclarations: function ()
|
|
430
413
|
{
|
|
431
|
-
return this .
|
|
414
|
+
return this ._protos;
|
|
432
415
|
},
|
|
433
416
|
getExternProtoDeclaration: function (name)
|
|
434
417
|
{
|
|
435
|
-
|
|
418
|
+
const externproto = this ._externprotos .get (name);
|
|
419
|
+
|
|
420
|
+
if (externproto)
|
|
421
|
+
return externproto;
|
|
422
|
+
|
|
423
|
+
throw new Error ("Extern proto declaration '" + name + "' not found.");
|
|
436
424
|
},
|
|
437
425
|
getExternProtoDeclarations: function ()
|
|
438
426
|
{
|
|
439
|
-
return this .
|
|
427
|
+
return this ._externprotos;
|
|
440
428
|
},
|
|
441
429
|
addRoute: function (sourceNode, sourceField, destinationNode, destinationField)
|
|
442
430
|
{
|
|
@@ -449,26 +437,27 @@ function (Fields,
|
|
|
449
437
|
if (! (destinationNode instanceof Fields .SFNode))
|
|
450
438
|
throw new Error ("Bad ROUTE specification: destination node must be of type SFNode.");
|
|
451
439
|
|
|
452
|
-
|
|
453
|
-
|
|
440
|
+
const
|
|
441
|
+
sourceNodeValue = sourceNode .getValue (),
|
|
442
|
+
destinationNodeValue = destinationNode .getValue ();
|
|
454
443
|
|
|
455
|
-
if (!
|
|
444
|
+
if (! sourceNodeValue)
|
|
456
445
|
throw new Error ("Bad ROUTE specification: source node is NULL.");
|
|
457
446
|
|
|
458
|
-
if (!
|
|
447
|
+
if (! destinationNodeValue)
|
|
459
448
|
throw new Error ("Bad ROUTE specification: destination node is NULL.");
|
|
460
449
|
|
|
461
450
|
// Imported nodes handling.
|
|
462
451
|
|
|
463
|
-
|
|
464
|
-
importedSourceNode =
|
|
465
|
-
importedDestinationNode =
|
|
452
|
+
let
|
|
453
|
+
importedSourceNode = sourceNodeValue instanceof ImportedNode ? sourceNodeValue : null,
|
|
454
|
+
importedDestinationNode = destinationNodeValue instanceof ImportedNode ? destinationNodeValue : null;
|
|
466
455
|
|
|
467
456
|
try
|
|
468
457
|
{
|
|
469
458
|
// If sourceNode is shared node try to find the corresponding ImportedNode.
|
|
470
|
-
if (
|
|
471
|
-
importedSourceNode = this .getLocalNode (this .getLocalName (sourceNode));
|
|
459
|
+
if (sourceNodeValue .getExecutionContext () !== this)
|
|
460
|
+
importedSourceNode = this .getLocalNode (this .getLocalName (sourceNode)) .getValue ();
|
|
472
461
|
}
|
|
473
462
|
catch (error)
|
|
474
463
|
{
|
|
@@ -478,30 +467,40 @@ function (Fields,
|
|
|
478
467
|
try
|
|
479
468
|
{
|
|
480
469
|
// If destinationNode is shared node try to find the corresponding ImportedNode.
|
|
481
|
-
if (
|
|
482
|
-
importedDestinationNode = this .getLocalNode (this .getLocalName (destinationNode));
|
|
470
|
+
if (destinationNodeValue .getExecutionContext () !== this)
|
|
471
|
+
importedDestinationNode = this .getLocalNode (this .getLocalName (destinationNode)) .getValue ();
|
|
483
472
|
}
|
|
484
473
|
catch (error)
|
|
485
474
|
{
|
|
486
475
|
// Destination node is shared but not imported.
|
|
487
476
|
}
|
|
488
477
|
|
|
489
|
-
if (importedSourceNode instanceof ImportedNode)
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
478
|
+
if (importedSourceNode instanceof ImportedNode && importedDestinationNode instanceof ImportedNode)
|
|
479
|
+
{
|
|
480
|
+
importedSourceNode .addRoute (importedSourceNode, sourceField, importedDestinationNode, destinationField);
|
|
481
|
+
importedDestinationNode .addRoute (importedSourceNode, sourceField, importedDestinationNode, destinationField);
|
|
482
|
+
}
|
|
483
|
+
else if (importedSourceNode instanceof ImportedNode)
|
|
484
|
+
{
|
|
485
|
+
importedSourceNode .addRoute (importedSourceNode, sourceField, destinationNodeValue, destinationField);
|
|
486
|
+
}
|
|
487
|
+
else if (importedDestinationNode instanceof ImportedNode)
|
|
488
|
+
{
|
|
489
|
+
importedDestinationNode .addRoute (sourceNodeValue, sourceField, importedDestinationNode, destinationField);
|
|
490
|
+
}
|
|
494
491
|
|
|
495
492
|
// If either sourceNode or destinationNode is an ImportedNode return here without value.
|
|
496
|
-
if (importedSourceNode ===
|
|
493
|
+
if (importedSourceNode === sourceNodeValue || importedDestinationNode === destinationNodeValue)
|
|
497
494
|
return;
|
|
498
495
|
|
|
499
496
|
// Create route and return.
|
|
500
497
|
|
|
501
|
-
return this .addSimpleRoute (
|
|
498
|
+
return this .addSimpleRoute (sourceNodeValue, sourceField, destinationNodeValue, destinationField);
|
|
502
499
|
},
|
|
503
500
|
addSimpleRoute: function (sourceNode, sourceField, destinationNode, destinationField)
|
|
504
501
|
{
|
|
502
|
+
// Source and dest node are here X3DBaseNode.
|
|
503
|
+
|
|
505
504
|
try
|
|
506
505
|
{
|
|
507
506
|
// Private function.
|
|
@@ -519,54 +518,106 @@ function (Fields,
|
|
|
519
518
|
if (sourceField .getType () !== destinationField .getType ())
|
|
520
519
|
throw new Error ("ROUTE types " + sourceField .getTypeName () + " and " + destinationField .getTypeName () + " do not match.");
|
|
521
520
|
|
|
522
|
-
|
|
521
|
+
const id = sourceField .getId () + "." + destinationField .getId ();
|
|
523
522
|
|
|
524
|
-
|
|
525
|
-
return this .routeIndex [id];
|
|
523
|
+
let route = this ._routeIndex .get (id);
|
|
526
524
|
|
|
527
|
-
|
|
525
|
+
if (route)
|
|
526
|
+
return route;
|
|
528
527
|
|
|
529
|
-
route
|
|
528
|
+
route = new X3DRoute (this, sourceNode, sourceField, destinationNode, destinationField);
|
|
530
529
|
|
|
531
|
-
this .
|
|
532
|
-
this .
|
|
530
|
+
this ._routes .getValue () .push (route);
|
|
531
|
+
this ._routeIndex .set (id, route);
|
|
533
532
|
|
|
534
533
|
return route;
|
|
535
534
|
}
|
|
536
535
|
catch (error)
|
|
537
536
|
{
|
|
538
|
-
throw new Error ("Bad ROUTE specification: " + error .message);
|
|
537
|
+
throw new Error ("Bad ROUTE specification: " + error .message);
|
|
539
538
|
}
|
|
540
539
|
},
|
|
541
540
|
deleteRoute: function (route)
|
|
542
541
|
{
|
|
543
|
-
|
|
542
|
+
// sourceNode, sourceField, destinationNode, destinationField
|
|
543
|
+
if (arguments .length === 4)
|
|
544
544
|
{
|
|
545
|
-
|
|
546
|
-
if (arguments .length === 4)
|
|
547
|
-
{
|
|
548
|
-
route = this .getRoute .apply (this, arguments);
|
|
545
|
+
route = this .getRoute .apply (this, arguments);
|
|
549
546
|
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
547
|
+
if (! route)
|
|
548
|
+
return false;
|
|
549
|
+
}
|
|
553
550
|
|
|
554
|
-
|
|
551
|
+
if (this .deleteSimpleRoute (route))
|
|
552
|
+
this .deleteImportedRoute (route .getSourceNode (), route .getDestinationNode (), route);
|
|
553
|
+
},
|
|
554
|
+
deleteSimpleRoute: function (route)
|
|
555
|
+
{
|
|
556
|
+
try
|
|
557
|
+
{
|
|
558
|
+
const
|
|
555
559
|
sourceField = route ._sourceField,
|
|
556
560
|
destinationField = route ._destinationField,
|
|
557
561
|
id = sourceField .getId () + "." + destinationField .getId (),
|
|
558
|
-
index = this .
|
|
562
|
+
index = this ._routes .getValue () .indexOf (route);
|
|
559
563
|
|
|
560
564
|
route .disconnect ();
|
|
561
565
|
|
|
562
566
|
if (index !== -1)
|
|
563
|
-
this .
|
|
567
|
+
this ._routes .getValue () .splice (index, 1);
|
|
568
|
+
|
|
569
|
+
this ._routeIndex .delete (id);
|
|
564
570
|
|
|
565
|
-
|
|
571
|
+
return true;
|
|
566
572
|
}
|
|
567
573
|
catch (error)
|
|
568
574
|
{
|
|
569
575
|
console .log (error);
|
|
576
|
+
return false;
|
|
577
|
+
}
|
|
578
|
+
},
|
|
579
|
+
deleteImportedRoute (sourceNode, destinationNode, route)
|
|
580
|
+
{
|
|
581
|
+
// Imported nodes handling.
|
|
582
|
+
|
|
583
|
+
let
|
|
584
|
+
importedSourceNode = null,
|
|
585
|
+
importedDestinationNode = null;
|
|
586
|
+
|
|
587
|
+
try
|
|
588
|
+
{
|
|
589
|
+
// If sourceNode is shared node try to find the corresponding ImportedNode.
|
|
590
|
+
if (sourceNode .getValue () .getExecutionContext () !== this)
|
|
591
|
+
importedSourceNode = this .getLocalNode (this .getLocalName (sourceNode)) .getValue ();
|
|
592
|
+
}
|
|
593
|
+
catch (error)
|
|
594
|
+
{
|
|
595
|
+
// Source node is shared but not imported.
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
try
|
|
599
|
+
{
|
|
600
|
+
// If destinationNode is shared node try to find the corresponding ImportedNode.
|
|
601
|
+
if (destinationNode .getValue () .getExecutionContext () !== this)
|
|
602
|
+
importedDestinationNode = this .getLocalNode (this .getLocalName (destinationNode)) .getValue ();
|
|
603
|
+
}
|
|
604
|
+
catch (error)
|
|
605
|
+
{
|
|
606
|
+
// Destination node is shared but not imported.
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
if (importedSourceNode instanceof ImportedNode && importedDestinationNode instanceof ImportedNode)
|
|
610
|
+
{
|
|
611
|
+
importedSourceNode .deleteRoute (route);
|
|
612
|
+
importedDestinationNode .deleteRoute (route);
|
|
613
|
+
}
|
|
614
|
+
else if (importedSourceNode instanceof ImportedNode)
|
|
615
|
+
{
|
|
616
|
+
importedSourceNode .deleteRoute (route);
|
|
617
|
+
}
|
|
618
|
+
else if (importedDestinationNode instanceof ImportedNode)
|
|
619
|
+
{
|
|
620
|
+
importedDestinationNode .deleteRoute (route);
|
|
570
621
|
}
|
|
571
622
|
},
|
|
572
623
|
getRoute: function (sourceNode, sourceField, destinationNode, destinationField)
|
|
@@ -577,47 +628,107 @@ function (Fields,
|
|
|
577
628
|
if (! destinationNode .getValue ())
|
|
578
629
|
throw new Error ("Bad ROUTE specification: destinationNode is NULL.");
|
|
579
630
|
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
631
|
+
sourceField = sourceNode .getValue () .getField (sourceField);
|
|
632
|
+
destinationField = destinationNode .getValue () .getField (destinationField);
|
|
633
|
+
|
|
634
|
+
const id = sourceField .getId () + "." + destinationField .getId ();
|
|
584
635
|
|
|
585
|
-
return this .
|
|
636
|
+
return this ._routeIndex .get (id);
|
|
586
637
|
},
|
|
587
638
|
getRoutes: function ()
|
|
588
639
|
{
|
|
589
|
-
return this .
|
|
640
|
+
return this ._routes;
|
|
590
641
|
},
|
|
591
|
-
|
|
642
|
+
getWorldInfos: function ()
|
|
592
643
|
{
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
644
|
+
return this .worldInfos_;
|
|
645
|
+
},
|
|
646
|
+
addWorldInfo: function (worldInfoNode)
|
|
647
|
+
{
|
|
648
|
+
this .worldInfos_ .push (worldInfoNode);
|
|
649
|
+
},
|
|
650
|
+
removeWorldInfo: function (worldInfoNode)
|
|
651
|
+
{
|
|
652
|
+
const index = this .worldInfos_ .getValue () .indexOf (worldInfoNode);
|
|
653
|
+
|
|
654
|
+
if (index !== -1)
|
|
655
|
+
this .worldInfos_ .splice (index, 1);
|
|
656
|
+
},
|
|
657
|
+
toVRMLStream: function (stream)
|
|
658
|
+
{
|
|
659
|
+
const generator = Generator .Get (stream);
|
|
598
660
|
|
|
599
|
-
|
|
600
|
-
|
|
661
|
+
generator .PushExecutionContext (this);
|
|
662
|
+
generator .EnterScope ();
|
|
663
|
+
generator .ImportedNodes (this .getImportedNodes ());
|
|
601
664
|
|
|
602
|
-
|
|
665
|
+
// Output extern protos
|
|
603
666
|
|
|
604
|
-
|
|
605
|
-
viewpoint .transitionStart (viewpoint);
|
|
667
|
+
this .getExternProtoDeclarations () .toVRMLStream (stream);
|
|
606
668
|
|
|
669
|
+
// Output protos
|
|
670
|
+
|
|
671
|
+
this .getProtoDeclarations () .toVRMLStream (stream);
|
|
672
|
+
|
|
673
|
+
// Output root nodes
|
|
674
|
+
|
|
675
|
+
const rootNodes = this .getRootNodes ();
|
|
676
|
+
|
|
677
|
+
for (let i = 0, length = rootNodes .length; i < length; ++ i)
|
|
678
|
+
{
|
|
679
|
+
const rootNode = rootNodes [i];
|
|
680
|
+
|
|
681
|
+
stream .string += generator .Indent ();
|
|
682
|
+
|
|
683
|
+
if (rootNode)
|
|
684
|
+
rootNode .toVRMLStream (stream);
|
|
607
685
|
else
|
|
608
|
-
|
|
686
|
+
stream .string += "NULL";
|
|
687
|
+
|
|
688
|
+
stream .string += "\n";
|
|
689
|
+
|
|
690
|
+
if (i !== length - 1)
|
|
691
|
+
stream .string += "\n";
|
|
609
692
|
}
|
|
610
|
-
|
|
693
|
+
|
|
694
|
+
// Output imported nodes
|
|
695
|
+
|
|
696
|
+
const importedNodes = this .getImportedNodes ();
|
|
697
|
+
|
|
698
|
+
if (importedNodes .size)
|
|
611
699
|
{
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
700
|
+
stream .string += "\n";
|
|
701
|
+
|
|
702
|
+
importedNodes .forEach (function (importedNode)
|
|
703
|
+
{
|
|
704
|
+
try
|
|
705
|
+
{
|
|
706
|
+
importedNode .toVRMLStream (stream);
|
|
707
|
+
|
|
708
|
+
stream .string += "\n";
|
|
709
|
+
}
|
|
710
|
+
catch (error)
|
|
711
|
+
{ }
|
|
712
|
+
});
|
|
616
713
|
}
|
|
714
|
+
|
|
715
|
+
// Output routes
|
|
716
|
+
|
|
717
|
+
const routes = this .getRoutes ();
|
|
718
|
+
|
|
719
|
+
if (routes .length)
|
|
720
|
+
{
|
|
721
|
+
stream .string += "\n";
|
|
722
|
+
|
|
723
|
+
routes .toVRMLStream (stream);
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
generator .LeaveScope ();
|
|
727
|
+
generator .PopExecutionContext ();
|
|
617
728
|
},
|
|
618
729
|
toXMLStream: function (stream)
|
|
619
730
|
{
|
|
620
|
-
|
|
731
|
+
const generator = Generator .Get (stream);
|
|
621
732
|
|
|
622
733
|
generator .PushExecutionContext (this);
|
|
623
734
|
generator .EnterScope ();
|
|
@@ -630,10 +741,10 @@ function (Fields,
|
|
|
630
741
|
// Output protos
|
|
631
742
|
|
|
632
743
|
this .getProtoDeclarations () .toXMLStream (stream);
|
|
633
|
-
|
|
744
|
+
|
|
634
745
|
// Output root nodes
|
|
635
746
|
|
|
636
|
-
|
|
747
|
+
const rootNodes = this .getRootNodes ();
|
|
637
748
|
|
|
638
749
|
if (rootNodes .length)
|
|
639
750
|
{
|
|
@@ -641,23 +752,23 @@ function (Fields,
|
|
|
641
752
|
|
|
642
753
|
stream .string += "\n";
|
|
643
754
|
}
|
|
644
|
-
|
|
755
|
+
|
|
645
756
|
// Output imported nodes
|
|
646
757
|
|
|
647
|
-
|
|
758
|
+
const importedNodes = this .getImportedNodes ();
|
|
648
759
|
|
|
649
|
-
|
|
760
|
+
importedNodes .forEach (function (importedNode)
|
|
650
761
|
{
|
|
651
762
|
try
|
|
652
763
|
{
|
|
653
|
-
|
|
764
|
+
importedNode .toXMLStream (stream);
|
|
654
765
|
|
|
655
766
|
stream .string += "\n";
|
|
656
767
|
}
|
|
657
768
|
catch (error)
|
|
658
769
|
{ }
|
|
659
|
-
}
|
|
660
|
-
|
|
770
|
+
});
|
|
771
|
+
|
|
661
772
|
// Output routes
|
|
662
773
|
|
|
663
774
|
this .getRoutes () .toXMLStream (stream);
|
|
@@ -667,6 +778,34 @@ function (Fields,
|
|
|
667
778
|
},
|
|
668
779
|
});
|
|
669
780
|
|
|
781
|
+
Object .defineProperty (X3DExecutionContext .prototype, "specificationVersion",
|
|
782
|
+
{
|
|
783
|
+
get: function () { return this .getSpecificationVersion (); },
|
|
784
|
+
enumerable: true,
|
|
785
|
+
configurable: false
|
|
786
|
+
});
|
|
787
|
+
|
|
788
|
+
Object .defineProperty (X3DExecutionContext .prototype, "encoding",
|
|
789
|
+
{
|
|
790
|
+
get: function () { return this .getEncoding (); },
|
|
791
|
+
enumerable: true,
|
|
792
|
+
configurable: false
|
|
793
|
+
});
|
|
794
|
+
|
|
795
|
+
Object .defineProperty (X3DExecutionContext .prototype, "profile",
|
|
796
|
+
{
|
|
797
|
+
get: function () { return this .getProfile (); },
|
|
798
|
+
enumerable: true,
|
|
799
|
+
configurable: false
|
|
800
|
+
});
|
|
801
|
+
|
|
802
|
+
Object .defineProperty (X3DExecutionContext .prototype, "components",
|
|
803
|
+
{
|
|
804
|
+
get: function () { return this .getComponents (); },
|
|
805
|
+
enumerable: true,
|
|
806
|
+
configurable: false
|
|
807
|
+
});
|
|
808
|
+
|
|
670
809
|
Object .defineProperty (X3DExecutionContext .prototype, "worldURL",
|
|
671
810
|
{
|
|
672
811
|
get: function () { return this .getWorldURL (); },
|
|
@@ -689,5 +828,26 @@ function (Fields,
|
|
|
689
828
|
configurable: false
|
|
690
829
|
});
|
|
691
830
|
|
|
831
|
+
Object .defineProperty (X3DExecutionContext .prototype, "protos",
|
|
832
|
+
{
|
|
833
|
+
get: function () { return this .getProtoDeclarations (); },
|
|
834
|
+
enumerable: true,
|
|
835
|
+
configurable: false
|
|
836
|
+
});
|
|
837
|
+
|
|
838
|
+
Object .defineProperty (X3DExecutionContext .prototype, "externprotos",
|
|
839
|
+
{
|
|
840
|
+
get: function () { return this .getExternProtoDeclarations (); },
|
|
841
|
+
enumerable: true,
|
|
842
|
+
configurable: false
|
|
843
|
+
});
|
|
844
|
+
|
|
845
|
+
Object .defineProperty (X3DExecutionContext .prototype, "routes",
|
|
846
|
+
{
|
|
847
|
+
get: function () { return this .getRoutes (); },
|
|
848
|
+
enumerable: true,
|
|
849
|
+
configurable: false
|
|
850
|
+
});
|
|
851
|
+
|
|
692
852
|
return X3DExecutionContext;
|
|
693
853
|
});
|