feat: implement settings
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
use crate::log;
|
||||
|
||||
use super::{create_geometry_data, wrap_geometry_data};
|
||||
use glam::{Mat4, Quat, Vec3};
|
||||
|
||||
@ -65,9 +67,11 @@ pub fn extrude_path(input_path: &[i32], res_x: usize) -> Vec<i32> {
|
||||
let i_index_offset = index_offset + j * 6;
|
||||
let i_position_offset = position_offset + j;
|
||||
|
||||
log!("i: {}, j: {}, i_index_offset: {}, i_position_offset: {} res_x: {}", i, j, i_index_offset, i_position_offset,res_x);
|
||||
|
||||
if j == res_x - 1 {
|
||||
indices[i_index_offset ] = (i_position_offset + 1) as i32;
|
||||
indices[i_index_offset + 1] = (i_position_offset - res_x + 1) as i32;
|
||||
indices[i_index_offset + 1] = (i_position_offset + 1 - res_x) as i32;
|
||||
indices[i_index_offset + 2] = (i_position_offset) as i32;
|
||||
indices[i_index_offset + 3] = (i_position_offset) as i32;
|
||||
indices[i_index_offset + 4] = (i_position_offset + res_x) as i32;
|
||||
|
@ -7,6 +7,7 @@ pub use helpers::*;
|
||||
pub use tree::*;
|
||||
pub mod geometry;
|
||||
|
||||
#[cfg(debug_assertions)]
|
||||
#[macro_export]
|
||||
macro_rules! log {
|
||||
($($arg:tt)*) => {{
|
||||
@ -15,6 +16,14 @@ macro_rules! log {
|
||||
}}
|
||||
}
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
#[macro_export]
|
||||
macro_rules! log {
|
||||
($($arg:tt)*) => {{
|
||||
// This will expand to nothing in release builds
|
||||
}};
|
||||
}
|
||||
|
||||
pub fn set_panic_hook() {
|
||||
// When the `console_error_panic_hook` feature is enabled, we can call the
|
||||
// `set_panic_hook` function at least once during initialization, and then
|
||||
|
Reference in New Issue
Block a user