-
Notifications
You must be signed in to change notification settings - Fork 23
/
index.html
422 lines (391 loc) · 17.2 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>wgpu: portable graphics library for Rust</title>
<!-- BULMA CSS Framework -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.0/css/bulma.min.css"
integrity="sha512-ADrqa2PY1TZtb/MoLZIZu/Z/LlPaWQeDMBV73EMwjGam43/JJ5fqW38Rq8LJOVGCDfrJeOMS3Q/wRUVzW5DkjQ=="
crossorigin="anonymous" />
<!-- Font Awesome Icons -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/js/all.min.js"
integrity="sha512-YSdqvJoZr83hj76AIVdOcvLWYMWzy6sJyIMic2aQz5kh2bPTd9dzY3NtdeEAzPp/PhgZqr4aJObB3ym/vsItMg=="
crossorigin="anonymous"></script>
<style>
#navbar-brand-img {
max-height: 3rem;
}
#showcase_container {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
gap: 3rem;
align-items: start;
}
</style>
</head>
<body>
<section class="section">
<div class="container">
<!-- Navigation Bar -->
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="https://wgpu.rs/">
<img id="navbar-brand-img" src="logo.min.svg">
</a>
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-start">
<a class="navbar-item" href="https://wgpu.rs/">
<span class="icon">
<i class="fas fa-home"></i>
</span>
<span>Home</span>
</a>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
<span class="icon">
<i class="fas fa-book"></i>
</span>
<span>Documentation</span>
</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="https://docs.rs/wgpu/">
<span class="icon">
<i class="fas fa-cube"></i>
</span>
<span>Latest Release</span>
</a>
<a class="navbar-item" href="https://wgpu.rs/doc/wgpu/">
<span class="icon">
<i class="fas fa-code-branch"></i>
</span>
<span>Development Branch</span>
</a>
</div>
</div>
<div class="navbar-item has-dropdown is-hoverable">
<a class="navbar-link">
<span class="icon">
<i class="fas fa-download"></i>
</span>
<span>Download</span>
</a>
<div class="navbar-dropdown">
<a class="navbar-item" href="https://crates.io/crates/wgpu">
<span class="icon">
<i class="fas fa-cubes"></i>
</span>
<span>Crates.io</span>
</a>
<a class="navbar-item" href="https://github.com/gfx-rs/wgpu">
<span class="icon">
<i class="fab fa-github"></i>
</span>
<span>GitHub.com</span>
</a>
</div>
</div>
<a class="navbar-item" href="https://wgpu.rs/examples/">
<span class="icon">
<i class="fas fa-rocket"></i>
</span>
<span>Try Live Demos</span>
</a>
</div>
<div class="navbar-end">
<div class="navbar-item">
<div class="buttons">
<a class="button is-light" href="https://github.com/gfx-rs/wgpu">
<span class="icon">
<i class="fab fa-github"></i>
</span>
<span>GitHub Repo</span>
</a>
</div>
</div>
</div>
</div>
</nav>
</div>
</section>
<!-- Hero -->
<section class="hero is-medium is-primary is-bold">
<div class="hero-body">
<div class="container">
<div class="columns">
<div class="column is-4 px-6">
<img src="logo.min.svg">
</div>
<div class="column px-6">
<h1 class="title is-1 pb-6">
wgpu
</h1>
<p class="subtitle is-3">
<b>wgpu</b> is a safe and portable graphics library for Rust based on the WebGPU API.
It is suitable for general purpose graphics and compute on the GPU.
</p>
<p class="subtitle is-3">
Applications using <b>wgpu</b> run natively on Vulkan, Metal, DirectX 12, and OpenGL ES;
and browsers via WebAssembly on WebGPU and WebGL2.
</p>
</div>
</div>
</div>
</div>
</section>
<!-- Showcase Projects -->
<section class="section is-medium">
<div class="container">
<h1 class="title is-1"><a name="showcase">#</a> Showcase</h1>
<br>
<p class="subtitle is-4">Made something cool with <b>wgpu</b>? <a
href="https://github.com/gfx-rs/wgpu-rs.github.io">Make a PR</a>, and reach out to us on <a
href="https://matrix.to/#/#wgpu-users:matrix.org">#wgpu-users</a>!</p>
<br>
<div id="showcase_container"></div>
</div>
</section>
<!-- Helper script for toggling the navigation-bar burger menu on small screens -->
<script>
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el.dataset.target;
const $target = document.getElementById(target);
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
}
});
</script>
<script>
// List of showcase projects; Edit this list to add or remove projects
const showcase_list = [
{
"name": "Albedo",
"description": "Albedo is a library for real-time pathtracing and lightmapping.",
"website": "https://github.com/albedo-engine/albedo",
"thumbnail": "screenshots/albedo.webp",
},
{
"name": "Bevy",
"description": "A data-driven game engine built in Rust",
"website": "https://bevyengine.org/",
"thumbnail": "screenshots/bevy.gif",
},
{
"name": "Rerun",
"description": "SDK + Visualizer for logging computer vision and robotics.",
"website": "https://www.rerun.io/",
"thumbnail": "screenshots/rerun.gif",
},
{
"name": "WASM nbodysim",
"description": "Realtime 2D WASM N-Body-Simulation",
"website": "https://github.com/simbleau/nbody-wasm-sim",
"thumbnail": "screenshots/nbodywasm.gif",
},
{
"name": "nbodysim",
"description": "Realtime 3D N-Body-Simulation",
"website": "https://github.com/timokoesters/nbodysim",
"thumbnail": "screenshots/nbodysim.gif",
},
{
"name": "Veloren",
"description": "A multiplayer voxel RPG with advanced terrain generation and economy simulation",
"website": "https://veloren.net/",
"thumbnail": "screenshots/veloren.gif",
},
{
"name": "Dotrix",
"description": "Skeletal Animation Example of a 3D game engine",
"website": "https://github.com/lowenware/dotrix",
"thumbnail": "screenshots/dotrix-skeletal.gif",
},
{
"name": "Vange-rs",
"description": "Rusty Vangers clone",
"website": "https://github.com/kvark/vange-rs",
"thumbnail": "screenshots/vange-rs.png"
},
{
"name": "Harmony",
"description": "A modern 3D/2D game engine that uses wgpu",
"website": "https://github.com/StarArawn/harmony",
"thumbnail": "screenshots/harmony-rs.jpg"
},
{
"name": "Blub",
"description": "A GPU fluid solver (APIC)",
"website": "https://github.com/wumpf/blub",
"thumbnail": "screenshots/blub-fluid.gif"
},
{
"name": "Brawlib",
"description": "Brawl file parser",
"website": "https://github.com/rukai/brawllib_rs",
"thumbnail": "screenshots/brawl-attack.gif"
},
{
"name": "GLX",
"description": "OpenStreetMap renderer",
"website": "https://github.com/paulkernfeld/glx",
"thumbnail": "screenshots/glx-map.png"
},
{
"name": "Neothesia",
"description": "Cross-platform GPU accelerated midi visualizer",
"website": "https://github.com/PolyMeilex/Neothesia",
"thumbnail": "screenshots/neothesia.gif"
},
{
"name": "Sky renderer",
"description": "A wgpu allsky renderer",
"website": "https://github.com/bmatthieu3/wgpu-sky-rendering",
"thumbnail": "screenshots/dss.gif"
},
{
"name": "grass field",
"description": "TuiTui's everyday experiments",
"website": "https://www.instagram.com/mactuitui/",
"thumbnail": "screenshots/tuitui-grass-field.png"
},
{
"name": "Hectic-rs",
"description": "Hectic rewrite in Rust",
"website": "https://github.com/expenses/hectic-rs",
"thumbnail": "screenshots/hectic.png"
},
{
"name": "Richter",
"description": "Quake engine in Rust",
"website": "https://github.com/cormac-obrien/richter",
"thumbnail": "screenshots/richter.png"
},
{
"name": "Göld",
"description": "Löve but for Goldsrc",
"website": "https://github.com/Vurich/goeld",
"thumbnail": "screenshots/goeld.png"
},
{
"name": "Egregoria",
"description": "Society simulator",
"website": "https://github.com/Uriopass/Egregoria",
"thumbnail": "screenshots/egregoria.jpg"
},
{
"name": "Sandbox",
"description": "Falling sand game",
"website": "https://github.com/JMS55/sandbox",
"thumbnail": "screenshots/sandbox.png"
},
{
"name": "Terra",
"description": "Planet rendering library",
"website": "https://github.com/fintelia/terra",
"thumbnail": "screenshots/terra.jpg"
},
{
"name": "ampli-Fe",
"description": "Fully cross-platform VST2 plugin UI",
"website": "https://github.com/antonok-edm/ampli-Fe",
"thumbnail": "screenshots/ampli-Fe.jpg"
},
{
"name": "ENSnano",
"description": "CAD software for 3D DNA nanostructures",
"website": "https://www.ens-lyon.fr/ensnano",
"thumbnail": "screenshots/ensnano.png"
},
{
"name": "wgpu",
"description": "Water example",
"website": "https://github.com/gfx-rs/wgpu/tree/trunk/examples/src/water",
"thumbnail": "screenshots/example-water.gif"
},
{
"name": "wgpu",
"description": "Shadow example",
"website": "https://github.com/gfx-rs/wgpu/tree/trunk/examples/src/shadow",
"thumbnail": "screenshots/example-shadow.png"
},
{
"name": "wgpu",
"description": "Cube example",
"website": "https://github.com/gfx-rs/wgpu/tree/trunk/examples/src/cube",
"thumbnail": "screenshots/example-cube.png"
},
{
"name": "wgpu",
"description": "Mipmap example",
"website": "https://github.com/gfx-rs/wgpu/tree/trunk/examples/src/mipmap",
"thumbnail": "screenshots/example-mipmap.png"
},
{
"name": "wgpu",
"description": "Skybox example",
"website": "https://github.com/gfx-rs/wgpu/tree/trunk/examples/src/skybox",
"thumbnail": "screenshots/example-skybox.gif"
}
];
// Showcase Card Template
const showcase_template = ({ name, description, website, thumbnail }) => {
// Providing fallback formats for Safari
const file_ext_pos = thumbnail.lastIndexOf(".");
const file_name = thumbnail.slice(0, file_ext_pos);
const thumbnail_webp = `${file_name}.webp`;
return `
<div class="card">
<div class="card-image">
<picture class="image is-4by3">
<source srcset="${thumbnail_webp}">
<img src="${thumbnail}" loading="lazy">
</picture>
</div>
<div class="card-content">
<div class="media">
<div class="media-content">
<p class="title is-4">${name}</p>
<p class="subtitle is-6">${description}</p>
</div>
</div>
</div>
<footer class="card-footer">
<a href="${website}" class="card-footer-item">
<span class="icon">
<i class="fas fa-external-link-alt"></i>
</span>
<span>Visit Project Website</span></a>
</footer>
</div>
`;
}
const showcase_container = document.getElementById("showcase_container");
for (let { name, description, website, thumbnail } of showcase_list) {
showcase_container.insertAdjacentHTML("beforeend", showcase_template({
name,
description,
website,
thumbnail
}));
}
</script>
</body>
</html>