Skip to content

Instantly share code, notes, and snippets.

Matt Rix MattRix

Block or report user

Report or block MattRix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MattRix
MattRix / DrawTile.html
Last active Nov 19, 2019
Simple tool to generate the uints necessary for u8x8 drawtile: https://github.com/olikraus/u8g2/wiki/u8x8reference#drawtile - jsfiddle version: https://jsfiddle.net/hongm3tu/3/
View DrawTile.html
<div id="main"></div>
<br/>
<button id="clear">Clear</button>
<button id="fill">Fill</button>
<button id="load">Load</button>
<br/>
<br/>
<textarea id="output"></textarea>
@MattRix
MattRix / avril14.ino
Created Nov 16, 2019
Avril 14 on the Arduino OPL2
View avril14.ino
#include <SPI.h>
#include <OPL2.h>
#include <midi_instruments.h>
OPL2 opl2;
float tempo = 80;
const int numParts = 3;
int bassNotes[] = {32,36,37,34};
@MattRix
MattRix / EditorZoomer.cs
Created Oct 27, 2019
EditorZoomer - an easy way to do panning and zooming inside Unity Editor IMGUI
View EditorZoomer.cs
using UnityEngine;
using System.Collections;
using System;
//based on the code in this post: http://martinecker.com/martincodes/unity-editor-window-zooming/
//but I changed how the API works and made it much more flexible
//usage: create an EditorZoomer instance wherever you want to use it (it tracks the pan + zoom state)
//in your OnGUI, draw your scrollable content between zoomer.Begin() and zoomer.End();
//you also must offset your content by zoomer.GetContentOffset();
@MattRix
MattRix / EditorZoomArea.cs
Last active Oct 25, 2019
Unity Editor Window Zooming (fixed version of code from http://martinecker.com/martincodes/unity-editor-window-zooming/)
View EditorZoomArea.cs
using UnityEngine;
// Helper Rect extension methods
public static class RectExtensions
{
public static Vector2 TopLeft(this Rect rect)
{
return new Vector2(rect.xMin, rect.yMin);
}
View BackwardEulerController.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BackwardEulerController : MonoBehaviour
{
public float gain = 200; //200-700;
public float damp = 20; //20-100;
public Transform target = null;
@MattRix
MattRix / EmoPacker.cs
Last active Jan 6, 2019
Packing a folder of images into a sprite atlas for use with TextMeshPro
View EmoPacker.cs
using System.IO;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Linq;
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
@MattRix
MattRix / FancyJonEffect.cs
Created Jun 2, 2018
Same as the other JonEffect but with multiple characters easing in at a time
View FancyJonEffect.cs
using UnityEngine;
using System.Collections;
using TMPro;
public class FancyJonEffect : MonoBehaviour
{
TextMeshProUGUI text;
[Range(0f,1f)]
public float buildInPercent = 0;
@MattRix
MattRix / JonEffect.cs
Created Jun 2, 2018
Thing that makes text scale in on the y-axis.
View JonEffect.cs
using UnityEngine;
using System.Collections;
using TMPro;
public class JonEffect : MonoBehaviour
{
TextMeshProUGUI text;
[Range(0f,1f)]
public float buildInPercent = 0;
View songs.tinybox
CANON: qfyBHædårXHes2PLgQāMwbf2uSa2eéadbgbeb4eaeim4jcLaGa2iai2jqdbgbdbdbgbdbéagbæaèa2bèa2bèa2bèa17bcdfghaeijklmnop16jezazazaza4caeim4jglblbgbgbsbs7bcgkoko6jedbéad3b4eaeim4jcIaDa2iai2jqåaéaéaéaéaáadbdbdbèaèaèaæaæaæaæa16babdfhicegkmojlnp16jezazazaza4caeim4jeububpbp5bcgko4jeéaåaéagb4eaeim4jcEaza2iai2jqâaXaáaæaáaæaáaæaáaéaéaéaåaåaåaåa16baijklmnopcegbdfh16jezazazaza4caeim4jgéaéaqbqblbl7bkocgko6jgåaéagbebd3b2e4caeikmo6jcEaGa2iai2jqâaåaéaåaéaåaéaåaæaèa2bèagbkbnbs16bcabcdefghijkplmno16jezazazaza4caeim4jeqbqbsbs5bcgko4j
BEAT: qdOczseyIåKeRgPVdJyAåeNèhtablibfbcbe3bDaBaAawayaua4db6haeimiai2a2i11jdCawaAah2balo3jacqbxbpiai2jbtb2ij
Full BEATSONG: qdOczseyIåKeRgPVdJyAåeNèhtaikibfbcbebDaBaAawayaua4d6haeimai2a2i10jdwaAaCa2bhloa3jacqbxbpiai2jbtb2ijkibfbcbebDaBaAawayaua4d6haeimai2a2i10jdwaAaCa2bhloa3jacqbxbpiai2jbtb2ijkibfbcbebDaBaAawayaua4d6haeimai2a2i10jdwaAaCa2bhloa3jacqbxbpiai2jbtb2ijezavahbjb2h2daiai4jiwaAaIaHaCaCaDaFa7bdlokoac2e8jbJahij2akibfbcbebDaBaAawayaua4d6haeimai2a2i10jdwaAaCa2bhloa3jacqbxbpiai2jbtb2ijkibfbcbebDaB
View messysong.tinybox
qdàpsåeãyxEaUèzādITEMcãvNncecibgb2dai2ji2bdbgbNaBbBbBbBb3mq4b4acgko8jiáaáaáaäaãaPaRaUa5c3qaeikm3a8jiNaNaNaNaZaZaZaZa8caeimcgko8j2ebebSaSa4caiai4jcibgb2dai2jiéa2bebLaBbBbBbBb3mq4b4acgko8jiZaZaZaXaWaSaUaåa5c3qaeikm3a8jiLaLaLaLaXaXaXaXa8caeimcgko8jcebeb2cai2jcibgb2dai2jikbhbebQaBbBbBbBb3mq4b4acgko8jkæaäaâaæaæaåaèad3bZa7c3qikmaceg3a10jiEaEaEaEaQaQaQaQa8caeimcgko8jgebebebebhbhb4c2baeimgo6jcibeb2dai2jigbPadbibBbBbBbBbmq2m4b4acgko8jkæaæaåaèaæaåa2bcbéaZa7c3qacegikm3a10jiGaGaGaGaPaPaPaPa8ceimacgko8jiebebebhbebebhbhb2c2b2c2baimkoecg8j
You can’t perform that action at this time.