I mean the intro part works...

Outro does not...
main
Elijah C. Voigt 2 years ago
parent eb698b0316
commit 595076607e

BIN
assets/models/Martian Chess.glb (Stored with Git LFS)

Binary file not shown.

@ -239,7 +239,7 @@ fn initialize(mut commands: Commands, board: Res<game::Board>, assets: Res<Asset
SceneBundle { ..default() },
TitleText,
Dissolvable {
start: 0.0,
start: 1.0,
duration: 3.0,
}, // Marks title text as dissolving
));
@ -1189,7 +1189,7 @@ impl MaterialExtension for DissolveExtension {
/// Sets up all pieces to have an associated "dissolve" material ready for capture
fn setup_dissolve_materials(
// All entities with materials are candidates for this procedure
events: Query<(Entity, &Handle<StandardMaterial>), Added<Handle<StandardMaterial>>>,
events: Query<(Entity, &Handle<StandardMaterial>, Option<&Name>), Added<Handle<StandardMaterial>>>,
// Only process newly created pieces (we do not delete pieces at runtime)
query: Query<Entity, (With<Dissolvable>, Added<Children>)>,
// Children of pieces are the actual meshes that need materials
@ -1204,10 +1204,10 @@ fn setup_dissolve_materials(
events
.iter()
// Only process if this is a child of a piece
.filter(|(child, _)| query.iter_many(parents.iter_ancestors(*child)).count() > 0)
.filter(|(child, _, _)| query.iter_many(parents.iter_ancestors(*child)).count() > 0)
// Handle this entity (mesh)
.for_each(|(child, std_handle)| {
info!("Setting up dissolve material for {:?}", child);
.for_each(|(child, std_handle, name)| {
info!("Setting up dissolve material for {:?} {:?}", name, child);
// Extension we will add to existing gltf-sourced materials
let extension = DissolveExtension { percentage: 1.0 };
@ -1217,9 +1217,9 @@ fn setup_dissolve_materials(
.expect("Resolve material data")
.clone();
base.alpha_mode = AlphaMode::Mask(0.5);
base.alpha_mode = AlphaMode::Mask(0.1);
base.base_color = Color::NONE.with_a(0.0);
info!("Base material {:#?}", base);
debug!("Base material {:#?}", base);
let dis_handle = dissolve_materials.add(ExtendedMaterial { base, extension });

Loading…
Cancel
Save