This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Three JS scene component | |
const Scene = () => { | |
const camPositionKeyframes = new Map([ | |
[0, new Vector3(0,1000,0)], | |
[0.5, new Vector3(500,1000,-200)], | |
[1.0, new Vector3(1000,1000,400)], | |
[1.5, new Vector3(1500,1000,-800)], | |
]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import bevy_pbr::mesh_vertex_output MeshVertexOutput | |
#import bevy_pbr::mesh_view_bindings globals | |
#import silva::test test | |
struct SlashMaterial { | |
color: vec4<f32>, | |
spawn_time: f32, | |
} | |
@group(1) @binding(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct SnapshotInterpolationPlugin { | |
max_tick_rate: u16, | |
} | |
impl Plugin for SnapshotInterpolationPlugin { | |
fn build(&self, app: &mut App) { | |
app.replicate::<Interpolated>() | |
.insert_resource(InterpolationConfig { | |
max_tick_rate: self.max_tick_rate, | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fs; | |
fn find_common_types(input: String) -> Vec<char> { | |
return input | |
.lines() | |
.map(|line| line.trim()) | |
.map(|line| { | |
let compartment_1 = &line[0..line.len() / 2]; | |
let compartment_2 = &line[line.len() / 2..line.len()]; |