mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Format code
This commit is contained in:
parent
70a4e6dae0
commit
ad8260999a
@ -1,7 +1,7 @@
|
|||||||
|
use console_error_panic_hook;
|
||||||
use std::cell::RefCell;
|
use std::cell::RefCell;
|
||||||
use std::panic;
|
use std::panic;
|
||||||
use std::rc::Rc;
|
use std::rc::Rc;
|
||||||
use console_error_panic_hook;
|
|
||||||
|
|
||||||
use js_sys::Array;
|
use js_sys::Array;
|
||||||
use log::{info, warn, Level};
|
use log::{info, warn, Level};
|
||||||
|
|||||||
@ -75,17 +75,21 @@ pub struct MaskInstanceUniform {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl 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 {
|
Self {
|
||||||
position,
|
position,
|
||||||
target_width,
|
target_width,
|
||||||
target_height,
|
target_height,
|
||||||
debug_color
|
debug_color,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone, Pod, Zeroable)]
|
#[derive(Copy, Clone, Pod, Zeroable)]
|
||||||
pub struct PrimitiveUniform {
|
pub struct PrimitiveUniform {
|
||||||
|
|||||||
@ -163,7 +163,7 @@ pub mod tile_mask {
|
|||||||
// debug_color
|
// debug_color
|
||||||
wgpu::VertexAttribute {
|
wgpu::VertexAttribute {
|
||||||
offset: 1 * wgpu::VertexFormat::Float32x2.size()
|
offset: 1 * wgpu::VertexFormat::Float32x2.size()
|
||||||
+ 2* wgpu::VertexFormat::Float32.size(),
|
+ 2 * wgpu::VertexFormat::Float32.size(),
|
||||||
format: wgpu::VertexFormat::Float32x4,
|
format: wgpu::VertexFormat::Float32x4,
|
||||||
shader_location: 7,
|
shader_location: 7,
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user