Skip to content

Instantly share code, notes, and snippets.

View Herschel's full-sized avatar
🤤

Mike Welsh Herschel

🤤
View GitHub Profile
@Herschel
Herschel / pixelfade.as
Created March 5, 2013 00:54
Retro dithered transition effect for ActionScript 2
// DITHERED FADER CODE
/* Usage:
f_FadeInit(pixelSize) - call at start of movie, pixelSize is size of pixels
f_FaderFunction(time, color, callback, extra);
f_FaderFunction can be f_FadeDissolve, f_FadeDither, f_FadeDitherGradient
time - Time the fade takes to complete
color - Color of the fade (0 to fade in)
extra - For gradient fades, determines the fade origon
@Herschel
Herschel / julia.pbk
Last active December 15, 2015 01:59
Julia fractal rendering with Adobe Pixel Bender
<languageVersion : 1.0;>
#define PI 3.1415926535897932384626433832795
kernel JuliaViewer
< namespace : "Newgrounds";
vendor : "Newgrounds";
version : 1;
description : "Julia Set Fractal Viewer";
>
@Herschel
Herschel / raytracer.pbk
Created March 17, 2013 23:33
Pixel Bender raytracing
<languageVersion : 1.0;>
#define PI 3.1415926535897932384626433832795
kernel RayTracer
< namespace : "Newgrounds";
vendor : "Newgrounds";
version : 1;
description : "Pixel Blender Raytracing";
>
@Herschel
Herschel / Haxe Format ABC example
Last active November 25, 2022 02:58
Example of using the Haxe format lib to parse and modify Flash ABC bytecode
package;
import haxe.io.Bytes;
import haxe.io.BytesInput;
import haxe.io.BytesOutput;
import haxe.Resource;
import format.abc.Data;
using Main;
class Main {
#![deny(unsafe_code)]
#![no_std]
extern crate aux5;
use aux5::prelude::*;
use aux5::{Delay, Direction, Leds};
fn main() {
let (mut delay, mut leds): (Delay, Leds) = aux5::init();
#[macro_use]
extern crate glium;
extern crate lyon;
use glium::glutin::dpi::LogicalSize;
use glium::Surface;
use lyon::math::*;
use lyon::path::PathEvent;
use lyon::tessellation;
@Herschel
Herschel / main.rs
Created December 26, 2019 20:56
Lyon new tessellator stack overflow
use lyon::tessellation::{
path::Path,
math::Point,
geometry_builder::{BuffersBuilder, FillVertexConstructor, VertexBuffers},
FillAttributes, FillOptions, FillTessellator,
};
fn main() {
let path = path();