repo
stringclasses
302 values
file_path
stringlengths
18
241
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
76
697k
tokens
int64
10
271k
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Components/Switch.luau
luau
.luau
--!strict --> Modules ------------------------------------------------------------------------------------------- local Modules = script.Parent.Parent.Modules local Component = require(Modules.Component) local ComputeTransforms = require(Modules.ComputeTransforms) local ForceToState = require(Modules.ForceToState) lo...
1,265
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Components/Tabs.luau
luau
.luau
--!strict --> Services ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------- --> Modules --------------------------------------------------------------------------------------...
1,585
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Components/TextInput.luau
luau
.luau
--!strict --> Services ------------------------------------------------------------------------------------------ local GuiService = game:GetService("GuiService") local UserInputService = game:GetService("UserInputService") ----------------------------------------------------------------------------------------------...
3,244
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Components/Widget.luau
luau
.luau
--!strict --> Services ------------------------------------------------------------------------------------------ local StarterGui = game:GetService("StarterGui") ------------------------------------------------------------------------------------------------------- --> Modules -------------------------------------...
741
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/LICENSE.luau
luau
.luau
--[[ MIT License Copyright (c) 2024 Cameron Campbell 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, pub...
222
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/CombineProps.luau
luau
.luau
--!strict --> Modules ------------------------------------------------------------------------------------------- local Packages = script.Parent.Parent.Packages local Fusion = require(Packages.Fusion) ------------------------------------------------------------------------------------------------------- --> Variabl...
231
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/Component/Component.Types.luau
luau
.luau
--> Modules ------------------------------------------------------------------------------------------- local Modules = script.Parent.Parent local RootEventHandlersUtils = require(Modules.RootEventHandlersUtils) local ThemeHandler = require(Modules.ThemeHandler) local Packages = script.Parent.Parent.Parent.Packages lo...
130
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/Component/init.luau
luau
.luau
--!strict --> Modules ------------------------------------------------------------------------------------------- local ComponentTypes = require(script["Component.Types"]) local Modules = script.Parent local CombineProps = require(Modules.CombineProps) local Packages = script.Parent.Parent.Packages local Fusion = r...
159
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/ComputeMath.luau
luau
.luau
--!strict --> Services ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------- --> Modules --------------------------------------------------------------------------------------...
735
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/ComputeTransforms.luau
luau
.luau
--!strict --> Services ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------- --> Modules --------------------------------------------------------------------------------------...
573
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/ForceToState.luau
luau
.luau
--!strict --> Modules ------------------------------------------------------------------------------------------- local Packages = script.Parent.Parent.Packages local Fusion = require(Packages.Fusion) ------------------------------------------------------------------------------------------------------- return func...
94
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/RootEventHandlersUtils.luau
luau
.luau
--!strict --> Services ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------- --> Modules --------------------------------------------------------------------------------------...
877
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/TableUtils.luau
luau
.luau
return { CountKeys = function(tble: { [any]: any }): number local length = 0 for _ in tble do length += 1 end return length end, HasItems = function(tble: { [any]: any }): boolean for _ in tble do return true end return false end, Take = function<K, V>(tble: { [K]: V }, keyOrIndex: K, default: V?) lo...
247
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/ThemeHandler/DefaultThemes.luau
luau
.luau
--> Modules ------------------------------------------------------------------------------------------- local Types = require(script.Parent["ThemeHandler.Types"]) ------------------------------------------------------------------------------------------------------- --> Types -----------------------------------------...
209
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/ThemeHandler/ThemeHandler.Types.luau
luau
.luau
export type ThemeConfig = { Background: { Primary: Color3, Secondary: Color3, Tertiary: Color3, Stroke: Color3 }, Text: { Title: Color3, Body: Color3 }, Accent: { Primary: Color3, Secondary: Color3, Destructive: Color3 } } export type ThemeFlatConfig = { ["Background...
255
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/ThemeHandler/init.luau
luau
.luau
--!strict --> Modules ------------------------------------------------------------------------------------------- local Types = require(script["ThemeHandler.Types"]) local DefaultThemes = require(script.DefaultThemes) local Packages = script.Parent.Parent.Packages local Fusion = require(Packages.Fusion) ------------...
871
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/ThemeHandlerOld.luau
luau
.luau
--!strict --> Services ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------- --> Modules --------------------------------------------------------------------------------------...
980
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/Modules/TrackProperty.luau
luau
.luau
--!strict --> Modules ------------------------------------------------------------------------------------------- local Packages = script.Parent.Parent.Packages local Fusion = require(Packages.Fusion) ------------------------------------------------------------------------------------------------------- --> Variabl...
357
cameronpcampbell/Ignite
cameronpcampbell-Ignite-61cf3cc/src/init.luau
luau
.luau
--!strict --> Services ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------- --> Modules --------------------------------------------------------------------------------------...
365
loneka/moonlets
loneka-moonlets-a2f46c2/modules/Bootloader/src/init.luau
luau
.luau
local STAGES = { "Created", "Initialized", "Started", "Destroyed", } local function NewBootloader(ModuleScripts: { ModuleScript }) local Bootloader = { Stage = STAGES[1], Systems = {}, } function Bootloader:Destroy() assert(Bootloader.Stage == STAGES[3], `Must be at stage {STAGES[3]}.`) Bootloader.Stag...
308
loneka/moonlets
loneka-moonlets-a2f46c2/modules/CoreThemer/src/init.luau
luau
.luau
local Players = game:GetService("Players") local StarterGui = game:GetService("StarterGui") local TextChatService = game:GetService("TextChatService") local MouseLockController = Players.LocalPlayer.PlayerScripts :WaitForChild("PlayerModule") :WaitForChild("CameraModule") :WaitForChild("MouseLockController") local...
1,352
loneka/moonlets
loneka-moonlets-a2f46c2/modules/EnumSerDes/src/init.luau
luau
.luau
export type SerEnumItem = { EnumType: string, Value: number, } local TableUtil = require(script.Parent.TableUtil) local EnumSerDes = {} function EnumSerDes.DeserializeTree(Tree) local NewTree = TableUtil.Copy(Tree, true) for Key, Value in pairs(Tree) do if typeof(Value) == "table" then if (typeof(Value.Enu...
393
loneka/moonlets
loneka-moonlets-a2f46c2/modules/Footstepper/src/DefaultSounds.luau
luau
.luau
return { Brick = { SoundId = "rbxassetid://16829037315", Volume = 0.4, }, Climb = { SoundId = "rbxassetid://145180175", Volume = 0.3, }, Cobblestone = { SoundId = "rbxassetid://16829037315", Volume = 0.4, }, Concrete = { SoundId = "rbxassetid://16829037315", Volume = 0.4, }, CorrodedMetal = { ...
1,147
loneka/moonlets
loneka-moonlets-a2f46c2/modules/Footstepper/src/init.luau
luau
.luau
local Players = game:GetService("Players") local DefaultSounds = require(script.DefaultSounds) local BLACKLISTEED_MATERIALS = { Enum.Material.Air, Enum.Material.Water } local Footstepper = { BaseVolume = 5, } function Footstepper:UpdateSounds(Sounds: { Sound }, SoundProperties: { [string]: any }) for _, Sound in ...
846
loneka/moonlets
loneka-moonlets-a2f46c2/modules/HumanoidDescriber/src/AvatarAssetTypes.luau
luau
.luau
local AvatarAssetTypes = { Types = { RigidAccessories = { Enum.AvatarAssetType.BackAccessory, Enum.AvatarAssetType.FaceAccessory, Enum.AvatarAssetType.HairAccessory, Enum.AvatarAssetType.NeckAccessory, Enum.AvatarAssetType.FrontAccessory, Enum.AvatarAssetType.WaistAccessory, Enum.AvatarAssetType...
808
loneka/moonlets
loneka-moonlets-a2f46c2/modules/HumanoidDescriber/src/init.luau
luau
.luau
local MarketplaceService = game:GetService("MarketplaceService") local Signal = require(script.Parent.Signal) local AvatarAssetTypes = require(script.AvatarAssetTypes) local AssetAccessoryTypes = require(script.AssetAccessoryTypes) local Future = require(script.Parent.Future) local TableUtil = require(script.Parent.Ta...
4,461
loneka/moonlets
loneka-moonlets-a2f46c2/modules/Instantiate/src/init.luau
luau
.luau
local function Instantiate(ClassOrInstance: string | Instance) local Object: Instance if typeof(ClassOrInstance) == "string" then Object = Instance.new(ClassOrInstance) elseif typeof(ClassOrInstance) == "Instance" then Object = ClassOrInstance end return function(Properties: { [string]: any | (typeof(Object)...
169
loneka/moonlets
loneka-moonlets-a2f46c2/modules/Leaderboard/src/init.luau
luau
.luau
local Players = game:GetService("Players") local Instantiate = require(script.Parent.Instantiate) local TYPE_CLASSES = { int = "IntValue", number = "NumberValue", string = "StringValue", boolean = "BoolValue", Instance = "ObjectValue", BrickColor = "BrickColorValue", Color3 = "Color3Value", Vector3 = "Vector3...
440
loneka/moonlets
loneka-moonlets-a2f46c2/modules/SessionStore/src/init.luau
luau
.luau
local Players = game:GetService("Players") local Signal = require(script.Parent.Signal) export type SessionData = { any } export type MetaData = { CreationTime: number, } export type SessionProfile = { Data: SessionData, MetaData: MetaData, UpdateData: (SessionProfile, SessionData) -> SessionData, DataUpdated: S...
387
loneka/moonlets
loneka-moonlets-a2f46c2/modules/Stator/src/DeepEquals.luau
luau
.luau
local function DeepEquals(TableA: { [any]: any }, TableB: { [any]: any }) for Key, Value in pairs(TableA) do if typeof(Value) == "table" then if not DeepEquals(TableB[Key], Value) then return false end elseif Value ~= TableB[Key] then return false end end return true end return DeepEquals
94
loneka/moonlets
loneka-moonlets-a2f46c2/modules/Stator/src/init.luau
luau
.luau
local TableUtil = require(script.Parent.TableUtil) local DeepEquals = require(script.DeepEquals) local function CopyIfTable(Value) if typeof(Value) == "table" then return TableUtil.Copy(Value, true) else return Value end end local function Equals(A, B) if (typeof(A) == "table") and (typeof(B) == "table") then...
486
loneka/moonlets
loneka-moonlets-a2f46c2/modules/Wrapper/src/init.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") local Signal = require(script.Parent.Signal) local function NewWrapper<Value, Destroy>(Construct: (Instance) -> (Value, Destroy)) assert(Construct ~= nil, "Construct argument not provided") export type Wrap = { Value: Value, Destroy: () -> (), } ...
666
loneka/moonlets
loneka-moonlets-a2f46c2/scripts/pesdeToWally.luau
luau
.luau
local fs = require("@lune/fs") local serde = require("@lune/serde") local function convertDependencies(pesdeDependencies) local wallyDependencies = {} for alias, dependency in pairs(pesdeDependencies) do if next(dependency) ~= nil then assert(dependency.name == nil, `Package relies on Pesde package.`) if d...
395
loneka/moonlets
loneka-moonlets-a2f46c2/tests/init.luau
luau
.luau
local Tests = { BuiltIn = {}, KillCallbacks = {}, } function Tests:Run(ModuleScript: ModuleScript): () -> () local NewModule = ModuleScript:Clone() NewModule.Parent = ModuleScript.Parent local Kill = require(NewModule) table.insert(Tests.KillCallbacks, Kill) return Kill end function Tests:RunAll(ModuleScript...
185
Steadyon/TweenServiceV2
Steadyon-TweenServiceV2-6288881/ReplicatedTweening.luau
luau
.luau
-- V.2.2 --[[Created by SteadyOn THIS MODULE MUST BE IN REPLICATEDSTORAGE - YOU NEED TO REQUIRE THIS MODULE SOMEWHERE ON THE CLIENT: require(game.ReplicatedStorage.ReplicatedTweening) Documentation: :Create(instance [Instance], TweenInfo [TweenInfo Object], PropertyTable [Table]) [Tween] Parameters are exactly...
3,385
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Build/Lib/Data/Template.luau
luau
.luau
-- This codegen template *must* be 100% compatible with Lua 5.1x+, NOT just Luau -- With that being said, this explains the weird cflow in some parts return [[ -- ++++++++ WAX BUNDLED DATA BELOW ++++++++ -- -- Will be used later for getting flattened globals local ImportGlobals -- Holds direct closure data (defining...
3,694
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Constants/Boolean.luau
luau
.luau
local LuauSpec = require(script.Parent.Parent.Parent.Luau.Spec) --[=[ @class Boolean The Boolean class is used to lift a constant type with the LBC_CONSTANT_BOOLEAN id (1) ]=] local Boolean = {} Boolean.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_BOOLEAN Boolean.__index = Boolean --[=[ @within B...
184
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Constants/Closure.luau
luau
.luau
local LuauSpec = require(script.Parent.Parent.Parent.Luau.Spec) --[=[ @class Closure The Closure class is used to lift a constant type with the LBC_CONSTANT_CLOSURE id (6) ]=] local Closure = {} Closure.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_CLOSURE Closure.__index = Closure --[=[ @within C...
186
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Constants/Import.luau
luau
.luau
local LuauSpec = require(script.Parent.Parent.Parent.Luau.Spec) local String = require(script.Parent.String) --[=[ @class Import The Import class is used to lift a constant type with the LBC_CONSTANT_IMPORT id (4) ]=] local Import = {} Import.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_IMPORT Impo...
221
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Constants/Nil.luau
luau
.luau
local LuauSpec = require(script.Parent.Parent.Parent.Luau.Spec) --[=[ @class Nil The Nil class is used to lift a constant type with the LBC_CONSTANT_NIL id (0) ]=] local Nil = {} Nil.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_NIL Nil.__index = Nil --[=[ @within Nil The Nil class is used to li...
173
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Constants/Number.luau
luau
.luau
local LuauSpec = require(script.Parent.Parent.Parent.Luau.Spec) --[=[ @class Number The Number class is used to lift a constant type with the LBC_CONSTANT_NUMBER id (2) ]=] local Number = {} Number.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_NUMBER Number.__index = Number --[=[ @within Number ...
181
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Constants/String.luau
luau
.luau
local LuauSpec = require(script.Parent.Parent.Parent.Luau.Spec) --[=[ @class String The String class is used to lift a constant type with the LBC_CONSTANT_STRING id (3) ]=] local String = {} String.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_STRING String.__index = String --[=[ @within String ...
178
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Constants/Table.luau
luau
.luau
local LuauSpec = require(script.Parent.Parent.Parent.Luau.Spec) --[=[ @class Table The Table class is used to lift a constant type with the LBC_CONSTANT_TABLE id (5) ]=] local Table = {} Table.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_TABLE Table.__index = Table --[=[ @within Table The Table...
187
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Constants/Vector.luau
luau
.luau
local LuauSpec = require(script.Parent.Parent.Parent.Luau.Spec) --[=[ @class Vector The Vector class is used to lift a constant type with the LBC_CONSTANT_VECTOR id (7) ]=] local Vector = {} Vector.__constant_type = LuauSpec.LuauBytecodeConstants.LBC_CONSTANT_VECTOR Vector.__index = Vector --[=[ @within Vector ...
221
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Hexadecimal.luau
luau
.luau
--[=[ @class Hexadecimal The Hexadecimal class is used to represent an integer as a Hexadecimal ]=] local Hexadecimal = {} Hexadecimal.__index = Hexadecimal --[=[ @within Hexadecimal The Hexadecimal class is used to represent an integer as a Hexadecimal @return Hexadecimal ]=] function Hexadecimal.new(Number: ...
155
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Instruction.luau
luau
.luau
local Buffer = require(script.Parent.Parent.Utilities.Buffer) local LuauSpec = require(script.Parent.Parent.Luau.Spec) local Hexadecimal = require(script.Parent.Hexadecimal) export type Context = { LineDefined: number, Pc: number } --[=[ @class Instruction The Instruction class is used to lift a luau ins...
500
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Classes/Upvalue.luau
luau
.luau
--[=[ @class Upvalue The Upvalue class is used to lift a luau Upvalue ]=] local Upvalue = {} Upvalue.__index = Upvalue --[=[ @within Upvalue The Upvalue class is used to lift a luau Upvalue @param Bytecode Buffer.BufferReader @return Upvalue ]=] function Upvalue.new(Name: string): Upvalue local self = setmet...
129
ActualMasterOogway/Iridium
ActualMasterOogway-Iridium-d3f217f/Src/Deserializer.d.luau
luau
.luau
export type Upvalue = { ClassName: "Upvalue", Name: string } export type VectorConstant = { ClassName: "Vector", X: number, Y: number, Z: number, W: number } export type TableConstant = { ClassName: "Table", Value: { [number]: any } } export type StringConstant = { ClassName: ...
1,324
Perthys/chalk
Perthys-chalk-7de4206/src/main.luau
luau
.luau
export type ChalkType = { bold: ChalkType; italic: ChalkType; underline: ChalkType; strikethrough: ChalkType; uppercase: ChalkType; smallcaps: ChalkType; size: (size: number) -> ChalkType; face: (face: string) -> ChalkType; family: (family: string) -> ChalkType; weight: (weight: string) -> ChalkType; transp...
2,042
devSparkle/sentry-roblox
devSparkle-sentry-roblox-1048bd8/src/Defaults.luau
luau
.luau
--!nocheck --// Variables local RunService = game:GetService("RunService") local Module = {} type Hint = {[string]: any} type Filter<T> = (T, Hint) -> (T?) --[=[ @within SDK @interface Options .DSN string? -- The DSN for the sentry project to send events to .debug boolean? -- See [SDK.debug] (must press the "...
1,315
Roblox/rocale-cli
Roblox-rocale-cli-7e111b7/scripts/build.luau
luau
.luau
local args = { ... } local version = args[2] or "unknown" local hash = args[3] or "unknown" local fs = require("@std/fs") local system = require("@lute/system") local log = require("../src/util/log") log.setLevel("debug") local runProcess = require("../src/util/runProcess") if not fs.exists("build") then fs.create...
233
Roblox/rocale-cli
Roblox-rocale-cli-7e111b7/scripts/test.luau
luau
.luau
local process = require("@lute/process") local fs = require("@std/fs") local log = require("../src/util/log") log.setLevel("debug") local runProcess = require("../src/util/runProcess") runProcess({ "build/rocale-cli", "run", "--script", "tests/run-test-project.luau", "--placeId", process.env.TEST_PLACE_ID, "-...
268
Roblox/rocale-cli
Roblox-rocale-cli-7e111b7/src/cli.luau
luau
.luau
local args = { ... } local runCommand = require("./commands/run") local versionInfo = require("./version") local function helpCommand() print([[ rocale-cli A command-line tool for building, uploading, and running Roblox projects in Open Cloud. USAGE: rocale-cli <command> [options] COMMANDS: run Build, upl...
175
Roblox/rocale-cli
Roblox-rocale-cli-7e111b7/src/commands/run.luau
luau
.luau
local function help() print([[ rocale-cli run Build, upload, and run a Roblox project in Open Cloud USAGE: rocale-cli run [options] REQUIRED: -u, --universeId <id> Target universe ID to spawn an Open Cloud instance of -p, --placeId <id> Target place ID to spawn an Open Cloud instance of --apiK...
1,673
Roblox/rocale-cli
Roblox-rocale-cli-7e111b7/src/util/log.luau
luau
.luau
--[[ Simple logger module. ]] local richterm = require("@batteries/richterm") local process = require("@lute/process") local log = {} type Level = "trace" | "debug" | "info" | "warn" | "error" local currentLevel: Level = "info" local colorsEnabled = true -- set to false to disable colors if process.env.LOG_NO_COL...
1,056
Roblox/rocale-cli
Roblox-rocale-cli-7e111b7/src/util/runProcess.luau
luau
.luau
local process = require("@lute/process") local system = require("@lute/system") local log = require("../util/log") return function(cmd: { string }) local isWin32 = string.lower(system.os) == "windows_nt" if isWin32 then cmd[1] = cmd[1] .. ".exe" end local cmdStr = table.concat(cmd, " ") log.debug(`Running comm...
188
Roblox/rocale-cli
Roblox-rocale-cli-7e111b7/tests/run-test-project.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") local TestProject = require(ReplicatedStorage:FindFirstChild("TestProject")) assert(TestProject == true, "TestProject did not return true") local hello = _G.HELLO_GLOBAL or "" local world = _G.WORLD_GLOBAL or "" local output = { BinaryOutput = buffer.fr...
93
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/RotatedRegion3/GJK.lua
luau
.lua
local MAX_TRIES = 20 local ZERO3 = Vector3.new(0, 0, 0) -- Class local GJK = {} GJK.__index = GJK -- Private Functions local function tripleProduct(a, b, c) return b * c:Dot(a) - a * c:Dot(b) end local function containsOrigin(self, simplex, direction) local a = simplex[#simplex] local ao = -a if (#simplex == 4) th...
850
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/RotatedRegion3/Supports.lua
luau
.lua
local ZERO = Vector3.new(0, 0, 0) local RIGHT = Vector3.new(1, 0, 0) -- local function rayPlane(p, v, s, n) local r = p - s; local t = -r:Dot(n) / v:Dot(n) return p + t * v, t end; -- local Supports = {} function Supports.PointCloud(set, direction) local max, maxDot = set[1], set[1]:Dot(direction) for i = 2, #set...
358
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/RotatedRegion3/Vertices.lua
luau
.lua
-- CONSTANTS local PI2 = math.pi*2 local PHI = (1 + math.sqrt(5)) / 2 local RIGHT = Vector3.new(1, 0, 0) local UP = Vector3.new(0, 1, 0) local BACK = Vector3.new(0, 0, 1) local LEFT = Vector3.new(-1, 0, 0) local DOWN = Vector3.new(0, -1, 0) local FORWARD = Vector3.new(0, 0, -1) local CORNERS = { Vector3.new...
1,634
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/RotatedRegion3/init.lua
luau
.lua
-- TAKEN FROM https://www.roblox.com/library/3686163417/Rotated-Region3-GJK -- PACKAGE UPDATED SINCE MAY 02, 2020 12:15:45 PM --[[ This is a Rotated Region3 Class that behaves much the same as the standard Region3 class expect that it allows for both rotated regions and also a varying array of shapes. API: Constructo...
2,345
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/abbreviate/src/commify.luau
luau
.luau
local function commify(self, number) assert(type(number) == 'number', 'Attempt to commify a non-number value') local formatted = tostring(number) while true do local newFormatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') formatted = newFormatted if k == 0 then break end end return format...
103
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/abbreviate/src/init.luau
luau
.luau
local DEFAULT_SUFFIX_TABLE = { "k", "M", "B", "T", "Qd", "Qn", "Sx", "Sp", "O", "N", "De", "Ud", "DD", "tdD", "QnD", "SxD", "SpD", "OcD", "NvD", "VgN", "UvG", "DvG", "TvG", "QtV", "QnV", "SeV", "SpG", "OvG", "NvG", "TgN", "UtG", "DtG", "TsTg", "QtTg", "QnTg", "SsTg", "SpTg", "OcTg"...
413
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/abbreviate/src/numberToString.luau
luau
.luau
local function round(number, decimalPlaces, roundDown) number = number * 10 ^ decimalPlaces if roundDown then return math.floor(number) / 10 ^ decimalPlaces else number = tonumber(string.format("%.14g", number)) -- cast to string and back to number to give some epsilon for floating point numbers --[[ e.g.: ...
568
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/abbreviate/src/numbersToSortedString.luau
luau
.luau
-- Credits to Coreccii for this method local hexToBin = { ["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011", ["4"] = "0100", ["5"] = "0101", ["6"] = "0110", ["7"] = "0111", ["8"] = "1000", ["9"] = "1001", ["A"] = "1010", ["B"] = "1011", ["C"] = "1100", ["D"] = "1101", ["E"] = "1110", ["F"] ...
900
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/abbreviate/src/runTests.story.luau
luau
.luau
-- Disable ANSI colors from Jest _G.NOCOLOR = true local ReplicatedStorage = game:GetService("ReplicatedStorage") local ServerScriptService = game:GetService("ServerScriptService") local runCLI = require(ReplicatedStorage.DevPackages.Jest).runCLI local processServiceExists, ProcessService = pcall(function() return ...
266
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/abbreviate/src/setSetting.luau
luau
.luau
local function setSetting(self, settingName, settingValue) if not (settingName and settingValue ~= nil and type(settingName) == 'string') then error('setSetting had invalid parameters.\nP1 - settingName: string\nP2 - settingValue: unknown', 2) end local realSetting = '_' .. settingName if self[realSetting] ~= ni...
173
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/abbreviate/src/stringToNumber.luau
luau
.luau
local function stringToNumber(self, str) if not (str and type(str) == 'string') then error('stringToNumber had invalid parameters.\nP1 - string: string', 2) end local totalMagnitude = 1 for key, suffix in pairs(self._suffixTable) do str = string.gsub(str, suffix, function() totalMagnitude = totalMagnitude ...
176
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/flipper/src/BaseMotor.lua
luau
.lua
local RunService = game:GetService("RunService") local Signal = require(script.Parent.Signal) local noop = function() end local BaseMotor = {} BaseMotor.__index = BaseMotor function BaseMotor.new() return setmetatable({ _onStep = Signal.new(), _onComplete = Signal.new() }, BaseMotor) end function BaseMotor:o...
223
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/flipper/src/GroupMotor.lua
luau
.lua
local BaseMotor = require(script.Parent.BaseMotor) local SingleMotor = require(script.Parent.SingleMotor) local isMotor = require(script.Parent.isMotor) local GroupMotor = setmetatable({}, BaseMotor) GroupMotor.__index = GroupMotor local function toMotor(value) if isMotor(value) then return value end local val...
530
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/flipper/src/Instant.lua
luau
.lua
local Instant = {} Instant.__index = Instant function Instant.new(targetValue) return setmetatable({ _targetValue = targetValue }, Instant) end function Instant:step() return { complete = true, value = self._targetValue } end return Instant
61
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/flipper/src/Signal.lua
luau
.lua
local Connection = {} Connection.__index = Connection function Connection.new(signal, handler) return setmetatable({ signal = signal, connected = true, _handler = handler }, Connection) end function Connection:disconnect() if self.connected then self.connected = false for index, connection in pairs(self...
240
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/flipper/src/SingleMotor.lua
luau
.lua
local BaseMotor = require(script.Parent.BaseMotor) local SingleMotor = setmetatable({}, BaseMotor) SingleMotor.__index = SingleMotor function SingleMotor.new(initialValue, shouldStartImplicitly) assert(initialValue, "Missing argument #1: initialValue") assert(typeof(initialValue) == "number", "initialValue must be ...
287
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/flipper/src/init.lua
luau
.lua
local Flipper = { SingleMotor = require(script.SingleMotor), GroupMotor = require(script.GroupMotor), Instant = require(script.Instant), Spring = require(script.Spring), isMotor = require(script.isMotor) } return Flipper
50
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/flipper/src/isMotor.lua
luau
.lua
local function isMotor(value) local motorType = tostring(value):match("^Motor%((.+)%)$") if motorType then return true, motorType else return false end end return isMotor
48
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Collection.lua
luau
.lua
local Promise = require(script.Parent.Parent.Promise) local t = require(script.Parent.Parent.t) local Document = require(script.Parent.Document) local stackSkipAssert = require(script.Parent.stackSkipAssert).stackSkipAssert local getTime = require(script.Parent.getTime).getTime local DOCUMENT_COOLDOWN = 7 local Colle...
571
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Document.lua
luau
.lua
local Promise = require(script.Parent.Parent.Promise) local AccessLayer = require(script.Parent.Layers.AccessLayer) local DocumentData = require(script.Parent.DocumentData) local Error = require(script.Parent.Error) local stackSkipAssert = require(script.Parent.stackSkipAssert).stackSkipAssert local Document = {} Docu...
546
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/DocumentData.lua
luau
.lua
local DocumentData = {} DocumentData.__index = DocumentData -- TODO: Backups function DocumentData.new(options) return setmetatable({ _lockSession = options.lockSession; _readOnlyData = options.readOnlyData; _collection = options.collection; _currentData = nil; _dataLoaded = false; _closed = false; }, D...
336
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Error.lua
luau
.lua
local makeEnum = require(script.Parent.makeEnum).makeEnum local getTime = require(script.Parent.getTime).getTime local Error = { Kind = makeEnum("Quicksave.Error.Kind", { "DataStoreError", "CouldNotAcquireLock", "LockConsistencyViolation", "SchemaValidationFailed" }), } Error.__index = Error function Error....
446
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/AccessLayer/LockSession.lua
luau
.lua
local MigrationLayer = require(script.Parent.Parent.MigrationLayer) local Error = require(script.Parent.Parent.Parent.Error) local Promise = require(script.Parent.Parent.Parent.Parent.Promise) local getTime = require(script.Parent.Parent.Parent.getTime).getTime local HttpService = game:GetService("HttpService") local...
1,093
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/AccessLayer/init.lua
luau
.lua
local LockSession = require(script.LockSession) local MigrationLayer = require(script.Parent.MigrationLayer) local AccessLayer = {} function AccessLayer.acquireLockSession(collection, key, migrations) local lockSession = LockSession.new(collection, key, migrations) return lockSession:lock() end function AccessLay...
86
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/DataLayer/LZW.lua
luau
.lua
local dictionary, length = {}, 0 for i = 32, 127 do if i ~= 34 and i ~= 92 then local c = string.char(i) dictionary[c], dictionary[length] = length, c length = length + 1 end end local escapemap = {} for i = 1, 34 do i = ({34, 92, 127})[i-31] or i local c, e = string.char(i), string.char(i + 31) escapemap[c...
818
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/DataLayer/Schemes/compressed.lua
luau
.lua
local LZW = require(script.Parent.Parent.LZW) return { ["compressed/1"] = { pack = function(value) return LZW.compress(value) end; unpack = function(value) return LZW.decompress(value); end; } }
59
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/DataLayer/Schemes/raw.lua
luau
.lua
return { ["raw/1"] = { pack = function(value) return value end; unpack = function(value) return value; end; } }
41
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/DataLayer/init.lua
luau
.lua
local RetryLayer = require(script.Parent.RetryLayer) local HttpService = game:GetService("HttpService") local RawSchemes = require(script.Schemes.raw) local CompressedSchemes = require(script.Schemes.compressed) local MINIMUM_LENGTH_TO_COMPRESS = 1000 local DataLayer = { schemes = { ["raw/1"] = RawSchemes["raw/1...
329
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/DataStoreLayer.lua
luau
.lua
local DataStoreService = require(script.Parent.Parent.Parent.MockDataStoreService) local DataStoreLayer = { _dataStores = {}; } function DataStoreLayer._getDataStore(collectionName) if DataStoreLayer._dataStores[collectionName] == nil then DataStoreLayer._dataStores[collectionName] = DataStoreService:...
146
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/MigrationLayer.lua
luau
.lua
local DataLayer = require(script.Parent.DataLayer) local MigrationLayer = {} function MigrationLayer._unpack(value, migrations) value = value or { generation = #migrations; data = nil; } local data = value.data local generation = value.generation if generation < #migrations then for i = generation + 1, #...
216
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/RetryLayer.lua
luau
.lua
local ThrottleLayer = require(script.Parent.ThrottleLayer) local Error = require(script.Parent.Parent.Error) local RetryLayer = {} function RetryLayer._retry(callback, ...) local attempts = 0 while attempts < 5 do attempts = attempts + 1 local ok, value = pcall(callback, ...) if ok then return value e...
216
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/Layers/ThrottleLayer.lua
luau
.lua
local DataStoreService = require(script.Parent.Parent.Parent.MockDataStoreService) local RunService = game:GetService("RunService") local DataStoreLayer = require(script.Parent.DataStoreLayer) local METHOD_RESOURCE_MAP = { GetAsync = Enum.DataStoreRequestType.GetAsync; UpdateAsync = Enum.DataStoreRequestType.Update...
431
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/init.lua
luau
.lua
local t = require(script.Parent.t) local Promise = require(script.Parent.Promise) local Collection = require(script.Collection) local Error = require(script.Error) local Quicksave = { t = t; Promise = Promise; Error = Error; _collections = {}; } function Quicksave.createCollection(name, options) if Quicksave._c...
151
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/makeEnum.lua
luau
.lua
local function makeEnum(enumName, members) local enum = {} for _, memberName in ipairs(members) do enum[memberName] = memberName end return setmetatable(enum, { __index = function(_, k) error(string.format("%s is not in %s!", k, enumName), 2) end, __newindex = function() error(string.format("Creatin...
119
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/Quicksave/stackSkipAssert.lua
luau
.lua
local function stackSkipAssert(condition, text) if not condition then error(text, 3) end end return { stackSkipAssert = stackSkipAssert; }
36
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/quicksave/src/t/init.lua
luau
.lua
-- t: a runtime typechecker for Roblox -- regular lua compatibility local typeof = typeof or type local function primitive(typeName) return function(value) local valueType = typeof(value) if valueType == typeName then return true else return false, string.format("%s expected, got %s", typeName, valueType...
6,453
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/react-redux/src/components/Context.lua
luau
.lua
--!strict local React = require(script.Parent.Parent.Parent.react) --OverHash deviation: local Redux = require(script.Parent.Parent.Parent.Redux) local Subscription = require(script.Parent.Parent.utils.Subscription) export type ReactReduxContextValue<SS = any, A = any> = { store: any, --OverHash deviation: use any in...
156
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/react-redux/src/components/Provider.lua
luau
.lua
--!strict local React = require(script.Parent.Parent.Parent.react) local ReactReduxContext = require(script.Parent.Context) local Subscription = require(script.Parent.Parent.utils.Subscription) -- OverHash deviation: local Redux = require(script.Parent.Parent.Parent.Redux) export type ProviderProps<A = any, S = unkno...
409
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/react-redux/src/hooks/useDispatch.lua
luau
.lua
--!strict local React = require(script.Parent.Parent.Parent.react) local ReactReduxContext = require(script.Parent.Parent.components.Context) local useDefaultStore = require(script.Parent.useStore).useStore local createStoreHook = require(script.Parent.useStore).createStoreHook local exports = {} --[[ * Hook factor...
360
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/react-redux/src/hooks/useReduxContext.lua
luau
.lua
--!strict local React = require(script.Parent.Parent.Parent.react) local ReactReduxContext = require(script.Parent.Parent.components.Context) local exports = {} --[[ * A hook to access the value of the `ReactReduxContext`. This is a low-level * hook that you should usually not need to call directly. * * @returns ...
221
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/react-redux/src/hooks/useSelector.lua
luau
.lua
--!strict local React = require(script.Parent.Parent.Parent.react) local useDefaultReduxContext = require(script.Parent.useReduxContext).useReduxContext local ReactReduxContext = require(script.Parent.Parent.components.Context) local types = require(script.Parent.Parent.types) local useSyncExternalStore = require(scri...
822
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/react-redux/src/hooks/useStore.lua
luau
.lua
--!strict local React = require(script.Parent.Parent.Parent.react) -- OverHash deviation: local Redux = require(script.Parent.Parent.Parent.Redux) local Context = require(script.Parent.Parent.components.Context) local useDefaultReduxContext = require(script.Parent.useReduxContext).useReduxContext local exports = {} -...
352
OverHash/Roblox-TS-Libraries
OverHash-Roblox-TS-Libraries-8a3ce46/react-redux/src/types.lua
luau
.lua
--!strict local React = require(script.Parent.Parent.react) export type FixTypeLater = any export type EqualityFn<T> = (a: T, b: T) -> boolean export type ExtendedEqualityFn<T, P> = (a: T, b: T, c: P, d: P) -> boolean export type DispatchProp<A = any> = { dispatch: (any) -> (), } export type Matching<InjectedProps...
358