From f2b904b5f913938674b25842514bb9d4299448bd Mon Sep 17 00:00:00 2001 From: numzero Date: Sat, 4 Jul 2026 22:45:54 +0300 Subject: [PATCH 1/3] replace README on morph --- init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.sh b/init.sh index 98a011b..c93c8b7 100755 --- a/init.sh +++ b/init.sh @@ -53,6 +53,9 @@ git remote remove origin # remove this script from the project (but keep on disk for now) git rm --cached init.sh +# replace the README with a stub +echo "# $name" >| README.md + # escape HTML special characters (&, <, and >), but also sed special characters (& again, \, and /) htmlname=$(echo -n "$name" | sed 's/&/\&/g; s//\>/g; s:[\\/&]:\\&:g') sed -i "s/PROJECT NAME/$htmlname/" ui/src/main_window.ui From 187019a318a0e1f14b199cce36225d68cc4408e0 Mon Sep 17 00:00:00 2001 From: numzero Date: Sun, 19 Jul 2026 21:42:05 +0300 Subject: [PATCH 2/3] use Default to avoid breaking fallback main --- src/lib.rs | 10 +++++++++- src/main.rs | 6 ++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2518f00..294edfd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,6 @@ use std::error::Error; -use glam::{UVec2, Vec4}; +use glam::{UVec2, Vec4, vec4}; const DEPTH_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Depth16Unorm; const OUTPUT_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Bgra8UnormSrgb; @@ -11,6 +11,14 @@ pub struct RedrawArgs { pub background: Vec4, } +impl Default for RedrawArgs { + fn default() -> Self { + Self { + background: vec4(0.05, 0.20, 0.85, 1.00), + } + } +} + pub struct Gpu { device: wgpu::Device, queue: wgpu::Queue, diff --git a/src/main.rs b/src/main.rs index aa0bec3..3021a6a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use PROJECT_NAME::{Core, RedrawArgs, init_gpu_inner}; -use glam::{uvec2, vec4}; +use glam::uvec2; use winit::{ application::ApplicationHandler, event::WindowEvent, @@ -36,9 +36,7 @@ impl MainWindow { WindowEvent::Resized(physical_size) => self .core .configure(uvec2(physical_size.width, physical_size.height)), - WindowEvent::RedrawRequested => self.core.redraw(&RedrawArgs { - background: vec4(0.05, 0.20, 0.85, 1.00), - }), + WindowEvent::RedrawRequested => self.core.redraw(&RedrawArgs::default()), _ => {} } } From 9a695c06b585f8939fdd248fa7694d5fa6e9d756 Mon Sep 17 00:00:00 2001 From: numzero Date: Tue, 4 Aug 2026 22:13:11 +0300 Subject: [PATCH 3/3] update Cargo.lock on morph --- init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.sh b/init.sh index c93c8b7..276fb13 100755 --- a/init.sh +++ b/init.sh @@ -75,4 +75,7 @@ grep -l -r PROJECT_NAME | xargs sed -i "s/PROJECT_NAME/$ident/g" pascal=$(echo -n $ident | LC_ALL=C tr '_' '\n' | LC_ALL=C awk -v FIELDWIDTHS='1 1000' -v ORS='' '{print toupper($1) $2}') grep -l -r PROJECTNAME | xargs sed -i "s/PROJECTNAME/$pascal/g" +# another hack, to update Cargo.lock +cargo tree >/dev/null + git commit -a -m "MORPH INTO: $name"