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
--- Octree implementation | |
-- @classmod Octree | |
-- i see no god up here | |
-- EXCEPT FOR ME | |
local OctreeNode = require(script.OctreeNode) | |
local OctreeRegionUtils = require(script.OctreeRegionUtils) | |
local EPSILON = 1e-9 |
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
return function() | |
local JanitorThread = require(script.Parent) | |
describe("janitr", function() | |
it("should be cool", function() | |
local Janitor = JanitorThread.new() | |
Janitor:Add(Instance.new("Part"), "Destroy", "Part").Parent = workspace | |
local c = Janitor:Add(workspace.ChildAdded:Connect(print), "Disconnect") | |
expect(typeof(Janitor:Get("Part"))).to.equal("Instance") |
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
--[[ | |
class Spring | |
Description: | |
A physical model of a spring, useful in many applications. Properties only evaluate | |
upon index making this model good for lazy applications | |
API: | |
Spring = Spring.new(number position) | |
Creates a new spring in 1D |
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
local ENABLE_TRACEBACK = true | |
local FastSignal = {ClassName = "FastSignal"} | |
FastSignal.__index = FastSignal | |
--[[** | |
Creates a new FastSignal object. | |
@returns [FastSignal] | |
**--]] | |
function FastSignal.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
local Math = {} | |
function Math:__index(Index) | |
if Math[Index] then | |
return Math[Index] | |
end | |
end | |
function Math.new() | |
return setmetatable({}, Math) | |
end |
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
--!nocheck | |
-- Janitor | |
-- Original by Validark | |
-- Modifications by pobammer | |
-- roblox-ts support by OverHash and Validark | |
local RunService = game:GetService("RunService") | |
local Heartbeat = RunService.Heartbeat | |
local Janitors = setmetatable({}, {__mode = "k"}) |
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
local Players = game:GetService("Players") | |
local CollectionService = game:GetService("CollectionService") | |
local RunService = game:GetService("RunService") | |
local CatchFactory = require("CatchFactory") | |
local Constants = require("Constants") | |
local GroupPromise = require("GroupPromise") | |
local Promise = require("Promise") | |
local PromiseChild = require("PromiseChild") -- Basically Promisified WaitForChild |
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
local bit_lshift = require("bit").lshift | |
local math_floor = math.floor | |
local math_log = math.log | |
local SIZE_THRESHOLD = 16 | |
local function Partition(Array, Low, High, Value, Comparison) | |
if Comparison then | |
local Index = Low | |
local Jndex = High |
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
local function GetBoundingBox(model, orientation) | |
if typeof(model) == "Instance" then | |
model = model:GetDescendants() | |
end | |
if not orientation then | |
orientation = CFrame.new() | |
end | |
local inf = math.huge | |
local minx, miny, minz = inf, inf, inf |
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
local meth = {} | |
-- Go awat | |
function Math.Awesome() | |
return "awesome" | |
end | |
function Math.add1and 2() | |
return 1 + 2 | |
end |