Skip to content

Instantly share code, notes, and snippets.

View alec-deason's full-sized avatar

Alec Deason alec-deason

View GitHub Profile
mkdir "raw_assets/$1"
for i in {1..160}
do
gphoto2 --capture-image-and-download --filename "raw_assets/$1/$(printf "%03d" $i).jpg"
read -s
done
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
use std::collections::{HashMap, HashSet};
use bevy::{
prelude::*,
reflect::TypeUuid,
core::FloatOrd,
render::{
camera::{VisibleEntities, VisibleEntity},
stage::DRAW,
draw::{DrawContext, Drawable, DrawError},
pipeline::{
@alec-deason
alec-deason / gist:db4e856d83aacdcc8668b64852132aa6
Created December 22, 2020 01:21
bevy -> itch release workflow
name: build releases
on:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
include:
@alec-deason
alec-deason / main.rs
Created November 14, 2020 00:36
tile map experiment
use bevy::{
prelude::*,
asset::LoadState,
sprite::{TextureAtlasBuilder, node},
render::{
mesh::{shape, VertexAttributeValues, Indices},
pipeline::{PipelineDescriptor, RenderPipeline, PrimitiveTopology},
render_graph::{base, AssetRenderResourcesNode, RenderGraph},
renderer::RenderResources,
shader::{ShaderStage, ShaderStages},
@alec-deason
alec-deason / example.rs
Created August 2, 2020 22:02
Example of unexpected cropping when using draw_image
// pathfinder/examples/canvas_minimal/src/main.rs
//
// Copyright © 2019 The Pathfinder Project Developers.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
@alec-deason
alec-deason / example.rs
Created July 29, 2020 20:15
Example showing problem rendering paths that overlap the viewport edge
// pathfinder/examples/canvas_minimal/src/main.rs
//
// Copyright © 2019 The Pathfinder Project Developers.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
@alec-deason
alec-deason / example.rs
Created July 27, 2020 03:44
Code to reproduce unreachable! error
use rstar::{Point, RTree};
fn main() {
let bulk_nodes = vec![
[570.0, 1080.0, 89.0],
[30.0, 1080.0, 627.0],
[1916.0, 1080.0, 68.0],
[274.0, 1080.0, 790.0],
[476.0, 1080.0, 895.0],
[1557.0, 1080.0, 250.0],
[1546.0, 1080.0, 883.0],
@alec-deason
alec-deason / path_artifacts.rs
Last active July 18, 2020 19:21
Hacked version of canvas_minimal to demonstrate an artifact when rendering overlapping paths
//pathfinder/examples/canvas_minimal/src/main.rs
//
// Copyright © 2019 The Pathfinder Project Developers.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.