diff --git a/src/platform/web/mod.rs b/src/platform/web/mod.rs index ffbf8617..bf481392 100644 --- a/src/platform/web/mod.rs +++ b/src/platform/web/mod.rs @@ -1,7 +1,7 @@ +use console_error_panic_hook; use std::cell::RefCell; use std::panic; use std::rc::Rc; -use console_error_panic_hook; use js_sys::Array; use log::{info, warn, Level}; diff --git a/src/render/shader_ffi.rs b/src/render/shader_ffi.rs index 7d4b17f5..1bce17f7 100644 --- a/src/render/shader_ffi.rs +++ b/src/render/shader_ffi.rs @@ -75,17 +75,21 @@ pub struct MaskInstanceUniform { } impl MaskInstanceUniform { - pub fn new(position: Vec2f32, target_width: f32, target_height: f32, debug_color: Vec4f32) -> Self { + pub fn new( + position: Vec2f32, + target_width: f32, + target_height: f32, + debug_color: Vec4f32, + ) -> Self { Self { position, target_width, target_height, - debug_color + debug_color, } } } - #[repr(C)] #[derive(Copy, Clone, Pod, Zeroable)] pub struct PrimitiveUniform { diff --git a/src/render/shaders/mod.rs b/src/render/shaders/mod.rs index f16084cf..780697f1 100644 --- a/src/render/shaders/mod.rs +++ b/src/render/shaders/mod.rs @@ -163,7 +163,7 @@ pub mod tile_mask { // debug_color wgpu::VertexAttribute { offset: 1 * wgpu::VertexFormat::Float32x2.size() - + 2* wgpu::VertexFormat::Float32.size(), + + 2 * wgpu::VertexFormat::Float32.size(), format: wgpu::VertexFormat::Float32x4, shader_location: 7, },