@dcl-regenesislabs/bevy-explorer-web 0.1.0-21595671085.commit-e43c31b → 0.1.0-21596012514.commit-1e7b2d6

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/.env CHANGED
@@ -1 +1 @@
1
- PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-21595671085.commit-e43c31b"
1
+ PUBLIC_URL="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-21596012514.commit-1e7b2d6"
package/index.html CHANGED
@@ -1,5 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
+
3
4
  <head>
4
5
  <meta charset="UTF-8">
5
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
@@ -7,16 +8,22 @@
7
8
  <style>
8
9
  video {
9
10
  display: none;
10
- }
11
- body {
12
- font-family: 'Inter', sans-serif; /* Changed to Inter */
13
- margin: 0px;
14
- background-color: #f7fafc; /* Lighter gray */
15
- color: #2d3748; /* Darker gray for text */
11
+ }
12
+
13
+ body {
14
+ font-family: 'Inter', sans-serif;
15
+ /* Changed to Inter */
16
+ margin: 0px;
17
+ background-color: #f7fafc;
18
+ /* Lighter gray */
19
+ color: #2d3748;
20
+ /* Darker gray for text */
16
21
  display: flex;
17
22
  flex-direction: column;
18
- align-items: center; /* Center content */
23
+ align-items: center;
24
+ /* Center content */
19
25
  }
26
+
20
27
  .container {
21
28
  background-color: #ffffff;
22
29
  padding: 25px;
@@ -24,61 +31,80 @@
24
31
  border-radius: 8px;
25
32
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
26
33
  width: 100%;
27
- max-width: 700px; /* Max width for content */
34
+ max-width: 700px;
35
+ /* Max width for content */
28
36
  }
29
- h1 {
30
- color: #2b6cb0; /* Tailwind blue-700 */
37
+
38
+ h1 {
39
+ color: #2b6cb0;
40
+ /* Tailwind blue-700 */
31
41
  text-align: center;
32
42
  margin-bottom: 20px;
33
43
  }
44
+
34
45
  label {
35
46
  display: block;
36
47
  margin-top: 15px;
37
48
  margin-bottom: 5px;
38
49
  font-weight: 600;
39
- color: #4a5568; /* Tailwind gray-700 */
50
+ color: #4a5568;
51
+ /* Tailwind gray-700 */
40
52
  }
53
+
41
54
  input[type="text"] {
42
- width: calc(100% - 22px); /* Full width minus padding and border */
55
+ width: calc(100% - 22px);
56
+ /* Full width minus padding and border */
43
57
  padding: 10px;
44
- border: 1px solid #cbd5e0; /* Tailwind gray-400 */
58
+ border: 1px solid #cbd5e0;
59
+ /* Tailwind gray-400 */
45
60
  border-radius: 6px;
46
61
  font-size: 1rem;
47
62
  color: #2d3748;
48
63
  }
64
+
49
65
  input[type="text"]:focus {
50
66
  outline: none;
51
- border-color: #4299e1; /* Tailwind blue-500 */
67
+ border-color: #4299e1;
68
+ /* Tailwind blue-500 */
52
69
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
53
70
  }
54
- button {
55
- padding: 12px 20px;
56
- background-color: #3182ce; /* Tailwind blue-600 */
57
- color: white;
58
- border: none;
59
- border-radius: 6px;
60
- cursor: pointer;
71
+
72
+ button {
73
+ padding: 12px 20px;
74
+ background-color: #3182ce;
75
+ /* Tailwind blue-600 */
76
+ color: white;
77
+ border: none;
78
+ border-radius: 6px;
79
+ cursor: pointer;
61
80
  margin-top: 25px;
62
81
  font-size: 1rem;
63
82
  font-weight: 600;
64
83
  transition: background-color 0.2s ease-in-out;
65
- display: block; /* Make button block to center it */
84
+ display: block;
85
+ /* Make button block to center it */
66
86
  margin-left: auto;
67
87
  margin-right: auto;
68
88
  }
69
- button:hover {
70
- background-color: #2b6cb0; /* Tailwind blue-700 */
89
+
90
+ button:hover {
91
+ background-color: #2b6cb0;
92
+ /* Tailwind blue-700 */
71
93
  }
94
+
72
95
  #canvas-parent {
73
96
  display: none;
74
97
  width: 100%;
75
98
  height: 100vh;
76
99
  }
100
+
77
101
  #mygame-canvas {
78
102
  width: 100%;
79
103
  height: 100%;
80
- display: block; /* Remove extra space below canvas */
104
+ display: block;
105
+ /* Remove extra space below canvas */
81
106
  }
107
+
82
108
  /* Added for better structure and responsiveness */
83
109
  .input-group {
84
110
  margin-bottom: 15px;
@@ -89,32 +115,36 @@
89
115
  body {
90
116
  margin: 10px;
91
117
  }
118
+
92
119
  .container {
93
120
  padding: 20px;
94
121
  }
122
+
95
123
  h1 {
96
124
  font-size: 1.8rem;
97
125
  }
126
+
98
127
  button {
99
128
  width: 100%;
100
129
  }
101
130
  }
102
131
  </style>
103
132
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap" rel="stylesheet">
104
- <script>window.PUBLIC_URL = "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-21595671085.commit-e43c31b";</script>
133
+ <script>window.PUBLIC_URL = "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-21596012514.commit-1e7b2d6";</script>
105
134
  </head>
135
+
106
136
  <body>
107
137
  <div id="header" class="container">
108
138
  <h1>Bevy Explorer</h1>
109
139
 
110
140
  <div class="input-group">
111
- <label for="initialRealm">Initial Realm:</label>
112
- <input type="text" id="initialRealm" name="initialRealm" placeholder="e.g., world_alpha">
141
+ <label for="realm">Realm:</label>
142
+ <input type="text" id="realm" name="realm" placeholder="e.g., world_alpha">
113
143
  </div>
114
144
 
115
145
  <div class="input-group">
116
- <label for="location">Location:</label>
117
- <input type="text" id="location" name="location" placeholder="e.g., 0,0">
146
+ <label for="position">Position:</label>
147
+ <input type="text" id="position" name="position" placeholder="e.g., 0,0">
118
148
  </div>
119
149
 
120
150
  <div class="input-group">
@@ -128,16 +158,18 @@
128
158
  </div>
129
159
 
130
160
  <button id="initButton" disabled="true">Loading...</button>
131
-
161
+
132
162
  </div>
133
163
  <div id="canvas-parent">
134
- <canvas id="mygame-canvas"></canvas>
164
+ <canvas id="mygame-canvas"></canvas>
135
165
  </div>
136
- <div id="shader-compiling" style="position: absolute; height:30%; aspect-ratio: 1; background: radial-gradient(circle closest-side, #000000aa, #00000000); align-items: center; justify-content: center; display: none;">
137
- <image src="shader_compiling_transparent2.png" style="width: 100%;"/>
166
+ <div id="shader-compiling"
167
+ style="position: absolute; height:30%; aspect-ratio: 1; background: radial-gradient(circle closest-side, #000000aa, #00000000); align-items: center; justify-content: center; display: none;">
168
+ <image src="shader_compiling_transparent2.png" style="width: 100%;" />
138
169
  </div>
139
170
  <script src="https://cdn.jsdelivr.net/npm/livekit-client/dist/livekit-client.umd.min.js"></script>
140
171
  <script src="https://cdn.jsdelivr.net/npm/hls.js@1"></script>
141
- <script type="module" src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-21595671085.commit-e43c31b/main.js"></script>
172
+ <script type="module" src="https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-21596012514.commit-1e7b2d6/main.js"></script>
142
173
  </body>
143
- </html>
174
+
175
+ </html>
package/main.js CHANGED
@@ -2,8 +2,8 @@
2
2
  import { initGpuCache } from "./gpu_cache.js";
3
3
  import init, { engine_init, engine_run, gpu_cache_hash } from "./pkg/webgpu_build.js"; // Ensure this path is correct
4
4
 
5
- const initialRealmInput = document.getElementById("initialRealm");
6
- const locationInput = document.getElementById("location");
5
+ const realmInput = document.getElementById("realm");
6
+ const positionInput = document.getElementById("position");
7
7
  const systemSceneInput = document.getElementById("systemScene");
8
8
  const previewInput = document.getElementById("preview");
9
9
  const initButton = document.getElementById("initButton");
@@ -23,18 +23,18 @@ function populateInputsFromQueryParams() {
23
23
  autoStart = false;
24
24
  }
25
25
 
26
- const initialRealmParam = queryParams.get("initialRealm");
27
- if (initialRealmInput && initialRealmParam) {
28
- initialRealmInput.value = decodeURIComponent(initialRealmParam);
29
- } else if (initialRealmInput) {
30
- initialRealmInput.value = DEFAULT_SERVER;
26
+ const realmParam = queryParams.get("realm");
27
+ if (realmInput && realmParam) {
28
+ realmInput.value = decodeURIComponent(realmParam);
29
+ } else if (realmInput) {
30
+ realmInput.value = DEFAULT_SERVER;
31
31
  }
32
32
 
33
- const locationParam = queryParams.get("location");
34
- if (locationInput && locationParam) {
35
- locationInput.value = decodeURIComponent(locationParam);
36
- } else if (locationInput) {
37
- locationInput.value = "";
33
+ const positionParam = queryParams.get("position");
34
+ if (positionInput && positionParam) {
35
+ positionInput.value = decodeURIComponent(positionParam);
36
+ } else if (positionInput) {
37
+ positionInput.value = "";
38
38
  }
39
39
 
40
40
  const systemSceneParam = queryParams.get("systemScene");
@@ -51,8 +51,8 @@ function populateInputsFromQueryParams() {
51
51
  previewInput.checked = false;
52
52
  }
53
53
 
54
- initialRealmInput.disabled = autoStart;
55
- locationInput.disabled = autoStart;
54
+ realmInput.disabled = autoStart;
55
+ positionInput.disabled = autoStart;
56
56
  systemSceneInput.disabled = autoStart;
57
57
  previewInput.disabled = autoStart;
58
58
  }
@@ -288,12 +288,12 @@ async function initEngine() {
288
288
  }
289
289
 
290
290
  function start() {
291
- const initialRealm = initialRealmInput.value;
292
- const location = locationInput.value;
291
+ const realm = realmInput.value;
292
+ const position = positionInput.value;
293
293
  const systemScene = systemSceneInput.value;
294
294
  const preview = previewInput.checked;
295
295
  console.log(
296
- `[Main JS] "Go" button clicked. Initial Realm: "${initialRealm}", Location: "${location}", System Scene: "${systemScene}"`
296
+ `[Main JS] "Go" button clicked. Realm: "${realm}", Position: "${position}", System Scene: "${systemScene}"`
297
297
  );
298
298
  hideHeader();
299
299
 
@@ -304,7 +304,7 @@ function start() {
304
304
  return "unknown";
305
305
  })();
306
306
 
307
- engine_run(platform, initialRealm, location, systemScene, true, preview, 1e7);
307
+ engine_run(platform, realm, position, systemScene, true, preview, 1e7);
308
308
  }
309
309
 
310
310
  initButton.onclick = start;
@@ -324,16 +324,16 @@ initEngine()
324
324
  initButton.textContent = "Load Failed";
325
325
  });
326
326
 
327
- window.set_url_params = (x, y, server, system_scene, preview) => {
327
+ window.set_url_params = (x, y, realm, system_scene, preview) => {
328
328
  try {
329
329
  const urlParams = new URLSearchParams(window.location.search);
330
330
 
331
- urlParams.set("location", `${x},${y}`);
331
+ urlParams.set("position", `${x},${y}`);
332
332
 
333
- if (server != DEFAULT_SERVER) {
334
- urlParams.set("initialServer", server);
333
+ if (realm != DEFAULT_SERVER) {
334
+ urlParams.set("realm", realm);
335
335
  } else {
336
- urlParams.delete("initialServer");
336
+ urlParams.delete("realm");
337
337
  }
338
338
 
339
339
  if (system_scene != DEFAULT_SYSTEMSCENE) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcl-regenesislabs/bevy-explorer-web",
3
- "version": "0.1.0-21595671085.commit-e43c31b",
3
+ "version": "0.1.0-21596012514.commit-1e7b2d6",
4
4
  "scripts": {
5
5
  "postinstall": "node ./scripts/prebuild.js"
6
6
  },
@@ -8,6 +8,6 @@
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/decentraland/bevy-explorer.git"
10
10
  },
11
- "homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-21595671085.commit-e43c31b",
12
- "commit": "e43c31b561e3777daaa770526f9a57e299f86969"
11
+ "homepage": "https://cdn.decentraland.org/@dcl-regenesislabs/bevy-explorer-web/0.1.0-21596012514.commit-1e7b2d6",
12
+ "commit": "1e7b2d633958deb5329a376a614f820d4f78a9df"
13
13
  }
@@ -4767,15 +4767,15 @@ function __wbg_get_imports() {
4767
4767
  const ret = false;
4768
4768
  return ret;
4769
4769
  };
4770
- imports.wbg.__wbindgen_closure_wrapper150461 = function(arg0, arg1, arg2) {
4770
+ imports.wbg.__wbindgen_closure_wrapper150462 = function(arg0, arg1, arg2) {
4771
4771
  const ret = makeMutClosure(arg0, arg1, 118970, __wbg_adapter_111);
4772
4772
  return ret;
4773
4773
  };
4774
- imports.wbg.__wbindgen_closure_wrapper171269 = function(arg0, arg1, arg2) {
4774
+ imports.wbg.__wbindgen_closure_wrapper171270 = function(arg0, arg1, arg2) {
4775
4775
  const ret = makeMutClosure(arg0, arg1, 134233, __wbg_adapter_114);
4776
4776
  return ret;
4777
4777
  };
4778
- imports.wbg.__wbindgen_closure_wrapper171271 = function(arg0, arg1, arg2) {
4778
+ imports.wbg.__wbindgen_closure_wrapper171272 = function(arg0, arg1, arg2) {
4779
4779
  const ret = makeMutClosure(arg0, arg1, 134233, __wbg_adapter_114);
4780
4780
  return ret;
4781
4781
  };
Binary file