x_ite 4.0.5 → 4.7.5
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/settings.json +15 -0
- package/.vscode/tasks.json +25 -0
- package/Makefile +55 -15
- package/README.md +13 -130
- package/build/bin/dist.pl +156 -0
- package/build/bin/version-number.pl +25 -0
- package/build/{version.pl → bin/version.pl} +64 -21
- 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 +2 -0
- package/build/parts/default.start.frag +6 -0
- package/build/parts/x_ite.end.frag +23 -0
- package/build/parts/x_ite.start.frag +8 -0
- package/build/x_ite.build.js +18 -0
- package/dist/LICENSE.txt +49 -0
- package/dist/assets/components/annotation.js +813 -0
- package/dist/assets/components/annotation.min.js +1 -0
- package/dist/assets/components/cad-geometry.js +1037 -0
- package/dist/assets/components/cad-geometry.min.js +1 -0
- package/dist/assets/components/cube-map-texturing.js +1212 -0
- package/dist/assets/components/cube-map-texturing.min.js +1 -0
- package/dist/assets/components/dis.js +908 -0
- package/dist/assets/components/dis.min.js +1 -0
- package/dist/assets/components/event-utilities.js +1114 -0
- package/dist/assets/components/event-utilities.min.js +1 -0
- package/dist/assets/components/geometry2d.js +2190 -0
- package/dist/assets/components/geometry2d.min.js +1 -0
- package/dist/assets/components/geospatial.js +3850 -0
- package/dist/assets/components/geospatial.min.js +2 -0
- package/dist/assets/components/h-anim.js +1084 -0
- package/dist/assets/components/h-anim.min.js +1 -0
- package/dist/assets/components/key-device-sensor.js +850 -0
- package/dist/assets/components/key-device-sensor.min.js +1 -0
- package/dist/assets/components/layout.js +2008 -0
- package/dist/assets/components/layout.min.js +1 -0
- package/dist/assets/components/nurbs.js +5388 -0
- package/dist/assets/components/nurbs.min.js +2 -0
- package/dist/assets/components/particle-systems.js +4216 -0
- package/dist/assets/components/particle-systems.min.js +2 -0
- package/dist/assets/components/picking.js +2481 -0
- package/dist/assets/components/picking.min.js +1 -0
- package/dist/assets/components/projective-texture-mapping.js +813 -0
- package/dist/assets/components/projective-texture-mapping.min.js +1 -0
- package/dist/assets/components/rigid-body-physics.js +4569 -0
- package/dist/assets/components/rigid-body-physics.min.js +59 -0
- package/dist/assets/components/scripting.js +801 -0
- package/dist/assets/components/scripting.min.js +1 -0
- package/dist/assets/components/texturing-3d.js +10054 -0
- package/dist/assets/components/texturing-3d.min.js +48 -0
- package/dist/assets/components/volume-rendering.js +3966 -0
- package/dist/assets/components/volume-rendering.min.js +3 -0
- package/dist/assets/components/x_ite.js +285 -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 +16 -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 +108 -0
- package/dist/assets/shaders/webgl1/Phong.fs +838 -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 +541 -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 +109 -0
- package/dist/assets/shaders/webgl2/Phong.fs +1014 -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 +696 -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 +180 -59
- package/dist/x_ite.js +74696 -68048
- package/dist/x_ite.min.js +42 -41
- package/dist/x_ite.zip +0 -0
- package/docs/404.md +5 -0
- package/docs/Accessing-the-External-Browser.md +290 -0
- package/docs/Browser-Support.md +47 -0
- package/docs/Custom-Shaders.md +905 -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 +1240 -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 +1026 -0
- package/docs/reference/Browser-Services.md +333 -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 +334 -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 +76 -54
- package/package.json +41 -24
- package/src/assets/components/annotation.js +87 -0
- package/src/assets/components/cad-geometry.js +88 -0
- package/src/assets/components/cube-map-texturing.js +78 -0
- package/src/assets/components/dis.js +84 -0
- package/src/assets/components/event-utilities.js +93 -0
- package/src/assets/components/geometry2d.js +93 -0
- package/src/assets/components/geospatial.js +102 -0
- package/src/assets/components/h-anim.js +83 -0
- package/src/assets/components/key-device-sensor.js +78 -0
- package/src/assets/components/layout.js +87 -0
- package/src/assets/components/nurbs.js +118 -0
- package/src/assets/components/particle-systems.js +105 -0
- package/src/assets/components/picking.js +87 -0
- package/src/assets/components/projective-texture-mapping.js +75 -0
- package/src/assets/components/rigid-body-physics.js +123 -0
- package/src/assets/components/scripting.js +72 -0
- package/src/assets/components/texturing-3d.js +91 -0
- package/src/assets/components/volume-rendering.js +118 -0
- package/src/assets/components/x_ite.js +69 -0
- 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 +22 -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 +148 -0
- package/src/assets/shaders/webgl1/Phong.fs +173 -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 +89 -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/assets/shaders/webgl1/include/Pack.glsl +51 -0
- package/src/assets/shaders/webgl1/include/Perlin.glsl +40 -0
- package/src/assets/shaders/webgl1/include/Shadow.glsl +310 -0
- 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 +149 -0
- package/src/assets/shaders/webgl2/Phong.fs +171 -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 +88 -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 +83 -164
- package/src/dummy.js +1 -0
- package/src/example.html +8 -7
- package/src/examples.js +150 -0
- package/src/lib/ammojs/AmmoJS.js +58 -0
- package/src/lib/ammojs/Makefile +26 -0
- package/src/lib/ammojs/ammo.idl +1031 -0
- package/src/lib/ammojs/ammo.js +40 -0
- package/src/lib/jpeg/jpeg.js +1019 -0
- package/src/lib/nurbs/extras/sample.js +242 -0
- package/src/lib/nurbs/nurbs.js +342 -0
- package/src/lib/nurbs/src/evaluate.js +413 -0
- package/src/lib/nurbs/src/numerical-derivative.js +54 -0
- package/src/lib/nurbs/src/support.js +151 -0
- package/src/lib/nurbs/src/transform.js +78 -0
- package/src/lib/nurbs/src/utils/accessor-preamble.js +33 -0
- package/src/lib/nurbs/src/utils/bisection-search.js +28 -0
- package/src/lib/nurbs/src/utils/cache-key.js +57 -0
- package/src/lib/nurbs/src/utils/create-accessors.js +110 -0
- package/src/lib/nurbs/src/utils/infer-type.js +52 -0
- package/src/lib/nurbs/src/utils/is-array-like.js +10 -0
- package/src/lib/nurbs/src/utils/is-ndarray-like.js +18 -0
- package/src/lib/nurbs/src/utils/is-ndarray.js +21 -0
- package/src/lib/nurbs/src/utils/ndloop.js +23 -0
- package/src/lib/nurbs/src/utils/size-getter.js +22 -0
- package/src/lib/nurbs/src/utils/variable.js +31 -0
- package/src/locale/de.po +8 -3
- package/src/locale/fr.po +9 -4
- package/src/locale/gettext.js +3 -3
- package/src/spinner.css +21 -8
- package/src/standard/Geospatial/Geodetic.js +48 -48
- package/src/standard/Geospatial/ReferenceEllipsoids.js +1 -1
- package/src/standard/Geospatial/UniversalTransverseMercator.js +43 -43
- package/src/standard/Math/Algorithm.js +25 -41
- 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 +97 -0
- 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 +457 -284
- package/src/standard/Math/Geometry/Camera.js +24 -15
- package/src/standard/Math/Geometry/Cylinder3.js +13 -13
- package/src/standard/Math/Geometry/Line3.js +61 -53
- package/src/standard/Math/Geometry/Plane3.js +16 -16
- 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 +6 -6
- package/src/standard/Math/Geometry/Triangle3.js +80 -88
- package/src/standard/Math/Geometry/ViewVolume.js +315 -116
- package/src/standard/Math/Numbers/Color3.js +45 -29
- package/src/standard/Math/Numbers/Color4.js +25 -14
- package/src/standard/Math/Numbers/Complex.js +15 -22
- package/src/standard/Math/Numbers/Matrix2.js +37 -17
- package/src/standard/Math/Numbers/Matrix3.js +181 -212
- package/src/standard/Math/Numbers/Matrix4.js +204 -262
- package/src/standard/Math/Numbers/Quaternion.js +60 -147
- package/src/standard/Math/Numbers/Rotation4.js +197 -129
- package/src/standard/Math/Numbers/Vector2.js +53 -109
- package/src/standard/Math/Numbers/Vector3.js +75 -144
- package/src/standard/Math/Numbers/Vector4.js +85 -155
- package/src/standard/Math/Utility/BVH.js +35 -30
- package/src/standard/Math/Utility/MatrixStack.js +6 -9
- package/src/standard/Networking/BinaryTransport.js +8 -8
- package/src/standard/Time/MicroTime.js +79 -0
- package/src/standard/Utility/DataStorage.js +40 -17
- 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 +386 -0
- package/src/x_ite/Base/Events.js +22 -30
- package/src/x_ite/Base/X3DChildObject.js +35 -19
- package/src/x_ite/Base/X3DEventObject.js +10 -12
- package/src/x_ite/Base/X3DObject.js +63 -43
- package/src/x_ite/Basic/FieldDefinitionArray.js +16 -10
- package/src/x_ite/Basic/X3DArrayField.js +3 -430
- package/src/x_ite/Basic/X3DBaseNode.js +551 -288
- package/src/x_ite/Basic/X3DField.js +133 -96
- package/src/x_ite/Basic/X3DFieldDefinition.js +0 -4
- package/src/x_ite/Basic/X3DObjectArrayField.js +545 -0
- package/src/x_ite/Basic/X3DTypedArrayField.js +839 -0
- package/src/x_ite/Bits/TraverseType.js +2 -5
- package/src/x_ite/Bits/X3DConstants.js +12 -322
- package/src/x_ite/Browser/Core/BrowserOptions.js +205 -77
- package/src/x_ite/Browser/Core/BrowserProperties.js +2 -4
- package/src/x_ite/Browser/Core/BrowserTimings.js +16 -15
- package/src/x_ite/Browser/Core/ContextMenu.js +202 -80
- package/src/x_ite/Browser/Core/Notification.js +14 -6
- package/src/x_ite/Browser/Core/PrimitiveQuality.js +3 -7
- package/src/x_ite/Browser/Core/RenderingProperties.js +10 -11
- package/src/x_ite/Browser/Core/Shading.js +66 -0
- package/src/x_ite/Browser/Core/TextureQuality.js +3 -7
- package/src/x_ite/Browser/Core/X3DCoreContext.js +495 -48
- package/src/x_ite/Browser/Core/X3DCoreContext.js.~1~ +714 -0
- package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +17 -23
- package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +12 -20
- package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +82 -34
- package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +3 -5
- package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +3 -5
- package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +12 -9
- package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +60 -42
- package/src/x_ite/Browser/Geometry2D/Rectangle2DOptions.js +16 -20
- package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +51 -12
- package/src/x_ite/Browser/Geometry3D/BoxOptions.js +17 -21
- package/src/x_ite/Browser/Geometry3D/ConeOptions.js +2 -4
- package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +2 -4
- package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +2 -4
- package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +3 -5
- 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/Interpolation/CatmullRomSplineInterpolator.js +12 -12
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1.js +2 -4
- package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +2 -4
- package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +22 -200
- package/src/x_ite/Browser/Layout/ScreenText.js +287 -295
- package/src/x_ite/Browser/Layout/X3DLayoutContext.js +15 -12
- package/src/x_ite/Browser/Lighting/X3DLightingContext.js +18 -12
- package/src/x_ite/Browser/NURBS/NURBS.js +481 -0
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +587 -127
- package/src/x_ite/Browser/Navigation/FlyViewer.js +23 -5
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +402 -18
- package/src/x_ite/Browser/Navigation/NoneViewer.js +13 -3
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +46 -28
- package/src/x_ite/Browser/Navigation/WalkViewer.js +45 -17
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +414 -207
- package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +65 -48
- package/src/x_ite/Browser/Navigation/X3DViewer.js +99 -45
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +39 -38
- package/src/x_ite/Browser/Networking/urls.js +34 -5
- package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +7 -9
- 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 +89 -30
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer.js +1 -3
- package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +33 -15
- package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +39 -151
- package/src/x_ite/Browser/RigidBodyPhysics/AppliedParametersType.js +70 -0
- package/src/x_ite/Browser/Shaders/Shader.js +150 -50
- package/src/x_ite/Browser/Shaders/ShaderSource.js +140 -0
- package/src/x_ite/Browser/Shaders/ShaderTest.js +94 -77
- package/src/x_ite/Browser/Shaders/X3DShadersContext.js +220 -5
- 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/Sound/X3DSoundContext.js +1 -20
- package/src/x_ite/Browser/Text/PolygonText.js +165 -359
- 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 +58 -84
- 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 +148 -41
- 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 +2 -2
- 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 -182
- package/src/x_ite/Browser/X3DBrowserContext.js +77 -43
- 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/{PointingDeviceSensor/TouchGroup.js → Annotation/GroupAnnotation.js} +30 -24
- 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 +6 -8
- package/src/x_ite/Components/CADGeometry/CADFace.js +137 -33
- package/src/x_ite/Components/CADGeometry/CADLayer.js +5 -18
- package/src/x_ite/Components/CADGeometry/CADPart.js +6 -12
- package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +20 -36
- package/src/x_ite/Components/CADGeometry/QuadSet.js +11 -24
- package/src/x_ite/Components/CADGeometry/X3DProductStructureChildNode.js +2 -4
- package/src/x_ite/Components/Core/MetadataBoolean.js +2 -4
- package/src/x_ite/Components/Core/MetadataDouble.js +2 -4
- package/src/x_ite/Components/Core/MetadataFloat.js +2 -4
- package/src/x_ite/Components/Core/MetadataInteger.js +2 -4
- package/src/x_ite/Components/Core/MetadataSet.js +2 -4
- package/src/x_ite/Components/Core/MetadataString.js +2 -4
- package/src/x_ite/Components/Core/WorldInfo.js +18 -10
- package/src/x_ite/Components/Core/X3DBindableNode.js +5 -36
- package/src/x_ite/Components/Core/X3DChildNode.js +16 -5
- package/src/x_ite/Components/Core/X3DInfoNode.js +2 -4
- package/src/x_ite/Components/Core/X3DMetadataObject.js +1 -3
- package/src/x_ite/Components/Core/X3DNode.js +2 -64
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +190 -210
- package/src/x_ite/Components/Core/X3DSensorNode.js +2 -4
- package/src/x_ite/Components/Core.js +111 -0
- package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +42 -50
- package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +41 -42
- package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +44 -59
- package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +48 -46
- package/src/x_ite/Components/DIS/DISEntityManager.js +2 -4
- package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +2 -4
- package/src/x_ite/Components/DIS/EspduTransform.js +13 -9
- package/src/x_ite/Components/DIS/ReceiverPdu.js +13 -9
- package/src/x_ite/Components/DIS/SignalPdu.js +13 -9
- package/src/x_ite/Components/DIS/TransmitterPdu.js +13 -9
- package/src/x_ite/Components/EnvironmentalEffects/Background.js +2 -4
- package/src/x_ite/Components/EnvironmentalEffects/Fog.js +15 -18
- package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +59 -7
- package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +12 -10
- package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +2 -4
- package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +149 -143
- package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +61 -22
- package/src/x_ite/Components/EnvironmentalEffects.js +90 -0
- package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +121 -121
- package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +173 -53
- package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +33 -31
- package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +19 -11
- package/src/x_ite/Components/EnvironmentalSensor.js +81 -0
- package/src/x_ite/Components/EventUtilities/BooleanFilter.js +2 -4
- package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +2 -4
- package/src/x_ite/Components/EventUtilities/BooleanToggle.js +2 -4
- package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +2 -4
- package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +2 -4
- package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +2 -4
- package/src/x_ite/Components/EventUtilities/TimeTrigger.js +2 -4
- package/src/x_ite/Components/EventUtilities/X3DSequencerNode.js +2 -4
- package/src/x_ite/Components/EventUtilities/X3DTriggerNode.js +2 -4
- package/src/x_ite/Components/Followers/ColorChaser.js +3 -7
- package/src/x_ite/Components/Followers/ColorDamper.js +3 -7
- package/src/x_ite/Components/Followers/CoordinateChaser.js +3 -11
- package/src/x_ite/Components/Followers/CoordinateDamper.js +2 -10
- package/src/x_ite/Components/Followers/OrientationChaser.js +9 -7
- package/src/x_ite/Components/Followers/OrientationDamper.js +9 -7
- package/src/x_ite/Components/Followers/PositionChaser.js +3 -7
- package/src/x_ite/Components/Followers/PositionChaser2D.js +3 -7
- package/src/x_ite/Components/Followers/PositionDamper.js +3 -7
- package/src/x_ite/Components/Followers/PositionDamper2D.js +3 -7
- package/src/x_ite/Components/Followers/ScalarChaser.js +7 -7
- package/src/x_ite/Components/Followers/ScalarDamper.js +3 -7
- package/src/x_ite/Components/Followers/TexCoordChaser2D.js +3 -11
- package/src/x_ite/Components/Followers/TexCoordDamper2D.js +3 -11
- package/src/x_ite/Components/Followers/X3DChaserNode.js +26 -26
- package/src/x_ite/Components/Followers/X3DDamperNode.js +6 -10
- package/src/x_ite/Components/Followers/X3DFollowerNode.js +11 -11
- package/src/x_ite/Components/Followers.js +120 -0
- package/src/x_ite/Components/Geometry2D/Arc2D.js +28 -30
- package/src/x_ite/Components/Geometry2D/ArcClose2D.js +95 -93
- package/src/x_ite/Components/Geometry2D/Circle2D.js +16 -15
- package/src/x_ite/Components/Geometry2D/Disk2D.js +80 -88
- package/src/x_ite/Components/Geometry2D/Polyline2D.js +13 -19
- package/src/x_ite/Components/Geometry2D/Polypoint2D.js +12 -18
- package/src/x_ite/Components/Geometry2D/Rectangle2D.js +13 -13
- package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +31 -30
- package/src/x_ite/Components/Geometry3D/Box.js +12 -12
- package/src/x_ite/Components/Geometry3D/Cone.js +34 -36
- package/src/x_ite/Components/Geometry3D/Cylinder.js +52 -54
- package/src/x_ite/Components/Geometry3D/ElevationGrid.js +90 -52
- package/src/x_ite/Components/Geometry3D/Extrusion.js +472 -388
- package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +193 -163
- package/src/x_ite/Components/Geometry3D/Sphere.js +17 -19
- package/src/x_ite/Components/Geometry3D.js +90 -0
- package/src/x_ite/Components/Geospatial/GeoCoordinate.js +124 -61
- package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +54 -36
- package/src/x_ite/Components/Geospatial/GeoLOD.js +190 -98
- package/src/x_ite/Components/Geospatial/GeoLocation.js +8 -10
- package/src/x_ite/Components/Geospatial/GeoMetadata.js +2 -4
- package/src/x_ite/Components/Geospatial/GeoOrigin.js +2 -4
- package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +4 -4
- package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +10 -7
- package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +4 -4
- package/src/x_ite/Components/Geospatial/GeoTransform.js +13 -13
- package/src/x_ite/Components/Geospatial/GeoViewpoint.js +131 -78
- package/src/x_ite/Components/Geospatial/X3DGeospatialObject.js +7 -9
- package/src/x_ite/Components/Grouping/Group.js +5 -7
- package/src/x_ite/Components/Grouping/StaticGroup.js +194 -22
- package/src/x_ite/Components/Grouping/Switch.js +174 -25
- package/src/x_ite/Components/Grouping/Transform.js +5 -7
- package/src/x_ite/Components/Grouping/X3DBoundedObject.js +70 -16
- package/src/x_ite/Components/Grouping/X3DGroupingNode.js +442 -151
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +53 -29
- package/src/x_ite/Components/Grouping/X3DTransformNode.js +6 -9
- package/src/x_ite/Components/Grouping.js +93 -0
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimDisplacer.js +8 -10
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +360 -0
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimJoint.js +108 -23
- package/src/x_ite/Components/HAnim/HAnimMotion.js +113 -0
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimSegment.js +14 -14
- package/src/x_ite/Components/{H-Anim → HAnim}/HAnimSite.js +14 -16
- package/src/x_ite/Components/Interpolation/ColorInterpolator.js +13 -11
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +21 -13
- package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +19 -11
- package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +8 -8
- package/src/x_ite/Components/Interpolation/NormalInterpolator.js +28 -14
- package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +27 -16
- package/src/x_ite/Components/Interpolation/PositionInterpolator.js +10 -8
- package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +10 -8
- package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +2 -4
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +7 -9
- package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +7 -9
- package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +7 -9
- package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +10 -11
- package/src/x_ite/Components/Interpolation/X3DInterpolatorNode.js +2 -4
- package/src/x_ite/Components/Interpolation.js +111 -0
- package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +72 -8
- package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +65 -4
- package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +5 -29
- package/src/x_ite/Components/Layering/Layer.js +14 -6
- package/src/x_ite/Components/Layering/LayerSet.js +6 -10
- package/src/x_ite/Components/Layering/Viewport.js +10 -12
- package/src/x_ite/Components/Layering/X3DLayerNode.js +76 -69
- package/src/x_ite/Components/Layering/X3DViewportNode.js +2 -6
- package/src/x_ite/Components/Layering.js +84 -0
- package/src/x_ite/Components/Layout/Layout.js +163 -173
- package/src/x_ite/Components/Layout/LayoutGroup.js +20 -19
- package/src/x_ite/Components/Layout/LayoutLayer.js +12 -9
- package/src/x_ite/Components/Layout/ScreenFontStyle.js +4 -8
- package/src/x_ite/Components/Layout/ScreenGroup.js +63 -56
- package/src/x_ite/Components/Layout/X3DLayoutNode.js +2 -4
- package/src/x_ite/Components/Lighting/DirectionalLight.js +41 -31
- package/src/x_ite/Components/Lighting/PointLight.js +117 -104
- package/src/x_ite/Components/Lighting/SpotLight.js +77 -53
- package/src/x_ite/Components/Lighting/X3DLightNode.js +90 -68
- package/src/x_ite/Components/Lighting.js +81 -0
- package/src/x_ite/Components/NURBS/Contour2D.js +47 -5
- package/src/x_ite/Components/NURBS/ContourPolyline2D.js +69 -5
- package/src/x_ite/Components/NURBS/CoordinateDouble.js +2 -4
- package/src/x_ite/Components/NURBS/NurbsCurve.js +140 -10
- package/src/x_ite/Components/NURBS/NurbsCurve2D.js +117 -8
- package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +139 -10
- package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +3 -5
- package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +125 -10
- package/src/x_ite/Components/NURBS/NurbsSet.js +92 -11
- package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +96 -12
- package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +88 -7
- package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +88 -7
- package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +62 -13
- package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +41 -6
- package/src/x_ite/Components/NURBS/X3DNurbsControlCurveNode.js +2 -4
- package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +333 -7
- package/src/x_ite/Components/NURBS/X3DParametricGeometryNode.js +9 -5
- package/src/x_ite/Components/Navigation/Billboard.js +14 -15
- package/src/x_ite/Components/Navigation/Collision.js +13 -12
- package/src/x_ite/Components/Navigation/LOD.js +221 -66
- package/src/x_ite/Components/Navigation/NavigationInfo.js +110 -99
- package/src/x_ite/Components/Navigation/OrthoViewpoint.js +138 -45
- package/src/x_ite/Components/Navigation/Viewpoint.js +55 -33
- package/src/x_ite/Components/Navigation/ViewpointGroup.js +18 -10
- package/src/x_ite/Components/Navigation/X3DViewpointNode.js +241 -181
- package/src/x_ite/Components/Navigation.js +93 -0
- package/src/x_ite/Components/Networking/Anchor.js +24 -28
- package/src/x_ite/Components/Networking/Inline.js +68 -50
- package/src/x_ite/Components/Networking/LoadSensor.js +2 -4
- package/src/x_ite/Components/Networking/X3DNetworkSensorNode.js +2 -4
- package/src/x_ite/Components/Networking/X3DUrlObject.js +93 -11
- package/src/x_ite/Components/Networking.js +84 -0
- package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +6 -8
- package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +8 -4
- package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +7 -4
- package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +4 -4
- package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +451 -287
- package/src/x_ite/Components/ParticleSystems/PointEmitter.js +7 -4
- package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +53 -40
- package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +62 -55
- package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +133 -123
- package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +25 -22
- package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +28 -27
- package/src/x_ite/Components/ParticleSystems/X3DParticlePhysicsModelNode.js +2 -4
- package/src/x_ite/Components/Picking/LinePickSensor.js +253 -10
- package/src/x_ite/Components/Picking/PickableGroup.js +121 -10
- package/src/x_ite/Components/Picking/PointPickSensor.js +262 -12
- package/src/x_ite/Components/Picking/PrimitivePickSensor.js +176 -8
- package/src/x_ite/Components/Picking/VolumePickSensor.js +152 -8
- package/src/x_ite/Components/Picking/X3DPickSensorNode.js +378 -7
- package/src/x_ite/Components/Picking/X3DPickableObject.js +22 -4
- package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +33 -15
- package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +7 -4
- package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +2 -4
- package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +4 -4
- package/src/x_ite/Components/PointingDeviceSensor/X3DDragSensorNode.js +4 -4
- package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +3 -5
- package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +2 -4
- package/src/x_ite/Components/PointingDeviceSensor.js +90 -0
- 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 +12 -16
- package/src/x_ite/Components/Rendering/Color.js +62 -17
- package/src/x_ite/Components/Rendering/ColorRGBA.js +65 -17
- package/src/x_ite/Components/Rendering/Coordinate.js +4 -4
- package/src/x_ite/Components/Rendering/IndexedLineSet.js +68 -81
- package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +20 -19
- package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +10 -7
- package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +21 -23
- package/src/x_ite/Components/Rendering/LineSet.js +54 -37
- package/src/x_ite/Components/Rendering/Normal.js +65 -13
- package/src/x_ite/Components/Rendering/PointSet.js +52 -33
- package/src/x_ite/Components/Rendering/TriangleFanSet.js +10 -14
- package/src/x_ite/Components/Rendering/TriangleSet.js +2 -4
- package/src/x_ite/Components/Rendering/TriangleStripSet.js +9 -13
- package/src/x_ite/Components/Rendering/X3DColorNode.js +13 -12
- package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +118 -79
- package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +103 -44
- package/src/x_ite/Components/Rendering/X3DGeometricPropertyNode.js +2 -4
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +722 -591
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +129 -92
- package/src/x_ite/Components/Rendering/X3DNormalNode.js +2 -4
- package/src/x_ite/Components/Rendering.js +132 -0
- package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +116 -7
- package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +199 -11
- package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +436 -11
- package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +118 -10
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +192 -9
- package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +84 -8
- package/src/x_ite/Components/RigidBodyPhysics/Contact.js +20 -14
- package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +200 -12
- package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +14 -4
- package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +424 -17
- package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +295 -19
- package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +162 -10
- package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +135 -8
- package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +10 -6
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +93 -9
- package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +5 -8
- package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +150 -4
- package/src/x_ite/Components/Scripting/Script.js +156 -105
- package/src/x_ite/Components/Scripting/X3DScriptNode.js +3 -7
- package/src/x_ite/Components/Shaders/ComposedShader.js +38 -53
- package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +38 -15
- package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +32 -14
- package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +32 -14
- package/src/x_ite/Components/Shaders/PackagedShader.js +19 -17
- package/src/x_ite/Components/Shaders/ProgramShader.js +2 -4
- package/src/x_ite/Components/Shaders/ShaderPart.js +38 -26
- package/src/x_ite/Components/Shaders/ShaderProgram.js +16 -14
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +836 -699
- package/src/x_ite/Components/Shaders/X3DShaderNode.js +61 -101
- package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +2 -4
- package/src/x_ite/Components/Shaders.js +102 -0
- package/src/x_ite/Components/Shape/Appearance.js +179 -69
- package/src/x_ite/Components/Shape/FillProperties.js +65 -8
- package/src/x_ite/Components/Shape/LineProperties.js +29 -9
- package/src/x_ite/Components/Shape/Material.js +50 -64
- package/src/x_ite/Components/Shape/PointProperties.js +162 -0
- package/src/x_ite/Components/Shape/Shape.js +116 -68
- package/src/x_ite/Components/Shape/TwoSidedMaterial.js +56 -62
- package/src/x_ite/Components/Shape/UnlitMaterial.js +109 -0
- package/src/x_ite/Components/Shape/X3DAppearanceChildNode.js +2 -4
- package/src/x_ite/Components/Shape/X3DAppearanceNode.js +14 -11
- package/src/x_ite/Components/Shape/X3DMaterialNode.js +17 -6
- package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +111 -0
- package/src/x_ite/Components/Shape/X3DShapeNode.js +54 -29
- package/src/x_ite/Components/Shape.js +108 -0
- package/src/x_ite/Components/Sound/AudioClip.js +47 -57
- package/src/x_ite/Components/Sound/Sound.js +177 -83
- package/src/x_ite/Components/Sound/X3DSoundNode.js +2 -4
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +38 -24
- package/src/x_ite/Components/Sound.js +81 -0
- package/src/x_ite/Components/Text/FontStyle.js +4 -6
- package/src/x_ite/Components/Text/Text.js +21 -18
- package/src/x_ite/Components/Text/X3DFontStyleNode.js +58 -93
- package/src/x_ite/Components/Text.js +78 -0
- package/src/x_ite/Components/Texturing/ImageTexture.js +57 -67
- package/src/x_ite/Components/Texturing/MovieTexture.js +59 -70
- package/src/x_ite/Components/Texturing/MultiTexture.js +238 -15
- package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +85 -8
- package/src/x_ite/Components/Texturing/MultiTextureTransform.js +47 -8
- package/src/x_ite/Components/Texturing/PixelTexture.js +61 -27
- package/src/x_ite/Components/Texturing/TextureCoordinate.js +72 -22
- package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +69 -11
- package/src/x_ite/Components/Texturing/TextureProperties.js +98 -69
- package/src/x_ite/Components/Texturing/TextureTransform.js +58 -52
- 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 -97
- package/src/x_ite/Components/Texturing/X3DTexture2DNode.js.~1~ +209 -0
- package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +4 -12
- package/src/x_ite/Components/Texturing/X3DTextureNode.js +10 -71
- package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +5 -14
- package/src/x_ite/Components/Texturing.js +120 -0
- package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +90 -8
- package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +106 -16
- package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +126 -8
- package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +75 -25
- package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +74 -24
- package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +42 -36
- package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +19 -16
- package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +110 -8
- package/src/x_ite/Components/Time/TimeSensor.js +68 -38
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +29 -29
- package/src/x_ite/Components/Time.js +75 -0
- package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +311 -12
- package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +60 -8
- package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +219 -10
- package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +134 -7
- package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +88 -9
- package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +311 -15
- package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +87 -7
- package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +136 -6
- package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +224 -13
- package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +193 -12
- package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +87 -10
- package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +97 -9
- package/src/x_ite/Components/VolumeRendering/VolumeData.js +155 -12
- package/src/x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode.js +2 -4
- package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +155 -5
- package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +64 -4
- package/src/x_ite/Components/X_ITE/BlendMode.js +206 -0
- package/src/x_ite/Components.js +110 -0
- package/src/x_ite/Configuration/ComponentInfo.js +21 -15
- package/src/x_ite/Configuration/ComponentInfoArray.js +11 -16
- package/src/x_ite/Configuration/ProfileInfo.js +10 -10
- package/src/x_ite/Configuration/ProfileInfoArray.js +10 -3
- package/src/x_ite/Configuration/SupportedComponents.js +312 -303
- package/src/x_ite/Configuration/SupportedNodes.js +44 -716
- package/src/x_ite/Configuration/SupportedProfiles.js +196 -168
- package/src/x_ite/Configuration/UnitInfo.js +22 -8
- package/src/x_ite/Configuration/UnitInfoArray.js +2 -3
- package/src/x_ite/Configuration/X3DInfoArray.js +46 -26
- package/src/x_ite/DEBUG.js +4 -5
- package/src/x_ite/Execution/BindableList.js +99 -34
- package/src/x_ite/Execution/BindableStack.js +65 -74
- package/src/x_ite/Execution/ExportedNode.js +32 -9
- package/src/x_ite/Execution/ImportedNode.js +144 -63
- package/src/x_ite/Execution/Scene.js +33 -35
- package/src/x_ite/Execution/World.js +31 -29
- package/src/x_ite/Execution/X3DExecutionContext.js +452 -194
- package/src/x_ite/Execution/X3DScene.js +303 -74
- package/src/x_ite/{Error.js → Fallback.js} +25 -24
- package/src/x_ite/Fields/ArrayFields.js +315 -112
- package/src/x_ite/Fields/SFBool.js +11 -10
- package/src/x_ite/Fields/SFColor.js +43 -19
- package/src/x_ite/Fields/SFColorRGBA.js +40 -18
- package/src/x_ite/Fields/SFDouble.js +17 -10
- package/src/x_ite/Fields/SFFloat.js +18 -11
- package/src/x_ite/Fields/SFImage.js +47 -38
- package/src/x_ite/Fields/SFInt32.js +10 -9
- package/src/x_ite/Fields/SFMatrix3.js +24 -17
- package/src/x_ite/Fields/SFMatrix4.js +24 -17
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +15 -8
- package/src/x_ite/Fields/SFNode.js +119 -39
- package/src/x_ite/Fields/SFNodeCache.js +89 -0
- package/src/x_ite/Fields/SFRotation.js +42 -27
- package/src/x_ite/Fields/SFString.js +14 -15
- package/src/x_ite/Fields/SFTime.js +12 -11
- package/src/x_ite/Fields/SFVec2.js +17 -14
- package/src/x_ite/Fields/SFVec3.js +23 -17
- package/src/x_ite/Fields/SFVec4.js +25 -19
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +51 -19
- package/src/x_ite/Fields.js +3 -9
- package/src/x_ite/InputOutput/FileLoader.js +264 -181
- package/src/x_ite/InputOutput/Generator.js +136 -60
- package/src/x_ite/Parser/HTMLSupport.js +3 -596
- package/src/x_ite/Parser/JSONParser.js +446 -0
- package/src/x_ite/Parser/Parser.js +617 -652
- package/src/x_ite/Parser/X3DParser.js +176 -0
- package/src/x_ite/Parser/XMLParser.js +359 -94
- package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +19 -3
- package/src/x_ite/Prototype/ProtoDeclarationArray.js +19 -3
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +120 -61
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +144 -59
- package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +16 -18
- package/src/x_ite/Rendering/DependentRenderer.js +9 -13
- package/src/x_ite/Rendering/{DepthBuffer.js → TextureBuffer.js} +84 -53
- package/src/x_ite/Rendering/X3DRenderObject.js +640 -531
- package/src/x_ite/Routing/RouteArray.js +38 -16
- package/src/x_ite/Routing/X3DRoute.js +67 -68
- package/src/x_ite/Routing/X3DRoutingContext.js +6 -6
- package/src/x_ite/X3D.js +74 -70
- package/src/x_ite.config.js +91 -0
- package/src/x_ite.css +175 -53
- package/src/x_ite.html +128 -439
- package/src/x_ite.js +87 -25
- package/tests/{SEE.txt → README.md} +1 -0
- package/tests/tests.mdproj +1 -1
- package/x_ite.min.html +128 -439
- package/.bzrignore +0 -3
- package/.npmignore +0 -3
- package/AUTHORS.md +0 -6
- package/STYLE_GUIDE.md +0 -51
- package/X_ITE.sln +0 -56
- package/X_ITE.userprefs +0 -13
- package/build/build.mdproj +0 -24
- package/build/dist.pl +0 -97
- package/build/parts/end.frag +0 -10
- package/build/parts/start.frag +0 -7
- package/dist/LICENCES.txt +0 -344
- package/dist/dist.mdproj +0 -45
- package/dist/images/logo.128.png +0 -0
- package/fonts/fonts.mdproj +0 -29
- package/meta/meta.mdproj +0 -35
- package/require.build.js +0 -15
- package/require.build.min.js +0 -15
- package/src/images/logo.128.png +0 -0
- package/src/lib/jquery-contextMenu/README.md +0 -355
- package/src/lib/jquery-contextMenu/dist/images/cut.png +0 -0
- package/src/lib/jquery-contextMenu/dist/images/door.png +0 -0
- package/src/lib/jquery-contextMenu/dist/images/page_white_add.png +0 -0
- package/src/lib/jquery-contextMenu/dist/images/page_white_copy.png +0 -0
- package/src/lib/jquery-contextMenu/dist/images/page_white_delete.png +0 -0
- package/src/lib/jquery-contextMenu/dist/images/page_white_edit.png +0 -0
- package/src/lib/jquery-contextMenu/dist/images/page_white_paste.png +0 -0
- package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.css +0 -155
- package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.js +0 -1811
- package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.min.css +0 -16
- package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.min.css.map +0 -1
- package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.min.js +0 -18
- package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.min.js.map +0 -1
- package/src/lib/jquery-contextMenu/dist/jquery.ui.position.js +0 -517
- package/src/lib/jquery-contextMenu/dist/jquery.ui.position.min.js +0 -4
- package/src/lib/jquery-contextMenu/package.json +0 -99
- package/src/lib/opentype.js/.npmignore +0 -5
- package/src/locale/de.mo +0 -0
- package/src/locale/fr.mo +0 -0
- package/src/require.config.js +0 -51
- package/src/src.mdproj +0 -729
- package/src/standard/Networking/URI.js +0 -687
- package/src/x_ite/Browser/Shaders/BackgroundSphereFragmentShader.fs +0 -29
- package/src/x_ite/Browser/Shaders/BackgroundSphereVertexShader.vs +0 -22
- package/src/x_ite/Browser/Shaders/Bits/Line3.h +0 -14
- package/src/x_ite/Browser/Shaders/Bits/Plane3.h +0 -47
- package/src/x_ite/Browser/Shaders/Bits/Random.h +0 -31
- package/src/x_ite/Browser/Shaders/Depth.fs +0 -51
- package/src/x_ite/Browser/Shaders/Depth.vs +0 -20
- package/src/x_ite/Browser/Shaders/Gouraud.fs +0 -110
- package/src/x_ite/Browser/Shaders/Gouraud.vs +0 -188
- package/src/x_ite/Browser/Shaders/Phong.fs +0 -255
- package/src/x_ite/Browser/Shaders/Phong.vs +0 -38
- package/src/x_ite/Browser/Shaders/PointSet.fs +0 -64
- package/src/x_ite/Browser/Shaders/Wireframe.fs +0 -61
- package/src/x_ite/Browser/Shaders/Wireframe.vs +0 -55
- package/src/x_ite/Components/H-Anim/HAnimHumanoid.js +0 -118
|
@@ -0,0 +1,1084 @@
|
|
|
1
|
+
(function () {
|
|
2
|
+
|
|
3
|
+
var
|
|
4
|
+
define = X3D .define,
|
|
5
|
+
require = X3D .require,
|
|
6
|
+
module = { };
|
|
7
|
+
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
8
|
+
*******************************************************************************
|
|
9
|
+
*
|
|
10
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
11
|
+
*
|
|
12
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011.
|
|
13
|
+
*
|
|
14
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
15
|
+
*
|
|
16
|
+
* The copyright notice above does not evidence any actual of intended
|
|
17
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
18
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
19
|
+
* create3000.
|
|
20
|
+
*
|
|
21
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
22
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
23
|
+
* permission of create3000.
|
|
24
|
+
*
|
|
25
|
+
* NON-MILITARY USE ONLY
|
|
26
|
+
*
|
|
27
|
+
* All create3000 software are effectively free software with a non-military use
|
|
28
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
29
|
+
* source in any way you please with the exception anything that uses it must be
|
|
30
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
31
|
+
*
|
|
32
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
33
|
+
*
|
|
34
|
+
* Copyright 2015, 2016 Holger Seelig <holger.seelig@yahoo.de>.
|
|
35
|
+
*
|
|
36
|
+
* This file is part of the X_ITE Project.
|
|
37
|
+
*
|
|
38
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
39
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
40
|
+
* Free Software Foundation.
|
|
41
|
+
*
|
|
42
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
43
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
44
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
45
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
46
|
+
*
|
|
47
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
48
|
+
* along with X_ITE. If not, see <http://www.gnu.org/licenses/gpl.html> for a
|
|
49
|
+
* copy of the GPLv3 License.
|
|
50
|
+
*
|
|
51
|
+
* For Silvio, Joy and Adi.
|
|
52
|
+
*
|
|
53
|
+
******************************************************************************/
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
define ('x_ite/Components/HAnim/HAnimDisplacer',[
|
|
57
|
+
"x_ite/Fields",
|
|
58
|
+
"x_ite/Basic/X3DFieldDefinition",
|
|
59
|
+
"x_ite/Basic/FieldDefinitionArray",
|
|
60
|
+
"x_ite/Components/Rendering/X3DGeometricPropertyNode",
|
|
61
|
+
"x_ite/Bits/X3DConstants",
|
|
62
|
+
],
|
|
63
|
+
function (Fields,
|
|
64
|
+
X3DFieldDefinition,
|
|
65
|
+
FieldDefinitionArray,
|
|
66
|
+
X3DGeometricPropertyNode,
|
|
67
|
+
X3DConstants)
|
|
68
|
+
{
|
|
69
|
+
"use strict";
|
|
70
|
+
|
|
71
|
+
function HAnimDisplacer (executionContext)
|
|
72
|
+
{
|
|
73
|
+
X3DGeometricPropertyNode .call (this, executionContext);
|
|
74
|
+
|
|
75
|
+
this .addType (X3DConstants .HAnimDisplacer);
|
|
76
|
+
|
|
77
|
+
this .displacements_ .setUnit ("length");
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
HAnimDisplacer .prototype = Object .assign (Object .create (X3DGeometricPropertyNode .prototype),
|
|
81
|
+
{
|
|
82
|
+
constructor: HAnimDisplacer,
|
|
83
|
+
fieldDefinitions: new FieldDefinitionArray ([
|
|
84
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
|
|
85
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "name", new Fields .SFString ()),
|
|
86
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "coordIndex", new Fields .MFInt32 ()),
|
|
87
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "weight", new Fields .SFFloat ()),
|
|
88
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "displacements", new Fields .MFVec3f ()),
|
|
89
|
+
]),
|
|
90
|
+
getTypeName: function ()
|
|
91
|
+
{
|
|
92
|
+
return "HAnimDisplacer";
|
|
93
|
+
},
|
|
94
|
+
getComponentName: function ()
|
|
95
|
+
{
|
|
96
|
+
return "HAnim";
|
|
97
|
+
},
|
|
98
|
+
getContainerField: function ()
|
|
99
|
+
{
|
|
100
|
+
return "displacers";
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
return HAnimDisplacer;
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
108
|
+
*******************************************************************************
|
|
109
|
+
*
|
|
110
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
111
|
+
*
|
|
112
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011.
|
|
113
|
+
*
|
|
114
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
115
|
+
*
|
|
116
|
+
* The copyright notice above does not evidence any actual of intended
|
|
117
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
118
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
119
|
+
* create3000.
|
|
120
|
+
*
|
|
121
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
122
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
123
|
+
* permission of create3000.
|
|
124
|
+
*
|
|
125
|
+
* NON-MILITARY USE ONLY
|
|
126
|
+
*
|
|
127
|
+
* All create3000 software are effectively free software with a non-military use
|
|
128
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
129
|
+
* source in any way you please with the exception anything that uses it must be
|
|
130
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
131
|
+
*
|
|
132
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
133
|
+
*
|
|
134
|
+
* Copyright 2015, 2016 Holger Seelig <holger.seelig@yahoo.de>.
|
|
135
|
+
*
|
|
136
|
+
* This file is part of the X_ITE Project.
|
|
137
|
+
*
|
|
138
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
139
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
140
|
+
* Free Software Foundation.
|
|
141
|
+
*
|
|
142
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
143
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
144
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
145
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
146
|
+
*
|
|
147
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
148
|
+
* along with X_ITE. If not, see <http://www.gnu.org/licenses/gpl.html> for a
|
|
149
|
+
* copy of the GPLv3 License.
|
|
150
|
+
*
|
|
151
|
+
* For Silvio, Joy and Adi.
|
|
152
|
+
*
|
|
153
|
+
******************************************************************************/
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
define ('x_ite/Components/HAnim/HAnimHumanoid',[
|
|
157
|
+
"x_ite/Fields",
|
|
158
|
+
"x_ite/Basic/X3DFieldDefinition",
|
|
159
|
+
"x_ite/Basic/FieldDefinitionArray",
|
|
160
|
+
"x_ite/Components/Core/X3DChildNode",
|
|
161
|
+
"x_ite/Components/Grouping/Group",
|
|
162
|
+
"x_ite/Components/Grouping/Transform",
|
|
163
|
+
"x_ite/Components/Grouping/X3DBoundedObject",
|
|
164
|
+
"x_ite/Bits/TraverseType",
|
|
165
|
+
"x_ite/Bits/X3DConstants",
|
|
166
|
+
"x_ite/Bits/X3DCast",
|
|
167
|
+
"standard/Math/Numbers/Matrix4",
|
|
168
|
+
"standard/Math/Numbers/Vector3",
|
|
169
|
+
],
|
|
170
|
+
function (Fields,
|
|
171
|
+
X3DFieldDefinition,
|
|
172
|
+
FieldDefinitionArray,
|
|
173
|
+
X3DChildNode,
|
|
174
|
+
Group,
|
|
175
|
+
Transform,
|
|
176
|
+
X3DBoundedObject,
|
|
177
|
+
TraverseType,
|
|
178
|
+
X3DConstants,
|
|
179
|
+
X3DCast,
|
|
180
|
+
Matrix4,
|
|
181
|
+
Vector3)
|
|
182
|
+
{
|
|
183
|
+
"use strict";
|
|
184
|
+
|
|
185
|
+
function HAnimHumanoid (executionContext)
|
|
186
|
+
{
|
|
187
|
+
X3DChildNode .call (this, executionContext);
|
|
188
|
+
X3DBoundedObject .call (this, executionContext);
|
|
189
|
+
|
|
190
|
+
this .addType (X3DConstants .HAnimHumanoid);
|
|
191
|
+
|
|
192
|
+
this .translation_ .setUnit ("length");
|
|
193
|
+
this .center_ .setUnit ("length");
|
|
194
|
+
this .bboxSize_ .setUnit ("length");
|
|
195
|
+
this .bboxCenter_ .setUnit ("length");
|
|
196
|
+
|
|
197
|
+
this .viewpointsNode = new Group (executionContext);
|
|
198
|
+
this .skeletonNode = new Group (executionContext);
|
|
199
|
+
this .skinNode = new Group (executionContext);
|
|
200
|
+
this .transformNode = new Transform (executionContext);
|
|
201
|
+
this .jointNodes = [ ];
|
|
202
|
+
this .skinNormalNode = null;
|
|
203
|
+
this .skinCoordNode = null;
|
|
204
|
+
this .restNormalNode = null;
|
|
205
|
+
this .restCoordNode = null;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
HAnimHumanoid .prototype = Object .assign (Object .create (X3DChildNode .prototype),
|
|
209
|
+
X3DBoundedObject .prototype,
|
|
210
|
+
{
|
|
211
|
+
constructor: HAnimHumanoid,
|
|
212
|
+
fieldDefinitions: new FieldDefinitionArray ([
|
|
213
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
|
|
214
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "name", new Fields .SFString ()),
|
|
215
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "version", new Fields .SFString ()),
|
|
216
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "info", new Fields .MFString ()),
|
|
217
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "translation", new Fields .SFVec3f ()),
|
|
218
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "rotation", new Fields .SFRotation ()),
|
|
219
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "scale", new Fields .SFVec3f (1, 1, 1)),
|
|
220
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "scaleOrientation", new Fields .SFRotation ()),
|
|
221
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "center", new Fields .SFVec3f ()),
|
|
222
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "visible", new Fields .SFBool (true)),
|
|
223
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "bboxDisplay", new Fields .SFBool ()),
|
|
224
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxSize", new Fields .SFVec3f (-1, -1, -1)),
|
|
225
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxCenter", new Fields .SFVec3f ()),
|
|
226
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "viewpoints", new Fields .MFNode ()),
|
|
227
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "sites", new Fields .MFNode ()),
|
|
228
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "joints", new Fields .MFNode ()),
|
|
229
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "segments", new Fields .MFNode ()),
|
|
230
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "motions", new Fields .MFNode ()),
|
|
231
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "skeleton", new Fields .MFNode ()),
|
|
232
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "skinNormal", new Fields .SFNode ()),
|
|
233
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "skinCoord", new Fields .SFNode ()),
|
|
234
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "skin", new Fields .MFNode ()),
|
|
235
|
+
]),
|
|
236
|
+
getTypeName: function ()
|
|
237
|
+
{
|
|
238
|
+
return "HAnimHumanoid";
|
|
239
|
+
},
|
|
240
|
+
getComponentName: function ()
|
|
241
|
+
{
|
|
242
|
+
return "HAnim";
|
|
243
|
+
},
|
|
244
|
+
getContainerField: function ()
|
|
245
|
+
{
|
|
246
|
+
return "children";
|
|
247
|
+
},
|
|
248
|
+
initialize: function ()
|
|
249
|
+
{
|
|
250
|
+
X3DChildNode .prototype .initialize .call (this);
|
|
251
|
+
X3DBoundedObject .prototype .initialize .call (this);
|
|
252
|
+
|
|
253
|
+
// Groups
|
|
254
|
+
|
|
255
|
+
this .viewpointsNode .setAllowedTypes (X3DConstants .HAnimSite);
|
|
256
|
+
this .skeletonNode .setAllowedTypes (X3DConstants .HAnimJoint, X3DConstants .HAnimSite);
|
|
257
|
+
|
|
258
|
+
this .viewpoints_ .addFieldInterest (this .viewpointsNode .children_);
|
|
259
|
+
this .skeleton_ .addFieldInterest (this .skeletonNode .children_);
|
|
260
|
+
this .skin_ .addFieldInterest (this .skinNode .children_);
|
|
261
|
+
|
|
262
|
+
this .viewpointsNode .children_ = this .viewpoints_;
|
|
263
|
+
this .skeletonNode .children_ = this .skeleton_;
|
|
264
|
+
this .skinNode .children_ = this .skin_;
|
|
265
|
+
|
|
266
|
+
this .viewpointsNode .setPrivate (true);
|
|
267
|
+
this .skeletonNode .setPrivate (true);
|
|
268
|
+
this .skinNode .setPrivate (true);
|
|
269
|
+
|
|
270
|
+
// Transform
|
|
271
|
+
|
|
272
|
+
this .translation_ .addFieldInterest (this .transformNode .translation_);
|
|
273
|
+
this .rotation_ .addFieldInterest (this .transformNode .rotation_);
|
|
274
|
+
this .scale_ .addFieldInterest (this .transformNode .scale_);
|
|
275
|
+
this .scaleOrientation_ .addFieldInterest (this .transformNode .scaleOrientation_);
|
|
276
|
+
this .center_ .addFieldInterest (this .transformNode .center_);
|
|
277
|
+
this .bboxSize_ .addFieldInterest (this .transformNode .bboxSize_);
|
|
278
|
+
this .bboxCenter_ .addFieldInterest (this .transformNode .bboxCenter_);
|
|
279
|
+
|
|
280
|
+
this .transformNode .translation_ = this .translation_;
|
|
281
|
+
this .transformNode .rotation_ = this .rotation_;
|
|
282
|
+
this .transformNode .scale_ = this .scale_;
|
|
283
|
+
this .transformNode .scaleOrientation_ = this .scaleOrientation_;
|
|
284
|
+
this .transformNode .center_ = this .center_;
|
|
285
|
+
this .transformNode .bboxSize_ = this .bboxSize_;
|
|
286
|
+
this .transformNode .bboxCenter_ = this .bboxCenter_;
|
|
287
|
+
this .transformNode .children_ = [ this .viewpointsNode, this .skeletonNode, this .skinNode ];
|
|
288
|
+
|
|
289
|
+
this .transformNode .isCameraObject_ .addFieldInterest (this .isCameraObject_);
|
|
290
|
+
this .transformNode .isPickableObject_ .addFieldInterest (this .isPickableObject_);
|
|
291
|
+
|
|
292
|
+
// Setup
|
|
293
|
+
|
|
294
|
+
this .viewpointsNode .setup ();
|
|
295
|
+
this .skeletonNode .setup ();
|
|
296
|
+
this .skinNode .setup ();
|
|
297
|
+
this .transformNode .setup ();
|
|
298
|
+
|
|
299
|
+
this .setCameraObject (this .transformNode .getCameraObject ());
|
|
300
|
+
this .setPickableObject (this .transformNode .getPickableObject ());
|
|
301
|
+
|
|
302
|
+
// Skinning
|
|
303
|
+
|
|
304
|
+
this .joints_ .addInterest ("set_joints__", this);
|
|
305
|
+
this .skinNormal_ .addInterest ("set_skinNormal__", this);
|
|
306
|
+
this .skinCoord_ .addInterest ("set_skinCoord__", this);
|
|
307
|
+
|
|
308
|
+
this .set_joints__ ();
|
|
309
|
+
this .set_skinNormal__ ();
|
|
310
|
+
this .set_skinCoord__ ();
|
|
311
|
+
},
|
|
312
|
+
getBBox: function (bbox, shadow)
|
|
313
|
+
{
|
|
314
|
+
return this .transformNode .getBBox (bbox, shadow);
|
|
315
|
+
},
|
|
316
|
+
set_joints__: function ()
|
|
317
|
+
{
|
|
318
|
+
var jointNodes = this .jointNodes;
|
|
319
|
+
|
|
320
|
+
jointNodes .length = 0;
|
|
321
|
+
|
|
322
|
+
for (var i = 0, length = this .joints_ .length; i < length; ++ i)
|
|
323
|
+
{
|
|
324
|
+
var jointNode = X3DCast (X3DConstants .HAnimJoint, this .joints_ [i]);
|
|
325
|
+
|
|
326
|
+
if (jointNode)
|
|
327
|
+
jointNodes .push (jointNode);
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
set_skinNormal__: function ()
|
|
331
|
+
{
|
|
332
|
+
this .restNormalNode = null;
|
|
333
|
+
|
|
334
|
+
this .skinNormalNode = X3DCast (X3DConstants .X3DNormalNode, this .skinNormal_);
|
|
335
|
+
|
|
336
|
+
if (this .skinNormalNode)
|
|
337
|
+
this .restNormalNode = this .skinNormalNode .flatCopy ();
|
|
338
|
+
},
|
|
339
|
+
set_skinCoord__: function ()
|
|
340
|
+
{
|
|
341
|
+
this .restCoordNode = null;
|
|
342
|
+
|
|
343
|
+
this .skinCoordNode = X3DCast (X3DConstants .X3DCoordinateNode, this .skinCoord_);
|
|
344
|
+
|
|
345
|
+
if (this .skinCoordNode)
|
|
346
|
+
this .restCoordNode = this .skinCoordNode .flatCopy ();
|
|
347
|
+
},
|
|
348
|
+
traverse: function (type, renderObject)
|
|
349
|
+
{
|
|
350
|
+
this .transformNode .traverse (type, renderObject);
|
|
351
|
+
this .skinning (type, renderObject);
|
|
352
|
+
},
|
|
353
|
+
skinning: (function ()
|
|
354
|
+
{
|
|
355
|
+
var
|
|
356
|
+
invModelMatrix = new Matrix4 (),
|
|
357
|
+
vector = new Vector3 (0, 0, 0),
|
|
358
|
+
rest = new Vector3 (0, 0, 0),
|
|
359
|
+
skin = new Vector3 (0, 0, 0),
|
|
360
|
+
point = new Vector3 (0, 0, 0);
|
|
361
|
+
|
|
362
|
+
return function (type, renderObject)
|
|
363
|
+
{
|
|
364
|
+
try
|
|
365
|
+
{
|
|
366
|
+
if (type !== TraverseType .CAMERA)
|
|
367
|
+
return;
|
|
368
|
+
|
|
369
|
+
if (! this .skinCoordNode)
|
|
370
|
+
return;
|
|
371
|
+
|
|
372
|
+
var
|
|
373
|
+
jointNodes = this .jointNodes,
|
|
374
|
+
skinNormalNode = this .skinNormalNode,
|
|
375
|
+
skinCoordNode = this .skinCoordNode,
|
|
376
|
+
restNormalNode = this .restNormalNode,
|
|
377
|
+
restCoordNode = this .restCoordNode;
|
|
378
|
+
|
|
379
|
+
// Reset skin normals and coords.
|
|
380
|
+
|
|
381
|
+
if (skinNormalNode)
|
|
382
|
+
skinNormalNode .vector_ .assign (restNormalNode .vector_);
|
|
383
|
+
|
|
384
|
+
skinCoordNode .point_ .assign (restCoordNode .point_);
|
|
385
|
+
|
|
386
|
+
// Determine inverse model matrix of humanoid.
|
|
387
|
+
|
|
388
|
+
invModelMatrix .assign (this .transformNode .getMatrix ()) .multRight (renderObject .getModelViewMatrix () .get ()) .inverse ();
|
|
389
|
+
|
|
390
|
+
// Apply joint transformations.
|
|
391
|
+
|
|
392
|
+
for (var j = 0, jointNodesLength = jointNodes .length; j < jointNodesLength; ++ j)
|
|
393
|
+
{
|
|
394
|
+
var
|
|
395
|
+
jointNode = jointNodes [j],
|
|
396
|
+
skinCoordIndexLength = jointNode .skinCoordIndex_ .length;
|
|
397
|
+
|
|
398
|
+
if (skinCoordIndexLength === 0)
|
|
399
|
+
continue;
|
|
400
|
+
|
|
401
|
+
var
|
|
402
|
+
jointMatrix = jointNode .getModelMatrix () .multRight (invModelMatrix),
|
|
403
|
+
displacerNodes = jointNode .getDisplacers ();
|
|
404
|
+
|
|
405
|
+
for (var d = 0, displacerNodesLength = displacerNodes .length; d < displacerNodesLength; ++ d)
|
|
406
|
+
{
|
|
407
|
+
var
|
|
408
|
+
displacerNode = displacerNodes [d],
|
|
409
|
+
coordIndex = displacerNode .coordIndex_ .getValue (),
|
|
410
|
+
coordIndexLength = displacerNode .coordIndex_ .length,
|
|
411
|
+
weight = displacerNode .weight_ .getValue (),
|
|
412
|
+
displacements = displacerNode .displacements_ .getValue (),
|
|
413
|
+
displacementsLength = displacerNode .displacements_ .length;
|
|
414
|
+
|
|
415
|
+
for (var i = 0; i < coordIndexLength; ++ i)
|
|
416
|
+
{
|
|
417
|
+
var
|
|
418
|
+
i3 = i * 3,
|
|
419
|
+
index = coordIndex [i],
|
|
420
|
+
displacement = i < displacementsLength ? point .set (displacements [i3], displacements [i3 + 1], displacements [i3 + 2]) : point .assign (Vector3 .Zero);
|
|
421
|
+
|
|
422
|
+
skinCoordNode .get1Point (index, skin);
|
|
423
|
+
jointMatrix .multDirMatrix (displacement) .multiply (weight) .add (skin);
|
|
424
|
+
skinCoordNode .set1Point (index, displacement);
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
var
|
|
429
|
+
normalMatrix = skinNormalNode ? jointMatrix .submatrix .transpose () .inverse () : null,
|
|
430
|
+
skinCoordIndex = jointNode .skinCoordIndex_ .getValue (),
|
|
431
|
+
skinCoordWeight = jointNode .skinCoordWeight_ .getValue (),
|
|
432
|
+
skinCoordWeightLength = jointNode .skinCoordWeight_ .length;
|
|
433
|
+
|
|
434
|
+
for (var i = 0; i < skinCoordIndexLength; ++ i)
|
|
435
|
+
{
|
|
436
|
+
var
|
|
437
|
+
index = skinCoordIndex [i],
|
|
438
|
+
weight = i < skinCoordWeightLength ? skinCoordWeight [i] : 1;
|
|
439
|
+
|
|
440
|
+
if (skinNormalNode)
|
|
441
|
+
{
|
|
442
|
+
rest .assign (restNormalNode .get1Vector (index, vector));
|
|
443
|
+
skinNormalNode .get1Vector (index, skin);
|
|
444
|
+
normalMatrix .multVecMatrix (vector) .subtract (rest) .multiply (weight) .add (skin);
|
|
445
|
+
skinNormalNode .set1Vector (index, vector);
|
|
446
|
+
// Should the normals be normalzed at end, or let it the shader do?
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
//skin += (rest * J - rest) * weight
|
|
450
|
+
rest .assign (restCoordNode .get1Point (index, point));
|
|
451
|
+
skinCoordNode .get1Point (index, skin);
|
|
452
|
+
jointMatrix .multVecMatrix (point) .subtract (rest) .multiply (weight) .add (skin);
|
|
453
|
+
skinCoordNode .set1Point (index, point);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
catch (error)
|
|
458
|
+
{
|
|
459
|
+
console .log (error);
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
})(),
|
|
463
|
+
});
|
|
464
|
+
|
|
465
|
+
return HAnimHumanoid;
|
|
466
|
+
});
|
|
467
|
+
|
|
468
|
+
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
469
|
+
*******************************************************************************
|
|
470
|
+
*
|
|
471
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
472
|
+
*
|
|
473
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011.
|
|
474
|
+
*
|
|
475
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
476
|
+
*
|
|
477
|
+
* The copyright notice above does not evidence any actual of intended
|
|
478
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
479
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
480
|
+
* create3000.
|
|
481
|
+
*
|
|
482
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
483
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
484
|
+
* permission of create3000.
|
|
485
|
+
*
|
|
486
|
+
* NON-MILITARY USE ONLY
|
|
487
|
+
*
|
|
488
|
+
* All create3000 software are effectively free software with a non-military use
|
|
489
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
490
|
+
* source in any way you please with the exception anything that uses it must be
|
|
491
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
492
|
+
*
|
|
493
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
494
|
+
*
|
|
495
|
+
* Copyright 2015, 2016 Holger Seelig <holger.seelig@yahoo.de>.
|
|
496
|
+
*
|
|
497
|
+
* This file is part of the X_ITE Project.
|
|
498
|
+
*
|
|
499
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
500
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
501
|
+
* Free Software Foundation.
|
|
502
|
+
*
|
|
503
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
504
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
505
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
506
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
507
|
+
*
|
|
508
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
509
|
+
* along with X_ITE. If not, see <http://www.gnu.org/licenses/gpl.html> for a
|
|
510
|
+
* copy of the GPLv3 License.
|
|
511
|
+
*
|
|
512
|
+
* For Silvio, Joy and Adi.
|
|
513
|
+
*
|
|
514
|
+
******************************************************************************/
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
define ('x_ite/Components/HAnim/HAnimJoint',[
|
|
518
|
+
"x_ite/Fields",
|
|
519
|
+
"x_ite/Basic/X3DFieldDefinition",
|
|
520
|
+
"x_ite/Basic/FieldDefinitionArray",
|
|
521
|
+
"x_ite/Components/Grouping/X3DTransformNode",
|
|
522
|
+
"x_ite/Bits/TraverseType",
|
|
523
|
+
"x_ite/Bits/X3DConstants",
|
|
524
|
+
"x_ite/Bits/X3DCast",
|
|
525
|
+
"standard/Math/Numbers/Matrix4",
|
|
526
|
+
],
|
|
527
|
+
function (Fields,
|
|
528
|
+
X3DFieldDefinition,
|
|
529
|
+
FieldDefinitionArray,
|
|
530
|
+
X3DTransformNode,
|
|
531
|
+
TraverseType,
|
|
532
|
+
X3DConstants,
|
|
533
|
+
X3DCast,
|
|
534
|
+
Matrix4)
|
|
535
|
+
{
|
|
536
|
+
"use strict";
|
|
537
|
+
|
|
538
|
+
function HAnimJoint (executionContext)
|
|
539
|
+
{
|
|
540
|
+
X3DTransformNode .call (this, executionContext);
|
|
541
|
+
|
|
542
|
+
this .addType (X3DConstants .HAnimJoint);
|
|
543
|
+
|
|
544
|
+
this .setAllowedTypes (X3DConstants .HAnimJoint,
|
|
545
|
+
X3DConstants .HAnimSegment,
|
|
546
|
+
X3DConstants .HAnimSite);
|
|
547
|
+
|
|
548
|
+
this .displacerNodes = [ ];
|
|
549
|
+
this .modelMatrix = new Matrix4 ();
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
HAnimJoint .prototype = Object .assign (Object .create (X3DTransformNode .prototype),
|
|
553
|
+
{
|
|
554
|
+
constructor: HAnimJoint,
|
|
555
|
+
fieldDefinitions: new FieldDefinitionArray ([
|
|
556
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
|
|
557
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "name", new Fields .SFString ()),
|
|
558
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "translation", new Fields .SFVec3f ()),
|
|
559
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "rotation", new Fields .SFRotation ()),
|
|
560
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "scale", new Fields .SFVec3f (1, 1, 1)),
|
|
561
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "scaleOrientation", new Fields .SFRotation ()),
|
|
562
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "center", new Fields .SFVec3f ()),
|
|
563
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "llimit", new Fields .MFFloat ()),
|
|
564
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "ulimit", new Fields .MFFloat ()),
|
|
565
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "limitOrientation", new Fields .SFRotation ()),
|
|
566
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "stiffness", new Fields .MFFloat (0, 0, 0)),
|
|
567
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "skinCoordIndex", new Fields .MFInt32 ()),
|
|
568
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "skinCoordWeight", new Fields .MFFloat ()),
|
|
569
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "displacers", new Fields .MFNode ()),
|
|
570
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "visible", new Fields .SFBool (true)),
|
|
571
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "bboxDisplay", new Fields .SFBool ()),
|
|
572
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxSize", new Fields .SFVec3f (-1, -1, -1)),
|
|
573
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxCenter", new Fields .SFVec3f ()),
|
|
574
|
+
new X3DFieldDefinition (X3DConstants .inputOnly, "addChildren", new Fields .MFNode ()),
|
|
575
|
+
new X3DFieldDefinition (X3DConstants .inputOnly, "removeChildren", new Fields .MFNode ()),
|
|
576
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "children", new Fields .MFNode ()),
|
|
577
|
+
]),
|
|
578
|
+
getTypeName: function ()
|
|
579
|
+
{
|
|
580
|
+
return "HAnimJoint";
|
|
581
|
+
},
|
|
582
|
+
getComponentName: function ()
|
|
583
|
+
{
|
|
584
|
+
return "HAnim";
|
|
585
|
+
},
|
|
586
|
+
getContainerField: function ()
|
|
587
|
+
{
|
|
588
|
+
return "children";
|
|
589
|
+
},
|
|
590
|
+
initialize: function ()
|
|
591
|
+
{
|
|
592
|
+
X3DTransformNode .prototype .initialize .call (this);
|
|
593
|
+
|
|
594
|
+
this .displacers_ .addInterest ("set_displacers__", this);
|
|
595
|
+
|
|
596
|
+
this .set_displacers__ ();
|
|
597
|
+
},
|
|
598
|
+
setCameraObject: function (value)
|
|
599
|
+
{
|
|
600
|
+
X3DTransformNode .prototype .setCameraObject .call (this, value || !! this .skinCoordIndex_ .length);
|
|
601
|
+
},
|
|
602
|
+
getModelMatrix: function ()
|
|
603
|
+
{
|
|
604
|
+
return this .modelMatrix;
|
|
605
|
+
},
|
|
606
|
+
getDisplacers: function ()
|
|
607
|
+
{
|
|
608
|
+
return this .displacerNodes;
|
|
609
|
+
},
|
|
610
|
+
set_displacers__: function ()
|
|
611
|
+
{
|
|
612
|
+
const displacerNodes = this .displacerNodes;
|
|
613
|
+
|
|
614
|
+
displacerNodes .length = 0;
|
|
615
|
+
|
|
616
|
+
for (var i = 0, length = this .displacers_ .length; i < length; ++ i)
|
|
617
|
+
{
|
|
618
|
+
const displacerNode = X3DCast (X3DConstants .HAnimDisplacer, this .displacers_ [i]);
|
|
619
|
+
|
|
620
|
+
if (displacerNode)
|
|
621
|
+
displacerNodes .push (displacerNode);
|
|
622
|
+
}
|
|
623
|
+
},
|
|
624
|
+
getTraverse: (function ()
|
|
625
|
+
{
|
|
626
|
+
const base = X3DTransformNode .prototype .getTraverse ();
|
|
627
|
+
|
|
628
|
+
function traverse (type, renderObject)
|
|
629
|
+
{
|
|
630
|
+
if (type === TraverseType .CAMERA)
|
|
631
|
+
this .modelMatrix .assign (this .getMatrix ()) .multRight (renderObject .getModelViewMatrix () .get ());
|
|
632
|
+
|
|
633
|
+
base .call (this, type, renderObject);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
return function ()
|
|
637
|
+
{
|
|
638
|
+
if (this .skinCoordIndex_ .length)
|
|
639
|
+
return traverse;
|
|
640
|
+
|
|
641
|
+
return base;
|
|
642
|
+
};
|
|
643
|
+
})(),
|
|
644
|
+
getGroupTraverse: (function ()
|
|
645
|
+
{
|
|
646
|
+
const base = X3DTransformNode .prototype .getGroupTraverse ();
|
|
647
|
+
|
|
648
|
+
function traverse (type, renderObject)
|
|
649
|
+
{
|
|
650
|
+
if (type === TraverseType .CAMERA)
|
|
651
|
+
this .modelMatrix .assign (renderObject .getModelViewMatrix () .get ());
|
|
652
|
+
|
|
653
|
+
base .call (this, type, renderObject);
|
|
654
|
+
}
|
|
655
|
+
|
|
656
|
+
return function ()
|
|
657
|
+
{
|
|
658
|
+
if (this .skinCoordIndex_ .length)
|
|
659
|
+
return traverse;
|
|
660
|
+
|
|
661
|
+
return base;
|
|
662
|
+
};
|
|
663
|
+
})(),
|
|
664
|
+
});
|
|
665
|
+
|
|
666
|
+
return HAnimJoint;
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
670
|
+
*******************************************************************************
|
|
671
|
+
*
|
|
672
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
673
|
+
*
|
|
674
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011.
|
|
675
|
+
*
|
|
676
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
677
|
+
*
|
|
678
|
+
* The copyright notice above does not evidence any actual of intended
|
|
679
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
680
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
681
|
+
* create3000.
|
|
682
|
+
*
|
|
683
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
684
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
685
|
+
* permission of create3000.
|
|
686
|
+
*
|
|
687
|
+
* NON-MILITARY USE ONLY
|
|
688
|
+
*
|
|
689
|
+
* All create3000 software are effectively free software with a non-military use
|
|
690
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
691
|
+
* source in any way you please with the exception anything that uses it must be
|
|
692
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
693
|
+
*
|
|
694
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
695
|
+
*
|
|
696
|
+
* Copyright 2015, 2016 Holger Seelig <holger.seelig@yahoo.de>.
|
|
697
|
+
*
|
|
698
|
+
* This file is part of the X_ITE Project.
|
|
699
|
+
*
|
|
700
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
701
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
702
|
+
* Free Software Foundation.
|
|
703
|
+
*
|
|
704
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
705
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
706
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
707
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
708
|
+
*
|
|
709
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
710
|
+
* along with X_ITE. If not, see <http://www.gnu.org/licenses/gpl.html> for a
|
|
711
|
+
* copy of the GPLv3 License.
|
|
712
|
+
*
|
|
713
|
+
* For Silvio, Joy and Adi.
|
|
714
|
+
*
|
|
715
|
+
******************************************************************************/
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
define ('x_ite/Components/HAnim/HAnimMotion',[
|
|
719
|
+
"x_ite/Fields",
|
|
720
|
+
"x_ite/Basic/X3DFieldDefinition",
|
|
721
|
+
"x_ite/Basic/FieldDefinitionArray",
|
|
722
|
+
"x_ite/Components/Core/X3DChildNode",
|
|
723
|
+
"x_ite/Bits/X3DConstants",
|
|
724
|
+
],
|
|
725
|
+
function (Fields,
|
|
726
|
+
X3DFieldDefinition,
|
|
727
|
+
FieldDefinitionArray,
|
|
728
|
+
X3DChildNode,
|
|
729
|
+
X3DConstants)
|
|
730
|
+
{
|
|
731
|
+
"use strict";
|
|
732
|
+
|
|
733
|
+
function HAnimMotion (executionContext)
|
|
734
|
+
{
|
|
735
|
+
X3DChildNode .call (this, executionContext);
|
|
736
|
+
|
|
737
|
+
this .addType (X3DConstants .HAnimMotion);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
HAnimMotion .prototype = Object .assign (Object .create (X3DChildNode .prototype),
|
|
741
|
+
{
|
|
742
|
+
constructor: HAnimMotion,
|
|
743
|
+
fieldDefinitions: new FieldDefinitionArray ([
|
|
744
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
|
|
745
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "description", new Fields .SFString ()),
|
|
746
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "enabled", new Fields .SFBool (true)),
|
|
747
|
+
new X3DFieldDefinition (X3DConstants .inputOnly, "next", new Fields .SFBool ()),
|
|
748
|
+
new X3DFieldDefinition (X3DConstants .inputOnly, "previous", new Fields .SFBool ()),
|
|
749
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "frameDuration", new Fields .SFTime (0.1)),
|
|
750
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "frameIncrement", new Fields .SFInt32 (1)),
|
|
751
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "frameIndex", new Fields .SFInt32 (0)),
|
|
752
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "loop", new Fields .SFBool (false)),
|
|
753
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "channels", new Fields .SFString ()),
|
|
754
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "channelsEnabled", new Fields .MFBool ()),
|
|
755
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "joints", new Fields .MFString ()),
|
|
756
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "loa", new Fields .SFInt32 (-1)),
|
|
757
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "values", new Fields .MFFloat ()),
|
|
758
|
+
new X3DFieldDefinition (X3DConstants .outputOnly, "cycleTime", new Fields .SFTime ()),
|
|
759
|
+
new X3DFieldDefinition (X3DConstants .outputOnly, "elapsedTime", new Fields .SFTime ()),
|
|
760
|
+
new X3DFieldDefinition (X3DConstants .outputOnly, "frameCount", new Fields .SFInt32 ()),
|
|
761
|
+
]),
|
|
762
|
+
getTypeName: function ()
|
|
763
|
+
{
|
|
764
|
+
return "HAnimMotion";
|
|
765
|
+
},
|
|
766
|
+
getComponentName: function ()
|
|
767
|
+
{
|
|
768
|
+
return "HAnim";
|
|
769
|
+
},
|
|
770
|
+
getContainerField: function ()
|
|
771
|
+
{
|
|
772
|
+
return "children";
|
|
773
|
+
},
|
|
774
|
+
initialize: function ()
|
|
775
|
+
{
|
|
776
|
+
X3DChildNode .prototype .initialize .call (this);
|
|
777
|
+
},
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
return HAnimMotion;
|
|
781
|
+
});
|
|
782
|
+
|
|
783
|
+
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
784
|
+
*******************************************************************************
|
|
785
|
+
*
|
|
786
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
787
|
+
*
|
|
788
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011.
|
|
789
|
+
*
|
|
790
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
791
|
+
*
|
|
792
|
+
* The copyright notice above does not evidence any actual of intended
|
|
793
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
794
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
795
|
+
* create3000.
|
|
796
|
+
*
|
|
797
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
798
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
799
|
+
* permission of create3000.
|
|
800
|
+
*
|
|
801
|
+
* NON-MILITARY USE ONLY
|
|
802
|
+
*
|
|
803
|
+
* All create3000 software are effectively free software with a non-military use
|
|
804
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
805
|
+
* source in any way you please with the exception anything that uses it must be
|
|
806
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
807
|
+
*
|
|
808
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
809
|
+
*
|
|
810
|
+
* Copyright 2015, 2016 Holger Seelig <holger.seelig@yahoo.de>.
|
|
811
|
+
*
|
|
812
|
+
* This file is part of the X_ITE Project.
|
|
813
|
+
*
|
|
814
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
815
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
816
|
+
* Free Software Foundation.
|
|
817
|
+
*
|
|
818
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
819
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
820
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
821
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
822
|
+
*
|
|
823
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
824
|
+
* along with X_ITE. If not, see <http://www.gnu.org/licenses/gpl.html> for a
|
|
825
|
+
* copy of the GPLv3 License.
|
|
826
|
+
*
|
|
827
|
+
* For Silvio, Joy and Adi.
|
|
828
|
+
*
|
|
829
|
+
******************************************************************************/
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
define ('x_ite/Components/HAnim/HAnimSegment',[
|
|
833
|
+
"x_ite/Fields",
|
|
834
|
+
"x_ite/Basic/X3DFieldDefinition",
|
|
835
|
+
"x_ite/Basic/FieldDefinitionArray",
|
|
836
|
+
"x_ite/Components/Grouping/X3DGroupingNode",
|
|
837
|
+
"x_ite/Bits/X3DConstants",
|
|
838
|
+
],
|
|
839
|
+
function (Fields,
|
|
840
|
+
X3DFieldDefinition,
|
|
841
|
+
FieldDefinitionArray,
|
|
842
|
+
X3DGroupingNode,
|
|
843
|
+
X3DConstants)
|
|
844
|
+
{
|
|
845
|
+
"use strict";
|
|
846
|
+
|
|
847
|
+
function HAnimSegment (executionContext)
|
|
848
|
+
{
|
|
849
|
+
X3DGroupingNode .call (this, executionContext);
|
|
850
|
+
|
|
851
|
+
this .addType (X3DConstants .HAnimSegment);
|
|
852
|
+
|
|
853
|
+
this .mass_ .setUnit ("mass");
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
HAnimSegment .prototype = Object .assign (Object .create (X3DGroupingNode .prototype),
|
|
857
|
+
{
|
|
858
|
+
constructor: HAnimSegment,
|
|
859
|
+
fieldDefinitions: new FieldDefinitionArray ([
|
|
860
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
|
|
861
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "name", new Fields .SFString ()),
|
|
862
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "mass", new Fields .SFFloat ()),
|
|
863
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "centerOfMass", new Fields .SFVec3f ()),
|
|
864
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "momentsOfInertia", new Fields .MFFloat (0, 0, 0, 0, 0, 0, 0, 0, 0)),
|
|
865
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "displacers", new Fields .MFNode ()),
|
|
866
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "coord", new Fields .SFNode ()),
|
|
867
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "visible", new Fields .SFBool (true)),
|
|
868
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "bboxDisplay", new Fields .SFBool ()),
|
|
869
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxSize", new Fields .SFVec3f (-1, -1, -1)),
|
|
870
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxCenter", new Fields .SFVec3f ()),
|
|
871
|
+
new X3DFieldDefinition (X3DConstants .inputOnly, "addChildren", new Fields .MFNode ()),
|
|
872
|
+
new X3DFieldDefinition (X3DConstants .inputOnly, "removeChildren", new Fields .MFNode ()),
|
|
873
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "children", new Fields .MFNode ()),
|
|
874
|
+
]),
|
|
875
|
+
getTypeName: function ()
|
|
876
|
+
{
|
|
877
|
+
return "HAnimSegment";
|
|
878
|
+
},
|
|
879
|
+
getComponentName: function ()
|
|
880
|
+
{
|
|
881
|
+
return "HAnim";
|
|
882
|
+
},
|
|
883
|
+
getContainerField: function ()
|
|
884
|
+
{
|
|
885
|
+
return "children";
|
|
886
|
+
},
|
|
887
|
+
});
|
|
888
|
+
|
|
889
|
+
return HAnimSegment;
|
|
890
|
+
});
|
|
891
|
+
|
|
892
|
+
/* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
|
|
893
|
+
*******************************************************************************
|
|
894
|
+
*
|
|
895
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
896
|
+
*
|
|
897
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011.
|
|
898
|
+
*
|
|
899
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
900
|
+
*
|
|
901
|
+
* The copyright notice above does not evidence any actual of intended
|
|
902
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
903
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
904
|
+
* create3000.
|
|
905
|
+
*
|
|
906
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
907
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
908
|
+
* permission of create3000.
|
|
909
|
+
*
|
|
910
|
+
* NON-MILITARY USE ONLY
|
|
911
|
+
*
|
|
912
|
+
* All create3000 software are effectively free software with a non-military use
|
|
913
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
914
|
+
* source in any way you please with the exception anything that uses it must be
|
|
915
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
916
|
+
*
|
|
917
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
918
|
+
*
|
|
919
|
+
* Copyright 2015, 2016 Holger Seelig <holger.seelig@yahoo.de>.
|
|
920
|
+
*
|
|
921
|
+
* This file is part of the X_ITE Project.
|
|
922
|
+
*
|
|
923
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
924
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
925
|
+
* Free Software Foundation.
|
|
926
|
+
*
|
|
927
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
928
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
929
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
930
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
931
|
+
*
|
|
932
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
933
|
+
* along with X_ITE. If not, see <http://www.gnu.org/licenses/gpl.html> for a
|
|
934
|
+
* copy of the GPLv3 License.
|
|
935
|
+
*
|
|
936
|
+
* For Silvio, Joy and Adi.
|
|
937
|
+
*
|
|
938
|
+
******************************************************************************/
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
define ('x_ite/Components/HAnim/HAnimSite',[
|
|
942
|
+
"x_ite/Fields",
|
|
943
|
+
"x_ite/Basic/X3DFieldDefinition",
|
|
944
|
+
"x_ite/Basic/FieldDefinitionArray",
|
|
945
|
+
"x_ite/Components/Grouping/X3DTransformNode",
|
|
946
|
+
"x_ite/Bits/X3DConstants",
|
|
947
|
+
],
|
|
948
|
+
function (Fields,
|
|
949
|
+
X3DFieldDefinition,
|
|
950
|
+
FieldDefinitionArray,
|
|
951
|
+
X3DTransformNode,
|
|
952
|
+
X3DConstants)
|
|
953
|
+
{
|
|
954
|
+
"use strict";
|
|
955
|
+
|
|
956
|
+
function HAnimSite (executionContext)
|
|
957
|
+
{
|
|
958
|
+
X3DTransformNode .call (this, executionContext);
|
|
959
|
+
|
|
960
|
+
this .addType (X3DConstants .HAnimSite);
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
HAnimSite .prototype = Object .assign (Object .create (X3DTransformNode .prototype),
|
|
964
|
+
{
|
|
965
|
+
constructor: HAnimSite,
|
|
966
|
+
fieldDefinitions: new FieldDefinitionArray ([
|
|
967
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
|
|
968
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "name", new Fields .SFString ()),
|
|
969
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "translation", new Fields .SFVec3f ()),
|
|
970
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "rotation", new Fields .SFRotation ()),
|
|
971
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "scale", new Fields .SFVec3f (1, 1, 1)),
|
|
972
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "scaleOrientation", new Fields .SFRotation ()),
|
|
973
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "center", new Fields .SFVec3f ()),
|
|
974
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "visible", new Fields .SFBool (true)),
|
|
975
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "bboxDisplay", new Fields .SFBool ()),
|
|
976
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxSize", new Fields .SFVec3f (-1, -1, -1)),
|
|
977
|
+
new X3DFieldDefinition (X3DConstants .initializeOnly, "bboxCenter", new Fields .SFVec3f ()),
|
|
978
|
+
new X3DFieldDefinition (X3DConstants .inputOnly, "addChildren", new Fields .MFNode ()),
|
|
979
|
+
new X3DFieldDefinition (X3DConstants .inputOnly, "removeChildren", new Fields .MFNode ()),
|
|
980
|
+
new X3DFieldDefinition (X3DConstants .inputOutput, "children", new Fields .MFNode ()),
|
|
981
|
+
]),
|
|
982
|
+
getTypeName: function ()
|
|
983
|
+
{
|
|
984
|
+
return "HAnimSite";
|
|
985
|
+
},
|
|
986
|
+
getComponentName: function ()
|
|
987
|
+
{
|
|
988
|
+
return "HAnim";
|
|
989
|
+
},
|
|
990
|
+
getContainerField: function ()
|
|
991
|
+
{
|
|
992
|
+
return "children";
|
|
993
|
+
},
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
return HAnimSite;
|
|
997
|
+
});
|
|
998
|
+
|
|
999
|
+
/*******************************************************************************
|
|
1000
|
+
*
|
|
1001
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
1002
|
+
*
|
|
1003
|
+
* Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011.
|
|
1004
|
+
*
|
|
1005
|
+
* All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
|
|
1006
|
+
*
|
|
1007
|
+
* The copyright notice above does not evidence any actual of intended
|
|
1008
|
+
* publication of such source code, and is an unpublished work by create3000.
|
|
1009
|
+
* This material contains CONFIDENTIAL INFORMATION that is the property of
|
|
1010
|
+
* create3000.
|
|
1011
|
+
*
|
|
1012
|
+
* No permission is granted to copy, distribute, or create derivative works from
|
|
1013
|
+
* the contents of this software, in whole or in part, without the prior written
|
|
1014
|
+
* permission of create3000.
|
|
1015
|
+
*
|
|
1016
|
+
* NON-MILITARY USE ONLY
|
|
1017
|
+
*
|
|
1018
|
+
* All create3000 software are effectively free software with a non-military use
|
|
1019
|
+
* restriction. It is free. Well commented source is provided. You may reuse the
|
|
1020
|
+
* source in any way you please with the exception anything that uses it must be
|
|
1021
|
+
* marked to indicate is contains 'non-military use only' components.
|
|
1022
|
+
*
|
|
1023
|
+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
1024
|
+
*
|
|
1025
|
+
* Copyright 2015, 2016 Holger Seelig <holger.seelig@yahoo.de>.
|
|
1026
|
+
*
|
|
1027
|
+
* This file is part of the X_ITE Project.
|
|
1028
|
+
*
|
|
1029
|
+
* X_ITE is free software: you can redistribute it and/or modify it under the
|
|
1030
|
+
* terms of the GNU General Public License version 3 only, as published by the
|
|
1031
|
+
* Free Software Foundation.
|
|
1032
|
+
*
|
|
1033
|
+
* X_ITE is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
1034
|
+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
1035
|
+
* A PARTICULAR PURPOSE. See the GNU General Public License version 3 for more
|
|
1036
|
+
* details (a copy is included in the LICENSE file that accompanied this code).
|
|
1037
|
+
*
|
|
1038
|
+
* You should have received a copy of the GNU General Public License version 3
|
|
1039
|
+
* along with X_ITE. If not, see <http://www.gnu.org/licenses/gpl.html> for a
|
|
1040
|
+
* copy of the GPLv3 License.
|
|
1041
|
+
*
|
|
1042
|
+
* For Silvio, Joy and Adi.
|
|
1043
|
+
*
|
|
1044
|
+
******************************************************************************/
|
|
1045
|
+
|
|
1046
|
+
|
|
1047
|
+
define ([
|
|
1048
|
+
"x_ite/Components",
|
|
1049
|
+
"x_ite/Components/HAnim/HAnimDisplacer",
|
|
1050
|
+
"x_ite/Components/HAnim/HAnimHumanoid",
|
|
1051
|
+
"x_ite/Components/HAnim/HAnimJoint",
|
|
1052
|
+
"x_ite/Components/HAnim/HAnimMotion",
|
|
1053
|
+
"x_ite/Components/HAnim/HAnimSegment",
|
|
1054
|
+
"x_ite/Components/HAnim/HAnimSite",
|
|
1055
|
+
],
|
|
1056
|
+
function (Components,
|
|
1057
|
+
HAnimDisplacer,
|
|
1058
|
+
HAnimHumanoid,
|
|
1059
|
+
HAnimJoint,
|
|
1060
|
+
HAnimMotion,
|
|
1061
|
+
HAnimSegment,
|
|
1062
|
+
HAnimSite)
|
|
1063
|
+
{
|
|
1064
|
+
"use strict";
|
|
1065
|
+
|
|
1066
|
+
Components .addComponent ({
|
|
1067
|
+
name: "HAnim",
|
|
1068
|
+
types:
|
|
1069
|
+
{
|
|
1070
|
+
HAnimDisplacer: HAnimDisplacer,
|
|
1071
|
+
HAnimHumanoid: HAnimHumanoid,
|
|
1072
|
+
HAnimJoint: HAnimJoint,
|
|
1073
|
+
HAnimMotion: HAnimMotion,
|
|
1074
|
+
HAnimSegment: HAnimSegment,
|
|
1075
|
+
HAnimSite: HAnimSite,
|
|
1076
|
+
},
|
|
1077
|
+
abstractTypes:
|
|
1078
|
+
{
|
|
1079
|
+
},
|
|
1080
|
+
});
|
|
1081
|
+
});
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
}());
|