x_ite 4.7.12 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (759) hide show
  1. package/.vscode/settings.json +9 -2
  2. package/Makefile +27 -24
  3. package/build/bin/version-number.pl +1 -1
  4. package/build/bin/version.pl +3 -3
  5. package/build/parts/default.start.frag.js +2 -2
  6. package/build/parts/x_ite.end.frag.js +1 -2
  7. package/build/parts/x_ite.start.frag.js +4 -7
  8. package/dist/assets/components/annotation.js +312 -312
  9. package/dist/assets/components/annotation.min.js +1 -1
  10. package/dist/assets/components/cad-geometry.js +536 -538
  11. package/dist/assets/components/cad-geometry.min.js +1 -1
  12. package/dist/assets/components/cube-map-texturing.js +797 -796
  13. package/dist/assets/components/cube-map-texturing.min.js +1 -1
  14. package/dist/assets/components/dis.js +487 -472
  15. package/dist/assets/components/dis.min.js +1 -1
  16. package/dist/assets/components/event-utilities.js +486 -505
  17. package/dist/assets/components/event-utilities.min.js +1 -1
  18. package/dist/assets/components/geometry2d.js +1221 -1271
  19. package/dist/assets/components/geometry2d.min.js +1 -1
  20. package/dist/assets/components/geospatial.js +2657 -2653
  21. package/dist/assets/components/geospatial.min.js +1 -2
  22. package/dist/assets/components/h-anim.js +640 -640
  23. package/dist/assets/components/h-anim.min.js +1 -1
  24. package/dist/assets/components/key-device-sensor.js +547 -549
  25. package/dist/assets/components/key-device-sensor.min.js +1 -1
  26. package/dist/assets/components/layout.js +1435 -1433
  27. package/dist/assets/components/layout.min.js +1 -1
  28. package/dist/assets/components/nurbs.js +3942 -3964
  29. package/dist/assets/components/nurbs.min.js +1 -2
  30. package/dist/assets/components/particle-systems.js +3227 -3238
  31. package/dist/assets/components/particle-systems.min.js +1 -2
  32. package/dist/assets/components/picking.js +1704 -1712
  33. package/dist/assets/components/picking.min.js +1 -1
  34. package/dist/assets/components/projective-texture-mapping.js +553 -553
  35. package/dist/assets/components/projective-texture-mapping.min.js +1 -1
  36. package/dist/assets/components/rigid-body-physics.js +3255 -3265
  37. package/dist/assets/components/rigid-body-physics.min.js +1 -59
  38. package/dist/assets/components/scripting.js +544 -549
  39. package/dist/assets/components/scripting.min.js +1 -1
  40. package/dist/assets/components/texturing-3d.js +2716 -2651
  41. package/dist/assets/components/texturing-3d.min.js +131 -48
  42. package/dist/assets/components/volume-rendering.js +2815 -2804
  43. package/dist/assets/components/volume-rendering.min.js +1 -3
  44. package/dist/assets/components/x_ite.js +142 -144
  45. package/dist/assets/components/x_ite.min.js +1 -1
  46. package/dist/assets/shaders/webgl1/Gouraud.fs +52 -15
  47. package/dist/assets/shaders/webgl1/Gouraud.vs +8 -9
  48. package/dist/assets/shaders/webgl1/{Wireframe.fs → Line.fs} +0 -0
  49. package/dist/assets/shaders/webgl1/{Wireframe.vs → Line.vs} +1 -1
  50. package/dist/assets/shaders/webgl1/PBR.fs +785 -0
  51. package/dist/assets/shaders/webgl1/PBR.vs +37 -0
  52. package/dist/assets/shaders/webgl1/Phong.fs +204 -32
  53. package/dist/assets/shaders/webgl1/Phong.vs +2 -3
  54. package/dist/assets/shaders/webgl1/{PointSet.fs → Point.fs} +59 -33
  55. package/dist/assets/shaders/webgl1/{PointSet.vs → Point.vs} +2 -2
  56. package/dist/assets/shaders/webgl1/Unlit.fs +73 -18
  57. package/dist/assets/shaders/webgl1/Unlit.vs +2 -3
  58. package/dist/assets/shaders/webgl2/Gouraud.fs +31 -19
  59. package/dist/assets/shaders/webgl2/Gouraud.vs +8 -9
  60. package/dist/assets/shaders/webgl2/{Wireframe.fs → Line.fs} +0 -0
  61. package/dist/assets/shaders/webgl2/{Wireframe.vs → Line.vs} +1 -1
  62. package/dist/assets/shaders/webgl2/PBR.fs +913 -0
  63. package/dist/assets/shaders/webgl2/PBR.vs +37 -0
  64. package/dist/assets/shaders/webgl2/Phong.fs +196 -35
  65. package/dist/assets/shaders/webgl2/Phong.vs +2 -3
  66. package/dist/assets/shaders/webgl2/{PointSet.fs → Point.fs} +87 -86
  67. package/dist/assets/shaders/webgl2/{PointSet.vs → Point.vs} +2 -2
  68. package/dist/assets/shaders/webgl2/Unlit.fs +55 -22
  69. package/dist/assets/shaders/webgl2/Unlit.vs +2 -3
  70. package/dist/example.html +2 -2
  71. package/dist/x_ite.css +316 -328
  72. package/dist/x_ite.js +55663 -52034
  73. package/dist/x_ite.min.js +79 -41
  74. package/dist/x_ite.zip +0 -0
  75. package/docs/Custom-Shaders.md +4 -3
  76. package/docs/_config.yml +1 -1
  77. package/docs/index.md +60 -7
  78. package/package.json +20 -20
  79. package/src/assets/components/annotation.js +24 -24
  80. package/src/assets/components/cad-geometry.js +24 -25
  81. package/src/assets/components/cube-map-texturing.js +18 -19
  82. package/src/assets/components/dis.js +22 -23
  83. package/src/assets/components/event-utilities.js +28 -29
  84. package/src/assets/components/geometry2d.js +28 -29
  85. package/src/assets/components/geospatial.js +34 -35
  86. package/src/assets/components/h-anim.js +22 -22
  87. package/src/assets/components/key-device-sensor.js +18 -19
  88. package/src/assets/components/layout.js +24 -25
  89. package/src/assets/components/nurbs.js +44 -45
  90. package/src/assets/components/particle-systems.js +36 -37
  91. package/src/assets/components/picking.js +25 -25
  92. package/src/assets/components/projective-texture-mapping.js +16 -16
  93. package/src/assets/components/rigid-body-physics.js +48 -48
  94. package/src/assets/components/scripting.js +14 -15
  95. package/src/assets/components/texturing-3d.js +26 -27
  96. package/src/assets/components/volume-rendering.js +46 -46
  97. package/src/assets/components/x_ite.js +12 -12
  98. package/src/assets/shaders/Types.glsl +230 -51
  99. package/src/assets/shaders/webgl1/Background.fs +2 -2
  100. package/src/assets/shaders/webgl1/Background.vs +4 -4
  101. package/src/assets/shaders/webgl1/Depth.fs +2 -2
  102. package/src/assets/shaders/webgl1/Depth.vs +3 -3
  103. package/src/assets/shaders/webgl1/Fallback.fs +15 -15
  104. package/src/assets/shaders/webgl1/Fallback.vs +5 -5
  105. package/src/assets/shaders/webgl1/FallbackUnlit.fs +4 -4
  106. package/src/assets/shaders/webgl1/FallbackUnlit.vs +3 -3
  107. package/src/assets/shaders/webgl1/Gouraud.fs +14 -14
  108. package/src/assets/shaders/webgl1/Gouraud.vs +54 -69
  109. package/src/assets/shaders/webgl1/Line.fs +74 -0
  110. package/src/assets/shaders/webgl1/Line.vs +63 -0
  111. package/src/assets/shaders/webgl1/PBR.fs +364 -0
  112. package/src/assets/shaders/webgl1/PBR.vs +46 -0
  113. package/src/assets/shaders/webgl1/Phong.fs +207 -84
  114. package/src/assets/shaders/webgl1/Phong.vs +17 -18
  115. package/src/assets/shaders/webgl1/Point.fs +88 -0
  116. package/src/assets/shaders/webgl1/Point.vs +70 -0
  117. package/src/assets/shaders/webgl1/Unlit.fs +53 -28
  118. package/src/assets/shaders/webgl1/Unlit.vs +17 -18
  119. package/src/assets/shaders/webgl1/include/ClipPlanes.glsl +7 -7
  120. package/src/assets/shaders/webgl1/include/Colors.glsl +27 -0
  121. package/src/assets/shaders/webgl1/include/Fog.glsl +17 -17
  122. package/src/assets/shaders/webgl1/include/Hatch.glsl +8 -8
  123. package/src/assets/shaders/webgl1/include/Normal.glsl +44 -0
  124. package/src/assets/shaders/webgl1/include/Pack.glsl +11 -11
  125. package/src/assets/shaders/webgl1/include/Perlin.glsl +19 -19
  126. package/src/assets/shaders/webgl1/include/Shadow.glsl +212 -212
  127. package/src/assets/shaders/webgl1/include/SpotFactor.glsl +12 -0
  128. package/src/assets/shaders/webgl1/include/Texture.glsl +444 -393
  129. package/src/assets/shaders/webgl2/Background.fs +2 -2
  130. package/src/assets/shaders/webgl2/Background.vs +4 -4
  131. package/src/assets/shaders/webgl2/Depth.fs +2 -2
  132. package/src/assets/shaders/webgl2/Depth.vs +3 -3
  133. package/src/assets/shaders/webgl2/Gouraud.fs +14 -14
  134. package/src/assets/shaders/webgl2/Gouraud.vs +54 -69
  135. package/src/assets/shaders/webgl2/Line.fs +73 -0
  136. package/src/assets/shaders/webgl2/Line.vs +64 -0
  137. package/src/assets/shaders/webgl2/PBR.fs +370 -0
  138. package/src/assets/shaders/webgl2/PBR.vs +48 -0
  139. package/src/assets/shaders/webgl2/Phong.fs +219 -84
  140. package/src/assets/shaders/webgl2/Phong.vs +17 -18
  141. package/src/assets/shaders/webgl2/Point.fs +87 -0
  142. package/src/assets/shaders/webgl2/Point.vs +71 -0
  143. package/src/assets/shaders/webgl2/Unlit.fs +56 -28
  144. package/src/assets/shaders/webgl2/Unlit.vs +17 -18
  145. package/src/assets/shaders/webgl2/include/ClipPlanes.glsl +7 -7
  146. package/src/assets/shaders/webgl2/include/Colors.glsl +27 -0
  147. package/src/assets/shaders/webgl2/include/Fog.glsl +34 -34
  148. package/src/assets/shaders/webgl2/include/Hatch.glsl +8 -8
  149. package/src/assets/shaders/webgl2/include/Normal.glsl +46 -0
  150. package/src/assets/shaders/webgl2/include/Pack.glsl +11 -11
  151. package/src/assets/shaders/webgl2/include/Perlin.glsl +19 -20
  152. package/src/assets/shaders/webgl2/include/Shadow.glsl +226 -226
  153. package/src/assets/shaders/webgl2/include/SpotFactor.glsl +12 -0
  154. package/src/assets/shaders/webgl2/include/Texture.glsl +557 -537
  155. package/src/bookmarks.js +92 -92
  156. package/src/examples.js +147 -147
  157. package/src/lib/ammojs/AmmoJS.js +2 -2
  158. package/src/lib/ammojs/Makefile +14 -15
  159. package/src/lib/jquery.fullscreen-min.js +2 -2
  160. package/src/lib/nurbs/extras/sample.js +215 -215
  161. package/src/lib/nurbs/nurbs.js +326 -326
  162. package/src/lib/nurbs/src/evaluate.js +405 -405
  163. package/src/lib/nurbs/src/numerical-derivative.js +48 -48
  164. package/src/lib/nurbs/src/support.js +143 -143
  165. package/src/lib/nurbs/src/transform.js +70 -70
  166. package/src/lib/nurbs/src/utils/accessor-preamble.js +23 -23
  167. package/src/lib/nurbs/src/utils/bisection-search.js +18 -18
  168. package/src/lib/nurbs/src/utils/cache-key.js +49 -50
  169. package/src/lib/nurbs/src/utils/create-accessors.js +101 -101
  170. package/src/lib/nurbs/src/utils/infer-type.js +43 -43
  171. package/src/lib/nurbs/src/utils/is-array-like.js +5 -5
  172. package/src/lib/nurbs/src/utils/is-ndarray-like.js +11 -11
  173. package/src/lib/nurbs/src/utils/is-ndarray.js +13 -13
  174. package/src/lib/nurbs/src/utils/ndloop.js +18 -18
  175. package/src/lib/nurbs/src/utils/size-getter.js +15 -15
  176. package/src/lib/nurbs/src/utils/variable.js +25 -25
  177. package/src/lib/opentype.js/bin/ot +27 -27
  178. package/src/lib/opentype.js/dist/opentype.js +5 -5
  179. package/src/lib/opentype.js/font-inspector.html +1 -1
  180. package/src/lib/opentype.js/site.css +1 -3
  181. package/src/locale/gettext.js +73 -73
  182. package/src/spinner.css +40 -43
  183. package/src/standard/Geospatial/Geodetic.js +195 -195
  184. package/src/standard/Geospatial/ReferenceEllipsoids.js +43 -43
  185. package/src/standard/Geospatial/UniversalTransverseMercator.js +159 -159
  186. package/src/standard/Math/Algorithm.js +199 -187
  187. package/src/standard/Math/Algorithms/Bezier.js +80 -80
  188. package/src/standard/Math/Algorithms/MergeSort.js +49 -49
  189. package/src/standard/Math/Algorithms/PartialSort.js +36 -36
  190. package/src/standard/Math/Algorithms/QuickSort.js +51 -51
  191. package/src/standard/Math/Algorithms/SAT.js +62 -62
  192. package/src/standard/Math/Algorithms/eigendecomposition.js +141 -141
  193. package/src/standard/Math/Geometry/Box2.js +205 -205
  194. package/src/standard/Math/Geometry/Box3.js +624 -624
  195. package/src/standard/Math/Geometry/Camera.js +68 -68
  196. package/src/standard/Math/Geometry/Cylinder3.js +112 -112
  197. package/src/standard/Math/Geometry/Line3.js +188 -153
  198. package/src/standard/Math/Geometry/Plane3.js +120 -120
  199. package/src/standard/Math/Geometry/Sphere3.js +148 -148
  200. package/src/standard/Math/Geometry/Spheroid3.js +38 -38
  201. package/src/standard/Math/Geometry/Triangle2.js +19 -19
  202. package/src/standard/Math/Geometry/Triangle3.js +148 -148
  203. package/src/standard/Math/Geometry/ViewVolume.js +359 -359
  204. package/src/standard/Math/Numbers/Color3.js +219 -214
  205. package/src/standard/Math/Numbers/Color4.js +148 -142
  206. package/src/standard/Math/Numbers/Complex.js +139 -139
  207. package/src/standard/Math/Numbers/Matrix2.js +193 -193
  208. package/src/standard/Math/Numbers/Matrix3.js +679 -679
  209. package/src/standard/Math/Numbers/Matrix4.js +883 -883
  210. package/src/standard/Math/Numbers/Quaternion.js +496 -496
  211. package/src/standard/Math/Numbers/Rotation4.js +421 -415
  212. package/src/standard/Math/Numbers/Vector2.js +220 -220
  213. package/src/standard/Math/Numbers/Vector3.js +280 -280
  214. package/src/standard/Math/Numbers/Vector4.js +296 -296
  215. package/src/standard/Math/Utility/BVH.js +303 -303
  216. package/src/standard/Math/Utility/MatrixStack.js +64 -64
  217. package/src/standard/Networking/BinaryTransport.js +67 -67
  218. package/src/standard/Time/MicroTime.js +22 -22
  219. package/src/standard/Utility/DataStorage.js +85 -81
  220. package/src/standard/Utility/MapUtilities.js +14 -1
  221. package/src/standard/Utility/ObjectCache.js +24 -24
  222. package/src/standard/Utility/Shuffle.js +13 -13
  223. package/src/tests.js +355 -384
  224. package/src/x_ite/Base/Events.js +64 -55
  225. package/src/x_ite/{Basic/X3DArrayField.js → Base/FieldArray.js} +19 -12
  226. package/src/x_ite/Base/FieldDefinitionArray.js +75 -0
  227. package/src/x_ite/{Basic/FieldDefinitionArray.js → Base/X3DArrayField.js} +35 -59
  228. package/src/x_ite/Base/X3DBaseNode.js +588 -0
  229. package/src/x_ite/{Bits → Base}/X3DCast.js +23 -22
  230. package/src/x_ite/Base/X3DChildObject.js +68 -62
  231. package/src/x_ite/{Bits → Base}/X3DConstants.js +85 -85
  232. package/src/x_ite/Base/X3DEventObject.js +73 -68
  233. package/src/x_ite/Base/X3DField.js +450 -0
  234. package/src/x_ite/Base/X3DFieldDefinition.js +78 -0
  235. package/src/x_ite/Base/X3DInfoArray.js +291 -0
  236. package/src/x_ite/Base/X3DObject.js +152 -109
  237. package/src/x_ite/Base/X3DObjectArrayField.js +573 -0
  238. package/src/x_ite/Base/X3DTypedArrayField.js +866 -0
  239. package/src/x_ite/Browser/Core/BrowserOptions.js +376 -394
  240. package/src/x_ite/Browser/Core/BrowserProperties.js +38 -38
  241. package/src/x_ite/Browser/Core/BrowserTimings.js +173 -172
  242. package/src/x_ite/Browser/Core/ContextMenu.js +547 -551
  243. package/src/x_ite/Browser/Core/Notification.js +57 -56
  244. package/src/x_ite/Browser/Core/PrimitiveQuality.js +8 -8
  245. package/src/x_ite/Browser/Core/RenderingProperties.js +55 -55
  246. package/src/x_ite/Browser/Core/Shading.js +10 -10
  247. package/src/x_ite/Browser/Core/TextureQuality.js +8 -8
  248. package/src/x_ite/Browser/Core/X3DCoreContext.js +746 -724
  249. package/src/x_ite/Browser/EnvironmentalEffects/X3DEnvironmentalEffectsContext.js +33 -25
  250. package/src/x_ite/Browser/Followers/X3DArrayChaserTemplate.js +23 -23
  251. package/src/x_ite/Browser/Followers/X3DArrayFollowerTemplate.js +127 -127
  252. package/src/x_ite/Browser/Geometry2D/Arc2DOptions.js +25 -25
  253. package/src/x_ite/Browser/Geometry2D/ArcClose2DOptions.js +25 -25
  254. package/src/x_ite/Browser/Geometry2D/Circle2DOptions.js +56 -55
  255. package/src/x_ite/Browser/Geometry2D/Disk2DOptions.js +116 -116
  256. package/src/x_ite/Browser/Geometry2D/Rectangle2DOptions.js +59 -59
  257. package/src/x_ite/Browser/Geometry2D/X3DGeometry2DContext.js +80 -77
  258. package/src/x_ite/Browser/Geometry3D/BoxOptions.js +70 -70
  259. package/src/x_ite/Browser/Geometry3D/ConeOptions.js +26 -26
  260. package/src/x_ite/Browser/Geometry3D/CylinderOptions.js +27 -27
  261. package/src/x_ite/Browser/Geometry3D/IcoSphere.js +357 -357
  262. package/src/x_ite/Browser/Geometry3D/IcoSphereOptions.js +61 -61
  263. package/src/x_ite/Browser/Geometry3D/QuadSphereOptions.js +243 -241
  264. package/src/x_ite/Browser/Geometry3D/X3DGeometry3DContext.js +37 -34
  265. package/src/x_ite/Browser/Geospatial/Geocentric.js +27 -27
  266. package/src/x_ite/Browser/Geospatial/Geospatial.js +157 -156
  267. package/src/x_ite/Browser/Grouping/X3DGroupingContext.js +38 -33
  268. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator.js +128 -130
  269. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator1.js +39 -41
  270. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator2.js +3 -3
  271. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolator3.js +3 -3
  272. package/src/x_ite/Browser/Interpolation/CatmullRomSplineInterpolatorTemplate.js +54 -56
  273. package/src/x_ite/Browser/Interpolation/SquatInterpolator.js +54 -56
  274. package/src/x_ite/Browser/KeyDeviceSensor/X3DKeyDeviceSensorContext.js +44 -41
  275. package/src/x_ite/Browser/Layering/X3DLayeringContext.js +20 -18
  276. package/src/x_ite/Browser/Layout/ScreenText.js +406 -405
  277. package/src/x_ite/Browser/Layout/X3DLayoutContext.js +36 -30
  278. package/src/x_ite/Browser/Lighting/X3DLightingContext.js +54 -50
  279. package/src/x_ite/Browser/NURBS/NURBS.js +417 -417
  280. package/src/x_ite/Browser/Navigation/ExamineViewer.js +753 -753
  281. package/src/x_ite/Browser/Navigation/FlyViewer.js +39 -39
  282. package/src/x_ite/Browser/Navigation/LookAtViewer.js +461 -461
  283. package/src/x_ite/Browser/Navigation/NoneViewer.js +18 -18
  284. package/src/x_ite/Browser/Navigation/PlaneViewer.js +193 -193
  285. package/src/x_ite/Browser/Navigation/WalkViewer.js +61 -61
  286. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +709 -710
  287. package/src/x_ite/Browser/Navigation/X3DNavigationContext.js +188 -182
  288. package/src/x_ite/Browser/Navigation/X3DViewer.js +160 -160
  289. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +152 -143
  290. package/src/x_ite/Browser/Networking/urls.js +31 -31
  291. package/src/x_ite/Browser/ParticleSystems/X3DParticleSystemsContext.js +17 -13
  292. package/src/x_ite/Browser/Picking/IntersectionType.js +7 -7
  293. package/src/x_ite/Browser/Picking/MatchCriterion.js +8 -8
  294. package/src/x_ite/Browser/Picking/SortOrder.js +9 -9
  295. package/src/x_ite/Browser/Picking/VolumePicker.js +138 -138
  296. package/src/x_ite/Browser/Picking/X3DPickingContext.js +80 -69
  297. package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +208 -209
  298. package/src/x_ite/Browser/PointingDeviceSensor/PointingDeviceSensorContainer.js +34 -34
  299. package/src/x_ite/Browser/PointingDeviceSensor/X3DPointingDeviceSensorContext.js +269 -263
  300. package/src/x_ite/Browser/Rendering/X3DRenderingContext.js +132 -119
  301. package/src/x_ite/Browser/RigidBodyPhysics/AppliedParametersType.js +14 -14
  302. package/src/x_ite/Browser/Scripting/X3DScriptingContext.js +20 -19
  303. package/src/x_ite/Browser/Scripting/evaluate.js +7 -7
  304. package/src/x_ite/Browser/Shaders/Shader.js +152 -159
  305. package/src/x_ite/Browser/Shaders/ShaderSource.js +81 -63
  306. package/src/x_ite/Browser/Shaders/ShaderTest.js +97 -98
  307. package/src/x_ite/Browser/Shaders/X3DShadersContext.js +256 -249
  308. package/src/x_ite/Browser/Shape/AlphaMode.js +9 -9
  309. package/src/x_ite/Browser/Shape/X3DShapeContext.js +111 -89
  310. package/src/x_ite/Browser/Sound/X3DSoundContext.js +11 -11
  311. package/src/x_ite/Browser/Text/PolygonText.js +319 -319
  312. package/src/x_ite/Browser/Text/TextAlignment.js +9 -9
  313. package/src/x_ite/Browser/Text/X3DTextContext.js +72 -65
  314. package/src/x_ite/Browser/Text/X3DTextGeometry.js +506 -506
  315. package/src/x_ite/Browser/Texturing/MultiTextureFunctionType.js +8 -8
  316. package/src/x_ite/Browser/Texturing/MultiTextureModeType.js +25 -25
  317. package/src/x_ite/Browser/Texturing/MultiTextureSourceType.js +9 -9
  318. package/src/x_ite/Browser/Texturing/TextureCoordinateGeneratorModeType.js +17 -17
  319. package/src/x_ite/Browser/Texturing/X3DTexturingContext.js +259 -224
  320. package/src/x_ite/Browser/Texturing3D/DICOMParser.js +1066 -1066
  321. package/src/x_ite/Browser/Texturing3D/NRRDParser.js +641 -630
  322. package/src/x_ite/Browser/Time/X3DTimeContext.js +54 -37
  323. package/src/x_ite/Browser/VERSION.js +1 -1
  324. package/src/x_ite/Browser/VolumeRendering/VolumeStyle.fs +55 -55
  325. package/src/x_ite/Browser/VolumeRendering/VolumeStyle.vs +5 -5
  326. package/src/x_ite/Browser/VolumeRendering/X3DVolumeRenderingContext.js +52 -41
  327. package/src/x_ite/Browser/X3DBrowser.js +819 -755
  328. package/src/x_ite/Browser/X3DBrowserContext.js +253 -220
  329. package/src/x_ite/Components/Annotation/AnnotationLayer.js +43 -43
  330. package/src/x_ite/Components/Annotation/AnnotationTarget.js +38 -38
  331. package/src/x_ite/Components/Annotation/GroupAnnotation.js +48 -48
  332. package/src/x_ite/Components/Annotation/IconAnnotation.js +46 -46
  333. package/src/x_ite/Components/Annotation/TextAnnotation.js +39 -39
  334. package/src/x_ite/Components/Annotation/URLAnnotation.js +38 -38
  335. package/src/x_ite/Components/Annotation/X3DAnnotationNode.js +16 -16
  336. package/src/x_ite/Components/CADGeometry/CADAssembly.js +41 -41
  337. package/src/x_ite/Components/CADGeometry/CADFace.js +189 -189
  338. package/src/x_ite/Components/CADGeometry/CADLayer.js +38 -38
  339. package/src/x_ite/Components/CADGeometry/CADPart.js +46 -46
  340. package/src/x_ite/Components/CADGeometry/IndexedQuadSet.js +67 -67
  341. package/src/x_ite/Components/CADGeometry/QuadSet.js +64 -63
  342. package/src/x_ite/Components/CADGeometry/X3DProductStructureChildNode.js +13 -15
  343. package/src/x_ite/Components/Core/MetadataBoolean.js +38 -40
  344. package/src/x_ite/Components/Core/MetadataDouble.js +38 -40
  345. package/src/x_ite/Components/Core/MetadataFloat.js +38 -40
  346. package/src/x_ite/Components/Core/MetadataInteger.js +38 -40
  347. package/src/x_ite/Components/Core/MetadataSet.js +38 -40
  348. package/src/x_ite/Components/Core/MetadataString.js +38 -40
  349. package/src/x_ite/Components/Core/WorldInfo.js +42 -42
  350. package/src/x_ite/Components/Core/X3DBindableNode.js +20 -20
  351. package/src/x_ite/Components/Core/X3DChildNode.js +38 -40
  352. package/src/x_ite/Components/Core/X3DInfoNode.js +13 -15
  353. package/src/x_ite/Components/Core/X3DMetadataObject.js +11 -13
  354. package/src/x_ite/Components/Core/X3DNode.js +795 -14
  355. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +585 -479
  356. package/src/x_ite/Components/Core/X3DSensorNode.js +13 -15
  357. package/src/x_ite/Components/Core.js +39 -39
  358. package/src/x_ite/Components/CubeMapTexturing/ComposedCubeMapTexture.js +193 -200
  359. package/src/x_ite/Components/CubeMapTexturing/GeneratedCubeMapTexture.js +209 -206
  360. package/src/x_ite/Components/CubeMapTexturing/ImageCubeMapTexture.js +213 -219
  361. package/src/x_ite/Components/CubeMapTexturing/X3DEnvironmentTextureNode.js +69 -60
  362. package/src/x_ite/Components/DIS/DISEntityManager.js +38 -40
  363. package/src/x_ite/Components/DIS/DISEntityTypeMapping.js +59 -41
  364. package/src/x_ite/Components/DIS/EspduTransform.js +128 -128
  365. package/src/x_ite/Components/DIS/ReceiverPdu.js +68 -68
  366. package/src/x_ite/Components/DIS/SignalPdu.js +68 -68
  367. package/src/x_ite/Components/DIS/TransmitterPdu.js +84 -84
  368. package/src/x_ite/Components/EnvironmentalEffects/Background.js +87 -89
  369. package/src/x_ite/Components/EnvironmentalEffects/Fog.js +59 -59
  370. package/src/x_ite/Components/EnvironmentalEffects/FogCoordinate.js +78 -78
  371. package/src/x_ite/Components/EnvironmentalEffects/LocalFog.js +56 -56
  372. package/src/x_ite/Components/EnvironmentalEffects/TextureBackground.js +86 -88
  373. package/src/x_ite/Components/EnvironmentalEffects/X3DBackgroundNode.js +582 -589
  374. package/src/x_ite/Components/EnvironmentalEffects/X3DFogObject.js +105 -105
  375. package/src/x_ite/Components/EnvironmentalEffects.js +25 -25
  376. package/src/x_ite/Components/EnvironmentalSensor/ProximitySensor.js +229 -229
  377. package/src/x_ite/Components/EnvironmentalSensor/TransformSensor.js +256 -256
  378. package/src/x_ite/Components/EnvironmentalSensor/VisibilitySensor.js +114 -114
  379. package/src/x_ite/Components/EnvironmentalSensor/X3DEnvironmentalSensorNode.js +71 -71
  380. package/src/x_ite/Components/EnvironmentalSensor.js +19 -19
  381. package/src/x_ite/Components/EventUtilities/BooleanFilter.js +50 -52
  382. package/src/x_ite/Components/EventUtilities/BooleanSequencer.js +50 -52
  383. package/src/x_ite/Components/EventUtilities/BooleanToggle.js +43 -45
  384. package/src/x_ite/Components/EventUtilities/BooleanTrigger.js +42 -44
  385. package/src/x_ite/Components/EventUtilities/IntegerSequencer.js +50 -52
  386. package/src/x_ite/Components/EventUtilities/IntegerTrigger.js +43 -45
  387. package/src/x_ite/Components/EventUtilities/TimeTrigger.js +43 -45
  388. package/src/x_ite/Components/EventUtilities/X3DSequencerNode.js +92 -94
  389. package/src/x_ite/Components/EventUtilities/X3DTriggerNode.js +13 -15
  390. package/src/x_ite/Components/Followers/ColorChaser.js +78 -78
  391. package/src/x_ite/Components/Followers/ColorDamper.js +78 -78
  392. package/src/x_ite/Components/Followers/CoordinateChaser.js +46 -46
  393. package/src/x_ite/Components/Followers/CoordinateDamper.js +48 -48
  394. package/src/x_ite/Components/Followers/OrientationChaser.js +64 -64
  395. package/src/x_ite/Components/Followers/OrientationDamper.js +61 -61
  396. package/src/x_ite/Components/Followers/PositionChaser.js +42 -42
  397. package/src/x_ite/Components/Followers/PositionChaser2D.js +42 -42
  398. package/src/x_ite/Components/Followers/PositionDamper.js +44 -44
  399. package/src/x_ite/Components/Followers/PositionDamper2D.js +44 -44
  400. package/src/x_ite/Components/Followers/ScalarChaser.js +70 -70
  401. package/src/x_ite/Components/Followers/ScalarDamper.js +60 -60
  402. package/src/x_ite/Components/Followers/TexCoordChaser2D.js +46 -46
  403. package/src/x_ite/Components/Followers/TexCoordDamper2D.js +48 -48
  404. package/src/x_ite/Components/Followers/X3DChaserNode.js +194 -194
  405. package/src/x_ite/Components/Followers/X3DDamperNode.js +120 -120
  406. package/src/x_ite/Components/Followers/X3DFollowerNode.js +83 -83
  407. package/src/x_ite/Components/Followers.js +45 -45
  408. package/src/x_ite/Components/Geometry2D/Arc2D.js +99 -113
  409. package/src/x_ite/Components/Geometry2D/ArcClose2D.js +164 -166
  410. package/src/x_ite/Components/Geometry2D/Circle2D.js +59 -67
  411. package/src/x_ite/Components/Geometry2D/Disk2D.js +207 -211
  412. package/src/x_ite/Components/Geometry2D/Polyline2D.js +43 -52
  413. package/src/x_ite/Components/Geometry2D/Polypoint2D.js +43 -60
  414. package/src/x_ite/Components/Geometry2D/Rectangle2D.js +76 -73
  415. package/src/x_ite/Components/Geometry2D/TriangleSet2D.js +69 -71
  416. package/src/x_ite/Components/Geometry3D/Box.js +90 -86
  417. package/src/x_ite/Components/Geometry3D/Cone.js +185 -187
  418. package/src/x_ite/Components/Geometry3D/Cylinder.js +246 -246
  419. package/src/x_ite/Components/Geometry3D/ElevationGrid.js +383 -384
  420. package/src/x_ite/Components/Geometry3D/Extrusion.js +653 -647
  421. package/src/x_ite/Components/Geometry3D/IndexedFaceSet.js +437 -445
  422. package/src/x_ite/Components/Geometry3D/Sphere.js +72 -74
  423. package/src/x_ite/Components/Geometry3D.js +25 -25
  424. package/src/x_ite/Components/Geospatial/GeoCoordinate.js +189 -191
  425. package/src/x_ite/Components/Geospatial/GeoElevationGrid.js +381 -383
  426. package/src/x_ite/Components/Geospatial/GeoLOD.js +397 -397
  427. package/src/x_ite/Components/Geospatial/GeoLocation.js +56 -56
  428. package/src/x_ite/Components/Geospatial/GeoMetadata.js +54 -36
  429. package/src/x_ite/Components/Geospatial/GeoOrigin.js +50 -52
  430. package/src/x_ite/Components/Geospatial/GeoPositionInterpolator.js +81 -83
  431. package/src/x_ite/Components/Geospatial/GeoProximitySensor.js +95 -97
  432. package/src/x_ite/Components/Geospatial/GeoTouchSensor.js +77 -79
  433. package/src/x_ite/Components/Geospatial/GeoTransform.js +79 -79
  434. package/src/x_ite/Components/Geospatial/GeoViewpoint.js +278 -278
  435. package/src/x_ite/Components/Geospatial/X3DGeospatialObject.js +216 -218
  436. package/src/x_ite/Components/Grouping/Group.js +37 -37
  437. package/src/x_ite/Components/Grouping/StaticGroup.js +245 -245
  438. package/src/x_ite/Components/Grouping/Switch.js +234 -234
  439. package/src/x_ite/Components/Grouping/Transform.js +42 -42
  440. package/src/x_ite/Components/Grouping/X3DBoundedObject.js +93 -93
  441. package/src/x_ite/Components/Grouping/X3DGroupingNode.js +654 -649
  442. package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +99 -99
  443. package/src/x_ite/Components/Grouping/X3DTransformNode.js +31 -31
  444. package/src/x_ite/Components/Grouping.js +27 -27
  445. package/src/x_ite/Components/HAnim/HAnimDisplacer.js +35 -35
  446. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +293 -293
  447. package/src/x_ite/Components/HAnim/HAnimJoint.js +137 -137
  448. package/src/x_ite/Components/HAnim/HAnimMotion.js +50 -50
  449. package/src/x_ite/Components/HAnim/HAnimSegment.js +44 -44
  450. package/src/x_ite/Components/HAnim/HAnimSite.js +43 -43
  451. package/src/x_ite/Components/Interpolation/ColorInterpolator.js +61 -63
  452. package/src/x_ite/Components/Interpolation/CoordinateInterpolator.js +60 -62
  453. package/src/x_ite/Components/Interpolation/CoordinateInterpolator2D.js +57 -59
  454. package/src/x_ite/Components/Interpolation/EaseInEaseOut.js +79 -80
  455. package/src/x_ite/Components/Interpolation/NormalInterpolator.js +96 -93
  456. package/src/x_ite/Components/Interpolation/OrientationInterpolator.js +70 -70
  457. package/src/x_ite/Components/Interpolation/PositionInterpolator.js +57 -59
  458. package/src/x_ite/Components/Interpolation/PositionInterpolator2D.js +57 -59
  459. package/src/x_ite/Components/Interpolation/ScalarInterpolator.js +53 -55
  460. package/src/x_ite/Components/Interpolation/SplinePositionInterpolator.js +78 -80
  461. package/src/x_ite/Components/Interpolation/SplinePositionInterpolator2D.js +77 -79
  462. package/src/x_ite/Components/Interpolation/SplineScalarInterpolator.js +78 -80
  463. package/src/x_ite/Components/Interpolation/SquadOrientationInterpolator.js +66 -66
  464. package/src/x_ite/Components/Interpolation/X3DInterpolatorNode.js +67 -69
  465. package/src/x_ite/Components/Interpolation.js +39 -39
  466. package/src/x_ite/Components/KeyDeviceSensor/KeySensor.js +304 -306
  467. package/src/x_ite/Components/KeyDeviceSensor/StringSensor.js +102 -104
  468. package/src/x_ite/Components/KeyDeviceSensor/X3DKeyDeviceSensorNode.js +51 -51
  469. package/src/x_ite/Components/Layering/Layer.js +50 -50
  470. package/src/x_ite/Components/Layering/LayerSet.js +160 -161
  471. package/src/x_ite/Components/Layering/Viewport.js +118 -118
  472. package/src/x_ite/Components/Layering/X3DLayerNode.js +322 -322
  473. package/src/x_ite/Components/Layering/X3DViewportNode.js +13 -13
  474. package/src/x_ite/Components/Layering.js +21 -21
  475. package/src/x_ite/Components/Layout/Layout.js +576 -578
  476. package/src/x_ite/Components/Layout/LayoutGroup.js +126 -126
  477. package/src/x_ite/Components/Layout/LayoutLayer.js +53 -53
  478. package/src/x_ite/Components/Layout/ScreenFontStyle.js +48 -48
  479. package/src/x_ite/Components/Layout/ScreenGroup.js +136 -136
  480. package/src/x_ite/Components/Layout/X3DLayoutNode.js +12 -14
  481. package/src/x_ite/Components/Lighting/DirectionalLight.js +239 -246
  482. package/src/x_ite/Components/Lighting/PointLight.js +296 -303
  483. package/src/x_ite/Components/Lighting/SpotLight.js +321 -316
  484. package/src/x_ite/Components/Lighting/X3DLightNode.js +153 -153
  485. package/src/x_ite/Components/Lighting.js +19 -19
  486. package/src/x_ite/Components/NURBS/Contour2D.js +81 -83
  487. package/src/x_ite/Components/NURBS/ContourPolyline2D.js +100 -102
  488. package/src/x_ite/Components/NURBS/CoordinateDouble.js +32 -34
  489. package/src/x_ite/Components/NURBS/NurbsCurve.js +167 -169
  490. package/src/x_ite/Components/NURBS/NurbsCurve2D.js +149 -149
  491. package/src/x_ite/Components/NURBS/NurbsOrientationInterpolator.js +166 -166
  492. package/src/x_ite/Components/NURBS/NurbsPatchSurface.js +45 -47
  493. package/src/x_ite/Components/NURBS/NurbsPositionInterpolator.js +154 -154
  494. package/src/x_ite/Components/NURBS/NurbsSet.js +125 -125
  495. package/src/x_ite/Components/NURBS/NurbsSurfaceInterpolator.js +128 -130
  496. package/src/x_ite/Components/NURBS/NurbsSweptSurface.js +120 -122
  497. package/src/x_ite/Components/NURBS/NurbsSwungSurface.js +120 -122
  498. package/src/x_ite/Components/NURBS/NurbsTextureCoordinate.js +93 -93
  499. package/src/x_ite/Components/NURBS/NurbsTrimmedSurface.js +88 -90
  500. package/src/x_ite/Components/NURBS/X3DNurbsControlCurveNode.js +13 -15
  501. package/src/x_ite/Components/NURBS/X3DNurbsSurfaceGeometryNode.js +339 -339
  502. package/src/x_ite/Components/NURBS/X3DParametricGeometryNode.js +18 -20
  503. package/src/x_ite/Components/Navigation/Billboard.js +132 -132
  504. package/src/x_ite/Components/Navigation/Collision.js +116 -116
  505. package/src/x_ite/Components/Navigation/LOD.js +308 -308
  506. package/src/x_ite/Components/Navigation/NavigationInfo.js +279 -285
  507. package/src/x_ite/Components/Navigation/OrthoViewpoint.js +258 -258
  508. package/src/x_ite/Components/Navigation/Viewpoint.js +137 -137
  509. package/src/x_ite/Components/Navigation/ViewpointGroup.js +169 -171
  510. package/src/x_ite/Components/Navigation/X3DViewpointNode.js +450 -453
  511. package/src/x_ite/Components/Navigation.js +27 -27
  512. package/src/x_ite/Components/Networking/Anchor.js +140 -128
  513. package/src/x_ite/Components/Networking/Inline.js +156 -197
  514. package/src/x_ite/Components/Networking/LoadSensor.js +193 -195
  515. package/src/x_ite/Components/Networking/X3DNetworkSensorNode.js +13 -15
  516. package/src/x_ite/Components/Networking/X3DUrlObject.js +170 -116
  517. package/src/x_ite/Components/Networking.js +21 -21
  518. package/src/x_ite/Components/ParticleSystems/BoundedPhysicsModel.js +62 -64
  519. package/src/x_ite/Components/ParticleSystems/ConeEmitter.js +81 -83
  520. package/src/x_ite/Components/ParticleSystems/ExplosionEmitter.js +59 -61
  521. package/src/x_ite/Components/ParticleSystems/ForcePhysicsModel.js +42 -44
  522. package/src/x_ite/Components/ParticleSystems/ParticleSystem.js +1433 -1433
  523. package/src/x_ite/Components/ParticleSystems/PointEmitter.js +77 -79
  524. package/src/x_ite/Components/ParticleSystems/PolylineEmitter.js +196 -196
  525. package/src/x_ite/Components/ParticleSystems/SurfaceEmitter.js +195 -195
  526. package/src/x_ite/Components/ParticleSystems/VolumeEmitter.js +250 -250
  527. package/src/x_ite/Components/ParticleSystems/WindPhysicsModel.js +69 -71
  528. package/src/x_ite/Components/ParticleSystems/X3DParticleEmitterNode.js +346 -346
  529. package/src/x_ite/Components/ParticleSystems/X3DParticlePhysicsModelNode.js +15 -17
  530. package/src/x_ite/Components/Picking/LinePickSensor.js +284 -286
  531. package/src/x_ite/Components/Picking/PickableGroup.js +155 -155
  532. package/src/x_ite/Components/Picking/PointPickSensor.js +272 -272
  533. package/src/x_ite/Components/Picking/PrimitivePickSensor.js +207 -209
  534. package/src/x_ite/Components/Picking/VolumePickSensor.js +182 -184
  535. package/src/x_ite/Components/Picking/X3DPickSensorNode.js +382 -382
  536. package/src/x_ite/Components/Picking/X3DPickableObject.js +28 -30
  537. package/src/x_ite/Components/PointingDeviceSensor/CylinderSensor.js +257 -259
  538. package/src/x_ite/Components/PointingDeviceSensor/PlaneSensor.js +245 -247
  539. package/src/x_ite/Components/PointingDeviceSensor/SphereSensor.js +173 -175
  540. package/src/x_ite/Components/PointingDeviceSensor/TouchSensor.js +61 -63
  541. package/src/x_ite/Components/PointingDeviceSensor/X3DDragSensorNode.js +14 -16
  542. package/src/x_ite/Components/PointingDeviceSensor/X3DPointingDeviceSensorNode.js +57 -59
  543. package/src/x_ite/Components/PointingDeviceSensor/X3DTouchSensorNode.js +19 -21
  544. package/src/x_ite/Components/PointingDeviceSensor.js +25 -25
  545. package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorParallel.js +191 -191
  546. package/src/x_ite/Components/ProjectiveTextureMapping/TextureProjectorPerspective.js +162 -162
  547. package/src/x_ite/Components/ProjectiveTextureMapping/X3DTextureProjectorNode.js +156 -156
  548. package/src/x_ite/Components/Rendering/ClipPlane.js +120 -120
  549. package/src/x_ite/Components/Rendering/Color.js +112 -112
  550. package/src/x_ite/Components/Rendering/ColorRGBA.js +114 -114
  551. package/src/x_ite/Components/Rendering/Coordinate.js +33 -35
  552. package/src/x_ite/Components/Rendering/IndexedLineSet.js +236 -243
  553. package/src/x_ite/Components/Rendering/IndexedTriangleFanSet.js +102 -102
  554. package/src/x_ite/Components/Rendering/IndexedTriangleSet.js +55 -55
  555. package/src/x_ite/Components/Rendering/IndexedTriangleStripSet.js +110 -110
  556. package/src/x_ite/Components/Rendering/LineSet.js +172 -179
  557. package/src/x_ite/Components/Rendering/Normal.js +100 -100
  558. package/src/x_ite/Components/Rendering/PointSet.js +142 -154
  559. package/src/x_ite/Components/Rendering/TriangleFanSet.js +73 -73
  560. package/src/x_ite/Components/Rendering/TriangleSet.js +51 -53
  561. package/src/x_ite/Components/Rendering/TriangleStripSet.js +76 -76
  562. package/src/x_ite/Components/Rendering/X3DColorNode.js +25 -27
  563. package/src/x_ite/Components/Rendering/X3DComposedGeometryNode.js +318 -321
  564. package/src/x_ite/Components/Rendering/X3DCoordinateNode.js +132 -132
  565. package/src/x_ite/Components/Rendering/X3DGeometricPropertyNode.js +13 -15
  566. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +1190 -1171
  567. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +231 -189
  568. package/src/x_ite/Components/Rendering/X3DNormalNode.js +13 -15
  569. package/src/x_ite/Components/Rendering/X3DPointGeometryNode.js +267 -0
  570. package/src/x_ite/Components/Rendering.js +53 -53
  571. package/src/x_ite/Components/RigidBodyPhysics/BallJoint.js +149 -149
  572. package/src/x_ite/Components/RigidBodyPhysics/CollidableOffset.js +229 -229
  573. package/src/x_ite/Components/RigidBodyPhysics/CollidableShape.js +465 -465
  574. package/src/x_ite/Components/RigidBodyPhysics/CollisionCollection.js +152 -154
  575. package/src/x_ite/Components/RigidBodyPhysics/CollisionSensor.js +223 -223
  576. package/src/x_ite/Components/RigidBodyPhysics/CollisionSpace.js +117 -117
  577. package/src/x_ite/Components/RigidBodyPhysics/Contact.js +54 -56
  578. package/src/x_ite/Components/RigidBodyPhysics/DoubleAxisHingeJoint.js +245 -245
  579. package/src/x_ite/Components/RigidBodyPhysics/MotorJoint.js +68 -70
  580. package/src/x_ite/Components/RigidBodyPhysics/RigidBody.js +453 -453
  581. package/src/x_ite/Components/RigidBodyPhysics/RigidBodyCollection.js +326 -326
  582. package/src/x_ite/Components/RigidBodyPhysics/SingleAxisHingeJoint.js +171 -171
  583. package/src/x_ite/Components/RigidBodyPhysics/SliderJoint.js +169 -169
  584. package/src/x_ite/Components/RigidBodyPhysics/UniversalJoint.js +50 -52
  585. package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollidableNode.js +101 -101
  586. package/src/x_ite/Components/RigidBodyPhysics/X3DNBodyCollisionSpaceNode.js +15 -15
  587. package/src/x_ite/Components/RigidBodyPhysics/X3DRigidJointNode.js +161 -163
  588. package/src/x_ite/Components/Scripting/Script.js +506 -510
  589. package/src/x_ite/Components/Scripting/X3DScriptNode.js +15 -15
  590. package/src/x_ite/Components/Shaders/ComposedShader.js +215 -178
  591. package/src/x_ite/Components/Shaders/FloatVertexAttribute.js +84 -83
  592. package/src/x_ite/Components/Shaders/Matrix3VertexAttribute.js +74 -74
  593. package/src/x_ite/Components/Shaders/Matrix4VertexAttribute.js +73 -73
  594. package/src/x_ite/Components/Shaders/PackagedShader.js +52 -49
  595. package/src/x_ite/Components/Shaders/ProgramShader.js +36 -38
  596. package/src/x_ite/Components/Shaders/ShaderPart.js +135 -147
  597. package/src/x_ite/Components/Shaders/ShaderProgram.js +49 -46
  598. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +1259 -1255
  599. package/src/x_ite/Components/Shaders/X3DShaderNode.js +83 -93
  600. package/src/x_ite/Components/Shaders/X3DVertexAttributeNode.js +13 -15
  601. package/src/x_ite/Components/Shaders.js +33 -33
  602. package/src/x_ite/{Execution/ExportedNode.js → Components/Shape/AcousticProperties.js} +41 -71
  603. package/src/x_ite/Components/Shape/Appearance.js +331 -318
  604. package/src/x_ite/Components/Shape/FillProperties.js +101 -98
  605. package/src/x_ite/Components/Shape/LineProperties.js +71 -69
  606. package/src/x_ite/Components/Shape/Material.js +344 -116
  607. package/src/x_ite/Components/Shape/PhysicalMaterial.js +310 -0
  608. package/src/x_ite/Components/Shape/PointProperties.js +79 -95
  609. package/src/x_ite/Components/Shape/Shape.js +178 -181
  610. package/src/x_ite/Components/Shape/TwoSidedMaterial.js +200 -200
  611. package/src/x_ite/Components/Shape/UnlitMaterial.js +93 -46
  612. package/src/x_ite/Components/Shape/X3DAppearanceChildNode.js +13 -15
  613. package/src/x_ite/Components/Shape/X3DAppearanceNode.js +24 -24
  614. package/src/x_ite/Components/Shape/X3DMaterialNode.js +24 -24
  615. package/src/x_ite/Components/Shape/X3DOneSidedMaterialNode.js +158 -54
  616. package/src/x_ite/Components/Shape/X3DShapeNode.js +147 -147
  617. package/src/x_ite/Components/Shape.js +43 -37
  618. package/src/x_ite/Components/Sound/AudioClip.js +135 -140
  619. package/src/x_ite/Components/Sound/Sound.js +246 -246
  620. package/src/x_ite/Components/Sound/X3DSoundNode.js +13 -15
  621. package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +165 -179
  622. package/src/x_ite/Components/Sound.js +19 -19
  623. package/src/x_ite/Components/Text/FontStyle.js +49 -49
  624. package/src/x_ite/Components/Text/Text.js +135 -135
  625. package/src/x_ite/Components/Text/X3DFontStyleNode.js +207 -205
  626. package/src/x_ite/Components/Text.js +17 -17
  627. package/src/x_ite/Components/Texturing/ImageTexture.js +181 -194
  628. package/src/x_ite/Components/Texturing/MovieTexture.js +180 -190
  629. package/src/x_ite/Components/Texturing/MultiTexture.js +255 -262
  630. package/src/x_ite/Components/Texturing/MultiTextureCoordinate.js +124 -118
  631. package/src/x_ite/Components/Texturing/MultiTextureTransform.js +82 -76
  632. package/src/x_ite/Components/Texturing/PixelTexture.js +222 -221
  633. package/src/x_ite/Components/Texturing/TextureCoordinate.js +116 -116
  634. package/src/x_ite/Components/Texturing/TextureCoordinateGenerator.js +90 -90
  635. package/src/x_ite/Components/Texturing/TextureProperties.js +158 -160
  636. package/src/x_ite/Components/Texturing/TextureTransform.js +99 -99
  637. package/src/x_ite/Components/Texturing/X3DSingleTextureCoordinateNode.js +33 -28
  638. package/src/x_ite/Components/Texturing/X3DSingleTextureNode.js +54 -54
  639. package/src/x_ite/Components/Texturing/X3DSingleTextureTransformNode.js +22 -17
  640. package/src/x_ite/Components/Texturing/X3DTexture2DNode.js +135 -124
  641. package/src/x_ite/Components/Texturing/X3DTextureCoordinateNode.js +16 -16
  642. package/src/x_ite/Components/Texturing/X3DTextureNode.js +24 -24
  643. package/src/x_ite/Components/Texturing/X3DTextureTransformNode.js +22 -22
  644. package/src/x_ite/Components/Texturing.js +45 -45
  645. package/src/x_ite/Components/Texturing3D/ComposedTexture3D.js +125 -123
  646. package/src/x_ite/Components/Texturing3D/ImageTexture3D.js +115 -131
  647. package/src/x_ite/Components/Texturing3D/PixelTexture3D.js +158 -160
  648. package/src/x_ite/Components/Texturing3D/TextureCoordinate3D.js +116 -116
  649. package/src/x_ite/Components/Texturing3D/TextureCoordinate4D.js +116 -116
  650. package/src/x_ite/Components/Texturing3D/TextureTransform3D.js +88 -88
  651. package/src/x_ite/Components/Texturing3D/TextureTransformMatrix3D.js +46 -46
  652. package/src/x_ite/Components/Texturing3D/X3DTexture3DNode.js +135 -121
  653. package/src/x_ite/Components/Time/TimeSensor.js +155 -152
  654. package/src/x_ite/Components/Time/X3DTimeDependentNode.js +299 -302
  655. package/src/x_ite/Components/Time.js +15 -15
  656. package/src/x_ite/Components/VolumeRendering/BlendedVolumeStyle.js +338 -338
  657. package/src/x_ite/Components/VolumeRendering/BoundaryEnhancementVolumeStyle.js +80 -80
  658. package/src/x_ite/Components/VolumeRendering/CartoonVolumeStyle.js +228 -228
  659. package/src/x_ite/Components/VolumeRendering/ComposedVolumeStyle.js +163 -163
  660. package/src/x_ite/Components/VolumeRendering/EdgeEnhancementVolumeStyle.js +117 -117
  661. package/src/x_ite/Components/VolumeRendering/IsoSurfaceVolumeData.js +334 -334
  662. package/src/x_ite/Components/VolumeRendering/OpacityMapVolumeStyle.js +116 -116
  663. package/src/x_ite/Components/VolumeRendering/ProjectionVolumeStyle.js +167 -167
  664. package/src/x_ite/Components/VolumeRendering/SegmentedVolumeData.js +247 -247
  665. package/src/x_ite/Components/VolumeRendering/ShadedVolumeStyle.js +198 -198
  666. package/src/x_ite/Components/VolumeRendering/SilhouetteEnhancementVolumeStyle.js +116 -116
  667. package/src/x_ite/Components/VolumeRendering/ToneMappedVolumeStyle.js +126 -126
  668. package/src/x_ite/Components/VolumeRendering/VolumeData.js +173 -173
  669. package/src/x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode.js +12 -12
  670. package/src/x_ite/Components/VolumeRendering/X3DVolumeDataNode.js +167 -167
  671. package/src/x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode.js +70 -70
  672. package/src/x_ite/Components/X_ITE/BlendMode.js +143 -145
  673. package/src/x_ite/Components.js +47 -47
  674. package/src/x_ite/Configuration/ComponentInfo.js +47 -42
  675. package/src/x_ite/Configuration/ComponentInfoArray.js +21 -19
  676. package/src/x_ite/Configuration/ProfileInfo.js +33 -23
  677. package/src/x_ite/Configuration/ProfileInfoArray.js +26 -16
  678. package/src/x_ite/Configuration/SupportedComponents.js +311 -311
  679. package/src/x_ite/Configuration/SupportedNodes.js +53 -38
  680. package/src/x_ite/Configuration/SupportedProfiles.js +190 -190
  681. package/src/x_ite/Configuration/UnitInfo.js +60 -51
  682. package/src/x_ite/Configuration/UnitInfoArray.js +17 -10
  683. package/src/x_ite/DEBUG.js +2 -2
  684. package/src/x_ite/Execution/BindableList.js +146 -149
  685. package/src/x_ite/Execution/BindableStack.js +130 -123
  686. package/src/x_ite/Execution/ExportedNodesArray.js +75 -0
  687. package/src/x_ite/Execution/ImportedNodesArray.js +75 -0
  688. package/src/x_ite/{Basic/X3DFieldDefinition.js → Execution/NamedNodesArray.js} +20 -10
  689. package/src/x_ite/Execution/Scene.js +93 -90
  690. package/src/x_ite/Execution/X3DExecutionContext.js +957 -781
  691. package/src/x_ite/Execution/X3DExportedNode.js +152 -0
  692. package/src/x_ite/Execution/X3DImportedNode.js +393 -0
  693. package/src/x_ite/Execution/X3DScene.js +546 -493
  694. package/src/x_ite/Execution/X3DWorld.js +171 -0
  695. package/src/x_ite/Fallback.js +31 -31
  696. package/src/x_ite/Fields/ArrayFields.js +463 -443
  697. package/src/x_ite/Fields/SFBool.js +50 -47
  698. package/src/x_ite/Fields/SFColor.js +163 -160
  699. package/src/x_ite/Fields/SFColorRGBA.js +155 -152
  700. package/src/x_ite/Fields/SFDouble.js +51 -48
  701. package/src/x_ite/Fields/SFFloat.js +51 -48
  702. package/src/x_ite/Fields/SFImage.js +216 -213
  703. package/src/x_ite/Fields/SFInt32.js +47 -44
  704. package/src/x_ite/Fields/SFMatrix3.js +74 -71
  705. package/src/x_ite/Fields/SFMatrix4.js +68 -65
  706. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +98 -98
  707. package/src/x_ite/Fields/SFNode.js +392 -299
  708. package/src/x_ite/Fields/SFNodeCache.js +22 -33
  709. package/src/x_ite/Fields/SFRotation.js +178 -175
  710. package/src/x_ite/Fields/SFString.js +71 -68
  711. package/src/x_ite/Fields/SFTime.js +47 -44
  712. package/src/x_ite/Fields/SFVec2.js +73 -70
  713. package/src/x_ite/Fields/SFVec3.js +105 -102
  714. package/src/x_ite/Fields/SFVec4.js +118 -115
  715. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +94 -94
  716. package/src/x_ite/Fields.js +44 -44
  717. package/src/x_ite/InputOutput/FileLoader.js +426 -531
  718. package/src/x_ite/InputOutput/Generator.js +379 -376
  719. package/src/x_ite/{Configuration/X3DInfoArray.js → Parser/GoldenGate.js} +54 -86
  720. package/src/x_ite/Parser/HTMLSupport.js +28 -6
  721. package/src/x_ite/Parser/JSONParser.js +414 -388
  722. package/src/x_ite/Parser/VRMLParser.js +2964 -0
  723. package/src/x_ite/Parser/X3DParser.js +128 -128
  724. package/src/x_ite/Parser/XMLParser.js +1231 -1178
  725. package/src/x_ite/Prototype/ExternProtoDeclarationArray.js +17 -27
  726. package/src/x_ite/Prototype/ProtoDeclarationArray.js +17 -27
  727. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +279 -297
  728. package/src/x_ite/Prototype/X3DProtoDeclaration.js +264 -263
  729. package/src/x_ite/Prototype/X3DProtoDeclarationNode.js +58 -35
  730. package/src/x_ite/Rendering/DependentRenderer.js +83 -80
  731. package/src/x_ite/Rendering/TextureBuffer.js +171 -168
  732. package/src/x_ite/{Bits → Rendering}/TraverseType.js +11 -11
  733. package/src/x_ite/Rendering/X3DRenderObject.js +895 -906
  734. package/src/x_ite/Routing/RouteArray.js +19 -71
  735. package/src/x_ite/Routing/X3DRoute.js +185 -179
  736. package/src/x_ite/Routing/X3DRoutingContext.js +60 -54
  737. package/src/x_ite/X3D.js +191 -175
  738. package/src/x_ite.config.js +83 -83
  739. package/src/x_ite.css +279 -288
  740. package/src/x_ite.html +226 -193
  741. package/src/x_ite.js +100 -127
  742. package/x_ite.min.html +220 -187
  743. package/src/assets/shaders/webgl1/PointSet.fs +0 -100
  744. package/src/assets/shaders/webgl1/PointSet.vs +0 -70
  745. package/src/assets/shaders/webgl1/Wireframe.fs +0 -74
  746. package/src/assets/shaders/webgl1/Wireframe.vs +0 -63
  747. package/src/assets/shaders/webgl2/PointSet.fs +0 -99
  748. package/src/assets/shaders/webgl2/PointSet.vs +0 -71
  749. package/src/assets/shaders/webgl2/Wireframe.fs +0 -73
  750. package/src/assets/shaders/webgl2/Wireframe.vs +0 -64
  751. package/src/x_ite/Basic/X3DBaseNode.js +0 -1253
  752. package/src/x_ite/Basic/X3DField.js +0 -370
  753. package/src/x_ite/Basic/X3DObjectArrayField.js +0 -545
  754. package/src/x_ite/Basic/X3DTypedArrayField.js +0 -839
  755. package/src/x_ite/Browser/Core/X3DCoreContext.js.~1~ +0 -714
  756. package/src/x_ite/Components/Texturing/X3DTexture2DNode.js.~1~ +0 -209
  757. package/src/x_ite/Execution/ImportedNode.js +0 -375
  758. package/src/x_ite/Execution/World.js +0 -162
  759. package/src/x_ite/Parser/Parser.js +0 -2944
@@ -4,8 +4,8 @@
4
4
  var module = { }, exports, process;
5
5
 
6
6
  const
7
- define = X3D .define,
8
- require = X3D .require;
7
+ define = window [Symbol .for ("X_ITE.X3D-5.0.0")] .define,
8
+ require = window [Symbol .for ("X_ITE.X3D-5.0.0")] .require;
9
9
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
10
10
  *******************************************************************************
11
11
  *
@@ -56,39 +56,39 @@ const
56
56
 
57
57
 
58
58
  define ('x_ite/Browser/Geometry2D/Arc2DOptions',[
59
- "x_ite/Basic/X3DBaseNode",
60
- "x_ite/Fields",
59
+ "x_ite/Base/X3DBaseNode",
60
+ "x_ite/Fields",
61
61
  ],
62
62
  function (X3DBaseNode,
63
63
  Fields)
64
64
  {
65
65
  "use strict";
66
-
67
- function ArcClose2DOptions (executionContext)
68
- {
69
- X3DBaseNode .call (this, executionContext);
70
-
71
- this .addChildObjects ("dimension", new Fields .SFInt32 (40))
72
- }
73
-
74
- ArcClose2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
75
- {
76
- constructor: ArcClose2DOptions,
77
- getTypeName: function ()
78
- {
79
- return "ArcClose2DOptions";
80
- },
81
- getComponentName: function ()
82
- {
83
- return "X_ITE";
84
- },
85
- getContainerField: function ()
86
- {
87
- return "arcClose2DOptions";
88
- },
89
- });
90
-
91
- return ArcClose2DOptions;
66
+
67
+ function ArcClose2DOptions (executionContext)
68
+ {
69
+ X3DBaseNode .call (this, executionContext);
70
+
71
+ this .addChildObjects ("dimension", new Fields .SFInt32 (40))
72
+ }
73
+
74
+ ArcClose2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
75
+ {
76
+ constructor: ArcClose2DOptions,
77
+ getTypeName: function ()
78
+ {
79
+ return "ArcClose2DOptions";
80
+ },
81
+ getComponentName: function ()
82
+ {
83
+ return "X_ITE";
84
+ },
85
+ getContainerField: function ()
86
+ {
87
+ return "arcClose2DOptions";
88
+ },
89
+ });
90
+
91
+ return ArcClose2DOptions;
92
92
  });
93
93
 
94
94
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -141,39 +141,39 @@ function (X3DBaseNode,
141
141
 
142
142
 
143
143
  define ('x_ite/Browser/Geometry2D/ArcClose2DOptions',[
144
- "x_ite/Basic/X3DBaseNode",
145
- "x_ite/Fields",
144
+ "x_ite/Base/X3DBaseNode",
145
+ "x_ite/Fields",
146
146
  ],
147
147
  function (X3DBaseNode,
148
148
  Fields)
149
149
  {
150
150
  "use strict";
151
-
152
- function Arc2DOptions (executionContext)
153
- {
154
- X3DBaseNode .call (this, executionContext);
155
-
156
- this .addChildObjects ("dimension", new Fields .SFInt32 (40))
157
- }
158
-
159
- Arc2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
160
- {
161
- constructor: Arc2DOptions,
162
- getTypeName: function ()
163
- {
164
- return "Arc2DOptions";
165
- },
166
- getComponentName: function ()
167
- {
168
- return "X_ITE";
169
- },
170
- getContainerField: function ()
171
- {
172
- return "arc2DOptions";
173
- },
174
- });
175
-
176
- return Arc2DOptions;
151
+
152
+ function Arc2DOptions (executionContext)
153
+ {
154
+ X3DBaseNode .call (this, executionContext);
155
+
156
+ this .addChildObjects ("dimension", new Fields .SFInt32 (40))
157
+ }
158
+
159
+ Arc2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
160
+ {
161
+ constructor: Arc2DOptions,
162
+ getTypeName: function ()
163
+ {
164
+ return "Arc2DOptions";
165
+ },
166
+ getComponentName: function ()
167
+ {
168
+ return "X_ITE";
169
+ },
170
+ getContainerField: function ()
171
+ {
172
+ return "arc2DOptions";
173
+ },
174
+ });
175
+
176
+ return Arc2DOptions;
177
177
  });
178
178
 
179
179
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -226,75 +226,76 @@ function (X3DBaseNode,
226
226
 
227
227
 
228
228
  define ('x_ite/Browser/Geometry2D/Circle2DOptions',[
229
- "x_ite/Basic/X3DBaseNode",
230
- "x_ite/Fields",
231
- "x_ite/Components/Rendering/X3DGeometryNode",
232
- "standard/Math/Numbers/Complex",
233
- "standard/Math/Numbers/Vector3",
229
+ "x_ite/Base/X3DBaseNode",
230
+ "x_ite/Fields",
231
+ "x_ite/Components/Rendering/X3DGeometryNode",
232
+ "standard/Math/Numbers/Complex",
234
233
  ],
235
234
  function (X3DBaseNode,
236
235
  Fields,
237
236
  X3DGeometryNode,
238
- Complex,
239
- Vector3)
237
+ Complex)
240
238
  {
241
239
  "use strict";
242
-
243
- function Circle2DOptions (executionContext)
244
- {
245
- X3DBaseNode .call (this, executionContext);
246
-
247
- this .addChildObjects ("dimension", new Fields .SFInt32 (40))
248
-
249
- this .vertices = X3DGeometryNode .createArray ();
250
- }
251
-
252
- Circle2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
253
- {
254
- constructor: Circle2DOptions,
255
- getTypeName: function ()
256
- {
257
- return "Circle2DOptions";
258
- },
259
- getComponentName: function ()
260
- {
261
- return "X_ITE";
262
- },
263
- getContainerField: function ()
264
- {
265
- return "circle2DOptions";
266
- },
267
- initialize: function ()
268
- {
269
- this .addInterest ("build", this);
270
-
271
- this .build ();
272
- },
273
- getVertices: function ()
274
- {
275
- return this .vertices;
276
- },
277
- build: function ()
278
- {
279
- var
280
- dimension = this .dimension_ .getValue (),
281
- angle = Math .PI * 2 / dimension,
282
- vertices = this .vertices;
283
-
284
- vertices .length = 0;
285
-
286
- for (var n = 0; n < dimension; ++ n)
287
- {
288
- var point = Complex .Polar (1, angle * n);
289
-
290
- vertices .push (point .real, point .imag, 0, 1);
291
- }
292
-
293
- vertices .shrinkToFit ();
294
- },
295
- });
296
-
297
- return Circle2DOptions;
240
+
241
+ function Circle2DOptions (executionContext)
242
+ {
243
+ X3DBaseNode .call (this, executionContext);
244
+
245
+ this .addChildObjects ("dimension", new Fields .SFInt32 (40))
246
+
247
+ this .vertices = X3DGeometryNode .createArray ();
248
+ }
249
+
250
+ Circle2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
251
+ {
252
+ constructor: Circle2DOptions,
253
+ getTypeName: function ()
254
+ {
255
+ return "Circle2DOptions";
256
+ },
257
+ getComponentName: function ()
258
+ {
259
+ return "X_ITE";
260
+ },
261
+ getContainerField: function ()
262
+ {
263
+ return "circle2DOptions";
264
+ },
265
+ initialize: function ()
266
+ {
267
+ this .addInterest ("build", this);
268
+
269
+ this .build ();
270
+ },
271
+ getVertices: function ()
272
+ {
273
+ return this .vertices;
274
+ },
275
+ build: function ()
276
+ {
277
+ const
278
+ dimension = this ._dimension .getValue (),
279
+ angle = Math .PI * 2 / dimension,
280
+ vertices = this .vertices;
281
+
282
+ vertices .length = 0;
283
+
284
+ for (let n = 0; n < dimension; ++ n)
285
+ {
286
+ const
287
+ point1 = Complex .Polar (1, angle * n),
288
+ point2 = Complex .Polar (1, angle * (n + 1));
289
+
290
+ vertices .push (point1 .real, point1 .imag, 0, 1);
291
+ vertices .push (point2 .real, point2 .imag, 0, 1);
292
+ }
293
+
294
+ vertices .shrinkToFit ();
295
+ },
296
+ });
297
+
298
+ return Circle2DOptions;
298
299
  });
299
300
 
300
301
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -347,11 +348,11 @@ function (X3DBaseNode,
347
348
 
348
349
 
349
350
  define ('x_ite/Browser/Geometry2D/Disk2DOptions',[
350
- "x_ite/Basic/X3DBaseNode",
351
- "x_ite/Fields",
352
- "x_ite/Components/Rendering/X3DGeometryNode",
353
- "standard/Math/Numbers/Complex",
354
- "standard/Math/Numbers/Vector3",
351
+ "x_ite/Base/X3DBaseNode",
352
+ "x_ite/Fields",
353
+ "x_ite/Components/Rendering/X3DGeometryNode",
354
+ "standard/Math/Numbers/Complex",
355
+ "standard/Math/Numbers/Vector3",
355
356
  ],
356
357
  function (X3DBaseNode,
357
358
  Fields,
@@ -360,117 +361,117 @@ function (X3DBaseNode,
360
361
  Vector3)
361
362
  {
362
363
  "use strict";
363
-
364
- function Disk2DOptions (executionContext)
365
- {
366
- X3DBaseNode .call (this, executionContext);
367
-
368
- this .addChildObjects ("dimension", new Fields .SFInt32 (40))
369
-
370
- this .circleVertices = X3DGeometryNode .createArray ();
371
- this .diskTexCoords = X3DGeometryNode .createArray ();
372
- this .diskNormals = X3DGeometryNode .createArray ();
373
- this .diskVertices = X3DGeometryNode .createArray ();
374
- }
375
-
376
- Disk2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
377
- {
378
- constructor: Disk2DOptions,
379
- getTypeName: function ()
380
- {
381
- return "Disk2DOptions";
382
- },
383
- getComponentName: function ()
384
- {
385
- return "X_ITE";
386
- },
387
- getContainerField: function ()
388
- {
389
- return "circle2DOptions";
390
- },
391
- initialize: function ()
392
- {
393
- this .addInterest ("build", this);
394
-
395
- this .build ();
396
- },
397
- getCircleVertices: function ()
398
- {
399
- return this .circleVertices;
400
- },
401
- getDiskTexCoords: function ()
402
- {
403
- return this .diskTexCoords;
404
- },
405
- getDiskNormals: function ()
406
- {
407
- return this .diskNormals;
408
- },
409
- getDiskVertices: function ()
410
- {
411
- return this .diskVertices;
412
- },
413
- build: (function ()
414
- {
415
- var
416
- half = new Complex (0.5, 0.5),
417
- texCoord1 = new Complex (0, 0),
418
- texCoord2 = new Complex (0, 0),
419
- point1 = new Complex (0, 0),
420
- point2 = new Complex (0, 0);
421
-
422
- return function ()
423
- {
424
- var
425
- dimension = this .dimension_ .getValue (),
426
- angle = Math .PI * 2 / dimension,
427
- circleVertices = this .circleVertices,
428
- diskTexCoords = this .diskTexCoords,
429
- diskNormals = this .diskNormals,
430
- diskVertices = this .diskVertices;
431
-
432
- circleVertices .length = 0;
433
- diskTexCoords .length = 0;
434
- diskNormals .length = 0;
435
- diskVertices .length = 0;
436
-
437
- for (var n = 0; n < dimension; ++ n)
438
- {
439
- var
440
- theta1 = angle * n,
441
- theta2 = angle * (n + 1);
442
-
443
- texCoord1 .setPolar (0.5, theta1) .add (half);
444
- texCoord2 .setPolar (0.5, theta2) .add (half);
445
- point1 .setPolar (1, theta1);
446
- point2 .setPolar (1, theta2);
447
-
448
- // Circle
449
-
450
- circleVertices .push (point1 .real, point1 .imag, 0, 1);
451
-
452
- // Disk
453
-
454
- diskTexCoords .push (0.5, 0.5, 0, 1,
455
- texCoord1 .real, texCoord1 .imag, 0, 1,
456
- texCoord2 .real, texCoord2 .imag, 0, 1);
457
-
458
- diskNormals .push (0, 0, 1, 0, 0, 1, 0, 0, 1);
459
-
460
- diskVertices .push (0, 0, 0, 1,
461
- point1 .real, point1 .imag, 0, 1,
462
- point2 .real, point2 .imag, 0, 1);
463
- }
464
-
465
- circleVertices .shrinkToFit ();
466
- diskTexCoords .shrinkToFit ();
467
- diskNormals .shrinkToFit ();
468
- diskVertices .shrinkToFit ();
469
- };
470
- })(),
471
- });
472
-
473
- return Disk2DOptions;
364
+
365
+ function Disk2DOptions (executionContext)
366
+ {
367
+ X3DBaseNode .call (this, executionContext);
368
+
369
+ this .addChildObjects ("dimension", new Fields .SFInt32 (40))
370
+
371
+ this .circleVertices = X3DGeometryNode .createArray ();
372
+ this .diskTexCoords = X3DGeometryNode .createArray ();
373
+ this .diskNormals = X3DGeometryNode .createArray ();
374
+ this .diskVertices = X3DGeometryNode .createArray ();
375
+ }
376
+
377
+ Disk2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
378
+ {
379
+ constructor: Disk2DOptions,
380
+ getTypeName: function ()
381
+ {
382
+ return "Disk2DOptions";
383
+ },
384
+ getComponentName: function ()
385
+ {
386
+ return "X_ITE";
387
+ },
388
+ getContainerField: function ()
389
+ {
390
+ return "circle2DOptions";
391
+ },
392
+ initialize: function ()
393
+ {
394
+ this .addInterest ("build", this);
395
+
396
+ this .build ();
397
+ },
398
+ getCircleVertices: function ()
399
+ {
400
+ return this .circleVertices;
401
+ },
402
+ getDiskTexCoords: function ()
403
+ {
404
+ return this .diskTexCoords;
405
+ },
406
+ getDiskNormals: function ()
407
+ {
408
+ return this .diskNormals;
409
+ },
410
+ getDiskVertices: function ()
411
+ {
412
+ return this .diskVertices;
413
+ },
414
+ build: (function ()
415
+ {
416
+ const
417
+ half = new Complex (0.5, 0.5),
418
+ texCoord1 = new Complex (0, 0),
419
+ texCoord2 = new Complex (0, 0),
420
+ point1 = new Complex (0, 0),
421
+ point2 = new Complex (0, 0);
422
+
423
+ return function ()
424
+ {
425
+ const
426
+ dimension = this ._dimension .getValue (),
427
+ angle = Math .PI * 2 / dimension,
428
+ circleVertices = this .circleVertices,
429
+ diskTexCoords = this .diskTexCoords,
430
+ diskNormals = this .diskNormals,
431
+ diskVertices = this .diskVertices;
432
+
433
+ circleVertices .length = 0;
434
+ diskTexCoords .length = 0;
435
+ diskNormals .length = 0;
436
+ diskVertices .length = 0;
437
+
438
+ for (let n = 0; n < dimension; ++ n)
439
+ {
440
+ const
441
+ theta1 = angle * n,
442
+ theta2 = angle * (n + 1);
443
+
444
+ texCoord1 .setPolar (0.5, theta1) .add (half);
445
+ texCoord2 .setPolar (0.5, theta2) .add (half);
446
+ point1 .setPolar (1, theta1);
447
+ point2 .setPolar (1, theta2);
448
+
449
+ // Circle
450
+
451
+ circleVertices .push (point1 .real, point1 .imag, 0, 1);
452
+
453
+ // Disk
454
+
455
+ diskTexCoords .push (0.5, 0.5, 0, 1,
456
+ texCoord1 .real, texCoord1 .imag, 0, 1,
457
+ texCoord2 .real, texCoord2 .imag, 0, 1);
458
+
459
+ diskNormals .push (0, 0, 1, 0, 0, 1, 0, 0, 1);
460
+
461
+ diskVertices .push (0, 0, 0, 1,
462
+ point1 .real, point1 .imag, 0, 1,
463
+ point2 .real, point2 .imag, 0, 1);
464
+ }
465
+
466
+ circleVertices .shrinkToFit ();
467
+ diskTexCoords .shrinkToFit ();
468
+ diskNormals .shrinkToFit ();
469
+ diskVertices .shrinkToFit ();
470
+ };
471
+ })(),
472
+ });
473
+
474
+ return Disk2DOptions;
474
475
  });
475
476
 
476
477
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -523,11 +524,11 @@ function (X3DBaseNode,
523
524
 
524
525
 
525
526
  define ('x_ite/Browser/Geometry2D/Rectangle2DOptions',[
526
- "x_ite/Fields",
527
- "x_ite/Basic/X3DBaseNode",
528
- "x_ite/Components/Geometry3D/IndexedFaceSet",
529
- "x_ite/Components/Rendering/Coordinate",
530
- "x_ite/Components/Texturing/TextureCoordinate",
527
+ "x_ite/Fields",
528
+ "x_ite/Base/X3DBaseNode",
529
+ "x_ite/Components/Geometry3D/IndexedFaceSet",
530
+ "x_ite/Components/Rendering/Coordinate",
531
+ "x_ite/Components/Texturing/TextureCoordinate",
531
532
  ],
532
533
  function (Fields,
533
534
  X3DBaseNode,
@@ -536,70 +537,70 @@ function (Fields,
536
537
  TextureCoordinate)
537
538
  {
538
539
  "use strict";
539
-
540
- function Rectangle2DOptions (executionContext)
541
- {
542
- X3DBaseNode .call (this, executionContext);
543
- }
544
-
545
- Rectangle2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
546
- {
547
- constructor: Rectangle2DOptions,
548
- getTypeName: function ()
549
- {
550
- return "Rectangle2DOptions";
551
- },
552
- getComponentName: function ()
553
- {
554
- return "X_ITE";
555
- },
556
- getContainerField: function ()
557
- {
558
- return "rectangle2DOptions";
559
- },
560
- initialize: function ()
561
- {
562
- X3DBaseNode .prototype .initialize .call (this);
563
- },
564
- getGeometry: function ()
565
- {
566
- if (this .geometry)
567
- return this .geometry;
568
-
569
- this .geometry = new IndexedFaceSet (this .getExecutionContext ());
570
- this .geometry .texCoord_ = new TextureCoordinate (this .getExecutionContext ());
571
- this .geometry .coord_ = new Coordinate (this .getExecutionContext ());
572
-
573
- var
574
- geometry = this .geometry,
575
- texCoord = this .geometry .texCoord_ .getValue (),
576
- coord = this .geometry .coord_ .getValue ();
577
-
578
- geometry .texCoordIndex_ = new Fields .MFInt32 (
579
- 0, 1, 2, 3, -1
580
- );
581
-
582
- geometry .coordIndex_ = new Fields .MFInt32 (
583
- 0, 1, 2, 3, -1
584
- );
585
-
586
- texCoord .point_ = new Fields .MFVec2f (
587
- new Fields .SFVec2f (1, 1), new Fields .SFVec2f (0, 1), new Fields .SFVec2f (0, 0), new Fields .SFVec2f (1, 0)
588
- );
589
-
590
- coord .point_ = new Fields .MFVec3f (
591
- new Fields .SFVec3f (1, 1, 0), new Fields .SFVec3f (-1, 1, 0), new Fields .SFVec3f (-1, -1, 0), new Fields .SFVec3f (1, -1, 0)
592
- );
593
-
594
- texCoord .setup ();
595
- coord .setup ();
596
- geometry .setup ();
597
-
598
- return this .geometry;
599
- },
600
- });
601
-
602
- return Rectangle2DOptions;
540
+
541
+ function Rectangle2DOptions (executionContext)
542
+ {
543
+ X3DBaseNode .call (this, executionContext);
544
+ }
545
+
546
+ Rectangle2DOptions .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
547
+ {
548
+ constructor: Rectangle2DOptions,
549
+ getTypeName: function ()
550
+ {
551
+ return "Rectangle2DOptions";
552
+ },
553
+ getComponentName: function ()
554
+ {
555
+ return "X_ITE";
556
+ },
557
+ getContainerField: function ()
558
+ {
559
+ return "rectangle2DOptions";
560
+ },
561
+ initialize: function ()
562
+ {
563
+ X3DBaseNode .prototype .initialize .call (this);
564
+ },
565
+ getGeometry: function ()
566
+ {
567
+ if (this .geometry)
568
+ return this .geometry;
569
+
570
+ this .geometry = new IndexedFaceSet (this .getExecutionContext ());
571
+ this .geometry ._texCoord = new TextureCoordinate (this .getExecutionContext ());
572
+ this .geometry ._coord = new Coordinate (this .getExecutionContext ());
573
+
574
+ const
575
+ geometry = this .geometry,
576
+ texCoord = this .geometry ._texCoord .getValue (),
577
+ coord = this .geometry ._coord .getValue ();
578
+
579
+ geometry ._texCoordIndex = new Fields .MFInt32 (
580
+ 0, 1, 2, 3, -1
581
+ );
582
+
583
+ geometry ._coordIndex = new Fields .MFInt32 (
584
+ 0, 1, 2, 3, -1
585
+ );
586
+
587
+ texCoord ._point = new Fields .MFVec2f (
588
+ new Fields .SFVec2f (1, 1), new Fields .SFVec2f (0, 1), new Fields .SFVec2f (0, 0), new Fields .SFVec2f (1, 0)
589
+ );
590
+
591
+ coord ._point = new Fields .MFVec3f (
592
+ new Fields .SFVec3f (1, 1, 0), new Fields .SFVec3f (-1, 1, 0), new Fields .SFVec3f (-1, -1, 0), new Fields .SFVec3f (1, -1, 0)
593
+ );
594
+
595
+ texCoord .setup ();
596
+ coord .setup ();
597
+ geometry .setup ();
598
+
599
+ return this .geometry;
600
+ },
601
+ });
602
+
603
+ return Rectangle2DOptions;
603
604
  });
604
605
 
605
606
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -652,12 +653,12 @@ function (Fields,
652
653
 
653
654
 
654
655
  define ('x_ite/Browser/Geometry2D/X3DGeometry2DContext',[
655
- "x_ite/Browser/Geometry2D/Arc2DOptions",
656
- "x_ite/Browser/Geometry2D/ArcClose2DOptions",
657
- "x_ite/Browser/Geometry2D/Circle2DOptions",
658
- "x_ite/Browser/Geometry2D/Disk2DOptions",
659
- "x_ite/Browser/Geometry2D/Rectangle2DOptions",
660
- "x_ite/Browser/Core/PrimitiveQuality",
656
+ "x_ite/Browser/Geometry2D/Arc2DOptions",
657
+ "x_ite/Browser/Geometry2D/ArcClose2DOptions",
658
+ "x_ite/Browser/Geometry2D/Circle2DOptions",
659
+ "x_ite/Browser/Geometry2D/Disk2DOptions",
660
+ "x_ite/Browser/Geometry2D/Rectangle2DOptions",
661
+ "x_ite/Browser/Core/PrimitiveQuality",
661
662
  ],
662
663
  function (Arc2DOptions,
663
664
  ArcClose2DOptions,
@@ -668,83 +669,86 @@ function (Arc2DOptions,
668
669
  {
669
670
  "use strict";
670
671
 
671
- function getOptionNode (fun, name, Type)
672
- {
673
- this [name] = new Type (this .getPrivateScene ());
674
- this [name] .setup ();
675
-
676
- this [fun] = function () { return this [name]; };
677
-
678
- return this [name];
679
- }
680
-
681
- function X3DGeometry2DContext () { }
682
-
683
- X3DGeometry2DContext .prototype =
684
- {
685
- initialize: function ()
686
- {
687
- this .setGeometry2DPrimitiveQuality (this .getBrowserOptions () .getPrimitiveQuality ());
688
- },
689
- getArc2DOptions: function ()
690
- {
691
- return getOptionNode .call (this, "getArc2DOptions", "arc2DOptions", Arc2DOptions);
692
- },
693
- getArcClose2DOptions: function ()
694
- {
695
- return getOptionNode .call (this, "getArcClose2DOptions", "arcClose2DOptions", ArcClose2DOptions);
696
- },
697
- getCircle2DOptions: function ()
698
- {
699
- return getOptionNode .call (this, "getCircle2DOptions", "circle2DOptions", Circle2DOptions);
700
- },
701
- getDisk2DOptions: function ()
702
- {
703
- return getOptionNode .call (this, "getDisk2DOptions", "disk2DOptions", Disk2DOptions);
704
- },
705
- getRectangle2DOptions: function ()
706
- {
707
- return getOptionNode .call (this, "getRectangle2DOptions", "rectangle2DOptions", Rectangle2DOptions);
708
- },
709
- setGeometry2DPrimitiveQuality: function (primitiveQuality)
710
- {
711
- var
712
- arc = this .getArc2DOptions (),
713
- arcClose = this .getArcClose2DOptions (),
714
- circle = this .getCircle2DOptions (),
715
- disk = this .getDisk2DOptions ();
716
-
717
- switch (primitiveQuality)
718
- {
719
- case PrimitiveQuality .LOW:
720
- {
721
- arc .dimension_ = 20;
722
- arcClose .dimension_ = 20;
723
- circle .dimension_ = 20;
724
- disk .dimension_ = 20;
725
- break;
726
- }
727
- case PrimitiveQuality .MEDIUM:
728
- {
729
- arc .dimension_ = 40;
730
- arcClose .dimension_ = 40;
731
- circle .dimension_ = 40;
732
- disk .dimension_ = 40;
733
- break;
734
- }
735
- case PrimitiveQuality .HIGH:
736
- {
737
- arc .dimension_ = 80;
738
- arcClose .dimension_ = 80;
739
- circle .dimension_ = 80;
740
- disk .dimension_ = 80;
741
- break;
742
- }
743
- }
744
- },
745
- };
746
-
747
- return X3DGeometry2DContext;
672
+ function X3DGeometry2DContext () { }
673
+
674
+ X3DGeometry2DContext .prototype =
675
+ {
676
+ initialize: function ()
677
+ {
678
+ this .setGeometry2DPrimitiveQuality (this .getBrowserOptions () .getPrimitiveQuality ());
679
+ },
680
+ getArc2DOptions: function ()
681
+ {
682
+ return getOptionNode .call (this, "getArc2DOptions", Arc2DOptions);
683
+ },
684
+ getArcClose2DOptions: function ()
685
+ {
686
+ return getOptionNode .call (this, "getArcClose2DOptions", ArcClose2DOptions);
687
+ },
688
+ getCircle2DOptions: function ()
689
+ {
690
+ return getOptionNode .call (this, "getCircle2DOptions", Circle2DOptions);
691
+ },
692
+ getDisk2DOptions: function ()
693
+ {
694
+ return getOptionNode .call (this, "getDisk2DOptions", Disk2DOptions);
695
+ },
696
+ getRectangle2DOptions: function ()
697
+ {
698
+ return getOptionNode .call (this, "getRectangle2DOptions", Rectangle2DOptions);
699
+ },
700
+ setGeometry2DPrimitiveQuality: function (primitiveQuality)
701
+ {
702
+ const
703
+ arc = this .getArc2DOptions (),
704
+ arcClose = this .getArcClose2DOptions (),
705
+ circle = this .getCircle2DOptions (),
706
+ disk = this .getDisk2DOptions ();
707
+
708
+ switch (primitiveQuality)
709
+ {
710
+ case PrimitiveQuality .LOW:
711
+ {
712
+ arc ._dimension = 20;
713
+ arcClose ._dimension = 20;
714
+ circle ._dimension = 20;
715
+ disk ._dimension = 20;
716
+ break;
717
+ }
718
+ case PrimitiveQuality .MEDIUM:
719
+ {
720
+ arc ._dimension = 40;
721
+ arcClose ._dimension = 40;
722
+ circle ._dimension = 40;
723
+ disk ._dimension = 40;
724
+ break;
725
+ }
726
+ case PrimitiveQuality .HIGH:
727
+ {
728
+ arc ._dimension = 80;
729
+ arcClose ._dimension = 80;
730
+ circle ._dimension = 80;
731
+ disk ._dimension = 80;
732
+ break;
733
+ }
734
+ }
735
+ },
736
+ };
737
+
738
+ function getOptionNode (key, OptionNode)
739
+ {
740
+ const optionNode = new OptionNode (this .getPrivateScene ());
741
+
742
+ optionNode .setup ();
743
+
744
+ this [key] = function () { return optionNode; };
745
+
746
+ Object .defineProperty (this, key, { enumerable: false });
747
+
748
+ return optionNode;
749
+ }
750
+
751
+ return X3DGeometry2DContext;
748
752
  });
749
753
 
750
754
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -797,13 +801,13 @@ function (Arc2DOptions,
797
801
 
798
802
 
799
803
  define ('x_ite/Components/Geometry2D/Arc2D',[
800
- "x_ite/Fields",
801
- "x_ite/Basic/X3DFieldDefinition",
802
- "x_ite/Basic/FieldDefinitionArray",
803
- "x_ite/Components/Rendering/X3DLineGeometryNode",
804
- "x_ite/Bits/X3DConstants",
805
- "standard/Math/Numbers/Complex",
806
- "standard/Math/Algorithm",
804
+ "x_ite/Fields",
805
+ "x_ite/Base/X3DFieldDefinition",
806
+ "x_ite/Base/FieldDefinitionArray",
807
+ "x_ite/Components/Rendering/X3DLineGeometryNode",
808
+ "x_ite/Base/X3DConstants",
809
+ "standard/Math/Numbers/Complex",
810
+ "standard/Math/Algorithm",
807
811
  ],
808
812
  function (Fields,
809
813
  X3DFieldDefinition,
@@ -815,112 +819,98 @@ function (Fields,
815
819
  {
816
820
  "use strict";
817
821
 
818
- function Arc2D (executionContext)
819
- {
820
- X3DLineGeometryNode .call (this, executionContext);
821
-
822
- this .addType (X3DConstants .Arc2D);
823
-
824
- this .setGeometryType (1);
825
-
826
- this .startAngle_ .setUnit ("angle");
827
- this .endAngle_ .setUnit ("angle");
828
- this .radius_ .setUnit ("length");
829
- }
830
-
831
- Arc2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .prototype),
832
- {
833
- constructor: Arc2D,
834
- fieldDefinitions: new FieldDefinitionArray ([
835
- new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
836
- new X3DFieldDefinition (X3DConstants .initializeOnly, "startAngle", new Fields .SFFloat ()),
837
- new X3DFieldDefinition (X3DConstants .initializeOnly, "endAngle", new Fields .SFFloat (1.5708)),
838
- new X3DFieldDefinition (X3DConstants .initializeOnly, "radius", new Fields .SFFloat (1)),
839
- ]),
840
- getTypeName: function ()
841
- {
842
- return "Arc2D";
843
- },
844
- getComponentName: function ()
845
- {
846
- return "Geometry2D";
847
- },
848
- getContainerField: function ()
849
- {
850
- return "geometry";
851
- },
852
- set_live__: function ()
853
- {
854
- X3DLineGeometryNode .prototype .set_live__ .call (this);
855
-
856
- if (this .isLive () .getValue ())
857
- this .getBrowser () .getArc2DOptions () .addInterest ("requestRebuild", this);
858
- else
859
- this .getBrowser () .getArc2DOptions () .removeInterest ("requestRebuild", this);
860
- },
861
- getSweepAngle: function ()
862
- {
863
- var
864
- start = Algorithm .interval (this .startAngle_ .getValue (), 0, Math .PI * 2),
865
- end = Algorithm .interval (this .endAngle_ .getValue (), 0, Math .PI * 2);
866
-
867
- if (start === end)
868
- return Math .PI * 2;
869
-
870
- var sweepAngle = Math .abs (end - start);
871
-
872
- if (start > end)
873
- return (Math .PI * 2) - sweepAngle;
874
-
875
- if (! isNaN (sweepAngle))
876
- return sweepAngle;
877
-
878
- // We must test for NAN, as NAN to int is undefined.
879
- return 0;
880
- },
881
- build: function ()
882
- {
883
- var
884
- gl = this .getBrowser () .getContext (),
885
- options = this .getBrowser () .getArc2DOptions (),
886
- dimension = options .dimension_ .getValue (),
887
- startAngle = this .startAngle_ .getValue (),
888
- radius = Math .abs (this .radius_ .getValue ()),
889
- sweepAngle = this .getSweepAngle (),
890
- circle = sweepAngle == (Math .PI * 2),
891
- steps = Math .floor (sweepAngle * dimension / (Math .PI * 2)),
892
- vertexArray = this .getVertices ();
893
-
894
- steps = Math .max (3, steps);
895
-
896
- if (! circle)
897
- {
898
- ++ steps;
899
- this .setPrimitiveMode (gl .LINE_STRIP);
900
- }
901
- else
902
- this .setPrimitiveMode (gl .LINE_LOOP);
903
-
904
- var steps_1 = circle ? steps : steps - 1;
905
-
906
- for (var n = 0; n < steps; ++ n)
907
- {
908
- var
909
- t = n / steps_1,
910
- theta = startAngle + (sweepAngle * t),
911
- point = Complex .Polar (radius, theta);
912
-
913
- vertexArray .push (point .real, point .imag, 0, 1);
914
- }
915
-
916
- this .getMin () .set (-radius, -radius, 0);
917
- this .getMax () .set ( radius, radius, 0);
918
-
919
- this .setSolid (false);
920
- },
921
- });
922
-
923
- return Arc2D;
822
+ function Arc2D (executionContext)
823
+ {
824
+ X3DLineGeometryNode .call (this, executionContext);
825
+
826
+ this .addType (X3DConstants .Arc2D);
827
+
828
+ this ._startAngle .setUnit ("angle");
829
+ this ._endAngle .setUnit ("angle");
830
+ this ._radius .setUnit ("length");
831
+ }
832
+
833
+ Arc2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .prototype),
834
+ {
835
+ constructor: Arc2D,
836
+ [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
837
+ new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
838
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "startAngle", new Fields .SFFloat ()),
839
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "endAngle", new Fields .SFFloat (1.5708)),
840
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "radius", new Fields .SFFloat (1)),
841
+ ]),
842
+ getTypeName: function ()
843
+ {
844
+ return "Arc2D";
845
+ },
846
+ getComponentName: function ()
847
+ {
848
+ return "Geometry2D";
849
+ },
850
+ getContainerField: function ()
851
+ {
852
+ return "geometry";
853
+ },
854
+ set_live__: function ()
855
+ {
856
+ X3DLineGeometryNode .prototype .set_live__ .call (this);
857
+
858
+ if (this .isLive () .getValue ())
859
+ this .getBrowser () .getArc2DOptions () .addInterest ("requestRebuild", this);
860
+ else
861
+ this .getBrowser () .getArc2DOptions () .removeInterest ("requestRebuild", this);
862
+ },
863
+ getSweepAngle: function ()
864
+ {
865
+ const
866
+ start = Algorithm .interval (this ._startAngle .getValue (), 0, Math .PI * 2),
867
+ end = Algorithm .interval (this ._endAngle .getValue (), 0, Math .PI * 2);
868
+
869
+ if (start === end)
870
+ return Math .PI * 2;
871
+
872
+ const sweepAngle = Math .abs (end - start);
873
+
874
+ if (start > end)
875
+ return (Math .PI * 2) - sweepAngle;
876
+
877
+ if (! isNaN (sweepAngle))
878
+ return sweepAngle;
879
+
880
+ // We must test for NAN, as NAN to int is undefined.
881
+ return 0;
882
+ },
883
+ build: function ()
884
+ {
885
+ const
886
+ options = this .getBrowser () .getArc2DOptions (),
887
+ dimension = options ._dimension .getValue (),
888
+ startAngle = this ._startAngle .getValue (),
889
+ radius = Math .abs (this ._radius .getValue ()),
890
+ sweepAngle = this .getSweepAngle (),
891
+ steps = Math .max (3, Math .floor (sweepAngle * dimension / (Math .PI * 2))),
892
+ vertexArray = this .getVertices ();
893
+
894
+ for (let n = 0; n < steps; ++ n)
895
+ {
896
+ const
897
+ t1 = n / steps,
898
+ theta1 = startAngle + (sweepAngle * t1),
899
+ point1 = Complex .Polar (radius, theta1),
900
+ t2 = (n + 1) / steps,
901
+ theta2 = startAngle + (sweepAngle * t2),
902
+ point2 = Complex .Polar (radius, theta2);
903
+
904
+ vertexArray .push (point1 .real, point1 .imag, 0, 1);
905
+ vertexArray .push (point2 .real, point2 .imag, 0, 1);
906
+ }
907
+
908
+ this .getMin () .set (-radius, -radius, 0);
909
+ this .getMax () .set ( radius, radius, 0);
910
+ },
911
+ });
912
+
913
+ return Arc2D;
924
914
  });
925
915
 
926
916
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -973,14 +963,13 @@ function (Fields,
973
963
 
974
964
 
975
965
  define ('x_ite/Components/Geometry2D/ArcClose2D',[
976
- "x_ite/Fields",
977
- "x_ite/Basic/X3DFieldDefinition",
978
- "x_ite/Basic/FieldDefinitionArray",
979
- "x_ite/Components/Rendering/X3DGeometryNode",
980
- "x_ite/Bits/X3DConstants",
981
- "standard/Math/Numbers/Complex",
982
- "standard/Math/Numbers/Vector3",
983
- "standard/Math/Algorithm",
966
+ "x_ite/Fields",
967
+ "x_ite/Base/X3DFieldDefinition",
968
+ "x_ite/Base/FieldDefinitionArray",
969
+ "x_ite/Components/Rendering/X3DGeometryNode",
970
+ "x_ite/Base/X3DConstants",
971
+ "standard/Math/Numbers/Complex",
972
+ "standard/Math/Algorithm",
984
973
  ],
985
974
  function (Fields,
986
975
  X3DFieldDefinition,
@@ -988,168 +977,167 @@ function (Fields,
988
977
  X3DGeometryNode,
989
978
  X3DConstants,
990
979
  Complex,
991
- Vector3,
992
980
  Algorithm)
993
981
  {
994
982
  "use strict";
995
983
 
996
- function ArcClose2D (executionContext)
997
- {
998
- X3DGeometryNode .call (this, executionContext);
999
-
1000
- this .addType (X3DConstants .ArcClose2D);
1001
-
1002
- this .setGeometryType (2);
1003
-
1004
- this .startAngle_ .setUnit ("angle");
1005
- this .endAngle_ .setUnit ("angle");
1006
- this .radius_ .setUnit ("length");
1007
- }
1008
-
1009
- ArcClose2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
1010
- {
1011
- constructor: ArcClose2D,
1012
- fieldDefinitions: new FieldDefinitionArray ([
1013
- new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1014
- new X3DFieldDefinition (X3DConstants .initializeOnly, "closureType", new Fields .SFString ("PIE")),
1015
- new X3DFieldDefinition (X3DConstants .initializeOnly, "startAngle", new Fields .SFFloat ()),
1016
- new X3DFieldDefinition (X3DConstants .initializeOnly, "endAngle", new Fields .SFFloat (1.5708)),
1017
- new X3DFieldDefinition (X3DConstants .initializeOnly, "radius", new Fields .SFFloat (1)),
1018
- new X3DFieldDefinition (X3DConstants .initializeOnly, "solid", new Fields .SFBool ()),
1019
- ]),
1020
- getTypeName: function ()
1021
- {
1022
- return "ArcClose2D";
1023
- },
1024
- getComponentName: function ()
1025
- {
1026
- return "Geometry2D";
1027
- },
1028
- getContainerField: function ()
1029
- {
1030
- return "geometry";
1031
- },
1032
- set_live__: function ()
1033
- {
1034
- X3DGeometryNode .prototype .set_live__ .call (this);
1035
-
1036
- if (this .isLive () .getValue ())
1037
- this .getBrowser () .getArcClose2DOptions () .addInterest ("requestRebuild", this);
1038
- else
1039
- this .getBrowser () .getArcClose2DOptions () .removeInterest ("requestRebuild", this);
1040
- },
1041
- getSweepAngle: function ()
1042
- {
1043
- var
1044
- start = Algorithm .interval (this .startAngle_ .getValue (), 0, Math .PI * 2),
1045
- end = Algorithm .interval (this .endAngle_ .getValue (), 0, Math .PI * 2);
1046
-
1047
- if (start === end)
1048
- return Math .PI * 2;
1049
-
1050
- var sweepAngle = Math .abs (end - start);
1051
-
1052
- if (start > end)
1053
- return (Math .PI * 2) - sweepAngle;
1054
-
1055
- if (! isNaN (sweepAngle))
1056
- return sweepAngle;
1057
-
1058
- // We must test for NAN, as NAN to int is undefined.
1059
- return 0;
1060
- },
1061
- build: (function ()
1062
- {
1063
- var half = new Complex (0.5, 0.5);
1064
-
1065
- return function ()
1066
- {
1067
- var
1068
- options = this .getBrowser () .getArcClose2DOptions (),
1069
- chord = this .closureType_ .getValue () === "CHORD",
1070
- dimension = options .dimension_ .getValue (),
1071
- startAngle = this .startAngle_ .getValue (),
1072
- radius = Math .abs (this .radius_ .getValue ()),
1073
- sweepAngle = this .getSweepAngle (),
1074
- steps = Math .max (4, Math .floor (sweepAngle * dimension / (Math .PI * 2))),
1075
- texCoordArray = this .getTexCoords (),
1076
- normalArray = this .getNormals (),
1077
- vertexArray = this .getVertices (),
1078
- texCoords = [ ],
1079
- points = [ ];
1080
-
1081
- this .getMultiTexCoords () .push (texCoordArray);
1082
-
1083
- var steps_1 = steps - 1;
1084
-
1085
- for (var n = 0; n < steps; ++ n)
1086
- {
1087
- var
1088
- t = n / steps_1,
1089
- theta = startAngle + (sweepAngle * t);
1090
-
1091
- texCoords .push (Complex .Polar (0.5, theta) .add (half));
1092
- points .push (Complex .Polar (radius, theta));
1093
- }
1094
-
1095
- if (chord)
1096
- {
1097
- var
1098
- t0 = texCoords [0],
1099
- p0 = points [0];
1100
-
1101
- for (var i = 1; i < steps_1; ++ i)
1102
- {
1103
- var
1104
- t1 = texCoords [i],
1105
- t2 = texCoords [i + 1],
1106
- p1 = points [i],
1107
- p2 = points [i + 1];
1108
-
1109
- texCoordArray .push (t0 .real, t0 .imag, 0, 1,
1110
- t1 .real, t1 .imag, 0, 1,
1111
- t2 .real, t2 .imag, 0, 1);
1112
-
1113
- normalArray .push (0, 0, 1,
1114
- 0, 0, 1,
1115
- 0, 0, 1);
1116
-
1117
- vertexArray .push (p0 .real, p0 .imag, 0, 1,
1118
- p1 .real, p1 .imag, 0, 1,
1119
- p2 .real, p2 .imag, 0, 1);
1120
- }
1121
- }
1122
- else
1123
- {
1124
- for (var i = 0; i < steps_1; ++ i)
1125
- {
1126
- var
1127
- t1 = texCoords [i],
1128
- t2 = texCoords [i + 1],
1129
- p1 = points [i],
1130
- p2 = points [i + 1];
1131
-
1132
- texCoordArray .push (0.5, 0.5, 0, 1,
1133
- t1 .real, t1 .imag, 0, 1,
1134
- t2 .real, t2 .imag, 0, 1);
1135
-
1136
- normalArray .push (0, 0, 1, 0, 0, 1, 0, 0, 1);
1137
-
1138
- vertexArray .push (0, 0, 0, 1,
1139
- p1 .real, p1 .imag, 0, 1,
1140
- p2 .real, p2 .imag, 0, 1);
1141
- }
1142
- }
1143
-
1144
- this .getMin () .set (-radius, -radius, 0);
1145
- this .getMax () .set ( radius, radius, 0);
1146
-
1147
- this .setSolid (this .solid_ .getValue ());
1148
- };
1149
- })(),
1150
- });
1151
-
1152
- return ArcClose2D;
984
+ function ArcClose2D (executionContext)
985
+ {
986
+ X3DGeometryNode .call (this, executionContext);
987
+
988
+ this .addType (X3DConstants .ArcClose2D);
989
+
990
+ this .setGeometryType (2);
991
+
992
+ this ._startAngle .setUnit ("angle");
993
+ this ._endAngle .setUnit ("angle");
994
+ this ._radius .setUnit ("length");
995
+ }
996
+
997
+ ArcClose2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
998
+ {
999
+ constructor: ArcClose2D,
1000
+ [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
1001
+ new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1002
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "closureType", new Fields .SFString ("PIE")),
1003
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "startAngle", new Fields .SFFloat ()),
1004
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "endAngle", new Fields .SFFloat (1.5708)),
1005
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "radius", new Fields .SFFloat (1)),
1006
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "solid", new Fields .SFBool ()),
1007
+ ]),
1008
+ getTypeName: function ()
1009
+ {
1010
+ return "ArcClose2D";
1011
+ },
1012
+ getComponentName: function ()
1013
+ {
1014
+ return "Geometry2D";
1015
+ },
1016
+ getContainerField: function ()
1017
+ {
1018
+ return "geometry";
1019
+ },
1020
+ set_live__: function ()
1021
+ {
1022
+ X3DGeometryNode .prototype .set_live__ .call (this);
1023
+
1024
+ if (this .isLive () .getValue ())
1025
+ this .getBrowser () .getArcClose2DOptions () .addInterest ("requestRebuild", this);
1026
+ else
1027
+ this .getBrowser () .getArcClose2DOptions () .removeInterest ("requestRebuild", this);
1028
+ },
1029
+ getSweepAngle: function ()
1030
+ {
1031
+ const
1032
+ start = Algorithm .interval (this ._startAngle .getValue (), 0, Math .PI * 2),
1033
+ end = Algorithm .interval (this ._endAngle .getValue (), 0, Math .PI * 2);
1034
+
1035
+ if (start === end)
1036
+ return Math .PI * 2;
1037
+
1038
+ const sweepAngle = Math .abs (end - start);
1039
+
1040
+ if (start > end)
1041
+ return (Math .PI * 2) - sweepAngle;
1042
+
1043
+ if (! isNaN (sweepAngle))
1044
+ return sweepAngle;
1045
+
1046
+ // We must test for NAN, as NAN to int is undefined.
1047
+ return 0;
1048
+ },
1049
+ build: (function ()
1050
+ {
1051
+ const half = new Complex (0.5, 0.5);
1052
+
1053
+ return function ()
1054
+ {
1055
+ const
1056
+ options = this .getBrowser () .getArcClose2DOptions (),
1057
+ chord = this ._closureType .getValue () === "CHORD",
1058
+ dimension = options ._dimension .getValue (),
1059
+ startAngle = this ._startAngle .getValue (),
1060
+ radius = Math .abs (this ._radius .getValue ()),
1061
+ sweepAngle = this .getSweepAngle (),
1062
+ steps = Math .max (4, Math .floor (sweepAngle * dimension / (Math .PI * 2))),
1063
+ texCoordArray = this .getTexCoords (),
1064
+ normalArray = this .getNormals (),
1065
+ vertexArray = this .getVertices (),
1066
+ texCoords = [ ],
1067
+ points = [ ];
1068
+
1069
+ this .getMultiTexCoords () .push (texCoordArray);
1070
+
1071
+ const steps_1 = steps - 1;
1072
+
1073
+ for (let n = 0; n < steps; ++ n)
1074
+ {
1075
+ const
1076
+ t = n / steps_1,
1077
+ theta = startAngle + (sweepAngle * t);
1078
+
1079
+ texCoords .push (Complex .Polar (0.5, theta) .add (half));
1080
+ points .push (Complex .Polar (radius, theta));
1081
+ }
1082
+
1083
+ if (chord)
1084
+ {
1085
+ const
1086
+ t0 = texCoords [0],
1087
+ p0 = points [0];
1088
+
1089
+ for (let i = 1; i < steps_1; ++ i)
1090
+ {
1091
+ const
1092
+ t1 = texCoords [i],
1093
+ t2 = texCoords [i + 1],
1094
+ p1 = points [i],
1095
+ p2 = points [i + 1];
1096
+
1097
+ texCoordArray .push (t0 .real, t0 .imag, 0, 1,
1098
+ t1 .real, t1 .imag, 0, 1,
1099
+ t2 .real, t2 .imag, 0, 1);
1100
+
1101
+ normalArray .push (0, 0, 1,
1102
+ 0, 0, 1,
1103
+ 0, 0, 1);
1104
+
1105
+ vertexArray .push (p0 .real, p0 .imag, 0, 1,
1106
+ p1 .real, p1 .imag, 0, 1,
1107
+ p2 .real, p2 .imag, 0, 1);
1108
+ }
1109
+ }
1110
+ else
1111
+ {
1112
+ for (let i = 0; i < steps_1; ++ i)
1113
+ {
1114
+ const
1115
+ t1 = texCoords [i],
1116
+ t2 = texCoords [i + 1],
1117
+ p1 = points [i],
1118
+ p2 = points [i + 1];
1119
+
1120
+ texCoordArray .push (0.5, 0.5, 0, 1,
1121
+ t1 .real, t1 .imag, 0, 1,
1122
+ t2 .real, t2 .imag, 0, 1);
1123
+
1124
+ normalArray .push (0, 0, 1, 0, 0, 1, 0, 0, 1);
1125
+
1126
+ vertexArray .push (0, 0, 0, 1,
1127
+ p1 .real, p1 .imag, 0, 1,
1128
+ p2 .real, p2 .imag, 0, 1);
1129
+ }
1130
+ }
1131
+
1132
+ this .getMin () .set (-radius, -radius, 0);
1133
+ this .getMax () .set ( radius, radius, 0);
1134
+
1135
+ this .setSolid (this ._solid .getValue ());
1136
+ };
1137
+ })(),
1138
+ });
1139
+
1140
+ return ArcClose2D;
1153
1141
  });
1154
1142
 
1155
1143
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -1202,11 +1190,11 @@ function (Fields,
1202
1190
 
1203
1191
 
1204
1192
  define ('x_ite/Components/Geometry2D/Circle2D',[
1205
- "x_ite/Fields",
1206
- "x_ite/Basic/X3DFieldDefinition",
1207
- "x_ite/Basic/FieldDefinitionArray",
1208
- "x_ite/Components/Rendering/X3DLineGeometryNode",
1209
- "x_ite/Bits/X3DConstants",
1193
+ "x_ite/Fields",
1194
+ "x_ite/Base/X3DFieldDefinition",
1195
+ "x_ite/Base/FieldDefinitionArray",
1196
+ "x_ite/Components/Rendering/X3DLineGeometryNode",
1197
+ "x_ite/Base/X3DConstants",
1210
1198
  ],
1211
1199
  function (Fields,
1212
1200
  X3DFieldDefinition,
@@ -1216,76 +1204,68 @@ function (Fields,
1216
1204
  {
1217
1205
  "use strict";
1218
1206
 
1219
- function Circle2D (executionContext)
1220
- {
1221
- X3DLineGeometryNode .call (this, executionContext);
1222
-
1223
- this .addType (X3DConstants .Circle2D);
1224
-
1225
- this .setGeometryType (1);
1226
-
1227
- this .radius_ .setUnit ("length");
1228
- }
1229
-
1230
- Circle2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .prototype),
1231
- {
1232
- constructor: Circle2D,
1233
- fieldDefinitions: new FieldDefinitionArray ([
1234
- new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1235
- new X3DFieldDefinition (X3DConstants .initializeOnly, "radius", new Fields .SFFloat (1)),
1236
- ]),
1237
- getTypeName: function ()
1238
- {
1239
- return "Circle2D";
1240
- },
1241
- getComponentName: function ()
1242
- {
1243
- return "Geometry2D";
1244
- },
1245
- getContainerField: function ()
1246
- {
1247
- return "geometry";
1248
- },
1249
- initialize: function ()
1250
- {
1251
- X3DLineGeometryNode .prototype .initialize .call (this);
1252
-
1253
- this .setPrimitiveMode (this .getBrowser () .getContext () .LINE_LOOP);
1254
- },
1255
- set_live__: function ()
1256
- {
1257
- X3DLineGeometryNode .prototype .set_live__ .call (this);
1258
-
1259
- if (this .isLive () .getValue ())
1260
- this .getBrowser () .getCircle2DOptions () .addInterest ("requestRebuild", this);
1261
- else
1262
- this .getBrowser () .getCircle2DOptions () .removeInterest ("requestRebuild", this);
1263
- },
1264
- build: function ()
1265
- {
1266
- var
1267
- options = this .getBrowser () .getCircle2DOptions (),
1268
- vertexArray = this .getVertices (),
1269
- radius = this .radius_ .getValue ();
1270
-
1271
- if (radius === 1)
1272
- {
1273
- this .setVertices (options .getVertices ());
1274
- }
1275
- else
1276
- {
1277
- var defaultVertices = options .getVertices () .getValue ();
1278
-
1279
- for (var i = 0, length = defaultVertices .length; i < length; i += 4)
1280
- vertexArray .push (defaultVertices [i] * radius, defaultVertices [i + 1] * radius, 0, 1);
1281
- }
1282
-
1283
- this .getMin () .set (-radius, -radius, 0);
1284
- this .getMax () .set ( radius, radius, 0);
1285
- },
1286
- });
1287
-
1288
- return Circle2D;
1207
+ function Circle2D (executionContext)
1208
+ {
1209
+ X3DLineGeometryNode .call (this, executionContext);
1210
+
1211
+ this .addType (X3DConstants .Circle2D);
1212
+
1213
+ this ._radius .setUnit ("length");
1214
+ }
1215
+
1216
+ Circle2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .prototype),
1217
+ {
1218
+ constructor: Circle2D,
1219
+ [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
1220
+ new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1221
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "radius", new Fields .SFFloat (1)),
1222
+ ]),
1223
+ getTypeName: function ()
1224
+ {
1225
+ return "Circle2D";
1226
+ },
1227
+ getComponentName: function ()
1228
+ {
1229
+ return "Geometry2D";
1230
+ },
1231
+ getContainerField: function ()
1232
+ {
1233
+ return "geometry";
1234
+ },
1235
+ set_live__: function ()
1236
+ {
1237
+ X3DLineGeometryNode .prototype .set_live__ .call (this);
1238
+
1239
+ if (this .isLive () .getValue ())
1240
+ this .getBrowser () .getCircle2DOptions () .addInterest ("requestRebuild", this);
1241
+ else
1242
+ this .getBrowser () .getCircle2DOptions () .removeInterest ("requestRebuild", this);
1243
+ },
1244
+ build: function ()
1245
+ {
1246
+ const
1247
+ options = this .getBrowser () .getCircle2DOptions (),
1248
+ vertexArray = this .getVertices (),
1249
+ radius = this ._radius .getValue ();
1250
+
1251
+ if (radius === 1)
1252
+ {
1253
+ this .setVertices (options .getVertices ());
1254
+ }
1255
+ else
1256
+ {
1257
+ const defaultVertices = options .getVertices () .getValue ();
1258
+
1259
+ for (let i = 0, length = defaultVertices .length; i < length; i += 4)
1260
+ vertexArray .push (defaultVertices [i] * radius, defaultVertices [i + 1] * radius, 0, 1);
1261
+ }
1262
+
1263
+ this .getMin () .set (-radius, -radius, 0);
1264
+ this .getMax () .set ( radius, radius, 0);
1265
+ },
1266
+ });
1267
+
1268
+ return Circle2D;
1289
1269
  });
1290
1270
 
1291
1271
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -1338,12 +1318,12 @@ function (Fields,
1338
1318
 
1339
1319
 
1340
1320
  define ('x_ite/Components/Geometry2D/Disk2D',[
1341
- "x_ite/Fields",
1342
- "x_ite/Basic/X3DFieldDefinition",
1343
- "x_ite/Basic/FieldDefinitionArray",
1344
- "x_ite/Components/Rendering/X3DGeometryNode",
1345
- "x_ite/Components/Rendering/X3DLineGeometryNode",
1346
- "x_ite/Bits/X3DConstants",
1321
+ "x_ite/Fields",
1322
+ "x_ite/Base/X3DFieldDefinition",
1323
+ "x_ite/Base/FieldDefinitionArray",
1324
+ "x_ite/Components/Rendering/X3DGeometryNode",
1325
+ "x_ite/Components/Rendering/X3DLineGeometryNode",
1326
+ "x_ite/Base/X3DConstants",
1347
1327
  ],
1348
1328
  function (Fields,
1349
1329
  X3DFieldDefinition,
@@ -1354,213 +1334,209 @@ function (Fields,
1354
1334
  {
1355
1335
  "use strict";
1356
1336
 
1357
- function Disk2D (executionContext)
1358
- {
1359
- X3DLineGeometryNode .call (this, executionContext);
1360
-
1361
- this .addType (X3DConstants .Disk2D);
1362
-
1363
- this .innerRadius_ .setUnit ("length");
1364
- this .outerRadius_ .setUnit ("length");
1365
- }
1366
-
1367
- Disk2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
1368
- //X3DLineGeometryNode .prototype, // Considered X3DLineGeometryNode.
1369
- {
1370
- constructor: Disk2D,
1371
- fieldDefinitions: new FieldDefinitionArray ([
1372
- new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1373
- new X3DFieldDefinition (X3DConstants .initializeOnly, "innerRadius", new Fields .SFFloat ()),
1374
- new X3DFieldDefinition (X3DConstants .initializeOnly, "outerRadius", new Fields .SFFloat (1)),
1375
- new X3DFieldDefinition (X3DConstants .initializeOnly, "solid", new Fields .SFBool ()),
1376
- ]),
1377
- getTypeName: function ()
1378
- {
1379
- return "Disk2D";
1380
- },
1381
- getComponentName: function ()
1382
- {
1383
- return "Geometry2D";
1384
- },
1385
- getContainerField: function ()
1386
- {
1387
- return "geometry";
1388
- },
1389
- initialize: function ()
1390
- {
1391
- X3DGeometryNode .prototype .initialize .call (this);
1392
-
1393
- this .setPrimitiveMode (this .getBrowser () .getContext () .LINE_LOOP);
1394
- },
1395
- set_live__: function ()
1396
- {
1397
- X3DGeometryNode .prototype .set_live__ .call (this);
1398
-
1399
- if (this .isLive () .getValue ())
1400
- this .getBrowser () .getDisk2DOptions () .addInterest ("requestRebuild", this);
1401
- else
1402
- this .getBrowser () .getDisk2DOptions () .removeInterest ("requestRebuild", this);
1403
- },
1404
- getShader: X3DLineGeometryNode .prototype .getShader,
1405
- build: function ()
1406
- {
1407
- const
1408
- options = this .getBrowser () .getDisk2DOptions (),
1409
- innerRadius = Math .min (Math .abs (this .innerRadius_ .getValue ()), Math .abs (this .outerRadius_ .getValue ())),
1410
- outerRadius = Math .max (Math .abs (this .innerRadius_ .getValue ()), Math .abs (this .outerRadius_ .getValue ()));
1411
-
1412
- if (innerRadius === outerRadius)
1413
- {
1414
- const vertexArray = this .getVertices ();
1415
-
1416
- // Point
1417
-
1418
- if (outerRadius === 0)
1419
- {
1420
- // vertexArray .push (0, 0, 0, 1);
1421
- // this .setGeometryType (0);
1422
- return;
1423
- }
1424
-
1425
- // Circle
1426
-
1427
- if (outerRadius === 1)
1428
- {
1429
- this .setVertices (options .getCircleVertices ());
1430
- }
1431
- else
1432
- {
1433
- const defaultVertices = options .getCircleVertices () .getValue ();
1434
-
1435
- for (let i = 0, length = defaultVertices .length; i < length; i += 4)
1436
- vertexArray .push (defaultVertices [i] * outerRadius, defaultVertices [i + 1] * outerRadius, 0, 1);
1437
- }
1438
-
1439
- this .getMin () .set (-outerRadius, -outerRadius, 0);
1440
- this .getMax () .set ( outerRadius, outerRadius, 0);
1441
-
1442
- this .setGeometryType (1);
1443
- return;
1444
- }
1445
-
1446
- if (innerRadius === 0)
1447
- {
1448
- // Disk
1449
-
1450
- this .getMultiTexCoords () .push (options .getDiskTexCoords ());
1451
- this .setNormals (options .getDiskNormals ());
1452
-
1453
- if (outerRadius === 1)
1454
- {
1455
- this .setVertices (options .getDiskVertices ());
1456
- }
1457
- else
1458
- {
1459
- const
1460
- defaultVertices = options .getDiskVertices () .getValue (),
1461
- vertexArray = this .getVertices ();
1462
-
1463
- for (let i = 0, length = defaultVertices .length; i < length; i += 4)
1464
- vertexArray .push (defaultVertices [i] * outerRadius, defaultVertices [i + 1] * outerRadius, 0, 1);
1465
- }
1466
-
1467
- this .getMin () .set (-outerRadius, -outerRadius, 0);
1468
- this .getMax () .set ( outerRadius, outerRadius, 0);
1469
-
1470
- this .setGeometryType (2);
1471
- this .setSolid (this .solid_ .getValue ());
1472
-
1473
- return;
1474
- }
1475
-
1476
- // Disk with hole
1477
-
1478
- const
1479
- scale = innerRadius / outerRadius,
1480
- offset = (1 - scale) / 2,
1481
- defaultTexCoords = options .getDiskTexCoords () .getValue (),
1482
- defaultVertices = options .getDiskVertices () .getValue (),
1483
- texCoordArray = this .getTexCoords (),
1484
- normalArray = this .getNormals (),
1485
- vertexArray = this .getVertices ();
1486
-
1487
- this .getMultiTexCoords () .push (texCoordArray);
1488
-
1489
- for (let i = 0, length = defaultVertices .length; i < length; i += 12)
1490
- {
1491
- texCoordArray .push (defaultTexCoords [i + 4] * scale + offset, defaultTexCoords [i + 5] * scale + offset, 0, 1,
1492
- defaultTexCoords [i + 4], defaultTexCoords [i + 5], 0, 1,
1493
- defaultTexCoords [i + 8], defaultTexCoords [i + 9], 0, 1,
1494
-
1495
- defaultTexCoords [i + 4] * scale + offset, defaultTexCoords [i + 5] * scale + offset, 0, 1,
1496
- defaultTexCoords [i + 8], defaultTexCoords [i + 9], 0, 1,
1497
- defaultTexCoords [i + 8] * scale + offset, defaultTexCoords [i + 9] * scale + offset, 0, 1);
1498
-
1499
- normalArray .push (0, 0, 1, 0, 0, 1, 0, 0, 1,
1337
+ function Disk2D (executionContext)
1338
+ {
1339
+ X3DLineGeometryNode .call (this, executionContext);
1340
+
1341
+ this .addType (X3DConstants .Disk2D);
1342
+
1343
+ this ._innerRadius .setUnit ("length");
1344
+ this ._outerRadius .setUnit ("length");
1345
+ }
1346
+
1347
+ Disk2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
1348
+ //X3DLineGeometryNode .prototype, // Considered X3DLineGeometryNode.
1349
+ {
1350
+ constructor: Disk2D,
1351
+ [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
1352
+ new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1353
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "innerRadius", new Fields .SFFloat ()),
1354
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "outerRadius", new Fields .SFFloat (1)),
1355
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "solid", new Fields .SFBool ()),
1356
+ ]),
1357
+ getTypeName: function ()
1358
+ {
1359
+ return "Disk2D";
1360
+ },
1361
+ getComponentName: function ()
1362
+ {
1363
+ return "Geometry2D";
1364
+ },
1365
+ getContainerField: function ()
1366
+ {
1367
+ return "geometry";
1368
+ },
1369
+ initialize: function ()
1370
+ {
1371
+ X3DGeometryNode .prototype .initialize .call (this);
1372
+ },
1373
+ set_live__: function ()
1374
+ {
1375
+ X3DGeometryNode .prototype .set_live__ .call (this);
1376
+
1377
+ if (this .isLive () .getValue ())
1378
+ this .getBrowser () .getDisk2DOptions () .addInterest ("requestRebuild", this);
1379
+ else
1380
+ this .getBrowser () .getDisk2DOptions () .removeInterest ("requestRebuild", this);
1381
+ },
1382
+ build: function ()
1383
+ {
1384
+ const
1385
+ options = this .getBrowser () .getDisk2DOptions (),
1386
+ innerRadius = Math .min (Math .abs (this ._innerRadius .getValue ()), Math .abs (this ._outerRadius .getValue ())),
1387
+ outerRadius = Math .max (Math .abs (this ._innerRadius .getValue ()), Math .abs (this ._outerRadius .getValue ()));
1388
+
1389
+ if (innerRadius === outerRadius)
1390
+ {
1391
+ const vertexArray = this .getVertices ();
1392
+
1393
+ // Point
1394
+
1395
+ if (outerRadius === 0)
1396
+ {
1397
+ // vertexArray .push (0, 0, 0, 1);
1398
+ // this .setGeometryType (0);
1399
+ return;
1400
+ }
1401
+
1402
+ // Circle
1403
+
1404
+ if (outerRadius === 1)
1405
+ {
1406
+ this .setVertices (options .getCircleVertices ());
1407
+ }
1408
+ else
1409
+ {
1410
+ const defaultVertices = options .getCircleVertices () .getValue ();
1411
+
1412
+ for (let i = 0, length = defaultVertices .length; i < length; i += 4)
1413
+ vertexArray .push (defaultVertices [i] * outerRadius, defaultVertices [i + 1] * outerRadius, 0, 1);
1414
+ }
1415
+
1416
+ this .getMin () .set (-outerRadius, -outerRadius, 0);
1417
+ this .getMax () .set ( outerRadius, outerRadius, 0);
1418
+
1419
+ this .setGeometryType (1);
1420
+ return;
1421
+ }
1422
+
1423
+ if (innerRadius === 0)
1424
+ {
1425
+ // Disk
1426
+
1427
+ this .getMultiTexCoords () .push (options .getDiskTexCoords ());
1428
+ this .setNormals (options .getDiskNormals ());
1429
+
1430
+ if (outerRadius === 1)
1431
+ {
1432
+ this .setVertices (options .getDiskVertices ());
1433
+ }
1434
+ else
1435
+ {
1436
+ const
1437
+ defaultVertices = options .getDiskVertices () .getValue (),
1438
+ vertexArray = this .getVertices ();
1439
+
1440
+ for (let i = 0, length = defaultVertices .length; i < length; i += 4)
1441
+ vertexArray .push (defaultVertices [i] * outerRadius, defaultVertices [i + 1] * outerRadius, 0, 1);
1442
+ }
1443
+
1444
+ this .getMin () .set (-outerRadius, -outerRadius, 0);
1445
+ this .getMax () .set ( outerRadius, outerRadius, 0);
1446
+
1447
+ this .setGeometryType (2);
1448
+ this .setSolid (this ._solid .getValue ());
1449
+ return;
1450
+ }
1451
+
1452
+ // Disk with hole
1453
+
1454
+ const
1455
+ scale = innerRadius / outerRadius,
1456
+ offset = (1 - scale) / 2,
1457
+ defaultTexCoords = options .getDiskTexCoords () .getValue (),
1458
+ defaultVertices = options .getDiskVertices () .getValue (),
1459
+ texCoordArray = this .getTexCoords (),
1460
+ normalArray = this .getNormals (),
1461
+ vertexArray = this .getVertices ();
1462
+
1463
+ this .getMultiTexCoords () .push (texCoordArray);
1464
+
1465
+ for (let i = 0, length = defaultVertices .length; i < length; i += 12)
1466
+ {
1467
+ texCoordArray .push (defaultTexCoords [i + 4] * scale + offset, defaultTexCoords [i + 5] * scale + offset, 0, 1,
1468
+ defaultTexCoords [i + 4], defaultTexCoords [i + 5], 0, 1,
1469
+ defaultTexCoords [i + 8], defaultTexCoords [i + 9], 0, 1,
1470
+
1471
+ defaultTexCoords [i + 4] * scale + offset, defaultTexCoords [i + 5] * scale + offset, 0, 1,
1472
+ defaultTexCoords [i + 8], defaultTexCoords [i + 9], 0, 1,
1473
+ defaultTexCoords [i + 8] * scale + offset, defaultTexCoords [i + 9] * scale + offset, 0, 1);
1474
+
1475
+ normalArray .push (0, 0, 1, 0, 0, 1, 0, 0, 1,
1500
1476
  0, 0, 1, 0, 0, 1, 0, 0, 1);
1501
1477
 
1502
- vertexArray .push (defaultVertices [i + 4] * innerRadius, defaultVertices [i + 5] * innerRadius, 0, 1,
1503
- defaultVertices [i + 4] * outerRadius, defaultVertices [i + 5] * outerRadius, 0, 1,
1504
- defaultVertices [i + 8] * outerRadius, defaultVertices [i + 9] * outerRadius, 0, 1,
1505
-
1506
- defaultVertices [i + 4] * innerRadius, defaultVertices [i + 5] * innerRadius, 0, 1,
1507
- defaultVertices [i + 8] * outerRadius, defaultVertices [i + 9] * outerRadius, 0, 1,
1508
- defaultVertices [i + 8] * innerRadius, defaultVertices [i + 9] * innerRadius, 0, 1);
1509
- }
1510
-
1511
- this .getMin () .set (-outerRadius, -outerRadius, 0);
1512
- this .getMax () .set ( outerRadius, outerRadius, 0);
1513
-
1514
- this .setGeometryType (2);
1515
- this .setSolid (this .solid_ .getValue ());
1516
- },
1517
- intersectsLine: function (line, clipPlanes, modelViewMatrix, intersections)
1518
- {
1519
- if (this .getGeometryType () < 2)
1520
- {
1521
- return X3DLineGeometryNode .prototype .intersectsLine .call (this, line, clipPlanes, modelViewMatrix, intersections);
1522
- }
1523
- else
1524
- {
1525
- return X3DGeometryNode .prototype .intersectsLine .call (this, line, clipPlanes, modelViewMatrix, intersections);
1526
- }
1527
- },
1528
- intersectsBox: function (box, clipPlanes, modelViewMatrix)
1529
- {
1530
- if (this .getGeometryType () < 2)
1531
- {
1532
- return X3DLineGeometryNode .prototype .intersectsBox .call (this, box, clipPlanes, modelViewMatrix);
1533
- }
1534
- else
1535
- {
1536
- return X3DGeometryNode .prototype .intersectsBox .call (this, box, clipPlanes, modelViewMatrix);
1537
- }
1538
- },
1539
- display: function (gl, context)
1540
- {
1541
- if (this .getGeometryType () < 2)
1542
- {
1543
- return X3DLineGeometryNode .prototype .display .call (this, gl, context);
1544
- }
1545
- else
1546
- {
1547
- return X3DGeometryNode .prototype .display .call (this, gl, context);
1548
- }
1549
- },
1550
- displayParticles: function (gl, context, particles, numParticles)
1551
- {
1552
- if (this .getGeometryType () < 2)
1553
- {
1554
- return X3DLineGeometryNode .prototype .displayParticles .call (this, gl, context, particles, numParticles);
1555
- }
1556
- else
1557
- {
1558
- return X3DGeometryNode .prototype .displayParticles .call (this, gl, context, particles, numParticles);
1559
- }
1560
- }
1561
- });
1562
-
1563
- return Disk2D;
1478
+ vertexArray .push (defaultVertices [i + 4] * innerRadius, defaultVertices [i + 5] * innerRadius, 0, 1,
1479
+ defaultVertices [i + 4] * outerRadius, defaultVertices [i + 5] * outerRadius, 0, 1,
1480
+ defaultVertices [i + 8] * outerRadius, defaultVertices [i + 9] * outerRadius, 0, 1,
1481
+
1482
+ defaultVertices [i + 4] * innerRadius, defaultVertices [i + 5] * innerRadius, 0, 1,
1483
+ defaultVertices [i + 8] * outerRadius, defaultVertices [i + 9] * outerRadius, 0, 1,
1484
+ defaultVertices [i + 8] * innerRadius, defaultVertices [i + 9] * innerRadius, 0, 1);
1485
+ }
1486
+
1487
+ this .getMin () .set (-outerRadius, -outerRadius, 0);
1488
+ this .getMax () .set ( outerRadius, outerRadius, 0);
1489
+
1490
+ this .setGeometryType (2);
1491
+ this .setSolid (this ._solid .getValue ());
1492
+ },
1493
+ intersectsLine: function (line, clipPlanes, modelViewMatrix, intersections)
1494
+ {
1495
+ if (this .getGeometryType () < 2)
1496
+ {
1497
+ return X3DLineGeometryNode .prototype .intersectsLine .call (this, line, clipPlanes, modelViewMatrix, intersections);
1498
+ }
1499
+ else
1500
+ {
1501
+ return X3DGeometryNode .prototype .intersectsLine .call (this, line, clipPlanes, modelViewMatrix, intersections);
1502
+ }
1503
+ },
1504
+ intersectsBox: function (box, clipPlanes, modelViewMatrix)
1505
+ {
1506
+ if (this .getGeometryType () < 2)
1507
+ {
1508
+ return X3DLineGeometryNode .prototype .intersectsBox .call (this, box, clipPlanes, modelViewMatrix);
1509
+ }
1510
+ else
1511
+ {
1512
+ return X3DGeometryNode .prototype .intersectsBox .call (this, box, clipPlanes, modelViewMatrix);
1513
+ }
1514
+ },
1515
+ display: function (gl, context)
1516
+ {
1517
+ if (this .getGeometryType () < 2)
1518
+ {
1519
+ return X3DLineGeometryNode .prototype .display .call (this, gl, context);
1520
+ }
1521
+ else
1522
+ {
1523
+ return X3DGeometryNode .prototype .display .call (this, gl, context);
1524
+ }
1525
+ },
1526
+ displayParticles: function (gl, context, particles, numParticles)
1527
+ {
1528
+ if (this .getGeometryType () < 2)
1529
+ {
1530
+ return X3DLineGeometryNode .prototype .displayParticles .call (this, gl, context, particles, numParticles);
1531
+ }
1532
+ else
1533
+ {
1534
+ return X3DGeometryNode .prototype .displayParticles .call (this, gl, context, particles, numParticles);
1535
+ }
1536
+ }
1537
+ });
1538
+
1539
+ return Disk2D;
1564
1540
  });
1565
1541
 
1566
1542
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -1613,11 +1589,11 @@ function (Fields,
1613
1589
 
1614
1590
 
1615
1591
  define ('x_ite/Components/Geometry2D/Polyline2D',[
1616
- "x_ite/Fields",
1617
- "x_ite/Basic/X3DFieldDefinition",
1618
- "x_ite/Basic/FieldDefinitionArray",
1619
- "x_ite/Components/Rendering/X3DLineGeometryNode",
1620
- "x_ite/Bits/X3DConstants",
1592
+ "x_ite/Fields",
1593
+ "x_ite/Base/X3DFieldDefinition",
1594
+ "x_ite/Base/FieldDefinitionArray",
1595
+ "x_ite/Components/Rendering/X3DLineGeometryNode",
1596
+ "x_ite/Base/X3DConstants",
1621
1597
  ],
1622
1598
  function (Fields,
1623
1599
  X3DFieldDefinition,
@@ -1627,58 +1603,49 @@ function (Fields,
1627
1603
  {
1628
1604
  "use strict";
1629
1605
 
1630
- function Polyline2D (executionContext)
1631
- {
1632
- X3DLineGeometryNode .call (this, executionContext);
1633
-
1634
- this .addType (X3DConstants .Polyline2D);
1635
-
1636
- this .setGeometryType (1);
1637
-
1638
- this .lineSegments_ .setUnit ("length");
1639
- }
1640
-
1641
- Polyline2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .prototype),
1642
- {
1643
- constructor: Polyline2D,
1644
- fieldDefinitions: new FieldDefinitionArray ([
1645
- new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1646
- new X3DFieldDefinition (X3DConstants .initializeOnly, "lineSegments", new Fields .MFVec2f ()),
1647
- ]),
1648
- getTypeName: function ()
1649
- {
1650
- return "Polyline2D";
1651
- },
1652
- getComponentName: function ()
1653
- {
1654
- return "Geometry2D";
1655
- },
1656
- getContainerField: function ()
1657
- {
1658
- return "geometry";
1659
- },
1660
- initialize: function ()
1661
- {
1662
- X3DLineGeometryNode .prototype .initialize .call (this);
1663
-
1664
- this .setPrimitiveMode (this .getBrowser () .getContext () .LINE_STRIP);
1665
- },
1666
- build: function ()
1667
- {
1668
- var
1669
- lineSegments = this .lineSegments_ .getValue (),
1670
- vertexArray = this .getVertices ();
1671
-
1672
- for (var i = 0, length = this .lineSegments_ .length * 2; i < length; i += 2)
1673
- {
1674
- vertexArray .push (lineSegments [i], lineSegments [i + 1], 0, 1);
1675
- }
1676
-
1677
- this .setSolid (false);
1678
- },
1679
- });
1680
-
1681
- return Polyline2D;
1606
+ function Polyline2D (executionContext)
1607
+ {
1608
+ X3DLineGeometryNode .call (this, executionContext);
1609
+
1610
+ this .addType (X3DConstants .Polyline2D);
1611
+
1612
+ this ._lineSegments .setUnit ("length");
1613
+ }
1614
+
1615
+ Polyline2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .prototype),
1616
+ {
1617
+ constructor: Polyline2D,
1618
+ [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
1619
+ new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1620
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "lineSegments", new Fields .MFVec2f ()),
1621
+ ]),
1622
+ getTypeName: function ()
1623
+ {
1624
+ return "Polyline2D";
1625
+ },
1626
+ getComponentName: function ()
1627
+ {
1628
+ return "Geometry2D";
1629
+ },
1630
+ getContainerField: function ()
1631
+ {
1632
+ return "geometry";
1633
+ },
1634
+ build: function ()
1635
+ {
1636
+ const
1637
+ lineSegments = this ._lineSegments .getValue (),
1638
+ vertexArray = this .getVertices ();
1639
+
1640
+ for (let i = 0, length = (this ._lineSegments .length - 1) * 2; i < length; i += 2)
1641
+ {
1642
+ vertexArray .push (lineSegments [i + 0], lineSegments [i + 1], 0, 1);
1643
+ vertexArray .push (lineSegments [i + 2], lineSegments [i + 3], 0, 1);
1644
+ }
1645
+ },
1646
+ });
1647
+
1648
+ return Polyline2D;
1682
1649
  });
1683
1650
 
1684
1651
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -1731,79 +1698,62 @@ function (Fields,
1731
1698
 
1732
1699
 
1733
1700
  define ('x_ite/Components/Geometry2D/Polypoint2D',[
1734
- "x_ite/Fields",
1735
- "x_ite/Basic/X3DFieldDefinition",
1736
- "x_ite/Basic/FieldDefinitionArray",
1737
- "x_ite/Components/Rendering/X3DLineGeometryNode",
1738
- "x_ite/Bits/X3DConstants",
1701
+ "x_ite/Fields",
1702
+ "x_ite/Base/X3DFieldDefinition",
1703
+ "x_ite/Base/FieldDefinitionArray",
1704
+ "x_ite/Components/Rendering/X3DPointGeometryNode",
1705
+ "x_ite/Base/X3DConstants",
1739
1706
  ],
1740
1707
  function (Fields,
1741
1708
  X3DFieldDefinition,
1742
1709
  FieldDefinitionArray,
1743
- X3DLineGeometryNode,
1710
+ X3DPointGeometryNode,
1744
1711
  X3DConstants)
1745
1712
  {
1746
1713
  "use strict";
1747
1714
 
1748
- function Polypoint2D (executionContext)
1749
- {
1750
- X3DLineGeometryNode .call (this, executionContext);
1751
-
1752
- this .addType (X3DConstants .Polypoint2D);
1753
-
1754
- this .setGeometryType (0);
1755
-
1756
- this .point_ .setUnit ("length");
1757
-
1758
- this .setTransparent (true);
1759
- }
1760
-
1761
- Polypoint2D .prototype = Object .assign (Object .create (X3DLineGeometryNode .prototype),
1762
- {
1763
- constructor: Polypoint2D,
1764
- fieldDefinitions: new FieldDefinitionArray ([
1765
- new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1766
- new X3DFieldDefinition (X3DConstants .inputOutput, "point", new Fields .MFVec2f ()),
1767
- ]),
1768
- getTypeName: function ()
1769
- {
1770
- return "Polypoint2D";
1771
- },
1772
- getComponentName: function ()
1773
- {
1774
- return "Geometry2D";
1775
- },
1776
- getContainerField: function ()
1777
- {
1778
- return "geometry";
1779
- },
1780
- initialize: function ()
1781
- {
1782
- X3DLineGeometryNode .prototype .initialize .call (this);
1783
-
1784
- var browser = this .getBrowser ();
1785
-
1786
- this .setPrimitiveMode (browser .getContext () .POINTS);
1787
- this .setSolid (false);
1788
- },
1789
- getShader: function (browser)
1790
- {
1791
- return browser .getPointShader ();
1792
- },
1793
- build: function ()
1794
- {
1795
- var
1796
- point = this .point_ .getValue (),
1797
- vertexArray = this .getVertices ();
1798
-
1799
- for (var i = 0, length = this .point_ .length * 2; i < length; i += 2)
1800
- {
1801
- vertexArray .push (point [i], point [i + 1], 0, 1);
1802
- }
1803
- },
1804
- });
1805
-
1806
- return Polypoint2D;
1715
+ function Polypoint2D (executionContext)
1716
+ {
1717
+ X3DPointGeometryNode .call (this, executionContext);
1718
+
1719
+ this .addType (X3DConstants .Polypoint2D);
1720
+
1721
+ this ._point .setUnit ("length");
1722
+ }
1723
+
1724
+ Polypoint2D .prototype = Object .assign (Object .create (X3DPointGeometryNode .prototype),
1725
+ {
1726
+ constructor: Polypoint2D,
1727
+ [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
1728
+ new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1729
+ new X3DFieldDefinition (X3DConstants .inputOutput, "point", new Fields .MFVec2f ()),
1730
+ ]),
1731
+ getTypeName: function ()
1732
+ {
1733
+ return "Polypoint2D";
1734
+ },
1735
+ getComponentName: function ()
1736
+ {
1737
+ return "Geometry2D";
1738
+ },
1739
+ getContainerField: function ()
1740
+ {
1741
+ return "geometry";
1742
+ },
1743
+ build: function ()
1744
+ {
1745
+ const
1746
+ point = this ._point .getValue (),
1747
+ vertexArray = this .getVertices ();
1748
+
1749
+ for (let i = 0, length = this ._point .length * 2; i < length; i += 2)
1750
+ {
1751
+ vertexArray .push (point [i], point [i + 1], 0, 1);
1752
+ }
1753
+ },
1754
+ });
1755
+
1756
+ return Polypoint2D;
1807
1757
  });
1808
1758
 
1809
1759
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -1856,100 +1806,103 @@ function (Fields,
1856
1806
 
1857
1807
 
1858
1808
  define ('x_ite/Components/Geometry2D/Rectangle2D',[
1859
- "x_ite/Fields",
1860
- "x_ite/Basic/X3DFieldDefinition",
1861
- "x_ite/Basic/FieldDefinitionArray",
1862
- "x_ite/Components/Rendering/X3DGeometryNode",
1863
- "x_ite/Bits/X3DConstants",
1864
- "standard/Math/Numbers/Vector2",
1865
- "standard/Math/Numbers/Vector3",
1809
+ "x_ite/Fields",
1810
+ "x_ite/Base/X3DFieldDefinition",
1811
+ "x_ite/Base/FieldDefinitionArray",
1812
+ "x_ite/Components/Rendering/X3DGeometryNode",
1813
+ "x_ite/Base/X3DConstants",
1814
+ "standard/Math/Numbers/Vector2",
1815
+ "standard/Math/Numbers/Vector3",
1866
1816
  ],
1867
1817
  function (Fields,
1868
1818
  X3DFieldDefinition,
1869
1819
  FieldDefinitionArray,
1870
- X3DGeometryNode,
1820
+ X3DGeometryNode,
1871
1821
  X3DConstants,
1872
1822
  Vector2,
1873
1823
  Vector3)
1874
1824
  {
1875
1825
  "use strict";
1876
1826
 
1877
- var defaultSize = new Vector2 (2, 2);
1878
-
1879
- function Rectangle2D (executionContext)
1880
- {
1881
- X3DGeometryNode .call (this, executionContext);
1882
-
1883
- this .addType (X3DConstants .Rectangle2D);
1884
-
1885
- this .setGeometryType (2);
1886
-
1887
- this .size_ .setUnit ("length");
1888
- }
1889
-
1890
- Rectangle2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
1891
- {
1892
- constructor: Rectangle2D,
1893
- fieldDefinitions: new FieldDefinitionArray ([
1894
- new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1895
- new X3DFieldDefinition (X3DConstants .initializeOnly, "size", new Fields .SFVec2f (2, 2)),
1896
- new X3DFieldDefinition (X3DConstants .initializeOnly, "solid", new Fields .SFBool ()),
1897
- ]),
1898
- getTypeName: function ()
1899
- {
1900
- return "Rectangle2D";
1901
- },
1902
- getComponentName: function ()
1903
- {
1904
- return "Geometry2D";
1905
- },
1906
- getContainerField: function ()
1907
- {
1908
- return "geometry";
1909
- },
1910
- build: function ()
1911
- {
1912
- var
1913
- options = this .getBrowser () .getRectangle2DOptions (),
1914
- geometry = options .getGeometry (),
1915
- size = this .size_ .getValue ();
1916
-
1917
- this .setMultiTexCoords (geometry .getMultiTexCoords ());
1918
- this .setNormals (geometry .getNormals ());
1919
-
1920
- if (size .equals (defaultSize))
1921
- {
1922
- this .setVertices (geometry .getVertices ());
1923
-
1924
- this .getMin () .assign (geometry .getMin ());
1925
- this .getMax () .assign (geometry .getMax ());
1926
- }
1927
- else
1928
- {
1929
- var
1930
- scale = Vector3 .divide (size, 2),
1931
- x = scale .x,
1932
- y = scale .y,
1933
- defaultVertices = geometry .getVertices () .getValue (),
1934
- vertexArray = this .getVertices ();
1935
-
1936
- for (var i = 0; i < defaultVertices .length; i += 4)
1937
- {
1938
- vertexArray .push (x * defaultVertices [i],
1939
- y * defaultVertices [i + 1],
1940
- defaultVertices [i + 2],
1941
- 1);
1942
- }
1943
-
1944
- this .getMin () .set (-x, -y, 0);
1945
- this .getMax () .set ( x, y, 0);
1946
- }
1947
-
1948
- this .setSolid (this .solid_ .getValue ());
1949
- },
1950
- });
1951
-
1952
- return Rectangle2D;
1827
+ function Rectangle2D (executionContext)
1828
+ {
1829
+ X3DGeometryNode .call (this, executionContext);
1830
+
1831
+ this .addType (X3DConstants .Rectangle2D);
1832
+
1833
+ this .setGeometryType (2);
1834
+
1835
+ this ._size .setUnit ("length");
1836
+ }
1837
+
1838
+ Rectangle2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
1839
+ {
1840
+ constructor: Rectangle2D,
1841
+ [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
1842
+ new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1843
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "size", new Fields .SFVec2f (2, 2)),
1844
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "solid", new Fields .SFBool ()),
1845
+ ]),
1846
+ getTypeName: function ()
1847
+ {
1848
+ return "Rectangle2D";
1849
+ },
1850
+ getComponentName: function ()
1851
+ {
1852
+ return "Geometry2D";
1853
+ },
1854
+ getContainerField: function ()
1855
+ {
1856
+ return "geometry";
1857
+ },
1858
+ build: (function ()
1859
+ {
1860
+ const defaultSize = new Vector2 (2, 2);
1861
+
1862
+ return function ()
1863
+ {
1864
+ const
1865
+ options = this .getBrowser () .getRectangle2DOptions (),
1866
+ geometry = options .getGeometry (),
1867
+ size = this ._size .getValue ();
1868
+
1869
+ this .setMultiTexCoords (geometry .getMultiTexCoords ());
1870
+ this .setNormals (geometry .getNormals ());
1871
+
1872
+ if (size .equals (defaultSize))
1873
+ {
1874
+ this .setVertices (geometry .getVertices ());
1875
+
1876
+ this .getMin () .assign (geometry .getMin ());
1877
+ this .getMax () .assign (geometry .getMax ());
1878
+ }
1879
+ else
1880
+ {
1881
+ const
1882
+ scale = Vector3 .divide (size, 2),
1883
+ x = scale .x,
1884
+ y = scale .y,
1885
+ defaultVertices = geometry .getVertices () .getValue (),
1886
+ vertexArray = this .getVertices ();
1887
+
1888
+ for (let i = 0; i < defaultVertices .length; i += 4)
1889
+ {
1890
+ vertexArray .push (x * defaultVertices [i],
1891
+ y * defaultVertices [i + 1],
1892
+ 0,
1893
+ 1);
1894
+ }
1895
+
1896
+ this .getMin () .set (-x, -y, 0);
1897
+ this .getMax () .set ( x, y, 0);
1898
+ }
1899
+
1900
+ this .setSolid (this ._solid .getValue ());
1901
+ };
1902
+ })(),
1903
+ });
1904
+
1905
+ return Rectangle2D;
1953
1906
  });
1954
1907
 
1955
1908
  /* -*- Mode: JavaScript; coding: utf-8; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 3 -*-
@@ -2002,96 +1955,94 @@ function (Fields,
2002
1955
 
2003
1956
 
2004
1957
  define ('x_ite/Components/Geometry2D/TriangleSet2D',[
2005
- "x_ite/Fields",
2006
- "x_ite/Basic/X3DFieldDefinition",
2007
- "x_ite/Basic/FieldDefinitionArray",
2008
- "x_ite/Components/Rendering/X3DGeometryNode",
2009
- "x_ite/Bits/X3DConstants",
2010
- "standard/Math/Numbers/Vector3",
1958
+ "x_ite/Fields",
1959
+ "x_ite/Base/X3DFieldDefinition",
1960
+ "x_ite/Base/FieldDefinitionArray",
1961
+ "x_ite/Components/Rendering/X3DGeometryNode",
1962
+ "x_ite/Base/X3DConstants",
2011
1963
  ],
2012
1964
  function (Fields,
2013
1965
  X3DFieldDefinition,
2014
1966
  FieldDefinitionArray,
2015
1967
  X3DGeometryNode,
2016
- X3DConstants,
2017
- Vector3)
1968
+ X3DConstants)
2018
1969
  {
2019
1970
  "use strict";
2020
1971
 
2021
- function TriangleSet2D (executionContext)
2022
- {
2023
- X3DGeometryNode .call (this, executionContext);
2024
-
2025
- this .addType (X3DConstants .TriangleSet2D);
2026
-
2027
- this .setGeometryType (2);
2028
-
2029
- this .vertices_ .setUnit ("length");
2030
- }
2031
-
2032
- TriangleSet2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
2033
- {
2034
- constructor: TriangleSet2D,
2035
- fieldDefinitions: new FieldDefinitionArray ([
2036
- new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
2037
- new X3DFieldDefinition (X3DConstants .inputOutput, "vertices", new Fields .MFVec2f ()),
2038
- new X3DFieldDefinition (X3DConstants .initializeOnly, "solid", new Fields .SFBool ()),
2039
- ]),
2040
- getTypeName: function ()
2041
- {
2042
- return "TriangleSet2D";
2043
- },
2044
- getComponentName: function ()
2045
- {
2046
- return "Geometry2D";
2047
- },
2048
- getContainerField: function ()
2049
- {
2050
- return "geometry";
2051
- },
2052
- build: function ()
2053
- {
2054
- var
2055
- vertices = this .vertices_ .getValue (),
2056
- normalArray = this .getNormals (),
2057
- vertexArray = this .getVertices ();
2058
-
2059
- for (var i = 0, length = this .vertices_ .length * 2; i < length; i += 2)
2060
- {
2061
- normalArray .push (0, 0, 1);
2062
- vertexArray .push (vertices [i], vertices [i + 1], 0, 1);
2063
- }
2064
-
2065
- this .setSolid (this .solid_ .getValue ());
2066
- },
2067
- buildTexCoords: function ()
2068
- {
2069
- var texCoordArray = this .getTexCoords ();
2070
-
2071
- if (texCoordArray .length === 0)
2072
- {
2073
- var
2074
- p = this .getTexCoordParams (),
2075
- min = p .min,
2076
- Ssize = p .Ssize,
2077
- vertexArray = this .getVertices () .getValue ();
2078
-
2079
- for (var i = 0, length = vertexArray .length; i < length; i += 4)
2080
- {
2081
- texCoordArray .push ((vertexArray [i] - min [0]) / Ssize,
2082
- (vertexArray [i + 1] - min [1]) / Ssize,
2083
- 0,
2084
- 1);
2085
- }
2086
-
2087
- texCoordArray .shrinkToFit ();
2088
- }
2089
-
2090
- return texCoordArray;
2091
- },
2092
- });
2093
-
2094
- return TriangleSet2D;
1972
+ function TriangleSet2D (executionContext)
1973
+ {
1974
+ X3DGeometryNode .call (this, executionContext);
1975
+
1976
+ this .addType (X3DConstants .TriangleSet2D);
1977
+
1978
+ this .setGeometryType (2);
1979
+
1980
+ this ._vertices .setUnit ("length");
1981
+ }
1982
+
1983
+ TriangleSet2D .prototype = Object .assign (Object .create (X3DGeometryNode .prototype),
1984
+ {
1985
+ constructor: TriangleSet2D,
1986
+ [Symbol .for ("X_ITE.X3DBaseNode.fieldDefinitions")]: new FieldDefinitionArray ([
1987
+ new X3DFieldDefinition (X3DConstants .inputOutput, "metadata", new Fields .SFNode ()),
1988
+ new X3DFieldDefinition (X3DConstants .inputOutput, "vertices", new Fields .MFVec2f ()),
1989
+ new X3DFieldDefinition (X3DConstants .initializeOnly, "solid", new Fields .SFBool ()),
1990
+ ]),
1991
+ getTypeName: function ()
1992
+ {
1993
+ return "TriangleSet2D";
1994
+ },
1995
+ getComponentName: function ()
1996
+ {
1997
+ return "Geometry2D";
1998
+ },
1999
+ getContainerField: function ()
2000
+ {
2001
+ return "geometry";
2002
+ },
2003
+ build: function ()
2004
+ {
2005
+ const
2006
+ vertices = this ._vertices .getValue (),
2007
+ normalArray = this .getNormals (),
2008
+ vertexArray = this .getVertices ();
2009
+
2010
+ for (let i = 0, length = this ._vertices .length * 2; i < length; i += 2)
2011
+ {
2012
+ normalArray .push (0, 0, 1);
2013
+ vertexArray .push (vertices [i], vertices [i + 1], 0, 1);
2014
+ }
2015
+
2016
+ this .setSolid (this ._solid .getValue ());
2017
+ },
2018
+ buildTexCoords: function ()
2019
+ {
2020
+ const texCoordArray = this .getTexCoords ();
2021
+
2022
+ if (texCoordArray .length === 0)
2023
+ {
2024
+ const
2025
+ p = this .getTexCoordParams (),
2026
+ min = p .min,
2027
+ Ssize = p .Ssize,
2028
+ vertexArray = this .getVertices () .getValue ();
2029
+
2030
+ for (let i = 0, length = vertexArray .length; i < length; i += 4)
2031
+ {
2032
+ texCoordArray .push ((vertexArray [i] - min [0]) / Ssize,
2033
+ (vertexArray [i + 1] - min [1]) / Ssize,
2034
+ 0,
2035
+ 1);
2036
+ }
2037
+
2038
+ texCoordArray .shrinkToFit ();
2039
+ }
2040
+
2041
+ return texCoordArray;
2042
+ },
2043
+ });
2044
+
2045
+ return TriangleSet2D;
2095
2046
  });
2096
2047
 
2097
2048
  /*******************************************************************************
@@ -2143,16 +2094,16 @@ function (Fields,
2143
2094
 
2144
2095
 
2145
2096
  define (require .getComponentUrl ("geometry2d"), [
2146
- "x_ite/Components",
2147
- "x_ite/Browser/Geometry2D/X3DGeometry2DContext",
2148
- "x_ite/Components/Geometry2D/Arc2D",
2149
- "x_ite/Components/Geometry2D/ArcClose2D",
2150
- "x_ite/Components/Geometry2D/Circle2D",
2151
- "x_ite/Components/Geometry2D/Disk2D",
2152
- "x_ite/Components/Geometry2D/Polyline2D",
2153
- "x_ite/Components/Geometry2D/Polypoint2D",
2154
- "x_ite/Components/Geometry2D/Rectangle2D",
2155
- "x_ite/Components/Geometry2D/TriangleSet2D",
2097
+ "x_ite/Components",
2098
+ "x_ite/Browser/Geometry2D/X3DGeometry2DContext",
2099
+ "x_ite/Components/Geometry2D/Arc2D",
2100
+ "x_ite/Components/Geometry2D/ArcClose2D",
2101
+ "x_ite/Components/Geometry2D/Circle2D",
2102
+ "x_ite/Components/Geometry2D/Disk2D",
2103
+ "x_ite/Components/Geometry2D/Polyline2D",
2104
+ "x_ite/Components/Geometry2D/Polypoint2D",
2105
+ "x_ite/Components/Geometry2D/Rectangle2D",
2106
+ "x_ite/Components/Geometry2D/TriangleSet2D",
2156
2107
  ],
2157
2108
  function (Components,
2158
2109
  X3DGeometry2DContext,
@@ -2167,26 +2118,25 @@ function (Components,
2167
2118
  {
2168
2119
  "use strict";
2169
2120
 
2170
- Components .addComponent ({
2171
- name: "Geometry2D",
2172
- types:
2173
- {
2174
- Arc2D: Arc2D,
2175
- ArcClose2D: ArcClose2D,
2176
- Circle2D: Circle2D,
2177
- Disk2D: Disk2D,
2178
- Polyline2D: Polyline2D,
2179
- Polypoint2D: Polypoint2D,
2180
- Rectangle2D: Rectangle2D,
2181
- TriangleSet2D: TriangleSet2D,
2182
- },
2183
- abstractTypes:
2184
- {
2185
- },
2186
- browser: X3DGeometry2DContext,
2187
- });
2121
+ Components .addComponent ({
2122
+ name: "Geometry2D",
2123
+ types:
2124
+ {
2125
+ Arc2D: Arc2D,
2126
+ ArcClose2D: ArcClose2D,
2127
+ Circle2D: Circle2D,
2128
+ Disk2D: Disk2D,
2129
+ Polyline2D: Polyline2D,
2130
+ Polypoint2D: Polypoint2D,
2131
+ Rectangle2D: Rectangle2D,
2132
+ TriangleSet2D: TriangleSet2D,
2133
+ },
2134
+ abstractTypes:
2135
+ {
2136
+ },
2137
+ browser: X3DGeometry2DContext,
2138
+ });
2188
2139
  });
2189
2140
 
2190
2141
 
2191
-
2192
2142
  })();