build itchio wasm script

This commit is contained in:
Pascal Engélibert 2022-08-27 18:56:54 +02:00
parent eabc979fe9
commit 1a30718c9d
Signed by: tuxmain
GPG key ID: 3504BC6D362F7DCA
9 changed files with 63 additions and 28 deletions

40
Cargo.lock generated
View file

@ -923,26 +923,6 @@ dependencies = [
"winit",
]
[[package]]
name = "bevyjam"
version = "0.1.0"
dependencies = [
"bevy",
"bevy-inspector-egui",
"bevy_common_assets",
"bevy_mod_picking",
"bevy_rapier2d",
"cpal 0.14.0",
"crossbeam-channel",
"hexodsp",
"rand",
"rand_distr",
"rapier2d",
"serde",
"serde_json",
"ticktock",
]
[[package]]
name = "bindgen"
version = "0.59.2"
@ -2246,6 +2226,26 @@ dependencies = [
"cfg-if 1.0.0",
]
[[package]]
name = "lux-synthese"
version = "0.1.0"
dependencies = [
"bevy",
"bevy-inspector-egui",
"bevy_common_assets",
"bevy_mod_picking",
"bevy_rapier2d",
"cpal 0.14.0",
"crossbeam-channel",
"hexodsp",
"rand",
"rand_distr",
"rapier2d",
"serde",
"serde_json",
"ticktock",
]
[[package]]
name = "mach"
version = "0.3.2"

View file

@ -1,5 +1,5 @@
[package]
name = "bevyjam"
name = "lux-synthese"
version = "0.1.0"
authors = ["tuxmain <tuxmain@zettascript.org>"]
license = "AGPL-3.0-only"

View file

@ -1,4 +1,4 @@
# Bevyjam
# Lux synthesĕ
## Controls
@ -66,6 +66,6 @@ Edit the level `N: u32` with the command `bevyjam <N> e`.
GNU AGPL v3, CopyLeft 2022 Pascal Engélibert, Nixon Cheng
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see https://www.gnu.org/licenses/.
_Lux synthesĕ_ is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.
_Lux synthesĕ_ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with _Lux synthesĕ_. If not, see https://www.gnu.org/licenses/.

12
build-itchio.sh Normal file
View file

@ -0,0 +1,12 @@
sh build-wasm.sh || exit 1
mkdir -p target/itchio/wasm/target
mkdir -p target/itchio/wasm/assets
cp assets/* target/itchio/wasm/assets/
cp index.html target/itchio/wasm/
cp target/lux-synthese.js target/itchio/wasm/target/
cp target/lux-synthese_bg.wasm target/itchio/wasm/target/
cd target/itchio/wasm
zip -r ../wasm.zip .

View file

@ -1,3 +1,3 @@
cargo build --release --target wasm32-unknown-unknown || exit 1
echo "==> wasm-bindgen..."
wasm-bindgen --out-name bevyjam --out-dir target --target web target/wasm32-unknown-unknown/release/bevyjam.wasm || exit 1
wasm-bindgen --out-name lux-synthese --out-dir target --target web target/wasm32-unknown-unknown/release/lux-synthese.wasm || exit 1

BIN
cover.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
cover.xcf Normal file

Binary file not shown.

View file

@ -2,12 +2,35 @@
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Bevyjam</title>
<title>Lux synthesĕ</title>
</head>
<body>
<script type="module">
import init from './target/bevyjam.js'
init()
</script>
<div>
<h1>Lux synthesĕ</h1>
<p>
<strong>Note</strong>: audio does not work in the WASM build.
</p>
<h2>Controls</h2>
<ul>
<li><strong>Move</strong>: Arrows</li>
<li><strong>Switch</strong>: Tab</li>
<li><strong>Level up</strong>: Enter</li>
<li><strong>Reset</strong>: R</li>
</ul>
<h2>Source</h2>
<p>
The source code of this free software is available in our <a href="https://git.txmn.tk/tuxmain/bevyjam/">Git repository</a>.
</p>
<p>
GNU AGPL v3: CopyLeft 2022 Pascal Engélibert, Nixon Cheng<br/>
<em>Lux synthesĕ</em> is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3 of the License.<br/>
<em>Lux synthesĕ</em> is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.<br/>
You should have received a copy of the GNU Affero General Public License along with <em>Lux synthesĕ</em>. If not, see <a href="https://www.gnu.org/licenses/">https://www.gnu.org/licenses/</a>.
</p>
</div>
</body>
</html>

View file

@ -39,7 +39,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
commands
.spawn_bundle(Text2dBundle {
text: Text::from_section(
"BEVYJAM",
"Lux synthesĕ",
TextStyle {
font: font.clone(),
font_size: 96.0,