@woosh/meep-engine 2.33.15 → 2.33.19

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.
@@ -26,27 +26,6 @@ function current_time_millis() {
26
26
  }
27
27
  }
28
28
 
29
- /**
30
- *
31
- * @param {MicronGeometryBufferAttributeSpec[]} attributes
32
- */
33
- function buildVertexDataTypeMap(attributes) {
34
-
35
- const data_types = [];
36
-
37
- for (let i = 0; i < attributes.length; i++) {
38
- const spec = attributes[i];
39
-
40
- const itemSize = spec.itemSize;
41
-
42
- for (let j = 0; j < itemSize; j++) {
43
- data_types.push(spec.type);
44
- }
45
- }
46
-
47
- return data_types;
48
- }
49
-
50
29
  /**
51
30
  *
52
31
  * @param {MicronGeometryBufferAttributeSpec} spec
@@ -35,8 +35,23 @@ export function convertPathToURL(path) {
35
35
  } else if (ENVIRONMENT_IS_WORKER) {
36
36
  scope = self;
37
37
  } else if (ENVIRONMENT_IS_NODE) {
38
+
39
+ let normalized_path = `${process.cwd()}/`.replace(/\\/g, '/');
40
+
41
+ // remove multiple sequential slashes
42
+ normalized_path = normalized_path.replace(/\/+/g, '/');
43
+
44
+ if (normalized_path[0] !== '/') {
45
+ // Windows drive letter must be prefixed with a slash.
46
+ normalized_path = `/${normalized_path}`;
47
+ }
48
+
38
49
  scope = {
39
- location: new URL(import.meta.url)
50
+ location: {
51
+ pathname: normalized_path,
52
+ host: '',
53
+ protocol: 'file:'
54
+ }
40
55
  };
41
56
  } else {
42
57
  throw new Error('Unknown environment');
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "productName": "Meep",
5
5
  "description": "production-ready JavaScript game engine based on Entity Component System Architecture",
6
6
  "author": "Alexander Goldring",
7
- "version": "2.33.15",
7
+ "version": "2.33.19",
8
8
  "dependencies": {
9
9
  "fast-levenshtein": "2.0.6",
10
10
  "opentype.js": "1.3.3",