This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| public class JsonVariant { | |
| // Referent | |
| public JsonObject referent = null; | |
| // Floating point number | |
| public float number; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| // Xml element | |
| public class XmlElement { | |
| // Current XML tag | |
| public string tag; | |
| // Current XML body | |
| public string body; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| -- Animate.lua | |
| -- magicoal_nerb/poopbarrel :3 | |
| local AnimateScriptKeymap: {[string]: string} = { | |
| Climbing = "climb", | |
| Freefall = "fall", | |
| Running = "run", | |
| Jumping = "jump", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| local Queue = require("./Queue") | |
| local Octree = {} | |
| Octree.__index = Octree | |
| export type OctreeNode = { | |
| -- nodes expect 8 children if childIndex != 0 | |
| min: vector, | |
| max: vector, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| -- Buffer | |
| -- magicoal_nerb :P | |
| local Buffer = {} | |
| Buffer.__index = Buffer | |
| export type Buffer = typeof(setmetatable({} :: { | |
| data: buffer, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| -- BK trees are used for fast string lookup queries | |
| -- And yea u have to use levenshtein | |
| -- Basically, I just knocked down a few constants | |
| -- so it is marginally faster than most implementations. | |
| -- But, asymptotic performance is basically the same so yeah | |
| -- https://gist.github.com/magicoal-nerb/6c91120e671d557de59e6d87e6617868 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| -- yet another queue implementation :P | |
| -- magicoal_nerb | |
| local Queue = {} | |
| Queue.__index = Queue | |
| export type Queue<T> = typeof(setmetatable({} :: { | |
| data: { T }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| local Set = {} | |
| Set.__index = Set | |
| export type Set<T> = typeof(setmetatable({} :: { | |
| data: { [T]: boolean }, | |
| }, Set)) | |
| function Set.new() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| -- yet another bvh implementation :P | |
| -- magicoal_nerb | |
| local Queue = require("./Queue") | |
| local Bvh = {} | |
| Bvh.__index = Bvh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --!strict | |
| -- PriorityQueue.lua | |
| -- me when the queue is my priority | |
| -- also made with lectures from mit ocw | |
| -- magicoal_nerb/poopbarrel | |
| local PriorityQueue = {} | |
| PriorityQueue.__index = PriorityQueue |
NewerOlder