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 discord | |
from discord.ext import commands | |
from threading import Thread | |
import asyncio | |
import sys | |
import traceback | |
import datetime | |
TOKEN = '' | |
# Expects the following to contain IDs pulled from discord |
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 super::states; | |
use bevy::{prelude::*, ecs::{Schedule, ThreadLocalExecution, SystemId, TypeAccess, ArchetypeAccess, ParallelExecutor}}; | |
use std::borrow::Cow; | |
pub struct GamePlugin; | |
impl Plugin for GamePlugin { | |
fn build(&self, app: &mut AppBuilder) { | |
app | |
.add_resource(GameState::Stage1(SubState::Done)) |
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 colored::*; | |
use log::*; | |
use std::{fs, thread::ThreadId}; | |
/// Please ignore the evil that is parsing debug output | |
fn parse_thread_id(id: &ThreadId) -> String { | |
let id_str = format!("{:?}", id); | |
let parsed = (|| { | |
let start_idx = id_str.find('(')?; |
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::*, asset::LoadState}; | |
fn main() { | |
App::build() | |
.add_resource(GameState::Loading) | |
.add_resource(PendingAssets(Vec::new())) | |
.add_plugins(DefaultPlugins) | |
.add_startup_system(load_some_assets.system()) | |
.add_system(loading.system()) | |
.add_system(loaded.system()) |
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::*; | |
use bevy::{input::keyboard::KeyboardInput, prelude::*}; | |
use bevy::winit::WinitWindows; | |
use winit::platform::windows::WindowExtWindows; | |
use bevy::window::WindowCreated; | |
use bevy::app::{Events, ManualEventReader}; | |
use winapi::{ | |
DEFINE_GUID, | |
ctypes::c_void, | |
shared::{ |
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
<template> | |
<header class="titlebar"> | |
<div class="spacer"> | |
<div :class="maximized ? 'drag drag-max' : 'drag drag-min'"/> | |
</div> | |
<div class="system-bar"> | |
<button class="sys-btn" @click.stop="onMinimize()"> | |
<img src="/caption-buttons.svg#minimize"> | |
</button> | |
<button class="sys-btn" @click.stop="onMaximize()"> |
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::*; | |
use bevy_inspector_egui::quick::WorldInspectorPlugin; | |
use std::{env, fs}; | |
use std::path::Path; | |
fn main() { | |
App::new() | |
.add_plugin(DevAssetPlugin::default()) | |
.add_plugins(DefaultPlugins) | |
.add_plugin(WorldInspectorPlugin::new()) |
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 chrono::{NaiveDate, NaiveDateTime}; | |
use serde::{Deserialize, Serialize}; | |
use tsync::tsync; | |
fn main() { | |
let msg = serde_json::to_string(&Message::Response(Response { | |
id: "Foo".into(), | |
result: NaiveDate::from_ymd(2016, 7, 8).and_hms(9, 10, 11), | |
})).unwrap(); |
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
//! A shader that uses "shaders defs", which selectively toggle parts of a shader. | |
use std::time::Duration; | |
use bevy::{ | |
pbr::{MaterialPipeline, MaterialPipelineKey}, | |
prelude::*, | |
reflect::{TypePath, TypeUuid}, | |
render::{ | |
mesh::MeshVertexBufferLayout, | |
render_resource::{ |
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
<!-- Avilable under MIT, Apache-2.0, The Unlicense, or the WTFPL at your choice --> | |
<svg class="eye" class:eye-open={$is_connected} viewBox="0 -150 400 300" width="80" xmlns="http://www.w3.org/2000/svg"> | |
<g stroke-width="32" fill="none"> | |
<path d={top_path} stroke="currentColor"> | |
<animate bind:this={eyecon_close_top_anim} dur="0.2s" attributeName="d" from={top_path} to={path_closed} fill="freeze" begin="indefinite" /> | |
<animate bind:this={eyecon_open_top_anim} dur="0.2s" attributeName="d" from={path_closed} to={top_path} fill="freeze" begin="indefinite" /> | |
</path> | |
<path d={bottom_path} stroke="currentColor"> | |
<animate bind:this={eyecon_close_bottom_anim} dur="0.2s" attributeName="d" from={bottom_path} to={path_closed} fill="freeze" begin="indefinite" /> | |
<animate bind:this={eyecon_open_bottom_anim} dur="0.2s" attributeName="d" from={path_closed} to={bottom_path} fill="freeze" begin="indefinite" /> |
OlderNewer