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.
- package/.vscode/launch.json +15 -0
- package/.vscode/settings.json +2 -5
- package/Makefile +1 -0
- package/README.md +1 -1
- package/build/components/annotation.build.js +2 -2
- package/build/components/cad-geometry.build.js +2 -2
- package/build/components/cube-map-texturing.build.js +2 -2
- package/build/components/dis.build.js +2 -2
- package/build/components/event-utilities.build.js +2 -2
- package/build/components/geometry2d.build.js +2 -2
- package/build/components/geospatial.build.js +2 -2
- package/build/components/h-anim.build.js +2 -2
- package/build/components/key-device-sensor.build.js +2 -2
- package/build/components/layout.build.js +2 -2
- package/build/components/nurbs.build.js +2 -2
- package/build/components/particle-systems.build.js +2 -2
- package/build/components/picking.build.js +2 -2
- package/build/components/projective-texture-mapping.build.js +2 -2
- package/build/components/rigid-body-physics.build.js +2 -2
- package/build/components/scripting.build.js +2 -2
- package/build/components/texturing-3d.build.js +2 -2
- package/build/components/volume-rendering.build.js +2 -2
- package/build/components/x_ite.build.js +2 -2
- package/build/parts/default.end.frag.js +2 -0
- package/build/parts/default.start.frag.js +8 -0
- package/build/parts/{x_ite.end.frag → x_ite.end.frag.js} +4 -2
- package/build/parts/x_ite.start.frag.js +16 -0
- package/build/x_ite.build.js +2 -2
- package/dist/assets/components/annotation.js +9 -7
- package/dist/assets/components/annotation.min.js +1 -1
- package/dist/assets/components/cad-geometry.js +9 -7
- package/dist/assets/components/cad-geometry.min.js +1 -1
- package/dist/assets/components/cube-map-texturing.js +9 -7
- package/dist/assets/components/cube-map-texturing.min.js +1 -1
- package/dist/assets/components/dis.js +9 -7
- package/dist/assets/components/dis.min.js +1 -1
- package/dist/assets/components/event-utilities.js +9 -7
- package/dist/assets/components/event-utilities.min.js +1 -1
- package/dist/assets/components/geometry2d.js +9 -7
- package/dist/assets/components/geometry2d.min.js +1 -1
- package/dist/assets/components/geospatial.js +9 -7
- package/dist/assets/components/geospatial.min.js +2 -2
- package/dist/assets/components/h-anim.js +9 -7
- package/dist/assets/components/h-anim.min.js +1 -1
- package/dist/assets/components/key-device-sensor.js +9 -7
- package/dist/assets/components/key-device-sensor.min.js +1 -1
- package/dist/assets/components/layout.js +9 -7
- package/dist/assets/components/layout.min.js +1 -1
- package/dist/assets/components/nurbs.js +9 -7
- package/dist/assets/components/nurbs.min.js +2 -2
- package/dist/assets/components/particle-systems.js +9 -7
- package/dist/assets/components/particle-systems.min.js +2 -2
- package/dist/assets/components/picking.js +13 -11
- package/dist/assets/components/picking.min.js +1 -1
- package/dist/assets/components/projective-texture-mapping.js +9 -7
- package/dist/assets/components/projective-texture-mapping.min.js +1 -1
- package/dist/assets/components/rigid-body-physics.js +9 -7
- package/dist/assets/components/rigid-body-physics.min.js +17 -17
- package/dist/assets/components/scripting.js +16 -9
- package/dist/assets/components/scripting.min.js +1 -1
- package/dist/assets/components/texturing-3d.js +9 -7
- package/dist/assets/components/texturing-3d.min.js +3 -3
- package/dist/assets/components/volume-rendering.js +11 -9
- package/dist/assets/components/volume-rendering.min.js +3 -3
- package/dist/assets/components/x_ite.js +9 -7
- package/dist/assets/components/x_ite.min.js +1 -1
- package/dist/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
- package/dist/assets/shaders/webgl1/Gouraud.vs +0 -1
- package/dist/assets/shaders/webgl1/Phong.fs +0 -1
- package/dist/assets/shaders/webgl1/Unlit.fs +0 -3
- package/dist/assets/shaders/webgl2/Gouraud.vs +0 -1
- package/dist/assets/shaders/webgl2/Phong.fs +0 -1
- package/dist/assets/shaders/webgl2/Unlit.fs +0 -3
- package/dist/example.html +2 -2
- package/dist/x_ite.css +4 -3
- package/dist/x_ite.js +28281 -27706
- package/dist/x_ite.min.js +41 -41
- package/dist/x_ite.zip +0 -0
- package/docs/Accessing-the-External-Browser.md +32 -3
- package/docs/Custom-Shaders.md +165 -174
- package/docs/What's-New.md +61 -6
- package/docs/_config.yml +1 -1
- package/docs/index.md +21 -14
- package/docs/reference/Browser-Services.md +36 -8
- package/docs/reference/Script-Node-Authoring-Interface.md +12 -4
- package/package.json +13 -6
- package/src/assets/components/picking.js +2 -2
- package/src/assets/components/volume-rendering.js +2 -2
- package/src/assets/shaders/webgl1/FallbackUnlit.fs +3 -4
- package/src/assets/shaders/webgl1/Gouraud.vs +0 -1
- package/src/assets/shaders/webgl1/Phong.fs +0 -1
- package/src/assets/shaders/webgl1/Unlit.fs +0 -3
- package/src/assets/shaders/webgl2/Gouraud.vs +0 -1
- package/src/assets/shaders/webgl2/Phong.fs +0 -1
- package/src/assets/shaders/webgl2/Unlit.fs +0 -3
- package/src/bookmarks.js +8 -11
- package/src/examples.js +1 -1
- package/src/locale/de.po +19 -75
- package/src/locale/fr.po +18 -75
- package/src/standard/Time/MicroTime.js +3 -1
- package/src/standard/Utility/DataStorage.js +7 -10
- package/src/tests.js +2 -1
- package/src/x_ite/Browser/Core/BrowserOptions.js +40 -28
- package/src/x_ite/Browser/Core/BrowserTimings.js +13 -24
- package/src/x_ite/Browser/Core/ContextMenu.js +26 -12
- package/src/x_ite/Browser/Core/X3DCoreContext.js +95 -42
- package/src/x_ite/Browser/Navigation/ExamineViewer.js +3 -0
- package/src/x_ite/Browser/Navigation/LookAtViewer.js +3 -0
- package/src/x_ite/Browser/Navigation/PlaneViewer.js +3 -0
- package/src/x_ite/Browser/Navigation/X3DFlyViewer.js +3 -0
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +1 -3
- package/src/x_ite/Browser/Networking/urls.js +25 -0
- package/src/x_ite/Browser/Picking/VolumePicker.js +1 -1
- package/src/x_ite/Browser/PointingDeviceSensor/PointingDevice.js +4 -1
- package/src/x_ite/Browser/Shaders/ShaderTest.js +3 -3
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Browser/X3DBrowser.js +70 -50
- package/src/x_ite/Components/Grouping/Switch.js +1 -1
- package/src/x_ite/Components/Lighting/DirectionalLight.js +1 -1
- package/src/x_ite/Components/Navigation/Collision.js +1 -1
- package/src/x_ite/Components/Navigation/LOD.js +1 -1
- package/src/x_ite/Components/Picking/PointPickSensor.js +1 -1
- package/src/x_ite/Components/Rendering/X3DGeometryNode.js +25 -11
- package/src/x_ite/Components/Rendering/X3DLineGeometryNode.js +35 -1
- package/src/x_ite/Components/Scripting/Script.js +7 -2
- package/src/x_ite/Components/Shaders/X3DProgrammableShaderObject.js +10 -12
- package/src/x_ite/Components/Shaders.js +9 -9
- package/src/x_ite/Execution/X3DExecutionContext.js +9 -11
- package/src/x_ite/Fields/SFColor.js +20 -7
- package/src/x_ite/Fields/SFColorRGBA.js +6 -6
- package/src/x_ite/Fields/SFDouble.js +2 -2
- package/src/x_ite/Fields/SFFloat.js +2 -2
- package/src/x_ite/Fields/SFImage.js +13 -13
- package/src/x_ite/Fields/SFMatrix3.js +5 -5
- package/src/x_ite/Fields/SFMatrix4.js +6 -6
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +14 -3
- package/src/x_ite/Fields/SFNode.js +23 -19
- package/src/x_ite/Fields/SFNodeCache.js +14 -10
- package/src/x_ite/Fields/SFRotation.js +10 -10
- package/src/x_ite/Fields/SFString.js +1 -1
- package/src/x_ite/Fields/SFTime.js +1 -1
- package/src/x_ite/Fields/SFVec2.js +6 -6
- package/src/x_ite/Fields/SFVec3.js +7 -7
- package/src/x_ite/Fields/SFVec4.js +8 -8
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +7 -6
- package/src/x_ite/InputOutput/Generator.js +85 -65
- package/src/x_ite/Parser/X3DParser.js +6 -0
- package/src/x_ite/Parser/XMLParser.js +1 -1
- package/src/x_ite/X3D.js +8 -2
- package/src/x_ite.config.js +0 -5
- package/src/x_ite.css +2 -1
- package/src/x_ite.html +3 -3
- package/src/x_ite.js +21 -12
- package/x_ite.min.html +3 -3
- package/build/parts/default.end.frag +0 -2
- package/build/parts/default.start.frag +0 -6
- package/build/parts/x_ite.start.frag +0 -8
package/docs/What's-New.md
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
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
|
|
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
|
-
####
|
|
827
|
+
#### Latest Stable Version
|
|
816
828
|
|
|
817
|
-
If you are
|
|
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/
|
|
821
|
-
<script type="text/javascript" src="https://create3000.github.io/code/x_ite/
|
|
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
|
-
####
|
|
836
|
+
#### Snipped
|
|
825
837
|
|
|
826
|
-
If you are
|
|
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/
|
|
830
|
-
<script type="text/javascript" src="https://create3000.github.io/code/x_ite/
|
|
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
|
-
####
|
|
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>
|
|
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
|
-
###
|
|
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
|
|
317
|
-
|
|
316
|
+
inputOnly SFVec3f set_pos
|
|
317
|
+
inputOutput SFRotation rot
|
|
318
|
+
initializeOnly SFNode node USE SomeNode
|
|
318
319
|
url "ecmascript:
|
|
319
320
|
...
|
|
320
321
|
|
|
321
|
-
|
|
322
|
+
// Callback for 'inputOnly SFVec3f set_pos'.
|
|
323
|
+
function set_pos (value)
|
|
322
324
|
{
|
|
323
|
-
node .
|
|
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.
|
|
4
|
-
"revision": "
|
|
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": "
|
|
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@
|
|
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
|
-
|
|
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
|
-
|
|
69
|
-
|
|
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
|
|
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
|
|
19
|
-
finalColor .a
|
|
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;
|
|
@@ -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
|
-
|
|
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 (
|
|
64
|
+
for (const bookmarks of array)
|
|
65
65
|
{
|
|
66
|
-
|
|
67
|
-
bookmarks = array [a],
|
|
68
|
-
server = bookmarks .server;
|
|
66
|
+
const server = bookmarks .server;
|
|
69
67
|
|
|
70
|
-
for (
|
|
68
|
+
for (const bookmark of bookmarks)
|
|
71
69
|
{
|
|
72
|
-
|
|
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
|
-
|
|
95
|
-
|
|
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
|
-
|
|
126
|
+
const url = this .browser .getLocalStorage () ["Bookmarks.url"];
|
|
130
127
|
|
|
131
128
|
if (url)
|
|
132
129
|
this .loadURL (url);
|
package/src/examples.js
CHANGED