repo stringclasses 254
values | file_path stringlengths 29 241 | code stringlengths 100 233k | tokens int64 14 69.4k |
|---|---|---|---|
metaindev/connect-plugin | metaindev-connect-plugin-ef41937/Config.luau | local Config = {}
Config.PLUGIN_VERSION = "1.0.4"
Config.SERVER_URL = "wss://turnstile.metain.dev"
Config.MAX_RECONNECT_ATTEMPTS = 5
Config.state = {
ws = nil :: WebStreamClient?,
isConnected = false,
isAuthorized = false,
isReconnecting = false,
reconnectToken = nil :: string?,
lastUserId = nil :: string?,
re... | 126 |
metaindev/connect-plugin | metaindev-connect-plugin-ef41937/Main.server.luau | local Root = script.Parent
local Config = require(Root.Config)
local UI = require(Root.UI)
local Connection = require(Root.Connection)
UI.init(plugin)
UI.toggleButton.Click:Connect(function()
UI.widget.Enabled = not UI.widget.Enabled
end)
UI.connectBtn.MouseButton1Click:Connect(function()
local state = Config.sta... | 143 |
metaindev/connect-plugin | metaindev-connect-plugin-ef41937/UI.luau | local Root = script:FindFirstAncestor("Metain")
local Config = require(Root.Config)
local UI = {}
local statusDot
local statusLabel
local connectBtn
local codeInput
local function getColor(styleColor: Enum.StudioStyleGuideColor): Color3
return settings().Studio.Theme:GetColor(styleColor)
end
function UI.updateUI()... | 1,644 |
metaindev/connect-plugin | metaindev-connect-plugin-ef41937/Utils.luau | local ChangeHistoryService = game:GetService("ChangeHistoryService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerScriptService = game:GetService("ServerScriptService")
local ServerStorage = game:GetService("ServerStorage")
local StarterGui = game:GetService("StarterGui")
local StarterPlay... | 1,260 |
Pseudoreality/Roblox-Identities | Pseudoreality-Roblox-Identities-88060eb/CheckCapabilities.luau | local CHECKBOX_EMOJI = utf8.char(0x2705)
local CROSS_EMOJI = utf8.char(0x274C)
local function getSuccess(fn, ...)
return ( pcall(fn, ...) )
end
local function customSuccess(fn)
local success, result = pcall(fn)
return success and result
end
local capInfos = {
{
name = "Plugin",
index = 0,
canAccess = getSu... | 783 |
centau/ecr | centau-ecr-78ea8a6/src/ecr.luau | --------------------------------------------------------------------------------
-- ecr.luau
-- v0.9.0
--------------------------------------------------------------------------------
local ID_SIZE = 4
local MAX_ENTITIES = 0x0000_FFFF
--------------------------------------------------------------------------------
--... | 18,813 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/Common/api_flags.luau | return function(rt: any, memory_at_0: any, cfns: any, INDIRECT_FUNCTIONS: any, utils: typeof(require("./utils")()))
local module = {}
function module.luau_setflag(name: string, state: boolean)
--// Flag name
local flagNamePtr = utils.cstr(name)
--// Set the flag
cfns.set_flag(f... | 175 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/Common/polyfill.luau | local task = task or (require)("@lune/task")
return function(utils: typeof(require("./utils")()))
local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS
local polyfill = {}
local FILE_MAP = { {}, {} }
local LONGJMP_THROW_SIGN = newproxy(false)
local __TIMERS = {}
local __EXIT_STATUS = nil
local _... | 1,207 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/Common/runtime_create.luau | local runtime_initialize = (require)("@self/runtime")
local utils_create = require("./utils")
return function(polyfill_create: typeof(require("./polyfill")))
local utils, utils_ready = utils_create()
local polyfill, polyfill_ready = polyfill_create(utils)
local common_imports = { func_list = polyfill }
... | 194 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/Common/utils.luau | return function()
local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS
local module = {}
function module.stub(name: string, ret: any)
return function(...)
if (STUB_WARN) then
print(`[WARN]: stub function '{name}' called`)
end
return ret
end
... | 641 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/Common/vector3_compat.luau | --// Vanilla Luau Vector3 implementation
--// Provides Vector3 lib if no existing implementation is available
--// Missing: xAxis, yAxis, zAxis, Magnitude, Unit, and all namecall functions
--// Last checked: 11 December 2024
local type = type
local typeof = typeof
local Vector3 = Vector3 or (if vector then { new = vect... | 1,176 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/Compiler/common.luau | export type LuauCompileOptions = {
OptimizationLevel: number,
DebugLevel: number,
TypeInfoLevel: number,
CoverageLevel: number,
VectorLibName: string?,
VectorLibConstructor: string?,
VectorType: string?,
MutableGlobals: {string}?,
DisabledBuiltins: {string}?,
}
local DEFAULT_LuauC... | 1,072 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/Compiler/entrypoint.luau | local api_flags_create = require("../Common/api_flags")
local runtime_create = require("../Common/runtime_create")
local compiler_common_init = require("../Compiler/common")
export type LuauCompileOptions = compiler_common_init.LuauCompileOptions
local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS, utils = runtime_create(... | 223 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/Full/entrypoint.luau | local api_flags_create = require("../Common/api_flags")
local runtime_create = require("../Common/runtime_create")
local compiler_common_init = require("../Compiler/common")
local vm_common_init = require("../VM/common")
export type LuauCompileOptions = compiler_common_init.LuauCompileOptions
local rt, memory_at_0, cf... | 303 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/VM/common.luau | return function(rt: any, memory_at_0: any, cfns: any, INDIRECT_FUNCTIONS: any, utils: typeof(require("../Common/utils")()))
local module = {}
function module.luau_run(
bytecode: string,
chunkName: string?,
safeEnv: boolean?
): boolean
-- load bytecode and chunkName to memory... | 359 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/VM/entrypoint.luau | local api_flags_create = require("../Common/api_flags")
local runtime_create = require("../Common/runtime_create")
local vm_common_init = require("../VM/common")
local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS, utils = runtime_create(require("../VM/polyfill"))
local api_flags = api_flags_create(rt, memory_at_0, cfns, ... | 244 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/VM/luau_macros.luau | local LUAI_MAXCSTACK = 8000
local LUA_REGISTRYINDEX = -LUAI_MAXCSTACK - 2000
local LUA_ENVIRONINDEX = -LUAI_MAXCSTACK - 2001
local LUA_GLOBALSINDEX = -LUAI_MAXCSTACK - 2002
local LUA_VECTOR_SIZE = 3
local LUA_TNONE = -1
local LUA_TNIL = 0
local LUA_TBOOLEAN = 1
local LUA_TLIGHTUSERDATA ... | 2,343 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/snippets/VM/polyfill.luau | local common_polyfill_create = require("../Common/polyfill")
return function(utils: typeof(require("../Common/utils")()))
local rt, memory_at_0, cfns, INDIRECT_FUNCTIONS
local polyfill, common_polyfill_ready = common_polyfill_create(utils)
local START_CLOCK, NOW_TIME = os.clock(), os.time() * 1000
--... | 1,115 |
RadiatedExodus/LuauCeption | RadiatedExodus-LuauCeption-c247337/src/builder/init.luau | local fs = require("@lune/fs")
local process = require("@lune/process")
local regex = require("@lune/regex")
local argparse = require("@self/argparse/src/lib")
local VALID_FLAGS = {
-- combines runtime and entrypoint into one file
"BUILD_ONEFILE",
}
local PARSER = argparse("luauceptionbuilder")
PARSER:option... | 3,508 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/Types/luau/footer.luau | export type upsideEngine = {
Version: string,
Workspace: {},
new: ((name: "PhysicalObject") -> PhysicalObject)
& ((name: "StaticObject") -> StaticObject)
& ((name: "Fluid") -> Fluid)
& ((name: "Parallax") -> Parallax)
& ((name: "Sprite") -> Sprite)
& ((name: "Sound") -> Sound)
& ((name: "Environment") ->... | 303 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/Types/luau/header.luau | -- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
export type Dictionary<k, v> = { [k]: v }
export type Array<v> = { [number]: v }
export type ChromaticAberrationConnection = {}
export type SubjectDestroyConnection = {}
export type CharacterDestroyConnection = {}
export type AuthorityType = "Server" | ... | 410 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/bin/start.server.luau | local replicatedStorage = game:GetService("ReplicatedStorage")
local upsideEngine = replicatedStorage:WaitForChild("UpsideEngine") :: ModuleScript
require(upsideEngine)
| 36 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/AppData/Properties.luau | local props = {
NonReplicable = {
-- BaseClass
"ClassNameHistory",
"ClassName",
-- EventEmitter
"EventsStorage",
-- BaseObject
"Instance",
-- Particle
"Units",
"Clock",
-- Physical Object
"Collisions",
"IsGrounded",
-- Sprite
"Active",
-- Character
"IsJumping",
-- Scene
"Ca... | 295 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/Actor.luau | local runService = game:GetService("RunService")
local lib = script.Parent.Parent.Parent.Lib
local player = game:GetService("Players").LocalPlayer
local actorLoader = lib:WaitForChild("ActorLoader")
local util = require(lib.Util)
local copyTable = util.CopyTable
local isEqual = util.IsEqual
local isClient = runServi... | 385 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/Actrees.luau | local isEqual = require(script.Parent.Parent.Parent.Lib.Util.Internal.IsEqual)
local actrees = {}
actrees.__index = actrees
function actrees.new()
return setmetatable({
__actors = {},
__cache = {},
}, actrees)
end
function actrees:AddActor(actor)
table.insert(self.__actors, actor)
end
function actrees:SetVari... | 159 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/BaseClass.luau | local upsideEngine = script.Parent.Parent.Parent
local appData = upsideEngine.AppData
local copyTable = require(upsideEngine.Lib.Util.Internal.CopyTable)
local properties = require(appData.Properties)
local data = require(appData.Data)
local environments = {
"SoundEnvironment",
"LightingEnvironment",
"ParticleEnvi... | 504 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/BaseObject.luau | local eventEmitter = require(script.Parent.EventEmitter)
local classEnvironments = {
Sound = "SoundEnvironment",
Light = "LightingEnvironment",
Particle = "ParticleEnvironment",
}
local baseObject = {}
baseObject.__index = baseObject
--[[={
@link BaseObject.md
}=]]
function baseObject.new(instanceType: string?): ... | 410 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/Camera.luau | local upsideEngine = script.Parent.Parent.Parent
local setSmoothPosition = require(script.Parent.Parent.Parent.Lib.Util.Math.SetSmoothPosition)
local character = require(script.Parent.Parent.Public.Character)
local eventEmitter = require(upsideEngine.Classes.Internal.EventEmitter)
local camera = {}
camera.__index = ca... | 776 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/Connection.luau | local baseClass = require(script.Parent.BaseClass)
local connection = {}
connection.__index = connection
local function removeThread(event, running)
for index, thread in event.Threads do
if thread == running then
table.remove(event.Threads, index)
break
end
end
return running
end
local function resumeTh... | 381 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/EventEmitter.luau | local baseClass = require(script.Parent.BaseClass)
local connection = require(script.Parent.Connection)
local eventEmitter = {}
eventEmitter.__index = eventEmitter
local function getEvent(events, name)
if not events[name] then
events[name] = {
Functions = {},
Threads = {},
}
end
return events[name]
end
... | 600 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/LightingEnvironment.luau | local upsideEngine = script.Parent.Parent.Parent
local lightingSystem = upsideEngine.Systems.Lighting
local actor = require(script.Parent.Actor)
local actrees = require(script.Parent.Actrees)
local environment = require(upsideEngine.Classes.Public.Environment)
local lightingEnvironment = {}
lightingEnvironment.__inde... | 1,029 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/ObjectEnvironment.luau | local upsideEngine = script.Parent.Parent.Parent
local environment = require(upsideEngine.Classes.Public.Environment)
local objectEnvironment = {}
objectEnvironment.__index = objectEnvironment
objectEnvironment.__iter = environment.__iter
function objectEnvironment.new(): ObjectEnvironment
local self = environment.n... | 80 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/ParticleEnvironment.luau | local upsideEngine = script.Parent.Parent.Parent
local environment = require(upsideEngine.Classes.Public.Environment)
local particleEnvironment = {}
particleEnvironment.__index = particleEnvironment
function particleEnvironment.new(): ParticleEnvironment
local self = environment.new()
self:SetClassName(script.Name)... | 73 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/Request.luau | local upsideEngine = script.Parent.Parent.Parent
local runService = game:GetService("RunService")
local players = game:GetService("Players")
local replicatedStorage = game:GetService("ReplicatedStorage")
local copyTable = require(script.Parent.Parent.Parent.Lib.Util.Internal.CopyTable)
local ReplicationHandlers = req... | 941 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/ShaderEnvironment.luau | local upsideEngine = script.Parent.Parent.Parent
local shadingSystem = script.Parent.Parent.Parent.Systems.Shading
local runService = game:GetService("RunService")
local actor = require(script.Parent.Actor)
local environment = require(upsideEngine.Classes.Public.Environment)
local shaderEnvironment = {}
shaderEnvironm... | 181 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Internal/SoundEnvironment.luau | local upsideEngine = script.Parent.Parent.Parent
local environment = require(upsideEngine.Classes.Public.Environment)
local soundEnvironment = {}
soundEnvironment.__index = soundEnvironment
--[[={
@link SoundEnvironment.md
}=]]
function soundEnvironment.new(): SoundEnvironment
local self = environment.new("SoundGro... | 93 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Character.luau | local upsideEngine = script.Parent.Parent.Parent
local sprite = require(upsideEngine.Classes.Public.Sprite)
local character = {}
character.__index = character
local function check(greater, axePos, targetAxe)
return if greater then axePos >= targetAxe else axePos <= targetAxe
end
local function getAxeData(self, targe... | 873 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Environment.luau | local upsideEngine = script.Parent.Parent.Parent
local baseObject = require(upsideEngine.Classes.Internal.BaseObject)
local function setProperty(obj, p, v)
obj[p] = v
end
local environment = {}
environment.__index = environment
function environment.new(instanceType: string?): Environment
local self = baseObject.ne... | 1,161 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Fluid.luau | local physicalObject = require(script.Parent.PhysicalObject)
local fluid = {}
fluid.__index = fluid
function fluid.new()
local self = physicalObject.new()
self:SetClassName(script.Name)
self.Density = 2
self.Viscosity = 5
self.WavesAmplitude = 1
self.WavesSpeed = 0.1
return setmetatable(self, fluid)
end
--[[... | 218 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Light.luau | local staticObject = require(script.Parent.StaticObject)
local light = {}
light.__index = light
--[[={
@link Light.md
}=]]
function light.new(): Light
local self = staticObject.new()
self:SetClassName(script.Name)
self.Shape = "PointLight"
self.Rotation = 0
self.Angle = 90
self.Color = Color3.fromRGB(255, 255,... | 431 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Parallax.luau | local baseObject = require(script.Parent.Parent.Internal.BaseObject)
local toUDim2 = require(script.Parent.Parent.Parent.Lib.Util.DataType.ToUDim2)
local parallax = {}
parallax.__index = parallax
function parallax.new()
local self = baseObject.new("Frame")
self:SetClassName(script.Name)
self.CanvasSize = Vector2.ne... | 650 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Particle.luau | local tweenService = game:GetService("TweenService")
local upsideEngine = script.Parent.Parent.Parent
local sceneManager = require(upsideEngine.Services).SceneManager
local baseObject = require(upsideEngine.Classes.Internal.BaseObject)
local character = require(script.Parent.Character)
local staticObject = require(scr... | 1,481 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/ProximityPrompt.spec2D.luau | local ProximityPrompt2D = require(script.Parent.ProximityPrompt2D)
local Scene = require(script.Parent.Scene)
return function()
describe("ProximityPrompt2D.new", function()
it("should create an instance with default properties", function()
local prompt = ProximityPrompt2D.new()
expect(prompt.Range).to.equal(1... | 277 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/ProximityPrompt2D.luau | local UserInputService = game:GetService("UserInputService")
local upsideEngine = script.Parent.Parent.Parent
local CrossPlatformService = require(script.Parent.Parent.Parent.Services.CrossPlatformService)
local SceneManager = require(upsideEngine.Services.SceneManager)
local Sprite = require(upsideEngine.Classes.Publi... | 1,230 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/ReactiveLabel.luau | local SoundService = game:GetService("SoundService")
local upsideEngine = script.Parent.Parent.Parent
local TextTagService = require(upsideEngine.Services.TextTagService)
local TextTag = require(script.Parent.TextTag)
local baseObject = require(upsideEngine.Classes.Internal.BaseObject)
local reactiveLabel = {}
reactiv... | 3,026 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Scene.luau | local upsideEngine = script.Parent.Parent.Parent
local objectEnvironment = require(upsideEngine.Classes.Internal.ObjectEnvironment)
local shaderEnvironment = require(upsideEngine.Classes.Internal.ShaderEnvironment)
local camera = require(upsideEngine.Classes.Internal.Camera)
local baseObject = require(upsideEngine.Cla... | 1,749 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Shader.luau | local baseClass = require(script.Parent.Parent.Internal.BaseObject)
local path = require(script.Parent.Parent.Parent.Lib.Util.Internal.Path)
local source = nil
local shader = {}
shader.__index = shader
function shader.new(): Shader
local self = baseClass.new("Folder")
self:SetClassName(script.Name)
self.Enabled = ... | 553 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Sound.luau | local upsideEngine = script.Parent.Parent.Parent
local objects = require(upsideEngine.AppData.Data).objects
local character = require(script.Parent.Character)
local baseObject = require(upsideEngine.Classes.Internal.BaseObject)
local sound = {}
sound.__index = sound
local function getSoundEnvironment(scene: string): ... | 529 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/Sprite.luau | local contentProvider = game:GetService("ContentProvider")
local physicalObject = require(script.Parent.PhysicalObject)
local sprite = {}
sprite.__index = sprite
--[[={
@desc The second parameter is the size of a cell of every frame of an sprite sheet, this can be changed using the .ImageRectSize property of the obj... | 625 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/StaticObject.luau | local upsideEngine = script.Parent.Parent.Parent
local contentProvider = game:GetService("ContentProvider")
local colorProperties = { "ImageColor3", "TextColor3", "TextStrokeColor3" }
local sceneManager = require(script.Parent.Parent.Parent.Services.SceneManager)
local shader = require(script.Parent.Shader)
local base... | 1,457 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Classes/Public/TextTag.luau | local upsideEngine = script.Parent.Parent.Parent
local BaseClass = require(upsideEngine.Classes.Internal.BaseClass)
local TextTagService = require(upsideEngine.Services.TextTagService)
local TextTag = {}
TextTag.__index = TextTag
function TextTag.new()
local self = BaseClass.new()
self:SetClassName(script.Name)
sel... | 540 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/ActorLoader.client.luau | local RunService = game:GetService("RunService")
local actor = script:GetActor()
if not RunService:IsRunning() or not actor then
return
end
local data = {}
local running = {}
local tasks = {}
local module = nil
local runMode = "Default"
local ready = script:WaitForChild("ready")
local function addTask(f)
return f... | 372 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Generic/Merge.luau | return function(t1, t2)
local result = t1
for index, value in t2 do
result[index] = value
end
return result
end
| 37 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Generic/Wrap.luau | return function(f, ...)
local args = { ... }
return function(...)
f(unpack(args), ...)
end
end
| 25 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/CheckCollision/GetCorrectionVector.luau | --!native
--!optimize 2
local supportFn = require(script.Parent.Support)
local function getEdge(simplex)
local minDistSq = math.huge
local edgeNormal = Vector3.zero
local index = -1
local n = #simplex
if n == 0 then
return index, edgeNormal
end
for i = 1, n do
local j = (i % n) + 1
local edge = simplex... | 470 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/CheckCollision/Handlers.luau | --!native
--!optimize 2
local handlers = {}
local function tripleProduct(a, b, c)
return b * a:Dot(c) - a * b:Dot(c)
end
function handlers.point(direction, simplex)
return -direction
end
@native
function handlers.line(direction, simplex)
local b = simplex[2]
local c = simplex[1]
local cb = b - c
local c0 = -c... | 256 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/CheckCollision/Support.luau | --!native
--!optimize 2
return function(object, direction)
if object.shape == "circle" then
if direction.X == 0 and direction.Y == 0 then
return object.centre
end
local unitDirection = direction.Unit
if unitDirection.X == 0 and unitDirection.Y == 0 then
return object.centre
end
return object.centre... | 203 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/CheckCollision/init.luau | --!native
--!optimize 2
local getCorrectionVector = require(script.GetCorrectionVector)
local support = require(script.Support)
local handlers = require(script.Handlers)
local handlersByLen = {
handlers.point,
handlers.line,
handlers.triangle,
}
local EvolveResult = {
NoIntersection = 1,
Intersection = 2,
Evolv... | 609 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/GetCollidingObjects.luau | --!native
--!optimize 2
local checkCollision = require(script.Parent.CheckCollision)
local function isFar(objectA, objectB)
local a = objectA.Instance
local b = objectB.Instance
local scaleA = objectA.HitboxScale
local scaleB = objectB.HitboxScale
local aw, ah = a.AbsoluteSize.X * scaleA, a.AbsoluteSize.Y * scal... | 854 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/GetCorners.luau | return function(object)
local instance = object.Instance
local size = instance.AbsoluteSize
local position = instance.AbsolutePosition
size = Vector3.new(size.X, size.Y, 0)
position = Vector3.new(position.X, position.Y, 0)
local hitboxSize = size * object.HitboxScale
local alignment = size * (1 - math.clamp(ob... | 290 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Geometry/SpatialGrid.luau | --!native
--!optimize 2
local SpatialGrid = {}
SpatialGrid.__index = SpatialGrid
function SpatialGrid.new(cellSize: number)
return setmetatable({
_cellSize = cellSize,
_cells = {},
}, SpatialGrid)
end
function SpatialGrid:clear()
for _, row in self._cells do
for _, cell in row do
table.clear(cell)
end
... | 521 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Graphics/Canvas2d.luau | local ContentManager = require(script.Parent.ContentManager)
local cache = {}
local exports = {}
exports.__index = exports
local function createCacheableImage(url)
local editableImage = ContentManager.createSafeEditableImage(url) :: EditableImage
local imageData = {
image = editableImage,
isFree = false,
}
ca... | 562 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Graphics/ContentManager.luau | local AssetService = game:GetService("AssetService")
local classes = script.Parent.Parent.Parent.Parent.Classes
local EventEmitter = require(classes.Internal.EventEmitter)
local cache = {}
local loading = {}
local events = EventEmitter.new()
local exports = {
cache = cache,
events = events,
loading = loading,
}
fu... | 440 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/CopyTable.luau | function copyTable(__table, copyIn)
local copy = copyIn or {}
for key, value in __table do
local valueType = typeof(value)
if valueType ~= "table" then
copy[key] = value
else
copy[key] = copyTable(value, copy[key])
end
end
return copy
end
return copyTable
| 77 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/Delete.luau | local appData = script.Parent.Parent.Parent.Parent.AppData
local data = require(appData.Data)
local default = {}
function delete(obj)
for key, val in (obj or default) do
local valueType = typeof(val)
if valueType ~= "table" and valueType ~= "Instance" then
obj[key] = nil
elseif valueType == "Instance" or val... | 119 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/Diff.luau | local function diff(newObj, oldObj)
local changes = {}
for key, newVal in newObj do
local oldVal = oldObj[key]
if type(newVal) == "table" and type(oldVal) == "table" then
local subChanges = diff(newVal, oldVal)
if next(subChanges) then
changes[key] = subChanges
end
elseif newVal ~= oldVal then
... | 112 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/Encoder.luau | --!nonstrict
local httpService = game:GetService("HttpService")
local encoder = {}
local encoders = {
UDim2 = function(data)
return {
X = {
Scale = data.X.Scale,
Offset = data.X.Offset,
},
Y = {
Scale = data.Y.Scale,
Offset = data.Y.Offset,
},
}
end,
Vector2 = function(data)
return... | 515 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/IsEqual.luau | function isEqual(first, second)
if first == second then
return true
elseif
first == nil
or second == nil
or typeof(first) ~= typeof(second)
or typeof(first) ~= "table" and typeof(second) ~= "table"
then
return false
end
local firstCount, secondCount = 0, 0
for key, value in first do
firstCount += 1... | 139 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Internal/Path.luau | local path = {}
function path.getRoute(object: Instance): string
local route = {}
local baseRoute = {}
local parent = object
while parent ~= game do
table.insert(baseRoute, parent.Name)
parent = parent.Parent
end
for i = #baseRoute, 1, -1 do
table.insert(route, baseRoute[i])
end
return table.concat(rou... | 135 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Math/IsOutScreen.luau | return function(position, size)
local resolution = workspace.CurrentCamera.ViewportSize
local fakeRes = resolution + size
-- stylua: ignore start
return position.X < -size.X
or position.Y < -size.Y
or position.X > fakeRes.X
or position.Y > fakeRes.Y
-- stylua: ignore end
end
| 77 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Math/SetSmoothPosition.luau | return function(object: PhysicalObject, smoothness: number, target: UDim2)
local alpha = 1 - math.clamp(smoothness, 0, 0.95)
local instance = object.Instance :: ImageLabel
local currentPosition = instance.Position
instance.Position = currentPosition:Lerp(target, alpha)
end
| 66 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/Replication/Handlers.luau | local data = require(script.Parent.Parent.Parent.Parent.AppData.Data)
local SceneManager = require(script.Parent.Parent.Parent.Parent.Services.SceneManager)
local handlers = {}
local function getObjectScene(object)
local sceneId = object and object.Scene or ""
return SceneManager:Get(sceneId)
end
local function sub... | 369 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Lib/Util/init.luau | local modules = {}
for _, val in script:GetDescendants() do
if not val.Name:match(".spec") and val.Parent:IsA("Folder") then
modules[val.Name] = require(val)
end
end
return modules
| 51 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/BaseTextTags.luau | local RunService = game:GetService("RunService")
local TextTag = require(script.Parent.Parent.Classes.Public.TextTag)
local frameRate = 60
local function createRandomDecayRenderFunction(defaultIntensity)
return function(label, i, args)
local intensity = args.intensity or defaultIntensity
local duration = args.dur... | 853 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/CrossPlatformTracker.luau | local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local uis = game:GetService("UserInputService")
local runService = game:GetService("RunService")
local upsideEngine = script.Parent.Parent
local crossPlatformService = require(upsideEngine.Services).CrossPlatformService
local ... | 1,467 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/CameraTracker.luau | local ToUDim2 = require(script.Parent.Parent.Parent.Lib.Util).ToUDim2
local function isOutsideLimits(target, limits, margin)
return target.X < limits.X - margin
or target.X > 1 - limits.X + margin
or target.Y < limits.Y - margin
or target.Y > 1 - limits.Y + margin
end
return function(scene, deltaTime)
local c... | 237 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/ParallaxTracker.luau | local setSmoothPosition = require(script.Parent.Parent.Parent.Lib.Util.Math.SetSmoothPosition)
return function(scene: Scene)
local camera = scene.Camera
local subject = camera.Subject and camera.Subject.Instance
if not subject then
return
end
for _, parallax in scene.Objects.Content do
if not parallax:IsA("Pa... | 136 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/ParticleTracker.luau | return function(scene, deltaTime)
local cl = os.clock()
for _, particle in scene.ParticleEnvironment.Content do
if cl - particle.Clock < particle.LifeTime/particle.Rate then
continue
end
particle.Clock = cl
particle:Emit(particle.Rate * deltaTime)
end
end | 69 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/Physics.luau | --!native
--!optimize 2
local upsideEngine = script.Parent.Parent.Parent
local ToUDim2 = require(script.Parent.Parent.Parent.Lib.Util.DataType.ToUDim2)
local getCollidingObjects = require(script.Parent.Parent.Parent.Lib.Util.Geometry.GetCollidingObjects)
local SpatialGrid = require(script.Parent.Parent.Parent.Lib.Util.... | 1,588 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/ProximityPromptTracker.luau | local TweenService = game:GetService("TweenService")
local getDistance = require(script.Parent.Parent.Parent.Lib.Util.Math.GetDistance)
local function setProximityPromptVisible(proximityPrompt, visible)
local targetTransparency = if visible then 0 else 1
local tweenInfo = TweenInfo.new(proximityPrompt.FadeDuration, ... | 539 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/SoundTracker.luau | local util = require(script.Parent.Parent.Parent.Lib.Util)
local getDistance = require(script.Parent.Parent.Parent.Lib.Util.Math.GetDistance)
local normalize = util.Normalize
return function(scene)
if not scene.Camera.Subject or not scene.Camera.Subject.Instance then
return
end
for _, sound in scene.SoundEnviron... | 200 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/SpritePlayer.luau | local IsOutScreen = require(script.Parent.Parent.Parent.Lib.Util).IsOutScreen
local function axeStep(active, axe, max)
local index = active.CurrentFrame[axe]
local value = index <= max - 1 and index + 1 or 0
active.CurrentFrame =
Vector2.new(axe == "X" and value or active.CurrentFrame["X"], axe == "Y" and value o... | 511 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/EveryStep/parallel.luau | return function(scene)
local lighting = scene.LightingEnvironment
local shaders = scene.ShaderEnvironment
lighting.__actrees:SetVariable("lights", lighting.Content)
shaders.__actor:SetVariable("shadable", shaders.Content)
end
| 49 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/Networking.luau | local upsideEngine = script.Parent.Parent
local runService = game:GetService("RunService")
local players = game:GetService("Players")
local request = require(script.Parent.Parent.Classes.Internal.Request)
local ToVector2 = require(script.Parent.Parent.Lib.Util.DataType.ToVector2)
local merge = require(script.Parent.Pa... | 1,523 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/ProximityPromptInput.luau | local CrossPlatformService = require(script.Parent.Parent.Services.CrossPlatformService)
local SceneManager = require(script.Parent.Parent.Services.SceneManager)
local function emitTriggerEvent(input, eventName)
for _, scene in SceneManager.ActiveScenes do
for _, object in scene.Objects do
if not object:IsA("Pro... | 157 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Runtime/Runner.luau | --!native
local upsideEngine = script.Parent.Parent
local stepFolder = script:FindFirstAncestorOfClass("Folder").EveryStep
local runService = game:GetService("RunService")
local sceneManager = require(upsideEngine.Services.SceneManager)
local childs = stepFolder:GetChildren()
local trackers = {}
for _, tracker in ch... | 372 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/AuthorityService.luau | local upsideEngine = script.Parent.Parent
local eventEmitter = require(upsideEngine.Classes.Internal.EventEmitter)
local authorityService = {}
authorityService.__index = authorityService
function authorityService.new()
local self = eventEmitter.new()
self:SetClassName(script.Name)
self.AuthorityAssignments = {}
... | 374 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/CrossPlatformService.luau | local UserInputService = game:GetService("UserInputService")
local upsideEngine = script.Parent.Parent
local classes = upsideEngine.Classes
local character = require(script.Parent.Parent.Classes.Public.Character)
local eventEmitter = require(classes.Internal.EventEmitter)
local crossPlatformService = {}
crossPlatformS... | 1,437 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/NetworkingService.luau | local upsideEngine = script.Parent.Parent
local copyTable = require(script.Parent.Parent.Lib.Util.Internal.CopyTable)
local diff = require(script.Parent.Parent.Lib.Util.Internal.Diff)
local eventEmitter = require(upsideEngine.Classes.Internal.EventEmitter)
local request = require(upsideEngine.Classes.Internal.Request)
... | 904 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/PluginSupportService.luau | local ue = script.Parent.Parent
local classes = ue.Classes
local objects = require(ue.AppData.Data).objects
local properties = require(ue.AppData.Properties)
local eventEmitter = require(classes.Internal.EventEmitter)
local encoder = require(ue.Lib.Util).Encoder
local runService = game:GetService("RunService")
local ... | 1,105 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/SceneManager.luau | local upsideEngine = script.Parent.Parent
local eventEmitter = require(upsideEngine.Classes.Internal.EventEmitter)
local sceneManager = {}
sceneManager.__index = sceneManager
function sceneManager.new()
local self = eventEmitter.new()
self.Scenes = {}
self.ActiveScenes = {}
return setmetatable(self, sceneManager... | 277 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/TextTagService.luau | local BaseClass = require(script.Parent.Parent.Classes.Internal.BaseClass)
local TextTagService = {}
TextTagService.__index = TextTagService
function TextTagService.new()
local self = BaseClass.new()
self:SetClassName(script.Name)
self.TextTags = {}
return setmetatable(self, TextTagService)
end
function TextTagS... | 124 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Services/init.luau | local module = {}
for _, Service in script:GetChildren() do
if not Service.Name:match(".spec") then
module[Service.Name] = require(Service)
end
end
return module
| 42 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Systems/Lighting.luau | local AssetService = game:GetService("AssetService")
local Canvas2d = require(script.Parent.Parent.Lib.Util.Graphics.Canvas2d)
local getDistance = require(script.Parent.Parent.Lib.Util.Math.GetDistance)
local normalize = require(script.Parent.Parent.Lib.Util.Math.Normalize)
local IsOutScreen = require(script.Parent.Par... | 2,531 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/Systems/Shading.luau | local path = require(script.Parent.Parent.Lib.Util.Internal.Path)
local isOutScreen = require(script.Parent.Parent.Lib.Util.Math.IsOutScreen)
local Canvas2d = require(script.Parent.Parent.Lib.Util.Graphics.Canvas2d)
local ContentManager = require(script.Parent.Parent.Lib.Util.Graphics.ContentManager)
local shadingSyst... | 2,491 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/UpsideEngine.luau | local parent = script.Parent
local classes = {}
local services = require(parent.Services)
local upsideWorkspace = require(parent.AppData.Data).workSpace
local upsideEngine = {}
upsideEngine.Version = "v3.3.0"
upsideEngine.Workspace = upsideWorkspace
function upsideEngine.new(name: string)
return classes[name].new()... | 139 |
notreux/UpsideEngine | notreux-UpsideEngine-109282e/src/init.luau | local types = require(script["init.d"])
local upsideEngine = require(script.UpsideEngine)
local runService = game:GetService("RunService")
local isServer = runService:IsServer()
local function destroy()
if isServer or not script.Lib:FindFirstChild("Data") then
return
end
script.AppData.Data:Destroy()
script.Lib... | 158 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/App.luau | local plugin = script:FindFirstAncestorWhichIsA("Plugin")
local Players = game:GetService("Players")
local ContentProvider = game:GetService("ContentProvider")
local UserService = game:GetService("UserService")
local MarketplaceService = game:GetService("MarketplaceService")
local HttpService = game:GetService("HttpSe... | 7,330 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/ClientFalbackApp/init.luau | -- If the user is play-testing on the client, fallback to this since the plugin won't work
local plugin = script:FindFirstAncestorOfClass("Plugin")
local ClientFallbackApp = {}
ClientFallbackApp.__index = ClientFallbackApp
local Theme = require(script.Parent.UI.Theme).global
local StyleState = script.Parent.UI.Style... | 416 |
pinehappi/DataDelve | pinehappi-DataDelve-191db10/src/DeserializerState.luau | --!strict
-- Stuff for deserialization with buffers.
local plugin = script:FindFirstAncestorOfClass("Plugin")
local DESERIALIZATION_KEY = "DataDelve_Deserialization"
type PlaceSettings = {
-- path to the default deserializer
defaultDeserializer: {string}?,
}
type DeserializationSettings = {
[--[[placeId:]] stri... | 957 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.