x_ite-off-parser 1.0.1 → 1.0.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/README.md CHANGED
@@ -8,10 +8,10 @@ Include the script after X_ITE:
8
8
 
9
9
  ```html
10
10
  <script defer src="https://cdn.jsdelivr.net/npm/x_ite@15.0.3/dist/x_ite.min.js"></script>
11
- <script defer src="https://cdn.jsdelivr.net/npm/x_ite-off-parser@1.0.1/dist/x_ite-off-parser.js"></script>
11
+ <script defer src="https://cdn.jsdelivr.net/npm/x_ite-off-parser@1.0.2/dist/x_ite-off-parser.js"></script>
12
12
  <!-- or as ES module -->
13
13
  <script type="module" src="https://cdn.jsdelivr.net/npm/x_ite@15.0.3/dist/x_ite.min.mjs"></script>
14
- <script type="module" src="https://cdn.jsdelivr.net/npm/x_ite-off-parser@1.0.1/dist/x_ite-off-parser.js"></script>
14
+ <script type="module" src="https://cdn.jsdelivr.net/npm/x_ite-off-parser@1.0.2/dist/x_ite-off-parser.js"></script>
15
15
  ```
16
16
 
17
17
  Now you can load OFF files:
@@ -8,6 +8,7 @@ const X3D = window [Symbol .for ("X_ITE.X3D")];
8
8
  const Grammar = X3D .Expressions ({
9
9
  // General
10
10
  whitespaces: /[\x20\n\t\r,]+/y,
11
+ whitespacesNoLineTerminator: /[\x20\t]+/y,
11
12
  comment: /#[^\r\n]*(?=[\r\n]|$)/y,
12
13
  header: /OFF/y,
13
14
 
@@ -136,6 +137,11 @@ class OffParser extends X3D .X3DParser
136
137
  Grammar .whitespaces .parse (this);
137
138
  }
138
139
 
140
+ whitespacesNoLineTerminator ()
141
+ {
142
+ Grammar .whitespacesNoLineTerminator .parse (this);
143
+ }
144
+
139
145
  header ()
140
146
  {
141
147
  return Grammar .header .parse (this);
@@ -249,7 +255,7 @@ class OffParser extends X3D .X3DParser
249
255
 
250
256
  int32 ()
251
257
  {
252
- this .whitespaces ();
258
+ this .whitespacesNoLineTerminator ();
253
259
 
254
260
  if (Grammar .int32 .parse (this))
255
261
  {
@@ -263,7 +269,7 @@ class OffParser extends X3D .X3DParser
263
269
 
264
270
  double ()
265
271
  {
266
- this .whitespaces ();
272
+ this .whitespacesNoLineTerminator ();
267
273
 
268
274
  if (Grammar .double .parse (this))
269
275
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "x_ite-off-parser",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "OFF 3D File Format Parser for X_ITE",
5
5
  "main": "dist/x_ite-off-parser.js",
6
6
  "module": "dist/x_ite-off-parser.js",