x_ite-off-parser 1.0.3 → 1.0.4
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 +2 -2
- package/dist/x_ite-off-parser.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -13,10 +13,10 @@ Include the script after X_ITE:
|
|
|
13
13
|
|
|
14
14
|
```html
|
|
15
15
|
<script defer src="https://cdn.jsdelivr.net/npm/x_ite@15.0.3/dist/x_ite.min.js"></script>
|
|
16
|
-
<script defer src="https://cdn.jsdelivr.net/npm/x_ite-off-parser@1.0.
|
|
16
|
+
<script defer src="https://cdn.jsdelivr.net/npm/x_ite-off-parser@1.0.4/dist/x_ite-off-parser.min.js"></script>
|
|
17
17
|
<!-- or as ES module -->
|
|
18
18
|
<script type="module" src="https://cdn.jsdelivr.net/npm/x_ite@15.0.3/dist/x_ite.min.mjs"></script>
|
|
19
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/x_ite-off-parser@1.0.
|
|
19
|
+
<script type="module" src="https://cdn.jsdelivr.net/npm/x_ite-off-parser@1.0.4/dist/x_ite-off-parser.min.js"></script>
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
Now you can load OFF files:
|
package/dist/x_ite-off-parser.js
CHANGED
|
@@ -9,6 +9,7 @@ const Grammar = X3D .Expressions ({
|
|
|
9
9
|
// General
|
|
10
10
|
whitespaces: /[\x20\n\t\r,]+/y,
|
|
11
11
|
whitespacesNoLineTerminator: /[\x20\t]+/y,
|
|
12
|
+
untilEndOfLine: /[^\r\n]+/y,
|
|
12
13
|
comment: /#[^\r\n]*(?=[\r\n]|$)/y,
|
|
13
14
|
header: /OFF/y,
|
|
14
15
|
|
|
@@ -44,7 +45,7 @@ class OffParser extends X3D .X3DParser
|
|
|
44
45
|
|
|
45
46
|
isValid ()
|
|
46
47
|
{
|
|
47
|
-
return this .input .match (
|
|
48
|
+
return this .input .match (/^OFF/);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
parseIntoScene (resolve, reject)
|
|
@@ -192,6 +193,7 @@ class OffParser extends X3D .X3DParser
|
|
|
192
193
|
if (this .double ())
|
|
193
194
|
{
|
|
194
195
|
points .push (this .value);
|
|
196
|
+
Grammar .untilEndOfLine .parse (this);
|
|
195
197
|
continue;
|
|
196
198
|
}
|
|
197
199
|
}
|
|
@@ -244,6 +246,7 @@ class OffParser extends X3D .X3DParser
|
|
|
244
246
|
}
|
|
245
247
|
}
|
|
246
248
|
|
|
249
|
+
Grammar .untilEndOfLine .parse (this);
|
|
247
250
|
continue;
|
|
248
251
|
}
|
|
249
252
|
|