From b66c3ceb0ee39374ff1759ffb1b5bee2e4b93e99 Mon Sep 17 00:00:00 2001 From: Alex Habich Date: Fri, 17 Jan 2025 10:20:14 +0900 Subject: [PATCH] Add external assets to .gitignore (#17388) Added an external assets section to .gitignore. This prevents contributors from accidentally adding or committing them. I believe currently the only externel asset is the meshlet bunny. --- Cargo.toml | 7 ++++++- assets/external/.gitignore | 2 ++ examples/3d/meshlet.rs | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 assets/external/.gitignore diff --git a/Cargo.toml b/Cargo.toml index d491ab22448e9..fe1695c58f936 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1249,10 +1249,15 @@ description = "Meshlet rendering for dense high-poly scenes (experimental)" category = "3D Rendering" wasm = false setup = [ + [ + "mkdir", + "-p", + "assets/external/models", + ], [ "curl", "-o", - "assets/models/bunny.meshlet_mesh", + "assets/external/models/bunny.meshlet_mesh", "https://raw.githubusercontent.com/JMS55/bevy_meshlet_asset/7a7c14138021f63904b584d5f7b73b695c7f4bbf/bunny.meshlet_mesh", ], ] diff --git a/assets/external/.gitignore b/assets/external/.gitignore new file mode 100644 index 0000000000000..d6b7ef32c8478 --- /dev/null +++ b/assets/external/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/examples/3d/meshlet.rs b/examples/3d/meshlet.rs index 5db69a4a7995a..0bab7d750198c 100644 --- a/examples/3d/meshlet.rs +++ b/examples/3d/meshlet.rs @@ -20,8 +20,8 @@ const ASSET_URL: &str = "https://raw.githubusercontent.com/JMS55/bevy_meshlet_asset/7a7c14138021f63904b584d5f7b73b695c7f4bbf/bunny.meshlet_mesh"; fn main() -> ExitCode { - if !Path::new("./assets/models/bunny.meshlet_mesh").exists() { - eprintln!("ERROR: Asset at path /assets/models/bunny.meshlet_mesh is missing. Please download it from {ASSET_URL}"); + if !Path::new("./assets/external/models/bunny.meshlet_mesh").exists() { + eprintln!("ERROR: Asset at path /assets/external/models/bunny.meshlet_mesh is missing. Please download it from {ASSET_URL}"); return ExitCode::FAILURE; } @@ -80,7 +80,7 @@ fn setup( // that has been converted to a [`bevy_pbr::meshlet::MeshletMesh`] // using [`bevy_pbr::meshlet::MeshletMesh::from_mesh`], which is // a function only available when the `meshlet_processor` cargo feature is enabled. - let meshlet_mesh_handle = asset_server.load("models/bunny.meshlet_mesh"); + let meshlet_mesh_handle = asset_server.load("external/models/bunny.meshlet_mesh"); let debug_material = debug_materials.add(MeshletDebugMaterial::default()); for x in -2..=2 {