Skip to content

Commit 7b67f49

Browse files
committed
Code dump
1 parent eec8210 commit 7b67f49

File tree

979 files changed

+348975
-121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

979 files changed

+348975
-121
lines changed

.gitignore

+29-119
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,40 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
.pnpm-debug.log*
9-
10-
# Diagnostic reports (https://nodejs.org/api/report.html)
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12-
13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
18-
19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
21-
22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
*.lcov
25-
26-
# nyc test coverage
27-
.nyc_output
28-
29-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30-
.grunt
31-
32-
# Bower dependency directory (https://bower.io/)
33-
bower_components
34-
35-
# node-waf configuration
36-
.lock-wscript
37-
38-
# Compiled binary addons (https://nodejs.org/api/addons.html)
39-
build/Release
40-
41-
# Dependency directories
42-
node_modules/
43-
jspm_packages/
44-
45-
# Snowpack dependency directory (https://snowpack.dev/)
46-
web_modules/
47-
48-
# TypeScript cache
49-
*.tsbuildinfo
50-
51-
# Optional npm cache directory
52-
.npm
53-
54-
# Optional eslint cache
55-
.eslintcache
56-
57-
# Optional stylelint cache
58-
.stylelintcache
1+
.idea
592

60-
# Microbundle cache
61-
.rpt2_cache/
62-
.rts2_cache_cjs/
63-
.rts2_cache_es/
64-
.rts2_cache_umd/
3+
# Dependencies
4+
node_modules
655

66-
# Optional REPL history
67-
.node_repl_history
6+
# Production
7+
/build
688

69-
# Output of 'npm pack'
70-
*.tgz
71-
72-
# Yarn Integrity file
73-
.yarn-integrity
9+
# Generated files
10+
.docusaurus
11+
.cache-loader
7412

75-
# dotenv environment variable files
76-
.env
13+
# Misc
14+
.DS_Store
15+
.env.local
7716
.env.development.local
7817
.env.test.local
7918
.env.production.local
80-
.env.local
81-
82-
# parcel-bundler cache (https://parceljs.org/)
83-
.cache
84-
.parcel-cache
85-
86-
# Next.js build output
87-
.next
88-
out
89-
90-
# Nuxt.js build / generate output
91-
.nuxt
92-
dist
93-
94-
# Gatsby files
95-
.cache/
96-
# Comment in the public line in if your project uses Gatsby and not Next.js
97-
# https://nextjs.org/blog/next-9-1#public-directory-support
98-
# public
99-
100-
# vuepress build output
101-
.vuepress/dist
10219

103-
# vuepress v2.x temp and cache directory
104-
.temp
105-
.cache
106-
107-
# Docusaurus cache and generated files
108-
.docusaurus
109-
110-
# Serverless directories
111-
.serverless/
112-
113-
# FuseBox cache
114-
.fusebox/
115-
116-
# DynamoDB Local files
117-
.dynamodb/
118-
119-
# TernJS port file
120-
.tern-port
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
12123

122-
# Stores VSCode versions used for testing VSCode extensions
123-
.vscode-test
24+
build
12425

125-
# yarn v2
126-
.yarn/cache
127-
.yarn/unplugged
128-
.yarn/build-state.yml
129-
.yarn/install-state.gz
26+
## For yarn 4: See https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
13027
.pnp.*
28+
.yarn/*
29+
!.yarn/patches
30+
!.yarn/plugins
31+
!.yarn/releases
32+
!.yarn/sdks
33+
!.yarn/versions
34+
35+
# Ignore these because they are generated automatically from docs/user_guides/templates
36+
docs/user_guides/rust
37+
docs/user_guides/bevy_plugin
38+
docs/user_guides/javascript
39+
docs/user_guides/templates_injected
40+
tmp_*

.htaccess

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
RewriteEngine On
2+
RewriteCond %{SERVER_PORT} 80
3+
RewriteRule ^(.*)$ https://www.wgmath.rs/$1 [R,L]

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v16.20.2

.yarnrc.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

README.md

+37-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,37 @@
1-
# wgmath.rs
2-
Website for the wgmath ecosystem
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Build
12+
13+
```
14+
$ ./generate_user_guides.sh
15+
```
16+
17+
This command reads the templates directory and extracts specific instructions for bevy / rust / rapier integrations. It also injects code contained in rust files.
18+
19+
```
20+
$ yarn build
21+
```
22+
23+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
24+
25+
```
26+
$ yarn start
27+
```
28+
29+
This command builds and starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
30+
31+
### Deployment
32+
33+
```
34+
$ GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
35+
```
36+
37+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

community/acknowledgements.mdx

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
id: acknowledgements
3+
title: Acknowledgements
4+
sidebar_label: Acknowledgements
5+
---
6+
7+
We would like to thank every that make all this work possible: the Rust community,
8+
code contributors, as well as financial donors on [GitHub sponsors](https://github.com/sponsors/dimforge)
9+
10+
**Thanks** to all of you for your support!
11+
12+
{/* # Image credits */}
13+
{/* Some images were downloaded from [flaticon](https://www.flaticon.com). Some have */}
14+
{/* been modified to fit with the overall theme. We thank the authors for providing */}
15+
{/* those images under the CC 3.0 BY license: */}
16+
17+
{/* * <u>reference.svg</u>: made by [Freepik](https://www.freepik.com). */}
18+
{/* * <u>cupcake.svg</u>: made by [Freepik](https://www.freepik.com). */}
19+
{/* * <u>lego.svg</u>: made by [Freepik](https://www.freepik.com). */}
20+
{/* * <u>performance.svg</u>: made by [Freepik](https://www.freepik.com). */}
21+
{/* * <u>camera.svg</u>: made by [Madebyoliver](https://www.flaticon.com/authors/madebyoliver). */}
22+
{/* * <u>rotation.svg</u>: made by [Madebyoliver](https://www.flaticon.com/authors/madebyoliver). */}
23+
{/* * <u>genericity.svg</u>: made by [Freepik](https://www.freepik.com). */}
24+
{/* * <u>cpu.svg</u>: made by [Freepik](https://www.freepik.com). */}
25+
{/* * <u>decomposition.svg</u>: made by [Vaadin](https://www.flaticon.com/authors/vaadin). */}

community/support.mdx

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
id: support
3+
title: Support
4+
sidebar_label: Support
5+
slug: /
6+
---
7+
8+
**wgmath** is primarily being maintained and developed by [Dimforge](https://dimforge.com),
9+
and welcomes contributions from the community. In this page you will see various ways of getting
10+
help and contributing.
11+
12+
## Let's talk
13+
You are encouraged to join us on our [Discord server](https://discord.gg/vt9DJSW)! We are
14+
always happy to help, and sometimes a single question there could save you loads of time
15+
skimming through the documentation.
16+
17+
## Working on this website
18+
19+
You can contribute to this website by completing, improving, and correcting
20+
it. Do not hesitate to correct even the smallest, insignificant detail
21+
(especially English mistakes, including typography). We love nitpicking! This
22+
website is composed of a set of markdown files located on the
23+
[wgmath](https://github.com/dimforge/wgmath) repository. It is compiled using
24+
[Docusaurus 2](https://v2.docusaurus.io). As explained in the next section,
25+
you need to fork, fix, and create a pull request targeting the **main**
26+
branch of the **wgmath** repository to make your contribution ready
27+
to integrate into our code base.
28+
29+
## Working on the library
30+
31+
If you intend to work on the source code of **wgmath**, you should start by
32+
[forking](https://help.github.com/articles/fork-a-repo) the
33+
[repository](https://github.com/dimforge/wgmath). Once you are done making
34+
modifications to your own copy of **wgmath**, you have to [create a pull
35+
request](https://help.github.com/articles/creating-a-pull-request) targeting
36+
the **main** branch so that your contribution can be reviewed, commented, and
37+
eventually merged.

copy_demos.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
3+
cd ~/work/wgsparkl
4+
./build_wasm.sh
5+
cd ~/work/wgmath/website
6+
cp -r ~/work/wgsparkl/dist2d/* static/demos/wgsparkl2d
7+
cp -r ~/work/wgsparkl/dist3d/* static/demos/wgsparkl3d

copy_docs.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /bin/sh
2+
3+
cd ~/work/shader_docs
4+
cargo run -p makewgmath --release
5+
cd ~/work/wgmath/website
6+
cp -r ~/work/shader_docs/target/shader_docs/* static/api_docs/.

docs/about_wgmath.mdx

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
id: about_wgmath
3+
title: About wgmath
4+
sidebar_label: About wgmath
5+
slug: /
6+
---
7+
8+
import Tabs from '@theme/Tabs';
9+
import TabItem from '@theme/TabItem';
10+
11+
**wgmath** is a set of [Rust](https://www.rust-lang.org/) libraries exposing re-usable GPU shaders for scientific computing including:
12+
- Linear algebra.
13+
- AI (Large Language Models).
14+
- Collision-detection.
15+
- Rigid-body physics.
16+
- Non-rigid physics.
17+
By targeting WebGPU, these libraries run on most GPUs, including on mobile and on the web. It aims to promote open and
18+
cross-platform GPU computing for scientific applications, a field currently strongly dominated by proprietary solutions
19+
(like CUDA).
20+
21+
All of the libraries are still under heavy development and might be lacking some important features. Contributions are
22+
welcome!
23+
24+
The **wgcore** crate part of the **wgmath** ecosystem exposes a set of proc-macros to facilitate sharing and composing
25+
shaders across Rust libraries.
26+
27+
**wgmath** is developed by the [Dimforge](https://dimforge.com) open-source company. You can support us by sponsoring us
28+
on [GitHub sponsor](https://github.com/sponsors/dimforge).
29+
30+
![dimforge_logo](https://www.dimforge.com/img/logo/logo_dimforge_full)

docs/api/api_wgblas.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
id: "wgblas-api-doc"
3+
title: "wgblas shader documentation"
4+
sidebar_label: "wgblas"
5+
---
6+
7+
<iframe width="1000px" height="1000px" src="/api_docs/wgblas/latest/wgblas/index.html"></iframe>

docs/api/api_wgebra.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
id: "wgebra-api-doc"
3+
title: "wgebra shader documentation"
4+
sidebar_label: "wgebra"
5+
---
6+
7+
<iframe width="1000px" height="1000px" src="/api_docs/wgebra/latest/wgebra/index.html"></iframe>

docs/api/api_wgparry2d.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
id: "wgparry2d-api-doc"
3+
title: "wgparry2d shader documentation"
4+
sidebar_label: "wgparry2d"
5+
---
6+
7+
<iframe width="1000px" height="1000px" src="/api_docs/wgparry2d/latest/wgparry2d/index.html"></iframe>

docs/api/api_wgparry3d.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
id: "wgparry3d-api-doc"
3+
title: "wgparry3d shader documentation"
4+
sidebar_label: "wgparry3d"
5+
---
6+
7+
<iframe width="1000px" height="1000px" src="/api_docs/wgparry3d/latest/wgparry3d/index.html"></iframe>

docs/api/api_wgrapier2d.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
id: "wgrapier2d-api-doc"
3+
title: "wgrapier2d shader documentation"
4+
sidebar_label: "wgrapier2d"
5+
---
6+
7+
<iframe width="1000px" height="1000px" src="/api_docs/wgrapier2d/latest/wgrapier2d/index.html"></iframe>

docs/api/api_wgrapier3d.mdx

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
id: "wgrapier3d-api-doc"
3+
title: "wgrapier3d shader documentation"
4+
sidebar_label: "wgrapier3d"
5+
---
6+
7+
<iframe width="1000px" height="1000px" src="/api_docs/wgrapier3d/latest/wgrapier3d/index.html"></iframe>

0 commit comments

Comments
 (0)