x_ite 4.7.6 → 4.7.10

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 (148) hide show
  1. package/.vscode/settings.json +1 -2
  2. package/Makefile +1 -0
  3. package/build/components/annotation.build.js +2 -2
  4. package/build/components/cad-geometry.build.js +2 -2
  5. package/build/components/cube-map-texturing.build.js +2 -2
  6. package/build/components/dis.build.js +2 -2
  7. package/build/components/event-utilities.build.js +2 -2
  8. package/build/components/geometry2d.build.js +2 -2
  9. package/build/components/geospatial.build.js +2 -2
  10. package/build/components/h-anim.build.js +2 -2
  11. package/build/components/key-device-sensor.build.js +2 -2
  12. package/build/components/layout.build.js +2 -2
  13. package/build/components/nurbs.build.js +2 -2
  14. package/build/components/particle-systems.build.js +2 -2
  15. package/build/components/picking.build.js +2 -2
  16. package/build/components/projective-texture-mapping.build.js +2 -2
  17. package/build/components/rigid-body-physics.build.js +2 -2
  18. package/build/components/scripting.build.js +2 -2
  19. package/build/components/texturing-3d.build.js +2 -2
  20. package/build/components/volume-rendering.build.js +2 -2
  21. package/build/components/x_ite.build.js +2 -2
  22. package/build/parts/default.end.frag.js +2 -0
  23. package/build/parts/default.start.frag.js +8 -0
  24. package/build/parts/{x_ite.end.frag → x_ite.end.frag.js} +2 -8
  25. package/build/parts/x_ite.start.frag.js +11 -0
  26. package/build/x_ite.build.js +2 -2
  27. package/dist/assets/components/annotation.js +9 -7
  28. package/dist/assets/components/annotation.min.js +1 -1
  29. package/dist/assets/components/cad-geometry.js +9 -7
  30. package/dist/assets/components/cad-geometry.min.js +1 -1
  31. package/dist/assets/components/cube-map-texturing.js +9 -7
  32. package/dist/assets/components/cube-map-texturing.min.js +1 -1
  33. package/dist/assets/components/dis.js +9 -7
  34. package/dist/assets/components/dis.min.js +1 -1
  35. package/dist/assets/components/event-utilities.js +9 -7
  36. package/dist/assets/components/event-utilities.min.js +1 -1
  37. package/dist/assets/components/geometry2d.js +9 -7
  38. package/dist/assets/components/geometry2d.min.js +1 -1
  39. package/dist/assets/components/geospatial.js +9 -7
  40. package/dist/assets/components/geospatial.min.js +2 -2
  41. package/dist/assets/components/h-anim.js +9 -7
  42. package/dist/assets/components/h-anim.min.js +1 -1
  43. package/dist/assets/components/key-device-sensor.js +9 -7
  44. package/dist/assets/components/key-device-sensor.min.js +1 -1
  45. package/dist/assets/components/layout.js +9 -7
  46. package/dist/assets/components/layout.min.js +1 -1
  47. package/dist/assets/components/nurbs.js +9 -7
  48. package/dist/assets/components/nurbs.min.js +2 -2
  49. package/dist/assets/components/particle-systems.js +9 -7
  50. package/dist/assets/components/particle-systems.min.js +2 -2
  51. package/dist/assets/components/picking.js +13 -11
  52. package/dist/assets/components/picking.min.js +1 -1
  53. package/dist/assets/components/projective-texture-mapping.js +9 -7
  54. package/dist/assets/components/projective-texture-mapping.min.js +1 -1
  55. package/dist/assets/components/rigid-body-physics.js +9 -7
  56. package/dist/assets/components/rigid-body-physics.min.js +17 -17
  57. package/dist/assets/components/scripting.js +16 -9
  58. package/dist/assets/components/scripting.min.js +1 -1
  59. package/dist/assets/components/texturing-3d.js +9 -7
  60. package/dist/assets/components/texturing-3d.min.js +3 -3
  61. package/dist/assets/components/volume-rendering.js +11 -9
  62. package/dist/assets/components/volume-rendering.min.js +3 -3
  63. package/dist/assets/components/x_ite.js +9 -7
  64. package/dist/assets/components/x_ite.min.js +1 -1
  65. package/dist/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
  66. package/dist/assets/shaders/webgl1/Gouraud.vs +0 -1
  67. package/dist/assets/shaders/webgl1/Phong.fs +0 -1
  68. package/dist/assets/shaders/webgl1/Unlit.fs +0 -3
  69. package/dist/assets/shaders/webgl2/Gouraud.vs +0 -1
  70. package/dist/assets/shaders/webgl2/Phong.fs +0 -1
  71. package/dist/assets/shaders/webgl2/Unlit.fs +0 -3
  72. package/dist/example.html +2 -2
  73. package/dist/x_ite.css +14 -9
  74. package/dist/x_ite.js +29499 -28932
  75. package/dist/x_ite.min.js +41 -41
  76. package/dist/x_ite.zip +0 -0
  77. package/docs/Accessing-the-External-Browser.md +19 -4
  78. package/docs/What's-New.md +23 -0
  79. package/docs/_config.yml +1 -1
  80. package/docs/index.md +42 -14
  81. package/docs/reference/Browser-Services.md +38 -10
  82. package/docs/reference/Script-Node-Authoring-Interface.md +12 -4
  83. package/package.json +6 -5
  84. package/src/assets/components/picking.js +2 -2
  85. package/src/assets/components/volume-rendering.js +2 -2
  86. package/src/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
  87. package/src/assets/shaders/webgl1/Gouraud.vs +0 -1
  88. package/src/assets/shaders/webgl1/Phong.fs +0 -1
  89. package/src/assets/shaders/webgl1/Unlit.fs +0 -3
  90. package/src/assets/shaders/webgl2/Gouraud.vs +0 -1
  91. package/src/assets/shaders/webgl2/Phong.fs +0 -1
  92. package/src/assets/shaders/webgl2/Unlit.fs +0 -3
  93. package/src/bookmarks.js +8 -11
  94. package/src/examples.js +1 -1
  95. package/src/locale/de.po +19 -75
  96. package/src/locale/fr.po +18 -75
  97. package/src/standard/Time/MicroTime.js +3 -1
  98. package/src/standard/Utility/DataStorage.js +23 -12
  99. package/src/tests.js +1 -1
  100. package/src/x_ite/Browser/Core/BrowserOptions.js +40 -28
  101. package/src/x_ite/Browser/Core/BrowserTimings.js +13 -24
  102. package/src/x_ite/Browser/Core/ContextMenu.js +94 -16
  103. package/src/x_ite/Browser/Core/X3DCoreContext.js +95 -42
  104. package/src/x_ite/Browser/Navigation/ExamineViewer.js +3 -0
  105. package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -0
  106. package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -0
  107. package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -0
  108. package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +1 -3
  109. package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
  110. package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +4 -1
  111. package/src/x_ite/Browser/Shaders/ShaderTest.js +3 -3
  112. package/src/x_ite/Browser/VERSION.js +1 -1
  113. package/src/x_ite/Browser/X3DBrowser.js +70 -50
  114. package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
  115. package/src/x_ite/Components/Scripting/Script.js +7 -2
  116. package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +10 -12
  117. package/src/x_ite/Components/Shaders.js +9 -9
  118. package/src/x_ite/Execution/X3DExecutionContext.js +9 -11
  119. package/src/x_ite/Fields/SFColor.js +20 -7
  120. package/src/x_ite/Fields/SFColorRGBA.js +6 -6
  121. package/src/x_ite/Fields/SFDouble.js +2 -2
  122. package/src/x_ite/Fields/SFFloat.js +2 -2
  123. package/src/x_ite/Fields/SFImage.js +13 -13
  124. package/src/x_ite/Fields/SFMatrix3.js +5 -5
  125. package/src/x_ite/Fields/SFMatrix4.js +6 -6
  126. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +14 -3
  127. package/src/x_ite/Fields/SFNode.js +23 -19
  128. package/src/x_ite/Fields/SFNodeCache.js +14 -10
  129. package/src/x_ite/Fields/SFRotation.js +10 -10
  130. package/src/x_ite/Fields/SFString.js +1 -1
  131. package/src/x_ite/Fields/SFTime.js +1 -1
  132. package/src/x_ite/Fields/SFVec2.js +6 -6
  133. package/src/x_ite/Fields/SFVec3.js +7 -7
  134. package/src/x_ite/Fields/SFVec4.js +8 -8
  135. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +7 -6
  136. package/src/x_ite/InputOutput/Generator.js +85 -65
  137. package/src/x_ite/Parser/X3DParser.js +6 -0
  138. package/src/x_ite/Parser/XMLParser.js +1 -1
  139. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +1 -1
  140. package/src/x_ite/X3D.js +8 -2
  141. package/src/x_ite.config.js +0 -5
  142. package/src/x_ite.css +14 -8
  143. package/src/x_ite.html +3 -3
  144. package/src/x_ite.js +21 -12
  145. package/x_ite.min.html +3 -3
  146. package/build/parts/default.end.frag +0 -2
  147. package/build/parts/default.start.frag +0 -6
  148. package/build/parts/x_ite.start.frag +0 -8
package/dist/x_ite.zip CHANGED
Binary file
@@ -8,10 +8,10 @@ If you want combine DOM access with X3D access in your JavaScript functions then
8
8
 
9
9
  ## Introduction
10
10
 
11
- There is the X3D object which is always available, it expects at least one function handler that is called when the browsers (<X3DCanvas> elements) are ready, or the second function handler is called if an error occurred.
11
+ There is the X3D object which is always available, it expects one function handler that is called when the browsers (<X3DCanvas> elements) are ready, and a second function handler, that is called if an error occurred. These two arguments are optional. The return value of the X3D function is a Promise, which can be used instead of the arguments.
12
12
 
13
13
  ```js
14
- X3D (callback[, errorCallback]);
14
+ Promise X3D ([callback[, errorCallback]]);
15
15
  ```
16
16
 
17
17
  The callback function is called when the browser is available. The callback function takes no arguments. The error callback is called if an error occurred, it has one argument *error.*
@@ -65,6 +65,21 @@ function (error)
65
65
  </script>
66
66
  ```
67
67
 
68
+ ### Async use of X3D object
69
+
70
+ ```js
71
+ async function foo (url)
72
+ {
73
+ await X3D ();
74
+
75
+ const Browser = X3D .getBrowser ();
76
+
77
+ await Browser .loadURL (new MFString (url));
78
+
79
+ console .log (`Done loading scene '${Browser .currentScene .worldURL}'.`);
80
+ }
81
+ ```
82
+
68
83
  ## X3D Object
69
84
 
70
85
  ### Functions
@@ -165,7 +180,7 @@ function foo (node)
165
180
 
166
181
  #### **X3DFields**
167
182
 
168
- All X3DFields (SFColor, ..., MFBool, MFColor, and so on). The fields can be created using the object as construtor. **Note:** Scalar objects like SFBool, SFDouble, SFFloat, SFInt32, SFString, and SFTime have no constructor, just use the built-in JavaScript types Boolean, Number, and String.
183
+ All X3DFields (SFColor, ..., MFBool, MFColor, and so on). The fields can be created using the object as constructor. **Note:** Scalar objects like SFBool, SFDouble, SFFloat, SFInt32, SFString, and SFTime have no constructor, just use the built-in JavaScript types Boolean, Number, and String.
169
184
 
170
185
  ```js
171
186
  // Create a new translation vector and
@@ -265,7 +280,7 @@ function spin ()
265
280
  ### The HTML
266
281
 
267
282
  ```html
268
- <X3DCanvas src="external-browser.x3d" onload="init ()"/>
283
+ <X3DCanvas src="external-browser.x3d" onload="init ()"></X3DCanvas>
269
284
 
270
285
  <div class="buttons">
271
286
  <button id="center" class="button" onclick="center ()">Center</button>
@@ -1,5 +1,28 @@
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
+
3
26
  ## X\_ITE v4.7.6 Released
4
27
 
5
28
  *Leipzig, 23th January 2022*: This release implements the new X3Dv4 UnlitMaterial. This also means that the custom shader interface has changed:
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.6"
23
+ bio: "Version 4.7.10"
24
24
  links:
25
25
  - label: "GitHub"
26
26
  icon: "fab fa-2x fa-fw fa-github"
package/docs/index.md CHANGED
@@ -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.6/dist/x_ite.css"/>
821
- <script type="text/javascript" src="https://create3000.github.io/code/x_ite/4.7.6/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.10/dist/x_ite.css"/>
842
+ <script type="text/javascript" src="https://create3000.github.io/code/x_ite/4.7.10/dist/x_ite.min.js"></script>
831
843
  ```
832
844
 
833
845
  ### jsDelivr CDN
@@ -934,7 +946,7 @@ A Boolean value (`true` or `false`) to indicate whether files transferred over t
934
946
 
935
947
  ### contextMenu
936
948
 
937
- A Boolean value (`true` or `false`) to indicate whether a context menu should be displayed on right click. The default value for the contextMenu attribute is `true`.
949
+ A Boolean value (`true` or `false`) to indicate whether a context menu should be displayed on right click. The default value for the contextMenu attribute is `true`. The context menu can also be extended, [see here](#extending-the-context-menu).
938
950
  {: .notice}
939
951
 
940
952
  ### notifications
@@ -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.
@@ -992,6 +999,27 @@ A MFString value with urls that should be loaded on page load. If no url attribu
992
999
 
993
1000
  More options can be adjusted using the [Browser Object](/x_ite/reference/Browser-Services.html#browser-object) and [Browser Options](/x_ite/reference/Browser-Services.html#browser-options) for scene specific adjustments.
994
1001
 
1002
+ ## Extending the Context Menu
1003
+
1004
+ The context menu is the jQuery Context Menu plugin, and it can be extended using the `items` syntax. The full documentation [can be found here](https://swisnl.github.io/jQuery-contextMenu/docs/items.html).
1005
+
1006
+ ### Example
1007
+
1008
+ ```js
1009
+ Browser .getContextMenu () .setUserMenu (function ()
1010
+ {
1011
+ return {
1012
+ "command-1": {
1013
+ name: "Command 1",
1014
+ callback: function (key, opt)
1015
+ {
1016
+ console .log ("Clicked on " + key);
1017
+ },
1018
+ },
1019
+ };
1020
+ });
1021
+ ```
1022
+
995
1023
  ## Accessing the External Browser
996
1024
 
997
1025
  X\_ITE is designed to provide access to a browser and its contained scene graph via JavaScript, either within an internal X3D Script node or an external HTML script.
@@ -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>
@@ -187,7 +189,7 @@ Returns a browser option with the corresponding name.
187
189
  <tr>
188
190
  <td>Shading</td>
189
191
  <td>Specify shading mode for all objects.</td>
190
- <td>Wireframe, Flat, Gouraud, Phong</td>
192
+ <td>Point, Wireframe, Flat, Gouraud, Phong</td>
191
193
  <td>Gouraud</td>
192
194
  </tr>
193
195
  <tr>
@@ -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
 
@@ -245,7 +253,7 @@ Returns a rendering property with the corresponding *name*.
245
253
  <tr>
246
254
  <td>Shading</td>
247
255
  <td>String</td>
248
- <td>The type of shading algorithm in use. Typical values are Flat, Gouraud, Phong, Wireframe.</td>
256
+ <td>The type of shading algorithm in use. Typical values are Flat, Gouraud, Phong, Wireframe, Point.</td>
249
257
  </tr>
250
258
  <tr>
251
259
  <td>MaxTextureSize</td>
@@ -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.6",
4
- "revision": "1127",
3
+ "version": "4.7.10",
4
+ "revision": "1136",
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"
@@ -17,7 +17,9 @@
17
17
  "wrl",
18
18
  "JavaScript",
19
19
  "JSON",
20
- "xite"
20
+ "xite",
21
+ "node",
22
+ "electron"
21
23
  ],
22
24
  "author": "Holger Seelig <holger.seelig@gmail.com>",
23
25
  "license": "GPL-3.0",
@@ -64,7 +66,6 @@
64
66
  "require": "^0.4.4",
65
67
  "requirejs": ">=2.3.6",
66
68
  "requirejs-text": ">=2.0.15",
67
- "sprintf-js": ">=1.1.2",
68
69
  "uglify-js-es6": ">=2.8.9"
69
70
  },
70
71
  "scripts": {
@@ -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" },