x_ite 4.7.8 → 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/build/parts/default.end.frag.js +1 -2
- package/build/parts/default.start.frag.js +1 -8
- package/build/parts/x_ite.end.frag.js +1 -3
- package/build/parts/x_ite.start.frag.js +1 -2
- package/dist/assets/components/annotation.js +2 -10
- package/dist/assets/components/annotation.min.js +1 -1
- package/dist/assets/components/cad-geometry.js +2 -10
- package/dist/assets/components/cad-geometry.min.js +1 -1
- package/dist/assets/components/cube-map-texturing.js +2 -10
- package/dist/assets/components/cube-map-texturing.min.js +1 -1
- package/dist/assets/components/dis.js +2 -10
- package/dist/assets/components/dis.min.js +1 -1
- package/dist/assets/components/event-utilities.js +2 -10
- package/dist/assets/components/event-utilities.min.js +1 -1
- package/dist/assets/components/geometry2d.js +2 -10
- package/dist/assets/components/geometry2d.min.js +1 -1
- package/dist/assets/components/geospatial.js +2 -10
- package/dist/assets/components/geospatial.min.js +2 -2
- package/dist/assets/components/h-anim.js +2 -10
- package/dist/assets/components/h-anim.min.js +1 -1
- package/dist/assets/components/key-device-sensor.js +2 -10
- package/dist/assets/components/key-device-sensor.min.js +1 -1
- package/dist/assets/components/layout.js +2 -10
- package/dist/assets/components/layout.min.js +1 -1
- package/dist/assets/components/nurbs.js +2 -10
- package/dist/assets/components/nurbs.min.js +2 -2
- package/dist/assets/components/particle-systems.js +2 -10
- package/dist/assets/components/particle-systems.min.js +2 -2
- package/dist/assets/components/picking.js +2 -10
- package/dist/assets/components/picking.min.js +1 -1
- package/dist/assets/components/projective-texture-mapping.js +2 -10
- package/dist/assets/components/projective-texture-mapping.min.js +1 -1
- package/dist/assets/components/rigid-body-physics.js +2 -10
- package/dist/assets/components/rigid-body-physics.min.js +17 -17
- package/dist/assets/components/scripting.js +2 -10
- package/dist/assets/components/scripting.min.js +1 -1
- package/dist/assets/components/texturing-3d.js +2 -10
- package/dist/assets/components/texturing-3d.min.js +41 -41
- package/dist/assets/components/volume-rendering.js +2 -10
- package/dist/assets/components/volume-rendering.min.js +3 -3
- package/dist/assets/components/x_ite.js +2 -10
- package/dist/assets/components/x_ite.min.js +1 -1
- package/dist/example.html +2 -2
- package/dist/x_ite.css +4 -3
- package/dist/x_ite.js +117 -95
- package/dist/x_ite.min.js +41 -41
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +1 -1
- package/docs/index.md +2 -2
- package/package.json +5 -3
- package/src/locale/de.po +4 -4
- package/src/locale/fr.po +4 -4
- package/src/x_ite/Browser/Core/BrowserTimings.js +1 -3
- package/src/x_ite/Browser/Networking/X3DNetworkingContext.js +1 -3
- package/src/x_ite/Browser/Networking/urls.js +24 -6
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Fields/SFColor.js +15 -2
- package/src/x_ite/Fields/SFDouble.js +1 -1
- package/src/x_ite/Fields/SFFloat.js +1 -1
- package/src/x_ite/Fields/SFMatrix3.js +4 -4
- package/src/x_ite/Fields/SFMatrix4.js +5 -5
- package/src/x_ite/Fields/SFMatrixPrototypeTemplate.js +14 -3
- package/src/x_ite/Fields/SFRotation.js +4 -4
- package/src/x_ite/Fields/SFTime.js +1 -1
- package/src/x_ite/Fields/SFVec2.js +4 -4
- package/src/x_ite/Fields/SFVec3.js +4 -4
- package/src/x_ite/Fields/SFVec4.js +4 -4
- package/src/x_ite/Fields/SFVecPrototypeTemplate.js +6 -5
- package/src/x_ite/InputOutput/Generator.js +14 -3
- package/src/x_ite/Parser/X3DParser.js +5 -12
- package/src/x_ite/X3D.js +2 -7
- 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 +1 -8
- package/x_ite.min.html +3 -3
package/dist/x_ite.zip
CHANGED
|
Binary file
|
package/docs/_config.yml
CHANGED
package/docs/index.md
CHANGED
|
@@ -838,8 +838,8 @@ If you are a developer or you always wanna be up to date:
|
|
|
838
838
|
If you are on production and everything works fine, then use a numbered version.
|
|
839
839
|
|
|
840
840
|
```html
|
|
841
|
-
<link rel="stylesheet" type="text/css" href="https://create3000.github.io/code/x_ite/4.7.
|
|
842
|
-
<script type="text/javascript" src="https://create3000.github.io/code/x_ite/4.7.
|
|
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>
|
|
843
843
|
```
|
|
844
844
|
|
|
845
845
|
### jsDelivr CDN
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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
6
|
"main": "dist/x_ite.js",
|
|
7
7
|
"repository": {
|
|
@@ -64,12 +64,14 @@
|
|
|
64
64
|
"require": "^0.4.4",
|
|
65
65
|
"requirejs": ">=2.3.6",
|
|
66
66
|
"requirejs-text": ">=2.0.15",
|
|
67
|
-
"sprintf-js": ">=1.1.2",
|
|
68
67
|
"uglify-js-es6": ">=2.8.9"
|
|
69
68
|
},
|
|
70
69
|
"scripts": {
|
|
71
70
|
"lint": "jshint **",
|
|
72
71
|
"build": "make",
|
|
73
72
|
"-prebuild:js": "npm run lint"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"sprintf-js": "^1.1.2"
|
|
74
76
|
}
|
|
75
77
|
}
|
package/src/locale/de.po
CHANGED
|
@@ -153,11 +153,11 @@ msgstr "Auf Objekte zielen"
|
|
|
153
153
|
msgid "None Viewer"
|
|
154
154
|
msgstr "Kein Betrachter"
|
|
155
155
|
|
|
156
|
-
msgid "Loading %
|
|
157
|
-
msgstr "Lade %
|
|
156
|
+
msgid "Loading %1 file"
|
|
157
|
+
msgstr "Lade %1 Datei"
|
|
158
158
|
|
|
159
|
-
msgid "Loading %
|
|
160
|
-
msgstr "Lade %
|
|
159
|
+
msgid "Loading %1 files"
|
|
160
|
+
msgstr "Lade %1 Dateien"
|
|
161
161
|
|
|
162
162
|
msgid "Loading done"
|
|
163
163
|
msgstr "Fertig mit Laden"
|
package/src/locale/fr.po
CHANGED
|
@@ -153,11 +153,11 @@ msgstr "Regarder un objet de près"
|
|
|
153
153
|
msgid "None Viewer"
|
|
154
154
|
msgstr "Pas de visionneur"
|
|
155
155
|
|
|
156
|
-
msgid "Loading %
|
|
157
|
-
msgstr "Télécharger %
|
|
156
|
+
msgid "Loading %1 file"
|
|
157
|
+
msgstr "Télécharger %1 fichier"
|
|
158
158
|
|
|
159
|
-
msgid "Loading %
|
|
160
|
-
msgstr "Télécharger %
|
|
159
|
+
msgid "Loading %1 files"
|
|
160
|
+
msgstr "Télécharger %1 fichiers"
|
|
161
161
|
|
|
162
162
|
msgid "Loading done"
|
|
163
163
|
msgstr "Téléchargement fini"
|
|
@@ -49,18 +49,16 @@
|
|
|
49
49
|
|
|
50
50
|
define ([
|
|
51
51
|
"jquery",
|
|
52
|
-
"x_ite/Fields/SFBool",
|
|
53
52
|
"x_ite/Basic/X3DBaseNode",
|
|
54
53
|
"locale/gettext",
|
|
55
54
|
],
|
|
56
55
|
function ($,
|
|
57
|
-
SFBool,
|
|
58
56
|
X3DBaseNode,
|
|
59
57
|
_)
|
|
60
58
|
{
|
|
61
59
|
"use strict";
|
|
62
60
|
|
|
63
|
-
function f2 (n) { return
|
|
61
|
+
function f2 (n) { return n .toFixed (2); }
|
|
64
62
|
|
|
65
63
|
function BrowserTimings (executionContext)
|
|
66
64
|
{
|
|
@@ -50,12 +50,10 @@
|
|
|
50
50
|
define ([
|
|
51
51
|
"x_ite/Fields",
|
|
52
52
|
"x_ite/Browser/Networking/urls",
|
|
53
|
-
"sprintf",
|
|
54
53
|
"locale/gettext",
|
|
55
54
|
],
|
|
56
55
|
function (Fields,
|
|
57
56
|
urls,
|
|
58
|
-
sprintf,
|
|
59
57
|
_)
|
|
60
58
|
{
|
|
61
59
|
"use strict";
|
|
@@ -176,7 +174,7 @@ function (Fields,
|
|
|
176
174
|
|
|
177
175
|
if (value)
|
|
178
176
|
{
|
|
179
|
-
var string =
|
|
177
|
+
var string = (value == 1 ? _ ("Loading %1 file") : _ ("Loading %1 files")) .replace ("%1", value);
|
|
180
178
|
}
|
|
181
179
|
else
|
|
182
180
|
{
|
|
@@ -61,12 +61,8 @@ define (function ()
|
|
|
61
61
|
if (getScriptURL () .match (/\.min\.js$/))
|
|
62
62
|
file += ".min";
|
|
63
63
|
|
|
64
|
-
if (typeof
|
|
65
|
-
|
|
66
|
-
const path = globalRequire ("path");
|
|
67
|
-
|
|
68
|
-
return path .join (path .dirname (getScriptURL ()), "assets\\components\\" + file + ".js");
|
|
69
|
-
}
|
|
64
|
+
if (typeof globalRequire === "function" && typeof __filename === "string")
|
|
65
|
+
return this .getPath ("assets", "components", file + ".js");
|
|
70
66
|
|
|
71
67
|
return new URL ("assets/components/" + file + ".js", getScriptURL ()) .href;
|
|
72
68
|
}
|
|
@@ -75,20 +71,42 @@ define (function ()
|
|
|
75
71
|
},
|
|
76
72
|
getShaderUrl: function (file)
|
|
77
73
|
{
|
|
74
|
+
if (typeof globalRequire === "function" && typeof __filename === "string")
|
|
75
|
+
return this .getPath ("assets", "shaders", file);
|
|
76
|
+
|
|
78
77
|
return new URL ("assets/shaders/" + file, getScriptURL ()) .href;
|
|
79
78
|
},
|
|
80
79
|
getFontsUrl: function (file)
|
|
81
80
|
{
|
|
81
|
+
if (typeof globalRequire === "function" && typeof __filename === "string")
|
|
82
|
+
return this .getPath ("assets", "fonts", file);
|
|
83
|
+
|
|
82
84
|
return new URL ("assets/fonts/" + file, getScriptURL ()) .href;
|
|
83
85
|
},
|
|
84
86
|
getLinetypeUrl: function (index)
|
|
85
87
|
{
|
|
88
|
+
if (typeof globalRequire === "function" && typeof __filename === "string")
|
|
89
|
+
return this .getPath ("assets", "linetype", index + ".png");
|
|
90
|
+
|
|
86
91
|
return new URL ("assets/linetype/" + index + ".png", getScriptURL ()) .href;
|
|
87
92
|
},
|
|
88
93
|
getHatchingUrl: function (index)
|
|
89
94
|
{
|
|
95
|
+
if (typeof globalRequire === "function" && typeof __filename === "string")
|
|
96
|
+
return this .getPath ("assets", "hatching", index + ".png");
|
|
97
|
+
|
|
90
98
|
return new URL ("assets/hatching/" + index + ".png", getScriptURL ()) .href;
|
|
91
99
|
},
|
|
100
|
+
getPath: function ()
|
|
101
|
+
{
|
|
102
|
+
const
|
|
103
|
+
path = globalRequire ("path"),
|
|
104
|
+
args = Array .prototype .slice .call (arguments);
|
|
105
|
+
|
|
106
|
+
args .unshift (path .dirname (getScriptURL ()));
|
|
107
|
+
|
|
108
|
+
return path .join .apply (path, args);
|
|
109
|
+
},
|
|
92
110
|
};
|
|
93
111
|
|
|
94
112
|
return new URLs ();
|
|
@@ -51,10 +51,12 @@ define ([
|
|
|
51
51
|
"standard/Math/Numbers/Color3",
|
|
52
52
|
"x_ite/Basic/X3DField",
|
|
53
53
|
"x_ite/Bits/X3DConstants",
|
|
54
|
+
"x_ite/InputOutput/Generator",
|
|
54
55
|
],
|
|
55
56
|
function (Color3,
|
|
56
57
|
X3DField,
|
|
57
|
-
X3DConstants
|
|
58
|
+
X3DConstants,
|
|
59
|
+
Generator)
|
|
58
60
|
{
|
|
59
61
|
"use strict";
|
|
60
62
|
|
|
@@ -136,7 +138,18 @@ function (Color3,
|
|
|
136
138
|
})(),
|
|
137
139
|
toStream: function (stream)
|
|
138
140
|
{
|
|
139
|
-
|
|
141
|
+
const
|
|
142
|
+
generator = Generator .Get (stream),
|
|
143
|
+
value = this .getValue (),
|
|
144
|
+
last = value .length - 1;
|
|
145
|
+
|
|
146
|
+
for (let i = 0; i < last; ++ i)
|
|
147
|
+
{
|
|
148
|
+
stream .string += generator .Precision (value [i]);
|
|
149
|
+
stream .string += " ";
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
stream .string += generator .Precision (value [last]);
|
|
140
153
|
},
|
|
141
154
|
toVRMLStream: function (stream)
|
|
142
155
|
{
|
|
@@ -93,7 +93,7 @@ function (X3DField,
|
|
|
93
93
|
generator = Generator .Get (stream),
|
|
94
94
|
category = generator .Unit (this .getUnit ());
|
|
95
95
|
|
|
96
|
-
stream .string +=
|
|
96
|
+
stream .string += generator .DoublePrecision (generator .ToUnit (category, this .getValue ()));
|
|
97
97
|
},
|
|
98
98
|
toVRMLStream: function (stream)
|
|
99
99
|
{
|
|
@@ -93,7 +93,7 @@ function (X3DField,
|
|
|
93
93
|
generator = Generator .Get (stream),
|
|
94
94
|
category = generator .Unit (this .getUnit ());
|
|
95
95
|
|
|
96
|
-
stream .string +=
|
|
96
|
+
stream .string += generator .Precision (generator .ToUnit (category, this .getValue ()));
|
|
97
97
|
},
|
|
98
98
|
toVRMLStream: function (stream)
|
|
99
99
|
{
|
|
@@ -63,7 +63,7 @@ function (X3DField,
|
|
|
63
63
|
{
|
|
64
64
|
"use strict";
|
|
65
65
|
|
|
66
|
-
function SFMatrix3Template (TypeName, Type, SFVec2)
|
|
66
|
+
function SFMatrix3Template (TypeName, Type, SFVec2, double)
|
|
67
67
|
{
|
|
68
68
|
function SFMatrix3 (m00, m01, m02,
|
|
69
69
|
m10, m11, m12,
|
|
@@ -87,7 +87,7 @@ function (X3DField,
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
SFMatrix3 .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
90
|
-
SFMatrixPrototypeTemplate (Matrix3, SFVec2),
|
|
90
|
+
SFMatrixPrototypeTemplate (Matrix3, SFVec2, double),
|
|
91
91
|
{
|
|
92
92
|
constructor: SFMatrix3,
|
|
93
93
|
getTypeName: function ()
|
|
@@ -135,7 +135,7 @@ function (X3DField,
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
return {
|
|
138
|
-
SFMatrix3d: SFMatrix3Template ("SFMatrix3d", X3DConstants .SFMatrix3d, SFVec2 .SFVec2d),
|
|
139
|
-
SFMatrix3f: SFMatrix3Template ("SFMatrix3f", X3DConstants .SFMatrix3f, SFVec2 .SFVec2f),
|
|
138
|
+
SFMatrix3d: SFMatrix3Template ("SFMatrix3d", X3DConstants .SFMatrix3d, SFVec2 .SFVec2d, true),
|
|
139
|
+
SFMatrix3f: SFMatrix3Template ("SFMatrix3f", X3DConstants .SFMatrix3f, SFVec2 .SFVec2f, false),
|
|
140
140
|
};
|
|
141
141
|
});
|
|
@@ -62,7 +62,7 @@ function (X3DField,
|
|
|
62
62
|
{
|
|
63
63
|
"use strict";
|
|
64
64
|
|
|
65
|
-
function SFMatrix4Template (TypeName, Type, SFVec3)
|
|
65
|
+
function SFMatrix4Template (TypeName, Type, SFVec3, double)
|
|
66
66
|
{
|
|
67
67
|
function SFMatrix4 (m00, m01, m02, m03,
|
|
68
68
|
m10, m11, m12, m13,
|
|
@@ -88,7 +88,7 @@ function (X3DField,
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
SFMatrix4 .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
91
|
-
SFMatrixPrototypeTemplate (Matrix4, SFVec3),
|
|
91
|
+
SFMatrixPrototypeTemplate (Matrix4, SFVec3, double),
|
|
92
92
|
{
|
|
93
93
|
constructor: SFMatrix4,
|
|
94
94
|
getTypeName: function ()
|
|
@@ -126,8 +126,8 @@ function (X3DField,
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
return {
|
|
129
|
-
SFMatrix4d: SFMatrix4Template ("SFMatrix4d", X3DConstants .SFMatrix4d, SFVec3 .SFVec3d),
|
|
130
|
-
SFMatrix4f: SFMatrix4Template ("SFMatrix4f", X3DConstants .SFMatrix4f, SFVec3 .SFVec3f),
|
|
131
|
-
VrmlMatrix: SFMatrix4Template ("VrmlMatrix", X3DConstants .VrmlMatrix, SFVec3 .SFVec3f),
|
|
129
|
+
SFMatrix4d: SFMatrix4Template ("SFMatrix4d", X3DConstants .SFMatrix4d, SFVec3 .SFVec3d, true),
|
|
130
|
+
SFMatrix4f: SFMatrix4Template ("SFMatrix4f", X3DConstants .SFMatrix4f, SFVec3 .SFVec3f, false),
|
|
131
|
+
VrmlMatrix: SFMatrix4Template ("VrmlMatrix", X3DConstants .VrmlMatrix, SFVec3 .SFVec3f, false),
|
|
132
132
|
};
|
|
133
133
|
});
|
|
@@ -54,7 +54,7 @@ function (X3DField)
|
|
|
54
54
|
{
|
|
55
55
|
"use strict";
|
|
56
56
|
|
|
57
|
-
return function (Matrix, SFVec)
|
|
57
|
+
return function (Matrix, SFVec, double)
|
|
58
58
|
{
|
|
59
59
|
return Object .assign (Object .create (X3DField .prototype),
|
|
60
60
|
{
|
|
@@ -132,9 +132,20 @@ function (X3DField)
|
|
|
132
132
|
},
|
|
133
133
|
toStream: function (stream)
|
|
134
134
|
{
|
|
135
|
-
|
|
135
|
+
const
|
|
136
|
+
generator = Generator .Get (stream),
|
|
137
|
+
value = this .getValue (),
|
|
138
|
+
last = value .length - 1;
|
|
139
|
+
|
|
140
|
+
for (let i = 0; i < last; ++ i)
|
|
141
|
+
{
|
|
142
|
+
stream .string += double ? generator .DoublePrecision (value [i]) : generator .Precision (value [i]);
|
|
143
|
+
stream .string += " ";
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
stream .string += double ? generator .DoublePrecision (value [last]) : generator .Precision (value [last]);
|
|
136
147
|
},
|
|
137
|
-
|
|
148
|
+
toVRMLStream: function (stream)
|
|
138
149
|
{
|
|
139
150
|
this .toStream (stream);
|
|
140
151
|
},
|
|
@@ -145,10 +145,10 @@ function (SFVec3,
|
|
|
145
145
|
generator = Generator .Get (stream),
|
|
146
146
|
rotation = this .getValue ();
|
|
147
147
|
|
|
148
|
-
stream .string +=
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
stream .string += generator .DoublePrecision (rotation .x) + " " +
|
|
149
|
+
generator .DoublePrecision (rotation .y) + " " +
|
|
150
|
+
generator .DoublePrecision (rotation .z) + " " +
|
|
151
|
+
generator .DoublePrecision (generator .ToUnit ("angle", rotation .angle));
|
|
152
152
|
},
|
|
153
153
|
toVRMLStream: function (stream)
|
|
154
154
|
{
|
|
@@ -57,7 +57,7 @@ function (X3DField, SFVecPrototypeTemplate, X3DConstants, Vector2)
|
|
|
57
57
|
{
|
|
58
58
|
"use strict";
|
|
59
59
|
|
|
60
|
-
function SFVec2Template (TypeName, Type)
|
|
60
|
+
function SFVec2Template (TypeName, Type, double)
|
|
61
61
|
{
|
|
62
62
|
function SFVec2 (x, y)
|
|
63
63
|
{
|
|
@@ -77,7 +77,7 @@ function (X3DField, SFVecPrototypeTemplate, X3DConstants, Vector2)
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
SFVec2 .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
80
|
-
SFVecPrototypeTemplate (Vector2),
|
|
80
|
+
SFVecPrototypeTemplate (Vector2, double),
|
|
81
81
|
{
|
|
82
82
|
constructor: SFVec2,
|
|
83
83
|
getTypeName: function ()
|
|
@@ -131,7 +131,7 @@ function (X3DField, SFVecPrototypeTemplate, X3DConstants, Vector2)
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
return {
|
|
134
|
-
SFVec2d: SFVec2Template ("SFVec2d", X3DConstants .SFVec2d),
|
|
135
|
-
SFVec2f: SFVec2Template ("SFVec2f", X3DConstants .SFVec2f),
|
|
134
|
+
SFVec2d: SFVec2Template ("SFVec2d", X3DConstants .SFVec2d, true),
|
|
135
|
+
SFVec2f: SFVec2Template ("SFVec2f", X3DConstants .SFVec2f, false),
|
|
136
136
|
};
|
|
137
137
|
});
|
|
@@ -60,7 +60,7 @@ function (X3DField,
|
|
|
60
60
|
{
|
|
61
61
|
"use strict";
|
|
62
62
|
|
|
63
|
-
function SFVec3Template (TypeName, Type)
|
|
63
|
+
function SFVec3Template (TypeName, Type, double)
|
|
64
64
|
{
|
|
65
65
|
function SFVec3 (x, y, z)
|
|
66
66
|
{
|
|
@@ -80,7 +80,7 @@ function (X3DField,
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
SFVec3 .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
83
|
-
SFVecPrototypeTemplate (Vector3),
|
|
83
|
+
SFVecPrototypeTemplate (Vector3, double),
|
|
84
84
|
{
|
|
85
85
|
constructor: SFVec3,
|
|
86
86
|
getTypeName: function ()
|
|
@@ -155,7 +155,7 @@ function (X3DField,
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
return {
|
|
158
|
-
SFVec3d: SFVec3Template ("SFVec3d", X3DConstants .SFVec3d),
|
|
159
|
-
SFVec3f: SFVec3Template ("SFVec3f", X3DConstants .SFVec3f),
|
|
158
|
+
SFVec3d: SFVec3Template ("SFVec3d", X3DConstants .SFVec3d, true),
|
|
159
|
+
SFVec3f: SFVec3Template ("SFVec3f", X3DConstants .SFVec3f, false),
|
|
160
160
|
};
|
|
161
161
|
});
|
|
@@ -60,7 +60,7 @@ function (X3DField,
|
|
|
60
60
|
{
|
|
61
61
|
"use strict";
|
|
62
62
|
|
|
63
|
-
function SFVec4Template (TypeName, Type)
|
|
63
|
+
function SFVec4Template (TypeName, Type, double)
|
|
64
64
|
{
|
|
65
65
|
function SFVec4 (x, y, z, w)
|
|
66
66
|
{
|
|
@@ -80,7 +80,7 @@ function (X3DField,
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
SFVec4 .prototype = Object .assign (Object .create (X3DField .prototype),
|
|
83
|
-
SFVecPrototypeTemplate (Vector4),
|
|
83
|
+
SFVecPrototypeTemplate (Vector4, double),
|
|
84
84
|
{
|
|
85
85
|
constructor: SFVec4,
|
|
86
86
|
getTypeName: function ()
|
|
@@ -168,7 +168,7 @@ function (X3DField,
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
return {
|
|
171
|
-
SFVec4d: SFVec4Template ("SFVec4d", X3DConstants .SFVec4d),
|
|
172
|
-
SFVec4f: SFVec4Template ("SFVec4f", X3DConstants .SFVec4f),
|
|
171
|
+
SFVec4d: SFVec4Template ("SFVec4d", X3DConstants .SFVec4d, true),
|
|
172
|
+
SFVec4f: SFVec4Template ("SFVec4f", X3DConstants .SFVec4f, false),
|
|
173
173
|
};
|
|
174
174
|
});
|
|
@@ -56,7 +56,7 @@ function (X3DField,
|
|
|
56
56
|
{
|
|
57
57
|
"use strict";
|
|
58
58
|
|
|
59
|
-
return function (Type)
|
|
59
|
+
return function (Type, double)
|
|
60
60
|
{
|
|
61
61
|
return Object .assign (Object .create (X3DField .prototype),
|
|
62
62
|
{
|
|
@@ -129,15 +129,16 @@ function (X3DField,
|
|
|
129
129
|
const
|
|
130
130
|
generator = Generator .Get (stream),
|
|
131
131
|
value = this .getValue (),
|
|
132
|
-
category = generator .Unit (this .getUnit ())
|
|
132
|
+
category = generator .Unit (this .getUnit ()),
|
|
133
|
+
last = value .length - 1;
|
|
133
134
|
|
|
134
|
-
for (let i = 0
|
|
135
|
+
for (let i = 0; i < last; ++ i)
|
|
135
136
|
{
|
|
136
|
-
stream .string +=
|
|
137
|
+
stream .string += double ? generator .DoublePrecision (generator .ToUnit (category, value [i])) : generator .Precision (generator .ToUnit (category, value [i]));
|
|
137
138
|
stream .string += " ";
|
|
138
139
|
}
|
|
139
140
|
|
|
140
|
-
stream .string +=
|
|
141
|
+
stream .string += double ? generator .DoublePrecision (generator .ToUnit (category, value [last])) : generator .Precision (generator .ToUnit (category, value [last]));
|
|
141
142
|
},
|
|
142
143
|
toVRMLStream: function (stream)
|
|
143
144
|
{
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
******************************************************************************/
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
|
|
51
50
|
define ([
|
|
52
51
|
"x_ite/Bits/X3DConstants",
|
|
53
52
|
],
|
|
@@ -57,8 +56,12 @@ function (X3DConstants)
|
|
|
57
56
|
|
|
58
57
|
function Generator ()
|
|
59
58
|
{
|
|
60
|
-
this .indent
|
|
61
|
-
this .indentChar
|
|
59
|
+
this .indent = "";
|
|
60
|
+
this .indentChar = " ";
|
|
61
|
+
this .precision = 6;
|
|
62
|
+
this .doublePrecision = 14;
|
|
63
|
+
this .removeTrailingZeros = /\.?0*$|\.?0*(?=e|E)/;
|
|
64
|
+
|
|
62
65
|
this .executionContextStack = [ null ];
|
|
63
66
|
this .importedNodesIndex = new Map ();
|
|
64
67
|
this .exportedNodesIndex = new Map ();
|
|
@@ -98,6 +101,14 @@ function (X3DConstants)
|
|
|
98
101
|
|
|
99
102
|
return string;
|
|
100
103
|
},
|
|
104
|
+
Precision: function (value)
|
|
105
|
+
{
|
|
106
|
+
return Math .fround (value) .toPrecision (this .precision) .replace (this .removeTrailingZeros, "");
|
|
107
|
+
},
|
|
108
|
+
DoublePrecision: function (value)
|
|
109
|
+
{
|
|
110
|
+
return value .toPrecision (this .doublePrecision) .replace (this .removeTrailingZeros, "");
|
|
111
|
+
},
|
|
101
112
|
PushExecutionContext: function (executionContext)
|
|
102
113
|
{
|
|
103
114
|
this .executionContextStack .push (executionContext);
|
|
@@ -125,22 +125,15 @@ define (function ()
|
|
|
125
125
|
for (const component of components)
|
|
126
126
|
{
|
|
127
127
|
const providerUrl = component .providerUrl;
|
|
128
|
-
|
|
128
|
+
|
|
129
|
+
if (providerUrl .match (componentsUrl))
|
|
129
130
|
providerUrls .add (providerUrl);
|
|
130
131
|
}
|
|
131
132
|
|
|
132
|
-
if (typeof globalRequire === "function")
|
|
133
|
+
if (typeof globalRequire === "function" && typeof __filename === "string")
|
|
133
134
|
{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
for (const url of providerUrls)
|
|
137
|
-
globalRequire (url);
|
|
138
|
-
}
|
|
139
|
-
else
|
|
140
|
-
{
|
|
141
|
-
for (const url of providerUrls)
|
|
142
|
-
globalRequire (new URL (url) .pathname);
|
|
143
|
-
}
|
|
135
|
+
for (const url of providerUrls)
|
|
136
|
+
globalRequire (url);
|
|
144
137
|
}
|
|
145
138
|
|
|
146
139
|
return Array .from (providerUrls);
|
package/src/x_ite/X3D.js
CHANGED
|
@@ -108,13 +108,8 @@ function ($,
|
|
|
108
108
|
{
|
|
109
109
|
const url = urls .getProviderUrl (name);
|
|
110
110
|
|
|
111
|
-
if (typeof globalRequire === "function")
|
|
112
|
-
|
|
113
|
-
if (typeof globalProcess === "object" && globalProcess .platform === "win32")
|
|
114
|
-
globalRequire (url);
|
|
115
|
-
else
|
|
116
|
-
globalRequire (new URL (url) .pathname);
|
|
117
|
-
}
|
|
111
|
+
if (typeof globalRequire === "function" && typeof __filename === "string")
|
|
112
|
+
globalRequire (url);
|
|
118
113
|
|
|
119
114
|
return url;
|
|
120
115
|
}
|
package/src/x_ite.config.js
CHANGED
|
@@ -36,11 +36,6 @@ require .config ({
|
|
|
36
36
|
"location": "../node_modules/opentype.js",
|
|
37
37
|
"main": "dist/opentype.js"
|
|
38
38
|
},
|
|
39
|
-
{
|
|
40
|
-
"name": "sprintf",
|
|
41
|
-
"location": "../node_modules/sprintf-js",
|
|
42
|
-
"main": "dist/sprintf.min.js"
|
|
43
|
-
},
|
|
44
39
|
{
|
|
45
40
|
"name": "contextMenu",
|
|
46
41
|
"location": "../node_modules/jquery-contextmenu",
|
package/src/x_ite.css
CHANGED
|
@@ -93,7 +93,7 @@ X3DCanvas .x_ite-private-notification {
|
|
|
93
93
|
|
|
94
94
|
X3DCanvas .x_ite-private-notification span {
|
|
95
95
|
padding: 0px 24px 0px 20px;
|
|
96
|
-
background: url(assets/images/icon.bw.png) no-repeat 0px
|
|
96
|
+
background: url(assets/images/icon.bw.png) no-repeat 0px 2px;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
X3DCanvas .x_ite-private-browser-timings {
|
|
@@ -336,6 +336,7 @@ X3DCanvas #context-menu-layer {
|
|
|
336
336
|
}
|
|
337
337
|
|
|
338
338
|
.x_ite-private-menu .context-menu-separator {
|
|
339
|
+
padding-top: 0;
|
|
339
340
|
padding-bottom: 0;
|
|
340
341
|
border-bottom: 1px solid #111;
|
|
341
342
|
}
|
package/src/x_ite.html
CHANGED
|
@@ -34,7 +34,7 @@ body {
|
|
|
34
34
|
padding-bottom: 100px;
|
|
35
35
|
background: black;
|
|
36
36
|
color: white;
|
|
37
|
-
font-family: PT Sans, sans;
|
|
37
|
+
font-family: PT Sans, sans-serif;
|
|
38
38
|
line-height: 1.3;
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -114,7 +114,7 @@ main.color-management .browser {
|
|
|
114
114
|
background: #313131;
|
|
115
115
|
color: white;
|
|
116
116
|
vertical-align: middle;
|
|
117
|
-
font-family: PT Sans;
|
|
117
|
+
font-family: PT Sans, sans-serif;
|
|
118
118
|
font-size: 10pt;
|
|
119
119
|
}
|
|
120
120
|
|
|
@@ -130,7 +130,7 @@ main.color-management .browser {
|
|
|
130
130
|
background: #313131;
|
|
131
131
|
color: white;
|
|
132
132
|
vertical-align: middle;
|
|
133
|
-
font-family: PT Sans;
|
|
133
|
+
font-family: PT Sans, sans-serif;
|
|
134
134
|
font-size: 10pt;
|
|
135
135
|
}
|
|
136
136
|
|
package/src/x_ite.js
CHANGED
|
@@ -69,16 +69,9 @@ define .hide = function ()
|
|
|
69
69
|
const getScriptURL = (function ()
|
|
70
70
|
{
|
|
71
71
|
if (document .currentScript)
|
|
72
|
-
{
|
|
73
72
|
var src = document .currentScript .src;
|
|
74
|
-
}
|
|
75
73
|
else if (typeof __filename === "string")
|
|
76
|
-
|
|
77
|
-
if (typeof globalProcess === "object" && globalProcess .platform === "win32")
|
|
78
|
-
var src = __filename;
|
|
79
|
-
else
|
|
80
|
-
var src = "file://" + __filename;
|
|
81
|
-
}
|
|
74
|
+
var src = __filename;
|
|
82
75
|
|
|
83
76
|
return function ()
|
|
84
77
|
{
|
package/x_ite.min.html
CHANGED
|
@@ -32,7 +32,7 @@ body {
|
|
|
32
32
|
padding-bottom: 100px;
|
|
33
33
|
background: black;
|
|
34
34
|
color: white;
|
|
35
|
-
font-family: PT Sans, sans;
|
|
35
|
+
font-family: PT Sans, sans-serif;
|
|
36
36
|
line-height: 1.3;
|
|
37
37
|
}
|
|
38
38
|
|
|
@@ -112,7 +112,7 @@ main.color-management .browser {
|
|
|
112
112
|
background: #313131;
|
|
113
113
|
color: white;
|
|
114
114
|
vertical-align: middle;
|
|
115
|
-
font-family: PT Sans;
|
|
115
|
+
font-family: PT Sans, sans-serif;
|
|
116
116
|
font-size: 10pt;
|
|
117
117
|
}
|
|
118
118
|
|
|
@@ -128,7 +128,7 @@ main.color-management .browser {
|
|
|
128
128
|
background: #313131;
|
|
129
129
|
color: white;
|
|
130
130
|
vertical-align: middle;
|
|
131
|
-
font-family: PT Sans;
|
|
131
|
+
font-family: PT Sans, sans-serif;
|
|
132
132
|
font-size: 10pt;
|
|
133
133
|
}
|
|
134
134
|
|