Skip to content

Commit 136f052

Browse files
committed
chore: switch to published dependencies
1 parent e03100b commit 136f052

7 files changed

Lines changed: 60 additions & 46 deletions

File tree

.run/testbed2d.run.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
<option name="buildProfileId" value="release" />
44
<option name="command" value="run --example testbed2" />
55
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
6-
<envs>
7-
<env name="SLANG_DIR" value="$PROJECT_DIR$/..//slang" />
8-
</envs>
6+
<envs />
97
<option name="emulateTerminal" value="true" />
108
<option name="channel" value="DEFAULT" />
119
<option name="requiredFeatures" value="true" />

.run/testbed3d.run.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
<option name="buildProfileId" value="release" />
44
<option name="command" value="run --example testbed3" />
55
<option name="workingDirectory" value="file://$PROJECT_DIR$" />
6-
<envs>
7-
<env name="SLANG_DIR" value="$PROJECT_DIR$/..//slang" />
8-
</envs>
6+
<envs />
97
<option name="emulateTerminal" value="true" />
108
<option name="channel" value="DEFAULT" />
119
<option name="requiredFeatures" value="true" />

Cargo.toml

Lines changed: 9 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resolver = "2"
1010
[workspace.dependencies]
1111
nalgebra = { version = "0.34", features = ["convert-bytemuck"] }
1212
wgpu = { version = "26", features = ["naga-ir"] }
13-
encase = { version = "0.11", features = [ "nalgebra" ] }
13+
encase = "0.12"
1414
bytemuck = { version = "1", features = ["derive"] }
1515
async-channel = "2"
1616

@@ -24,42 +24,13 @@ rust.unexpected_cfgs = { level = "warn", check-cfg = [
2424

2525
[patch.crates-io]
2626
#shader-slang = { path = "../slang-rs" }
27-
slang-hal-derive = { path = "../slang-hal/crates/slang-hal-derive" }
28-
slang-hal = { path = "../slang-hal/crates/slang-hal" }
29-
minislang = { path = "../slang-hal/crates/minislang" }
30-
stensor = { path = "../stensor" }
31-
nexus2d = { path = "../nexus/crates/nexus2d" }
32-
nexus3d = { path = "../nexus/crates/nexus3d" }
33-
encase = { path = "../encase" }
34-
kiss3d = { path = "../kiss3d" }
35-
36-
#wgcore = { git = "https://github.com/dimforge/wgmath.git", rev = "6d17942bd841efdfcc696d8455b22be3a8ddfe8d" }
37-
#wgcore-derive = { git = "https://github.com/dimforge/wgmath.git", rev = "6d17942bd841efdfcc696d8455b22be3a8ddfe8d" }
38-
#wgebra = { git = "https://github.com/dimforge/wgmath.git", rev = "6d17942bd841efdfcc696d8455b22be3a8ddfe8d" }
39-
#nexus3d = { git = "https://github.com/dimforge/wgmath.git", rev = "6d17942bd841efdfcc696d8455b22be3a8ddfe8d" }
40-
#nexus2d = { git = "https://github.com/dimforge/wgmath.git", rev = "6d17942bd841efdfcc696d8455b22be3a8ddfe8d" }
41-
#nexus3d = { git = "https://github.com/dimforge/wgmath.git", rev = "6d17942bd841efdfcc696d8455b22be3a8ddfe8d" }
42-
#nexus2d = { git = "https://github.com/dimforge/wgmath.git", rev = "6d17942bd841efdfcc696d8455b22be3a8ddfe8d" }
43-
44-
#wgcore = { path = "../wgmath/crates/wgcore" }
45-
#wgcore-derive = { path = "../wgmath/crates/wgcore-derive" }
46-
#wgebra = { path = "../wgmath/crates/wgebra" }
47-
#nexus3d = { path = "../wgmath/crates/nexus/crates/impulse3d" }
48-
#impulse2d = { path = "../wgmath/crates/impulse/crates/impulse2d" }
49-
#impulse3d = { path = "../wgmath/crates/impulse/crates/impulse3d" }
50-
#impulse2d = { path = "../wgmath/crates/impulse/crates/impulse2d" }
51-
#
52-
#parry2d = { git = "https://github.com/dimforge/parry.git", rev = "407fb449504dde7ba0a3d80a8de7e37ac991a77a" }
53-
#parry3d = { git = "https://github.com/dimforge/parry.git", rev = "407fb449504dde7ba0a3d80a8de7e37ac991a77a" }
54-
#encase = { git = "https://github.com/sebcrozet/encase.git", rev = "6755c1414c225cbeac9fde1ff9394b70d3b05404" }
55-
##wgcore = { git = "https://github.com/dimforge/wgmath.git", rev = "95538845080ef8680cf9906f1949623e30be3495" }
56-
##wgcore-derive = { git = "https://github.com/dimforge/wgmath.git", rev = "95538845080ef8680cf9906f1949623e30be3495" }
57-
##wgebra = { git = "https://github.com/dimforge/wgmath.git", rev = "95538845080ef8680cf9906f1949623e30be3495" }
58-
##impulse3d = { git = "https://github.com/dimforge/wgmath.git", rev = "95538845080ef8680cf9906f1949623e30be3495" }
59-
##impulse2d = { git = "https://github.com/dimforge/wgmath.git", rev = "95538845080ef8680cf9906f1949623e30be3495" }
60-
##impulse3d = { git = "https://github.com/dimforge/wgmath.git", rev = "95538845080ef8680cf9906f1949623e30be3495" }
61-
##impulse2d = { git = "https://github.com/dimforge/wgmath.git", rev = "95538845080ef8680cf9906f1949623e30be3495" }
62-
#rapier3d = { git = "https://github.com/vrixyz/rapier.git", branch = "uber_physics_context" }
27+
#slang-hal-derive = { path = "../slang-hal/crates/slang-hal-derive" }
28+
#slang-hal = { path = "../slang-hal/crates/slang-hal" }
29+
#minislang = { path = "../slang-hal/crates/minislang" }
30+
#stensor = { path = "../stensor" }
31+
#nexus2d = { path = "../nexus/crates/nexus2d" }
32+
#nexus3d = { path = "../nexus/crates/nexus3d" }
33+
#nalgebra = { path = "../nalgebra" }
34+
#kiss3d = { path = "../kiss3d" }
6335

6436
[profile.release]
65-
opt-level = 'z'

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,11 @@
1616
Note that the variable must point to the root of the slang installation (i.e. the directory that contains `bin` and `lib`).
1717
3. For the 2D examples, run `cargo run --release --example testbed2`
1818
4. For the 3D examples, run `cargo run --release --example testbed3`
19+
20+
# Notable usages of MPM
21+
22+
This gives some insights of some interesting usages of MPM (the Material Point Method) for deformable physics
23+
simulation. Note that it doesn’t imply that **slosh** currently implements these models:
24+
- Animation: one very well-known usage of MPM is
25+
[snow simulation](https://www.disneyanimation.com/publications/a-material-point-method-for-snow-simulation/) by Pixar.
26+
- Engineering: blast movement simulation ([patented](https://patents.google.com/patent/WO2025136223A1)).

crates/slosh-testbed2d/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ slosh2d = { path = "../slosh2d" }
3535
futures = "0.3"
3636
regex = "1"
3737

38-
kiss3d = { version = "0.35", features = [ "vertex_index_u32" ] }
38+
kiss3d = { version = "0.36", features = [ "vertex_index_u32" ] }

crates/slosh-testbed3d/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ slosh3d = { path = "../slosh3d" }
3535
futures = "0.3"
3636
regex = "1"
3737

38-
kiss3d = { version = "0.35", features = [ "vertex_index_u32" ] }
38+
kiss3d = { version = "0.36", features = [ "vertex_index_u32" ] }

publish.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#! /bin/bash
2+
3+
tmp=`mktemp -d`
4+
5+
echo $tmp
6+
7+
cp -r crates $tmp/.
8+
cp Cargo.toml $tmp/.
9+
10+
cp -r src $tmp/crates/slosh2d/.
11+
cp -r LICENSE $tmp/crates/slosh2d/.
12+
cp -r README.md $tmp/crates/slosh2d/.
13+
cp -r shaders $tmp/crates/slosh2d/.
14+
15+
cp -r src $tmp/crates/slosh3d/.
16+
cp -r LICENSE $tmp/crates/slosh3d/.
17+
cp -r README.md $tmp/crates/slosh3d/.
18+
cp -r shaders $tmp/crates/slosh3d/.
19+
20+
# Publish slosh2d
21+
cd $tmp/crates/slosh2d
22+
ls
23+
sed 's#\.\./\.\./src#src#g' ./Cargo.toml > ./Cargo.toml.new
24+
mv Cargo.toml.new Cargo.toml
25+
sed 's#\.\./\.\./shaders#shaders#g' ./src/lib.rs > ./src/lib.rs.new
26+
mv src/lib.rs.new src/lib.rs
27+
cargo publish
28+
29+
# Publish slosh3d
30+
cd ../slosh3d
31+
sed 's#\.\./\.\./src#src#g' ./Cargo.toml > ./Cargo.toml.new
32+
mv Cargo.toml.new Cargo.toml
33+
sed 's#\.\./\.\./shaders#shaders#g' ./src/lib.rs > ./src/lib.rs.new
34+
mv src/lib.rs.new src/lib.rs
35+
cargo publish
36+
37+
# Cleanup
38+
rm -rf $tmp
39+

0 commit comments

Comments
 (0)