Skip to content

Instantly share code, notes, and snippets.

View AGoblinKing's full-sized avatar
🐢
INFRASTRUCTURE

a Goblin King AGoblinKing

🐢
INFRASTRUCTURE
View GitHub Profile
@AGoblinKing
AGoblinKing / MurderMystery.lisp
Created September 30, 2021 19:04
When the electron build is taking too long at 2 am.
(Mystery
(Credits
(Author "a Goblin King")
(Email "[email protected]")
)
(Intro
(Thoughts MINE "I have wanted to write a murder mystery novel in LISP")
(Thoughts MINE "But where do you even start with that?")
)
(Chapter 1 "The Murder"
@AGoblinKing
AGoblinKing / magica.ts
Created July 29, 2021 06:14
MIT LICENSE - Magica Voxel file parser
// parse magica voxel files
const INT_SIZE = 4
export class MagickaVoxel {
view: DataView
xyzi: Uint8Array
rgba: Uint8Array
constructor(data: ArrayBufferLike) {
@AGoblinKing
AGoblinKing / stained_glass.frag
Created July 31, 2020 01:55
MIT sublicenses.
// The MIT License
// Copyright © 2017 Shuichi Hayashi
// License of original voronoi implementation (https://www.shadertoy.com/view/ldl3W8)
//
// The MIT License
// Copyright © 2013 Inigo Quilez
// 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 conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FO
export class Writable {
constructor(value) {
this.value = value;
this.callbacks = new Set();
}
subscribe(callback) {
this.callbacks.add(callback);
callback(this.value);
enum SPRITE {
BLANK, GROUND_LEAVES, GROUND_STONES, GROUND_STONES_TIGHT, GROUND_STONES_TIGHT_BIG, GROUND_GRASS, GROUND_GRASS_DENSE, GROUND_GRASS_HIGH, PATH_ROAD_NS, PATH_ROAD_SE, PATH_ROAD_NSE, PATH_ROAD_NSWE, PATH_ROAD_S, LINE_E, LINE_E_BUMP, LINE_SE, GROUND_BRICK, GROUND_PATTERN, WALL_STONE_NW, WALL_STONE_N, WALL_STONE_NE, LADDER_TOP, SPIKES, BOX_QUESTION, NPC_HOLY, NPC_BLANK, NPC_SPEAR, NPC_SWORD_BOARD, NPC_KNIGHT, NPC_KNIGHT_SPEAR, NPC_KNIGHT_BRUTE, NPC_KNIGHT_DARK,
NATURE_TREE, NATURE_TREE_RINGED, NATURE_TREE_SKINNY, NATURE_TREE_DOUBLE, NATURE_TREE_FAT, NATURE_TREE_CLASSIC, NATURE_CACTUS, NATURE_CACTUS_DOUBLE, PATH_ROAD_DIRT_NS, PATH_ROAD_DIRT_SE, PATH_ROAD_DIRT_NSE, PATH_ROAD_DIRT_NSWE, PATH_ROAD_DIRT_S, DOTS_CENTER, DOTS_NE, DOTS_NWE, DOTS_NSWE, FOOTSTEPS, WALL_STONE_W, WALL_STONE_CENTER, WALL_STONE_E, LADDER, PIPE, BOX_QUESTION_WHITE, NPC_STAFF, NPC_VILLAGER, NPC_WOMAN, NPC_DUDE, NPC_DUDE_BELT, NPC_DUDE_JACKET, NPC_HOOD, NPC_HOOD_STAFF,
NATURE_WEEDS, NATURE_WEEDS_BARBED, NATURE_VINE, NATURE_TREE_DOU
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>SVG Pattern</title>
<style>
body, window {
position: absolute;
left: 0;
right: 0;
const MAX_HP = 20;
const State = {
last: {
HP: MAX_HP,
action: "none"
}
};
const Utility = {
{
"rules": {
"align": [
true,
"parameters",
"statements"
],
"ban": false,
"class-name": true,
"comment-format": [
<a-spine src="spineboy.json" animation="walk">
<!-- vs -->
<a-entity spine="src: spineboy.json; animation: walk;"/>