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
| // ==UserScript== | |
| // @name Show Grubhub Delivery Fees | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Why on earth do I have to do this? I hate you. | |
| // @author You | |
| // @match https://www.grubhub.com/search* | |
| // @grant none | |
| // ==/UserScript== |
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
| [package] | |
| name = "drop_zone" | |
| version = "0.1.0" | |
| authors = ["David O'Connor <[email protected]>"] | |
| edition = "2018" | |
| [lib] | |
| crate-type = ["cdylib"] | |
| [dependencies] |
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
| //! Bevy 0.13 Typewriter Effect | |
| //! | |
| //! License: Apache-2.0 / MIT | |
| use bevy::prelude::*; | |
| const TEXT: &str = "This is some text that runs on for quite a while and occupies multiple lines. \ | |
| Let's add even more so we'll wrap onto a third line."; | |
| #[derive(Component)] |
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
| // License: Apache-2.0 / MIT | |
| use bevy::{prelude::*, sprite::MaterialMesh2dBundle}; | |
| fn main() { | |
| App::new() | |
| .insert_resource(ClearColor(Color::rgba(0.2, 0.2, 0.2, 1.0))) | |
| .add_plugins(DefaultPlugins) | |
| .add_startup_system(setup) | |
| .run(); |
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
| // License: Apache-2.0 / MIT | |
| use bevy::prelude::*; | |
| use bevy_asset_loader::prelude::*; | |
| fn main() { | |
| App::new() | |
| .add_loading_state( | |
| LoadingState::new(MyStates::AssetLoading) | |
| .continue_to_state(MyStates::Next) |
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
| // License: Apache-2.0 / MIT | |
| // Note: this is not a good strategy for performance if you need a lot of these things. | |
| // Consider using rotated sprites which Bevy is heavily optimized for, or its "line gizmos." | |
| use bevy::{ | |
| prelude::*, | |
| render::{mesh::Indices, render_resource::PrimitiveTopology}, | |
| sprite::MaterialMesh2dBundle, | |
| }; |
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
| #!/usr/bin/env zsh | |
| # TODO not sure why this doesn't work in bash | |
| if ! hash markdown-extract &> /dev/null | |
| then | |
| echo "markdown-extract required" | |
| echo "cargo install markdown-extract" | |
| exit 1 | |
| fi |
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::f32::consts::PI; | |
| use bevy::{pbr::NotShadowCaster, prelude::*}; | |
| #[derive(Component)] | |
| struct Movable; | |
| #[derive(Component)] | |
| struct Rotation { | |
| x: f32, | |
| y: f32, |
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 bevy::{prelude::*, sprite::MaterialMesh2dBundle}; | |
| #[derive(Resource)] | |
| struct AlphaMaterialHandle(Handle<ColorMaterial>); | |
| impl FromWorld for AlphaMaterialHandle { | |
| fn from_world(world: &mut World) -> Self { | |
| let mut materials = world.resource_mut::<Assets<ColorMaterial>>(); | |
| Self(materials.add(ColorMaterial::from(Color::PURPLE))) | |
| } | |
| } |
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 bevy::{ecs::world::Ref, pbr::CascadeShadowConfig, prelude::*}; | |
| use std::f32::consts::PI; | |
| #[derive(Component)] | |
| struct LightRotation { | |
| x: f32, | |
| y: f32, | |
| } | |
| #[derive(Resource, Clone)] | |
| struct ConfigParams { |
OlderNewer