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.
Files changed (1007) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +38 -0
  2. package/.vscode/settings.json +15 -0
  3. package/.vscode/tasks.json +25 -0
  4. package/Makefile +55 -15
  5. package/README.md +13 -130
  6. package/build/bin/dist.pl +156 -0
  7. package/build/bin/version-number.pl +25 -0
  8. package/build/{version.pl → bin/version.pl} +64 -21
  9. package/build/components/annotation.build.js +15 -0
  10. package/build/components/cad-geometry.build.js +15 -0
  11. package/build/components/cube-map-texturing.build.js +15 -0
  12. package/build/components/dis.build.js +15 -0
  13. package/build/components/event-utilities.build.js +15 -0
  14. package/build/components/geometry2d.build.js +15 -0
  15. package/build/components/geospatial.build.js +15 -0
  16. package/build/components/h-anim.build.js +15 -0
  17. package/build/components/key-device-sensor.build.js +15 -0
  18. package/build/components/layout.build.js +15 -0
  19. package/build/components/nurbs.build.js +15 -0
  20. package/build/components/particle-systems.build.js +15 -0
  21. package/build/components/picking.build.js +15 -0
  22. package/build/components/projective-texture-mapping.build.js +15 -0
  23. package/build/components/rigid-body-physics.build.js +15 -0
  24. package/build/components/scripting.build.js +15 -0
  25. package/build/components/texturing-3d.build.js +15 -0
  26. package/build/components/volume-rendering.build.js +15 -0
  27. package/build/components/x_ite.build.js +15 -0
  28. package/build/parts/default.end.frag +2 -0
  29. package/build/parts/default.start.frag +6 -0
  30. package/build/parts/x_ite.end.frag +23 -0
  31. package/build/parts/x_ite.start.frag +8 -0
  32. package/build/x_ite.build.js +18 -0
  33. package/dist/LICENSE.txt +49 -0
  34. package/dist/assets/components/annotation.js +813 -0
  35. package/dist/assets/components/annotation.min.js +1 -0
  36. package/dist/assets/components/cad-geometry.js +1037 -0
  37. package/dist/assets/components/cad-geometry.min.js +1 -0
  38. package/dist/assets/components/cube-map-texturing.js +1212 -0
  39. package/dist/assets/components/cube-map-texturing.min.js +1 -0
  40. package/dist/assets/components/dis.js +908 -0
  41. package/dist/assets/components/dis.min.js +1 -0
  42. package/dist/assets/components/event-utilities.js +1114 -0
  43. package/dist/assets/components/event-utilities.min.js +1 -0
  44. package/dist/assets/components/geometry2d.js +2190 -0
  45. package/dist/assets/components/geometry2d.min.js +1 -0
  46. package/dist/assets/components/geospatial.js +3850 -0
  47. package/dist/assets/components/geospatial.min.js +2 -0
  48. package/dist/assets/components/h-anim.js +1084 -0
  49. package/dist/assets/components/h-anim.min.js +1 -0
  50. package/dist/assets/components/key-device-sensor.js +850 -0
  51. package/dist/assets/components/key-device-sensor.min.js +1 -0
  52. package/dist/assets/components/layout.js +2008 -0
  53. package/dist/assets/components/layout.min.js +1 -0
  54. package/dist/assets/components/nurbs.js +5388 -0
  55. package/dist/assets/components/nurbs.min.js +2 -0
  56. package/dist/assets/components/particle-systems.js +4216 -0
  57. package/dist/assets/components/particle-systems.min.js +2 -0
  58. package/dist/assets/components/picking.js +2481 -0
  59. package/dist/assets/components/picking.min.js +1 -0
  60. package/dist/assets/components/projective-texture-mapping.js +813 -0
  61. package/dist/assets/components/projective-texture-mapping.min.js +1 -0
  62. package/dist/assets/components/rigid-body-physics.js +4569 -0
  63. package/dist/assets/components/rigid-body-physics.min.js +59 -0
  64. package/dist/assets/components/scripting.js +801 -0
  65. package/dist/assets/components/scripting.min.js +1 -0
  66. package/dist/assets/components/texturing-3d.js +10054 -0
  67. package/dist/assets/components/texturing-3d.min.js +48 -0
  68. package/dist/assets/components/volume-rendering.js +3966 -0
  69. package/dist/assets/components/volume-rendering.min.js +3 -0
  70. package/dist/assets/components/x_ite.js +285 -0
  71. package/dist/assets/components/x_ite.min.js +1 -0
  72. package/{fonts → dist/assets/fonts}/DroidSerif-Bold.ttf +0 -0
  73. package/{fonts → dist/assets/fonts}/DroidSerif-BoldItalic.ttf +0 -0
  74. package/{fonts → dist/assets/fonts}/DroidSerif-Italic.ttf +0 -0
  75. package/{fonts → dist/assets/fonts}/DroidSerif-Regular.ttf +0 -0
  76. package/{fonts → dist/assets/fonts}/Ubuntu-B.ttf +0 -0
  77. package/{fonts → dist/assets/fonts}/Ubuntu-BI.ttf +0 -0
  78. package/{fonts → dist/assets/fonts}/Ubuntu-R.ttf +0 -0
  79. package/{fonts → dist/assets/fonts}/Ubuntu-RI.ttf +0 -0
  80. package/{fonts → dist/assets/fonts}/UbuntuMono-B.ttf +0 -0
  81. package/{fonts → dist/assets/fonts}/UbuntuMono-BI.ttf +0 -0
  82. package/{fonts → dist/assets/fonts}/UbuntuMono-R.ttf +0 -0
  83. package/{fonts → dist/assets/fonts}/UbuntuMono-RI.ttf +0 -0
  84. package/dist/assets/hatching/0.png +0 -0
  85. package/dist/assets/hatching/1.png +0 -0
  86. package/dist/assets/hatching/10.png +0 -0
  87. package/dist/assets/hatching/11.png +0 -0
  88. package/dist/assets/hatching/12.png +0 -0
  89. package/dist/assets/hatching/13.png +0 -0
  90. package/dist/assets/hatching/14.png +0 -0
  91. package/dist/assets/hatching/15.png +0 -0
  92. package/dist/assets/hatching/16.png +0 -0
  93. package/dist/assets/hatching/17.png +0 -0
  94. package/dist/assets/hatching/18.png +0 -0
  95. package/dist/assets/hatching/19.png +0 -0
  96. package/dist/assets/hatching/2.png +0 -0
  97. package/dist/assets/hatching/3.png +0 -0
  98. package/dist/assets/hatching/4.png +0 -0
  99. package/dist/assets/hatching/5.png +0 -0
  100. package/dist/assets/hatching/6.png +0 -0
  101. package/dist/assets/hatching/7.png +0 -0
  102. package/dist/assets/hatching/8.png +0 -0
  103. package/dist/assets/hatching/9.png +0 -0
  104. package/dist/{images → assets/images}/ExamineViewer.png +0 -0
  105. package/dist/{images → assets/images}/FlyViewer.png +0 -0
  106. package/dist/{images → assets/images}/NoneViewer.png +0 -0
  107. package/dist/{images → assets/images}/PlaneViewer.png +0 -0
  108. package/dist/{images → assets/images}/PrimitiveQuality.png +0 -0
  109. package/dist/{images → assets/images}/TextureQuality.png +0 -0
  110. package/dist/{images → assets/images}/Time.png +0 -0
  111. package/dist/{images → assets/images}/Viewpoint.png +0 -0
  112. package/dist/{images → assets/images}/WalkViewer.png +0 -0
  113. package/dist/assets/images/go-next.png +0 -0
  114. package/dist/{images → assets/images}/gtk-fullscreen.png +0 -0
  115. package/dist/{images → assets/images}/gtk-leave-fullscreen.png +0 -0
  116. package/dist/{images → assets/images}/gtk-zoom-fit.png +0 -0
  117. package/dist/{images → assets/images}/gtk-zoom-in.png +0 -0
  118. package/dist/{images → assets/images}/help-about.png +0 -0
  119. package/dist/{images → assets/images}/icon.bw.png +0 -0
  120. package/dist/{images → assets/images}/icon.png +0 -0
  121. package/dist/assets/images/logo.128.png +0 -0
  122. package/dist/{images → assets/images}/logo.bw.png +0 -0
  123. package/dist/{images → assets/images}/logo.png +0 -0
  124. package/dist/assets/linetype/0.png +0 -0
  125. package/dist/assets/linetype/1.png +0 -0
  126. package/dist/assets/linetype/10.png +0 -0
  127. package/dist/assets/linetype/11.png +0 -0
  128. package/dist/assets/linetype/12.png +0 -0
  129. package/dist/assets/linetype/13.png +0 -0
  130. package/dist/assets/linetype/14.png +0 -0
  131. package/dist/assets/linetype/15.png +0 -0
  132. package/dist/assets/linetype/16.png +0 -0
  133. package/dist/assets/linetype/2.png +0 -0
  134. package/dist/assets/linetype/3.png +0 -0
  135. package/dist/assets/linetype/4.png +0 -0
  136. package/dist/assets/linetype/5.png +0 -0
  137. package/dist/assets/linetype/6.png +0 -0
  138. package/dist/assets/linetype/7.png +0 -0
  139. package/dist/assets/linetype/8.png +0 -0
  140. package/dist/assets/linetype/9.png +0 -0
  141. package/dist/assets/shaders/webgl1/Background.fs +23 -0
  142. package/dist/assets/shaders/webgl1/Background.vs +16 -0
  143. package/dist/assets/shaders/webgl1/Depth.fs +60 -0
  144. package/dist/assets/shaders/webgl1/Depth.vs +13 -0
  145. package/dist/assets/shaders/webgl1/Fallback.fs +28 -0
  146. package/dist/assets/shaders/webgl1/Fallback.vs +24 -0
  147. package/dist/assets/shaders/webgl1/FallbackUnlit.fs +16 -0
  148. package/dist/assets/shaders/webgl1/FallbackUnlit.vs +18 -0
  149. package/dist/assets/shaders/webgl1/Gouraud.fs +529 -0
  150. package/dist/assets/shaders/webgl1/Gouraud.vs +108 -0
  151. package/dist/assets/shaders/webgl1/Phong.fs +838 -0
  152. package/dist/assets/shaders/webgl1/Phong.vs +52 -0
  153. package/dist/assets/shaders/webgl1/PointSet.fs +541 -0
  154. package/dist/assets/shaders/webgl1/PointSet.vs +48 -0
  155. package/dist/assets/shaders/webgl1/Unlit.fs +541 -0
  156. package/dist/assets/shaders/webgl1/Unlit.vs +52 -0
  157. package/dist/assets/shaders/webgl1/Wireframe.fs +93 -0
  158. package/dist/assets/shaders/webgl1/Wireframe.vs +47 -0
  159. package/dist/assets/shaders/webgl2/Background.fs +25 -0
  160. package/dist/assets/shaders/webgl2/Background.vs +17 -0
  161. package/dist/assets/shaders/webgl2/Depth.fs +62 -0
  162. package/dist/assets/shaders/webgl2/Depth.vs +14 -0
  163. package/dist/assets/shaders/webgl2/Gouraud.fs +684 -0
  164. package/dist/assets/shaders/webgl2/Gouraud.vs +109 -0
  165. package/dist/assets/shaders/webgl2/Phong.fs +1014 -0
  166. package/dist/assets/shaders/webgl2/Phong.vs +53 -0
  167. package/dist/assets/shaders/webgl2/PointSet.fs +696 -0
  168. package/dist/assets/shaders/webgl2/PointSet.vs +49 -0
  169. package/dist/assets/shaders/webgl2/Unlit.fs +696 -0
  170. package/dist/assets/shaders/webgl2/Unlit.vs +53 -0
  171. package/dist/assets/shaders/webgl2/Wireframe.fs +102 -0
  172. package/dist/assets/shaders/webgl2/Wireframe.vs +48 -0
  173. package/dist/example.html +8 -7
  174. package/dist/x_ite.css +180 -59
  175. package/dist/x_ite.js +74696 -68048
  176. package/dist/x_ite.min.js +42 -41
  177. package/dist/x_ite.zip +0 -0
  178. package/docs/404.md +5 -0
  179. package/docs/Accessing-the-External-Browser.md +290 -0
  180. package/docs/Browser-Support.md +47 -0
  181. package/docs/Custom-Shaders.md +905 -0
  182. package/docs/Features.md +49 -0
  183. package/docs/Glossary.md +339 -0
  184. package/docs/How-To-Configure-Your-Web-Server.md +56 -0
  185. package/docs/Supported-Nodes.md +370 -0
  186. package/docs/What's-New.md +1240 -0
  187. package/docs/XHTML-DOM-Integration.md +82 -0
  188. package/docs/_config.yml +140 -0
  189. package/docs/_data/navigation.yml +137 -0
  190. package/docs/assets/css/main.scss +100 -0
  191. package/docs/assets/images/logo.png +0 -0
  192. package/docs/google3696ee938394d7b6.html +1 -0
  193. package/docs/index.md +1026 -0
  194. package/docs/reference/Browser-Services.md +333 -0
  195. package/docs/reference/Constants-Services.md +376 -0
  196. package/docs/reference/ECMAScript-Object-and-Function-Definitions.md +128 -0
  197. package/docs/reference/Field-Services-and-Objects.md +1006 -0
  198. package/docs/reference/Prototype-Services.md +121 -0
  199. package/docs/reference/Route-Services.md +49 -0
  200. package/docs/reference/Scene-Services.md +360 -0
  201. package/docs/reference/Script-Node-Authoring-Interface.md +334 -0
  202. package/docs/tutorials/Adding-backgrounds.md +268 -0
  203. package/docs/tutorials/Adding-fog.md +67 -0
  204. package/docs/tutorials/Adding-sound.md +326 -0
  205. package/docs/tutorials/Animating-transforms.md +385 -0
  206. package/docs/tutorials/Basic-Nodes.md +317 -0
  207. package/docs/tutorials/Building-a-X3D-world.md +152 -0
  208. package/docs/tutorials/Building-elevation-grids.md +170 -0
  209. package/docs/tutorials/Building-extruded-shapes.md +145 -0
  210. package/docs/tutorials/Building-primitive-shapes.md +204 -0
  211. package/docs/tutorials/Building-shapes-out-of-points,-lines,-and-faces.md +311 -0
  212. package/docs/tutorials/Controlling-appearance-with-materials.md +186 -0
  213. package/docs/tutorials/Controlling-color-on-coordinate-based-geometry.md +208 -0
  214. package/docs/tutorials/Controlling-detail.md +130 -0
  215. package/docs/tutorials/Controlling-how-textures-are-mapped.md +277 -0
  216. package/docs/tutorials/Controlling-navigation.md +70 -0
  217. package/docs/tutorials/Controlling-shading-on-coordinate-based-geometry.md +180 -0
  218. package/docs/tutorials/Controlling-the-viewpoint.md +49 -0
  219. package/docs/tutorials/Creating-new-node-types.md +313 -0
  220. package/docs/tutorials/Grouping-nodes.md +237 -0
  221. package/docs/tutorials/Hello,-World!.md +204 -0
  222. package/docs/tutorials/Improving-Performance.md +227 -0
  223. package/docs/tutorials/Increasing-Rendering-Speed.md +110 -0
  224. package/docs/tutorials/Introducing-X3D.md +94 -0
  225. package/docs/tutorials/Introducing-animation.md +211 -0
  226. package/docs/tutorials/Introducing-script-use.md +127 -0
  227. package/docs/tutorials/Lighting-your-world.md +139 -0
  228. package/docs/tutorials/Mapping-textures.md +212 -0
  229. package/docs/tutorials/Naming-nodes.md +161 -0
  230. package/docs/tutorials/Providing-information-about-your-world.md +30 -0
  231. package/docs/tutorials/Sensing-the-viewer.md +205 -0
  232. package/docs/tutorials/Sensing-viewer-actions.md +214 -0
  233. package/docs/tutorials/Transforming-Shapes.md +270 -0
  234. package/docs/tutorials/Writing-program-scripts-with-ECMAScript.md +631 -0
  235. package/docs/tutorials/index.md +78 -0
  236. package/meta/logo/logo.png +0 -0
  237. package/meta/logo/logo.svg +216 -217
  238. package/meta/web3d.html +76 -54
  239. package/package.json +41 -24
  240. package/src/assets/components/annotation.js +87 -0
  241. package/src/assets/components/cad-geometry.js +88 -0
  242. package/src/assets/components/cube-map-texturing.js +78 -0
  243. package/src/assets/components/dis.js +84 -0
  244. package/src/assets/components/event-utilities.js +93 -0
  245. package/src/assets/components/geometry2d.js +93 -0
  246. package/src/assets/components/geospatial.js +102 -0
  247. package/src/assets/components/h-anim.js +83 -0
  248. package/src/assets/components/key-device-sensor.js +78 -0
  249. package/src/assets/components/layout.js +87 -0
  250. package/src/assets/components/nurbs.js +118 -0
  251. package/src/assets/components/particle-systems.js +105 -0
  252. package/src/assets/components/picking.js +87 -0
  253. package/src/assets/components/projective-texture-mapping.js +75 -0
  254. package/src/assets/components/rigid-body-physics.js +123 -0
  255. package/src/assets/components/scripting.js +72 -0
  256. package/src/assets/components/texturing-3d.js +91 -0
  257. package/src/assets/components/volume-rendering.js +118 -0
  258. package/src/assets/components/x_ite.js +69 -0
  259. package/src/assets/fonts/DroidSerif-Bold.ttf +0 -0
  260. package/src/assets/fonts/DroidSerif-BoldItalic.ttf +0 -0
  261. package/src/assets/fonts/DroidSerif-Italic.ttf +0 -0
  262. package/src/assets/fonts/DroidSerif-Regular.ttf +0 -0
  263. package/src/assets/fonts/Ubuntu-B.ttf +0 -0
  264. package/src/assets/fonts/Ubuntu-BI.ttf +0 -0
  265. package/src/assets/fonts/Ubuntu-R.ttf +0 -0
  266. package/src/assets/fonts/Ubuntu-RI.ttf +0 -0
  267. package/src/assets/fonts/UbuntuMono-B.ttf +0 -0
  268. package/src/assets/fonts/UbuntuMono-BI.ttf +0 -0
  269. package/src/assets/fonts/UbuntuMono-R.ttf +0 -0
  270. package/src/assets/fonts/UbuntuMono-RI.ttf +0 -0
  271. package/src/assets/hatching/0.png +0 -0
  272. package/src/assets/hatching/1.png +0 -0
  273. package/src/assets/hatching/10.png +0 -0
  274. package/src/assets/hatching/11.png +0 -0
  275. package/src/assets/hatching/12.png +0 -0
  276. package/src/assets/hatching/13.png +0 -0
  277. package/src/assets/hatching/14.png +0 -0
  278. package/src/assets/hatching/15.png +0 -0
  279. package/src/assets/hatching/16.png +0 -0
  280. package/src/assets/hatching/17.png +0 -0
  281. package/src/assets/hatching/18.png +0 -0
  282. package/src/assets/hatching/19.png +0 -0
  283. package/src/assets/hatching/2.png +0 -0
  284. package/src/assets/hatching/3.png +0 -0
  285. package/src/assets/hatching/4.png +0 -0
  286. package/src/assets/hatching/5.png +0 -0
  287. package/src/assets/hatching/6.png +0 -0
  288. package/src/assets/hatching/7.png +0 -0
  289. package/src/assets/hatching/8.png +0 -0
  290. package/src/assets/hatching/9.png +0 -0
  291. package/src/{images → assets/images}/ExamineViewer.png +0 -0
  292. package/src/{images → assets/images}/FlyViewer.png +0 -0
  293. package/src/{images → assets/images}/NoneViewer.png +0 -0
  294. package/src/{images → assets/images}/PlaneViewer.png +0 -0
  295. package/src/{images → assets/images}/PrimitiveQuality.png +0 -0
  296. package/src/{images → assets/images}/TextureQuality.png +0 -0
  297. package/src/{images → assets/images}/Time.png +0 -0
  298. package/src/{images → assets/images}/Viewpoint.png +0 -0
  299. package/src/{images → assets/images}/WalkViewer.png +0 -0
  300. package/src/assets/images/go-next.png +0 -0
  301. package/src/{images → assets/images}/gtk-fullscreen.png +0 -0
  302. package/src/{images → assets/images}/gtk-leave-fullscreen.png +0 -0
  303. package/src/{images → assets/images}/gtk-zoom-fit.png +0 -0
  304. package/src/{images → assets/images}/gtk-zoom-in.png +0 -0
  305. package/src/{images → assets/images}/help-about.png +0 -0
  306. package/src/{images → assets/images}/icon.bw.png +0 -0
  307. package/src/{images → assets/images}/icon.png +0 -0
  308. package/src/assets/images/logo.128.png +0 -0
  309. package/src/{images → assets/images}/logo.bw.png +0 -0
  310. package/src/{images → assets/images}/logo.png +0 -0
  311. package/src/assets/linetype/0.png +0 -0
  312. package/src/assets/linetype/1.png +0 -0
  313. package/src/assets/linetype/10.png +0 -0
  314. package/src/assets/linetype/11.png +0 -0
  315. package/src/assets/linetype/12.png +0 -0
  316. package/src/assets/linetype/13.png +0 -0
  317. package/src/assets/linetype/14.png +0 -0
  318. package/src/assets/linetype/15.png +0 -0
  319. package/src/assets/linetype/16.png +0 -0
  320. package/src/assets/linetype/2.png +0 -0
  321. package/src/assets/linetype/3.png +0 -0
  322. package/src/assets/linetype/4.png +0 -0
  323. package/src/assets/linetype/5.png +0 -0
  324. package/src/assets/linetype/6.png +0 -0
  325. package/src/assets/linetype/7.png +0 -0
  326. package/src/assets/linetype/8.png +0 -0
  327. package/src/assets/linetype/9.png +0 -0
  328. package/src/assets/shaders/Types.glsl +102 -0
  329. package/src/assets/shaders/webgl1/Background.fs +16 -0
  330. package/src/assets/shaders/webgl1/Background.vs +22 -0
  331. package/src/assets/shaders/webgl1/Depth.fs +16 -0
  332. package/src/assets/shaders/webgl1/Depth.vs +20 -0
  333. package/src/assets/shaders/webgl1/Fallback.fs +38 -0
  334. package/src/assets/shaders/webgl1/Fallback.vs +30 -0
  335. package/src/assets/shaders/webgl1/FallbackUnlit.fs +22 -0
  336. package/src/assets/shaders/webgl1/FallbackUnlit.vs +24 -0
  337. package/src/assets/shaders/webgl1/Gouraud.fs +66 -0
  338. package/src/assets/shaders/webgl1/Gouraud.vs +148 -0
  339. package/src/assets/shaders/webgl1/Phong.fs +173 -0
  340. package/src/assets/shaders/webgl1/Phong.vs +67 -0
  341. package/src/assets/shaders/webgl1/PointSet.fs +100 -0
  342. package/src/assets/shaders/webgl1/PointSet.vs +70 -0
  343. package/src/assets/shaders/webgl1/Unlit.fs +89 -0
  344. package/src/assets/shaders/webgl1/Unlit.vs +67 -0
  345. package/src/assets/shaders/webgl1/Wireframe.fs +74 -0
  346. package/src/assets/shaders/webgl1/Wireframe.vs +63 -0
  347. package/src/assets/shaders/webgl1/include/ClipPlanes.glsl +16 -0
  348. package/src/assets/shaders/webgl1/include/Fog.glsl +38 -0
  349. package/src/assets/shaders/webgl1/include/Hatch.glsl +18 -0
  350. package/src/assets/shaders/webgl1/include/Pack.glsl +51 -0
  351. package/src/assets/shaders/webgl1/include/Perlin.glsl +40 -0
  352. package/src/assets/shaders/webgl1/include/Shadow.glsl +310 -0
  353. package/src/assets/shaders/webgl1/include/Texture.glsl +488 -0
  354. package/src/assets/shaders/webgl2/Background.fs +19 -0
  355. package/src/assets/shaders/webgl2/Background.vs +23 -0
  356. package/src/assets/shaders/webgl2/Depth.fs +19 -0
  357. package/src/assets/shaders/webgl2/Depth.vs +21 -0
  358. package/src/assets/shaders/webgl2/Gouraud.fs +64 -0
  359. package/src/assets/shaders/webgl2/Gouraud.vs +149 -0
  360. package/src/assets/shaders/webgl2/Phong.fs +171 -0
  361. package/src/assets/shaders/webgl2/Phong.vs +68 -0
  362. package/src/assets/shaders/webgl2/PointSet.fs +99 -0
  363. package/src/assets/shaders/webgl2/PointSet.vs +71 -0
  364. package/src/assets/shaders/webgl2/Unlit.fs +88 -0
  365. package/src/assets/shaders/webgl2/Unlit.vs +68 -0
  366. package/src/assets/shaders/webgl2/Wireframe.fs +73 -0
  367. package/src/assets/shaders/webgl2/Wireframe.vs +64 -0
  368. package/src/assets/shaders/webgl2/include/ClipPlanes.glsl +16 -0
  369. package/src/assets/shaders/webgl2/include/Fog.glsl +46 -0
  370. package/src/assets/shaders/webgl2/include/Hatch.glsl +18 -0
  371. package/src/assets/shaders/webgl2/include/Pack.glsl +51 -0
  372. package/src/assets/shaders/webgl2/include/Perlin.glsl +40 -0
  373. package/src/assets/shaders/webgl2/include/Shadow.glsl +324 -0
  374. package/src/assets/shaders/webgl2/include/Texture.glsl +623 -0
  375. package/src/bookmarks.js +83 -164
  376. package/src/dummy.js +1 -0
  377. package/src/example.html +8 -7
  378. package/src/examples.js +150 -0
  379. package/src/lib/ammojs/AmmoJS.js +58 -0
  380. package/src/lib/ammojs/Makefile +26 -0
  381. package/src/lib/ammojs/ammo.idl +1031 -0
  382. package/src/lib/ammojs/ammo.js +40 -0
  383. package/src/lib/jpeg/jpeg.js +1019 -0
  384. package/src/lib/nurbs/extras/sample.js +242 -0
  385. package/src/lib/nurbs/nurbs.js +342 -0
  386. package/src/lib/nurbs/src/evaluate.js +413 -0
  387. package/src/lib/nurbs/src/numerical-derivative.js +54 -0
  388. package/src/lib/nurbs/src/support.js +151 -0
  389. package/src/lib/nurbs/src/transform.js +78 -0
  390. package/src/lib/nurbs/src/utils/accessor-preamble.js +33 -0
  391. package/src/lib/nurbs/src/utils/bisection-search.js +28 -0
  392. package/src/lib/nurbs/src/utils/cache-key.js +57 -0
  393. package/src/lib/nurbs/src/utils/create-accessors.js +110 -0
  394. package/src/lib/nurbs/src/utils/infer-type.js +52 -0
  395. package/src/lib/nurbs/src/utils/is-array-like.js +10 -0
  396. package/src/lib/nurbs/src/utils/is-ndarray-like.js +18 -0
  397. package/src/lib/nurbs/src/utils/is-ndarray.js +21 -0
  398. package/src/lib/nurbs/src/utils/ndloop.js +23 -0
  399. package/src/lib/nurbs/src/utils/size-getter.js +22 -0
  400. package/src/lib/nurbs/src/utils/variable.js +31 -0
  401. package/src/locale/de.po +8 -3
  402. package/src/locale/fr.po +9 -4
  403. package/src/locale/gettext.js +3 -3
  404. package/src/spinner.css +21 -8
  405. package/src/standard/Geospatial/Geodetic.js +48 -48
  406. package/src/standard/Geospatial/ReferenceEllipsoids.js +1 -1
  407. package/src/standard/Geospatial/UniversalTransverseMercator.js +43 -43
  408. package/src/standard/Math/Algorithm.js +25 -41
  409. package/src/standard/Math/Algorithms/Bezier.js +147 -0
  410. package/src/standard/Math/Algorithms/MergeSort.js +2 -2
  411. package/src/standard/Math/Algorithms/PartialSort.js +97 -0
  412. package/src/standard/Math/Algorithms/QuickSort.js +8 -6
  413. package/src/standard/Math/Algorithms/SAT.js +4 -8
  414. package/src/standard/Math/Algorithms/eigendecomposition.js +37 -33
  415. package/src/standard/Math/Geometry/Box2.js +84 -56
  416. package/src/standard/Math/Geometry/Box3.js +457 -284
  417. package/src/standard/Math/Geometry/Camera.js +24 -15
  418. package/src/standard/Math/Geometry/Cylinder3.js +13 -13
  419. package/src/standard/Math/Geometry/Line3.js +61 -53
  420. package/src/standard/Math/Geometry/Plane3.js +16 -16
  421. package/src/standard/Math/Geometry/Sphere3.js +122 -105
  422. package/src/standard/Math/Geometry/Spheroid3.js +1 -1
  423. package/src/standard/Math/Geometry/Triangle2.js +6 -6
  424. package/src/standard/Math/Geometry/Triangle3.js +80 -88
  425. package/src/standard/Math/Geometry/ViewVolume.js +315 -116
  426. package/src/standard/Math/Numbers/Color3.js +45 -29
  427. package/src/standard/Math/Numbers/Color4.js +25 -14
  428. package/src/standard/Math/Numbers/Complex.js +15 -22
  429. package/src/standard/Math/Numbers/Matrix2.js +37 -17
  430. package/src/standard/Math/Numbers/Matrix3.js +181 -212
  431. package/src/standard/Math/Numbers/Matrix4.js +204 -262
  432. package/src/standard/Math/Numbers/Quaternion.js +60 -147
  433. package/src/standard/Math/Numbers/Rotation4.js +197 -129
  434. package/src/standard/Math/Numbers/Vector2.js +53 -109
  435. package/src/standard/Math/Numbers/Vector3.js +75 -144
  436. package/src/standard/Math/Numbers/Vector4.js +85 -155
  437. package/src/standard/Math/Utility/BVH.js +35 -30
  438. package/src/standard/Math/Utility/MatrixStack.js +6 -9
  439. package/src/standard/Networking/BinaryTransport.js +8 -8
  440. package/src/standard/Time/MicroTime.js +79 -0
  441. package/src/standard/Utility/DataStorage.js +40 -17
  442. package/src/standard/Utility/MapUtilities.js +69 -0
  443. package/src/standard/Utility/ObjectCache.js +2 -3
  444. package/src/standard/Utility/Shuffle.js +5 -6
  445. package/src/tests.js +386 -0
  446. package/src/x_ite/Base/Events.js +22 -30
  447. package/src/x_ite/Base/X3DChildObject.js +35 -19
  448. package/src/x_ite/Base/X3DEventObject.js +10 -12
  449. package/src/x_ite/Base/X3DObject.js +63 -43
  450. package/src/x_ite/Basic/FieldDefinitionArray.js +16 -10
  451. package/src/x_ite/Basic/X3DArrayField.js +3 -430
  452. package/src/x_ite/Basic/X3DBaseNode.js +551 -288
  453. package/src/x_ite/Basic/X3DField.js +133 -96
  454. package/src/x_ite/Basic/X3DFieldDefinition.js +0 -4
  455. package/src/x_ite/Basic/X3DObjectArrayField.js +545 -0
  456. package/src/x_ite/Basic/X3DTypedArrayField.js +839 -0
  457. package/src/x_ite/Bits/TraverseType.js +2 -5
  458. package/src/x_ite/Bits/X3DConstants.js +12 -322
  459. package/src/x_ite/Browser/Core/BrowserOptions.js +205 -77
  460. package/src/x_ite/Browser/Core/BrowserProperties.js +2 -4
  461. package/src/x_ite/Browser/Core/BrowserTimings.js +16 -15
  462. package/src/x_ite/Browser/Core/ContextMenu.js +202 -80
  463. package/src/x_ite/Browser/Core/Notification.js +14 -6
  464. package/src/x_ite/Browser/Core/PrimitiveQuality.js +3 -7
  465. package/src/x_ite/Browser/Core/RenderingProperties.js +10 -11
  466. package/src/x_ite/Browser/Core/Shading.js +66 -0
  467. package/src/x_ite/Browser/Core/TextureQuality.js +3 -7
  468. package/src/x_ite/Browser/Core/X3DCoreContext.js +495 -48
  469. package/src/x_ite/Browser/Core/X3DCoreContext.js.~1~ +714 -0
  470. package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +17 -23
  471. package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +12 -20
  472. package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +82 -34
  473. package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +3 -5
  474. package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +3 -5
  475. package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +12 -9
  476. package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +60 -42
  477. package/src/x_ite/Browser/Geometry2D/Rectangle2DOptions.js +16 -20
  478. package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +51 -12
  479. package/src/x_ite/Browser/Geometry3D/BoxOptions.js +17 -21
  480. package/src/x_ite/Browser/Geometry3D/ConeOptions.js +2 -4
  481. package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +2 -4
  482. package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +2 -4
  483. package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +3 -5
  484. package/src/x_ite/Browser/Geometry3D/X3DGeometry3DContext.js +8 -9
  485. package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +98 -0
  486. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator.js +12 -12
  487. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1.js +2 -4
  488. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +2 -4
  489. package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +22 -200
  490. package/src/x_ite/Browser/Layout/ScreenText.js +287 -295
  491. package/src/x_ite/Browser/Layout/X3DLayoutContext.js +15 -12
  492. package/src/x_ite/Browser/Lighting/X3DLightingContext.js +18 -12
  493. package/src/x_ite/Browser/NURBS/NURBS.js +481 -0
  494. package/src/x_ite/Browser/Navigation/ExamineViewer.js +587 -127
  495. package/src/x_ite/Browser/Navigation/FlyViewer.js +23 -5
  496. package/src/x_ite/Browser/Navigation/LookAtViewer.js +402 -18
  497. package/src/x_ite/Browser/Navigation/NoneViewer.js +13 -3
  498. package/src/x_ite/Browser/Navigation/PlaneViewer.js +46 -28
  499. package/src/x_ite/Browser/Navigation/WalkViewer.js +45 -17
  500. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +414 -207
  501. package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +65 -48
  502. package/src/x_ite/Browser/Navigation/X3DViewer.js +99 -45
  503. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +39 -38
  504. package/src/x_ite/Browser/Networking/urls.js +34 -5
  505. package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +7 -9
  506. package/src/x_ite/Browser/Picking/IntersectionType.js +63 -0
  507. package/src/x_ite/Browser/Picking/MatchCriterion.js +64 -0
  508. package/src/x_ite/Browser/Picking/SortOrder.js +65 -0
  509. package/src/x_ite/Browser/Picking/VolumePicker.js +197 -0
  510. package/src/x_ite/Browser/Picking/X3DPickingContext.js +130 -0
  511. package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +89 -30
  512. package/src/x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer.js +1 -3
  513. package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +33 -15
  514. package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +39 -151
  515. package/src/x_ite/Browser/RigidBodyPhysics/AppliedParametersType.js +70 -0
  516. package/src/x_ite/Browser/Shaders/Shader.js +150 -50
  517. package/src/x_ite/Browser/Shaders/ShaderSource.js +140 -0
  518. package/src/x_ite/Browser/Shaders/ShaderTest.js +94 -77
  519. package/src/x_ite/Browser/Shaders/X3DShadersContext.js +220 -5
  520. package/src/x_ite/Browser/Shape/AlphaMode.js +65 -0
  521. package/src/x_ite/Browser/Shape/LineStipples.xcf +0 -0
  522. package/src/x_ite/Browser/Shape/X3DShapeContext.js +108 -4
  523. package/src/x_ite/Browser/Sound/X3DSoundContext.js +1 -20
  524. package/src/x_ite/Browser/Text/PolygonText.js +165 -359
  525. package/src/x_ite/Browser/Text/TextAlignment.js +3 -7
  526. package/src/x_ite/Browser/Text/X3DTextContext.js +38 -30
  527. package/src/x_ite/Browser/Text/X3DTextGeometry.js +58 -84
  528. package/src/x_ite/Browser/Texturing/MultiTextureFunctionType.js +64 -0
  529. package/src/x_ite/Browser/Texturing/MultiTextureModeType.js +81 -0
  530. package/src/x_ite/Browser/Texturing/MultiTextureSourceType.js +65 -0
  531. package/src/x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType.js +73 -0
  532. package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +148 -41
  533. package/src/x_ite/Browser/Texturing3D/DICOMParser.js +1126 -0
  534. package/src/x_ite/Browser/Texturing3D/NRRDParser.js +686 -0
  535. package/src/x_ite/Browser/Time/X3DTimeContext.js +20 -17
  536. package/src/x_ite/Browser/VERSION.js +2 -2
  537. package/src/x_ite/Browser/VolumeRendering/VolumeStyle.fs +120 -0
  538. package/src/x_ite/Browser/VolumeRendering/VolumeStyle.vs +28 -0
  539. package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +114 -0
  540. package/src/x_ite/Browser/X3DBrowser.js +282 -182
  541. package/src/x_ite/Browser/X3DBrowserContext.js +77 -43
  542. package/src/x_ite/Components/Annotation/AnnotationLayer.js +108 -0
  543. package/src/x_ite/Components/Annotation/AnnotationTarget.js +101 -0
  544. package/src/x_ite/Components/{PointingDeviceSensor/TouchGroup.js → Annotation/GroupAnnotation.js} +30 -24
  545. package/src/x_ite/Components/Annotation/IconAnnotation.js +110 -0
  546. package/src/x_ite/Components/Annotation/TextAnnotation.js +102 -0
  547. package/src/x_ite/Components/Annotation/URLAnnotation.js +101 -0
  548. package/src/x_ite/Components/Annotation/X3DAnnotationNode.js +76 -0
  549. package/src/x_ite/Components/CADGeometry/CADAssembly.js +6 -8
  550. package/src/x_ite/Components/CADGeometry/CADFace.js +137 -33
  551. package/src/x_ite/Components/CADGeometry/CADLayer.js +5 -18
  552. package/src/x_ite/Components/CADGeometry/CADPart.js +6 -12
  553. package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +20 -36
  554. package/src/x_ite/Components/CADGeometry/QuadSet.js +11 -24
  555. package/src/x_ite/Components/CADGeometry/X3DProductStructureChildNode.js +2 -4
  556. package/src/x_ite/Components/Core/MetadataBoolean.js +2 -4
  557. package/src/x_ite/Components/Core/MetadataDouble.js +2 -4
  558. package/src/x_ite/Components/Core/MetadataFloat.js +2 -4
  559. package/src/x_ite/Components/Core/MetadataInteger.js +2 -4
  560. package/src/x_ite/Components/Core/MetadataSet.js +2 -4
  561. package/src/x_ite/Components/Core/MetadataString.js +2 -4
  562. package/src/x_ite/Components/Core/WorldInfo.js +18 -10
  563. package/src/x_ite/Components/Core/X3DBindableNode.js +5 -36
  564. package/src/x_ite/Components/Core/X3DChildNode.js +16 -5
  565. package/src/x_ite/Components/Core/X3DInfoNode.js +2 -4
  566. package/src/x_ite/Components/Core/X3DMetadataObject.js +1 -3
  567. package/src/x_ite/Components/Core/X3DNode.js +2 -64
  568. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +190 -210
  569. package/src/x_ite/Components/Core/X3DSensorNode.js +2 -4
  570. package/src/x_ite/Components/Core.js +111 -0
  571. package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +42 -50
  572. package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +41 -42
  573. package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +44 -59
  574. package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +48 -46
  575. package/src/x_ite/Components/DIS/DISEntityManager.js +2 -4
  576. package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +2 -4
  577. package/src/x_ite/Components/DIS/EspduTransform.js +13 -9
  578. package/src/x_ite/Components/DIS/ReceiverPdu.js +13 -9
  579. package/src/x_ite/Components/DIS/SignalPdu.js +13 -9
  580. package/src/x_ite/Components/DIS/TransmitterPdu.js +13 -9
  581. package/src/x_ite/Components/EnvironmentalEffects/Background.js +2 -4
  582. package/src/x_ite/Components/EnvironmentalEffects/Fog.js +15 -18
  583. package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +59 -7
  584. package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +12 -10
  585. package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +2 -4
  586. package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +149 -143
  587. package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +61 -22
  588. package/src/x_ite/Components/EnvironmentalEffects.js +90 -0
  589. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +121 -121
  590. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +173 -53
  591. package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +33 -31
  592. package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +19 -11
  593. package/src/x_ite/Components/EnvironmentalSensor.js +81 -0
  594. package/src/x_ite/Components/EventUtilities/BooleanFilter.js +2 -4
  595. package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +2 -4
  596. package/src/x_ite/Components/EventUtilities/BooleanToggle.js +2 -4
  597. package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +2 -4
  598. package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +2 -4
  599. package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +2 -4
  600. package/src/x_ite/Components/EventUtilities/TimeTrigger.js +2 -4
  601. package/src/x_ite/Components/EventUtilities/X3DSequencerNode.js +2 -4
  602. package/src/x_ite/Components/EventUtilities/X3DTriggerNode.js +2 -4
  603. package/src/x_ite/Components/Followers/ColorChaser.js +3 -7
  604. package/src/x_ite/Components/Followers/ColorDamper.js +3 -7
  605. package/src/x_ite/Components/Followers/CoordinateChaser.js +3 -11
  606. package/src/x_ite/Components/Followers/CoordinateDamper.js +2 -10
  607. package/src/x_ite/Components/Followers/OrientationChaser.js +9 -7
  608. package/src/x_ite/Components/Followers/OrientationDamper.js +9 -7
  609. package/src/x_ite/Components/Followers/PositionChaser.js +3 -7
  610. package/src/x_ite/Components/Followers/PositionChaser2D.js +3 -7
  611. package/src/x_ite/Components/Followers/PositionDamper.js +3 -7
  612. package/src/x_ite/Components/Followers/PositionDamper2D.js +3 -7
  613. package/src/x_ite/Components/Followers/ScalarChaser.js +7 -7
  614. package/src/x_ite/Components/Followers/ScalarDamper.js +3 -7
  615. package/src/x_ite/Components/Followers/TexCoordChaser2D.js +3 -11
  616. package/src/x_ite/Components/Followers/TexCoordDamper2D.js +3 -11
  617. package/src/x_ite/Components/Followers/X3DChaserNode.js +26 -26
  618. package/src/x_ite/Components/Followers/X3DDamperNode.js +6 -10
  619. package/src/x_ite/Components/Followers/X3DFollowerNode.js +11 -11
  620. package/src/x_ite/Components/Followers.js +120 -0
  621. package/src/x_ite/Components/Geometry2D/Arc2D.js +28 -30
  622. package/src/x_ite/Components/Geometry2D/ArcClose2D.js +95 -93
  623. package/src/x_ite/Components/Geometry2D/Circle2D.js +16 -15
  624. package/src/x_ite/Components/Geometry2D/Disk2D.js +80 -88
  625. package/src/x_ite/Components/Geometry2D/Polyline2D.js +13 -19
  626. package/src/x_ite/Components/Geometry2D/Polypoint2D.js +12 -18
  627. package/src/x_ite/Components/Geometry2D/Rectangle2D.js +13 -13
  628. package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +31 -30
  629. package/src/x_ite/Components/Geometry3D/Box.js +12 -12
  630. package/src/x_ite/Components/Geometry3D/Cone.js +34 -36
  631. package/src/x_ite/Components/Geometry3D/Cylinder.js +52 -54
  632. package/src/x_ite/Components/Geometry3D/ElevationGrid.js +90 -52
  633. package/src/x_ite/Components/Geometry3D/Extrusion.js +472 -388
  634. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +193 -163
  635. package/src/x_ite/Components/Geometry3D/Sphere.js +17 -19
  636. package/src/x_ite/Components/Geometry3D.js +90 -0
  637. package/src/x_ite/Components/Geospatial/GeoCoordinate.js +124 -61
  638. package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +54 -36
  639. package/src/x_ite/Components/Geospatial/GeoLOD.js +190 -98
  640. package/src/x_ite/Components/Geospatial/GeoLocation.js +8 -10
  641. package/src/x_ite/Components/Geospatial/GeoMetadata.js +2 -4
  642. package/src/x_ite/Components/Geospatial/GeoOrigin.js +2 -4
  643. package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +4 -4
  644. package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +10 -7
  645. package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +4 -4
  646. package/src/x_ite/Components/Geospatial/GeoTransform.js +13 -13
  647. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +131 -78
  648. package/src/x_ite/Components/Geospatial/X3DGeospatialObject.js +7 -9
  649. package/src/x_ite/Components/Grouping/Group.js +5 -7
  650. package/src/x_ite/Components/Grouping/StaticGroup.js +194 -22
  651. package/src/x_ite/Components/Grouping/Switch.js +174 -25
  652. package/src/x_ite/Components/Grouping/Transform.js +5 -7
  653. package/src/x_ite/Components/Grouping/X3DBoundedObject.js +70 -16
  654. package/src/x_ite/Components/Grouping/X3DGroupingNode.js +442 -151
  655. package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +53 -29
  656. package/src/x_ite/Components/Grouping/X3DTransformNode.js +6 -9
  657. package/src/x_ite/Components/Grouping.js +93 -0
  658. package/src/x_ite/Components/{H-Anim → HAnim}/HAnimDisplacer.js +8 -10
  659. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +360 -0
  660. package/src/x_ite/Components/{H-Anim → HAnim}/HAnimJoint.js +108 -23
  661. package/src/x_ite/Components/HAnim/HAnimMotion.js +113 -0
  662. package/src/x_ite/Components/{H-Anim → HAnim}/HAnimSegment.js +14 -14
  663. package/src/x_ite/Components/{H-Anim → HAnim}/HAnimSite.js +14 -16
  664. package/src/x_ite/Components/Interpolation/ColorInterpolator.js +13 -11
  665. package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +21 -13
  666. package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +19 -11
  667. package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +8 -8
  668. package/src/x_ite/Components/Interpolation/NormalInterpolator.js +28 -14
  669. package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +27 -16
  670. package/src/x_ite/Components/Interpolation/PositionInterpolator.js +10 -8
  671. package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +10 -8
  672. package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +2 -4
  673. package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +7 -9
  674. package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +7 -9
  675. package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +7 -9
  676. package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +10 -11
  677. package/src/x_ite/Components/Interpolation/X3DInterpolatorNode.js +2 -4
  678. package/src/x_ite/Components/Interpolation.js +111 -0
  679. package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +72 -8
  680. package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +65 -4
  681. package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +5 -29
  682. package/src/x_ite/Components/Layering/Layer.js +14 -6
  683. package/src/x_ite/Components/Layering/LayerSet.js +6 -10
  684. package/src/x_ite/Components/Layering/Viewport.js +10 -12
  685. package/src/x_ite/Components/Layering/X3DLayerNode.js +76 -69
  686. package/src/x_ite/Components/Layering/X3DViewportNode.js +2 -6
  687. package/src/x_ite/Components/Layering.js +84 -0
  688. package/src/x_ite/Components/Layout/Layout.js +163 -173
  689. package/src/x_ite/Components/Layout/LayoutGroup.js +20 -19
  690. package/src/x_ite/Components/Layout/LayoutLayer.js +12 -9
  691. package/src/x_ite/Components/Layout/ScreenFontStyle.js +4 -8
  692. package/src/x_ite/Components/Layout/ScreenGroup.js +63 -56
  693. package/src/x_ite/Components/Layout/X3DLayoutNode.js +2 -4
  694. package/src/x_ite/Components/Lighting/DirectionalLight.js +41 -31
  695. package/src/x_ite/Components/Lighting/PointLight.js +117 -104
  696. package/src/x_ite/Components/Lighting/SpotLight.js +77 -53
  697. package/src/x_ite/Components/Lighting/X3DLightNode.js +90 -68
  698. package/src/x_ite/Components/Lighting.js +81 -0
  699. package/src/x_ite/Components/NURBS/Contour2D.js +47 -5
  700. package/src/x_ite/Components/NURBS/ContourPolyline2D.js +69 -5
  701. package/src/x_ite/Components/NURBS/CoordinateDouble.js +2 -4
  702. package/src/x_ite/Components/NURBS/NurbsCurve.js +140 -10
  703. package/src/x_ite/Components/NURBS/NurbsCurve2D.js +117 -8
  704. package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +139 -10
  705. package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +3 -5
  706. package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +125 -10
  707. package/src/x_ite/Components/NURBS/NurbsSet.js +92 -11
  708. package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +96 -12
  709. package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +88 -7
  710. package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +88 -7
  711. package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +62 -13
  712. package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +41 -6
  713. package/src/x_ite/Components/NURBS/X3DNurbsControlCurveNode.js +2 -4
  714. package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +333 -7
  715. package/src/x_ite/Components/NURBS/X3DParametricGeometryNode.js +9 -5
  716. package/src/x_ite/Components/Navigation/Billboard.js +14 -15
  717. package/src/x_ite/Components/Navigation/Collision.js +13 -12
  718. package/src/x_ite/Components/Navigation/LOD.js +221 -66
  719. package/src/x_ite/Components/Navigation/NavigationInfo.js +110 -99
  720. package/src/x_ite/Components/Navigation/OrthoViewpoint.js +138 -45
  721. package/src/x_ite/Components/Navigation/Viewpoint.js +55 -33
  722. package/src/x_ite/Components/Navigation/ViewpointGroup.js +18 -10
  723. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +241 -181
  724. package/src/x_ite/Components/Navigation.js +93 -0
  725. package/src/x_ite/Components/Networking/Anchor.js +24 -28
  726. package/src/x_ite/Components/Networking/Inline.js +68 -50
  727. package/src/x_ite/Components/Networking/LoadSensor.js +2 -4
  728. package/src/x_ite/Components/Networking/X3DNetworkSensorNode.js +2 -4
  729. package/src/x_ite/Components/Networking/X3DUrlObject.js +93 -11
  730. package/src/x_ite/Components/Networking.js +84 -0
  731. package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +6 -8
  732. package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +8 -4
  733. package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +7 -4
  734. package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +4 -4
  735. package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +451 -287
  736. package/src/x_ite/Components/ParticleSystems/PointEmitter.js +7 -4
  737. package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +53 -40
  738. package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +62 -55
  739. package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +133 -123
  740. package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +25 -22
  741. package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +28 -27
  742. package/src/x_ite/Components/ParticleSystems/X3DParticlePhysicsModelNode.js +2 -4
  743. package/src/x_ite/Components/Picking/LinePickSensor.js +253 -10
  744. package/src/x_ite/Components/Picking/PickableGroup.js +121 -10
  745. package/src/x_ite/Components/Picking/PointPickSensor.js +262 -12
  746. package/src/x_ite/Components/Picking/PrimitivePickSensor.js +176 -8
  747. package/src/x_ite/Components/Picking/VolumePickSensor.js +152 -8
  748. package/src/x_ite/Components/Picking/X3DPickSensorNode.js +378 -7
  749. package/src/x_ite/Components/Picking/X3DPickableObject.js +22 -4
  750. package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +33 -15
  751. package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +7 -4
  752. package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +2 -4
  753. package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +4 -4
  754. package/src/x_ite/Components/PointingDeviceSensor/X3DDragSensorNode.js +4 -4
  755. package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +3 -5
  756. package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +2 -4
  757. package/src/x_ite/Components/PointingDeviceSensor.js +90 -0
  758. package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorParallel.js +282 -0
  759. package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorPerspective.js +227 -0
  760. package/src/x_ite/Components/ProjectiveTextureMapping/X3DTextureProjectorNode.js +217 -0
  761. package/src/x_ite/Components/Rendering/ClipPlane.js +12 -16
  762. package/src/x_ite/Components/Rendering/Color.js +62 -17
  763. package/src/x_ite/Components/Rendering/ColorRGBA.js +65 -17
  764. package/src/x_ite/Components/Rendering/Coordinate.js +4 -4
  765. package/src/x_ite/Components/Rendering/IndexedLineSet.js +68 -81
  766. package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +20 -19
  767. package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +10 -7
  768. package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +21 -23
  769. package/src/x_ite/Components/Rendering/LineSet.js +54 -37
  770. package/src/x_ite/Components/Rendering/Normal.js +65 -13
  771. package/src/x_ite/Components/Rendering/PointSet.js +52 -33
  772. package/src/x_ite/Components/Rendering/TriangleFanSet.js +10 -14
  773. package/src/x_ite/Components/Rendering/TriangleSet.js +2 -4
  774. package/src/x_ite/Components/Rendering/TriangleStripSet.js +9 -13
  775. package/src/x_ite/Components/Rendering/X3DColorNode.js +13 -12
  776. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +118 -79
  777. package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +103 -44
  778. package/src/x_ite/Components/Rendering/X3DGeometricPropertyNode.js +2 -4
  779. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +722 -591
  780. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +129 -92
  781. package/src/x_ite/Components/Rendering/X3DNormalNode.js +2 -4
  782. package/src/x_ite/Components/Rendering.js +132 -0
  783. package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +116 -7
  784. package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +199 -11
  785. package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +436 -11
  786. package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +118 -10
  787. package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +192 -9
  788. package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +84 -8
  789. package/src/x_ite/Components/RigidBodyPhysics/Contact.js +20 -14
  790. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +200 -12
  791. package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +14 -4
  792. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +424 -17
  793. package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +295 -19
  794. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +162 -10
  795. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +135 -8
  796. package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +10 -6
  797. package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +93 -9
  798. package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +5 -8
  799. package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +150 -4
  800. package/src/x_ite/Components/Scripting/Script.js +156 -105
  801. package/src/x_ite/Components/Scripting/X3DScriptNode.js +3 -7
  802. package/src/x_ite/Components/Shaders/ComposedShader.js +38 -53
  803. package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +38 -15
  804. package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +32 -14
  805. package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +32 -14
  806. package/src/x_ite/Components/Shaders/PackagedShader.js +19 -17
  807. package/src/x_ite/Components/Shaders/ProgramShader.js +2 -4
  808. package/src/x_ite/Components/Shaders/ShaderPart.js +38 -26
  809. package/src/x_ite/Components/Shaders/ShaderProgram.js +16 -14
  810. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +836 -699
  811. package/src/x_ite/Components/Shaders/X3DShaderNode.js +61 -101
  812. package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +2 -4
  813. package/src/x_ite/Components/Shaders.js +102 -0
  814. package/src/x_ite/Components/Shape/Appearance.js +179 -69
  815. package/src/x_ite/Components/Shape/FillProperties.js +65 -8
  816. package/src/x_ite/Components/Shape/LineProperties.js +29 -9
  817. package/src/x_ite/Components/Shape/Material.js +50 -64
  818. package/src/x_ite/Components/Shape/PointProperties.js +162 -0
  819. package/src/x_ite/Components/Shape/Shape.js +116 -68
  820. package/src/x_ite/Components/Shape/TwoSidedMaterial.js +56 -62
  821. package/src/x_ite/Components/Shape/UnlitMaterial.js +109 -0
  822. package/src/x_ite/Components/Shape/X3DAppearanceChildNode.js +2 -4
  823. package/src/x_ite/Components/Shape/X3DAppearanceNode.js +14 -11
  824. package/src/x_ite/Components/Shape/X3DMaterialNode.js +17 -6
  825. package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +111 -0
  826. package/src/x_ite/Components/Shape/X3DShapeNode.js +54 -29
  827. package/src/x_ite/Components/Shape.js +108 -0
  828. package/src/x_ite/Components/Sound/AudioClip.js +47 -57
  829. package/src/x_ite/Components/Sound/Sound.js +177 -83
  830. package/src/x_ite/Components/Sound/X3DSoundNode.js +2 -4
  831. package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +38 -24
  832. package/src/x_ite/Components/Sound.js +81 -0
  833. package/src/x_ite/Components/Text/FontStyle.js +4 -6
  834. package/src/x_ite/Components/Text/Text.js +21 -18
  835. package/src/x_ite/Components/Text/X3DFontStyleNode.js +58 -93
  836. package/src/x_ite/Components/Text.js +78 -0
  837. package/src/x_ite/Components/Texturing/ImageTexture.js +57 -67
  838. package/src/x_ite/Components/Texturing/MovieTexture.js +59 -70
  839. package/src/x_ite/Components/Texturing/MultiTexture.js +238 -15
  840. package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +85 -8
  841. package/src/x_ite/Components/Texturing/MultiTextureTransform.js +47 -8
  842. package/src/x_ite/Components/Texturing/PixelTexture.js +61 -27
  843. package/src/x_ite/Components/Texturing/TextureCoordinate.js +72 -22
  844. package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +69 -11
  845. package/src/x_ite/Components/Texturing/TextureProperties.js +98 -69
  846. package/src/x_ite/Components/Texturing/TextureTransform.js +58 -52
  847. package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +91 -0
  848. package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +183 -0
  849. package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +77 -0
  850. package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +42 -97
  851. package/src/x_ite/Components/Texturing/X3DTexture2DNode.js.~1~ +209 -0
  852. package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +4 -12
  853. package/src/x_ite/Components/Texturing/X3DTextureNode.js +10 -71
  854. package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +5 -14
  855. package/src/x_ite/Components/Texturing.js +120 -0
  856. package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +90 -8
  857. package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +106 -16
  858. package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +126 -8
  859. package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +75 -25
  860. package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +74 -24
  861. package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +42 -36
  862. package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +19 -16
  863. package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +110 -8
  864. package/src/x_ite/Components/Time/TimeSensor.js +68 -38
  865. package/src/x_ite/Components/Time/X3DTimeDependentNode.js +29 -29
  866. package/src/x_ite/Components/Time.js +75 -0
  867. package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +311 -12
  868. package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +60 -8
  869. package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +219 -10
  870. package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +134 -7
  871. package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +88 -9
  872. package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +311 -15
  873. package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +87 -7
  874. package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +136 -6
  875. package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +224 -13
  876. package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +193 -12
  877. package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +87 -10
  878. package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +97 -9
  879. package/src/x_ite/Components/VolumeRendering/VolumeData.js +155 -12
  880. package/src/x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode.js +2 -4
  881. package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +155 -5
  882. package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +64 -4
  883. package/src/x_ite/Components/X_ITE/BlendMode.js +206 -0
  884. package/src/x_ite/Components.js +110 -0
  885. package/src/x_ite/Configuration/ComponentInfo.js +21 -15
  886. package/src/x_ite/Configuration/ComponentInfoArray.js +11 -16
  887. package/src/x_ite/Configuration/ProfileInfo.js +10 -10
  888. package/src/x_ite/Configuration/ProfileInfoArray.js +10 -3
  889. package/src/x_ite/Configuration/SupportedComponents.js +312 -303
  890. package/src/x_ite/Configuration/SupportedNodes.js +44 -716
  891. package/src/x_ite/Configuration/SupportedProfiles.js +196 -168
  892. package/src/x_ite/Configuration/UnitInfo.js +22 -8
  893. package/src/x_ite/Configuration/UnitInfoArray.js +2 -3
  894. package/src/x_ite/Configuration/X3DInfoArray.js +46 -26
  895. package/src/x_ite/DEBUG.js +4 -5
  896. package/src/x_ite/Execution/BindableList.js +99 -34
  897. package/src/x_ite/Execution/BindableStack.js +65 -74
  898. package/src/x_ite/Execution/ExportedNode.js +32 -9
  899. package/src/x_ite/Execution/ImportedNode.js +144 -63
  900. package/src/x_ite/Execution/Scene.js +33 -35
  901. package/src/x_ite/Execution/World.js +31 -29
  902. package/src/x_ite/Execution/X3DExecutionContext.js +452 -194
  903. package/src/x_ite/Execution/X3DScene.js +303 -74
  904. package/src/x_ite/{Error.js → Fallback.js} +25 -24
  905. package/src/x_ite/Fields/ArrayFields.js +315 -112
  906. package/src/x_ite/Fields/SFBool.js +11 -10
  907. package/src/x_ite/Fields/SFColor.js +43 -19
  908. package/src/x_ite/Fields/SFColorRGBA.js +40 -18
  909. package/src/x_ite/Fields/SFDouble.js +17 -10
  910. package/src/x_ite/Fields/SFFloat.js +18 -11
  911. package/src/x_ite/Fields/SFImage.js +47 -38
  912. package/src/x_ite/Fields/SFInt32.js +10 -9
  913. package/src/x_ite/Fields/SFMatrix3.js +24 -17
  914. package/src/x_ite/Fields/SFMatrix4.js +24 -17
  915. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +15 -8
  916. package/src/x_ite/Fields/SFNode.js +119 -39
  917. package/src/x_ite/Fields/SFNodeCache.js +89 -0
  918. package/src/x_ite/Fields/SFRotation.js +42 -27
  919. package/src/x_ite/Fields/SFString.js +14 -15
  920. package/src/x_ite/Fields/SFTime.js +12 -11
  921. package/src/x_ite/Fields/SFVec2.js +17 -14
  922. package/src/x_ite/Fields/SFVec3.js +23 -17
  923. package/src/x_ite/Fields/SFVec4.js +25 -19
  924. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +51 -19
  925. package/src/x_ite/Fields.js +3 -9
  926. package/src/x_ite/InputOutput/FileLoader.js +264 -181
  927. package/src/x_ite/InputOutput/Generator.js +136 -60
  928. package/src/x_ite/Parser/HTMLSupport.js +3 -596
  929. package/src/x_ite/Parser/JSONParser.js +446 -0
  930. package/src/x_ite/Parser/Parser.js +617 -652
  931. package/src/x_ite/Parser/X3DParser.js +176 -0
  932. package/src/x_ite/Parser/XMLParser.js +359 -94
  933. package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +19 -3
  934. package/src/x_ite/Prototype/ProtoDeclarationArray.js +19 -3
  935. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +120 -61
  936. package/src/x_ite/Prototype/X3DProtoDeclaration.js +144 -59
  937. package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +16 -18
  938. package/src/x_ite/Rendering/DependentRenderer.js +9 -13
  939. package/src/x_ite/Rendering/{DepthBuffer.js → TextureBuffer.js} +84 -53
  940. package/src/x_ite/Rendering/X3DRenderObject.js +640 -531
  941. package/src/x_ite/Routing/RouteArray.js +38 -16
  942. package/src/x_ite/Routing/X3DRoute.js +67 -68
  943. package/src/x_ite/Routing/X3DRoutingContext.js +6 -6
  944. package/src/x_ite/X3D.js +74 -70
  945. package/src/x_ite.config.js +91 -0
  946. package/src/x_ite.css +175 -53
  947. package/src/x_ite.html +128 -439
  948. package/src/x_ite.js +87 -25
  949. package/tests/{SEE.txt → README.md} +1 -0
  950. package/tests/tests.mdproj +1 -1
  951. package/x_ite.min.html +128 -439
  952. package/.bzrignore +0 -3
  953. package/.npmignore +0 -3
  954. package/AUTHORS.md +0 -6
  955. package/STYLE_GUIDE.md +0 -51
  956. package/X_ITE.sln +0 -56
  957. package/X_ITE.userprefs +0 -13
  958. package/build/build.mdproj +0 -24
  959. package/build/dist.pl +0 -97
  960. package/build/parts/end.frag +0 -10
  961. package/build/parts/start.frag +0 -7
  962. package/dist/LICENCES.txt +0 -344
  963. package/dist/dist.mdproj +0 -45
  964. package/dist/images/logo.128.png +0 -0
  965. package/fonts/fonts.mdproj +0 -29
  966. package/meta/meta.mdproj +0 -35
  967. package/require.build.js +0 -15
  968. package/require.build.min.js +0 -15
  969. package/src/images/logo.128.png +0 -0
  970. package/src/lib/jquery-contextMenu/README.md +0 -355
  971. package/src/lib/jquery-contextMenu/dist/images/cut.png +0 -0
  972. package/src/lib/jquery-contextMenu/dist/images/door.png +0 -0
  973. package/src/lib/jquery-contextMenu/dist/images/page_white_add.png +0 -0
  974. package/src/lib/jquery-contextMenu/dist/images/page_white_copy.png +0 -0
  975. package/src/lib/jquery-contextMenu/dist/images/page_white_delete.png +0 -0
  976. package/src/lib/jquery-contextMenu/dist/images/page_white_edit.png +0 -0
  977. package/src/lib/jquery-contextMenu/dist/images/page_white_paste.png +0 -0
  978. package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.css +0 -155
  979. package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.js +0 -1811
  980. package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.min.css +0 -16
  981. package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.min.css.map +0 -1
  982. package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.min.js +0 -18
  983. package/src/lib/jquery-contextMenu/dist/jquery.contextMenu.min.js.map +0 -1
  984. package/src/lib/jquery-contextMenu/dist/jquery.ui.position.js +0 -517
  985. package/src/lib/jquery-contextMenu/dist/jquery.ui.position.min.js +0 -4
  986. package/src/lib/jquery-contextMenu/package.json +0 -99
  987. package/src/lib/opentype.js/.npmignore +0 -5
  988. package/src/locale/de.mo +0 -0
  989. package/src/locale/fr.mo +0 -0
  990. package/src/require.config.js +0 -51
  991. package/src/src.mdproj +0 -729
  992. package/src/standard/Networking/URI.js +0 -687
  993. package/src/x_ite/Browser/Shaders/BackgroundSphereFragmentShader.fs +0 -29
  994. package/src/x_ite/Browser/Shaders/BackgroundSphereVertexShader.vs +0 -22
  995. package/src/x_ite/Browser/Shaders/Bits/Line3.h +0 -14
  996. package/src/x_ite/Browser/Shaders/Bits/Plane3.h +0 -47
  997. package/src/x_ite/Browser/Shaders/Bits/Random.h +0 -31
  998. package/src/x_ite/Browser/Shaders/Depth.fs +0 -51
  999. package/src/x_ite/Browser/Shaders/Depth.vs +0 -20
  1000. package/src/x_ite/Browser/Shaders/Gouraud.fs +0 -110
  1001. package/src/x_ite/Browser/Shaders/Gouraud.vs +0 -188
  1002. package/src/x_ite/Browser/Shaders/Phong.fs +0 -255
  1003. package/src/x_ite/Browser/Shaders/Phong.vs +0 -38
  1004. package/src/x_ite/Browser/Shaders/PointSet.fs +0 -64
  1005. package/src/x_ite/Browser/Shaders/Wireframe.fs +0 -61
  1006. package/src/x_ite/Browser/Shaders/Wireframe.vs +0 -55
  1007. package/src/x_ite/Components/H-Anim/HAnimHumanoid.js +0 -118
@@ -48,14 +48,14 @@
48
48
 
49
49
 
50
50
  define ([
51
- "jquery",
52
51
  "x_ite/Fields",
52
+ "x_ite/Parser/X3DParser",
53
53
  "x_ite/Prototype/X3DExternProtoDeclaration",
54
54
  "x_ite/Prototype/X3DProtoDeclaration",
55
55
  "x_ite/Bits/X3DConstants",
56
56
  ],
57
- function ($,
58
- Fields,
57
+ function (Fields,
58
+ X3DParser,
59
59
  X3DExternProtoDeclaration,
60
60
  X3DProtoDeclaration,
61
61
  X3DConstants)
@@ -81,151 +81,153 @@ function ($,
81
81
  * Grammar
82
82
  */
83
83
 
84
- // VRML lexical elements
85
- var Grammar =
86
- {
87
- // General
88
- Whitespaces: /^([\x20\n,\t\r]+)/,
89
- Comment: /^#(.*?)(?=[\n\r])/,
90
-
91
- // Header
92
- Header: /^#(VRML|X3D) V(.*?) (utf8)(?: (.*?))?[\n\r]/,
93
-
94
- // Keywords
95
- AS: /^AS/,
96
- COMPONENT: /^COMPONENT/,
97
- DEF: /^DEF/,
98
- EXPORT: /^EXPORT/,
99
- EXTERNPROTO: /^EXTERNPROTO/,
100
- FALSE: /^FALSE/,
101
- false: /^false/,
102
- IMPORT: /^IMPORT/,
103
- IS: /^IS/,
104
- META: /^META/,
105
- NULL: /^NULL/,
106
- TRUE: /^TRUE/,
107
- true: /^true/,
108
- PROFILE: /^PROFILE/,
109
- PROTO: /^PROTO/,
110
- ROUTE: /^ROUTE/,
111
- TO: /^TO/,
112
- UNIT: /^UNIT/,
113
- USE: /^USE/,
114
-
115
- // Terminal symbols
116
- OpenBrace: /^\{/,
117
- CloseBrace: /^\}/,
118
- OpenBracket: /^\[/,
119
- CloseBracket: /^\]/,
120
- Period: /^\./,
121
- Colon: /^\:/,
122
-
123
- Id: /^([^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*)/,
124
- ComponentNameId: /^([^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f\x3a]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f\x3a]*)/,
125
-
126
- initializeOnly: /^initializeOnly/,
127
- inputOnly: /^inputOnly/,
128
- outputOnly: /^outputOnly/,
129
- inputOutput: /^inputOutput/,
130
-
131
- field: /^field/,
132
- eventIn: /^eventIn/,
133
- eventOut: /^eventOut/,
134
- exposedField: /^exposedField/,
135
84
 
136
- FieldType: /^(MFBool|MFColorRGBA|MFColor|MFDouble|MFFloat|MFImage|MFInt32|MFMatrix3d|MFMatrix3f|MFMatrix4d|MFMatrix4f|MFNode|MFRotation|MFString|MFTime|MFVec2d|MFVec2f|MFVec3d|MFVec3f|MFVec4d|MFVec4f|SFBool|SFColorRGBA|SFColor|SFDouble|SFFloat|SFImage|SFInt32|SFMatrix3d|SFMatrix3f|SFMatrix4d|SFMatrix4f|SFNode|SFRotation|SFString|SFTime|SFVec2d|SFVec2f|SFVec3d|SFVec3f|SFVec4d|SFVec4f)/,
137
-
138
- // Values
139
- int32: /^((?:0[xX][\da-fA-F]+)|(?:[+-]?\d+))/,
140
- double: /^([+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?))/,
141
- string: /^"((?:[^"\\]|\\\\|\\")*)"/,
142
-
143
- Inf: /^[+]?inf/i,
144
- NegativeInf: /^-inf/i,
145
- NaN: /^[+-]?nan/i,
146
-
147
- // Misc
148
- Break: /\r?\n/g,
149
- };
150
-
151
- function parse (parser)
152
- {
153
- this .lastIndex = 0;
154
- parser .result = this .exec (parser .input);
155
-
156
- if (parser .result)
157
- {
158
- parser .input = parser .input .slice (parser .result [0] .length);
159
- return true;
160
- }
161
-
162
- return false;
163
- }
164
-
165
-
166
- /*
85
+ // Comment out scriptBody function fragments
86
+ //
87
+ // // VRML lexical elements
88
+ // var Grammar =
89
+ // {
90
+ // // General
91
+ // Whitespaces: /^([\x20\n,\t\r]+)/,
92
+ // Comment: /^#(.*?)(?=[\n\r])/,
93
+ //
94
+ // // Header
95
+ // Header: /^#(VRML|X3D) V(.*?) (utf8)(?: (.*?))?[\n\r]/,
96
+ //
97
+ // // Keywords
98
+ // AS: /^AS/,
99
+ // COMPONENT: /^COMPONENT/,
100
+ // DEF: /^DEF/,
101
+ // EXPORT: /^EXPORT/,
102
+ // EXTERNPROTO: /^EXTERNPROTO/,
103
+ // FALSE: /^FALSE/,
104
+ // false: /^false/,
105
+ // IMPORT: /^IMPORT/,
106
+ // IS: /^IS/,
107
+ // META: /^META/,
108
+ // NULL: /^NULL/,
109
+ // TRUE: /^TRUE/,
110
+ // true: /^true/,
111
+ // PROFILE: /^PROFILE/,
112
+ // PROTO: /^PROTO/,
113
+ // ROUTE: /^ROUTE/,
114
+ // TO: /^TO/,
115
+ // UNIT: /^UNIT/,
116
+ // USE: /^USE/,
117
+ //
118
+ // // Terminal symbols
119
+ // OpenBrace: /^\{/,
120
+ // CloseBrace: /^\}/,
121
+ // OpenBracket: /^\[/,
122
+ // CloseBracket: /^\]/,
123
+ // Period: /^\./,
124
+ // Colon: /^\:/,
125
+ //
126
+ // Id: /^([^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f]*)/,
127
+ // ComponentNameId: /^([^\x30-\x39\x00-\x20\x22\x23\x27\x2b\x2c\x2d\x2e\x5b\x5c\x5d\x7b\x7d\x7f\x3a]{1}[^\x00-\x20\x22\x23\x27\x2c\x2e\x5b\x5c\x5d\x7b\x7d\x7f\x3a]*)/,
128
+ //
129
+ // initializeOnly: /^initializeOnly/,
130
+ // inputOnly: /^inputOnly/,
131
+ // outputOnly: /^outputOnly/,
132
+ // inputOutput: /^inputOutput/,
133
+ //
134
+ // field: /^field/,
135
+ // eventIn: /^eventIn/,
136
+ // eventOut: /^eventOut/,
137
+ // exposedField: /^exposedField/,
138
+ //
139
+ // FieldType: /^(MFBool|MFColorRGBA|MFColor|MFDouble|MFFloat|MFImage|MFInt32|MFMatrix3d|MFMatrix3f|MFMatrix4d|MFMatrix4f|MFNode|MFRotation|MFString|MFTime|MFVec2d|MFVec2f|MFVec3d|MFVec3f|MFVec4d|MFVec4f|SFBool|SFColorRGBA|SFColor|SFDouble|SFFloat|SFImage|SFInt32|SFMatrix3d|SFMatrix3f|SFMatrix4d|SFMatrix4f|SFNode|SFRotation|SFString|SFTime|SFVec2d|SFVec2f|SFVec3d|SFVec3f|SFVec4d|SFVec4f)/,
140
+ //
141
+ // // Values
142
+ // int32: /^((?:0[xX][\da-fA-F]+)|(?:[+-]?\d+))/,
143
+ // double: /^([+-]?(?:(?:(?:\d*\.\d+)|(?:\d+(?:\.)?))(?:[eE][+-]?\d+)?))/,
144
+ // string: /^"((?:[^"\\]|\\\\|\\")*)"/,
145
+ //
146
+ // Inf: /^[+]?inf/i,
147
+ // NegativeInf: /^-inf/i,
148
+ // NaN: /^[+-]?nan/i,
149
+ //
150
+ // // Misc
151
+ // Break: /\r?\n/g,
152
+ // };
153
+ //
154
+ // function parse (parser)
155
+ // {
156
+ // this .lastIndex = 0;
157
+ // parser .result = this .exec (parser .input);
158
+ //
159
+ // if (parser .result)
160
+ // {
161
+ // parser .input = parser .input .slice (parser .result [0] .length);
162
+ // return true;
163
+ // }
164
+ //
165
+ // return false;
166
+ // }
167
+
168
+
169
+ // Comment out scriptBody function fragments
170
+ //
167
171
  // VRML lexical elements
168
172
  var Grammar =
169
173
  {
170
174
  // General
171
- Whitespaces: new RegExp ('^([\\x20\\n,\\t\\r]+)', 'y'),
172
- Comment: new RegExp ('^#(.*?)(?=[\\n\\r])', 'y'),
175
+ Whitespaces: new RegExp ('([\\x20\\n,\\t\\r]+)', 'gy'),
176
+ Comment: new RegExp ('#(.*?)(?=[\\n\\r])', 'gy'),
173
177
 
174
178
  // Header
175
- Header: new RegExp ("^#(VRML|X3D) V(.*?) (utf8)(?: (.*?))?[\\n\\r]", 'y'),
179
+ Header: new RegExp ("^#(VRML|X3D) V(.*?) (utf8)(?:[ \\t]+(.*?))?[ \\t]*[\\n\\r]", 'gy'),
176
180
 
177
181
  // Keywords
178
- AS: new RegExp ('^AS', 'y'),
179
- COMPONENT: new RegExp ('^COMPONENT', 'y'),
180
- DEF: new RegExp ('^DEF', 'y'),
181
- EXPORT: new RegExp ('^EXPORT', 'y'),
182
- EXTERNPROTO: new RegExp ('^EXTERNPROTO', 'y'),
183
- FALSE: new RegExp ('^FALSE', 'y'),
184
- false: new RegExp ('^false', 'y'),
185
- IMPORT: new RegExp ('^IMPORT', 'y'),
186
- IS: new RegExp ('^IS', 'y'),
187
- META: new RegExp ('^META', 'y'),
188
- NULL: new RegExp ('^NULL', 'y'),
189
- TRUE: new RegExp ('^TRUE', 'y'),
190
- true: new RegExp ('^true', 'y'),
191
- PROFILE: new RegExp ('^PROFILE', 'y'),
192
- PROTO: new RegExp ('^PROTO', 'y'),
193
- ROUTE: new RegExp ('^ROUTE', 'y'),
194
- TO: new RegExp ('^TO', 'y'),
195
- UNIT: new RegExp ('^UNIT', 'y'),
196
- USE: new RegExp ('^USE', 'y'),
182
+ AS: new RegExp ('AS', 'gy'),
183
+ COMPONENT: new RegExp ('COMPONENT', 'gy'),
184
+ DEF: new RegExp ('DEF', 'gy'),
185
+ EXPORT: new RegExp ('EXPORT', 'gy'),
186
+ EXTERNPROTO: new RegExp ('EXTERNPROTO', 'gy'),
187
+ FALSE: new RegExp ('FALSE|false', 'gy'),
188
+ IMPORT: new RegExp ('IMPORT', 'gy'),
189
+ IS: new RegExp ('IS', 'gy'),
190
+ META: new RegExp ('META', 'gy'),
191
+ NULL: new RegExp ('NULL', 'gy'),
192
+ TRUE: new RegExp ('TRUE|true', 'gy'),
193
+ PROFILE: new RegExp ('PROFILE', 'gy'),
194
+ PROTO: new RegExp ('PROTO', 'gy'),
195
+ ROUTE: new RegExp ('ROUTE', 'gy'),
196
+ TO: new RegExp ('TO', 'gy'),
197
+ UNIT: new RegExp ('UNIT', 'gy'),
198
+ USE: new RegExp ('USE', 'gy'),
197
199
 
198
200
  // Terminal symbols
199
- OpenBrace: new RegExp ('^\\{', 'y'),
200
- CloseBrace: new RegExp ('^\\}', 'y'),
201
- OpenBracket: new RegExp ('^\\[', 'y'),
202
- CloseBracket: new RegExp ('^\\]', 'y'),
203
- Period: new RegExp ('^\\.', 'y'),
204
- Colon: new RegExp ('^\\:', 'y'),
201
+ OpenBrace: new RegExp ('\\{', 'gy'),
202
+ CloseBrace: new RegExp ('\\}', 'gy'),
203
+ OpenBracket: new RegExp ('\\[', 'gy'),
204
+ CloseBracket: new RegExp ('\\]', 'gy'),
205
+ Period: new RegExp ('\\.', 'gy'),
206
+ Colon: new RegExp ('\\:', 'gy'),
205
207
 
206
- Id: new RegExp ('^([^\\x30-\\x39\\x00-\\x20\\x22\\x23\\x27\\x2b\\x2c\\x2d\\x2e\\x5b\\x5c\\x5d\\x7b\\x7d\\x7f]{1}[^\\x00-\\x20\\x22\\x23\\x27\\x2c\\x2e\\x5b\\x5c\\x5d\\x7b\\x7d\\x7f]*)', 'y'),
207
- ComponentNameId: new RegExp ('^([^\\x30-\\x39\\x00-\\x20\\x22\\x23\\x27\\x2b\\x2c\\x2d\\x2e\\x5b\\x5c\\x5d\\x7b\\x7d\\x7f\\x3a]{1}[^\\x00-\\x20\\x22\\x23\\x27\\x2c\\x2e\\x5b\\x5c\\x5d\\x7b\\x7d\\x7f\\x3a]*)', 'y'),
208
+ Id: new RegExp ('([^\\x30-\\x39\\x00-\\x20\\x22\\x23\\x27\\x2b\\x2c\\x2d\\x2e\\x5b\\x5c\\x5d\\x7b\\x7d\\x7f]{1}[^\\x00-\\x20\\x22\\x23\\x27\\x2c\\x2e\\x5b\\x5c\\x5d\\x7b\\x7d\\x7f]*)', 'gy'),
209
+ ComponentNameId: new RegExp ('([^\\x30-\\x39\\x00-\\x20\\x22\\x23\\x27\\x2b\\x2c\\x2d\\x2e\\x5b\\x5c\\x5d\\x7b\\x7d\\x7f\\x3a]{1}[^\\x00-\\x20\\x22\\x23\\x27\\x2c\\x2e\\x5b\\x5c\\x5d\\x7b\\x7d\\x7f\\x3a]*)', 'gy'),
208
210
 
209
- initializeOnly: new RegExp ('^initializeOnly', 'y'),
210
- inputOnly: new RegExp ('^inputOnly', 'y'),
211
- outputOnly: new RegExp ('^outputOnly', 'y'),
212
- inputOutput: new RegExp ('^inputOutput', 'y'),
211
+ initializeOnly: new RegExp ('initializeOnly', 'gy'),
212
+ inputOnly: new RegExp ('inputOnly', 'gy'),
213
+ outputOnly: new RegExp ('outputOnly', 'gy'),
214
+ inputOutput: new RegExp ('inputOutput', 'gy'),
213
215
 
214
- field: new RegExp ('^field', 'y'),
215
- eventIn: new RegExp ('^eventIn', 'y'),
216
- eventOut: new RegExp ('^eventOut', 'y'),
217
- exposedField: new RegExp ('^exposedField', 'y'),
216
+ field: new RegExp ('field', 'gy'),
217
+ eventIn: new RegExp ('eventIn', 'gy'),
218
+ eventOut: new RegExp ('eventOut', 'gy'),
219
+ exposedField: new RegExp ('exposedField', 'gy'),
218
220
 
219
- FieldType: new RegExp ('^(MFBool|MFColorRGBA|MFColor|MFDouble|MFFloat|MFImage|MFInt32|MFMatrix3d|MFMatrix3f|MFMatrix4d|MFMatrix4f|MFNode|MFRotation|MFString|MFTime|MFVec2d|MFVec2f|MFVec3d|MFVec3f|MFVec4d|MFVec4f|SFBool|SFColorRGBA|SFColor|SFDouble|SFFloat|SFImage|SFInt32|SFMatrix3d|SFMatrix3f|SFMatrix4d|SFMatrix4f|SFNode|SFRotation|SFString|SFTime|SFVec2d|SFVec2f|SFVec3d|SFVec3f|SFVec4d|SFVec4f)', 'y'),
221
+ FieldType: new RegExp ('(MFBool|MFColorRGBA|MFColor|MFDouble|MFFloat|MFImage|MFInt32|MFMatrix3d|MFMatrix3f|MFMatrix4d|MFMatrix4f|MFNode|MFRotation|MFString|MFTime|MFVec2d|MFVec2f|MFVec3d|MFVec3f|MFVec4d|MFVec4f|SFBool|SFColorRGBA|SFColor|SFDouble|SFFloat|SFImage|SFInt32|SFMatrix3d|SFMatrix3f|SFMatrix4d|SFMatrix4f|SFNode|SFRotation|SFString|SFTime|SFVec2d|SFVec2f|SFVec3d|SFVec3f|SFVec4d|SFVec4f)', 'gy'),
220
222
 
221
223
  // Values
222
- int32: new RegExp ('^((?:0[xX][\\da-fA-F]+)|(?:[+-]?\\d+))', 'y'),
223
- double: new RegExp ('^([+-]?(?:(?:(?:\\d*\\.\\d+)|(?:\\d+(?:\\.)?))(?:[eE][+-]?\\d+)?))', 'y'),
224
- string: new RegExp ('^"((?:[^\\\\"]|\\\\\\\\|\\\\\\")*)"', 'y'),
225
-
226
- Inf: new RegExp ('^[+]?inf', 'yi'),
227
- NegativeInf: new RegExp ('^-inf', 'yi'),
228
- NaN: new RegExp ('^[+-]?nan', 'yi'),
224
+ int32: new RegExp ('((?:0[xX][\\da-fA-F]+)|(?:[+-]?\\d+))', 'gy'),
225
+ double: new RegExp ('([+-]?(?:(?:(?:\\d*\\.\\d+)|(?:\\d+(?:\\.)?))(?:[eE][+-]?\\d+)?))', 'gy'),
226
+ string: new RegExp ('"((?:[^\\\\"]|\\\\\\\\|\\\\\\")*)"', 'gy'),
227
+
228
+ Inf: new RegExp ('[+]?(?:inf|Infinity)', 'gy'),
229
+ NegativeInf: new RegExp ('-(?:inf|Infinity)', 'gy'),
230
+ NaN: new RegExp ('[+-]?(nan|NaN)', 'gy'),
229
231
 
230
232
  // Misc
231
233
  Break: new RegExp ('\\r?\\n', 'g'),
@@ -245,27 +247,20 @@ function ($,
245
247
 
246
248
  return false;
247
249
  }
248
- */
249
250
 
250
251
  for (var key in Grammar)
251
252
  Grammar [key] .parse = parse;
252
253
 
253
- Object .preventExtensions (Grammar);
254
- Object .freeze (Grammar);
255
- Object .seal (Grammar);
256
-
257
254
  /*
258
255
  * Parser
259
256
  */
260
257
 
261
- function Parser (scene, isXML)
258
+ function Parser (scene)
262
259
  {
263
- this .scene = scene;
264
- this .isXML = isXML;
265
- this .executionContexts = [ ];
260
+ X3DParser .call (this, scene);
266
261
  }
267
262
 
268
- Parser .prototype =
263
+ Parser .prototype = Object .assign (Object .create (X3DParser .prototype),
269
264
  {
270
265
  accessTypes:
271
266
  {
@@ -326,43 +321,26 @@ function ($,
326
321
  this .lineNumber = 1;
327
322
  this .lastIndex = 0;
328
323
  },
329
- getBrowser: function ()
330
- {
331
- return this .scene .getBrowser ();
332
- },
333
- getExecutionContext: function ()
324
+ getInput: function ()
334
325
  {
335
- return this .executionContexts [this .executionContexts .length - 1];
336
- },
337
- pushExecutionContext: function (executionContext)
338
- {
339
- return this .executionContexts .push (executionContext);
340
- },
341
- popExecutionContext: function ()
342
- {
343
- this .executionContexts .pop ();
344
- },
345
- isInsideProtoDefinition: function ()
346
- {
347
- return this .executionContexts .length > 1;
348
- },
349
- addRootNode: function (node)
350
- {
351
- this .getExecutionContext () .rootNodes .push (node);
326
+ return this .input;
352
327
  },
353
328
  exception: function (string)
354
329
  {
355
330
  if (this .getBrowser () .isStrict ())
356
331
  throw new Error (string);
357
332
 
358
- this .getBrowser () .println (string);
333
+ console .warn (string);
359
334
  },
360
- parseIntoScene: function (input)
335
+ parseIntoScene: function (input, success, error)
361
336
  {
362
337
  try
363
338
  {
364
- this .scene .setEncoding ("VRML");
365
- this .scene .setProfile (this .getBrowser () .getProfile ("Full"));
339
+ this .success = success;
340
+ this .error = error;
341
+
342
+ this .getScene () .setEncoding ("VRML");
343
+ this .getScene () .setProfile (this .getBrowser () .getProfile ("Full"));
366
344
 
367
345
  this .setInput (input);
368
346
  this .x3dScene ();
@@ -370,6 +348,7 @@ function ($,
370
348
  }
371
349
  catch (error)
372
350
  {
351
+ //console .log (error);
373
352
  throw new Error (this .getError (error));
374
353
  }
375
354
  },
@@ -384,20 +363,20 @@ function ($,
384
363
  line = this .getLastLine (),
385
364
  lastLine = this .getLastLine (),
386
365
  linePos = line .length - rest .length + 1;
387
-
366
+
388
367
  if (line .length > 80)
389
368
  {
390
369
  line = line .substr (linePos - 40, 80);
391
370
  lastLine = "";
392
371
  linePos = 40;
393
372
  }
394
-
373
+
395
374
  // Format error
396
375
 
397
376
  var message = "\n"
398
377
  + "********************************************************************************" + "\n"
399
378
  + "Parser error at line " + this .lineNumber + ":" + linePos + "\n"
400
- + "in '" + this .scene .getURL () + "'" + "\n"
379
+ + "in '" + this .getScene () .getWorldURL () + "'" + "\n"
401
380
  + "\n"
402
381
  + lastLine + "\n"
403
382
  + line + "\n"
@@ -458,11 +437,11 @@ function ($,
458
437
  {
459
438
  if (!this .xml)
460
439
  this .lines (this .result [1]);
461
-
440
+
462
441
  return true;
463
442
  }
464
443
 
465
- return false;
444
+ return false;
466
445
  },
467
446
  lines: function (string)
468
447
  {
@@ -473,28 +452,67 @@ function ($,
473
452
  },
474
453
  x3dScene: function ()
475
454
  {
476
- this .pushExecutionContext (this .scene);
455
+ this .pushExecutionContext (this .getScene ());
477
456
 
478
457
  this .headerStatement ();
479
458
  this .profileStatement ();
480
459
  this .componentStatements ();
481
460
  this .unitStatements ();
482
461
  this .metaStatements ();
483
- this .statements ();
484
462
 
485
- this .popExecutionContext (this .scene);
463
+ try
464
+ {
465
+ this .setUnits (this .getScene () .getMetaData ("generator"));
466
+ }
467
+ catch (error)
468
+ { }
486
469
 
487
- if (this .lastIndex < this .input .length)
488
- throw new Error ("Unknown statement.");
470
+ if (this .success)
471
+ {
472
+ require (this .getProviderUrls (),
473
+ function ()
474
+ {
475
+ try
476
+ {
477
+ this .statements ();
478
+ this .popExecutionContext ();
479
+
480
+ if (this .lastIndex < this .input .length)
481
+ throw new Error ("Unknown statement.");
482
+
483
+ this .success (this .getScene ());
484
+ }
485
+ catch (error)
486
+ {
487
+ this .error (new Error (this .getError (error)));
488
+ }
489
+ }
490
+ .bind (this),
491
+ function (error)
492
+ {
493
+ this .error (error);
494
+ }
495
+ .bind (this));
496
+ }
497
+ else
498
+ {
499
+ this .statements ();
500
+ this .popExecutionContext ();
501
+
502
+ if (this .lastIndex < this .input .length)
503
+ throw new Error ("Unknown statement.");
504
+ }
489
505
  },
490
506
  headerStatement: function ()
491
507
  {
508
+ Grammar .Header .lastIndex = 0;
509
+
492
510
  var result = Grammar .Header .exec (this .input);
493
511
 
494
512
  if (result)
495
513
  {
496
- this .scene .specificationVersion = result [2];
497
- this .scene .encoding = "VRML";
514
+ this .getScene () .setSpecificationVersion (result [2]);
515
+ this .getScene () .setEncoding ("VRML");
498
516
  return true;
499
517
  }
500
518
 
@@ -510,7 +528,7 @@ function ($,
510
528
  {
511
529
  var profile = this .getBrowser () .getProfile (this .result [1]);
512
530
 
513
- this .scene .setProfile (profile);
531
+ this .getScene () .setProfile (profile);
514
532
  return;
515
533
  }
516
534
 
@@ -523,7 +541,7 @@ function ($,
523
541
 
524
542
  while (component)
525
543
  {
526
- this .scene .addComponent (component);
544
+ this .getScene () .addComponent (component);
527
545
 
528
546
  component = this .componentStatement ();
529
547
  }
@@ -539,7 +557,7 @@ function ($,
539
557
  var componentNameIdCharacters = this .result [1];
540
558
 
541
559
  this .comments ();
542
-
560
+
543
561
  if (Grammar .Colon .parse (this))
544
562
  {
545
563
  if (this .componentSupportLevel ())
@@ -548,16 +566,16 @@ function ($,
548
566
 
549
567
  return this .getBrowser () .getComponent (componentNameIdCharacters, componentSupportLevel);
550
568
  }
551
-
569
+
552
570
  throw new Error ("Expected a component support level.");
553
571
  }
554
-
572
+
555
573
  throw new Error ("Expected a ':' after component name.");
556
574
  }
557
-
575
+
558
576
  throw new Error ("Expected a component name.");
559
577
  }
560
-
578
+
561
579
  return null;
562
580
  },
563
581
  componentSupportLevel: function ()
@@ -572,24 +590,24 @@ function ($,
572
590
  unitStatement: function ()
573
591
  {
574
592
  this .comments ();
575
-
593
+
576
594
  if (Grammar .UNIT .parse (this))
577
595
  {
578
596
  if (this .categoryNameId ())
579
597
  {
580
598
  var categoryNameId = this .result [1];
581
-
599
+
582
600
  if (this .unitNameId ())
583
601
  {
584
602
  var unitNameId = this .result [1];
585
-
603
+
586
604
  if (this .unitConversionFactor ())
587
605
  {
588
606
  var unitConversionFactor = this .value;
589
607
 
590
608
  try
591
609
  {
592
- this .scene .updateUnit (categoryNameId, unitNameId, unitConversionFactor);
610
+ this .getScene () .updateUnit (categoryNameId, unitNameId, unitConversionFactor);
593
611
  return true;
594
612
  }
595
613
  catch (error)
@@ -598,16 +616,16 @@ function ($,
598
616
  return true;
599
617
  }
600
618
  }
601
-
619
+
602
620
  throw new Error ("Expected unit conversion factor.");
603
621
  }
604
-
622
+
605
623
  throw new Error ("Expected unit name identificator.");
606
624
  }
607
-
625
+
608
626
  throw new Error ("Expected category name identificator after UNIT statement.");
609
627
  }
610
-
628
+
611
629
  return false;
612
630
  },
613
631
  unitConversionFactor: function ()
@@ -628,21 +646,21 @@ function ($,
628
646
  if (this .metakey ())
629
647
  {
630
648
  var metakey = this .value;
631
-
649
+
632
650
  if (this .metavalue ())
633
651
  {
634
652
  var metavalue = this .value;
635
653
 
636
- this .scene .setMetaData (metakey, metavalue);
654
+ this .getScene () .setMetaData (metakey, metavalue);
637
655
  return true;
638
656
  }
639
-
657
+
640
658
  throw new Error ("Expected metadata value.");
641
659
  }
642
-
660
+
643
661
  throw new Error ("Expected metadata key.");
644
662
  }
645
-
663
+
646
664
  return false;
647
665
  },
648
666
  metakey: function ()
@@ -664,11 +682,11 @@ function ($,
664
682
  var
665
683
  localNodeNameId = this .result [1],
666
684
  exportedNodeNameId = "";
667
-
685
+
668
686
  this .comments ();
669
-
670
- var node = this .scene .getLocalNode (localNodeNameId);
671
-
687
+
688
+ var node = this .getScene () .getLocalNode (localNodeNameId);
689
+
672
690
  if (Grammar .AS .parse (this))
673
691
  {
674
692
  if (this .exportedNodeNameId ())
@@ -678,14 +696,14 @@ function ($,
678
696
  }
679
697
  else
680
698
  exportedNodeNameId = localNodeNameId;
681
-
682
- this .scene .updateExportedNode (exportedNodeNameId, node);
699
+
700
+ this .getScene () .updateExportedNode (exportedNodeNameId, node);
683
701
  return true;
684
702
  }
685
-
703
+
686
704
  throw new Error ("No name given after EXPORT.");
687
705
  }
688
-
706
+
689
707
  return false;
690
708
  },
691
709
  importStatement: function ()
@@ -699,9 +717,9 @@ function ($,
699
717
  var
700
718
  inlineNodeNameId = this .result [1],
701
719
  namedNode = this .getExecutionContext () .getNamedNode (inlineNodeNameId);
702
-
720
+
703
721
  this .comments ();
704
-
722
+
705
723
  if (Grammar .Period .parse (this))
706
724
  {
707
725
  if (this .exportedNodeNameId ())
@@ -709,9 +727,9 @@ function ($,
709
727
  var
710
728
  exportedNodeNameId = this .result [1],
711
729
  nodeNameId = exportedNodeNameId;
712
-
730
+
713
731
  this .comments ();
714
-
732
+
715
733
  if (Grammar .AS .parse (this))
716
734
  {
717
735
  if (this .nodeNameId ())
@@ -720,17 +738,17 @@ function ($,
720
738
  else
721
739
  throw new Error ("No name given after AS.");
722
740
  }
723
-
741
+
724
742
  this .getExecutionContext () .updateImportedNode (namedNode, exportedNodeNameId, nodeNameId);
725
743
  return true;
726
744
  }
727
-
745
+
728
746
  throw new Error ("Expected exported node name.");
729
747
  }
730
-
748
+
731
749
  throw new Error ("Expected a '.' after exported node name.");
732
750
  }
733
-
751
+
734
752
  throw new Error ("No name given after IMPORT statement.");
735
753
  }
736
754
  return false;
@@ -744,13 +762,13 @@ function ($,
744
762
  {
745
763
  if (this .protoStatement ())
746
764
  return true;
747
-
765
+
748
766
  if (this .routeStatement ())
749
767
  return true;
750
-
768
+
751
769
  if (this .importStatement ())
752
770
  return true;
753
-
771
+
754
772
  if (this .exportStatement ())
755
773
  return true;
756
774
 
@@ -793,10 +811,10 @@ function ($,
793
811
  {
794
812
  if (this .proto ())
795
813
  return true;
796
-
814
+
797
815
  if (this .externproto ())
798
816
  return true;
799
-
817
+
800
818
  return false;
801
819
  },
802
820
  protoStatements: function ()
@@ -807,25 +825,25 @@ function ($,
807
825
  proto: function ()
808
826
  {
809
827
  this .comments ();
810
-
828
+
811
829
  if (Grammar .PROTO .parse (this))
812
830
  {
813
831
  if (this .nodeTypeId ())
814
832
  {
815
833
  var nodeTypeId = this .result [1];
816
-
834
+
817
835
  this .comments ();
818
-
836
+
819
837
  if (Grammar .OpenBracket .parse (this))
820
838
  {
821
839
  var interfaceDeclarations = this .interfaceDeclarations ();
822
-
840
+
823
841
  this .comments ();
824
-
842
+
825
843
  if (Grammar .CloseBracket .parse (this))
826
844
  {
827
845
  this .comments ();
828
-
846
+
829
847
  if (Grammar .OpenBrace .parse (this))
830
848
  {
831
849
  var proto = new X3DProtoDeclaration (this .getExecutionContext ());
@@ -837,14 +855,16 @@ function ($,
837
855
  proto .addUserDefinedField (field .getAccessType (), field .getName (), field);
838
856
  }
839
857
 
840
- this .pushExecutionContext (proto);
841
-
858
+ this .pushPrototype (proto);
859
+ this .pushExecutionContext (proto .getBody ());
860
+
842
861
  this .protoBody ();
843
-
862
+
844
863
  this .popExecutionContext ();
845
-
864
+ this .popPrototype ();
865
+
846
866
  this .comments ();
847
-
867
+
848
868
  if (Grammar .CloseBrace .parse (this))
849
869
  {
850
870
  proto .setName (nodeTypeId);
@@ -853,7 +873,7 @@ function ($,
853
873
  this .getExecutionContext () .protos .add (nodeTypeId, proto);
854
874
  return true;
855
875
  }
856
-
876
+
857
877
  throw new Error ("Expected a '}' at the end of PROTO body.");
858
878
  }
859
879
 
@@ -885,7 +905,7 @@ function ($,
885
905
  rootNodeStatement: function ()
886
906
  {
887
907
  this .comments ();
888
-
908
+
889
909
  if (Grammar .DEF .parse (this))
890
910
  {
891
911
  if (this .nodeNameId ())
@@ -899,7 +919,7 @@ function ($,
899
919
 
900
920
  throw new Error ("Expected node type name after DEF.");
901
921
  }
902
-
922
+
903
923
  throw new Error ("No name given after DEF.");
904
924
  }
905
925
 
@@ -928,38 +948,38 @@ function ($,
928
948
  restrictedInterfaceDeclaration: function ()
929
949
  {
930
950
  this .comments ();
931
-
951
+
932
952
  if (Grammar .inputOnly .parse (this) || Grammar .eventIn .parse (this))
933
953
  {
934
954
  if (this .fieldType ())
935
955
  {
936
956
  var fieldType = this .result [1];
937
-
957
+
938
958
  if (this .inputOnlyId ())
939
959
  {
940
960
  var
941
961
  fieldId = this .result [1],
942
962
  field = new (this [fieldType] .constructor) ();
943
-
963
+
944
964
  field .setAccessType (X3DConstants .inputOnly);
945
965
  field .setName (fieldId);
946
966
  return field;
947
967
  }
948
-
968
+
949
969
  throw new Error ("Expected a name for field.");
950
970
  }
951
971
 
952
972
  this .Id ()
953
-
973
+
954
974
  throw new Error ("Unknown event or field type: '" + this .result [1] + "'.");
955
975
  }
956
-
976
+
957
977
  if (Grammar .outputOnly .parse (this) || Grammar .eventOut .parse (this))
958
978
  {
959
979
  if (this .fieldType ())
960
980
  {
961
981
  var fieldType = this .result [1];
962
-
982
+
963
983
  if (this .outputOnlyId ())
964
984
  {
965
985
  var
@@ -970,83 +990,83 @@ function ($,
970
990
  field .setName (fieldId);
971
991
  return field;
972
992
  }
973
-
993
+
974
994
  throw new Error ("Expected a name for field.");
975
995
  }
976
-
996
+
977
997
  this .Id ()
978
-
998
+
979
999
  throw new Error ("Unknown event or field type: '" + this .result [1] + "'.");
980
1000
  }
981
-
1001
+
982
1002
  if (Grammar .initializeOnly .parse (this) || Grammar .field .parse (this))
983
1003
  {
984
1004
  if (this .fieldType ())
985
1005
  {
986
1006
  var fieldType = this .result [1];
987
-
1007
+
988
1008
  if (this .initializeOnlyId ())
989
1009
  {
990
1010
  var
991
1011
  fieldId = this .result [1],
992
1012
  field = new (this [fieldType] .constructor) ();
993
-
1013
+
994
1014
  if (this .fieldValue (field))
995
1015
  {
996
1016
  field .setAccessType (X3DConstants .initializeOnly);
997
1017
  field .setName (fieldId);
998
1018
  return field;
999
1019
  }
1000
-
1020
+
1001
1021
  throw new Error ("Couldn't read value for field '" + fieldId + "'.");
1002
1022
  }
1003
-
1023
+
1004
1024
  throw new Error ("Expected a name for field.");
1005
1025
  }
1006
-
1026
+
1007
1027
  this .Id ()
1008
-
1028
+
1009
1029
  throw new Error ("Unknown event or field type: '" + this .result [1] + "'.");
1010
1030
  }
1011
-
1031
+
1012
1032
  return null;
1013
1033
  },
1014
1034
  interfaceDeclaration: function ()
1015
1035
  {
1016
1036
  var field = this .restrictedInterfaceDeclaration ();
1017
-
1037
+
1018
1038
  if (field)
1019
1039
  return field;
1020
1040
 
1021
1041
  this .comments ();
1022
-
1042
+
1023
1043
  if (Grammar .inputOutput .parse (this) || Grammar .exposedField .parse (this))
1024
1044
  {
1025
1045
  if (this .fieldType ())
1026
1046
  {
1027
1047
  var fieldType = this .result [1];
1028
-
1048
+
1029
1049
  if (this .inputOutputId ())
1030
1050
  {
1031
1051
  var
1032
1052
  fieldId = this .result [1],
1033
1053
  field = new (this [fieldType] .constructor) ();
1034
-
1054
+
1035
1055
  if (this .fieldValue (field))
1036
1056
  {
1037
1057
  field .setAccessType (X3DConstants .inputOutput);
1038
1058
  field .setName (fieldId);
1039
1059
  return field;
1040
1060
  }
1041
-
1061
+
1042
1062
  throw new Error ("Couldn't read value for field '" + fieldId + "'.");
1043
1063
  }
1044
-
1064
+
1045
1065
  throw new Error ("Expected a name for field.");
1046
1066
  }
1047
-
1048
- this .Id ()
1049
-
1067
+
1068
+ this .Id ();
1069
+
1050
1070
  throw new Error ("Unknown event or field type: '" + this .result [1] + "'.");
1051
1071
  }
1052
1072
 
@@ -1055,21 +1075,21 @@ function ($,
1055
1075
  externproto: function ()
1056
1076
  {
1057
1077
  this .comments ();
1058
-
1078
+
1059
1079
  if (Grammar .EXTERNPROTO .parse (this))
1060
1080
  {
1061
1081
  if (this .nodeTypeId ())
1062
1082
  {
1063
1083
  var nodeTypeId = this .result [1];
1064
-
1084
+
1065
1085
  this .comments ();
1066
-
1086
+
1067
1087
  if (Grammar .OpenBracket .parse (this))
1068
1088
  {
1069
1089
  var externInterfaceDeclarations = this .externInterfaceDeclarations ();
1070
-
1090
+
1071
1091
  this .comments ();
1072
-
1092
+
1073
1093
  if (Grammar .CloseBracket .parse (this))
1074
1094
  {
1075
1095
  if (this .URLList (this .MFString))
@@ -1082,27 +1102,27 @@ function ($,
1082
1102
 
1083
1103
  externproto .addUserDefinedField (field .getAccessType (), field .getName (), field);
1084
1104
  }
1085
-
1105
+
1086
1106
  externproto .setName (nodeTypeId);
1087
1107
  externproto .url_ = this .MFString;
1088
1108
  externproto .setup ();
1089
1109
 
1090
- this .getExecutionContext () .externprotos .add (nodeTypeId, externproto);
1110
+ this .getExecutionContext () .externprotos .add (nodeTypeId, externproto);
1091
1111
  return true;
1092
1112
  }
1093
-
1113
+
1094
1114
  throw new Error ("Expected a URL list after EXTERNPROTO interface declaration '" + nodeTypeId + "'.");
1095
1115
  }
1096
-
1116
+
1097
1117
  throw new Error ("Expected a ']' at the end of EXTERNPROTO interface declaration.");
1098
1118
  }
1099
-
1119
+
1100
1120
  throw new Error ("Expected a '[' at the beginning of EXTERNPROTO interface declaration.");
1101
1121
  }
1102
-
1122
+
1103
1123
  throw new Error ("Invalid EXTERNPROTO definition name.");
1104
1124
  }
1105
-
1125
+
1106
1126
  return false;
1107
1127
  },
1108
1128
  externInterfaceDeclarations: function ()
@@ -1114,7 +1134,7 @@ function ($,
1114
1134
  while (field)
1115
1135
  {
1116
1136
  externInterfaceDeclarations .push (field);
1117
-
1137
+
1118
1138
  field = this .externInterfaceDeclaration ();
1119
1139
  }
1120
1140
 
@@ -1123,38 +1143,38 @@ function ($,
1123
1143
  externInterfaceDeclaration: function ()
1124
1144
  {
1125
1145
  this .comments ();
1126
-
1146
+
1127
1147
  if (Grammar .inputOnly .parse (this) || Grammar .eventIn .parse (this))
1128
1148
  {
1129
1149
  if (this .fieldType ())
1130
1150
  {
1131
1151
  var fieldType = this .result [1];
1132
-
1152
+
1133
1153
  if (this .inputOnlyId ())
1134
1154
  {
1135
1155
  var
1136
1156
  fieldId = this .result [1],
1137
1157
  field = new (this [fieldType] .constructor) ();
1138
-
1158
+
1139
1159
  field .setAccessType (X3DConstants .inputOnly);
1140
1160
  field .setName (fieldId);
1141
1161
  return field;
1142
1162
  }
1143
-
1163
+
1144
1164
  throw new Error ("Expected a name for field.");
1145
1165
  }
1146
1166
 
1147
1167
  this .Id ()
1148
-
1168
+
1149
1169
  throw new Error ("Unknown event or field type: '" + this .result [1] + "'.");
1150
1170
  }
1151
-
1171
+
1152
1172
  if (Grammar .outputOnly .parse (this) || Grammar .eventOut .parse (this))
1153
1173
  {
1154
1174
  if (this .fieldType ())
1155
1175
  {
1156
1176
  var fieldType = this .result [1];
1157
-
1177
+
1158
1178
  if (this .outputOnlyId ())
1159
1179
  {
1160
1180
  var
@@ -1165,62 +1185,62 @@ function ($,
1165
1185
  field .setName (fieldId);
1166
1186
  return field;
1167
1187
  }
1168
-
1188
+
1169
1189
  throw new Error ("Expected a name for field.");
1170
1190
  }
1171
-
1191
+
1172
1192
  this .Id ()
1173
-
1193
+
1174
1194
  throw new Error ("Unknown event or field type: '" + this .result [1] + "'.");
1175
1195
  }
1176
-
1196
+
1177
1197
  if (Grammar .initializeOnly .parse (this) || Grammar .field .parse (this))
1178
1198
  {
1179
1199
  if (this .fieldType ())
1180
1200
  {
1181
1201
  var fieldType = this .result [1];
1182
-
1202
+
1183
1203
  if (this .initializeOnlyId ())
1184
1204
  {
1185
1205
  var
1186
1206
  fieldId = this .result [1],
1187
1207
  field = new (this [fieldType] .constructor) ();
1188
-
1208
+
1189
1209
  field .setAccessType (X3DConstants .initializeOnly);
1190
1210
  field .setName (fieldId);
1191
1211
  return field;
1192
1212
  }
1193
-
1213
+
1194
1214
  throw new Error ("Expected a name for field.");
1195
1215
  }
1196
-
1216
+
1197
1217
  this .Id ()
1198
-
1218
+
1199
1219
  throw new Error ("Unknown event or field type: '" + this .result [1] + "'.");
1200
1220
  }
1201
-
1221
+
1202
1222
  if (Grammar .inputOutput .parse (this) || Grammar .exposedField .parse (this))
1203
1223
  {
1204
1224
  if (this .fieldType ())
1205
1225
  {
1206
1226
  var fieldType = this .result [1];
1207
-
1227
+
1208
1228
  if (this .inputOutputId ())
1209
1229
  {
1210
1230
  var
1211
1231
  fieldId = this .result [1],
1212
1232
  field = new (this [fieldType] .constructor) ();
1213
-
1233
+
1214
1234
  field .setAccessType (X3DConstants .inputOutput);
1215
1235
  field .setName (fieldId);
1216
1236
  return field;
1217
1237
  }
1218
-
1238
+
1219
1239
  throw new Error ("Expected a name for field.");
1220
1240
  }
1221
-
1241
+
1222
1242
  this .Id ()
1223
-
1243
+
1224
1244
  throw new Error ("Unknown event or field type: '" + this .result [1] + "'.");
1225
1245
  }
1226
1246
 
@@ -1233,7 +1253,7 @@ function ($,
1233
1253
  routeStatement: function ()
1234
1254
  {
1235
1255
  this .comments ();
1236
-
1256
+
1237
1257
  if (Grammar .ROUTE .parse (this))
1238
1258
  {
1239
1259
  if (this .nodeNameId ())
@@ -1243,15 +1263,15 @@ function ($,
1243
1263
  fromNode = this .getExecutionContext () .getLocalNode (fromNodeId);
1244
1264
 
1245
1265
  this .comments ();
1246
-
1266
+
1247
1267
  if (Grammar .Period .parse (this))
1248
1268
  {
1249
1269
  if (this .outputOnlyId ())
1250
1270
  {
1251
1271
  var eventOutId = this .result [1];
1252
-
1272
+
1253
1273
  this .comments ();
1254
-
1274
+
1255
1275
  if (Grammar .TO .parse (this))
1256
1276
  {
1257
1277
  if (this .nodeNameId ())
@@ -1280,52 +1300,46 @@ function ($,
1280
1300
  return true;
1281
1301
  }
1282
1302
  }
1283
-
1303
+
1284
1304
  throw new Error ("Bad ROUTE specification: Expected a field name.");
1285
1305
  }
1286
-
1306
+
1287
1307
  throw new Error ("Bad ROUTE specification: Expected a '.' after node name.");
1288
1308
  }
1289
-
1309
+
1290
1310
  throw new Error ("Bad ROUTE specification: Expected a node name.");
1291
1311
  }
1292
-
1312
+
1293
1313
  throw new Error ("Bad ROUTE specification: Expected a 'TO'.");
1294
1314
  }
1295
-
1315
+
1296
1316
  throw new Error ("Bad ROUTE specification: Expected a field name.");
1297
1317
  }
1298
-
1318
+
1299
1319
  throw new Error ("Bad ROUTE specification: Expected a '.' after node name.");
1300
1320
  }
1301
-
1321
+
1302
1322
  throw new Error ("Bad ROUTE specification: Expected a node name.");
1303
1323
  }
1304
-
1324
+
1305
1325
  return false;
1306
1326
  },
1307
1327
  node: function (nodeNameId)
1308
1328
  {
1309
1329
  if (this .nodeTypeId ())
1310
1330
  {
1311
- var nodeTypeId = this .result [1];
1312
-
1313
- try
1314
- {
1315
- var baseNode = this .getExecutionContext () .createNode (nodeTypeId, false);
1316
- }
1317
- catch (error1)
1331
+ var
1332
+ nodeTypeId = this .result [1],
1333
+ baseNode = this .getExecutionContext () .createNode (nodeTypeId, false);
1334
+
1335
+ if (! baseNode)
1318
1336
  {
1319
- try
1320
- {
1321
- var baseNode = this .getExecutionContext () .createProto (nodeTypeId, false);
1322
- }
1323
- catch (error2)
1324
- {
1325
- throw new Error (error1 .message + "\n" + error2 .message);
1326
- }
1337
+ baseNode = this .getExecutionContext () .createProto (nodeTypeId, false);
1338
+
1339
+ if (! baseNode)
1340
+ throw new Error ("Unknown node type or proto '" + nodeTypeId + "', you probably have insufficient component/profile statements.");
1327
1341
  }
1328
-
1342
+
1329
1343
  if (nodeNameId .length)
1330
1344
  {
1331
1345
  try
@@ -1339,31 +1353,33 @@ function ($,
1339
1353
 
1340
1354
  this .getExecutionContext () .updateNamedNode (nodeNameId, baseNode);
1341
1355
  }
1342
-
1356
+
1343
1357
  this .comments ();
1344
-
1358
+
1345
1359
  if (Grammar .OpenBrace .parse (this))
1346
1360
  {
1347
1361
  if (baseNode .hasUserDefinedFields ())
1348
1362
  this .scriptBody (baseNode);
1349
-
1363
+
1350
1364
  else
1351
1365
  this .nodeBody (baseNode);
1352
-
1366
+
1353
1367
  this .comments ();
1354
-
1368
+
1355
1369
  if (Grammar .CloseBrace .parse (this))
1356
1370
  {
1357
- this .getExecutionContext () .addUninitializedNode (baseNode);
1371
+ if (! this .isInsideProtoDefinition ())
1372
+ baseNode .setup ();
1373
+
1358
1374
  return baseNode;
1359
1375
  }
1360
-
1376
+
1361
1377
  throw new Error ("Expected '}' at the end of node body.");
1362
1378
  }
1363
-
1379
+
1364
1380
  throw new Error ("Expected '{' at the beginning of node body.");
1365
1381
  }
1366
-
1382
+
1367
1383
  return false;
1368
1384
  },
1369
1385
  scriptBody: function (baseNode)
@@ -1373,30 +1389,30 @@ function ($,
1373
1389
  },
1374
1390
  scriptBodyElement: function (baseNode)
1375
1391
  {
1376
- // var
1377
- // lastIndex = this .lastIndex,
1378
- // lineNumber = this .lineNumber;
1379
-
1380
1392
  var
1381
- input = this .input,
1393
+ lastIndex = this .lastIndex,
1382
1394
  lineNumber = this .lineNumber;
1383
1395
 
1396
+ // var
1397
+ // input = this .input,
1398
+ // lineNumber = this .lineNumber;
1399
+
1384
1400
  if (this .Id ())
1385
1401
  {
1386
1402
  var accessType = this .accessTypes [this .result [1]];
1387
-
1403
+
1388
1404
  if (accessType)
1389
1405
  {
1390
1406
  if (this .fieldType ())
1391
1407
  {
1392
1408
  var fieldType = this .result [1];
1393
-
1409
+
1394
1410
  if (this .Id ())
1395
1411
  {
1396
1412
  var fieldId = this .result [1];
1397
1413
 
1398
1414
  this .comments ();
1399
-
1415
+
1400
1416
  if (Grammar .IS .parse (this))
1401
1417
  {
1402
1418
  if (this .isInsideProtoDefinition ())
@@ -1404,20 +1420,20 @@ function ($,
1404
1420
  if (this .Id ())
1405
1421
  {
1406
1422
  var isId = this .result [1];
1407
-
1423
+
1408
1424
  try
1409
1425
  {
1410
- var reference = this .getExecutionContext () .getField (isId);
1426
+ var reference = this .getPrototype () .getField (isId);
1411
1427
  }
1412
1428
  catch (error)
1413
1429
  {
1414
- this .exception ("No such event or field '" + isId + "' inside PROTO " + this .getExecutionContext () .getName () + " interface declaration.");
1415
-
1430
+ this .exception ("No such event or field '" + isId + "' inside PROTO " + this .getPrototype () .getName () + " interface declaration.");
1431
+
1416
1432
  return true;
1417
1433
  }
1418
-
1434
+
1419
1435
  var supportedField = this [fieldType];
1420
-
1436
+
1421
1437
  if (supportedField .getType () === reference .getType ())
1422
1438
  {
1423
1439
  if (reference .isReference (accessType))
@@ -1425,44 +1441,30 @@ function ($,
1425
1441
  try
1426
1442
  {
1427
1443
  var field = baseNode .getField (fieldId);
1428
-
1429
- if (reference .getType () === field .getType ())
1444
+
1445
+ if (! (accessType === field .getAccessType () && reference .getType () === field .getType ()))
1430
1446
  {
1431
- if (accessType === field .getAccessType ())
1432
- ;
1433
- else if (field .getAccessType () === X3DConstants .inputOutput)
1434
- {
1435
- if (accessType !== field .getAccessType ())
1436
- field = this .createUserDefinedField (baseNode, accessType, fieldId, supportedField);
1437
- }
1438
- else
1439
- {
1440
- this .exception ("Field '" + fieldId + "' must have access type " + accessTypeToString (field .getAccessType ()) + ".");
1441
-
1442
- return true;
1443
- }
1444
- }
1445
- else
1446
1447
  field = this .createUserDefinedField (baseNode, accessType, fieldId, supportedField);
1448
+ }
1447
1449
  }
1448
1450
  catch (error)
1449
1451
  {
1450
1452
  var field = this .createUserDefinedField (baseNode, accessType, fieldId, supportedField);
1451
1453
  }
1452
-
1454
+
1453
1455
  field .addReference (reference);
1454
1456
  return true;
1455
1457
  }
1456
-
1457
- throw new Error ("Field '" + fieldId + "' and '" + reference .getName () + "' in PROTO '" + this .getExecutionContext () .getName () + "' are incompatible as an IS mapping.");
1458
+
1459
+ throw new Error ("Field '" + fieldId + "' and '" + reference .getName () + "' in PROTO '" + this .getPrototype () .getName () + "' are incompatible as an IS mapping.");
1458
1460
  }
1459
-
1460
- throw new Error ("Field '" + fieldId + "' and '" + reference .getName () + "' in PROTO '" + this .getExecutionContext () .getName () + "' have different types.");
1461
+
1462
+ throw new Error ("Field '" + fieldId + "' and '" + reference .getName () + "' in PROTO '" + this .getPrototype () .getName () + "' have different types.");
1461
1463
  }
1462
-
1464
+
1463
1465
  throw new Error ("No name give after IS statement.");
1464
1466
  }
1465
-
1467
+
1466
1468
  throw new Error ("IS statement outside PROTO definition.");
1467
1469
  }
1468
1470
  }
@@ -1470,14 +1472,14 @@ function ($,
1470
1472
  }
1471
1473
  }
1472
1474
 
1473
- // this .lastIndex = lastIndex;
1474
- // this .lineNumber = lineNumber;
1475
-
1476
- this .input = input;
1475
+ this .lastIndex = lastIndex;
1477
1476
  this .lineNumber = lineNumber;
1478
1477
 
1478
+ // this .input = input;
1479
+ // this .lineNumber = lineNumber;
1480
+
1479
1481
  var field = this .interfaceDeclaration ();
1480
-
1482
+
1481
1483
  if (field)
1482
1484
  {
1483
1485
  try
@@ -1485,13 +1487,12 @@ function ($,
1485
1487
  if (field .getAccessType () === X3DConstants .inputOutput)
1486
1488
  {
1487
1489
  var existingField = baseNode .getField (field .getName ());
1488
-
1490
+
1489
1491
  if (existingField .getAccessType () === X3DConstants .inputOutput)
1490
1492
  {
1491
1493
  if (field .getType () === existingField .getType ())
1492
1494
  {
1493
- existingField .set (field .getValue ());
1494
- existingField .setSet (true);
1495
+ existingField .setValue (field);
1495
1496
  return true;
1496
1497
  }
1497
1498
  }
@@ -1503,7 +1504,7 @@ function ($,
1503
1504
  baseNode .addUserDefinedField (field .getAccessType (), field .getName (), field);
1504
1505
  return true;
1505
1506
  }
1506
-
1507
+
1507
1508
  return this .nodeBodyElement (baseNode);
1508
1509
  },
1509
1510
  createUserDefinedField: function (baseNode, accessType, fieldId, supportedField)
@@ -1523,10 +1524,10 @@ function ($,
1523
1524
  {
1524
1525
  if (this .protoStatement ())
1525
1526
  return true;
1526
-
1527
+
1527
1528
  if (this .routeStatement ())
1528
1529
  return true;
1529
-
1530
+
1530
1531
  if (this .Id ())
1531
1532
  {
1532
1533
  var fieldId = this .result [1];
@@ -1539,9 +1540,9 @@ function ($,
1539
1540
  {
1540
1541
  throw new Error ("Unknown field '" + fieldId + "' in class '" + baseNode .getTypeName () + "'.");
1541
1542
  }
1542
-
1543
+
1543
1544
  this .comments ();
1544
-
1545
+
1545
1546
  if (Grammar .IS .parse (this))
1546
1547
  {
1547
1548
  if (this .isInsideProtoDefinition ())
@@ -1549,18 +1550,18 @@ function ($,
1549
1550
  if (this .Id ())
1550
1551
  {
1551
1552
  var isId = this .result [1];
1552
-
1553
+
1553
1554
  try
1554
1555
  {
1555
- var reference = this .getExecutionContext () .getField (isId);
1556
+ var reference = this .getPrototype () .getField (isId);
1556
1557
  }
1557
1558
  catch (error)
1558
1559
  {
1559
- this .exception ("No such event or field '" + isId + "' inside PROTO " + this .getExecutionContext () .getName ());
1560
-
1560
+ this .exception ("No such event or field '" + isId + "' inside PROTO " + this .getPrototype () .getName ());
1561
+
1561
1562
  return true;
1562
1563
  }
1563
-
1564
+
1564
1565
  if (field .getType () === reference .getType ())
1565
1566
  {
1566
1567
  if (reference .isReference (field .getAccessType ()))
@@ -1568,19 +1569,19 @@ function ($,
1568
1569
  field .addReference (reference);
1569
1570
  return true;
1570
1571
  }
1571
-
1572
- throw new Error ("Field '" + field .getName () + "' and '" + reference .getName () + "' in PROTO " + this .getExecutionContext () . getName () + " are incompatible as an IS mapping.");
1572
+
1573
+ throw new Error ("Field '" + field .getName () + "' and '" + reference .getName () + "' in PROTO " + this .getPrototype () . getName () + " are incompatible as an IS mapping.");
1573
1574
  }
1574
-
1575
- throw new Error ("Field '" + field .getName () + "' and '" + reference .getName () + "' in PROTO " + this .getExecutionContext () .getName () + " have different types.");
1575
+
1576
+ throw new Error ("Field '" + field .getName () + "' and '" + reference .getName () + "' in PROTO " + this .getPrototype () .getName () + " have different types.");
1576
1577
  }
1577
-
1578
+
1578
1579
  throw new Error("No name give after IS statement.");
1579
1580
  }
1580
-
1581
+
1581
1582
  throw new Error ("IS statement outside PROTO definition.");
1582
1583
  }
1583
-
1584
+
1584
1585
  if (field .isInitializable ())
1585
1586
  {
1586
1587
  if (this .fieldValue (field))
@@ -1588,10 +1589,10 @@ function ($,
1588
1589
 
1589
1590
  throw new Error ("Couldn't read value for field '" + fieldId + "'.");
1590
1591
  }
1591
-
1592
+
1592
1593
  throw new Error ("Couldn't assign value to " + accessTypeToString (field .getAccessType ()) + " field '" + fieldId + "'.");
1593
1594
  }
1594
-
1595
+
1595
1596
  return false;
1596
1597
  },
1597
1598
  profileNameId: function () { return this .Id (); },
@@ -1624,14 +1625,12 @@ function ($,
1624
1625
  },
1625
1626
  fieldValue: function (field)
1626
1627
  {
1627
- field .setSet (true);
1628
-
1629
1628
  return this .fieldTypes [field .getType ()] .call (this, field);
1630
1629
  },
1631
1630
  double: function ()
1632
1631
  {
1633
1632
  this .comments ();
1634
-
1633
+
1635
1634
  if (Grammar .double .parse (this))
1636
1635
  {
1637
1636
  this .value = parseFloat (this .result [1]);
@@ -1678,8 +1677,7 @@ function ($,
1678
1677
  {
1679
1678
  this .value = Fields .SFString .unescape (this .result [1]);
1680
1679
 
1681
- if (!this .isXML)
1682
- this .lines (this .value);
1680
+ this .lines (this .value);
1683
1681
 
1684
1682
  return true;
1685
1683
  }
@@ -1690,30 +1688,15 @@ function ($,
1690
1688
  {
1691
1689
  this .comments ();
1692
1690
 
1693
- if (this .isXML)
1694
- {
1695
- if (Grammar .true .parse (this))
1696
- {
1697
- field .set (true);
1698
- return true;
1699
- }
1700
-
1701
- if (Grammar .false .parse (this))
1702
- {
1703
- field .set (false);
1704
- return true;
1705
- }
1706
- }
1707
-
1708
1691
  if (Grammar .TRUE .parse (this))
1709
1692
  {
1710
- field .set (true);
1693
+ field .setValue (true);
1711
1694
  return true;
1712
1695
  }
1713
1696
 
1714
1697
  if (Grammar .FALSE .parse (this))
1715
1698
  {
1716
- field .set (false);
1699
+ field .setValue (false);
1717
1700
  return true;
1718
1701
  }
1719
1702
 
@@ -1727,7 +1710,7 @@ function ($,
1727
1710
  {
1728
1711
  field .push (this .SFBool);
1729
1712
  return true;
1730
- }
1713
+ }
1731
1714
 
1732
1715
  if (Grammar .OpenBracket .parse (this))
1733
1716
  {
@@ -1746,16 +1729,11 @@ function ($,
1746
1729
  sfboolValues: function (field)
1747
1730
  {
1748
1731
  field .length = 0;
1732
+ field = field .getTarget ();
1749
1733
 
1750
- var
1751
- array = field .getValue (),
1752
- value = new Fields .SFBool ();
1753
-
1754
- while (this .sfboolValue (value))
1734
+ while (this .sfboolValue (this .SFBool))
1755
1735
  {
1756
- value .addParent (field);
1757
- array .push (value);
1758
- value = new Fields .SFBool ();
1736
+ field .push (this .SFBool);
1759
1737
  }
1760
1738
  },
1761
1739
  sfcolorValue: function (field)
@@ -1763,16 +1741,19 @@ function ($,
1763
1741
  if (this .double ())
1764
1742
  {
1765
1743
  var r = this .value;
1766
-
1744
+
1767
1745
  if (this .double ())
1768
1746
  {
1769
1747
  var g = this .value;
1770
-
1748
+
1771
1749
  if (this .double ())
1772
1750
  {
1773
1751
  var b = this .value;
1774
1752
 
1775
- field .getValue () .set (r, g, b);
1753
+ field .r = r;
1754
+ field .g = g;
1755
+ field .b = b;
1756
+
1776
1757
  return true;
1777
1758
  }
1778
1759
  }
@@ -1788,7 +1769,7 @@ function ($,
1788
1769
  {
1789
1770
  field .push (this .SFColor);
1790
1771
  return true;
1791
- }
1772
+ }
1792
1773
 
1793
1774
  if (Grammar .OpenBracket .parse (this))
1794
1775
  {
@@ -1807,16 +1788,11 @@ function ($,
1807
1788
  sfcolorValues: function (field)
1808
1789
  {
1809
1790
  field .length = 0;
1791
+ field = field .getTarget ();
1810
1792
 
1811
- var
1812
- array = field .getValue (),
1813
- value = new Fields .SFColor ();
1814
-
1815
- while (this .sfcolorValue (value))
1793
+ while (this .sfcolorValue (this .SFColor))
1816
1794
  {
1817
- value .addParent (field);
1818
- array .push (value);
1819
- value = new Fields .SFColor ();
1795
+ field .push (this .SFColor);
1820
1796
  }
1821
1797
  },
1822
1798
  sfcolorrgbaValue: function (field)
@@ -1824,11 +1800,11 @@ function ($,
1824
1800
  if (this .double ())
1825
1801
  {
1826
1802
  var r = this .value;
1827
-
1803
+
1828
1804
  if (this .double ())
1829
1805
  {
1830
1806
  var g = this .value;
1831
-
1807
+
1832
1808
  if (this .double ())
1833
1809
  {
1834
1810
  var b = this .value;
@@ -1837,7 +1813,11 @@ function ($,
1837
1813
  {
1838
1814
  var a = this .value;
1839
1815
 
1840
- field .getValue () .set (r, g, b, a);
1816
+ field .r = r;
1817
+ field .g = g;
1818
+ field .b = b;
1819
+ field .a = a;
1820
+
1841
1821
  return true;
1842
1822
  }
1843
1823
  }
@@ -1854,7 +1834,7 @@ function ($,
1854
1834
  {
1855
1835
  field .push (this .SFColorRGBA);
1856
1836
  return true;
1857
- }
1837
+ }
1858
1838
 
1859
1839
  if (Grammar .OpenBracket .parse (this))
1860
1840
  {
@@ -1873,23 +1853,18 @@ function ($,
1873
1853
  sfcolorrgbaValues: function (field)
1874
1854
  {
1875
1855
  field .length = 0;
1856
+ field = field .getTarget ();
1876
1857
 
1877
- var
1878
- array = field .getValue (),
1879
- value = new Fields .SFColorRGBA ();
1880
-
1881
- while (this .sfcolorrgbaValue (value))
1858
+ while (this .sfcolorrgbaValue (this .SFColorRGBA))
1882
1859
  {
1883
- value .addParent (field);
1884
- array .push (value);
1885
- value = new Fields .SFColorRGBA ();
1860
+ field .push (this .SFColorRGBA);
1886
1861
  }
1887
1862
  },
1888
1863
  sfdoubleValue: function (field)
1889
1864
  {
1890
1865
  if (this .double ())
1891
1866
  {
1892
- field .set (this .value);
1867
+ field .setValue (this .fromUnit (field .getUnit (), this .value));
1893
1868
  return true;
1894
1869
  }
1895
1870
 
@@ -1899,11 +1874,13 @@ function ($,
1899
1874
  {
1900
1875
  field .length = 0;
1901
1876
 
1877
+ this .SFDouble .setUnit (field .getUnit ());
1878
+
1902
1879
  if (this .sfdoubleValue (this .SFDouble))
1903
1880
  {
1904
1881
  field .push (this .SFDouble);
1905
1882
  return true;
1906
- }
1883
+ }
1907
1884
 
1908
1885
  if (Grammar .OpenBracket .parse (this))
1909
1886
  {
@@ -1922,16 +1899,13 @@ function ($,
1922
1899
  sfdoubleValues: function (field)
1923
1900
  {
1924
1901
  field .length = 0;
1902
+ field = field .getTarget ();
1925
1903
 
1926
- var
1927
- array = field .getValue (),
1928
- value = new Fields .SFDouble ();
1904
+ this .SFDouble .setUnit (field .getUnit ());
1929
1905
 
1930
- while (this .sfdoubleValue (value))
1906
+ while (this .sfdoubleValue (this .SFDouble))
1931
1907
  {
1932
- value .addParent (field);
1933
- array .push (value);
1934
- value = new Fields .SFDouble ();
1908
+ field .push (this .SFDouble);
1935
1909
  }
1936
1910
  },
1937
1911
  sffloatValue: function (field)
@@ -1942,11 +1916,13 @@ function ($,
1942
1916
  {
1943
1917
  field .length = 0;
1944
1918
 
1919
+ this .SFFloat .setUnit (field .getUnit ());
1920
+
1945
1921
  if (this .sffloatValue (this .SFFloat))
1946
1922
  {
1947
1923
  field .push (this .SFFloat);
1948
1924
  return true;
1949
- }
1925
+ }
1950
1926
 
1951
1927
  if (Grammar .OpenBracket .parse (this))
1952
1928
  {
@@ -1965,16 +1941,13 @@ function ($,
1965
1941
  sffloatValues: function (field)
1966
1942
  {
1967
1943
  field .length = 0;
1944
+ field = field .getTarget ();
1968
1945
 
1969
- var
1970
- array = field .getValue (),
1971
- value = new Fields .SFFloat ();
1946
+ this .SFFloat .setUnit (field .getUnit ());
1972
1947
 
1973
- while (this .sffloatValue (value))
1948
+ while (this .sffloatValue (this .SFFloat))
1974
1949
  {
1975
- value .addParent (field);
1976
- array .push (value);
1977
- value = new Fields .SFFloat ();
1950
+ field .push (this .SFFloat);
1978
1951
  }
1979
1952
  },
1980
1953
  sfimageValue: function (field)
@@ -1986,26 +1959,30 @@ function ($,
1986
1959
  if (this .int32 ())
1987
1960
  {
1988
1961
  var height = this .value;
1989
-
1962
+
1990
1963
  if (this .int32 ())
1991
1964
  {
1992
1965
  var
1993
1966
  comp = this .value,
1994
- array = [ ],
1995
1967
  size = width * height;
1996
1968
 
1969
+ field .width = width;
1970
+ field .height = height;
1971
+ field .comp = comp;
1972
+
1973
+ var array = field .array;
1974
+
1997
1975
  for (var i = 0; i < size; ++ i)
1998
1976
  {
1999
1977
  if (this .int32 ())
2000
1978
  {
2001
- array .push (this .value);
1979
+ array [i] = this .value;
2002
1980
  continue;
2003
1981
  }
2004
1982
 
2005
1983
  return false;
2006
1984
  }
2007
1985
 
2008
- field .getValue () .set (width, height, comp, array);
2009
1986
  return true;
2010
1987
  }
2011
1988
  }
@@ -2021,7 +1998,7 @@ function ($,
2021
1998
  {
2022
1999
  field .push (this .SFImage);
2023
2000
  return true;
2024
- }
2001
+ }
2025
2002
 
2026
2003
  if (Grammar .OpenBracket .parse (this))
2027
2004
  {
@@ -2040,23 +2017,18 @@ function ($,
2040
2017
  sfimageValues: function (field)
2041
2018
  {
2042
2019
  field .length = 0;
2020
+ field = field .getTarget ();
2043
2021
 
2044
- var
2045
- array = field .getValue (),
2046
- value = new Fields .SFImage ();
2047
-
2048
- while (this .sfimageValue (value))
2022
+ while (this .sfimageValue (this .SFImage))
2049
2023
  {
2050
- value .addParent (field);
2051
- array .push (value);
2052
- value = new Fields .SFImage ();
2024
+ field .push (this .SFImage);
2053
2025
  }
2054
2026
  },
2055
2027
  sfint32Value: function (field)
2056
2028
  {
2057
2029
  if (this .int32 ())
2058
2030
  {
2059
- field .set (this .value);
2031
+ field .setValue (this .value);
2060
2032
  return true;
2061
2033
  }
2062
2034
 
@@ -2070,7 +2042,7 @@ function ($,
2070
2042
  {
2071
2043
  field .push (this .SFInt32);
2072
2044
  return true;
2073
- }
2045
+ }
2074
2046
 
2075
2047
  if (Grammar .OpenBracket .parse (this))
2076
2048
  {
@@ -2089,28 +2061,23 @@ function ($,
2089
2061
  sfint32Values: function (field)
2090
2062
  {
2091
2063
  field .length = 0;
2064
+ field = field .getTarget ();
2092
2065
 
2093
- var
2094
- array = field .getValue (),
2095
- value = new Fields .SFInt32 ();
2096
-
2097
- while (this .sfint32Value (value))
2066
+ while (this .sfint32Value (this .SFInt32))
2098
2067
  {
2099
- value .addParent (field);
2100
- array .push (value);
2101
- value = new Fields .SFInt32 ();
2068
+ field .push (this .SFInt32);
2102
2069
  }
2103
- },
2070
+ },
2104
2071
  sfmatrix3dValue: function (field)
2105
2072
  {
2106
2073
  if (this .double ())
2107
2074
  {
2108
2075
  var m00 = this .value;
2109
-
2076
+
2110
2077
  if (this .double ())
2111
2078
  {
2112
2079
  var m01 = this .value;
2113
-
2080
+
2114
2081
  if (this .double ())
2115
2082
  {
2116
2083
  var m02 = this .value;
@@ -2118,11 +2085,11 @@ function ($,
2118
2085
  if (this .double ())
2119
2086
  {
2120
2087
  var m10 = this .value;
2121
-
2088
+
2122
2089
  if (this .double ())
2123
2090
  {
2124
2091
  var m11 = this .value;
2125
-
2092
+
2126
2093
  if (this .double ())
2127
2094
  {
2128
2095
  var m12 = this .value;
@@ -2130,18 +2097,25 @@ function ($,
2130
2097
  if (this .double ())
2131
2098
  {
2132
2099
  var m20 = this .value;
2133
-
2100
+
2134
2101
  if (this .double ())
2135
2102
  {
2136
2103
  var m21 = this .value;
2137
-
2104
+
2138
2105
  if (this .double ())
2139
2106
  {
2140
2107
  var m22 = this .value;
2141
2108
 
2142
- field .getValue () .set (m00, m01, m02,
2143
- m10, m11, m12,
2144
- m20, m21, m22);
2109
+ field [0] = m00;
2110
+ field [1] = m01;
2111
+ field [2] = m02;
2112
+ field [3] = m10;
2113
+ field [4] = m11;
2114
+ field [5] = m12;
2115
+ field [6] = m20;
2116
+ field [7] = m21;
2117
+ field [8] = m22;
2118
+
2145
2119
  return true;
2146
2120
  }
2147
2121
  }
@@ -2151,8 +2125,8 @@ function ($,
2151
2125
  }
2152
2126
  }
2153
2127
  }
2154
- }
2155
-
2128
+ }
2129
+
2156
2130
  return false;
2157
2131
  },
2158
2132
  mfmatrix3dValue: function (field)
@@ -2163,7 +2137,7 @@ function ($,
2163
2137
  {
2164
2138
  field .push (this .SFMatrix3d);
2165
2139
  return true;
2166
- }
2140
+ }
2167
2141
 
2168
2142
  if (Grammar .OpenBracket .parse (this))
2169
2143
  {
@@ -2182,16 +2156,11 @@ function ($,
2182
2156
  sfmatrix3dValues: function (field)
2183
2157
  {
2184
2158
  field .length = 0;
2159
+ field = field .getTarget ();
2185
2160
 
2186
- var
2187
- array = field .getValue (),
2188
- value = new Fields .SFMatrix3d ();
2189
-
2190
- while (this .sfmatrix3dValue (value))
2161
+ while (this .sfmatrix3dValue (this .SFMatrix3d))
2191
2162
  {
2192
- value .addParent (field);
2193
- array .push (value);
2194
- value = new Fields .SFMatrix3d ();
2163
+ field .push (this .SFMatrix3d);
2195
2164
  }
2196
2165
  },
2197
2166
  sfmatrix3fValue: function (field)
@@ -2206,7 +2175,7 @@ function ($,
2206
2175
  {
2207
2176
  field .push (this .SFMatrix3f);
2208
2177
  return true;
2209
- }
2178
+ }
2210
2179
 
2211
2180
  if (Grammar .OpenBracket .parse (this))
2212
2181
  {
@@ -2225,16 +2194,11 @@ function ($,
2225
2194
  sfmatrix3fValues: function (field)
2226
2195
  {
2227
2196
  field .length = 0;
2197
+ field = field .getTarget ();
2228
2198
 
2229
- var
2230
- array = field .getValue (),
2231
- value = new Fields .SFMatrix3f ();
2232
-
2233
- while (this .sfmatrix3fValue (value))
2199
+ while (this .sfmatrix3fValue (this .SFMatrix3f))
2234
2200
  {
2235
- value .addParent (field);
2236
- array .push (value);
2237
- value = new Fields .SFMatrix3f ();
2201
+ field .push (this .SFMatrix3f);
2238
2202
  }
2239
2203
  },
2240
2204
  sfmatrix4dValue: function (field)
@@ -2242,11 +2206,11 @@ function ($,
2242
2206
  if (this .double ())
2243
2207
  {
2244
2208
  var m00 = this .value;
2245
-
2209
+
2246
2210
  if (this .double ())
2247
2211
  {
2248
2212
  var m01 = this .value;
2249
-
2213
+
2250
2214
  if (this .double ())
2251
2215
  {
2252
2216
  var m02 = this .value;
@@ -2258,11 +2222,11 @@ function ($,
2258
2222
  if (this .double ())
2259
2223
  {
2260
2224
  var m10 = this .value;
2261
-
2225
+
2262
2226
  if (this .double ())
2263
2227
  {
2264
2228
  var m11 = this .value;
2265
-
2229
+
2266
2230
  if (this .double ())
2267
2231
  {
2268
2232
  var m12 = this .value;
@@ -2274,11 +2238,11 @@ function ($,
2274
2238
  if (this .double ())
2275
2239
  {
2276
2240
  var m20 = this .value;
2277
-
2241
+
2278
2242
  if (this .double ())
2279
2243
  {
2280
2244
  var m21 = this .value;
2281
-
2245
+
2282
2246
  if (this .double ())
2283
2247
  {
2284
2248
  var m22 = this .value;
@@ -2290,11 +2254,11 @@ function ($,
2290
2254
  if (this .double ())
2291
2255
  {
2292
2256
  var m30 = this .value;
2293
-
2257
+
2294
2258
  if (this .double ())
2295
2259
  {
2296
2260
  var m31 = this .value;
2297
-
2261
+
2298
2262
  if (this .double ())
2299
2263
  {
2300
2264
  var m32 = this .value;
@@ -2303,10 +2267,23 @@ function ($,
2303
2267
  {
2304
2268
  var m33 = this .value;
2305
2269
 
2306
- field .getValue () .set (m00, m01, m02, m03,
2307
- m10, m11, m12, m13,
2308
- m20, m21, m22, m23,
2309
- m30, m31, m32, m33);
2270
+ field [ 0] = m00;
2271
+ field [ 1] = m01;
2272
+ field [ 2] = m02;
2273
+ field [ 3] = m03;
2274
+ field [ 4] = m10;
2275
+ field [ 5] = m11;
2276
+ field [ 6] = m12;
2277
+ field [ 7] = m13;
2278
+ field [ 8] = m20;
2279
+ field [ 9] = m21;
2280
+ field [10] = m22;
2281
+ field [11] = m23;
2282
+ field [12] = m30;
2283
+ field [13] = m31;
2284
+ field [14] = m32;
2285
+ field [15] = m33;
2286
+
2310
2287
  return true;
2311
2288
  }
2312
2289
  }
@@ -2323,8 +2300,8 @@ function ($,
2323
2300
  }
2324
2301
  }
2325
2302
  }
2326
- }
2327
-
2303
+ }
2304
+
2328
2305
  return false;
2329
2306
  },
2330
2307
  mfmatrix4dValue: function (field)
@@ -2335,7 +2312,7 @@ function ($,
2335
2312
  {
2336
2313
  field .push (this .SFMatrix4d);
2337
2314
  return true;
2338
- }
2315
+ }
2339
2316
 
2340
2317
  if (Grammar .OpenBracket .parse (this))
2341
2318
  {
@@ -2354,16 +2331,11 @@ function ($,
2354
2331
  sfmatrix4dValues: function (field)
2355
2332
  {
2356
2333
  field .length = 0;
2334
+ field = field .getTarget ();
2357
2335
 
2358
- var
2359
- array = field .getValue (),
2360
- value = new Fields .SFMatrix4d ();
2361
-
2362
- while (this .sfmatrix4dValue (value))
2336
+ while (this .sfmatrix4dValue (this .SFMatrix4d))
2363
2337
  {
2364
- value .addParent (field);
2365
- array .push (value);
2366
- value = new Fields .SFMatrix4d ();
2338
+ field .push (this .SFMatrix4d);
2367
2339
  }
2368
2340
  },
2369
2341
  sfmatrix4fValue: function (field)
@@ -2378,7 +2350,7 @@ function ($,
2378
2350
  {
2379
2351
  field .push (this .SFMatrix4f);
2380
2352
  return true;
2381
- }
2353
+ }
2382
2354
 
2383
2355
  if (Grammar .OpenBracket .parse (this))
2384
2356
  {
@@ -2397,16 +2369,11 @@ function ($,
2397
2369
  sfmatrix4fValues: function (field)
2398
2370
  {
2399
2371
  field .length = 0;
2372
+ field = field .getTarget ();
2400
2373
 
2401
- var
2402
- array = field .getValue (),
2403
- value = new Fields .SFMatrix4f ();
2404
-
2405
- while (this .sfmatrix4fValue (value))
2374
+ while (this .sfmatrix4fValue (this .SFMatrix4f))
2406
2375
  {
2407
- value .addParent (field);
2408
- array .push (value);
2409
- value = new Fields .SFMatrix4f ();
2376
+ field .push (this .SFMatrix4f);
2410
2377
  }
2411
2378
  },
2412
2379
  sfnodeValue: function (field)
@@ -2431,7 +2398,7 @@ function ($,
2431
2398
  {
2432
2399
  field .push (node);
2433
2400
  return true;
2434
- }
2401
+ }
2435
2402
 
2436
2403
  if (Grammar .OpenBracket .parse (this))
2437
2404
  {
@@ -2450,11 +2417,11 @@ function ($,
2450
2417
  nodeStatements: function (field)
2451
2418
  {
2452
2419
  var node = this .nodeStatement ();
2453
-
2420
+
2454
2421
  while (node !== false)
2455
2422
  {
2456
2423
  field .push (node);
2457
-
2424
+
2458
2425
  node = this .nodeStatement ();
2459
2426
  }
2460
2427
  },
@@ -2463,11 +2430,11 @@ function ($,
2463
2430
  if (this .double ())
2464
2431
  {
2465
2432
  var x = this .value;
2466
-
2433
+
2467
2434
  if (this .double ())
2468
2435
  {
2469
2436
  var y = this .value;
2470
-
2437
+
2471
2438
  if (this .double ())
2472
2439
  {
2473
2440
  var z = this .value;
@@ -2476,7 +2443,11 @@ function ($,
2476
2443
  {
2477
2444
  var angle = this .value;
2478
2445
 
2479
- field .getValue () .set (x, y, z, angle);
2446
+ field .x = x;
2447
+ field .y = y;
2448
+ field .z = z;
2449
+ field .angle = this .fromUnit ("angle", angle);
2450
+
2480
2451
  return true;
2481
2452
  }
2482
2453
  }
@@ -2493,7 +2464,7 @@ function ($,
2493
2464
  {
2494
2465
  field .push (this .SFRotation);
2495
2466
  return true;
2496
- }
2467
+ }
2497
2468
 
2498
2469
  if (Grammar .OpenBracket .parse (this))
2499
2470
  {
@@ -2512,23 +2483,18 @@ function ($,
2512
2483
  sfrotationValues: function (field)
2513
2484
  {
2514
2485
  field .length = 0;
2486
+ field = field .getTarget ();
2515
2487
 
2516
- var
2517
- array = field .getValue (),
2518
- value = new Fields .SFRotation ();
2519
-
2520
- while (this .sfrotationValue (value))
2488
+ while (this .sfrotationValue (this .SFRotation))
2521
2489
  {
2522
- value .addParent (field);
2523
- array .push (value);
2524
- value = new Fields .SFRotation ();
2490
+ field .push (this .SFRotation);
2525
2491
  }
2526
2492
  },
2527
2493
  sfstringValue: function (field)
2528
2494
  {
2529
2495
  if (this .string ())
2530
2496
  {
2531
- field .set (this .value);
2497
+ field .setValue (this .value);
2532
2498
  return true;
2533
2499
  }
2534
2500
 
@@ -2542,7 +2508,7 @@ function ($,
2542
2508
  {
2543
2509
  field .push (this .SFString);
2544
2510
  return true;
2545
- }
2511
+ }
2546
2512
 
2547
2513
  if (Grammar .OpenBracket .parse (this))
2548
2514
  {
@@ -2561,16 +2527,11 @@ function ($,
2561
2527
  sfstringValues: function (field)
2562
2528
  {
2563
2529
  field .length = 0;
2530
+ field = field .getTarget ();
2564
2531
 
2565
- var
2566
- array = field .getValue (),
2567
- value = new Fields .SFString ();
2568
-
2569
- while (this .sfstringValue (value))
2532
+ while (this .sfstringValue (this .SFString))
2570
2533
  {
2571
- value .addParent (field);
2572
- array .push (value);
2573
- value = new Fields .SFString ();
2534
+ field .push (this .SFString);
2574
2535
  }
2575
2536
  },
2576
2537
  sftimeValue: function (field)
@@ -2585,7 +2546,7 @@ function ($,
2585
2546
  {
2586
2547
  field .push (this .SFTime);
2587
2548
  return true;
2588
- }
2549
+ }
2589
2550
 
2590
2551
  if (Grammar .OpenBracket .parse (this))
2591
2552
  {
@@ -2604,16 +2565,11 @@ function ($,
2604
2565
  sftimeValues: function (field)
2605
2566
  {
2606
2567
  field .length = 0;
2568
+ field = field .getTarget ();
2607
2569
 
2608
- var
2609
- array = field .getValue (),
2610
- value = new Fields .SFTime ();
2611
-
2612
- while (this .sftimeValue (value))
2570
+ while (this .sftimeValue (this .SFTime))
2613
2571
  {
2614
- value .addParent (field);
2615
- array .push (value);
2616
- value = new Fields .SFTime ();
2572
+ field .push (this .SFTime);
2617
2573
  }
2618
2574
  },
2619
2575
  sfvec2dValue: function (field)
@@ -2621,12 +2577,16 @@ function ($,
2621
2577
  if (this .double ())
2622
2578
  {
2623
2579
  var x = this .value;
2624
-
2580
+
2625
2581
  if (this .double ())
2626
2582
  {
2627
- var y = this .value;
2628
-
2629
- field .getValue () .set (x, y);
2583
+ var
2584
+ y = this .value,
2585
+ category = field .getUnit ();
2586
+
2587
+ field .x = this .fromUnit (category, x);
2588
+ field .y = this .fromUnit (category, y);
2589
+
2630
2590
  return true;
2631
2591
  }
2632
2592
  }
@@ -2637,11 +2597,13 @@ function ($,
2637
2597
  {
2638
2598
  field .length = 0;
2639
2599
 
2600
+ this .SFVec2d .setUnit (field .getUnit ());
2601
+
2640
2602
  if (this .sfvec2dValue (this .SFVec2d))
2641
2603
  {
2642
2604
  field .push (this .SFVec2d);
2643
2605
  return true;
2644
- }
2606
+ }
2645
2607
 
2646
2608
  if (Grammar .OpenBracket .parse (this))
2647
2609
  {
@@ -2660,16 +2622,13 @@ function ($,
2660
2622
  sfvec2dValues: function (field)
2661
2623
  {
2662
2624
  field .length = 0;
2625
+ field = field .getTarget ();
2663
2626
 
2664
- var
2665
- array = field .getValue (),
2666
- value = new Fields .SFVec2d ();
2627
+ this .SFVec2d .setUnit (field .getUnit ());
2667
2628
 
2668
- while (this .sfvec2dValue (value))
2629
+ while (this .sfvec2dValue (this .SFVec2d))
2669
2630
  {
2670
- value .addParent (field);
2671
- array .push (value);
2672
- value = new Fields .SFVec2d ();
2631
+ field .push (this .SFVec2d);
2673
2632
  }
2674
2633
  },
2675
2634
  sfvec2fValue: function (field)
@@ -2680,11 +2639,13 @@ function ($,
2680
2639
  {
2681
2640
  field .length = 0;
2682
2641
 
2642
+ this .SFVec2f .setUnit (field .getUnit ());
2643
+
2683
2644
  if (this .sfvec2fValue (this .SFVec2f))
2684
2645
  {
2685
2646
  field .push (this .SFVec2f);
2686
2647
  return true;
2687
- }
2648
+ }
2688
2649
 
2689
2650
  if (Grammar .OpenBracket .parse (this))
2690
2651
  {
@@ -2703,16 +2664,13 @@ function ($,
2703
2664
  sfvec2fValues: function (field)
2704
2665
  {
2705
2666
  field .length = 0;
2667
+ field = field .getTarget ();
2706
2668
 
2707
- var
2708
- array = field .getValue (),
2709
- value = new Fields .SFVec2f ();
2669
+ this .SFVec2f .setUnit (field .getUnit ());
2710
2670
 
2711
- while (this .sfvec2fValue (value))
2671
+ while (this .sfvec2fValue (this .SFVec2f))
2712
2672
  {
2713
- value .addParent (field);
2714
- array .push (value);
2715
- value = new Fields .SFVec2f ();
2673
+ field .push (this .SFVec2f);
2716
2674
  }
2717
2675
  },
2718
2676
  sfvec3dValue: function (field)
@@ -2720,16 +2678,21 @@ function ($,
2720
2678
  if (this .double ())
2721
2679
  {
2722
2680
  var x = this .value;
2723
-
2681
+
2724
2682
  if (this .double ())
2725
2683
  {
2726
2684
  var y = this .value;
2727
-
2685
+
2728
2686
  if (this .double ())
2729
2687
  {
2730
- var z = this .value;
2688
+ var
2689
+ z = this .value,
2690
+ category = field .getUnit ();
2691
+
2692
+ field .x = this .fromUnit (category, x);
2693
+ field .y = this .fromUnit (category, y);
2694
+ field .z = this .fromUnit (category, z);
2731
2695
 
2732
- field .getValue () .set (x, y, z);
2733
2696
  return true;
2734
2697
  }
2735
2698
  }
@@ -2741,11 +2704,13 @@ function ($,
2741
2704
  {
2742
2705
  field .length = 0;
2743
2706
 
2707
+ this .SFVec3d .setUnit (field .getUnit ());
2708
+
2744
2709
  if (this .sfvec3dValue (this .SFVec3d))
2745
2710
  {
2746
2711
  field .push (this .SFVec3d);
2747
2712
  return true;
2748
- }
2713
+ }
2749
2714
 
2750
2715
  if (Grammar .OpenBracket .parse (this))
2751
2716
  {
@@ -2764,16 +2729,13 @@ function ($,
2764
2729
  sfvec3dValues: function (field)
2765
2730
  {
2766
2731
  field .length = 0;
2732
+ field = field .getTarget ();
2767
2733
 
2768
- var
2769
- array = field .getValue (),
2770
- value = new Fields .SFVec3d ();
2734
+ this .SFVec3d .setUnit (field .getUnit ());
2771
2735
 
2772
- while (this .sfvec3dValue (value))
2736
+ while (this .sfvec3dValue (this .SFVec3d))
2773
2737
  {
2774
- value .addParent (field);
2775
- array .push (value);
2776
- value = new Fields .SFVec3d ();
2738
+ field .push (this .SFVec3d);
2777
2739
  }
2778
2740
  },
2779
2741
  sfvec3fValue: function (field)
@@ -2784,11 +2746,13 @@ function ($,
2784
2746
  {
2785
2747
  field .length = 0;
2786
2748
 
2749
+ this .SFVec3f .setUnit (field .getUnit ());
2750
+
2787
2751
  if (this .sfvec3fValue (this .SFVec3f))
2788
2752
  {
2789
2753
  field .push (this .SFVec3f);
2790
2754
  return true;
2791
- }
2755
+ }
2792
2756
 
2793
2757
  if (Grammar .OpenBracket .parse (this))
2794
2758
  {
@@ -2807,16 +2771,13 @@ function ($,
2807
2771
  sfvec3fValues: function (field)
2808
2772
  {
2809
2773
  field .length = 0;
2774
+ field = field .getTarget ();
2810
2775
 
2811
- var
2812
- array = field .getValue (),
2813
- value = new Fields .SFVec3f ();
2776
+ this .SFVec3f .setUnit (field .getUnit ());
2814
2777
 
2815
- while (this .sfvec3fValue (value))
2778
+ while (this .sfvec3fValue (this .SFVec3f))
2816
2779
  {
2817
- value .addParent (field);
2818
- array .push (value);
2819
- value = new Fields .SFVec3f ();
2780
+ field .push (this .SFVec3f);
2820
2781
  }
2821
2782
  },
2822
2783
  sfvec4dValue: function (field)
@@ -2824,20 +2785,26 @@ function ($,
2824
2785
  if (this .double ())
2825
2786
  {
2826
2787
  var x = this .value;
2827
-
2788
+
2828
2789
  if (this .double ())
2829
2790
  {
2830
2791
  var y = this .value;
2831
-
2792
+
2832
2793
  if (this .double ())
2833
2794
  {
2834
2795
  var z = this .value;
2835
2796
 
2836
2797
  if (this .double ())
2837
2798
  {
2838
- var w = this .value;
2799
+ var
2800
+ w = this .value,
2801
+ category = field .getUnit ();
2802
+
2803
+ field .x = this .fromUnit (category, x);
2804
+ field .y = this .fromUnit (category, y);
2805
+ field .z = this .fromUnit (category, z);
2806
+ field .w = this .fromUnit (category, w);
2839
2807
 
2840
- field .getValue () .set (x, y, z, w);
2841
2808
  return true;
2842
2809
  }
2843
2810
  }
@@ -2850,11 +2817,13 @@ function ($,
2850
2817
  {
2851
2818
  field .length = 0;
2852
2819
 
2820
+ this .SFVec4d .setUnit (field .getUnit ());
2821
+
2853
2822
  if (this .sfvec4dValue (this .SFVec4d))
2854
2823
  {
2855
2824
  field .push (this .SFVec4d);
2856
2825
  return true;
2857
- }
2826
+ }
2858
2827
 
2859
2828
  if (Grammar .OpenBracket .parse (this))
2860
2829
  {
@@ -2873,16 +2842,13 @@ function ($,
2873
2842
  sfvec4dValues: function (field)
2874
2843
  {
2875
2844
  field .length = 0;
2845
+ field = field .getTarget ();
2876
2846
 
2877
- var
2878
- array = field .getValue (),
2879
- value = new Fields .SFVec4d ();
2847
+ this .SFVec4d .setUnit (field .getUnit ());
2880
2848
 
2881
- while (this .sfvec4dValue (value))
2849
+ while (this .sfvec4dValue (this .SFVec4d))
2882
2850
  {
2883
- value .addParent (field);
2884
- array .push (value);
2885
- value = new Fields .SFVec4d ();
2851
+ field .push (this .SFVec4d);
2886
2852
  }
2887
2853
  },
2888
2854
  sfvec4fValue: function (field)
@@ -2893,11 +2859,13 @@ function ($,
2893
2859
  {
2894
2860
  field .length = 0;
2895
2861
 
2862
+ this .SFVec4f .setUnit (field .getUnit ());
2863
+
2896
2864
  if (this .sfvec4fValue (this .SFVec4f))
2897
2865
  {
2898
2866
  field .push (this .SFVec4f);
2899
2867
  return true;
2900
- }
2868
+ }
2901
2869
 
2902
2870
  if (Grammar .OpenBracket .parse (this))
2903
2871
  {
@@ -2916,19 +2884,16 @@ function ($,
2916
2884
  sfvec4fValues: function (field)
2917
2885
  {
2918
2886
  field .length = 0;
2887
+ field = field .getTarget ();
2919
2888
 
2920
- var
2921
- array = field .getValue (),
2922
- value = new Fields .SFVec4f ();
2889
+ this .SFVec4f .setUnit (field .getUnit ());
2923
2890
 
2924
- while (this .sfvec4fValue (value))
2891
+ while (this .sfvec4fValue (this .SFVec4f))
2925
2892
  {
2926
- value .addParent (field);
2927
- array .push (value);
2928
- value = new Fields .SFVec4f ();
2893
+ field .push (this .SFVec4f);
2929
2894
  }
2930
2895
  },
2931
- };
2896
+ });
2932
2897
 
2933
2898
  Parser .prototype .fieldTypes = [ ];
2934
2899
  Parser .prototype .fieldTypes [X3DConstants .SFBool] = Parser .prototype .sfboolValue;
@@ -2938,8 +2903,8 @@ function ($,
2938
2903
  Parser .prototype .fieldTypes [X3DConstants .SFFloat] = Parser .prototype .sffloatValue;
2939
2904
  Parser .prototype .fieldTypes [X3DConstants .SFImage] = Parser .prototype .sfimageValue;
2940
2905
  Parser .prototype .fieldTypes [X3DConstants .SFInt32] = Parser .prototype .sfint32Value;
2941
- Parser .prototype .fieldTypes [X3DConstants .SFMatrix3f] = Parser .prototype .sfmatrix4dValue;
2942
- Parser .prototype .fieldTypes [X3DConstants .SFMatrix3d] = Parser .prototype .sfmatrix4fValue;
2906
+ Parser .prototype .fieldTypes [X3DConstants .SFMatrix3f] = Parser .prototype .sfmatrix3dValue;
2907
+ Parser .prototype .fieldTypes [X3DConstants .SFMatrix3d] = Parser .prototype .sfmatrix3fValue;
2943
2908
  Parser .prototype .fieldTypes [X3DConstants .SFMatrix4f] = Parser .prototype .sfmatrix4dValue;
2944
2909
  Parser .prototype .fieldTypes [X3DConstants .SFMatrix4d] = Parser .prototype .sfmatrix4fValue;
2945
2910
  Parser .prototype .fieldTypes [X3DConstants .SFNode] = Parser .prototype .sfnodeValue;