Skip to content

Commit 09a2c6c

Browse files
committed
force the vulkan renderer to try to make windows work.
also new colors
1 parent 713ff92 commit 09a2c6c

File tree

3 files changed

+18
-14
lines changed

3 files changed

+18
-14
lines changed

.github/workflows/web.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ jobs:
3838

3939
- name: Build
4040
run: |
41-
sudo apt install -y sccache
4241
cd crates/fluidsim
4342
wasm-pack build --target web --release --locked
4443
mv pkg ../..
4544
cd ../..
45+
env:
46+
RUSTC_WRAPPER: ""
4647

4748
- name: Move files around
4849
run: |

crates/fluidsim/src/renderer/wgpu_state.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ impl WgpuState {
2323
pub async fn init(&mut self, window: Window, window_size: Vec2) -> Result<(), RendererError> {
2424
info!("Initializing renderer");
2525

26-
let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor::from_env_or_default());
26+
let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor {
27+
backends: wgpu::Backends::VULKAN,
28+
..wgpu::InstanceDescriptor::from_env_or_default()
29+
});
2730

2831
let window = Arc::new(window);
2932

crates/physics/src/gradient.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,18 @@ pub fn sample<const N: usize>(g: LinearGradient<N>, t: f32) -> Vec4 {
3939
}
4040
}
4141

42-
pub const VELOCITY: LinearGradient<4> = LinearGradient {
43-
frame_positions: [0.062, 0.48, 0.65, 1.0],
44-
frame_colors: [
45-
vec4(27., 71., 162., 255.),
46-
vec4(81., 252., 147., 255.),
47-
vec4(252., 237., 6., 255.),
48-
vec4(239., 74., 12., 255.),
49-
],
50-
};
51-
52-
pub const VELOCITY2: LinearGradient<5> = LinearGradient {
53-
frame_positions: [0.10, 0.30, 0.65, 0.80, 1.0],
42+
// pub const VELOCITY: LinearGradient<4> = LinearGradient {
43+
// frame_positions: [0.062, 0.48, 0.65, 1.0],
44+
// frame_colors: [
45+
// vec4(27., 71., 162., 255.),
46+
// vec4(81., 252., 147., 255.),
47+
// vec4(252., 237., 6., 255.),
48+
// vec4(239., 74., 12., 255.),
49+
// ],
50+
// };
51+
52+
pub const VELOCITY: LinearGradient<5> = LinearGradient {
53+
frame_positions: [0.10, 0.25, 0.50, 0.75, 1.0],
5454
frame_colors: [
5555
vec4(60., 10., 99., 255.),
5656
vec4(127., 31., 105., 255.),

0 commit comments

Comments
 (0)