repo stringclasses 341
values | file_path stringlengths 29 173 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 2 1.66M | tokens int64 2 598k |
|---|---|---|---|---|---|
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/examples/Server/Observers/Hazards.luau | luau | .luau | local ReplicatedStorage = game:GetService('ReplicatedStorage')
local RunService = game:GetService('RunService')
local QuickZone = require(ReplicatedStorage.QuickZone)
local SharedGroups = require(ReplicatedStorage.Common.Groups)
local SharedZones = require(ReplicatedStorage.Common.Zones)
local hazardObserver = QuickZ... | 262 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/examples/Server/Observers/SafeZone.luau | luau | .luau | local ReplicatedStorage = game:GetService('ReplicatedStorage')
local QuickZone = require(ReplicatedStorage.QuickZone)
local SharedGroups = require(ReplicatedStorage.Common.Groups)
local safeZonePart = workspace:WaitForChild('SafeZone')
local safeZone = QuickZone.Zone.fromPart(safeZonePart)
local safeObserver = Quick... | 226 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/examples/Server/Runtime.server.luau | luau | .luau | local ReplicatedStorage = game:GetService('ReplicatedStorage')
local QuickZone = require(ReplicatedStorage.QuickZone)
QuickZone:configure({
enabled = true,
autoSyncRate = 30,
frameBudget = 1,
})
for _, instance in script.Parent.Observers:GetChildren() do
if instance:IsA('ModuleScript') then
require(instance)
e... | 82 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Classes/Group.luau | luau | .luau | --!strict
--[=[
@class Group
Groups represent a collection of entities that should be tracked by the system.
:::info Observer
Every entity must be in a group to be observed.
:::
]=]
local CollectionService = game:GetService('CollectionService')
local Players = game:GetService('Players')
local RunService = game... | 4,480 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Classes/Observer.luau | luau | .luau | --!strict
--[=[
@class Observer
Observers are the logical bridge between Groups and Zones.
They monitor specific groups and trigger events when entities within those
groups enter or exit any zones associated with the observer.
]=]
local Players = game:GetService('Players')
local RunService = game:GetService('Ru... | 10,350 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Config.luau | luau | .luau | --!strict
local Config = {}
-- Static enums used to determine how to read an entity's position
Config.Strategy = {
POS = 1,
PRIM = 2,
WORLD = 3,
CFRAME = 4,
TRANSFORM = 5,
PIVOT = 6,
}
Config.Group = {
-- Entities are automatically cleaned up for that group if destroyed
autoClean = true,
}
Config.Scheduler ... | 372 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Core/PlayerTracker.luau | luau | .luau | --!strict
local Players = game:GetService('Players')
local Types = require(script.Parent.Parent.Types)
local State = require(script.Parent.State)
local activeTrackers = {} :: { [Player]: () -> () }
local playerSubscriptions = {} :: { [Player]: { [number]: Types.InternalGroup } }
local PlayerTracker = {}
local func... | 904 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Core/Scheduler.luau | luau | .luau | --!native
--!optimize 2
--!strict
local RunService = game:GetService('RunService')
local Config = require(script.Parent.Parent.Config)
local Types = require(script.Parent.Parent.Types)
local Geometry = require(script.Parent.Parent.Utils.Geometry)
local LinearBVH = require(script.Parent.Parent.Utils.LinearBVH)
local L... | 3,871 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Core/State.luau | luau | .luau | --!strict
local Types = require(script.Parent.Parent.Types)
local State = {
nextZoneId = 1,
nextObserverId = 1,
nextGroupId = 1,
staticCFrames = {} :: { [number]: CFrame },
staticHalfSizes = {} :: { [number]: Vector3 },
staticTypes = {} :: { [number]: number },
dynamicCFrames = {} :: { [number]: CFrame },
d... | 643 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Types.luau | luau | .luau | --!strict
--[=[
@type ShapeType "Block" | "Ball" | "Cylinder" | "Wedge" | "CornerWedge"
@within QuickZone
The geometric shape of a Zone.
]=]
export type ShapeType = 'Block' | 'Ball' | 'Cylinder' | 'Wedge' | 'CornerWedge'
--[=[
@interface EntityTable
@within QuickZone
.Position Vector3?
.WorldPosition Vector3?
... | 3,242 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Utils/Geometry.luau | luau | .luau | --!native
--!optimize 2
--!strict
local BLOCK_SHAPE_VALUE = Enum.PartType.Block.Value
local BALL_SHAPE_VALUE = Enum.PartType.Ball.Value
local CYLINDER_SHAPE_VALUE = Enum.PartType.Cylinder.Value
local WEDGE_SHAPE_VALUE = Enum.PartType.Wedge.Value
local CORNER_WEDGE_SHAPE_VALUE = Enum.PartType.CornerWedge.Value
local M... | 1,320 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Utils/LinearBVH.luau | luau | .luau | --!native
--!optimize 2
--!strict
local Geometry = require(script.Parent.Geometry)
local Types = require(script.Parent.Parent.Types)
local HUGE_VECTOR = vector.one * math.huge
local NEGATIVE_HUGE_VECTOR = -HUGE_VECTOR
local unionBounds = Geometry.unionBounds
local getObjectBounds = Geometry.getObjectBounds
local get... | 1,415 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/Utils/Log.luau | luau | .luau | --!strict
local Log = {}
local function formatLog(messageTemplate: string, trace: string?, ...: any): string
local messageText = string.format(messageTemplate, ...)
messageText = `[QuickZone] {messageText}`
local finalTrace = trace or debug.traceback('', 3)
if finalTrace ~= '' then
messageText ..= ` \n---- S... | 232 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/src/init.luau | luau | .luau | --!strict
--v1.4.6 • LDGerrits
--[=[
@class QuickZone
A high-performance, physics-free spatial query library for Roblox. Maintain 60 FPS with 1M+ zones.
]=]
local RunService = game:GetService('RunService')
local Types = require(script.Types)
local Config = require(script.Config)
local Scheduler = require(script.Co... | 4,973 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Runtime.server.luau | luau | .luau | --!strict
local ServerScriptService = game:GetService('ServerScriptService')
local TestFolder = ServerScriptService.Test
local TiniestFolder = TestFolder.Tiniest
local SpecificationsFolder = TestFolder.Specifications
local Tiniest = require(TiniestFolder.tiniest_for_roblox).configure({})
local tests = Tiniest.collec... | 149 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Tiniest/tiniest.luau | luau | .luau | -- From dphfox/tiniest, licenced under BSD
--!strict
local tiniest_plugin = require("./tiniest_plugin")
type Context = DescribeContext | RunContext
type DescribeContext = {
type: "describe",
labels: {string},
add_test: (Test) -> ()
}
type RunContext = {
type: "run"
}
export type ErrorReport = {
type: "tiniest... | 1,423 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Tiniest/tiniest_expect.luau | luau | .luau | -- From dphfox/tiniest, licenced under BSD
--!strict
local tiniest_quote = require("./tiniest_quote")
local tiniest_expect = {}
type Context = {
target: unknown,
test: string,
params: {unknown}
}
local context: Context = {
target = nil,
test = "",
params = {}
}
local function fail(
message: string?
): never... | 1,098 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Tiniest/tiniest_for_roblox.luau | luau | .luau | -- From dphfox/tiniest, licenced under BSD
--!strict
local tiniest_expect = require("./tiniest_expect")
local tiniest_time = require("./tiniest_time")
local tiniest_pretty = require("./tiniest_pretty")
local tiniest = require("./tiniest")
export type Options = {
snapshot_path: string?,
save_snapshots: boolean?,
pr... | 675 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Tiniest/tiniest_plugin.luau | luau | .luau | -- From dphfox/tiniest, licenced under BSD
--!strict
export type Plugin = {
is_tiniest_plugin: true
}
local tiniest_plugin = {}
function tiniest_plugin.configure(
plugins: {any}?
)
if plugins ~= nil then
for index, plugin in plugins do
if not plugin.is_tiniest_plugin then
error(`sanity check: plugin #{in... | 186 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Tiniest/tiniest_pretty.luau | luau | .luau | -- From dphfox/tiniest, licenced under BSD
--!strict
local tiniest_plugin = require("./tiniest_plugin")
local tiniest = require("./tiniest")
type Test = tiniest.Test
type TestRunResult = tiniest.TestRunResult
type RunResult = tiniest.RunResult
export type Options = {
plugins: nil | {tiniest_plugin.Plugin},
disable_... | 1,820 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Tiniest/tiniest_quote.luau | luau | .luau | -- From dphfox/tiniest, licenced under BSD
--!strict
local function tiniest_quote(
x: unknown,
given_indent_amount: number?
): string
if
type(x) == "nil" or
type(x) == "number" or
type(x) == "boolean" or
type(x) == "userdata"
then
return tostring(x)
elseif type(x) == "string" then
return string.fo... | 434 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Tiniest/tiniest_time.luau | luau | .luau | -- From dphfox/tiniest, licenced under BSD
--!strict
local tiniest = require("./tiniest")
local tiniest_pretty = require("./tiniest_pretty")
type Test = tiniest.Test
export type TestRunResult = tiniest.TestRunResult & {
duration: number
}
export type RunResult = tiniest.RunResult & {
duration: number
}
export type... | 642 |
LDGerrits/QuickZone | LDGerrits-QuickZone-f3ae260/tests/Util.luau | luau | .luau | --!strict
type InstanceTree = {
className: string,
properties: { [string]: any }?,
children: { InstanceTree }?,
}
local PART_DEFAULTS: { [string]: any } = {
Transparency = 1,
Anchored = true,
CanCollide = false,
CanQuery = false,
CanTouch = false,
AudioCanCollide = false,
EnableFluidForces = false,
}
local ... | 318 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/client/todos.client.lua | luau | .lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local remotes = require(ReplicatedStorage.Shared.remotes)
local names = require(ReplicatedStorage.Shared.names)
local todos: { string } = {}
local function addTodo()
remotes.addTodo:fire(names.getRandomName())
end
local function removeTodo()
if #todos... | 214 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/server/todos.server.lua | luau | .lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local remotes = require(ReplicatedStorage.Shared.remotes)
local todos: { string } = { "Milk", "Eggs" }
local changed = false
remotes.addTodo:connect(function(player, todo)
table.insert(todos, todo)
chang... | 181 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/shared/names.lua | luau | .lua | local names = {
"Milk",
"Eggs",
"Bread",
"Butter",
"Cheese",
"Bacon",
"Sausage",
"Ham",
"Chicken",
"Beef",
"Pork",
"Fish",
"Rice",
"Pasta",
"Potatoes",
"Onions",
"Garlic",
"Tomatoes",
"Carrots",
"Peppers",
"Lettuce",
"Cucumber",
"Mushrooms",
"Spinach",
"Broccoli",
"Cauliflower",
"Celery",
"A... | 540 |
littensy/remo | littensy-remo-da8fe74/examples/lua/src/shared/remotes.lua | luau | .lua | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Remo = require(ReplicatedStorage.Packages.Remo)
local t = require(ReplicatedStorage.Packages.t)
type Remotes = Remo.Remotes<{
addTodo: Remo.ClientToServer<string>,
removeTodo: Remo.ClientToServer<string>,
getTodos: Remo.ServerAsync<(), ({ string ... | 171 |
littensy/remo | littensy-remo-da8fe74/examples/ts/src/server/todos.server.ts | roblox-ts | .ts | import { RunService } from "@rbxts/services";
import { remotes } from "shared/remotes";
const todos: string[] = ["Milk", "Eggs"];
let changed = false;
remotes.addTodo.connect((player, todo) => {
todos.push(todo);
changed = true;
});
remotes.removeTodo.connect((player, todo) => {
todos.remove(todos.indexOf(todo));... | 153 |
littensy/remo | littensy-remo-da8fe74/examples/ts/src/shared/remotes.ts | roblox-ts | .ts | import { Client, Server, createRemotes, loggerMiddleware, remote } from "@rbxts/remo";
import { t } from "@rbxts/t";
const todo = t.string;
const todoList = t.array(todo);
export const remotes = createRemotes(
{
// add a todo to the server
addTodo: remote<Server, [name: string]>(todo),
// remove a todo from t... | 168 |
littensy/remo | littensy-remo-da8fe74/scripts/spec.server.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TestEZ: any = require(ReplicatedStorage.DevPackages.TestEZ)
TestEZ.TestBootstrap:run({
ReplicatedStorage.Packages.Remo,
})
| 46 |
littensy/remo | littensy-remo-da8fe74/scripts/testez.d.luau | luau | .luau | declare function afterAll(callback: () -> ()): ()
declare function afterEach(callback: () -> ()): ()
declare function beforeAll(callback: () -> ()): ()
declare function beforeEach(callback: () -> ()): ()
declare function describe(phrase: string, callback: () -> ()): ()
declare function describeFOCUS(phrase: string, c... | 246 |
littensy/remo | littensy-remo-da8fe74/src/Promise.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local include = script:FindFirstAncestor("rbxts_include")
or script:FindFirstAncestor("include")
or ReplicatedStorage:FindFirstChild("rbxts_include")
or script.Parent.Parent
export type PromiseStatus = "Started" | "Resolved" | "Rejected" | "Cancelled"
... | 1,174 |
littensy/remo | littensy-remo-da8fe74/src/client/createRemote.luau | luau | .luau | local Promise = require(script.Parent.Parent.Promise)
local types = require(script.Parent.Parent.types)
local compose = require(script.Parent.Parent.utils.compose)
local instances = require(script.Parent.Parent.utils.instances)
local testRemote = require(script.Parent.Parent.utils.testRemote)
local function createRem... | 729 |
littensy/remo | littensy-remo-da8fe74/src/constants.luau | luau | .luau | local RunService = game:GetService("RunService")
return {
IS_EDIT = RunService:IsStudio() and not RunService:IsRunning(),
IS_STUDIO = RunService:IsStudio(),
IS_CLIENT = RunService:IsClient(),
IS_SERVER = RunService:IsServer(),
IS_TEST = false,
}
| 64 |
littensy/remo | littensy-remo-da8fe74/src/getSender.luau | luau | .luau | local constants = require(script.Parent.constants)
local function getSender(player: any): Player?
if
constants.IS_SERVER
and (type(player) == "table" or typeof(player) == "Instance")
and player.ClassName == "Player"
then
return player :: Player
end
return nil
end
return getSender
| 72 |
littensy/remo | littensy-remo-da8fe74/src/middleware/loggerMiddleware.luau | luau | .luau | local types = require(script.Parent.Parent.types)
local constants = require(script.Parent.Parent.constants)
local SCOPE = constants.IS_SERVER and "client → server" or "server → client"
local function stringify(...)
local output = {}
for index = 1, select("#", ...) do
local value = select(index, ...)
table.ins... | 317 |
littensy/remo | littensy-remo-da8fe74/src/middleware/throttleMiddleware.luau | luau | .luau | local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Promise = require(script.Parent.Parent.Promise)
local types = require(script.Parent.Parent.types)
local constants = require(script.Parent.Parent.constants)
local getSender = require(script.Parent.Parent.getSender)
local ... | 946 |
littensy/remo | littensy-remo-da8fe74/src/server/createRemote.luau | luau | .luau | local Players = game:GetService("Players")
local Promise = require(script.Parent.Parent.Promise)
local types = require(script.Parent.Parent.types)
local compose = require(script.Parent.Parent.utils.compose)
local instances = require(script.Parent.Parent.utils.instances)
local testRemote = require(script.Parent.Parent... | 676 |
littensy/remo | littensy-remo-da8fe74/src/utils/compose.luau | luau | .luau | local types = require(script.Parent.Parent.types)
local function compose(middlewares: { types.Middleware }): types.Middleware
local length = #middlewares
if length == 0 then
return function(next)
return next
end
elseif length == 1 then
return middlewares[1]
end
return function(next, ...)
for index = ... | 108 |
littensy/remo | littensy-remo-da8fe74/src/utils/instances.luau | luau | .luau | local Promise = require(script.Parent.Parent.Promise)
local constants = require(script.Parent.Parent.constants)
local mockRemotes = require(script.Parent.mockRemotes)
local container = script.Parent.Parent.container
local function promiseRemoteFunction(name: string): Promise.Promise<RemoteFunction>
if container:Find... | 415 |
littensy/remo | littensy-remo-da8fe74/src/utils/mockRemotes.luau | luau | .luau | local Players = game:GetService("Players")
local mockRemoteEvents: { [string]: RemoteEvent } = {}
local mockRemoteFunctions: { [string]: RemoteFunction } = {}
local function createMockRemoteEvent(name: string): RemoteEvent
if mockRemoteEvents[name] then
return mockRemoteEvents[name]
end
local remoteEvent: Remot... | 657 |
littensy/remo | littensy-remo-da8fe74/src/utils/testRemote.luau | luau | .luau | local types = require(script.Parent.Parent.types)
local getSender = require(script.Parent.Parent.getSender)
local function noop() end
local function createTestRemote(): types.TestRemote
local listeners: { (...any) -> () } = {}
local nextListenerId = 0
local function fire(_self, first, ...)
local shouldOmitPlaye... | 389 |
littensy/remo | littensy-remo-da8fe74/src/utils/unwrap.luau | luau | .luau | local Promise = require(script.Parent.Parent.Promise)
type Promise<T> = Promise.Promise<T>
local function unwrap<T, U...>(promise: T | Promise<T>?, ...: U...): (T, U...)
if Promise.is(promise) then
return (promise :: Promise<T>):expect()
end
return promise :: T, ...
end
return unwrap
| 75 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/Types/luau/footer.luau | luau | .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-6d8c04d/Types/luau/header.luau | luau | .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-6d8c04d/Types/typescript/footer.ts | roblox-ts | .ts | interface upsideEngine {
Version: string;
Workspace: {};
new: ((name: "PhysicalObject") => PhysicalObject)
& ((name: "Sprite") => Sprite)
& ((name: "StaticObject") => StaticObject)
& ((name: "Fluid") => Fluid)
& ((name: "Parallax") => Parallax)
& ((name: "Sound") => Sound)
& ((name: "Environment") => Env... | 315 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/bin/start.server.luau | luau | .luau | local replicatedStorage = game:GetService("ReplicatedStorage")
local upsideEngine = replicatedStorage:WaitForChild("UpsideEngine") :: ModuleScript
require(upsideEngine)
| 36 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/bin/tests-runner.server.luau | luau | .luau | local TestEZ = require(script.Parent.DevPackages.TestEZ)
TestEZ.TestBootstrap:run({
script.Parent.UpsideEngine,
}) | 28 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/src/AppData/Properties.luau | luau | .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-6d8c04d/src/Classes/Internal/Actor.luau | luau | .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-6d8c04d/src/Classes/Internal/Actrees.luau | luau | .luau | local actrees = {}
actrees.__index = actrees
function actrees.new()
return setmetatable({
__actors = {},
}, actrees)
end
function actrees:AddActor(actor)
table.insert(self.__actors, actor)
end
function actrees:SetVariable(name, value)
for _, actor in self do
actor.instance:SendMessage("setVariable", name, va... | 105 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/src/Classes/Internal/BaseClass.luau | luau | .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-6d8c04d/src/Classes/Internal/BaseObject.luau | luau | .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-6d8c04d/src/Classes/Internal/Camera.luau | luau | .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-6d8c04d/src/Classes/Internal/Connection.luau | luau | .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-6d8c04d/src/Classes/Internal/EventEmitter.luau | luau | .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-6d8c04d/src/Classes/Internal/LightingEnvironment.luau | luau | .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,134 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/src/Classes/Internal/ObjectEnvironment.luau | luau | .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-6d8c04d/src/Classes/Internal/ParticleEnvironment.luau | luau | .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-6d8c04d/src/Classes/Internal/Request.luau | luau | .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-6d8c04d/src/Classes/Internal/ShaderEnvironment.luau | luau | .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-6d8c04d/src/Classes/Internal/SoundEnvironment.luau | luau | .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-6d8c04d/src/Classes/Public/Character.luau | luau | .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-6d8c04d/src/Classes/Public/Environment.luau | luau | .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-6d8c04d/src/Classes/Public/Fluid.luau | luau | .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-6d8c04d/src/Classes/Public/Light.luau | luau | .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-6d8c04d/src/Classes/Public/Parallax.luau | luau | .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-6d8c04d/src/Classes/Public/Particle.luau | luau | .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-6d8c04d/src/Classes/Public/ProximityPrompt.spec2D.luau | luau | .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-6d8c04d/src/Classes/Public/ProximityPrompt2D.luau | luau | .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-6d8c04d/src/Classes/Public/ReactiveLabel.luau | luau | .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-6d8c04d/src/Classes/Public/Scene.luau | luau | .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-6d8c04d/src/Classes/Public/Shader.luau | luau | .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-6d8c04d/src/Classes/Public/Sound.luau | luau | .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-6d8c04d/src/Classes/Public/Sprite.luau | luau | .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-6d8c04d/src/Classes/Public/StaticObject.luau | luau | .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-6d8c04d/src/Classes/Public/TextTag.luau | luau | .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-6d8c04d/src/Lib/ActorLoader.client.luau | luau | .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-6d8c04d/src/Lib/Util/DataType/ToUDim2.luau | luau | .luau | return function(v2)
return UDim2.fromOffset(v2.X, v2.Y)
end
| 21 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/src/Lib/Util/DataType/ToVector2.luau | luau | .luau | return function(u2, v)
return Vector2.new(u2.X[v], u2.Y[v])
end
| 23 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/src/Lib/Util/Generic/Merge.luau | luau | .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-6d8c04d/src/Lib/Util/Generic/Wrap.luau | luau | .luau | return function(f, ...)
local args = { ... }
return function(...)
f(unpack(args), ...)
end
end
| 25 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/src/Lib/Util/Geometry/CheckCollision/GetCorrectionVector.luau | luau | .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-6d8c04d/src/Lib/Util/Geometry/CheckCollision/Handlers.luau | luau | .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-6d8c04d/src/Lib/Util/Geometry/CheckCollision/Support.luau | luau | .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-6d8c04d/src/Lib/Util/Geometry/CheckCollision/init.luau | luau | .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-6d8c04d/src/Lib/Util/Geometry/GetCollidingObjects.luau | luau | .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-6d8c04d/src/Lib/Util/Geometry/GetCorners.luau | luau | .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-6d8c04d/src/Lib/Util/Geometry/SpatialGrid.luau | luau | .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-6d8c04d/src/Lib/Util/Graphics/Canvas2d.luau | luau | .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-6d8c04d/src/Lib/Util/Graphics/ContentManager.luau | luau | .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-6d8c04d/src/Lib/Util/Internal/CopyTable.luau | luau | .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-6d8c04d/src/Lib/Util/Internal/Delete.luau | luau | .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-6d8c04d/src/Lib/Util/Internal/Diff.luau | luau | .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-6d8c04d/src/Lib/Util/Internal/Encoder.luau | luau | .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-6d8c04d/src/Lib/Util/Internal/IsEqual.luau | luau | .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-6d8c04d/src/Lib/Util/Internal/Path.luau | luau | .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-6d8c04d/src/Lib/Util/Math/GetDistance.luau | luau | .luau | return function(v1, v2)
local direction = v1 - v2
return direction:Dot(direction)
end
| 25 |
notreux/UpsideEngine | notreux-UpsideEngine-6d8c04d/src/Lib/Util/Math/IsOutScreen.luau | luau | .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-6d8c04d/src/Lib/Util/Math/Normalize.luau | luau | .luau | return function(val, min, max)
return (val - min) / (max - min)
end
| 22 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.