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.
- package/.github/workflows/pages-deploy.yml +1 -1
- package/.vscode/settings.json +2 -1
- package/build/bin/tests.pl +2 -0
- package/dist/LICENSE.md +4 -4
- package/dist/assets/components/Annotation.js +13 -13
- package/dist/assets/components/Annotation.min.js +1 -1
- package/dist/assets/components/CADGeometry.js +13 -13
- package/dist/assets/components/CADGeometry.min.js +1 -1
- package/dist/assets/components/CubeMapTexturing.js +25 -25
- package/dist/assets/components/CubeMapTexturing.min.js +1 -1
- package/dist/assets/components/DIS.js +13 -13
- package/dist/assets/components/DIS.min.js +1 -1
- package/dist/assets/components/EventUtilities.js +9 -9
- package/dist/assets/components/EventUtilities.min.js +1 -1
- package/dist/assets/components/Geometry2D.js +19 -19
- package/dist/assets/components/Geometry2D.min.js +1 -1
- package/dist/assets/components/Geospatial.js +33 -33
- package/dist/assets/components/Geospatial.min.js +1 -1
- package/dist/assets/components/HAnim.js +61 -74
- package/dist/assets/components/HAnim.min.js +1 -1
- package/dist/assets/components/KeyDeviceSensor.js +8 -8
- package/dist/assets/components/KeyDeviceSensor.min.js +1 -1
- package/dist/assets/components/Layout.js +27 -27
- package/dist/assets/components/Layout.min.js +1 -1
- package/dist/assets/components/NURBS.js +24 -24
- package/dist/assets/components/NURBS.min.js +1 -1
- package/dist/assets/components/ParticleSystems.js +23 -23
- package/dist/assets/components/ParticleSystems.min.js +1 -1
- package/dist/assets/components/Picking.js +19 -19
- package/dist/assets/components/Picking.min.js +1 -1
- package/dist/assets/components/RigidBodyPhysics.js +17 -17
- package/dist/assets/components/RigidBodyPhysics.min.js +1 -1
- package/dist/assets/components/Scripting.js +28 -28
- package/dist/assets/components/Scripting.min.js +1 -1
- package/dist/assets/components/Text.js +24 -24
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/{ProjectiveTextureMapping.js → TextureProjector.js} +39 -39
- package/dist/assets/components/TextureProjector.min.js +1 -0
- package/dist/assets/components/Texturing3D.js +46 -46
- package/dist/assets/components/Texturing3D.min.js +1 -1
- package/dist/assets/components/VolumeRendering.js +19 -19
- package/dist/assets/components/VolumeRendering.min.js +1 -1
- package/dist/assets/components/X_ITE.js +9 -9
- package/dist/assets/components/X_ITE.min.js +1 -1
- package/dist/x_ite.css +1 -1
- package/dist/x_ite.js +1904 -1570
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/Gemfile +1 -4
- package/docs/_config.yml +3 -2
- package/docs/_posts/custom-shaders.md +1 -1
- package/docs/_posts/dom-integration.md +52 -25
- package/docs/_posts/getting-started.md +148 -442
- package/docs/_posts/reference/field-services-and-objects.md +2 -34
- package/docs/_posts/reference/scene-services.md +13 -2
- package/docs/_posts/tutorials/basic-nodes.md +2 -2
- package/docs/_posts/tutorials/building-a-x3d-world.md +20 -4
- package/docs/_posts/tutorials/building-primitive-shapes.md +4 -4
- package/docs/_posts/tutorials/creating-new-node-types.md +22 -0
- package/docs/_posts/tutorials/hello-world.md +6 -6
- package/docs/_posts/tutorials/improving-performance.md +2 -2
- package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +2 -2
- package/docs/_posts/what's-new.md +21 -3
- package/docs/_tabs/playground.html +110 -57
- package/docs/assets/css/style.scss +25 -1
- package/package.json +2 -2
- package/src/assets/components/{ProjectiveTextureMapping.js → TextureProjector.js} +5 -5
- package/src/examples.js +1 -1
- package/src/tests.js +5 -5
- package/src/x_ite/Base/X3DArrayField.js +3 -0
- package/src/x_ite/Base/X3DBaseNode.js +4 -0
- package/src/x_ite/Base/X3DInfoArray.js +28 -24
- package/src/x_ite/Base/X3DObject.js +29 -20
- package/src/x_ite/Base/X3DObjectArrayField.js +27 -26
- package/src/x_ite/Base/X3DTypedArrayField.js +34 -32
- package/src/x_ite/Browser/Core/ContextMenu.js +5 -7
- package/src/x_ite/Browser/DOMIntegration.js +62 -54
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +44 -29
- package/src/x_ite/Browser/X3DBrowserContext.js +3 -0
- package/src/x_ite/Components/Core/X3DNode.js +196 -187
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +114 -91
- package/src/x_ite/Components/Grouping/X3DTransformMatrix3DNode.js +18 -43
- package/src/x_ite/Components/HAnim/HAnimHumanoid.js +24 -25
- package/src/x_ite/Components/HAnim/HAnimJoint.js +19 -31
- package/src/x_ite/Components/Networking/Inline.js +21 -2
- package/src/x_ite/Components/Sound/X3DSoundProcessingNode.js +14 -1
- package/src/x_ite/Components/Sound/X3DSoundSourceNode.js +0 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjector.js +1 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/TextureProjectorParallel.js +1 -1
- package/src/x_ite/Components/{ProjectiveTextureMapping → TextureProjector}/X3DTextureProjectorNode.js +0 -0
- package/src/x_ite/Components/Time/TimeSensor.js +5 -0
- package/src/x_ite/Components/Time/X3DTimeDependentNode.js +1 -0
- package/src/x_ite/Configuration/ComponentInfo.js +20 -23
- package/src/x_ite/Configuration/ProfileInfo.js +6 -6
- package/src/x_ite/Configuration/SupportedComponents.js +22 -20
- package/src/x_ite/Configuration/SupportedNodes.js +1 -5
- package/src/x_ite/Configuration/SupportedProfiles.js +1 -1
- package/src/x_ite/Configuration/UnitInfo.js +24 -27
- package/src/x_ite/Execution/X3DExecutionContext.js +28 -59
- package/src/x_ite/Execution/X3DExportedNode.js +23 -28
- package/src/x_ite/Execution/X3DImportedNode.js +63 -67
- package/src/x_ite/Execution/X3DScene.js +98 -117
- package/src/x_ite/Fields/ArrayFields.js +57 -55
- package/src/x_ite/Fields/SFBool.js +6 -6
- package/src/x_ite/Fields/SFColor.js +10 -12
- package/src/x_ite/Fields/SFDouble.js +7 -10
- package/src/x_ite/Fields/SFFloat.js +7 -10
- package/src/x_ite/Fields/SFImage.js +33 -8
- package/src/x_ite/Fields/SFInt32.js +6 -6
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +13 -13
- package/src/x_ite/Fields/SFNode.js +42 -19
- package/src/x_ite/Fields/SFRotation.js +13 -13
- package/src/x_ite/Fields/SFString.js +6 -7
- package/src/x_ite/Fields/SFTime.js +6 -6
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +10 -10
- package/src/x_ite/InputOutput/FileLoader.js +1 -1
- package/src/x_ite/InputOutput/Generator.js +117 -17
- package/src/x_ite/Parser/VRMLParser.js +24 -27
- package/src/x_ite/Parser/X3DParser.js +0 -4
- package/src/x_ite/Parser/XMLParser.js +152 -50
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +59 -64
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +86 -93
- package/src/x_ite/Rendering/X3DRenderObject.js +6 -1
- package/src/x_ite/Routing/X3DRoute.js +37 -40
- package/src/x_ite.html +3 -3
- package/webpack.config.js +2 -2
- package/x_ite.min.html +1 -1
- package/dist/assets/components/ProjectiveTextureMapping.min.js +0 -1
- 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
|
+
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.
|
|
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"
|
|
@@ -46,7 +46,7 @@ window .addEventListener ("load", function ()
|
|
|
46
46
|
</head>
|
|
47
47
|
<body>
|
|
48
48
|
<x3d-canvas>
|
|
49
|
-
<X3D profile='Interactive' version='
|
|
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
|
|
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
|
|
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='
|
|
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
|
-
|
|
210
|
+
### Events of Inline Element
|
|
180
211
|
|
|
181
|
-
|
|
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
|
-
|
|
185
|
-
{
|
|
186
|
-
const
|
|
187
|
-
scene = document .querySelector ("Scene"),
|
|
188
|
-
route = document .createElement ("ROUTE");
|
|
215
|
+
const inline = document .querySelector ("[DEF='DeerInline']");
|
|
189
216
|
|
|
190
|
-
|
|
191
|
-
|
|
217
|
+
inline .addEventListener ("load", () => console .log ("Deer loaded!"));
|
|
218
|
+
```
|
|
192
219
|
|
|
193
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|