Skip to content

Instantly share code, notes, and snippets.

// Author: Aaron Griffith
// License: MIT
const int count = 400;
uniform float seed; // = 0.0;
uniform vec4 background; // = vec4(0.0, 0.0, 0.0, 1.0)
uniform bool twopart; // = true;
// https://stackoverflow.com/a/4275343
pub static LITERAL: CanonicalHuffman<&'static [u8]> = unsafe {
CanonicalHuffman::new(
&[0, 0, 0, 0, 1, 11, 20, 21, 16, 7, 5, 10, 91, 74],
&[
0x20, 0x45, 0x61, 0x65, 0x69, 0x6c, 0x6e, 0x6f,
0x72, 0x73, 0x74, 0x75, 0x2d, 0x31, 0x41, 0x43,
0x44, 0x49, 0x4c, 0x4e, 0x4f, 0x52, 0x53, 0x54,
0x62, 0x63, 0x64, 0x66, 0x67, 0x68, 0x6d, 0x70,
0x0a, 0x0d, 0x28, 0x29, 0x2c, 0x2e, 0x30, 0x32,
0x33, 0x34, 0x35, 0x37, 0x38, 0x3d, 0x42, 0x46,
[
{
"index": 1,
"fade-flags": 0,
"looping": 1,
"global-volume": 155,
"u0": 0,
"u1": 0,
"sounds": [
{
{
"left": 124,
"top": 69,
"right": 608,
"bottom": 392,
"effect-speed": 15,
"u0": 163,
"u1": 0,
"u2": 4,
"u3": 0,
This file has been truncated, but you can view the full file.
{
"left": 124,
"top": 69,
"right": 608,
"bottom": 392,
"effect-speed": 15,
"u0": 163,
"u1": 0,
"u2": 4,
"u3": 0,
[
815,
4378,
30042,
4850,
29790,
29235,
5078,
5667,
5202,
[
{
"index": 1,
"movie-id": 123,
"code": 1,
"left": 60,
"top": 0,
"u0": [
0,
0,
[
{
"index": 1,
"sfxe-id": 77,
"u0": 0
},
{
"index": 2,
"sfxe-id": 78,
"u0": 0
[
{
"blst-id": 52,
"name-rec": 15,
"left": 0,
"top": 0,
"right": 608,
"bottom": 392,
"u0": 0,
"mouse-cursor": 3007,
import numpy
import itertools
class BinFunc:
"""Binary functions, represented as a truth table. This lets us
compare binary functions, and build sets of binary functions. Normal
Python functions don't let us do that.
"""
def __init__(self, table):