x_ite 8.6.1 → 8.6.2
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/settings.json +7 -7
- 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/RigidBodyPhysics.js +18 -18
- 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 +33 -36
- package/dist/assets/components/Text.min.js +1 -1
- package/dist/assets/components/TextureProjector.js +14 -14
- package/dist/assets/components/TextureProjector.min.js +1 -1
- package/dist/assets/components/Texturing3D.js +32 -32
- 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 +190 -163
- package/dist/x_ite.min.js +1 -1
- package/dist/x_ite.zip +0 -0
- package/docs/_config.yml +2 -2
- package/docs/_posts/laboratory/x3d-file-converter.md +178 -0
- package/docs/laboratory/3d-l-system-generator.html +1 -1
- package/docs/laboratory/gltf-sample-viewer.html +1 -1
- package/docs/laboratory/online-dicom-and-nrrd-file-viewer.html +1 -1
- package/docs/laboratory/real-time-earth-quake-information.html +1 -1
- package/docs/laboratory/x3d-visual-blend-mode-editor.html +1 -1
- package/package.json +1 -1
- package/src/standard/Math/Algorithms/Bezier.js +3 -15
- package/src/standard/Math/Numbers/Matrix2.js +5 -5
- package/src/tests.js +11 -0
- package/src/x_ite/Browser/Core/X3DCoreContext.js +4 -6
- package/src/x_ite/Browser/Text/PolygonText.js +9 -12
- package/src/x_ite/Browser/VERSION.js +1 -1
- package/src/x_ite/Components/Core/X3DNode.js +12 -0
- package/src/x_ite/Components/Core/X3DPrototypeInstance.js +18 -0
- package/src/x_ite/Configuration/UnitInfo.js +2 -0
- package/src/x_ite/Execution/X3DExportedNode.js +4 -0
- package/src/x_ite/Execution/X3DImportedNode.js +14 -0
- package/src/x_ite/Execution/X3DScene.js +4 -0
- package/src/x_ite/Fields/SFString.js +4 -6
- package/src/x_ite/InputOutput/FileLoader.js +1 -1
- package/src/x_ite/InputOutput/Generator.js +35 -55
- package/src/x_ite/Parser/SVGParser.js +12 -19
- package/src/x_ite/Parser/X3DParser.js +1 -1
- package/src/x_ite/Prototype/X3DExternProtoDeclaration.js +4 -0
- package/src/x_ite/Prototype/X3DProtoDeclaration.js +4 -0
- package/src/x_ite/Routing/X3DRoute.js +8 -0
package/dist/x_ite.zip
CHANGED
|
Binary file
|
package/docs/_config.yml
CHANGED
|
@@ -20,7 +20,7 @@ timezone:
|
|
|
20
20
|
# ↓ --------------------------
|
|
21
21
|
|
|
22
22
|
title: X_ITE X3D Browser # the main title
|
|
23
|
-
version: 8.6.
|
|
23
|
+
version: 8.6.2 # x_ite latest version
|
|
24
24
|
size: 287 # size in kb
|
|
25
25
|
x3d_latest_version: 4.0 # x3d latest version
|
|
26
26
|
|
|
@@ -180,7 +180,7 @@ compress_html:
|
|
|
180
180
|
profile: false
|
|
181
181
|
blanklines: false
|
|
182
182
|
ignore:
|
|
183
|
-
envs: [
|
|
183
|
+
envs: [development]
|
|
184
184
|
|
|
185
185
|
exclude:
|
|
186
186
|
- "*.gem"
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Free Online X3D File Format Converter
|
|
3
|
+
date: 2023-02-21
|
|
4
|
+
categories: [Laboratory]
|
|
5
|
+
tags: [X3D, File, Format, Converter]
|
|
6
|
+
x_ite: true
|
|
7
|
+
---
|
|
8
|
+
<style>
|
|
9
|
+
#drop-zone {
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
border: 8px dashed lightskyblue;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
#drop-zone .center {
|
|
15
|
+
padding: 3rem;
|
|
16
|
+
text-align: center;
|
|
17
|
+
font-size: 200%;
|
|
18
|
+
font-weight: bold;
|
|
19
|
+
margin: 0;
|
|
20
|
+
background: aliceblue;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
#convert-files,
|
|
24
|
+
#converting-files {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
#drop-zone x3d-canvas,
|
|
29
|
+
#drop-zone input[type=file] {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
#drop-zone a {
|
|
34
|
+
border: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
#drop-zone select {
|
|
38
|
+
color: unset;
|
|
39
|
+
position: relative;
|
|
40
|
+
top: -8px;
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
43
|
+
|
|
44
|
+
<script defer="" src="https://create3000.github.io/media/laboratory/l-system/FileSaver.js-2.0.0/dist/FileSaver.min.js"></script>
|
|
45
|
+
|
|
46
|
+
<script defer="">
|
|
47
|
+
$(() =>
|
|
48
|
+
{
|
|
49
|
+
$("#drop-zone") .on ("dragover", event =>
|
|
50
|
+
{
|
|
51
|
+
event .stopPropagation ();
|
|
52
|
+
event .preventDefault ();
|
|
53
|
+
|
|
54
|
+
event .originalEvent .dataTransfer .dropEffect = "copy";
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
$("#drop-zone") .on ("drop", event =>
|
|
58
|
+
{
|
|
59
|
+
event .stopPropagation ();
|
|
60
|
+
event .preventDefault ();
|
|
61
|
+
|
|
62
|
+
read (event .originalEvent .dataTransfer .files);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
$("#open-files a") .on ("click", event =>
|
|
66
|
+
{
|
|
67
|
+
const input = $("<input></input>")
|
|
68
|
+
.attr ("type", "file")
|
|
69
|
+
.appendTo ($("#open-files"));
|
|
70
|
+
|
|
71
|
+
input .on ("change", event =>
|
|
72
|
+
{
|
|
73
|
+
read (event .target .files);
|
|
74
|
+
input .remove ();
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
input .trigger ("click");
|
|
78
|
+
return false;
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
function read (files)
|
|
82
|
+
{
|
|
83
|
+
read .files = [... files];
|
|
84
|
+
|
|
85
|
+
$("#open-files") .hide ();
|
|
86
|
+
$("#convert-files") .show ();
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
$("#convert-files a") .on ("click", event =>
|
|
90
|
+
{
|
|
91
|
+
$("#convert-files") .hide ();
|
|
92
|
+
$("#converting-files") .show ();
|
|
93
|
+
|
|
94
|
+
convert ($("#drop-zone select") .val (), read .files);
|
|
95
|
+
|
|
96
|
+
return false;
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const formats = {
|
|
100
|
+
"XML": ["model/x3d+xml", ".x3d", "toXMLString"],
|
|
101
|
+
"VRML": ["model/x3d+vrml", ".x3dv", "toVRMLString"],
|
|
102
|
+
"JSON": ["model/x3d+json", ".x3dj", "toJSONString"],
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
async function convert (encoding, files)
|
|
106
|
+
{
|
|
107
|
+
const [mimeType, extension, toString] = formats [encoding];
|
|
108
|
+
|
|
109
|
+
for (const file of files)
|
|
110
|
+
{
|
|
111
|
+
try
|
|
112
|
+
{
|
|
113
|
+
const
|
|
114
|
+
Browser = X3D .createBrowser () .browser,
|
|
115
|
+
url = URL .createObjectURL (file);
|
|
116
|
+
|
|
117
|
+
Browser .endUpdate ();
|
|
118
|
+
|
|
119
|
+
await Browser .loadURL (new X3D .MFString (url));
|
|
120
|
+
|
|
121
|
+
link (mimeType, file .name + extension, Browser .currentScene [toString] ());
|
|
122
|
+
}
|
|
123
|
+
catch (error)
|
|
124
|
+
{
|
|
125
|
+
console .error (error);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
$("#converting-files") .hide ();
|
|
130
|
+
$("#open-files") .show ();
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
function link (mimeType, name, x3dSyntax)
|
|
134
|
+
{
|
|
135
|
+
const a = $("<a></a>")
|
|
136
|
+
.text (name)
|
|
137
|
+
.attr ("href", "#")
|
|
138
|
+
.on ("click", download .bind (null, mimeType, name, x3dSyntax));
|
|
139
|
+
|
|
140
|
+
$("<li></li>") .append (a) .appendTo ($("#download-links"));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function download (mimeType, name, x3dSyntax)
|
|
144
|
+
{
|
|
145
|
+
const blob = new Blob ([x3dSyntax], { type: `${mimeType};charset=utf-8` });
|
|
146
|
+
|
|
147
|
+
saveAs (blob, name);
|
|
148
|
+
|
|
149
|
+
return false;
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
</script>
|
|
153
|
+
|
|
154
|
+
<p>Convert X3D, VRML, glTF, GLB, OBJ, STL, and SVG to a X3D format.</p>
|
|
155
|
+
|
|
156
|
+
<div id="drop-zone">
|
|
157
|
+
<p id="open-files" class="center">
|
|
158
|
+
<a href="#">Choose a file</a> or drag it here.
|
|
159
|
+
<input type="file" />
|
|
160
|
+
</p>
|
|
161
|
+
<p id="convert-files" class="center">
|
|
162
|
+
<a href="#">Convert file to ...</a>
|
|
163
|
+
<select>
|
|
164
|
+
<option value="XML" selected>X3D XML Encoding</option>
|
|
165
|
+
<option value="VRML">X3D VRML Encoding</option>
|
|
166
|
+
<option value="JSON">X3D JSON Encoding</option>
|
|
167
|
+
</select>
|
|
168
|
+
</p>
|
|
169
|
+
<p id="converting-files" class="center">
|
|
170
|
+
Converting files ...
|
|
171
|
+
</p>
|
|
172
|
+
</div>
|
|
173
|
+
|
|
174
|
+
## Converted Files
|
|
175
|
+
|
|
176
|
+
Your converted files will appear here.
|
|
177
|
+
|
|
178
|
+
<ul id="download-links"></ul>
|
|
@@ -3,7 +3,7 @@ title: X3D Visual Blend Mode Editor
|
|
|
3
3
|
layout: wide
|
|
4
4
|
collection: tabs
|
|
5
5
|
categories: [Laboratory]
|
|
6
|
-
tags: [X3D,
|
|
6
|
+
tags: [X3D, Visual, Blend Mode, Editor]
|
|
7
7
|
---
|
|
8
8
|
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/cferdinandi/tabby@12.0.0/dist/css/tabby-ui.min.css">
|
|
9
9
|
<script src="https://cdn.jsdelivr.net/gh/cferdinandi/tabby@12.0.0/dist/js/tabby.polyfills.min.js"></script>
|
package/package.json
CHANGED
|
@@ -64,10 +64,8 @@ const Bezier =
|
|
|
64
64
|
c = new Matrix3 (1, 0, 0, -2, 2, 0, 1, -2, 1),
|
|
65
65
|
p = new Matrix3 ();
|
|
66
66
|
|
|
67
|
-
return function (x0, y0, z0, x1, y1, z1, x2, y2, z2, steps)
|
|
67
|
+
return function (x0, y0, z0, x1, y1, z1, x2, y2, z2, steps, points)
|
|
68
68
|
{
|
|
69
|
-
const points = [ ];
|
|
70
|
-
|
|
71
69
|
p .set (x0, y0, z0, x1, y1, z1, x2, y2, z2)
|
|
72
70
|
.multLeft (c);
|
|
73
71
|
|
|
@@ -77,8 +75,6 @@ const Bezier =
|
|
|
77
75
|
|
|
78
76
|
points .push (p .multVecMatrix (new Vector3 (1, t, t * t)));
|
|
79
77
|
}
|
|
80
|
-
|
|
81
|
-
return points;
|
|
82
78
|
};
|
|
83
79
|
})(),
|
|
84
80
|
cubic: (function ()
|
|
@@ -88,10 +84,8 @@ const Bezier =
|
|
|
88
84
|
c = new Matrix4 (1, 0, 0, 0, -3, 3, 0, 0, 3, -6, 3, 0, -1, 3, -3, 1),
|
|
89
85
|
p = new Matrix4 ();
|
|
90
86
|
|
|
91
|
-
return function (x0, y0, z0, x1, y1, z1, x2, y2, z2, x3, y3, z3, steps)
|
|
87
|
+
return function (x0, y0, z0, x1, y1, z1, x2, y2, z2, x3, y3, z3, steps, points)
|
|
92
88
|
{
|
|
93
|
-
const points = [ ];
|
|
94
|
-
|
|
95
89
|
p .set (x0, y0, z0, 0, x1, y1, z1, 0, x2, y2, z2, 0, x3, y3, z3, 0)
|
|
96
90
|
.multLeft (c);
|
|
97
91
|
|
|
@@ -103,14 +97,10 @@ const Bezier =
|
|
|
103
97
|
|
|
104
98
|
points .push (new Vector3 (v .x, v .y, v .z));
|
|
105
99
|
}
|
|
106
|
-
|
|
107
|
-
return points;
|
|
108
100
|
};
|
|
109
101
|
})(),
|
|
110
|
-
arc: function (ax, ay, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y, steps)
|
|
102
|
+
arc: function (ax, ay, rx, ry, xAxisRotation, largeArcFlag, sweepFlag, x, y, steps, points)
|
|
111
103
|
{
|
|
112
|
-
const points = [ ];
|
|
113
|
-
|
|
114
104
|
// https://ericeastwood.com/blog/25/curves-and-arcs-quadratic-cubic-elliptical-svg-implementations
|
|
115
105
|
// See https://www.w3.org/TR/SVG/implnote.html#ArcImplementationNotes.
|
|
116
106
|
|
|
@@ -236,8 +226,6 @@ const Bezier =
|
|
|
236
226
|
}
|
|
237
227
|
|
|
238
228
|
points .push (new Vector3 (x, y, 0));
|
|
239
|
-
|
|
240
|
-
return points;
|
|
241
229
|
}
|
|
242
230
|
};
|
|
243
231
|
|
|
@@ -145,7 +145,7 @@ Matrix2 .prototype =
|
|
|
145
145
|
inverse: function ()
|
|
146
146
|
{
|
|
147
147
|
const
|
|
148
|
-
|
|
148
|
+
{ 0: A, 1: B, 2: C, 3: D } = this [3],
|
|
149
149
|
d = A * D - B * C;
|
|
150
150
|
|
|
151
151
|
// if (d === 0) ... determinant is zero.
|
|
@@ -160,8 +160,8 @@ Matrix2 .prototype =
|
|
|
160
160
|
multLeft: function (matrix)
|
|
161
161
|
{
|
|
162
162
|
const
|
|
163
|
-
|
|
164
|
-
|
|
163
|
+
{ 0: a0, 1: a1, 2: a2, 3: a3 } = this,
|
|
164
|
+
{ 0: b0, 1: b1, 2: b2, 3: b3 } = matrix;
|
|
165
165
|
|
|
166
166
|
this [0] = a0 * b0 + a2 * b1;
|
|
167
167
|
this [1] = a1 * b0 + a3 * b1;
|
|
@@ -173,8 +173,8 @@ Matrix2 .prototype =
|
|
|
173
173
|
multRight: function (matrix)
|
|
174
174
|
{
|
|
175
175
|
const
|
|
176
|
-
|
|
177
|
-
|
|
176
|
+
{ 0: a0, 1: a1, 2: a2, 3: a3 } = this,
|
|
177
|
+
{ 0: b0, 1: b1, 2: b2, 3: b3 } = matrix;
|
|
178
178
|
|
|
179
179
|
this [0] = b0 * a0 + b2 * a1;
|
|
180
180
|
this [1] = b1 * a0 + b3 * a1;
|
package/src/tests.js
CHANGED
|
@@ -103,9 +103,20 @@ const X_ITE_TESTS = [
|
|
|
103
103
|
{ component: "HAnim" },
|
|
104
104
|
{ path: "HAnim/BoxManC.x3d" },
|
|
105
105
|
{ component: "Interpolation" },
|
|
106
|
+
{ path: "Interpolation/ComposeSFVec3f.wrl" },
|
|
107
|
+
{ path: "Interpolation/Cube.wrl" },
|
|
108
|
+
{ path: "Interpolation/EaseInEaseOut.wrl" },
|
|
109
|
+
{ path: "Interpolation/Interpolators.wrl" },
|
|
110
|
+
{ path: "Interpolation/LineTrail.wrl" },
|
|
106
111
|
{ path: "Interpolation/NormalInterpolator.x3d" },
|
|
107
112
|
{ path: "Interpolation/OrientationInterpolator.x3d" },
|
|
113
|
+
{ path: "Interpolation/ParticleShape.wrl" },
|
|
108
114
|
{ path: "Interpolation/PositionInterpolator.x3d" },
|
|
115
|
+
{ path: "Interpolation/SplinePositionInterpolator.wrl" },
|
|
116
|
+
{ path: "Interpolation/SplinePositionInterpolator2.wrl" },
|
|
117
|
+
{ path: "Interpolation/SplineScalarInterpolator.wrl" },
|
|
118
|
+
{ path: "Interpolation/SquadOrientationInterpolator.wrl" },
|
|
119
|
+
{ path: "Interpolation/warp.wrl" },
|
|
109
120
|
{ component: "Layering" },
|
|
110
121
|
{ path: "Layering/LayerSet.x3d" },
|
|
111
122
|
{ path: "Layering/Rotor.x3d" },
|
|
@@ -121,7 +121,9 @@ function X3DCoreContext (element)
|
|
|
121
121
|
this [_notification] = new Notification (this .getPrivateScene ());
|
|
122
122
|
this [_contextMenu] = new ContextMenu (this .getPrivateScene ());
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
const inches = $("<div></div>") .hide () .css ("height", "10in") .appendTo ($("body"));
|
|
125
|
+
this [_pixelPerPoint] = inches .height () / 720 || 1;
|
|
126
|
+
inches .remove ();
|
|
125
127
|
|
|
126
128
|
this .addChildObjects ("controlKey", new Fields .SFBool (),
|
|
127
129
|
"shiftKey", new Fields .SFBool (),
|
|
@@ -261,11 +263,7 @@ X3DCoreContext .prototype =
|
|
|
261
263
|
return this [_pixelPerPoint] * this .getRenderingProperty ("ContentScale");
|
|
262
264
|
},
|
|
263
265
|
connectedCallback: function ()
|
|
264
|
-
{
|
|
265
|
-
const inches = $("<div></div>") .hide () .css ("height", "10in") .appendTo (this [_shadow]);
|
|
266
|
-
this [_pixelPerPoint] = inches .height () / 720 || 1;
|
|
267
|
-
inches .remove ();
|
|
268
|
-
},
|
|
266
|
+
{ },
|
|
269
267
|
attributeChangedCallback: function (name, oldValue, newValue)
|
|
270
268
|
{
|
|
271
269
|
switch (name)
|
|
@@ -256,47 +256,44 @@ PolygonText .prototype = Object .assign (Object .create (X3DTextGeometry .protot
|
|
|
256
256
|
x = 0,
|
|
257
257
|
y = 0;
|
|
258
258
|
|
|
259
|
-
for (const
|
|
259
|
+
for (const { type, x1, y1, x2, y2, x: cx, y: cy } of path .commands)
|
|
260
260
|
{
|
|
261
|
-
switch (
|
|
261
|
+
switch (type)
|
|
262
262
|
{
|
|
263
263
|
case "M": // Start
|
|
264
264
|
case "Z": // End
|
|
265
265
|
{
|
|
266
|
-
// Filter consecutive identical points.
|
|
267
|
-
points = points .filter ((p, i, a) => !p .equals (a [(i + 1) % a .length]));
|
|
268
|
-
|
|
269
266
|
if (points .length > 2)
|
|
270
267
|
contours .push (points);
|
|
271
268
|
|
|
272
269
|
points = [ ];
|
|
273
270
|
|
|
274
|
-
if (
|
|
275
|
-
points .push (new Vector3 (
|
|
271
|
+
if (type === "M")
|
|
272
|
+
points .push (new Vector3 (cx, -cy, 0));
|
|
276
273
|
|
|
277
274
|
break;
|
|
278
275
|
}
|
|
279
276
|
case "L": // Linear
|
|
280
277
|
{
|
|
281
|
-
points .push (new Vector3 (
|
|
278
|
+
points .push (new Vector3 (cx, -cy, 0));
|
|
282
279
|
break;
|
|
283
280
|
}
|
|
284
281
|
case "Q": // Quadric
|
|
285
282
|
{
|
|
286
|
-
|
|
283
|
+
Bezier .quadric (x, -y, 0, x1, -y1, 0, cx, -cy, 0, steps, points);
|
|
287
284
|
break;
|
|
288
285
|
}
|
|
289
286
|
case "C": // Cubic
|
|
290
287
|
{
|
|
291
|
-
|
|
288
|
+
Bezier .cubic (x, -y, 0, x1, -y1, 0, x2, -y2, 0, cx, -cy, 0, steps, points);
|
|
292
289
|
break;
|
|
293
290
|
}
|
|
294
291
|
default:
|
|
295
292
|
continue;
|
|
296
293
|
}
|
|
297
294
|
|
|
298
|
-
x =
|
|
299
|
-
y =
|
|
295
|
+
x = cx;
|
|
296
|
+
y = cy;
|
|
300
297
|
}
|
|
301
298
|
|
|
302
299
|
return this .triangulatePolygon (contours, vertices);
|
|
@@ -804,7 +804,9 @@ X3DNode .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
|
804
804
|
generator .string += '"';
|
|
805
805
|
generator .string += ':';
|
|
806
806
|
generator .string += generator .TidySpace ();
|
|
807
|
+
generator .string += '"';
|
|
807
808
|
generator .string += generator .JSONEncode (name);
|
|
809
|
+
generator .string += '"';
|
|
808
810
|
generator .string += generator .TidyBreak ();
|
|
809
811
|
generator .string += generator .DecIndent ();
|
|
810
812
|
generator .string += generator .Indent ();
|
|
@@ -847,7 +849,9 @@ X3DNode .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
|
847
849
|
generator .string += '"';
|
|
848
850
|
generator .string += ':';
|
|
849
851
|
generator .string += generator .TidySpace ();
|
|
852
|
+
generator .string += '"';
|
|
850
853
|
generator .string += generator .JSONEncode (name);
|
|
854
|
+
generator .string += '"';
|
|
851
855
|
generator .string += ',';
|
|
852
856
|
generator .string += generator .TidyBreak ();
|
|
853
857
|
}
|
|
@@ -1008,7 +1012,9 @@ X3DNode .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
|
1008
1012
|
generator .string += '"';
|
|
1009
1013
|
generator .string += ':';
|
|
1010
1014
|
generator .string += generator .TidySpace ();
|
|
1015
|
+
generator .string += '"';
|
|
1011
1016
|
generator .string += generator .JSONEncode (field .getName ());
|
|
1017
|
+
generator .string += '"';
|
|
1012
1018
|
|
|
1013
1019
|
// If the field is a inputOutput and we have as reference only inputOnly or outputOnly we must output the value
|
|
1014
1020
|
// for this field.
|
|
@@ -1131,7 +1137,9 @@ X3DNode .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
|
1131
1137
|
for (let i = 0, length = sourceTextLines .length; i < length; ++ i)
|
|
1132
1138
|
{
|
|
1133
1139
|
generator .string += generator .ListIndent ();
|
|
1140
|
+
generator .string += '"';
|
|
1134
1141
|
generator .string += generator .JSONEncode (sourceTextLines [i]);
|
|
1142
|
+
generator .string += '"';
|
|
1135
1143
|
|
|
1136
1144
|
if (i !== length - 1)
|
|
1137
1145
|
generator .string += ',';
|
|
@@ -1187,7 +1195,9 @@ X3DNode .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
|
1187
1195
|
generator .string += '"';
|
|
1188
1196
|
generator .string += ':';
|
|
1189
1197
|
generator .string += generator .TidySpace ();
|
|
1198
|
+
generator .string += '"';
|
|
1190
1199
|
generator .string += generator .JSONEncode (field .getName ());
|
|
1200
|
+
generator .string += '"';
|
|
1191
1201
|
generator .string += ',';
|
|
1192
1202
|
generator .string += generator .TidyBreak ();
|
|
1193
1203
|
|
|
@@ -1197,7 +1207,9 @@ X3DNode .prototype = Object .assign (Object .create (X3DBaseNode .prototype),
|
|
|
1197
1207
|
generator .string += '"';
|
|
1198
1208
|
generator .string += ':';
|
|
1199
1209
|
generator .string += generator .TidySpace ();
|
|
1210
|
+
generator .string += '"';
|
|
1200
1211
|
generator .string += generator .JSONEncode (protoField .getName ());
|
|
1212
|
+
generator .string += '"';
|
|
1201
1213
|
generator .string += generator .TidyBreak ();
|
|
1202
1214
|
|
|
1203
1215
|
generator .string += generator .DecIndent ();
|
|
@@ -663,7 +663,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
663
663
|
generator .string += '"';
|
|
664
664
|
generator .string += ':';
|
|
665
665
|
generator .string += generator .TidySpace ();
|
|
666
|
+
generator .string += '"';
|
|
666
667
|
generator .string += generator .JSONEncode (this .getTypeName ());
|
|
668
|
+
generator .string += '"';
|
|
667
669
|
generator .string += ',';
|
|
668
670
|
generator .string += generator .TidyBreak ();
|
|
669
671
|
|
|
@@ -673,7 +675,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
673
675
|
generator .string += '"';
|
|
674
676
|
generator .string += ':';
|
|
675
677
|
generator .string += generator .TidySpace ();
|
|
678
|
+
generator .string += '"';
|
|
676
679
|
generator .string += generator .JSONEncode (name);
|
|
680
|
+
generator .string += '"';
|
|
677
681
|
generator .string += generator .TidyBreak ();
|
|
678
682
|
|
|
679
683
|
generator .string += generator .DecIndent ();
|
|
@@ -717,7 +721,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
717
721
|
generator .string += '"';
|
|
718
722
|
generator .string += ':';
|
|
719
723
|
generator .string += generator .TidySpace ();
|
|
724
|
+
generator .string += '"';
|
|
720
725
|
generator .string += generator .JSONEncode (name);
|
|
726
|
+
generator .string += '"';
|
|
721
727
|
generator .string += ',';
|
|
722
728
|
generator .string += generator .TidyBreak ();
|
|
723
729
|
}
|
|
@@ -731,7 +737,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
731
737
|
generator .string += '"';
|
|
732
738
|
generator .string += ':';
|
|
733
739
|
generator .string += generator .TidySpace ();
|
|
740
|
+
generator .string += '"';
|
|
734
741
|
generator .string += generator .JSONEncode (this .getTypeName ());
|
|
742
|
+
generator .string += '"';
|
|
735
743
|
generator .string += ',';
|
|
736
744
|
generator .string += generator .TidyBreak ();
|
|
737
745
|
|
|
@@ -804,7 +812,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
804
812
|
generator .string += '"';
|
|
805
813
|
generator .string += ':';
|
|
806
814
|
generator .string += generator .TidySpace ();
|
|
815
|
+
generator .string += '"';
|
|
807
816
|
generator .string += generator .JSONEncode (field .getName ());
|
|
817
|
+
generator .string += '"';
|
|
808
818
|
generator .string += ',';
|
|
809
819
|
generator .string += generator .TidyBreak ();
|
|
810
820
|
generator .string += generator .Indent ();
|
|
@@ -842,7 +852,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
842
852
|
generator .string += '"';
|
|
843
853
|
generator .string += ':';
|
|
844
854
|
generator .string += generator .TidySpace ();
|
|
855
|
+
generator .string += '"';
|
|
845
856
|
generator .string += generator .JSONEncode (field .getName ());
|
|
857
|
+
generator .string += '"';
|
|
846
858
|
generator .string += ',';
|
|
847
859
|
generator .string += generator .TidyBreak ();
|
|
848
860
|
generator .string += generator .Indent ();
|
|
@@ -872,7 +884,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
872
884
|
generator .string += '"';
|
|
873
885
|
generator .string += ':';
|
|
874
886
|
generator .string += generator .TidySpace ();
|
|
887
|
+
generator .string += '"';
|
|
875
888
|
generator .string += generator .JSONEncode (field .getName ());
|
|
889
|
+
generator .string += '"';
|
|
876
890
|
generator .string += ',';
|
|
877
891
|
generator .string += generator .TidyBreak ();
|
|
878
892
|
generator .string += generator .Indent ();
|
|
@@ -945,7 +959,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
945
959
|
generator .string += '"';
|
|
946
960
|
generator .string += ':';
|
|
947
961
|
generator .string += generator .TidySpace ();
|
|
962
|
+
generator .string += '"';
|
|
948
963
|
generator .string += generator .JSONEncode (field .getName ());
|
|
964
|
+
generator .string += '"';
|
|
949
965
|
generator .string += ',';
|
|
950
966
|
generator .string += generator .TidyBreak ();
|
|
951
967
|
|
|
@@ -955,7 +971,9 @@ X3DPrototypeInstance .prototype = Object .assign (Object .create (X3DNode .proto
|
|
|
955
971
|
generator .string += '"';
|
|
956
972
|
generator .string += ':';
|
|
957
973
|
generator .string += generator .TidySpace ();
|
|
974
|
+
generator .string += '"';
|
|
958
975
|
generator .string += generator .JSONEncode (protoField .getName ());
|
|
976
|
+
generator .string += '"';
|
|
959
977
|
generator .string += generator .TidyBreak ();
|
|
960
978
|
|
|
961
979
|
generator .string += generator .DecIndent ();
|
|
@@ -122,7 +122,9 @@ UnitInfo .prototype = Object .assign (Object .create (X3DObject .prototype),
|
|
|
122
122
|
generator .string += '"';
|
|
123
123
|
generator .string += ':';
|
|
124
124
|
generator .string += generator .TidySpace ();
|
|
125
|
+
generator .string += '"';
|
|
125
126
|
generator .string += generator .JSONEncode (this .name);
|
|
127
|
+
generator .string += '"';
|
|
126
128
|
generator .string += ',';
|
|
127
129
|
generator .string += generator .TidyBreak ();
|
|
128
130
|
|
|
@@ -133,7 +133,9 @@ X3DExportedNode .prototype = Object .assign (Object .create (X3DObject .prototyp
|
|
|
133
133
|
generator .string += '"';
|
|
134
134
|
generator .string += ':';
|
|
135
135
|
generator .string += generator .TidySpace ();
|
|
136
|
+
generator .string += '"';
|
|
136
137
|
generator .string += generator .JSONEncode (localName);
|
|
138
|
+
generator .string += '"';
|
|
137
139
|
|
|
138
140
|
if (this [_exportedName] !== localName)
|
|
139
141
|
{
|
|
@@ -145,7 +147,9 @@ X3DExportedNode .prototype = Object .assign (Object .create (X3DObject .prototyp
|
|
|
145
147
|
generator .string += '"';
|
|
146
148
|
generator .string += ':';
|
|
147
149
|
generator .string += generator .TidySpace ();
|
|
150
|
+
generator .string += '"';
|
|
148
151
|
generator .string += generator .JSONEncode (this [_exportedName]);
|
|
152
|
+
generator .string += '"';
|
|
149
153
|
generator .string += generator .TidyBreak ();
|
|
150
154
|
}
|
|
151
155
|
else
|