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
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
(function ()
|
|
1
|
+
(function (globalModule, globalRequire)
|
|
2
|
+
{
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
if (typeof __filename === "undefined")
|
|
5
|
+
{
|
|
6
|
+
globalModule = undefined;
|
|
7
|
+
globalRequire = undefined;
|
|
8
|
+
}
|
|
6
9
|
|
|
10
|
+
// Undefine global variables.
|
|
11
|
+
var module = { }, exports, process;
|
|
12
|
+
|
|
13
|
+
const
|
|
14
|
+
define = X3D .define,
|
|
15
|
+
require = X3D .require;
|
|
7
16
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
8
17
|
*******************************************************************************
|
|
9
18
|
*
|
|
@@ -70,7 +79,7 @@ define ('standard/Math/Geometry/Spheroid3',[],function ()
|
|
|
70
79
|
this .semiMinorAxis = semiMinorAxis; // c
|
|
71
80
|
break;
|
|
72
81
|
case 3:
|
|
73
|
-
|
|
82
|
+
const f_1 = arguments [1];
|
|
74
83
|
this .semiMajorAxis = semiMajorAxis; // a
|
|
75
84
|
this .semiMinorAxis = semiMajorAxis * (1 - 1 / f_1); // c
|
|
76
85
|
break;
|
|
@@ -155,7 +164,7 @@ function (Spheroid3)
|
|
|
155
164
|
{
|
|
156
165
|
"use strict";
|
|
157
166
|
|
|
158
|
-
|
|
167
|
+
const ReferenceEllipsoids =
|
|
159
168
|
{
|
|
160
169
|
// Earth
|
|
161
170
|
// X3D Specification
|
|
@@ -258,11 +267,11 @@ function (Vector3,
|
|
|
258
267
|
{
|
|
259
268
|
"use strict";
|
|
260
269
|
|
|
261
|
-
|
|
270
|
+
const
|
|
262
271
|
EPS_H = 1e-3,
|
|
263
272
|
EPS_P = 1e-10,
|
|
264
273
|
IMAX = 30;
|
|
265
|
-
|
|
274
|
+
|
|
266
275
|
function Geodetic (spheroid, latitudeFirst, radians)
|
|
267
276
|
{
|
|
268
277
|
this .longitudeFirst = ! latitudeFirst;
|
|
@@ -278,7 +287,7 @@ function (Vector3,
|
|
|
278
287
|
constructor: Geodetic,
|
|
279
288
|
convert: function (geodetic, result)
|
|
280
289
|
{
|
|
281
|
-
|
|
290
|
+
const elevation = geodetic .z;
|
|
282
291
|
|
|
283
292
|
if (this .longitudeFirst)
|
|
284
293
|
{
|
|
@@ -292,18 +301,18 @@ function (Vector3,
|
|
|
292
301
|
latitude = geodetic .x,
|
|
293
302
|
longitude = geodetic .y;
|
|
294
303
|
}
|
|
295
|
-
|
|
304
|
+
|
|
296
305
|
if (this .degrees)
|
|
297
306
|
{
|
|
298
307
|
latitude *= Math .PI / 180;
|
|
299
308
|
longitude *= Math .PI / 180;
|
|
300
309
|
}
|
|
301
|
-
|
|
310
|
+
|
|
302
311
|
return this .convertRadians (latitude, longitude, elevation, result);
|
|
303
312
|
},
|
|
304
313
|
convertRadians: function (latitude, longitude, elevation, result)
|
|
305
314
|
{
|
|
306
|
-
|
|
315
|
+
const
|
|
307
316
|
slat = Math .sin (latitude),
|
|
308
317
|
slat2 = Math .pow (slat, 2),
|
|
309
318
|
clat = Math .cos (latitude),
|
|
@@ -326,7 +335,7 @@ function (Vector3,
|
|
|
326
335
|
|
|
327
336
|
if (this .longitudeFirst)
|
|
328
337
|
{
|
|
329
|
-
|
|
338
|
+
const tmp = result .x;
|
|
330
339
|
|
|
331
340
|
result .x = result .y; // latitude
|
|
332
341
|
result .y = tmp; // longitude
|
|
@@ -336,40 +345,40 @@ function (Vector3,
|
|
|
336
345
|
},
|
|
337
346
|
applyRadians: function (geocentric, result)
|
|
338
347
|
{
|
|
339
|
-
|
|
348
|
+
const
|
|
340
349
|
x = geocentric .x,
|
|
341
350
|
y = geocentric .y,
|
|
342
351
|
z = geocentric .z;
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
352
|
+
|
|
353
|
+
const P = Math .sqrt (x * x + y * y);
|
|
354
|
+
|
|
346
355
|
// Handle pole case.
|
|
347
356
|
if (P == 0)
|
|
348
357
|
return result .set (Math .PI, 0, z - this .c);
|
|
349
358
|
|
|
350
|
-
|
|
359
|
+
let
|
|
351
360
|
latitude = 0,
|
|
352
361
|
longitude = Math .atan2 (y, x),
|
|
353
362
|
elevation = 0;
|
|
354
|
-
|
|
355
|
-
|
|
363
|
+
|
|
364
|
+
let
|
|
356
365
|
a = this .a,
|
|
357
366
|
N = a,
|
|
358
367
|
ecc2 = this .ecc2;
|
|
359
|
-
|
|
360
|
-
for (
|
|
368
|
+
|
|
369
|
+
for (let i = 0; i < IMAX; ++ i)
|
|
361
370
|
{
|
|
362
|
-
|
|
371
|
+
const
|
|
363
372
|
h0 = elevation,
|
|
364
373
|
b0 = latitude;
|
|
365
|
-
|
|
374
|
+
|
|
366
375
|
latitude = Math .atan (z / P / (1 - ecc2 * N / (N + elevation)));
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
376
|
+
|
|
377
|
+
const sin_p = Math .sin (latitude);
|
|
378
|
+
|
|
370
379
|
N = a / Math .sqrt (1 - ecc2 * sin_p * sin_p);
|
|
371
380
|
elevation = P / Math .cos (latitude) - N;
|
|
372
|
-
|
|
381
|
+
|
|
373
382
|
if (Math .abs (elevation - h0) < EPS_H && Math .abs (latitude - b0) < EPS_P)
|
|
374
383
|
break;
|
|
375
384
|
}
|
|
@@ -378,15 +387,15 @@ function (Vector3,
|
|
|
378
387
|
},
|
|
379
388
|
normal: function (geocentric, result)
|
|
380
389
|
{
|
|
381
|
-
|
|
390
|
+
const geodetic = this .applyRadians (geocentric, result);
|
|
382
391
|
|
|
383
|
-
|
|
392
|
+
const
|
|
384
393
|
latitude = geodetic .x,
|
|
385
394
|
longitude = geodetic .y;
|
|
386
395
|
|
|
387
|
-
|
|
396
|
+
const clat = Math .cos (latitude);
|
|
388
397
|
|
|
389
|
-
|
|
398
|
+
const
|
|
390
399
|
nx = Math .cos (longitude) * clat,
|
|
391
400
|
ny = Math .sin (longitude) * clat,
|
|
392
401
|
nz = Math .sin (latitude);
|
|
@@ -404,58 +413,58 @@ function (Vector3,
|
|
|
404
413
|
RANGE = this .degrees ? 180 : M_PI,
|
|
405
414
|
RANGE1_2 = RANGE / 2,
|
|
406
415
|
RANGE2 = RANGE * 2;
|
|
407
|
-
|
|
416
|
+
|
|
408
417
|
var range = 0;
|
|
409
|
-
|
|
418
|
+
|
|
410
419
|
if (this .longitudeFirst)
|
|
411
420
|
{
|
|
412
|
-
source .x = Algorithm .interval (source .x, -RANGE, RANGE);
|
|
421
|
+
source .x = Algorithm .interval (source .x, -RANGE, RANGE);
|
|
413
422
|
source .y = Algorithm .interval (source .y, -RANGE1_2, RANGE1_2);
|
|
414
|
-
|
|
415
|
-
destination .x = Algorithm .interval (destination .x, -RANGE, RANGE);
|
|
423
|
+
|
|
424
|
+
destination .x = Algorithm .interval (destination .x, -RANGE, RANGE);
|
|
416
425
|
destination .y = Algorithm .interval (destination .y, -RANGE1_2, RANGE1_2);
|
|
417
|
-
|
|
426
|
+
|
|
418
427
|
range = Math .abs (destination .x - source .x);
|
|
419
428
|
}
|
|
420
429
|
else
|
|
421
430
|
{
|
|
422
431
|
source .x = Algorithm .interval (source .x, -RANGE1_2, RANGE1_2);
|
|
423
432
|
source .y = Algorithm .interval (source .y, -RANGE, RANGE);
|
|
424
|
-
|
|
433
|
+
|
|
425
434
|
destination .x = Algorithm .interval (destination .x, -RANGE1_2, RANGE1_2);
|
|
426
435
|
destination .y = Algorithm .interval (destination .y, -RANGE, RANGE);
|
|
427
|
-
|
|
436
|
+
|
|
428
437
|
range = Math .abs (destination .y - source .y);
|
|
429
438
|
}
|
|
430
|
-
|
|
439
|
+
|
|
431
440
|
if (range <= RANGE)
|
|
432
441
|
return source .lerp (destination, t);
|
|
433
|
-
|
|
442
|
+
|
|
434
443
|
var step = (RANGE2 - range) * t;
|
|
435
|
-
|
|
444
|
+
|
|
436
445
|
if (this .longitudeFirst)
|
|
437
446
|
{
|
|
438
447
|
var longitude = source .x < destination .x ? source .x - step : source .x + step;
|
|
439
|
-
|
|
448
|
+
|
|
440
449
|
if (longitude < -RANGE)
|
|
441
450
|
longitude += RANGE2;
|
|
442
|
-
|
|
451
|
+
|
|
443
452
|
else if (longitude > RANGE)
|
|
444
453
|
longitude -= RANGE2;
|
|
445
|
-
|
|
454
|
+
|
|
446
455
|
return source .set (longitude,
|
|
447
456
|
source .y + t * (destination .y - source .y),
|
|
448
457
|
source .z + t * (destination .z - source .z));
|
|
449
458
|
}
|
|
450
459
|
|
|
451
460
|
var longitude = source .y < destination .y ? source .y - step : source .y + step;
|
|
452
|
-
|
|
461
|
+
|
|
453
462
|
if (longitude < -RANGE)
|
|
454
463
|
longitude += RANGE2;
|
|
455
|
-
|
|
464
|
+
|
|
456
465
|
else if (longitude > RANGE)
|
|
457
466
|
longitude -= RANGE2;
|
|
458
|
-
|
|
467
|
+
|
|
459
468
|
return source .set (source .x + t * (destination .x - source .x),
|
|
460
469
|
longitude,
|
|
461
470
|
source .z + t * (destination .z - source .z));
|
|
@@ -528,14 +537,14 @@ function (Geodetic,
|
|
|
528
537
|
{
|
|
529
538
|
"use strict";
|
|
530
539
|
|
|
531
|
-
|
|
540
|
+
const
|
|
532
541
|
N0 = 1.0e7,
|
|
533
542
|
E0 = 5.0e5,
|
|
534
543
|
k0 = 0.9996;
|
|
535
544
|
|
|
536
545
|
function UniversalTransverseMercator (spheroid, zone, northernHemisphere, northingFirst)
|
|
537
546
|
{
|
|
538
|
-
|
|
547
|
+
const
|
|
539
548
|
a = spheroid .getSemiMajorAxis (),
|
|
540
549
|
ecc2 = 1 - Math .pow (spheroid .getSemiMinorAxis () / a, 2),
|
|
541
550
|
EE = ecc2 / (1 - ecc2),
|
|
@@ -569,7 +578,7 @@ function (Geodetic,
|
|
|
569
578
|
convert: function (utm, result)
|
|
570
579
|
{
|
|
571
580
|
// https://gist.github.com/duedal/840476
|
|
572
|
-
|
|
581
|
+
|
|
573
582
|
if (this .eastingFirst)
|
|
574
583
|
{
|
|
575
584
|
var
|
|
@@ -582,34 +591,34 @@ function (Geodetic,
|
|
|
582
591
|
northing = utm .x,
|
|
583
592
|
easting = utm .y;
|
|
584
593
|
}
|
|
585
|
-
|
|
594
|
+
|
|
586
595
|
// Check for southern hemisphere and remove offset from easting.
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
596
|
+
|
|
597
|
+
let S = this .southernHemisphere;
|
|
598
|
+
|
|
590
599
|
if (northing < 0)
|
|
591
600
|
{
|
|
592
601
|
S = ! this .southernHemisphere;
|
|
593
602
|
northing = -northing;
|
|
594
603
|
}
|
|
595
|
-
|
|
604
|
+
|
|
596
605
|
if (S)
|
|
597
606
|
northing -= N0;
|
|
598
|
-
|
|
607
|
+
|
|
599
608
|
easting -= E0;
|
|
600
|
-
|
|
609
|
+
|
|
601
610
|
// Begin calculation.
|
|
602
|
-
|
|
603
|
-
|
|
611
|
+
|
|
612
|
+
const
|
|
604
613
|
mu = northing / this .A,
|
|
605
614
|
phi1 = mu + this .B * Math .sin (2 * mu) + this .C * Math .sin (4 * mu) + this .D * Math .sin (6 * mu);
|
|
606
|
-
|
|
607
|
-
|
|
615
|
+
|
|
616
|
+
const
|
|
608
617
|
sinphi1 = Math .pow (Math .sin (phi1), 2),
|
|
609
618
|
cosphi1 = Math .cos (phi1),
|
|
610
619
|
tanphi1 = Math .tan (phi1);
|
|
611
|
-
|
|
612
|
-
|
|
620
|
+
|
|
621
|
+
const
|
|
613
622
|
N1 = this .a / Math .sqrt (1 - this .ecc2 * sinphi1),
|
|
614
623
|
T2 = Math .pow (tanphi1, 2),
|
|
615
624
|
T8 = Math .pow (tanphi1, 8),
|
|
@@ -617,67 +626,67 @@ function (Geodetic,
|
|
|
617
626
|
C2 = C1 * C1,
|
|
618
627
|
R1 = this .E / Math .pow (1 - this .ecc2 * sinphi1, 1.5),
|
|
619
628
|
I = easting / (N1 * k0);
|
|
620
|
-
|
|
621
|
-
|
|
629
|
+
|
|
630
|
+
const
|
|
622
631
|
J = (5 + 3 * T2 + 10 * C1 - 4 * C2 - this .E9) * Math .pow (I, 4) / 24,
|
|
623
632
|
K = (61 + 90 * T2 + 298 * C1 + 45 * T8 - this .E252 - 3 * C2) * Math .pow (I, 6) / 720,
|
|
624
633
|
L = (5 - 2 * C1 + 28 * T2 - 3 * C2 + this .E8 + 24 * T8) * Math .pow (I, 5) / 120;
|
|
625
|
-
|
|
626
|
-
|
|
634
|
+
|
|
635
|
+
const
|
|
627
636
|
latitude = phi1 - (N1 * tanphi1 / R1) * (I * I / 2 - J + K),
|
|
628
637
|
longitude = this .longitude0 + (I - (1 + 2 * T2 + C1) * Math .pow (I, 3) / 6 + L) / cosphi1;
|
|
629
|
-
|
|
638
|
+
|
|
630
639
|
return this .geodeticConverter .convertRadians (latitude, longitude, utm .z, result);
|
|
631
640
|
},
|
|
632
641
|
apply: function (geocentric, result)
|
|
633
642
|
{
|
|
634
643
|
// https://gist.github.com/duedal/840476
|
|
635
644
|
|
|
636
|
-
|
|
645
|
+
const
|
|
637
646
|
geodetic = this .geodeticConverter .applyRadians (geocentric, result),
|
|
638
647
|
latitude = geodetic .x,
|
|
639
648
|
longitude = geodetic .y;
|
|
640
|
-
|
|
641
|
-
|
|
649
|
+
|
|
650
|
+
const
|
|
642
651
|
tanlat = Math .tan (latitude),
|
|
643
652
|
coslat = Math .cos (latitude);
|
|
644
|
-
|
|
645
|
-
|
|
653
|
+
|
|
654
|
+
const
|
|
646
655
|
EE = this .EE,
|
|
647
656
|
N = this .a / Math .sqrt (1 - this .ecc2 * Math .pow (Math .sin (latitude), 2)),
|
|
648
657
|
T = tanlat * tanlat,
|
|
649
658
|
T6 = T * T * T,
|
|
650
659
|
C = EE * coslat * coslat,
|
|
651
660
|
A = coslat * (longitude - this .longitude0);
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
661
|
+
|
|
662
|
+
const M = this .a * (this .W * latitude
|
|
663
|
+
- this .X * Math .sin (2 * latitude)
|
|
664
|
+
+ this .Y * Math .sin (4 * latitude)
|
|
665
|
+
- this .Z * Math .sin (6 * latitude));
|
|
666
|
+
|
|
667
|
+
const easting = k0 * N * (A + (1 - T + C) * Math .pow (A, 3) / 6
|
|
668
|
+
+ (5 - 18 * T6 + 72 * C - 58 * EE) * Math .pow (A, 5) / 120)
|
|
669
|
+
+ E0;
|
|
670
|
+
|
|
671
|
+
let northing = k0 * (M + N * tanlat * (A * A / 2 + (5 - T + 9 * C + 4 * C * C) * Math .pow (A, 4) / 24
|
|
663
672
|
+ (61 - 58 * T6 + 600 * C - 330 * EE) * Math .pow (A, 6) / 720));
|
|
664
|
-
|
|
673
|
+
|
|
665
674
|
if (latitude < 0)
|
|
666
675
|
{
|
|
667
676
|
northing += N0;
|
|
668
|
-
|
|
677
|
+
|
|
669
678
|
if (! this .southernHemisphere)
|
|
670
679
|
northing = -northing;
|
|
671
680
|
}
|
|
672
681
|
else
|
|
673
682
|
{
|
|
674
683
|
if (this .southernHemisphere)
|
|
675
|
-
northing = -northing;
|
|
684
|
+
northing = -northing;
|
|
676
685
|
}
|
|
677
|
-
|
|
686
|
+
|
|
678
687
|
if (this .eastingFirst)
|
|
679
688
|
return result .set (easting, northing, geodetic .z);
|
|
680
|
-
|
|
689
|
+
|
|
681
690
|
return result .set (northing, easting, geodetic .z);
|
|
682
691
|
},
|
|
683
692
|
//lerp: Vector3 .lerp,
|
|
@@ -1664,25 +1673,25 @@ function (Fields,
|
|
|
1664
1673
|
{
|
|
1665
1674
|
if (this .colorNode)
|
|
1666
1675
|
{
|
|
1667
|
-
this .colorNode .removeInterest ("requestRebuild",
|
|
1668
|
-
this .colorNode .removeInterest ("set_transparent__", this);
|
|
1676
|
+
this .colorNode .removeInterest ("requestRebuild", this);
|
|
1677
|
+
this .colorNode .transparent_ .removeInterest ("set_transparent__", this);
|
|
1669
1678
|
}
|
|
1670
1679
|
|
|
1671
1680
|
this .colorNode = X3DCast (X3DConstants .X3DColorNode, this .color_);
|
|
1672
1681
|
|
|
1673
1682
|
if (this .colorNode)
|
|
1674
1683
|
{
|
|
1675
|
-
this .colorNode .addInterest ("requestRebuild",
|
|
1676
|
-
this .colorNode .addInterest ("set_transparent__", this);
|
|
1684
|
+
this .colorNode .addInterest ("requestRebuild", this);
|
|
1685
|
+
this .colorNode .transparent_ .addInterest ("set_transparent__", this);
|
|
1677
1686
|
|
|
1678
1687
|
this .set_transparent__ ();
|
|
1679
1688
|
}
|
|
1680
1689
|
else
|
|
1681
|
-
this .
|
|
1690
|
+
this .setTransparent (false);
|
|
1682
1691
|
},
|
|
1683
1692
|
set_transparent__: function ()
|
|
1684
1693
|
{
|
|
1685
|
-
this .
|
|
1694
|
+
this .setTransparent (this .colorNode .getTransparent ());
|
|
1686
1695
|
},
|
|
1687
1696
|
set_texCoord__: function ()
|
|
1688
1697
|
{
|
|
@@ -1694,7 +1703,7 @@ function (Fields,
|
|
|
1694
1703
|
if (this .texCoordNode)
|
|
1695
1704
|
this .texCoordNode .addInterest ("requestRebuild", this);
|
|
1696
1705
|
|
|
1697
|
-
this .
|
|
1706
|
+
this .setTextureCoordinate (this .texCoordNode);
|
|
1698
1707
|
},
|
|
1699
1708
|
set_normal__: function ()
|
|
1700
1709
|
{
|
|
@@ -2036,9 +2045,9 @@ define ('x_ite/Components/Geospatial/GeoLOD',[
|
|
|
2036
2045
|
function (Fields,
|
|
2037
2046
|
X3DFieldDefinition,
|
|
2038
2047
|
FieldDefinitionArray,
|
|
2039
|
-
X3DChildNode,
|
|
2040
|
-
X3DBoundedObject,
|
|
2041
|
-
X3DGeospatialObject,
|
|
2048
|
+
X3DChildNode,
|
|
2049
|
+
X3DBoundedObject,
|
|
2050
|
+
X3DGeospatialObject,
|
|
2042
2051
|
X3DConstants,
|
|
2043
2052
|
TraverseType,
|
|
2044
2053
|
Group,
|
|
@@ -2061,6 +2070,7 @@ function (Fields,
|
|
|
2061
2070
|
|
|
2062
2071
|
this .range_ .setUnit ("length");
|
|
2063
2072
|
|
|
2073
|
+
this .unload = false;
|
|
2064
2074
|
this .rootGroup = new Group (this .getBrowser () .getPrivateScene ());
|
|
2065
2075
|
this .rootInline = new Inline (executionContext);
|
|
2066
2076
|
this .child1Inline = new Inline (executionContext);
|
|
@@ -2090,9 +2100,11 @@ function (Fields,
|
|
|
2090
2100
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "center", new Fields .SFVec3d ()),
|
|
2091
2101
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "range", new Fields .SFFloat (10)),
|
|
2092
2102
|
new X3DFieldDefinition (X3DConstants .outputOnly, "level_changed", new Fields .SFInt32 (-1)),
|
|
2093
|
-
new X3DFieldDefinition (X3DConstants .
|
|
2103
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "visible", new Fields .SFBool (true)),
|
|
2104
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "bboxDisplay", new Fields .SFBool ()),
|
|
2094
2105
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxSize", new Fields .SFVec3f (-1, -1, -1)),
|
|
2095
2106
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxCenter", new Fields .SFVec3f ()),
|
|
2107
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "rootNode", new Fields .MFNode ()),
|
|
2096
2108
|
new X3DFieldDefinition (X3DConstants .outputOnly, "children", new Fields .MFNode ()),
|
|
2097
2109
|
]),
|
|
2098
2110
|
getTypeName: function ()
|
|
@@ -2114,65 +2126,66 @@ function (Fields,
|
|
|
2114
2126
|
X3DGeospatialObject .prototype .initialize .call (this);
|
|
2115
2127
|
|
|
2116
2128
|
this .rootNode_ .addFieldInterest (this .rootGroup .children_);
|
|
2117
|
-
|
|
2129
|
+
|
|
2118
2130
|
this .rootGroup .children_ = this .rootNode_;
|
|
2119
2131
|
this .rootGroup .setPrivate (true);
|
|
2120
2132
|
this .rootGroup .setup ();
|
|
2121
|
-
|
|
2133
|
+
|
|
2122
2134
|
this .rootInline .loadState_ .addInterest ("set_rootLoadState__", this);
|
|
2123
2135
|
this .child1Inline .loadState_ .addInterest ("set_childLoadState__", this);
|
|
2124
2136
|
this .child2Inline .loadState_ .addInterest ("set_childLoadState__", this);
|
|
2125
2137
|
this .child3Inline .loadState_ .addInterest ("set_childLoadState__", this);
|
|
2126
2138
|
this .child4Inline .loadState_ .addInterest ("set_childLoadState__", this);
|
|
2127
|
-
|
|
2139
|
+
|
|
2128
2140
|
this .rootUrl_ .addFieldInterest (this .rootInline .url_);
|
|
2129
2141
|
this .child1Url_ .addFieldInterest (this .child1Inline .url_);
|
|
2130
2142
|
this .child2Url_ .addFieldInterest (this .child2Inline .url_);
|
|
2131
2143
|
this .child3Url_ .addFieldInterest (this .child3Inline .url_);
|
|
2132
2144
|
this .child4Url_ .addFieldInterest (this .child4Inline .url_);
|
|
2133
|
-
|
|
2145
|
+
|
|
2134
2146
|
this .rootInline .load_ = true;
|
|
2135
2147
|
this .child1Inline .load_ = false;
|
|
2136
2148
|
this .child2Inline .load_ = false;
|
|
2137
2149
|
this .child3Inline .load_ = false;
|
|
2138
2150
|
this .child4Inline .load_ = false;
|
|
2139
|
-
|
|
2151
|
+
|
|
2140
2152
|
this .rootInline .url_ = this .rootUrl_;
|
|
2141
2153
|
this .child1Inline .url_ = this .child1Url_;
|
|
2142
2154
|
this .child2Inline .url_ = this .child2Url_;
|
|
2143
2155
|
this .child3Inline .url_ = this .child3Url_;
|
|
2144
2156
|
this .child4Inline .url_ = this .child4Url_;
|
|
2145
|
-
|
|
2157
|
+
|
|
2146
2158
|
this .rootInline .setup ();
|
|
2147
2159
|
this .child1Inline .setup ();
|
|
2148
2160
|
this .child2Inline .setup ();
|
|
2149
2161
|
this .child3Inline .setup ();
|
|
2150
2162
|
this .child4Inline .setup ();
|
|
2151
2163
|
},
|
|
2152
|
-
getBBox: function (bbox)
|
|
2164
|
+
getBBox: function (bbox, shadow)
|
|
2153
2165
|
{
|
|
2154
|
-
if (this .bboxSize_ .getValue () .equals (this .
|
|
2166
|
+
if (this .bboxSize_ .getValue () .equals (this .getDefaultBBoxSize ()))
|
|
2155
2167
|
{
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
switch (this .childrenLoaded ? level : 0)
|
|
2168
|
+
switch (this .childrenLoaded ? this .level_changed_ .getValue () : 0)
|
|
2159
2169
|
{
|
|
2160
2170
|
case 0:
|
|
2161
2171
|
{
|
|
2162
2172
|
if (this .rootNode_ .length)
|
|
2163
|
-
return this .rootGroup .getBBox (bbox);
|
|
2173
|
+
return this .rootGroup .getBBox (bbox, shadow);
|
|
2164
2174
|
|
|
2165
|
-
return this .rootInline .getBBox (bbox);
|
|
2175
|
+
return this .rootInline .getBBox (bbox, shadow);
|
|
2166
2176
|
}
|
|
2167
2177
|
case 1:
|
|
2168
2178
|
{
|
|
2179
|
+
// Must be unique for each GeoLOD..
|
|
2180
|
+
const childBBox = this .childBBox;
|
|
2181
|
+
|
|
2169
2182
|
bbox .set ();
|
|
2170
|
-
|
|
2171
|
-
bbox .add (this .child1Inline .getBBox (
|
|
2172
|
-
bbox .add (this .child2Inline .getBBox (
|
|
2173
|
-
bbox .add (this .child3Inline .getBBox (
|
|
2174
|
-
bbox .add (this .child4Inline .getBBox (
|
|
2175
|
-
|
|
2183
|
+
|
|
2184
|
+
bbox .add (this .child1Inline .getBBox (childBBox, shadow));
|
|
2185
|
+
bbox .add (this .child2Inline .getBBox (childBBox, shadow));
|
|
2186
|
+
bbox .add (this .child3Inline .getBBox (childBBox, shadow));
|
|
2187
|
+
bbox .add (this .child4Inline .getBBox (childBBox, shadow));
|
|
2188
|
+
|
|
2176
2189
|
return bbox;
|
|
2177
2190
|
}
|
|
2178
2191
|
}
|
|
@@ -2186,90 +2199,89 @@ function (Fields,
|
|
|
2186
2199
|
{
|
|
2187
2200
|
if (this .level_changed_ .getValue () !== 0)
|
|
2188
2201
|
return;
|
|
2189
|
-
|
|
2202
|
+
|
|
2190
2203
|
if (this .rootNode_ .length)
|
|
2191
2204
|
return;
|
|
2192
|
-
|
|
2205
|
+
|
|
2193
2206
|
if (this .rootInline .checkLoadState () === X3DConstants .COMPLETE_STATE)
|
|
2194
2207
|
{
|
|
2195
2208
|
this .children_ = this .rootInline .getInternalScene () .getRootNodes ();
|
|
2196
2209
|
this .childrenLoaded = false;
|
|
2197
2210
|
}
|
|
2198
2211
|
},
|
|
2199
|
-
set_childLoadState__:
|
|
2212
|
+
set_childLoadState__: function ()
|
|
2200
2213
|
{
|
|
2201
|
-
|
|
2214
|
+
if (this .level_changed_ .getValue () !== 1)
|
|
2215
|
+
return;
|
|
2202
2216
|
|
|
2203
|
-
|
|
2217
|
+
var loaded = 0;
|
|
2218
|
+
|
|
2219
|
+
if (this .child1Inline .checkLoadState () === X3DConstants .COMPLETE_STATE ||
|
|
2220
|
+
this .child1Inline .checkLoadState () === X3DConstants .FAILED_STATE)
|
|
2221
|
+
++ loaded;
|
|
2222
|
+
|
|
2223
|
+
if (this .child2Inline .checkLoadState () === X3DConstants .COMPLETE_STATE ||
|
|
2224
|
+
this .child2Inline .checkLoadState () === X3DConstants .FAILED_STATE)
|
|
2225
|
+
++ loaded;
|
|
2226
|
+
|
|
2227
|
+
if (this .child3Inline .checkLoadState () === X3DConstants .COMPLETE_STATE ||
|
|
2228
|
+
this .child3Inline .checkLoadState () === X3DConstants .FAILED_STATE)
|
|
2229
|
+
++ loaded;
|
|
2230
|
+
|
|
2231
|
+
if (this .child4Inline .checkLoadState () === X3DConstants .COMPLETE_STATE ||
|
|
2232
|
+
this .child4Inline .checkLoadState () === X3DConstants .FAILED_STATE)
|
|
2233
|
+
++ loaded;
|
|
2234
|
+
|
|
2235
|
+
if (loaded === 4)
|
|
2204
2236
|
{
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
if (this .child4Inline .checkLoadState () === X3DConstants .COMPLETE_STATE)
|
|
2247
|
-
{
|
|
2248
|
-
var rootNodes = this .child4Inline .getInternalScene () .getRootNodes ();
|
|
2249
|
-
|
|
2250
|
-
for (var i = 0, length = rootNodes .length; i < length; ++ i)
|
|
2251
|
-
nodes .push (rootNodes [i]);
|
|
2252
|
-
|
|
2253
|
-
++ loaded;
|
|
2254
|
-
}
|
|
2255
|
-
else if (this .child4Inline .checkLoadState () === X3DConstants .FAILED_STATE)
|
|
2256
|
-
++ loaded;
|
|
2257
|
-
|
|
2258
|
-
if (loaded === 4)
|
|
2259
|
-
{
|
|
2260
|
-
this .childrenLoaded = true;
|
|
2261
|
-
|
|
2262
|
-
this .children_ .assign (nodes);
|
|
2263
|
-
}
|
|
2264
|
-
};
|
|
2265
|
-
})(),
|
|
2237
|
+
this .childrenLoaded = true;
|
|
2238
|
+
|
|
2239
|
+
var children = this .children_;
|
|
2240
|
+
|
|
2241
|
+
children .length = 0;
|
|
2242
|
+
|
|
2243
|
+
var rootNodes = this .child1Inline .getInternalScene () .getRootNodes ();
|
|
2244
|
+
|
|
2245
|
+
for (var i = 0, length = rootNodes .length; i < length; ++ i)
|
|
2246
|
+
children .push (rootNodes [i]);
|
|
2247
|
+
|
|
2248
|
+
var rootNodes = this .child2Inline .getInternalScene () .getRootNodes ();
|
|
2249
|
+
|
|
2250
|
+
for (var i = 0, length = rootNodes .length; i < length; ++ i)
|
|
2251
|
+
children .push (rootNodes [i]);
|
|
2252
|
+
|
|
2253
|
+
var rootNodes = this .child3Inline .getInternalScene () .getRootNodes ();
|
|
2254
|
+
|
|
2255
|
+
for (var i = 0, length = rootNodes .length; i < length; ++ i)
|
|
2256
|
+
children .push (rootNodes [i]);
|
|
2257
|
+
|
|
2258
|
+
var rootNodes = this .child4Inline .getInternalScene () .getRootNodes ();
|
|
2259
|
+
|
|
2260
|
+
for (var i = 0, length = rootNodes .length; i < length; ++ i)
|
|
2261
|
+
children .push (rootNodes [i]);
|
|
2262
|
+
}
|
|
2263
|
+
},
|
|
2264
|
+
set_childCameraObject__: function ()
|
|
2265
|
+
{
|
|
2266
|
+
this .setCameraObject (this .child1Inline .getCameraObject () ||
|
|
2267
|
+
this .child2Inline .getCameraObject () ||
|
|
2268
|
+
this .child3Inline .getCameraObject () ||
|
|
2269
|
+
this .child4Inline .getCameraObject ());
|
|
2270
|
+
},
|
|
2271
|
+
set_childPickableObject__: function ()
|
|
2272
|
+
{
|
|
2273
|
+
this .setPickableObject (this .child1Inline .getPickableObject () ||
|
|
2274
|
+
this .child2Inline .getPickableObject () ||
|
|
2275
|
+
this .child3Inline .getPickableObject () ||
|
|
2276
|
+
this .child4Inline .getPickableObject ());
|
|
2277
|
+
},
|
|
2266
2278
|
getLevel: function (modelViewMatrix)
|
|
2267
2279
|
{
|
|
2268
2280
|
var distance = this .getDistance (modelViewMatrix);
|
|
2269
|
-
|
|
2281
|
+
|
|
2270
2282
|
if (distance < this .range_ .getValue ())
|
|
2271
2283
|
return 1;
|
|
2272
|
-
|
|
2284
|
+
|
|
2273
2285
|
return 0;
|
|
2274
2286
|
},
|
|
2275
2287
|
getDistance: function (modelViewMatrix)
|
|
@@ -2280,50 +2292,132 @@ function (Fields,
|
|
|
2280
2292
|
},
|
|
2281
2293
|
traverse: function (type, renderObject)
|
|
2282
2294
|
{
|
|
2283
|
-
|
|
2295
|
+
switch (type)
|
|
2284
2296
|
{
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
if (level !== this .level_changed_ .getValue ())
|
|
2297
|
+
case TraverseType .PICKING:
|
|
2288
2298
|
{
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2299
|
+
var
|
|
2300
|
+
browser = renderObject .getBrowser (),
|
|
2301
|
+
pickingHierarchy = browser .getPickingHierarchy ();
|
|
2302
|
+
|
|
2303
|
+
pickingHierarchy .push (this);
|
|
2304
|
+
|
|
2305
|
+
this .traverseChildren (type, renderObject);
|
|
2306
|
+
|
|
2307
|
+
pickingHierarchy .pop ();
|
|
2308
|
+
return;
|
|
2309
|
+
}
|
|
2310
|
+
case TraverseType .DISPLAY:
|
|
2311
|
+
{
|
|
2312
|
+
var level = this .getLevel (this .modelViewMatrix .assign (renderObject .getModelViewMatrix () .get ()));
|
|
2313
|
+
|
|
2314
|
+
if (level !== this .level_changed_ .getValue ())
|
|
2292
2315
|
{
|
|
2293
|
-
|
|
2316
|
+
this .level_changed_ = level;
|
|
2317
|
+
|
|
2318
|
+
switch (level)
|
|
2294
2319
|
{
|
|
2295
|
-
|
|
2320
|
+
case 0:
|
|
2296
2321
|
{
|
|
2297
|
-
this .
|
|
2298
|
-
this .
|
|
2322
|
+
this .child1Inline .isCameraObject_ .removeInterest ("set_childCameraObject__", this);
|
|
2323
|
+
this .child2Inline .isCameraObject_ .removeInterest ("set_childCameraObject__", this);
|
|
2324
|
+
this .child3Inline .isCameraObject_ .removeInterest ("set_childCameraObject__", this);
|
|
2325
|
+
this .child4Inline .isCameraObject_ .removeInterest ("set_childCameraObject__", this);
|
|
2326
|
+
this .child1Inline .isPickableObject_ .removeInterest ("set_childPickableObject__", this);
|
|
2327
|
+
this .child2Inline .isPickableObject_ .removeInterest ("set_childPickableObject__", this);
|
|
2328
|
+
this .child3Inline .isPickableObject_ .removeInterest ("set_childPickableObject__", this);
|
|
2329
|
+
this .child4Inline .isPickableObject_ .removeInterest ("set_childPickableObject__", this);
|
|
2330
|
+
|
|
2331
|
+
if (this .rootNode_ .length)
|
|
2332
|
+
{
|
|
2333
|
+
this .rootGroup .isCameraObject_ .addFieldInterest (this .isCameraObject_);
|
|
2334
|
+
this .rootGroup .isPickableObject_ .addFieldInterest (this .isPickableObject_);
|
|
2335
|
+
|
|
2336
|
+
this .setCameraObject (this .rootGroup .getCameraObject ());
|
|
2337
|
+
this .setPickableObject (this .rootGroup .getPickableObject ());
|
|
2338
|
+
|
|
2339
|
+
this .children_ = this .rootNode_;
|
|
2340
|
+
this .childrenLoaded = false;
|
|
2341
|
+
}
|
|
2342
|
+
else
|
|
2343
|
+
{
|
|
2344
|
+
if (this .rootInline .checkLoadState () == X3DConstants .COMPLETE_STATE)
|
|
2345
|
+
{
|
|
2346
|
+
this .rootInline .isCameraObject_ .addFieldInterest (this .isCameraObject_);
|
|
2347
|
+
this .rootInline .isPickableObject_ .addFieldInterest (this .isPickableObject_);
|
|
2348
|
+
|
|
2349
|
+
this .setCameraObject (this .rootInline .getCameraObject ());
|
|
2350
|
+
this .setPickableObject (this .rootInline .getPickableObject ());
|
|
2351
|
+
|
|
2352
|
+
this .children_ = this .rootInline .getInternalScene () .getRootNodes ();
|
|
2353
|
+
this .childrenLoaded = false;
|
|
2354
|
+
}
|
|
2355
|
+
}
|
|
2356
|
+
|
|
2357
|
+
if (this .unload)
|
|
2358
|
+
{
|
|
2359
|
+
this .child1Inline .load_ = false;
|
|
2360
|
+
this .child2Inline .load_ = false;
|
|
2361
|
+
this .child3Inline .load_ = false;
|
|
2362
|
+
this .child4Inline .load_ = false;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
break;
|
|
2299
2366
|
}
|
|
2300
|
-
|
|
2367
|
+
case 1:
|
|
2301
2368
|
{
|
|
2302
|
-
if (this .
|
|
2369
|
+
if (this .rootNode_ .length)
|
|
2303
2370
|
{
|
|
2304
|
-
this .
|
|
2305
|
-
this .
|
|
2371
|
+
this .rootGroup .isCameraObject_ .removeFieldInterest (this .isCameraObject_);
|
|
2372
|
+
this .rootGroup .isPickableObject_ .removeFieldInterest (this .isPickableObject_);
|
|
2373
|
+
}
|
|
2374
|
+
else
|
|
2375
|
+
{
|
|
2376
|
+
this .rootInline .isCameraObject_ .removeFieldInterest (this .isCameraObject_);
|
|
2377
|
+
this .rootInline .isPickableObject_ .removeFieldInterest (this .isPickableObject_);
|
|
2306
2378
|
}
|
|
2379
|
+
|
|
2380
|
+
this .child1Inline .isCameraObject_ .addInterest ("set_childCameraObject__", this);
|
|
2381
|
+
this .child2Inline .isCameraObject_ .addInterest ("set_childCameraObject__", this);
|
|
2382
|
+
this .child3Inline .isCameraObject_ .addInterest ("set_childCameraObject__", this);
|
|
2383
|
+
this .child4Inline .isCameraObject_ .addInterest ("set_childCameraObject__", this);
|
|
2384
|
+
this .child1Inline .isPickableObject_ .addInterest ("set_childPickableObject__", this);
|
|
2385
|
+
this .child2Inline .isPickableObject_ .addInterest ("set_childPickableObject__", this);
|
|
2386
|
+
this .child3Inline .isPickableObject_ .addInterest ("set_childPickableObject__", this);
|
|
2387
|
+
this .child4Inline .isPickableObject_ .addInterest ("set_childPickableObject__", this);
|
|
2388
|
+
|
|
2389
|
+
this .set_childCameraObject__ ();
|
|
2390
|
+
this .set_childPickableObject__ ();
|
|
2391
|
+
|
|
2392
|
+
if (this .child1Inline .load_ .getValue ())
|
|
2393
|
+
{
|
|
2394
|
+
this .set_childLoadState__ ();
|
|
2395
|
+
}
|
|
2396
|
+
else
|
|
2397
|
+
{
|
|
2398
|
+
this .child1Inline .load_ = true;
|
|
2399
|
+
this .child2Inline .load_ = true;
|
|
2400
|
+
this .child3Inline .load_ = true;
|
|
2401
|
+
this .child4Inline .load_ = true;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
break;
|
|
2307
2405
|
}
|
|
2308
|
-
|
|
2309
|
-
this .child1Inline .load_ = false;
|
|
2310
|
-
this .child2Inline .load_ = false;
|
|
2311
|
-
this .child3Inline .load_ = false;
|
|
2312
|
-
this .child4Inline .load_ = false;
|
|
2313
|
-
break;
|
|
2314
|
-
}
|
|
2315
|
-
case 1:
|
|
2316
|
-
{
|
|
2317
|
-
this .child1Inline .load_ = true;
|
|
2318
|
-
this .child2Inline .load_ = true;
|
|
2319
|
-
this .child3Inline .load_ = true;
|
|
2320
|
-
this .child4Inline .load_ = true;
|
|
2321
|
-
break;
|
|
2322
2406
|
}
|
|
2323
2407
|
}
|
|
2408
|
+
|
|
2409
|
+
this .traverseChildren (type, renderObject);
|
|
2410
|
+
return;
|
|
2411
|
+
}
|
|
2412
|
+
default:
|
|
2413
|
+
{
|
|
2414
|
+
this .traverseChildren (type, renderObject);
|
|
2415
|
+
return;
|
|
2324
2416
|
}
|
|
2325
2417
|
}
|
|
2326
|
-
|
|
2418
|
+
},
|
|
2419
|
+
traverseChildren: function (type, renderObject)
|
|
2420
|
+
{
|
|
2327
2421
|
switch (this .childrenLoaded ? this .level_changed_ .getValue () : 0)
|
|
2328
2422
|
{
|
|
2329
2423
|
case 0:
|
|
@@ -2332,7 +2426,7 @@ function (Fields,
|
|
|
2332
2426
|
this .rootGroup .traverse (type, renderObject);
|
|
2333
2427
|
else
|
|
2334
2428
|
this .rootInline .traverse (type, renderObject);
|
|
2335
|
-
|
|
2429
|
+
|
|
2336
2430
|
break;
|
|
2337
2431
|
}
|
|
2338
2432
|
case 1:
|
|
@@ -2350,8 +2444,6 @@ function (Fields,
|
|
|
2350
2444
|
return GeoLOD;
|
|
2351
2445
|
});
|
|
2352
2446
|
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
2447
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
2356
2448
|
*******************************************************************************
|
|
2357
2449
|
*
|
|
@@ -2413,8 +2505,8 @@ define ('x_ite/Components/Geospatial/GeoLocation',[
|
|
|
2413
2505
|
function (Fields,
|
|
2414
2506
|
X3DFieldDefinition,
|
|
2415
2507
|
FieldDefinitionArray,
|
|
2416
|
-
X3DTransformMatrix3DNode,
|
|
2417
|
-
X3DGeospatialObject,
|
|
2508
|
+
X3DTransformMatrix3DNode,
|
|
2509
|
+
X3DGeospatialObject,
|
|
2418
2510
|
X3DConstants,
|
|
2419
2511
|
Matrix4)
|
|
2420
2512
|
{
|
|
@@ -2439,6 +2531,8 @@ function (Fields,
|
|
|
2439
2531
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "geoSystem", new Fields .MFString ("GD", "WE")),
|
|
2440
2532
|
new X3DFieldDefinition (X3DConstants .inputOutput, "geoCoords", new Fields .SFVec3d ()),
|
|
2441
2533
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "geoOrigin", new Fields .SFNode ()),
|
|
2534
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "visible", new Fields .SFBool (true)),
|
|
2535
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "bboxDisplay", new Fields .SFBool ()),
|
|
2442
2536
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxSize", new Fields .SFVec3f (-1, -1, -1)),
|
|
2443
2537
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxCenter", new Fields .SFVec3f ()),
|
|
2444
2538
|
new X3DFieldDefinition (X3DConstants .inputOnly, "addChildren", new Fields .MFNode ()),
|
|
@@ -2461,9 +2555,9 @@ function (Fields,
|
|
|
2461
2555
|
{
|
|
2462
2556
|
X3DTransformMatrix3DNode .prototype .initialize .call (this);
|
|
2463
2557
|
X3DGeospatialObject .prototype .initialize .call (this);
|
|
2464
|
-
|
|
2558
|
+
|
|
2465
2559
|
this .addInterest ("eventsProcessed", this);
|
|
2466
|
-
|
|
2560
|
+
|
|
2467
2561
|
this .eventsProcessed ();
|
|
2468
2562
|
},
|
|
2469
2563
|
eventsProcessed: function ()
|
|
@@ -2475,8 +2569,6 @@ function (Fields,
|
|
|
2475
2569
|
return GeoLocation;
|
|
2476
2570
|
});
|
|
2477
2571
|
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
2572
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
2481
2573
|
*******************************************************************************
|
|
2482
2574
|
*
|
|
@@ -2934,7 +3026,8 @@ function (Fields,
|
|
|
2934
3026
|
|
|
2935
3027
|
this .proximitySensor = new ProximitySensor (executionContext);
|
|
2936
3028
|
|
|
2937
|
-
this .setCameraObject
|
|
3029
|
+
this .setCameraObject (this .proximitySensor .getCameraObject ());
|
|
3030
|
+
this .setPickableObject (this .proximitySensor .getPickableObject ());
|
|
2938
3031
|
}
|
|
2939
3032
|
|
|
2940
3033
|
GeoProximitySensor .prototype = Object .assign (Object .create (X3DEnvironmentalSensorNode .prototype),
|
|
@@ -2977,8 +3070,9 @@ function (Fields,
|
|
|
2977
3070
|
this .size_ .addFieldInterest (this .proximitySensor .size_);
|
|
2978
3071
|
this .center_ .addFieldInterest (this .proximitySensor .center_);
|
|
2979
3072
|
|
|
2980
|
-
this .proximitySensor .isCameraObject_
|
|
2981
|
-
|
|
3073
|
+
this .proximitySensor .isCameraObject_ .addFieldInterest (this .isCameraObject_);
|
|
3074
|
+
this .proximitySensor .isPickableObject_ .addFieldInterest (this .isPickableObject_);
|
|
3075
|
+
|
|
2982
3076
|
this .proximitySensor .isActive_ .addFieldInterest (this .isActive_);
|
|
2983
3077
|
this .proximitySensor .enterTime_ .addFieldInterest (this .enterTime_);
|
|
2984
3078
|
this .proximitySensor .exitTime_ .addFieldInterest (this .exitTime_);
|
|
@@ -3219,8 +3313,8 @@ define ('x_ite/Components/Geospatial/GeoTransform',[
|
|
|
3219
3313
|
function (Fields,
|
|
3220
3314
|
X3DFieldDefinition,
|
|
3221
3315
|
FieldDefinitionArray,
|
|
3222
|
-
X3DTransformMatrix3DNode,
|
|
3223
|
-
X3DGeospatialObject,
|
|
3316
|
+
X3DTransformMatrix3DNode,
|
|
3317
|
+
X3DGeospatialObject,
|
|
3224
3318
|
X3DConstants,
|
|
3225
3319
|
Matrix4)
|
|
3226
3320
|
{
|
|
@@ -3253,6 +3347,8 @@ function (Fields,
|
|
|
3253
3347
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "geoOrigin", new Fields .SFNode ()),
|
|
3254
3348
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "geoSystem", new Fields .MFString ("GD", "WE")),
|
|
3255
3349
|
new X3DFieldDefinition (X3DConstants .inputOutput, "geoCenter", new Fields .SFVec3d ()),
|
|
3350
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "visible", new Fields .SFBool (true)),
|
|
3351
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "bboxDisplay", new Fields .SFBool ()),
|
|
3256
3352
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxSize", new Fields .SFVec3f (-1, -1, -1)),
|
|
3257
3353
|
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxCenter", new Fields .SFVec3f ()),
|
|
3258
3354
|
new X3DFieldDefinition (X3DConstants .inputOnly, "addChildren", new Fields .MFNode ()),
|
|
@@ -3275,9 +3371,9 @@ function (Fields,
|
|
|
3275
3371
|
{
|
|
3276
3372
|
X3DTransformMatrix3DNode .prototype .initialize .call (this);
|
|
3277
3373
|
X3DGeospatialObject .prototype .initialize .call (this);
|
|
3278
|
-
|
|
3374
|
+
|
|
3279
3375
|
this .addInterest ("eventsProcessed", this);
|
|
3280
|
-
|
|
3376
|
+
|
|
3281
3377
|
this .eventsProcessed ();
|
|
3282
3378
|
},
|
|
3283
3379
|
eventsProcessed: function ()
|
|
@@ -3287,14 +3383,14 @@ function (Fields,
|
|
|
3287
3383
|
this .setHidden (this .scale_ .x === 0 ||
|
|
3288
3384
|
this .scale_ .y === 0 ||
|
|
3289
3385
|
this .scale_ .z === 0);
|
|
3290
|
-
|
|
3386
|
+
|
|
3291
3387
|
this .getLocationMatrix (this .geoCenter_ .getValue (), locationMatrix);
|
|
3292
|
-
|
|
3388
|
+
|
|
3293
3389
|
matrix .set (this .translation_ .getValue (),
|
|
3294
3390
|
this .rotation_ .getValue (),
|
|
3295
3391
|
this .scale_ .getValue (),
|
|
3296
3392
|
this .scaleOrientation_ .getValue ());
|
|
3297
|
-
|
|
3393
|
+
|
|
3298
3394
|
this .setMatrix (matrix .multRight (locationMatrix) .multLeft (locationMatrix .inverse ()));
|
|
3299
3395
|
}
|
|
3300
3396
|
catch (error)
|
|
@@ -3308,8 +3404,6 @@ function (Fields,
|
|
|
3308
3404
|
return GeoTransform;
|
|
3309
3405
|
});
|
|
3310
3406
|
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
3407
|
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
3314
3408
|
*******************************************************************************
|
|
3315
3409
|
*
|
|
@@ -3378,7 +3472,7 @@ define ('x_ite/Components/Geospatial/GeoViewpoint',[
|
|
|
3378
3472
|
function (Fields,
|
|
3379
3473
|
X3DFieldDefinition,
|
|
3380
3474
|
FieldDefinitionArray,
|
|
3381
|
-
X3DViewpointNode,
|
|
3475
|
+
X3DViewpointNode,
|
|
3382
3476
|
X3DGeospatialObject,
|
|
3383
3477
|
ScalarInterpolator,
|
|
3384
3478
|
NavigationInfo,
|
|
@@ -3468,9 +3562,9 @@ function (Fields,
|
|
|
3468
3562
|
this .positionOffset_ .addInterest ("set_position__", this);
|
|
3469
3563
|
this .navType_ .addFieldInterest (this .navigationInfoNode .type_);
|
|
3470
3564
|
this .headlight_ .addFieldInterest (this .navigationInfoNode .headlight_);
|
|
3471
|
-
|
|
3565
|
+
|
|
3472
3566
|
this .navigationInfoNode .setup ();
|
|
3473
|
-
|
|
3567
|
+
|
|
3474
3568
|
this .set_position__ ();
|
|
3475
3569
|
|
|
3476
3570
|
// Setup interpolators
|
|
@@ -3481,19 +3575,21 @@ function (Fields,
|
|
|
3481
3575
|
this .getEaseInEaseOut () .modifiedFraction_changed_ .addFieldInterest (this .fieldOfViewInterpolator .set_fraction_);
|
|
3482
3576
|
this .fieldOfViewInterpolator .value_changed_ .addFieldInterest (this .fieldOfViewScale_);
|
|
3483
3577
|
},
|
|
3484
|
-
setInterpolators: function (
|
|
3578
|
+
setInterpolators: function (fromViewpointNode, toViewpointNode)
|
|
3485
3579
|
{
|
|
3486
|
-
if (
|
|
3580
|
+
if (fromViewpointNode .getType () .indexOf (X3DConstants .Viewpoint) >= 0)
|
|
3487
3581
|
{
|
|
3488
|
-
|
|
3582
|
+
const scale = fromViewpointNode .getFieldOfView () / toViewpointNode .getFieldOfView ();
|
|
3583
|
+
|
|
3584
|
+
this .fieldOfViewInterpolator .keyValue_ = new Fields .MFFloat (scale, toViewpointNode .fieldOfViewScale_ .getValue ());
|
|
3585
|
+
|
|
3586
|
+
this .fieldOfViewScale_ = scale;
|
|
3489
3587
|
}
|
|
3490
3588
|
else
|
|
3491
3589
|
{
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
this .
|
|
3495
|
-
|
|
3496
|
-
this .fieldOfViewScale_ = scale;
|
|
3590
|
+
this .fieldOfViewInterpolator .keyValue_ = new Fields .MFFloat (toViewpointNode .fieldOfViewScale_ .getValue (), toViewpointNode .fieldOfViewScale_ .getValue ());
|
|
3591
|
+
|
|
3592
|
+
this .fieldOfViewScale_ = toViewpointNode .fieldOfViewScale_ .getValue ();
|
|
3497
3593
|
}
|
|
3498
3594
|
},
|
|
3499
3595
|
setPosition: (function ()
|
|
@@ -3509,7 +3605,7 @@ function (Fields,
|
|
|
3509
3605
|
{
|
|
3510
3606
|
var position = new Vector3 (0, 0, 0);
|
|
3511
3607
|
|
|
3512
|
-
return function ()
|
|
3608
|
+
return function ()
|
|
3513
3609
|
{
|
|
3514
3610
|
return this .getCoord (this .position_ .getValue (), position);
|
|
3515
3611
|
};
|
|
@@ -3521,7 +3617,7 @@ function (Fields,
|
|
|
3521
3617
|
return function ()
|
|
3522
3618
|
{
|
|
3523
3619
|
this .getCoord (this .position_ .getValue (), position);
|
|
3524
|
-
|
|
3620
|
+
|
|
3525
3621
|
this .elevation = this .getGeoElevation (position .add (this .positionOffset_ .getValue ()));
|
|
3526
3622
|
};
|
|
3527
3623
|
})(),
|
|
@@ -3534,11 +3630,11 @@ function (Fields,
|
|
|
3534
3630
|
return function (value)
|
|
3535
3631
|
{
|
|
3536
3632
|
/// Returns the resulting orientation for this viewpoint.
|
|
3537
|
-
|
|
3633
|
+
|
|
3538
3634
|
var rotationMatrix = this .getLocationMatrix (this .position_ .getValue (), locationMatrix) .submatrix;
|
|
3539
|
-
|
|
3635
|
+
|
|
3540
3636
|
geoOrientation .setMatrix (rotationMatrix);
|
|
3541
|
-
|
|
3637
|
+
|
|
3542
3638
|
this .orientation_ .setValue (geoOrientation .inverse () .multLeft (value));
|
|
3543
3639
|
};
|
|
3544
3640
|
})(),
|
|
@@ -3551,11 +3647,11 @@ function (Fields,
|
|
|
3551
3647
|
return function ()
|
|
3552
3648
|
{
|
|
3553
3649
|
/// Returns the resulting orientation for this viewpoint.
|
|
3554
|
-
|
|
3650
|
+
|
|
3555
3651
|
var rotationMatrix = this .getLocationMatrix (this .position_ .getValue (), locationMatrix) .submatrix;
|
|
3556
|
-
|
|
3652
|
+
|
|
3557
3653
|
orientation .setMatrix (rotationMatrix);
|
|
3558
|
-
|
|
3654
|
+
|
|
3559
3655
|
return orientation .multLeft (this .orientation_ .getValue ());
|
|
3560
3656
|
};
|
|
3561
3657
|
})(),
|
|
@@ -3602,17 +3698,17 @@ function (Fields,
|
|
|
3602
3698
|
return function (point, viewport)
|
|
3603
3699
|
{
|
|
3604
3700
|
// Returns the screen scale in meter/pixel for on pixel.
|
|
3605
|
-
|
|
3701
|
+
|
|
3606
3702
|
var
|
|
3607
3703
|
width = viewport [2],
|
|
3608
3704
|
height = viewport [3],
|
|
3609
3705
|
size = Math .abs (point .z) * Math .tan (this .getFieldOfView () / 2) * 2;
|
|
3610
|
-
|
|
3706
|
+
|
|
3611
3707
|
if (width > height)
|
|
3612
3708
|
size /= height;
|
|
3613
3709
|
else
|
|
3614
3710
|
size /= width;
|
|
3615
|
-
|
|
3711
|
+
|
|
3616
3712
|
return screenScale .set (size, size, size);
|
|
3617
3713
|
};
|
|
3618
3714
|
})(),
|
|
@@ -3627,10 +3723,10 @@ function (Fields,
|
|
|
3627
3723
|
height = viewport [3],
|
|
3628
3724
|
size = nearValue * Math .tan (this .getFieldOfView () / 2) * 2,
|
|
3629
3725
|
aspect = width / height;
|
|
3630
|
-
|
|
3726
|
+
|
|
3631
3727
|
if (aspect > 1)
|
|
3632
3728
|
return viewportSize .set (size * aspect, size);
|
|
3633
|
-
|
|
3729
|
+
|
|
3634
3730
|
return viewportSize .set (size, size / aspect);
|
|
3635
3731
|
};
|
|
3636
3732
|
})(),
|
|
@@ -3642,7 +3738,7 @@ function (Fields,
|
|
|
3642
3738
|
{
|
|
3643
3739
|
if (limit || this .getBrowser () .getRenderingProperty ("LogarithmicDepthBuffer"))
|
|
3644
3740
|
return Camera .perspective (this .getFieldOfView (), nearValue, farValue, viewport [2], viewport [3], this .projectionMatrix);
|
|
3645
|
-
|
|
3741
|
+
|
|
3646
3742
|
// Linear interpolate nearValue and farValue
|
|
3647
3743
|
|
|
3648
3744
|
var
|
|
@@ -3656,8 +3752,6 @@ function (Fields,
|
|
|
3656
3752
|
return GeoViewpoint;
|
|
3657
3753
|
});
|
|
3658
3754
|
|
|
3659
|
-
|
|
3660
|
-
|
|
3661
3755
|
/*******************************************************************************
|
|
3662
3756
|
*
|
|
3663
3757
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
@@ -3706,7 +3800,7 @@ function (Fields,
|
|
|
3706
3800
|
******************************************************************************/
|
|
3707
3801
|
|
|
3708
3802
|
|
|
3709
|
-
define ([
|
|
3803
|
+
define (require .getComponentUrl ("geospatial"), [
|
|
3710
3804
|
"x_ite/Components",
|
|
3711
3805
|
"x_ite/Components/Geospatial/GeoCoordinate",
|
|
3712
3806
|
"x_ite/Components/Geospatial/GeoElevationGrid",
|
|
@@ -3762,4 +3856,5 @@ function (Components,
|
|
|
3762
3856
|
|
|
3763
3857
|
|
|
3764
3858
|
|
|
3765
|
-
}
|
|
3859
|
+
})
|
|
3860
|
+
(typeof module === "object" ? module : undefined, typeof require === "function" ? require : undefined);
|