Skip to content

Instantly share code, notes, and snippets.

shader_type canvas_item;
uniform sampler2D spritesheet; // Should be a slice image as exported from Magica Voxel
uniform int slice_count = 1; // The number of slices
uniform vec2 camera_vec = vec2( 1., 1. ); // Recomend using (1,1) or (1,1.5)
uniform float camera_ang = 0.0; // change this to change the view angle of the object
uniform bool flip_stack_order = true;
const int MAX_SLICE_COUNT = 1000;
@greenfox1505
greenfox1505 / DisplayGridAngular.html
Last active August 2, 2017 21:13
A simple CSS DisplayGrid with angular test.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<style>
body { background: black;}
.GridTest {
display: grid;
grid-template-columns: repeat(1,1fr);
@greenfox1505
greenfox1505 / getQueryParams.js
Created August 26, 2015 16:43
Simple query parsing
function getQueryParams(qs) {
qs = qs.split('+').join(' ');
var params = {},
tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]);
}