x_ite 8.3.0 → 8.3.1
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/README.md +5 -2
- 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 +18 -18
- 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/ProjectiveTextureMapping.js +14 -14
- package/dist/assets/components/ProjectiveTextureMapping.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/Texturing3D.js +27 -27
- 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 +123 -105
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/_posts/getting-started.md +5 -2
- package/docs/_posts/tutorials/basic-nodes.md +1 -1
- package/docs/_posts/tutorials/building-a-x3d-world.md +1 -1
- package/docs/_posts/tutorials/building-primitive-shapes.md +2 -2
- package/docs/_posts/tutorials/hello-world.md +3 -3
- package/docs/_posts/tutorials/improving-performance.md +1 -1
- package/docs/_posts/tutorials/writing-program-scripts-with-ecmascript.md +1 -1
- package/package.json +1 -1
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Execution/X3DScene.js +74 -58
- package/src/x_ite/Parser/JSONParser.js +1 -1
package/dist/x_ite.zip
CHANGED
|
Binary file
|
package/docs/_config.yml
CHANGED
|
@@ -819,10 +819,13 @@ There is a ZIP archive available to locally install X_ITE on your server. Compre
|
|
|
819
819
|
$ npm install x_ite
|
|
820
820
|
```
|
|
821
821
|
|
|
822
|
-
It can be used in [Electron](https://www.electronjs.org){:target="_blank"} apps in the **renderer process** like this:
|
|
822
|
+
It can be used in [Electron](https://www.electronjs.org){:target="_blank"} apps in a preload script of the **renderer process** like this:
|
|
823
823
|
|
|
824
824
|
```js
|
|
825
|
-
|
|
825
|
+
window .addEventListener ("DOMContentLoaded", () =>
|
|
826
|
+
{
|
|
827
|
+
const X3D = require ("x_ite")
|
|
828
|
+
})
|
|
826
829
|
```
|
|
827
830
|
|
|
828
831
|
Make sure that contextIsolation is set to **false** when creating a BrowserWindow instance.
|
|
@@ -28,7 +28,7 @@ Here is a typical X3D Classic Encoded file with a single node:
|
|
|
28
28
|
|
|
29
29
|
```xml
|
|
30
30
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
31
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
31
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
32
32
|
<Scene>
|
|
33
33
|
<PlaneSensor DEF='Sensor'
|
|
34
34
|
offset='0 2 0'/>
|
|
@@ -23,7 +23,7 @@ X3D files contain:
|
|
|
23
23
|
|
|
24
24
|
```xml
|
|
25
25
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
26
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
26
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
27
27
|
<Scene>
|
|
28
28
|
<!-- A Cylinder -->
|
|
29
29
|
<Shape>
|
|
@@ -100,7 +100,7 @@ Text { ... }
|
|
|
100
100
|
|
|
101
101
|
```xml
|
|
102
102
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
103
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
103
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
104
104
|
<Scene>
|
|
105
105
|
<Shape>
|
|
106
106
|
<Appearance>
|
|
@@ -149,7 +149,7 @@ Shape {
|
|
|
149
149
|
|
|
150
150
|
```xml
|
|
151
151
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
152
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
152
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
153
153
|
<Scene>
|
|
154
154
|
<Shape>
|
|
155
155
|
<Appearance>
|
|
@@ -31,7 +31,7 @@ As first a very easy example, we will create a sphere with a texture and a text
|
|
|
31
31
|
|
|
32
32
|
```xml
|
|
33
33
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
34
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
34
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
35
35
|
<Scene>
|
|
36
36
|
<Transform>
|
|
37
37
|
<Shape>
|
|
@@ -62,7 +62,7 @@ Now we have a sphere, but we don't see if it is rotating, let's assign a texture
|
|
|
62
62
|
|
|
63
63
|
```xml
|
|
64
64
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
65
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
65
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
66
66
|
<Scene>
|
|
67
67
|
<Transform>
|
|
68
68
|
<Shape>
|
|
@@ -119,7 +119,7 @@ Now the sphere looks like an earth and you are very curious how the text will be
|
|
|
119
119
|
|
|
120
120
|
```xml
|
|
121
121
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
122
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
122
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
123
123
|
<Scene>
|
|
124
124
|
<Viewpoint
|
|
125
125
|
description='Home'
|
|
@@ -76,7 +76,7 @@ Prototyping objects that are used frequently with a few modifications is another
|
|
|
76
76
|
|
|
77
77
|
```xml
|
|
78
78
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
79
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
79
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
80
80
|
<head>
|
|
81
81
|
<meta name='comment' content='World of Titania'/>
|
|
82
82
|
<meta name='created' content='Fri, 29 Jun 2018 13:24:34 GMT'/>
|
|
@@ -337,7 +337,7 @@ ROUTE Bouncer.value_changed TO Ball.set_translation
|
|
|
337
337
|
|
|
338
338
|
```xml
|
|
339
339
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
340
|
-
<X3D profile='Full' version='4.0' xmlns:xsd='
|
|
340
|
+
<X3D profile='Full' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-4.0.xsd'>
|
|
341
341
|
<Scene>
|
|
342
342
|
<Transform DEF='Ball'>
|
|
343
343
|
<Shape>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x_ite",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.1",
|
|
4
4
|
"description": "X_ITE X3D Browser, a framework for integrating and manipulating X3D and VRML scenes in HTML.",
|
|
5
5
|
"homepage": "https://create3000.github.io/x_ite/",
|
|
6
6
|
"author": "Holger Seelig <holger.seelig@gmail.com>",
|
|
@@ -374,7 +374,7 @@ X3DScene .prototype = Object .assign (Object .create (X3DExecutionContext .proto
|
|
|
374
374
|
stream .string += " ";
|
|
375
375
|
stream .string += this .getBrowser () .name;
|
|
376
376
|
stream .string += " ";
|
|
377
|
-
stream .string += "
|
|
377
|
+
stream .string += "V";
|
|
378
378
|
stream .string += this .getBrowser () .version;
|
|
379
379
|
stream .string += "\n";
|
|
380
380
|
stream .string += "\n";
|
|
@@ -472,7 +472,7 @@ X3DScene .prototype = Object .assign (Object .create (X3DExecutionContext .proto
|
|
|
472
472
|
stream .string += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
|
473
473
|
stream .string += "<!DOCTYPE X3D PUBLIC \"ISO//Web3D//DTD X3D ";
|
|
474
474
|
stream .string += LATEST_VERSION;
|
|
475
|
-
stream .string += "//EN\" \"
|
|
475
|
+
stream .string += "//EN\" \"http://www.web3d.org/specifications/x3d-";
|
|
476
476
|
stream .string += LATEST_VERSION;
|
|
477
477
|
stream .string += ".dtd\">\n";
|
|
478
478
|
|
|
@@ -486,92 +486,108 @@ X3DScene .prototype = Object .assign (Object .create (X3DExecutionContext .proto
|
|
|
486
486
|
stream .string += LATEST_VERSION;
|
|
487
487
|
stream .string += "'";
|
|
488
488
|
stream .string += " ";
|
|
489
|
-
stream .string += "xmlns:xsd='
|
|
489
|
+
stream .string += "xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance'";
|
|
490
490
|
stream .string += " ";
|
|
491
|
-
stream .string += "xsd:noNamespaceSchemaLocation='
|
|
491
|
+
stream .string += "xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-";
|
|
492
492
|
stream .string += LATEST_VERSION;
|
|
493
493
|
stream .string += ".xsd'>\n";
|
|
494
494
|
|
|
495
495
|
generator .IncIndent ();
|
|
496
496
|
|
|
497
|
-
|
|
498
|
-
|
|
497
|
+
if (this .getComponents () .length ||
|
|
498
|
+
this .getUnits () .some (unit => unit .conversionFactor !== 1) ||
|
|
499
|
+
this .getMetaDatas () .size)
|
|
500
|
+
{
|
|
501
|
+
stream .string += generator .Indent ();
|
|
502
|
+
stream .string += "<head>\n";
|
|
499
503
|
|
|
500
|
-
|
|
504
|
+
generator .IncIndent ();
|
|
501
505
|
|
|
502
|
-
|
|
506
|
+
// <head>
|
|
503
507
|
|
|
504
|
-
|
|
508
|
+
this .getComponents () .toXMLStream (stream);
|
|
505
509
|
|
|
506
|
-
|
|
507
|
-
{
|
|
508
|
-
if (unit .conversionFactor !== 1)
|
|
510
|
+
for (const unit of this .getUnits ())
|
|
509
511
|
{
|
|
510
|
-
unit .
|
|
512
|
+
if (unit .conversionFactor !== 1)
|
|
513
|
+
{
|
|
514
|
+
unit .toXMLStream (stream);
|
|
511
515
|
|
|
512
|
-
|
|
516
|
+
stream .string += "\n";
|
|
517
|
+
}
|
|
513
518
|
}
|
|
519
|
+
|
|
520
|
+
this .getMetaDatas () .forEach (function (value, key)
|
|
521
|
+
{
|
|
522
|
+
stream .string += generator .Indent ();
|
|
523
|
+
stream .string += "<meta";
|
|
524
|
+
stream .string += " ";
|
|
525
|
+
stream .string += "name='";
|
|
526
|
+
stream .string += generator .XMLEncode (key);
|
|
527
|
+
stream .string += "'";
|
|
528
|
+
stream .string += " ";
|
|
529
|
+
stream .string += "content='";
|
|
530
|
+
stream .string += generator .XMLEncode (value);
|
|
531
|
+
stream .string += "'";
|
|
532
|
+
stream .string += "/>\n";
|
|
533
|
+
});
|
|
534
|
+
|
|
535
|
+
// </head>
|
|
536
|
+
|
|
537
|
+
generator .DecIndent ();
|
|
538
|
+
|
|
539
|
+
stream .string += generator .Indent ();
|
|
540
|
+
stream .string += "</head>\n";
|
|
514
541
|
}
|
|
515
542
|
|
|
516
|
-
this .
|
|
543
|
+
if (this .getExternProtoDeclarations () .length ||
|
|
544
|
+
this .getProtoDeclarations () .length ||
|
|
545
|
+
this .getRootNodes () .length)
|
|
517
546
|
{
|
|
518
547
|
stream .string += generator .Indent ();
|
|
519
|
-
stream .string += "<
|
|
520
|
-
stream .string += " ";
|
|
521
|
-
stream .string += "name='";
|
|
522
|
-
stream .string += generator .XMLEncode (key);
|
|
523
|
-
stream .string += "'";
|
|
524
|
-
stream .string += " ";
|
|
525
|
-
stream .string += "content='";
|
|
526
|
-
stream .string += generator .XMLEncode (value);
|
|
527
|
-
stream .string += "'";
|
|
528
|
-
stream .string += "/>\n";
|
|
529
|
-
});
|
|
530
|
-
|
|
531
|
-
// </head>
|
|
532
|
-
|
|
533
|
-
generator .DecIndent ();
|
|
548
|
+
stream .string += "<Scene>\n";
|
|
534
549
|
|
|
535
|
-
|
|
536
|
-
stream .string += "</head>\n";
|
|
537
|
-
stream .string += generator .Indent ();
|
|
538
|
-
stream .string += "<Scene>\n";
|
|
550
|
+
generator .IncIndent ();
|
|
539
551
|
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
// <Scene>
|
|
552
|
+
// <Scene>
|
|
543
553
|
|
|
544
|
-
|
|
554
|
+
const exportedNodes = this .getExportedNodes ();
|
|
545
555
|
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
556
|
+
generator .PushExecutionContext (this);
|
|
557
|
+
generator .EnterScope ();
|
|
558
|
+
generator .ExportedNodes (exportedNodes);
|
|
549
559
|
|
|
550
|
-
|
|
560
|
+
X3DExecutionContext .prototype .toXMLStream .call (this, stream);
|
|
551
561
|
|
|
552
|
-
|
|
553
|
-
{
|
|
554
|
-
try
|
|
562
|
+
for (const exportedNode of exportedNodes)
|
|
555
563
|
{
|
|
556
|
-
|
|
564
|
+
try
|
|
565
|
+
{
|
|
566
|
+
exportedNode .toXMLStream (stream);
|
|
557
567
|
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
568
|
+
stream .string += "\n";
|
|
569
|
+
}
|
|
570
|
+
catch (error)
|
|
571
|
+
{
|
|
572
|
+
console .error (error);
|
|
573
|
+
}
|
|
563
574
|
}
|
|
564
|
-
}
|
|
565
575
|
|
|
566
|
-
|
|
567
|
-
|
|
576
|
+
generator .LeaveScope ();
|
|
577
|
+
generator .PopExecutionContext ();
|
|
568
578
|
|
|
569
|
-
|
|
579
|
+
// </Scene>
|
|
570
580
|
|
|
571
|
-
|
|
581
|
+
generator .DecIndent ();
|
|
572
582
|
|
|
573
|
-
|
|
574
|
-
|
|
583
|
+
stream .string += generator .Indent ();
|
|
584
|
+
stream .string += "</Scene>\n";
|
|
585
|
+
}
|
|
586
|
+
else
|
|
587
|
+
{
|
|
588
|
+
stream .string += generator .Indent ();
|
|
589
|
+
stream .string += "<Scene/>\n";
|
|
590
|
+
}
|
|
575
591
|
|
|
576
592
|
generator .DecIndent ();
|
|
577
593
|
|
|
@@ -54,7 +54,7 @@ function JSONParser (scene)
|
|
|
54
54
|
{
|
|
55
55
|
X3DParser .call (this, scene);
|
|
56
56
|
|
|
57
|
-
this .namespace = "
|
|
57
|
+
this .namespace = "http://www.web3d.org/specifications/x3d-namespace";
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
JSONParser .prototype = Object .assign (Object .create (X3DParser .prototype),
|