x_ite 8.3.1 → 8.3.3

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 (130) hide show
  1. package/.github/workflows/pages-deploy.yml +1 -1
  2. package/.vscode/settings.json +2 -1
  3. package/build/bin/tests.pl +2 -0
  4. package/dist/LICENSE.md +4 -4
  5. package/dist/assets/components/Annotation.js +13 -13
  6. package/dist/assets/components/Annotation.min.js +1 -1
  7. package/dist/assets/components/CADGeometry.js +13 -13
  8. package/dist/assets/components/CADGeometry.min.js +1 -1
  9. package/dist/assets/components/CubeMapTexturing.js +25 -25
  10. package/dist/assets/components/CubeMapTexturing.min.js +1 -1
  11. package/dist/assets/components/DIS.js +13 -13
  12. package/dist/assets/components/DIS.min.js +1 -1
  13. package/dist/assets/components/EventUtilities.js +9 -9
  14. package/dist/assets/components/EventUtilities.min.js +1 -1
  15. package/dist/assets/components/Geometry2D.js +19 -19
  16. package/dist/assets/components/Geometry2D.min.js +1 -1
  17. package/dist/assets/components/Geospatial.js +33 -33
  18. package/dist/assets/components/Geospatial.min.js +1 -1
  19. package/dist/assets/components/HAnim.js +61 -74
  20. package/dist/assets/components/HAnim.min.js +1 -1
  21. package/dist/assets/components/KeyDeviceSensor.js +8 -8
  22. package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
  23. package/dist/assets/components/Layout.js +27 -27
  24. package/dist/assets/components/Layout.min.js +1 -1
  25. package/dist/assets/components/NURBS.js +24 -24
  26. package/dist/assets/components/NURBS.min.js +1 -1
  27. package/dist/assets/components/ParticleSystems.js +23 -23
  28. package/dist/assets/components/ParticleSystems.min.js +1 -1
  29. package/dist/assets/components/Picking.js +19 -19
  30. package/dist/assets/components/Picking.min.js +1 -1
  31. package/dist/assets/components/RigidBodyPhysics.js +17 -17
  32. package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
  33. package/dist/assets/components/Scripting.js +28 -28
  34. package/dist/assets/components/Scripting.min.js +1 -1
  35. package/dist/assets/components/Text.js +24 -24
  36. package/dist/assets/components/Text.min.js +1 -1
  37. package/dist/assets/components/{ProjectiveTextureMapping.js → TextureProjector.js} +39 -39
  38. package/dist/assets/components/TextureProjector.min.js +1 -0
  39. package/dist/assets/components/Texturing3D.js +46 -46
  40. package/dist/assets/components/Texturing3D.min.js +1 -1
  41. package/dist/assets/components/VolumeRendering.js +19 -19
  42. package/dist/assets/components/VolumeRendering.min.js +1 -1
  43. package/dist/assets/components/X_ITE.js +9 -9
  44. package/dist/assets/components/X_ITE.min.js +1 -1
  45. package/dist/x_ite.css +1 -1
  46. package/dist/x_ite.js +1904 -1570
  47. package/dist/x_ite.min.js +1 -1
  48. package/dist/x_ite.zip +0 -0
  49. package/docs/Gemfile +1 -4
  50. package/docs/_config.yml +3 -2
  51. package/docs/_posts/custom-shaders.md +1 -1
  52. package/docs/_posts/dom-integration.md +52 -25
  53. package/docs/_posts/getting-started.md +148 -442
  54. package/docs/_posts/reference/field-services-and-objects.md +2 -34
  55. package/docs/_posts/reference/scene-services.md +13 -2
  56. package/docs/_posts/tutorials/basic-nodes.md +2 -2
  57. package/docs/_posts/tutorials/building-a-x3d-world.md +20 -4
  58. package/docs/_posts/tutorials/building-primitive-shapes.md +4 -4
  59. package/docs/_posts/tutorials/creating-new-node-types.md +22 -0
  60. package/docs/_posts/tutorials/hello-world.md +6 -6
  61. package/docs/_posts/tutorials/improving-performance.md +2 -2
  62. package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +2 -2
  63. package/docs/_posts/what's-new.md +21 -3
  64. package/docs/_tabs/playground.html +110 -57
  65. package/docs/assets/css/style.scss +25 -1
  66. package/package.json +2 -2
  67. package/src/assets/components/{ProjectiveTextureMapping.js → TextureProjector.js} +5 -5
  68. package/src/examples.js +1 -1
  69. package/src/tests.js +5 -5
  70. package/src/x_ite/Base/X3DArrayField.js +3 -0
  71. package/src/x_ite/Base/X3DBaseNode.js +4 -0
  72. package/src/x_ite/Base/X3DInfoArray.js +28 -24
  73. package/src/x_ite/Base/X3DObject.js +29 -20
  74. package/src/x_ite/Base/X3DObjectArrayField.js +27 -26
  75. package/src/x_ite/Base/X3DTypedArrayField.js +34 -32
  76. package/src/x_ite/Browser/Core/ContextMenu.js +5 -7
  77. package/src/x_ite/Browser/DOMIntegration.js +62 -54
  78. package/src/x_ite/Browser/VERSION.js +1 -1
  79. package/src/x_ite/Browser/X3DBrowser.js +44 -29
  80. package/src/x_ite/Browser/X3DBrowserContext.js +3 -0
  81. package/src/x_ite/Components/Core/X3DNode.js +196 -187
  82. package/src/x_ite/Components/Core/X3DPrototypeInstance.js +114 -91
  83. package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +18 -43
  84. package/src/x_ite/Components/HAnim/HAnimHumanoid.js +24 -25
  85. package/src/x_ite/Components/HAnim/HAnimJoint.js +19 -31
  86. package/src/x_ite/Components/Networking/Inline.js +21 -2
  87. package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +14 -1
  88. package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +0 -1
  89. package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjector.js +1 -1
  90. package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjectorParallel.js +1 -1
  91. package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/X3DTextureProjectorNode.js +0 -0
  92. package/src/x_ite/Components/Time/TimeSensor.js +5 -0
  93. package/src/x_ite/Components/Time/X3DTimeDependentNode.js +1 -0
  94. package/src/x_ite/Configuration/ComponentInfo.js +20 -23
  95. package/src/x_ite/Configuration/ProfileInfo.js +6 -6
  96. package/src/x_ite/Configuration/SupportedComponents.js +22 -20
  97. package/src/x_ite/Configuration/SupportedNodes.js +1 -5
  98. package/src/x_ite/Configuration/SupportedProfiles.js +1 -1
  99. package/src/x_ite/Configuration/UnitInfo.js +24 -27
  100. package/src/x_ite/Execution/X3DExecutionContext.js +28 -59
  101. package/src/x_ite/Execution/X3DExportedNode.js +23 -28
  102. package/src/x_ite/Execution/X3DImportedNode.js +63 -67
  103. package/src/x_ite/Execution/X3DScene.js +98 -117
  104. package/src/x_ite/Fields/ArrayFields.js +57 -55
  105. package/src/x_ite/Fields/SFBool.js +6 -6
  106. package/src/x_ite/Fields/SFColor.js +10 -12
  107. package/src/x_ite/Fields/SFDouble.js +7 -10
  108. package/src/x_ite/Fields/SFFloat.js +7 -10
  109. package/src/x_ite/Fields/SFImage.js +33 -8
  110. package/src/x_ite/Fields/SFInt32.js +6 -6
  111. package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +13 -13
  112. package/src/x_ite/Fields/SFNode.js +42 -19
  113. package/src/x_ite/Fields/SFRotation.js +13 -13
  114. package/src/x_ite/Fields/SFString.js +6 -7
  115. package/src/x_ite/Fields/SFTime.js +6 -6
  116. package/src/x_ite/Fields/SFVecPrototypeTemplate.js +10 -10
  117. package/src/x_ite/InputOutput/FileLoader.js +1 -1
  118. package/src/x_ite/InputOutput/Generator.js +117 -17
  119. package/src/x_ite/Parser/VRMLParser.js +24 -27
  120. package/src/x_ite/Parser/X3DParser.js +0 -4
  121. package/src/x_ite/Parser/XMLParser.js +152 -50
  122. package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +59 -64
  123. package/src/x_ite/Prototype/X3DProtoDeclaration.js +86 -93
  124. package/src/x_ite/Rendering/X3DRenderObject.js +6 -1
  125. package/src/x_ite/Routing/X3DRoute.js +37 -40
  126. package/src/x_ite.html +3 -3
  127. package/webpack.config.js +2 -2
  128. package/x_ite.min.html +1 -1
  129. package/dist/assets/components/ProjectiveTextureMapping.min.js +0 -1
  130. package/docs/Gemfile.lock +0 -116
package/dist/x_ite.zip CHANGED
Binary file
package/docs/Gemfile CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "jekyll-theme-chirpy", "~> 5.3", ">= 5.3.2"
5
+ gem "jekyll-theme-chirpy", :git => "https://github.com/create3000/jekyll-theme-chirpy.git"
6
6
 
7
7
  group :test do
8
8
  gem "html-proofer", "~> 3.18"
@@ -17,6 +17,3 @@ end
17
17
 
18
18
  # Performance-booster for watching directories on Windows
19
19
  gem "wdm", "~> 0.1.1", :install_if => Gem.win_platform?
20
-
21
- # Jekyll <= 4.2.0 compatibility with Ruby 3.0
22
- gem "webrick", "~> 1.7"
package/docs/_config.yml CHANGED
@@ -20,7 +20,8 @@ timezone:
20
20
  # ↓ --------------------------
21
21
 
22
22
  title: X_ITE X3D Browser # the main title
23
- version: 8.3.1
23
+ version: 8.3.3 # x_ite latest version
24
+ x3d_latest_version: 8.3.3 # x3d latest version
24
25
 
25
26
  tagline: Step Into The Future # it will display as the sub-title
26
27
 
@@ -79,7 +80,7 @@ theme_mode: # [light|dark]
79
80
  # will be added to all image (site avatar & posts" images) paths starting with "/"
80
81
  #
81
82
  # e.g. "https://cdn.com"
82
- img_cdn:
83
+ img_cdn: ""
83
84
 
84
85
  # the avatar on sidebar, support local or CORS resources
85
86
  avatar: "assets/img/logo.png"
@@ -26,7 +26,7 @@ WebGL uses the GLSL language to write shaders that can be run across all browser
26
26
  ### X3D
27
27
 
28
28
  ```js
29
- #X3D V4.0 utf8
29
+ #X3D V{{ site.x3d_latest_version }} utf8
30
30
 
31
31
  DEF Timer TimeSensor {
32
32
  loop TRUE
@@ -46,7 +46,7 @@ window .addEventListener ("load", function ()
46
46
  </head>
47
47
  <body>
48
48
  <x3d-canvas>
49
- <X3D profile='Interactive' version='4.0'>
49
+ <X3D profile='Interactive' version='{{ site.x3d_latest_version }}'>
50
50
  <Scene>
51
51
  <Background
52
52
  skyColor='0.2 0.2 0.2'>
@@ -101,7 +101,7 @@ material .setAttribute ("diffuseColor", "1 0 0"); // Set diffuse color to red.
101
101
 
102
102
  ## Events
103
103
 
104
- You can add an event listener to any X3D element with the name of the output field you want to listen to. If the field has changed an event will occur.
104
+ You can add an event listener to any X3D element with the name of the output field you want to listen to. If the field has changed, an event will occur.
105
105
 
106
106
  Events sent from a node are of type CustomEvent and have the following properties:
107
107
 
@@ -118,7 +118,7 @@ CustomEvent: {
118
118
 
119
119
  ## Add and Remove Nodes
120
120
 
121
- The contents of the X3D scene can be modified with DOM manipulation methods to change the scene. You can add and remove nodes to build your own scene.
121
+ The content of the X3D scene can be modified with DOM manipulation methods to change the scene. You can add and remove nodes to build your own scene.
122
122
 
123
123
  ```js
124
124
  function addBlueBox ()
@@ -150,13 +150,44 @@ function removeBlueBox ()
150
150
  }
151
151
  ```
152
152
 
153
+ ## Add and Remove Routes
154
+
155
+ As well as nodes, routes can also be added and removed using DOM manipulation methods.
156
+
157
+ ```js
158
+ function addRoute ()
159
+ {
160
+ const
161
+ scene = document .querySelector ("Scene"),
162
+ route = document .createElement ("ROUTE");
163
+
164
+ // Connect a TimeSensor node with DEF name »Timer« to a ScalarInterpolator node
165
+ // with DEF name »Interpolator«.
166
+
167
+ route .setAttribute ("id", "route1");
168
+ route .setAttribute ("fromNode", "Timer");
169
+ route .setAttribute ("fromField", "fraction_changed");
170
+ route .setAttribute ("toNode", "Interpolator");
171
+ route .setAttribute ("toField", "set_fraction");
172
+
173
+ scene .appendChild (route);
174
+ }
175
+
176
+ function removeRoute ()
177
+ {
178
+ const route = document .querySelector ("#route1");
179
+
180
+ route .remove ();
181
+ }
182
+ ```
183
+
153
184
  ## Inline Nodes
154
185
 
155
- Even the contents of Inline nodes can be accessed and modified. The internal scene of the Inline node is attached to the Inline element as child every time the Inline node is completely loaded. To check if an Inline node is loaded use a LoadSensor node.
186
+ Even the content of Inline nodes can be accessed and modified. The internal scene of the Inline node is attached to the Inline element as child every time the Inline node is completely loaded. To check if an Inline node is loaded use a LoadSensor node.
156
187
 
157
188
  ```html
158
189
  <x3d-canvas>
159
- <X3D profile='Interactive' version='4.0'>
190
+ <X3D profile='Interactive' version='{{ site.x3d_latest_version }}'>
160
191
  <Scene>
161
192
  <!-- Be aware of the double quotes inside the single quotes of the url attribute, because it is an MFString field. -->
162
193
  <Inline DEF='DeerInline'
@@ -176,35 +207,31 @@ Assuming there is a Transform node with DEF name »Deer« inside the loaded scen
176
207
  const transform = document .querySelector ("[DEF='DeerInline'] [DEF='Deer']");
177
208
  ```
178
209
 
179
- ## Add and Remove Routes
210
+ ### Events of Inline Element
180
211
 
181
- As well as nodes, routes can also be added and removed using DOM manipulation methods.
212
+ Every Inline element sends a `load` or `error` event when the content of the Inline is loaded or failed loading.
182
213
 
183
214
  ```js
184
- function addRoute ()
185
- {
186
- const
187
- scene = document .querySelector ("Scene"),
188
- route = document .createElement ("ROUTE");
215
+ const inline = document .querySelector ("[DEF='DeerInline']");
189
216
 
190
- // Connect a TimeSensor node with DEF name »Timer« to a ScalarInterpolator node
191
- // with DEF name »Interpolator«.
217
+ inline .addEventListener ("load", () => console .log ("Deer loaded!"));
218
+ ```
192
219
 
193
- route .setAttribute ("id", "route1");
194
- route .setAttribute ("fromNode", "Timer");
195
- route .setAttribute ("fromField", "fraction_changed");
196
- route .setAttribute ("toNode", "Interpolator");
197
- route .setAttribute ("toField", "set_fraction");
220
+ ## Script Element
198
221
 
199
- scene .appendChild (route);
200
- }
222
+ If you use a HTML instead of a XHTML page then there is already a \<script\> element, as you know. To avoid collisions you must add a different type. A proper type is `model/x3d+xml`, which prevents the web browser from interpreting the content as JavaScript, and X_ITE can take over the content.
201
223
 
202
- function removeRoute ()
224
+ ```html
225
+ <Script type='model/x3d+xml' DEF='ChangeColorScript'>
226
+ <field accessType='inputOnly' type='SFBool' name='set_over'></field>
227
+ <field accessType='outputOnly' type='SFColor' name='diffuseColor_changed'></field>
228
+ <![CDATA[ecmascript:
229
+ function set_over (value, time)
203
230
  {
204
- const route = document .querySelector ("#route1");
205
-
206
- route .remove ();
231
+ diffuseColor_changed = value ? new SFColor (1, 0, 0) : new SFColor (0, 0, 1);
207
232
  }
233
+ ]]>
234
+ </Script>
208
235
  ```
209
236
 
210
237
  ## See Also