x_ite 4.7.5 → 4.7.9

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 (157) hide show
  1. package/.vscode/launch.json +15 -0
  2. package/.vscode/settings.json +2 -5
  3. package/Makefile +1 -0
  4. package/README.md +1 -1
  5. package/build/components/annotation.build.js +2 -2
  6. package/build/components/cad-geometry.build.js +2 -2
  7. package/build/components/cube-map-texturing.build.js +2 -2
  8. package/build/components/dis.build.js +2 -2
  9. package/build/components/event-utilities.build.js +2 -2
  10. package/build/components/geometry2d.build.js +2 -2
  11. package/build/components/geospatial.build.js +2 -2
  12. package/build/components/h-anim.build.js +2 -2
  13. package/build/components/key-device-sensor.build.js +2 -2
  14. package/build/components/layout.build.js +2 -2
  15. package/build/components/nurbs.build.js +2 -2
  16. package/build/components/particle-systems.build.js +2 -2
  17. package/build/components/picking.build.js +2 -2
  18. package/build/components/projective-texture-mapping.build.js +2 -2
  19. package/build/components/rigid-body-physics.build.js +2 -2
  20. package/build/components/scripting.build.js +2 -2
  21. package/build/components/texturing-3d.build.js +2 -2
  22. package/build/components/volume-rendering.build.js +2 -2
  23. package/build/components/x_ite.build.js +2 -2
  24. package/build/parts/default.end.frag.js +2 -0
  25. package/build/parts/default.start.frag.js +8 -0
  26. package/build/parts/{x_ite.end.frag → x_ite.end.frag.js} +4 -2
  27. package/build/parts/x_ite.start.frag.js +16 -0
  28. package/build/x_ite.build.js +2 -2
  29. package/dist/assets/components/annotation.js +9 -7
  30. package/dist/assets/components/annotation.min.js +1 -1
  31. package/dist/assets/components/cad-geometry.js +9 -7
  32. package/dist/assets/components/cad-geometry.min.js +1 -1
  33. package/dist/assets/components/cube-map-texturing.js +9 -7
  34. package/dist/assets/components/cube-map-texturing.min.js +1 -1
  35. package/dist/assets/components/dis.js +9 -7
  36. package/dist/assets/components/dis.min.js +1 -1
  37. package/dist/assets/components/event-utilities.js +9 -7
  38. package/dist/assets/components/event-utilities.min.js +1 -1
  39. package/dist/assets/components/geometry2d.js +9 -7
  40. package/dist/assets/components/geometry2d.min.js +1 -1
  41. package/dist/assets/components/geospatial.js +9 -7
  42. package/dist/assets/components/geospatial.min.js +2 -2
  43. package/dist/assets/components/h-anim.js +9 -7
  44. package/dist/assets/components/h-anim.min.js +1 -1
  45. package/dist/assets/components/key-device-sensor.js +9 -7
  46. package/dist/assets/components/key-device-sensor.min.js +1 -1
  47. package/dist/assets/components/layout.js +9 -7
  48. package/dist/assets/components/layout.min.js +1 -1
  49. package/dist/assets/components/nurbs.js +9 -7
  50. package/dist/assets/components/nurbs.min.js +2 -2
  51. package/dist/assets/components/particle-systems.js +9 -7
  52. package/dist/assets/components/particle-systems.min.js +2 -2
  53. package/dist/assets/components/picking.js +13 -11
  54. package/dist/assets/components/picking.min.js +1 -1
  55. package/dist/assets/components/projective-texture-mapping.js +9 -7
  56. package/dist/assets/components/projective-texture-mapping.min.js +1 -1
  57. package/dist/assets/components/rigid-body-physics.js +9 -7
  58. package/dist/assets/components/rigid-body-physics.min.js +17 -17
  59. package/dist/assets/components/scripting.js +16 -9
  60. package/dist/assets/components/scripting.min.js +1 -1
  61. package/dist/assets/components/texturing-3d.js +9 -7
  62. package/dist/assets/components/texturing-3d.min.js +3 -3
  63. package/dist/assets/components/volume-rendering.js +11 -9
  64. package/dist/assets/components/volume-rendering.min.js +3 -3
  65. package/dist/assets/components/x_ite.js +9 -7
  66. package/dist/assets/components/x_ite.min.js +1 -1
  67. package/dist/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
  68. package/dist/assets/shaders/webgl1/Gouraud.vs +0 -1
  69. package/dist/assets/shaders/webgl1/Phong.fs +0 -1
  70. package/dist/assets/shaders/webgl1/Unlit.fs +0 -3
  71. package/dist/assets/shaders/webgl2/Gouraud.vs +0 -1
  72. package/dist/assets/shaders/webgl2/Phong.fs +0 -1
  73. package/dist/assets/shaders/webgl2/Unlit.fs +0 -3
  74. package/dist/example.html +2 -2
  75. package/dist/x_ite.css +4 -3
  76. package/dist/x_ite.js +28281 -27706
  77. package/dist/x_ite.min.js +41 -41
  78. package/dist/x_ite.zip +0 -0
  79. package/docs/Accessing-the-External-Browser.md +32 -3
  80. package/docs/Custom-Shaders.md +165 -174
  81. package/docs/What's-New.md +61 -6
  82. package/docs/_config.yml +1 -1
  83. package/docs/index.md +21 -14
  84. package/docs/reference/Browser-Services.md +36 -8
  85. package/docs/reference/Script-Node-Authoring-Interface.md +12 -4
  86. package/package.json +13 -6
  87. package/src/assets/components/picking.js +2 -2
  88. package/src/assets/components/volume-rendering.js +2 -2
  89. package/src/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
  90. package/src/assets/shaders/webgl1/Gouraud.vs +0 -1
  91. package/src/assets/shaders/webgl1/Phong.fs +0 -1
  92. package/src/assets/shaders/webgl1/Unlit.fs +0 -3
  93. package/src/assets/shaders/webgl2/Gouraud.vs +0 -1
  94. package/src/assets/shaders/webgl2/Phong.fs +0 -1
  95. package/src/assets/shaders/webgl2/Unlit.fs +0 -3
  96. package/src/bookmarks.js +8 -11
  97. package/src/examples.js +1 -1
  98. package/src/locale/de.po +19 -75
  99. package/src/locale/fr.po +18 -75
  100. package/src/standard/Time/MicroTime.js +3 -1
  101. package/src/standard/Utility/DataStorage.js +7 -10
  102. package/src/tests.js +2 -1
  103. package/src/x_ite/Browser/Core/BrowserOptions.js +40 -28
  104. package/src/x_ite/Browser/Core/BrowserTimings.js +13 -24
  105. package/src/x_ite/Browser/Core/ContextMenu.js +26 -12
  106. package/src/x_ite/Browser/Core/X3DCoreContext.js +95 -42
  107. package/src/x_ite/Browser/Navigation/ExamineViewer.js +3 -0
  108. package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -0
  109. package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -0
  110. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -0
  111. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +1 -3
  112. package/src/x_ite/Browser/Networking/urls.js +25 -0
  113. package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
  114. package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +4 -1
  115. package/src/x_ite/Browser/Shaders/ShaderTest.js +3 -3
  116. package/src/x_ite/Browser/VERSION.js +1 -1
  117. package/src/x_ite/Browser/X3DBrowser.js +70 -50
  118. package/src/x_ite/Components/Grouping/Switch.js +1 -1
  119. package/src/x_ite/Components/Lighting/DirectionalLight.js +1 -1
  120. package/src/x_ite/Components/Navigation/Collision.js +1 -1
  121. package/src/x_ite/Components/Navigation/LOD.js +1 -1
  122. package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
  123. package/src/x_ite/Components/Rendering/X3DGeometryNode.js +25 -11
  124. package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +35 -1
  125. package/src/x_ite/Components/Scripting/Script.js +7 -2
  126. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +10 -12
  127. package/src/x_ite/Components/Shaders.js +9 -9
  128. package/src/x_ite/Execution/X3DExecutionContext.js +9 -11
  129. package/src/x_ite/Fields/SFColor.js +20 -7
  130. package/src/x_ite/Fields/SFColorRGBA.js +6 -6
  131. package/src/x_ite/Fields/SFDouble.js +2 -2
  132. package/src/x_ite/Fields/SFFloat.js +2 -2
  133. package/src/x_ite/Fields/SFImage.js +13 -13
  134. package/src/x_ite/Fields/SFMatrix3.js +5 -5
  135. package/src/x_ite/Fields/SFMatrix4.js +6 -6
  136. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +14 -3
  137. package/src/x_ite/Fields/SFNode.js +23 -19
  138. package/src/x_ite/Fields/SFNodeCache.js +14 -10
  139. package/src/x_ite/Fields/SFRotation.js +10 -10
  140. package/src/x_ite/Fields/SFString.js +1 -1
  141. package/src/x_ite/Fields/SFTime.js +1 -1
  142. package/src/x_ite/Fields/SFVec2.js +6 -6
  143. package/src/x_ite/Fields/SFVec3.js +7 -7
  144. package/src/x_ite/Fields/SFVec4.js +8 -8
  145. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +7 -6
  146. package/src/x_ite/InputOutput/Generator.js +85 -65
  147. package/src/x_ite/Parser/X3DParser.js +6 -0
  148. package/src/x_ite/Parser/XMLParser.js +1 -1
  149. package/src/x_ite/X3D.js +8 -2
  150. package/src/x_ite.config.js +0 -5
  151. package/src/x_ite.css +2 -1
  152. package/src/x_ite.html +3 -3
  153. package/src/x_ite.js +21 -12
  154. package/x_ite.min.html +3 -3
  155. package/build/parts/default.end.frag +0 -2
  156. package/build/parts/default.start.frag +0 -6
  157. package/build/parts/x_ite.start.frag +0 -8
@@ -1,5 +1,60 @@
1
1
  # What's New
2
2
 
3
+ ## X\_ITE v4.7.7 Released
4
+
5
+ *Leipzig, 30th January 2022*: This release is primarily a bug fix release, but there are also new features.
6
+
7
+ {% capture notice-text %}
8
+ #### New Features
9
+
10
+ - Output XML or VRML encoding when viewpoint is copied.
11
+ - Added browser option "Timings", but removed attribute.
12
+ - Return promise from X3D function.
13
+
14
+ {% endcapture %}
15
+ <div class="notice--success">{{ notice-text | markdownify }}</div>
16
+
17
+ {% capture notice-text %}
18
+ #### Bug Fixes
19
+
20
+ - Prevent accidental navigation when context menu is closed.
21
+ - Fixed copy to clipboard of viewpoint when in fullscreen mode.
22
+
23
+ {% endcapture %}
24
+ <div class="notice--success">{{ notice-text | markdownify }}</div>
25
+
26
+ ## X\_ITE v4.7.6 Released
27
+
28
+ *Leipzig, 23th January 2022*: This release implements the new X3Dv4 UnlitMaterial. This also means that the custom shader interface has changed:
29
+
30
+ - Depreciated x3d_FrontMaterial in favor of x3d_Material uniform.
31
+ - Removed x3d_BackMaterial uniform.
32
+ - Removed x3d_Lighting uniform.
33
+ - Removed x3d_SeparateBackColors uniform.
34
+
35
+ {% capture notice-text %}
36
+ #### New Features
37
+
38
+ - Added X3DSingleTextureNode class.
39
+ - Added X3DSingleTextureTransformNode class.
40
+ - Added X3DSingleTextureCoordinateNode class.
41
+ - Added UnlitMaterial class.
42
+ - Implemented Appearance *backMaterial* field.
43
+
44
+ {% endcapture %}
45
+ <div class="notice--success">{{ notice-text | markdownify }}</div>
46
+
47
+ {% capture notice-text %}
48
+ #### Bug Fixes
49
+
50
+ - Fixed bug in aliases handling and proto nodes setup.
51
+ - Fixed bug in initialization of TextureTransformMatrix3D.
52
+ - Fixed wireframe mode for geometry.
53
+ - Optimized POINT shading.
54
+
55
+ {% endcapture %}
56
+ <div class="notice--success">{{ notice-text | markdownify }}</div>
57
+
3
58
  ## X\_ITE v4.7.3 Released
4
59
 
5
60
  *Leipzig, 16th January 2022*: This release fixes bugs, and a lot of code clean up has been done.
@@ -184,7 +239,7 @@ This release also increased pure rendering speed (without routing and scripting)
184
239
  {% capture notice-text %}
185
240
  #### Bug Fixes
186
241
 
187
- - Fixed a bug in X3DViepointNode when the viewpoint is animated.
242
+ - Fixed a bug in X3DViewpointNode when the viewpoint is animated.
188
243
 
189
244
  {% endcapture %}
190
245
  <div class="notice--success">{{ notice-text | markdownify }}</div>
@@ -535,7 +590,7 @@ This release also increased pure rendering speed (without routing and scripting)
535
590
  - Implemented MultiTexture, MultiTextureTransform, and MultiTextureCoordinate.
536
591
  - Implemented FillProperties.
537
592
  - Faster startup of browser.
538
- - Better transitions with OthoViewpoint.
593
+ - Better transitions with OrthoViewpoint.
539
594
 
540
595
  {% endcapture %}
541
596
  <div class="notice--success">{{ notice-text | markdownify }}</div>
@@ -842,7 +897,7 @@ for more information. Additionally we tested X\_ITE against <http://www.web3d.or
842
897
 
843
898
  ## X\_ITE v4.2.8 Released
844
899
 
845
- *Leipzig, 31th Oktober 2018:* The X3DCanvas element has now the onload, onshutdown, and onerror attributes and properties. There is also jQuery support for these event handler when calling jQuery.fn.on and jQuery.fn.off:
900
+ *Leipzig, 31th October 2018:* The X3DCanvas element has now the onload, onshutdown, and onerror attributes and properties. There is also jQuery support for these event handler when calling jQuery.fn.on and jQuery.fn.off:
846
901
 
847
902
  ```js
848
903
  const element = $("X3DCanvas");
@@ -870,7 +925,7 @@ element .on ("load", function () { console .log ("load, yeah"); });
870
925
 
871
926
  ## X\_ITE v4.2.7 Released
872
927
 
873
- *Leipzig, 29th Oktober 2018:* This version fixes some important bugs and makes X\_ITE more specification conform.
928
+ *Leipzig, 29th October 2018:* This version fixes some important bugs and makes X\_ITE more specification conform.
874
929
 
875
930
  {% capture notice-text %}
876
931
  #### Bug Fixes
@@ -885,7 +940,7 @@ element .on ("load", function () { console .log ("load, yeah"); });
885
940
 
886
941
  ## X\_ITE v4.2.6 Released
887
942
 
888
- *Leipzig, 14th Oktober 2018:* With this version, X\_ITE includes a new polygon tessellator, ie. X\_ITE can better render concave polygons witch also affects polygon font support, which is now even better.
943
+ *Leipzig, 14th October 2018:* With this version, X\_ITE includes a new polygon tessellator, ie. X\_ITE can better render concave polygons witch also affects polygon font support, which is now even better.
889
944
 
890
945
  {% capture notice-text %}
891
946
  #### New Features
@@ -908,7 +963,7 @@ element .on ("load", function () { console .log ("load, yeah"); });
908
963
 
909
964
  ## X\_ITE v4.2.5 Released
910
965
 
911
- *Leipzig, 1st Oktober 2018:* This version fixes loads of bugs and added loads of small Features.
966
+ *Leipzig, 1st October 2018:* This version fixes loads of bugs and added loads of small Features.
912
967
 
913
968
  {% capture notice-text %}
914
969
  #### New Features
package/docs/_config.yml CHANGED
@@ -20,7 +20,7 @@ github: [metadata]
20
20
  author:
21
21
  name: *title
22
22
  avatar: "assets/images/logo.png"
23
- bio: "Version 4.7.5"
23
+ bio: "Version 4.7.9"
24
24
  links:
25
25
  - label: "GitHub"
26
26
  icon: "fab fa-2x fa-fw fa-github"
package/docs/index.md CHANGED
@@ -8,7 +8,7 @@ X3D is an ISO-ratified, royalty-free open standards file format and run-time arc
8
8
 
9
9
  X\_ITE supports custom shaders, clip planes, reflection mapping, script nodes, prototyping capabilities and event driven programming to provide you with an improved quality level of virtual effects and tools ready for the Internet.
10
10
 
11
- **Developer note:** X\_ITE runs best in fresh installs of Google Chrome, Chromium, Firefox, Safari, Opera, and Microsoft Edge. X\_ITE uses the latest JavaScript standard, but is also compatible with older browser, and is either now available on your desktop computer or on your modern smart-phone.
11
+ **Developer note:** X\_ITE runs best in fresh installs of Google Chrome, Chromium, Firefox, Safari, Opera, and Microsoft Edge. X\_ITE uses the latest JavaScript standard, but is also compatible with older browser, and is available both on your desktop computer and on your modern smart-phone.
12
12
  {: .notice--info}
13
13
 
14
14
  If you ever get in trouble, please [file a bug](https://github.com/create3000/x_ite/issues).
@@ -804,6 +804,18 @@ There is a ZIP archive available to locally install X\_ITE on your server. Compr
804
804
 
805
805
  [Download X\_ITE ZIP archive](https://create3000.github.io/code/x_ite/latest/dist/x_ite.zip)
806
806
 
807
+ ### You also can get it on NPM
808
+
809
+ ```sh
810
+ $ npm install x_ite
811
+ ```
812
+
813
+ It can be used in [Electron](https://www.electronjs.org) apps in the **renderer process** like this:
814
+
815
+ ```js
816
+ const X3D = require ("x_ite")
817
+ ```
818
+
807
819
  ### Using X\_ITE with a CDN
808
820
 
809
821
  CDNs can offer a performance benefit by hosting X\_ITE on servers spread across the globe. This also offers an advantage that if the visitor to your webpage has already downloaded a copy of X\_ITE from the same CDN, it won't have to be re-downloaded. To use the X\_ITE CDN, just reference the CSS and JavaScript file in the script tag directly from the GitHub CDN or jsDelivr CDN domain.
@@ -812,22 +824,22 @@ CDNs can offer a performance benefit by hosting X\_ITE on servers spread across
812
824
 
813
825
  GitCDN serves raw files directly from GitHub with proper Content-Type headers and a super fast CDN!
814
826
 
815
- #### Snipped
827
+ #### Latest Stable Version
816
828
 
817
- If you are on production and everything works fine, then use a numbered version.
829
+ If you are a developer or you always wanna be up to date:
818
830
 
819
831
  ```html
820
- <link rel="stylesheet" type="text/css" href="https://create3000.github.io/code/x_ite/4.7.5/dist/x_ite.css"/>
821
- <script type="text/javascript" src="https://create3000.github.io/code/x_ite/4.7.5/dist/x_ite.min.js"></script>
832
+ <link rel="stylesheet" type="text/css" href="https://create3000.github.io/code/x_ite/latest/dist/x_ite.css"/>
833
+ <script type="text/javascript" src="https://create3000.github.io/code/x_ite/latest/dist/x_ite.min.js"></script>
822
834
  ```
823
835
 
824
- #### Latest Stable Version
836
+ #### Snipped
825
837
 
826
- If you are a developer or you always wanna be up to date:
838
+ If you are on production and everything works fine, then use a numbered version.
827
839
 
828
840
  ```html
829
- <link rel="stylesheet" type="text/css" href="https://create3000.github.io/code/x_ite/latest/dist/x_ite.css"/>
830
- <script type="text/javascript" src="https://create3000.github.io/code/x_ite/latest/dist/x_ite.min.js"></script>
841
+ <link rel="stylesheet" type="text/css" href="https://create3000.github.io/code/x_ite/4.7.9/dist/x_ite.css"/>
842
+ <script type="text/javascript" src="https://create3000.github.io/code/x_ite/4.7.9/dist/x_ite.min.js"></script>
831
843
  ```
832
844
 
833
845
  ### jsDelivr CDN
@@ -972,11 +984,6 @@ A Boolean value (`true` or `false`) to indicate whether the splash screen should
972
984
  A String value with the URL that should be loaded on page load. If no src attribute is specified or the src attribute is empty an empty scene is displayed.
973
985
  {: .notice}
974
986
 
975
- ### timings
976
-
977
- A Boolean value (`true` or `false`) to indicate whether the browser timings bubble should be displayed if the context menu option is enabled. The default value for the timings attribute is `true`. This attribute changes the facility whether browsers timings can be displayed, if browser timings are really displayed is in the hand of the user if he toggles the context menu option to true.
978
- {: .notice}
979
-
980
987
  ### url
981
988
 
982
989
  A MFString value with urls that should be loaded on page load. If no url attribute is specified or the attribute is empty an empty scene is displayed. If both src and url attribute are specified the src attribute takes precedence.
@@ -44,10 +44,6 @@ The real type of this class is dependent on whether the user code is inside a pr
44
44
 
45
45
  ### Methods
46
46
 
47
- #### X3DScene **createScene** (\[*ProfileInfo profile, ComponentInfo component1, ...*\])
48
-
49
- Creates a new scene with the given profile and components.
50
-
51
47
  #### void **replaceWorld** (*X3DScene*)
52
48
 
53
49
  Replace the current world with this new scene that has been loaded or constructed from somewhere.
@@ -62,9 +58,9 @@ Parse the passed URL into a X3D scene. When complete send the passed event to th
62
58
 
63
59
  If event and node are omitted a X3DScene object is returned.
64
60
 
65
- #### void **loadURL** (*MFString url, MFString parameter*)
61
+ #### Promise **loadURL** (*MFString url \[, MFString parameter\]*)
66
62
 
67
- Load the passed URL, using the passed parameter string to possibly redirect it to another frame. If the destination is the frame containing the current scene, this method may never return.
63
+ Load the passed URL, using the passed parameter string to possibly redirect it to another frame. If the destination is the frame containing the current scene, this method may never return. The return value is a Promise object, that is resolved when the new scene is loaded.
68
64
 
69
65
  #### X3DScene **importDocument** (*DOMObject dom*)
70
66
 
@@ -158,7 +154,13 @@ Returns a browser option with the corresponding name.
158
154
  <td>Dashboard</td>
159
155
  <td>Display browser navigation user interface.</td>
160
156
  <td>Boolean</td>
161
- <td>Specified by bound NavigationInfo in content</td>
157
+ <td>true</td>
158
+ </tr>
159
+ <tr>
160
+ <td>Rubberband</td>
161
+ <td>Display a rubberband line when walk or fly.</td>
162
+ <td>Boolean</td>
163
+ <td>true</td>
162
164
  </tr>
163
165
  <tr>
164
166
  <td>EnableInlineViewpoints</td>
@@ -220,6 +222,12 @@ Returns a browser option with the corresponding name.
220
222
  <td>Boolean</td>
221
223
  <td>false</td>
222
224
  </tr>
225
+ <tr>
226
+ <td>Timings</td>
227
+ <td>Whether browser timings should be displayed.</td>
228
+ <td>Boolean</td>
229
+ <td>false</td>
230
+ </tr>
223
231
  </tbody>
224
232
  </table>
225
233
 
@@ -322,7 +330,23 @@ Prints *object* to the browser's console without a newline character. Successive
322
330
 
323
331
  Prints *object* to the browser's console, inserting a newline character after the output. Successive calls to this function will result in each output presented on separate lines. The output is the implicit call to the object's `toString ()` function.
324
332
 
325
- ### More Methods
333
+ ### VRML Methods
334
+
335
+ #### String **getName** ()
336
+
337
+ #### String **getVersion** ()
338
+
339
+ #### Number **getCurrentSpeed** ()
340
+
341
+ #### Number **getCurrentFrameRate** ()
342
+
343
+ #### String **getWorldURL** ()
344
+
345
+ #### void **replaceWorld** (*MFNode nodes*)
346
+
347
+ #### MFNode **createVrmlFromString** (*String vrmlSyntax*)
348
+
349
+ #### void **createVrmlFromURL** (*MFString url, SFNode node, String event*)
326
350
 
327
351
  #### void **addRoute** (*SFNode sourceNode, String sourceField, SFNode destinationNode, String destinationField*)
328
352
 
@@ -331,3 +355,7 @@ Add a route from the passed *sourceField* to the passed *destinationField*.
331
355
  #### void **deleteRoute** (*SFNode sourceNode, String sourceField, SFNode destinationNode, String destinationField*)
332
356
 
333
357
  Remove the route between the passed *sourceField* and passed *destinationField*, if one exists.
358
+
359
+ #### void **loadURL** (*MFString url \[, MFString parameter\]*)
360
+
361
+ #### void **setDescription** (*String description*)
@@ -313,14 +313,22 @@ The script can access any inputOutput field, inputOnly fields or outputOnly fiel
313
313
  DEF SomeNode Transform { }
314
314
 
315
315
  Script {
316
- inputOnly SFVec3f pos
317
- initializeOnly SFNode node USE SomeNode
316
+ inputOnly SFVec3f set_pos
317
+ inputOutput SFRotation rot
318
+ initializeOnly SFNode node USE SomeNode
318
319
  url "ecmascript:
319
320
  ...
320
321
 
321
- function pos (value)
322
+ // Callback for 'inputOnly SFVec3f set_pos'.
323
+ function set_pos (value)
322
324
  {
323
- node .set_translation = value;
325
+ node .translation = value;
326
+ }
327
+
328
+ // Callback for 'inputOutput SFRotation rot'.
329
+ function set_rot (value)
330
+ {
331
+ node .rotation = value;
324
332
  }
325
333
  "
326
334
  directOutput TRUE
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "x_ite",
3
- "version": "4.7.5",
4
- "revision": "1122",
3
+ "version": "4.7.9",
4
+ "revision": "1135",
5
5
  "description": "X_ITE X3D Browser, a framework for integrating and manipulating X3D and VRML scenes in HTML.",
6
- "main": "src/x_ite.js",
6
+ "main": "dist/x_ite.js",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/create3000/x_ite.git"
@@ -12,9 +12,14 @@
12
12
  "X3D",
13
13
  "VRML",
14
14
  "WebGL",
15
- "browser"
15
+ "browser",
16
+ "3D",
17
+ "wrl",
18
+ "JavaScript",
19
+ "JSON",
20
+ "xite"
16
21
  ],
17
- "author": "Holger Seelig <holger.seelig@yahoo.de>",
22
+ "author": "Holger Seelig <holger.seelig@gmail.com>",
18
23
  "license": "GPL-3.0",
19
24
  "homepage": "https://create3000.github.io/x_ite/",
20
25
  "contributors": [
@@ -59,12 +64,14 @@
59
64
  "require": "^0.4.4",
60
65
  "requirejs": ">=2.3.6",
61
66
  "requirejs-text": ">=2.0.15",
62
- "sprintf-js": ">=1.1.2",
63
67
  "uglify-js-es6": ">=2.8.9"
64
68
  },
65
69
  "scripts": {
66
70
  "lint": "jshint **",
67
71
  "build": "make",
68
72
  "-prebuild:js": "npm run lint"
73
+ },
74
+ "dependencies": {
75
+ "sprintf-js": "^1.1.2"
69
76
  }
70
77
  }
@@ -45,6 +45,7 @@
45
45
  *
46
46
  ******************************************************************************/
47
47
 
48
+
48
49
  define ([
49
50
  "x_ite/Components",
50
51
  "x_ite/Components/Picking/LinePickSensor",
@@ -54,7 +55,7 @@ define ([
54
55
  "x_ite/Components/Picking/VolumePickSensor",
55
56
  "x_ite/Components/Picking/X3DPickSensorNode",
56
57
  "x_ite/Components/Picking/X3DPickableObject",
57
- X3D .getComponentUrl ("rigid-body-physics"),
58
+ require .getComponentUrl ("rigid-body-physics"),
58
59
  ],
59
60
  function (Components,
60
61
  LinePickSensor,
@@ -84,4 +85,3 @@ function (Components,
84
85
  },
85
86
  });
86
87
  });
87
-
@@ -65,8 +65,8 @@ define ([
65
65
  "x_ite/Components/VolumeRendering/X3DComposableVolumeRenderStyleNode",
66
66
  "x_ite/Components/VolumeRendering/X3DVolumeDataNode",
67
67
  "x_ite/Components/VolumeRendering/X3DVolumeRenderStyleNode",
68
- X3D .getComponentUrl ("cad-geometry"),
69
- X3D .getComponentUrl ("texturing-3d"),
68
+ require .getComponentUrl ("cad-geometry"),
69
+ require .getComponentUrl ("texturing-3d"),
70
70
  ],
71
71
  function (Components,
72
72
  X3DVolumeRenderingContext,
@@ -12,11 +12,10 @@ varying vec4 color;
12
12
  void
13
13
  main ()
14
14
  {
15
- vec4 textureColor = x3d_NumTextures > 0 ? texture2D (x3d_Texture2D [0], texCoord .st) : vec4 (1.0);
16
- vec4 finalColor = vec4 (0.0);
15
+ vec4 finalColor = x3d_NumTextures > 0 ? texture2D (x3d_Texture2D [0], texCoord .st) : vec4 (1.0);
17
16
 
18
- finalColor .rgb += x3d_Material .emissiveColor;
19
- finalColor .a = textureColor .a * color .a * (1.0 - x3d_Material .transparency);
17
+ finalColor .rgb *= x3d_Material .emissiveColor;
18
+ finalColor .a *= color .a * (1.0 - x3d_Material .transparency);
20
19
 
21
20
  gl_FragColor = finalColor;
22
21
  }
@@ -11,7 +11,6 @@ uniform bool x3d_ColorMaterial; // true if a X3DColorNode is attached, otherwise
11
11
 
12
12
  uniform int x3d_NumLights;
13
13
  uniform x3d_LightSourceParameters x3d_LightSource [x3d_MaxLights];
14
- uniform bool x3d_SeparateBackColor;
15
14
  uniform x3d_MaterialParameters x3d_Material;
16
15
 
17
16
  attribute float x3d_FogDepth;
@@ -12,7 +12,6 @@ uniform float x3d_AlphaCutoff;
12
12
 
13
13
  uniform int x3d_NumLights;
14
14
  uniform x3d_LightSourceParameters x3d_LightSource [x3d_MaxLights];
15
- uniform bool x3d_SeparateBackColor;
16
15
  uniform x3d_MaterialParameters x3d_Material;
17
16
 
18
17
  varying float fogDepth; // fog depth
@@ -10,9 +10,6 @@ uniform int x3d_GeometryType;
10
10
  uniform bool x3d_ColorMaterial; // true if a X3DColorNode is attached, otherwise false
11
11
  uniform float x3d_AlphaCutoff;
12
12
 
13
- uniform int x3d_NumLights;
14
- uniform x3d_LightSourceParameters x3d_LightSource [x3d_MaxLights];
15
- uniform bool x3d_SeparateBackColor;
16
13
  uniform x3d_MaterialParameters x3d_Material;
17
14
 
18
15
  varying float fogDepth; // fog depth
@@ -12,7 +12,6 @@ uniform bool x3d_ColorMaterial; // true if a X3DColorNode is attached, otherwise
12
12
 
13
13
  uniform int x3d_NumLights;
14
14
  uniform x3d_LightSourceParameters x3d_LightSource [x3d_MaxLights];
15
- uniform bool x3d_SeparateBackColor;
16
15
  uniform x3d_MaterialParameters x3d_Material;
17
16
 
18
17
  in float x3d_FogDepth;
@@ -9,7 +9,6 @@ uniform float x3d_AlphaCutoff;
9
9
 
10
10
  uniform int x3d_NumLights;
11
11
  uniform x3d_LightSourceParameters x3d_LightSource [x3d_MaxLights];
12
- uniform bool x3d_SeparateBackColor;
13
12
  uniform x3d_MaterialParameters x3d_Material;
14
13
 
15
14
  in float fogDepth; // fog depth
@@ -7,9 +7,6 @@ uniform int x3d_GeometryType;
7
7
  uniform bool x3d_ColorMaterial; // true if a X3DColorNode is attached, otherwise false
8
8
  uniform float x3d_AlphaCutoff;
9
9
 
10
- uniform int x3d_NumLights;
11
- uniform x3d_LightSourceParameters x3d_LightSource [x3d_MaxLights];
12
- uniform bool x3d_SeparateBackColor;
13
10
  uniform x3d_MaterialParameters x3d_Material;
14
11
 
15
12
  in float fogDepth; // fog depth
package/src/bookmarks.js CHANGED
@@ -47,7 +47,7 @@
47
47
  ******************************************************************************/
48
48
 
49
49
 
50
- var Bookmarks = (function ()
50
+ const Bookmarks = (function ()
51
51
  {
52
52
  "use strict";
53
53
 
@@ -61,16 +61,13 @@ var Bookmarks = (function ()
61
61
  {
62
62
  setup: function (array)
63
63
  {
64
- for (var a = 0; a < array .length; ++ a)
64
+ for (const bookmarks of array)
65
65
  {
66
- var
67
- bookmarks = array [a],
68
- server = bookmarks .server;
66
+ const server = bookmarks .server;
69
67
 
70
- for (var i = 0, length = bookmarks .length; i < length; ++ i)
68
+ for (const bookmark of bookmarks)
71
69
  {
72
- var
73
- bookmark = bookmarks [i],
70
+ const
74
71
  component = bookmark .component,
75
72
  test = bookmark .test,
76
73
  path = bookmark .path;
@@ -91,8 +88,8 @@ var Bookmarks = (function ()
91
88
  if (! path .match (/\.(?:x3d|x3dz|x3dv|x3dvz|x3dj|x3djz|wrl|wrz)$/))
92
89
  continue;
93
90
 
94
- var basename = path .match (/([^\/]+)\.\w+$/);
95
- var name = basename [1] .replace (/([A-Z]+)/g, ' $1');
91
+ const basename = path .match (/([^\/]+)\.\w+$/);
92
+ const name = basename [1] .replace (/([A-Z]+)/g, ' $1');
96
93
 
97
94
  var element = $('<span/>')
98
95
  .addClass ('example-box')
@@ -126,7 +123,7 @@ var Bookmarks = (function ()
126
123
  },
127
124
  restore: function (first)
128
125
  {
129
- var url = this .browser .getLocalStorage () ["Bookmarks.url"];
126
+ const url = this .browser .getLocalStorage () ["Bookmarks.url"];
130
127
 
131
128
  if (url)
132
129
  this .loadURL (url);
package/src/examples.js CHANGED
@@ -1,4 +1,4 @@
1
- var X_ITE_EXAMPLES = [
1
+ const X_ITE_EXAMPLES = [
2
2
  { component: "CADGeometry", test: "QuadSet" },
3
3
  { component: "CubeMapTexturing", test: "ComposedCubeMapTexture" },
4
4
  { component: "CubeMapTexturing", test: "GeneratedCubeMapTexture" },