x_ite 4.7.7 → 4.7.8

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/dist/x_ite.zip CHANGED
Binary file
@@ -294,7 +294,7 @@ function spin ()
294
294
  ### The HTML
295
295
 
296
296
  ```html
297
- <X3DCanvas src="external-browser.x3d" onload="init ()"/>
297
+ <X3DCanvas src="external-browser.x3d" onload="init ()"></X3DCanvas>
298
298
 
299
299
  <div class="buttons">
300
300
  <button id="center" class="button" onclick="center ()">Center</button>
package/docs/_config.yml CHANGED
@@ -20,7 +20,7 @@ github: [metadata]
20
20
  author:
21
21
  name: *title
22
22
  avatar: "assets/images/logo.png"
23
- bio: "Version 4.7.7"
23
+ bio: "Version 4.7.8"
24
24
  links:
25
25
  - label: "GitHub"
26
26
  icon: "fab fa-2x fa-fw fa-github"
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.7/dist/x_ite.css"/>
842
- <script type="text/javascript" src="https://create3000.github.io/code/x_ite/4.7.7/dist/x_ite.min.js"></script>
841
+ <link rel="stylesheet" type="text/css" href="https://create3000.github.io/code/x_ite/4.7.8/dist/x_ite.css"/>
842
+ <script type="text/javascript" src="https://create3000.github.io/code/x_ite/4.7.8/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.7",
4
- "revision": "1133",
3
+ "version": "4.7.8",
4
+ "revision": "1134",
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": {
@@ -61,6 +61,13 @@ define (function ()
61
61
  if (getScriptURL () .match (/\.min\.js$/))
62
62
  file += ".min";
63
63
 
64
+ if (typeof globalProcess === "object" && globalProcess .platform === "win32")
65
+ {
66
+ const path = globalRequire ("path");
67
+
68
+ return path .join (path .dirname (getScriptURL ()), "assets\\components\\" + file + ".js");
69
+ }
70
+
64
71
  return new URL ("assets/components/" + file + ".js", getScriptURL ()) .href;
65
72
  }
66
73
 
@@ -49,5 +49,5 @@
49
49
 
50
50
  define (function ()
51
51
  {
52
- return "4.7.7";
52
+ return "4.7.8";
53
53
  });
@@ -125,15 +125,22 @@ define (function ()
125
125
  for (const component of components)
126
126
  {
127
127
  const providerUrl = component .providerUrl;
128
-
129
- if (providerUrl .match (componentsUrl))
128
+ if (providerUrl .match (componentsUrl))
130
129
  providerUrls .add (providerUrl);
131
130
  }
132
131
 
133
132
  if (typeof globalRequire === "function")
134
133
  {
135
- for (const url of providerUrls)
136
- globalRequire (new URL (url) .pathname);
134
+ if (typeof globalProcess === "object" && globalProcess .platform === "win32")
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
+ }
137
144
  }
138
145
 
139
146
  return Array .from (providerUrls);
package/src/x_ite/X3D.js CHANGED
@@ -109,7 +109,12 @@ function ($,
109
109
  const url = urls .getProviderUrl (name);
110
110
 
111
111
  if (typeof globalRequire === "function")
112
- globalRequire (new URL (url) .pathname);
112
+ {
113
+ if (typeof globalProcess === "object" && globalProcess .platform === "win32")
114
+ globalRequire (url);
115
+ else
116
+ globalRequire (new URL (url) .pathname);
117
+ }
113
118
 
114
119
  return url;
115
120
  }
package/src/x_ite.js CHANGED
@@ -69,9 +69,16 @@ define .hide = function ()
69
69
  const getScriptURL = (function ()
70
70
  {
71
71
  if (document .currentScript)
72
+ {
72
73
  var src = document .currentScript .src;
74
+ }
73
75
  else if (typeof __filename === "string")
74
- var src = "file://" + __filename;
76
+ {
77
+ if (typeof globalProcess === "object" && globalProcess .platform === "win32")
78
+ var src = __filename;
79
+ else
80
+ var src = "file://" + __filename;
81
+ }
75
82
 
76
83
  return function ()
77
84
  {