Skip to content

Instantly share code, notes, and snippets.

View 01010111's full-sized avatar
πŸ‘½
πŸ•Ή

Will Blanton 01010111

πŸ‘½
πŸ•Ή
View GitHub Profile
@torcado194
torcado194 / cleanEdge-shadertoy.glsl
Last active April 24, 2025 09:48
cleanEdge, a pixel art upscaling algorithm for clean rotations
/*** MIT LICENSE
Copyright (c) 2022 torcado
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
@zzox
zzox / midiToJSON.js
Last active December 10, 2023 01:25
Convert midi files outputted by ableton into a json file with time of every note
const { Midi } = require('@tonejs/midi')
const { readFileSync, writeFileSync } = require('fs')
const FILENAME = process.argv[2]
const BPM = process.argv[3]
const DIR_SPECIFIC = process.argv[4] === "true"
const MS_PER_MINUTE = 60000
const ABLETON_PPQ = 96
try {
@AustinEast
AustinEast / .FlxEcho.md
Last active March 19, 2021 19:58 — forked from 01010111/FlxEcho.hx
Quick Flixel <-> Echo integration

2021 Update - The code in this Gist has been compiled into a haxelib for a more convenient experience! Please upgrade as this Gist will no longer be updated! Check out the repo here: https://github.com/AustinEast/echo-flixel

Quick and easy integration of Echo Physics with Haxeflixel! To get started follow these steps:

  1. Copy the content from 01-Project.xml to your own Project.xml.
  2. Create a new directory named util in the root of source code directory.
  3. Create a new file named FlxEcho.hx in the util directory.
  4. Copy the content from 02-FlxEcho.hx into the FlxEcho.hx file.

After that, you're ready to go! Check out 03-PlayState.hx to see a simple example of how to use FlxEcho.

@AustinEast
AustinEast / Outline.hx
Last active January 2, 2023 09:41
HaxeFlixel Pixel-Perfect Outline Shader
import flixel.system.FlxAssets.FlxShader;
import flixel.util.FlxColor;
class Outline extends FlxShader
{
@:glFragmentSource('
#pragma header
uniform vec2 size;
uniform vec4 color;
@xem
xem / JSGameFramework2020.html
Last active November 11, 2023 19:53
JS game framework 2020
<body style=margin:0>
<canvas id=a>
<script>
// initialize 2D canvas (c)
// initialize game state (s)
// initialize keys states (u,r,d,l for directions, k for all the keyboard)
c=a.getContext`2d`,k=[u=r=d=l=s=0]
// (initialize your global variables here)
package fx;
class Dither extends flixel.system.FlxAssets.FlxShader
{
@:glFragmentSource('
#pragma header
const float scale = 2.0;
float checker(vec2 coord)
@MSGhero
MSGhero / SmartWordWrap.hx
Last active April 1, 2020 07:29
Layout-aware type text that word wraps without bumping words down
// just contains excerpts and comments
// does not work on Flash. Fine on Windows and HTML5 at least
// involves diving into OpenFL's private API, so no guarantees this will work forever. But it works now!
// probably errors if you start fiddling with the textfield, like setting formats or appendText()
// SmartWordWrap.hx
class SmartWordWrap extends openfl.text.TextField { // gotta extend TextField to have access to internals
var layoutGroups:openfl.Vector<openfl._internal.text.TextLayoutGroup> = new Vector(); // this will cache character information
-- A note about faking toruses:
-- Spheres under projection become circles.
-- If we treat a torus like a chain of overlapping spheres, then we can draw
-- it using just circfill :)
::_::
cls(1)
-- The camera rotation angle.
q=t()/6
@darmie
darmie / .hxcpp_config.xml
Last active December 18, 2024 19:28
HXCPP Cross Compile to Windows from Mac OSX
<!--
This file will get included twice - once at the beginning - once at the end.
The first time though, the "vars" section is parsed, and this is where you can
set variables to control the setup of the standard compilers and install paths etc.
The second time, the "exes" section is parsed, and you can modify the linkers/compilers
by adding flags to these executables.
@increpare
increpare / Input.hx
Last active October 21, 2020 01:44
dumb joypad\controller support for haxegon
package haxegon;
import lime.ui.GamepadButton;
import starling.events.*;
import openfl.ui.Keyboard;
import openfl.events.FocusEvent;
import lime.ui.Gamepad;
import lime.ui.GamepadButton;