repo stringclasses 350
values | file_path stringlengths 29 200 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 2 1.01M | tokens int64 2 598k |
|---|---|---|---|---|---|
weenachuangkud/FastCast2 | weenachuangkud-FastCast2-8e16a31/src/FastCastVMs/ClientVM.client.luau | luau | .luau | --[[
- Author : Mawin CK
- Date : 11/03/2025
]]
-- Modules
-- Variables
local actor = script:GetActor()
if actor == nil then
error("The script must placed inside of actor")
end
local BaseCastParallel = nil
local BaseCast = nil
-- Listeners
actor:BindToMessage("Init", function(Data: any?)
BaseCastParallel = req... | 550 |
weenachuangkud/FastCast2 | weenachuangkud-FastCast2-8e16a31/src/FastCastVMs/ServerVM.server.luau | luau | .luau | --[[
- Author : Mawin CK
- Date : 11/03/2025
]]
-- Modules
-- Variables
local actor = script:GetActor()
if actor == nil then
error("The script must placed inside of actor")
end
local BaseCastParallel = nil
local BaseCast = nil
-- Listeners
actor:BindToMessage("Init", function(Data : any?)
BaseCastParallel = r... | 638 |
weenachuangkud/FastCast2 | weenachuangkud-FastCast2-8e16a31/src/FastCastVMs/init.luau | luau | .luau | -- ******************************* --
-- AX3NX / AXEN --
-- ******************************* --
-- Modded by Mawin_CK
-- Desc : I make it more customizable and more easy to use :P
-- Services
local ReplicatedFirst = game:GetService("ReplicatedFirst")
local ServerScriptService = game:GetService("ServerScriptSer... | 1,421 |
weenachuangkud/FastCast2 | weenachuangkud-FastCast2-8e16a31/src/Motor6DCache.luau | luau | .luau | --[[
- Author : Mawin CK
- Date : 2026
Motor6D Pool for efficient projectile movement using Transform mode.
NOTE:
I'm sorry for stealing some code bro shoutout to DrSinek,
I just wanted to make it more efficient and I didn't want to rewrite the whole thing
]]
-- Services
local HTTPS = game:GetService("HttpSe... | 759 |
weenachuangkud/FastCast2 | weenachuangkud-FastCast2-8e16a31/src/ObjectCache.luau | luau | .luau | --[[
- Modded By Mawin_CK
Desc : i added __type = "ObjectCache" to letting FastCast Recongize that this is ObjectCache
]]
--[=[
@class ObjectCache
@private
@external ObjectCache https://devforum.roblox.com/t/objectcache-a-modern-blazing-fast-model-and-part-cache/3104112
ObjectCache usage should be derived from the... | 1,612 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/client/systems/roombasHurt.luau | luau | .luau | local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Matter = require(ReplicatedStorage.Packages.Matter)
local components = require(ReplicatedStorage.Shared.components)
local function roombasHurt(world)
for _, _, model in world:query(components.Roomba, compon... | 214 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/client/systems/spinSpinners.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local function spinSpinners(world, _, ui)
if ui.checkbox("Disable Spinning"):checked() then
return
end
local transparency = ui.slider(1)
local randomize = ui.button("Randomize colors!"... | 171 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/game.client.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local start = require(ReplicatedStorage.Shared.start)
local receiveReplication = require(ReplicatedStorage.Client.systems.receiveReplication)
local world, state = start({
ReplicatedStorage.Shared.systems,
ReplicatedStorage.Client.systems,
})
receiveRepl... | 75 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/mothershipsSpawnRoombas.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Matter = require(ReplicatedStorage.Packages.Matter)
local components = require(ReplicatedStorage.Shared.components)
local function mothershipsSpawnRoombas(world)
for id, model, lasering, transform in
world:query(components.Model, components.Laseri... | 271 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/removeMissingModels.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Matter = require(ReplicatedStorage.Packages.Matter)
local components = require(ReplicatedStorage.Shared.components)
local function removeMissingModels(world)
for id, model in world:query(components.Model) do
for _ in Matter.useEvent(model.model, "... | 190 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/replication.luau | luau | .luau | local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local routes = require(ReplicatedStorage.Shared.routes)
local useEvent = require(ReplicatedStorage.Packages.Matter).useEvent
local REPLICATED_COMPONE... | 378 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/roombasMove.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local function roombasMove(world)
local targets = {}
for _, model in world:query(components.Model, components.Target) do
table.insert(targets, model.model.PrimaryPart.CFrame.p)
end
for ... | 467 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/server/systems/spawnRoombas.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local function spawnRoombas(world)
for id, _ in world:query(components.Transform, components.Roomba):without(components.Model) do
local model = ReplicatedStorage.Assets.KillerRoomba:Clone()... | 119 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/shared/components.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Matter = require(ReplicatedStorage.Packages.Matter)
local COMPONENTS = {
"Roomba",
"Model",
"Charge",
"Health",
"Target",
"Transform",
"Mothership",
"Lasering",
"DebugLabel",
"Spinner",
}
local components = {}
for _, name in ipairs(COMPON... | 107 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/shared/routes.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage.Packages
type ComponentInstance<T> = T & { patch: (self: T, data: { any: any }) -> ComponentInstance<T> }
local Net = require(Packages.Net)
local Route = Net.Route
type Route<U...> = Net.Route<U...>
local defaultConfig... | 133 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/shared/start.luau | luau | .luau | local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Packages = ReplicatedStorage.Packages
local Matter = require(ReplicatedStorage.Packages.Matter)
local Plasma = require(Packages.Plasma)
local... | 594 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/examples/matter/src/shared/systems/updateModelAttribute.luau | luau | .luau | local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local components = require(ReplicatedStorage.Shared.components)
local name = RunService:IsServer() and "serverEntityId" or "clientEntityId"
local function updateModelAttribute(world)
for id, record in worl... | 102 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/Connection.luau | luau | .luau | type ConnectionImpl = {
__index: ConnectionImpl,
_callback: <U...>(U...) -> (),
connected: boolean,
disconnect: (Connection) -> (),
reconnect: (Connection) -> (),
new: <U...>(callback: (U...) -> ()) -> Connection,
}
export type Connection = typeof(setmetatable({} :: ConnectionImpl, {} :: ConnectionImpl))
--[... | 296 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/Identifier.luau | luau | .luau | local identifier = require("@serdes/datatypes/custom/identifier")
export type Identifier = buffer
local function new(uniquePosition: number?): buffer
return identifier.serialize(uniquePosition)
end
local function read(_buffer: buffer): number
return identifier.deserialize(_buffer)
end
return {
new = new,
read = ... | 66 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/QueryResult.luau | luau | .luau | local Bridge = require("@yetanothernet/Bridge")
type Bridge = Bridge.Bridge
type Recipient = Bridge.Recipient
type IncomingPacket = Bridge.IncomingPacket
type OutgoingPacket = Bridge.OutgoingPacket
type IncomingQueue = Bridge.IncomingQueue
type OutgoingQueue = Bridge.OutgoingQueue
type NetServer = Bridge.NetServer
... | 1,472 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/SendRequest.luau | luau | .luau | local RunService = game:GetService("RunService")
local Bridge = require("@yetanothernet/Bridge")
type Bridge = Bridge.Bridge
type Recipient = Bridge.Recipient
type IncomingPacket = Bridge.IncomingPacket
type OutgoingPacket = Bridge.OutgoingPacket
type IncomingQueue = Bridge.IncomingQueue
type OutgoingQueue = Bridge.... | 392 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__mocks__/mockBridge.luau | luau | .luau | --!nonstrict
local root = script.Parent.Parent
local Bridge = require(root.Bridge)
local utils = root.__utils__
local mockRemoteEvents = require(utils.mockRemoteEvents)
local mockPlayers = require(utils.mockPlayers)
local ServerRemoteEvent = mockRemoteEvents.ServerRemoteEvent
local ClientRemoteEvent = mockRemoteEvent... | 331 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/Bridge.test.luau | luau | .luau | local JestGlobals = require("@dev-packages/JestGlobals")
local Bridge = require("@yetanothernet/Bridge")
local beforeAll = JestGlobals.beforeAll
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local test = JestGlobals.test
local jest = JestGlobals.jest
local root = script.Parent.Parent
local Br... | 1,381 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/Identifier.test.luau | luau | .luau | local JestGlobals = require("@dev-packages/JestGlobals")
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local it = JestGlobals.it
local Identifier = require("@yetanothernet/Identifier")
describe("Identifier", function()
it("Should return unique strings", function()
local identifierOne = Id... | 147 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/Route.test.luau | luau | .luau | local Net = require("@yetanothernet")
local JestGlobals = require("@dev-packages/JestGlobals")
local beforeAll = JestGlobals.beforeAll
local afterEach = JestGlobals.afterEach
local beforeEach = JestGlobals.beforeEach
local describe = JestGlobals.describe
local expect = JestGlobals.expect
local test = JestGlobals.test
l... | 1,377 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/SendRequest.test.luau | luau | .luau | local JestGlobals = require("@dev-packages/JestGlobals")
local describe = JestGlobals.describe
local test = JestGlobals.test
local Identifier = require("@yetanothernet/Identifier")
local SendRequest = require("@yetanothernet/SendRequest")
describe("SendRequest", function()
test("When calling `to()`, should modify th... | 174 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__tests__/serdes.test.luau | luau | .luau | local Workspace = game:GetService("Workspace")
local JestGlobals = require("@dev-packages/JestGlobals")
local expect = JestGlobals.expect
local describe = JestGlobals.describe
local test = JestGlobals.test
local root = script.Parent.Parent
local typeToValue = {
array = { 1, 2, 3 },
dictionary = {
a = 1,
b = 2,... | 1,009 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__utils__/mockPlayers.luau | luau | .luau | local mockedPlayers = {}
function createPlayer()
local n = #mockedPlayers + 1
table.insert(mockedPlayers, {
__type = "Player",
Name = `MockPlayer{n}`,
UserId = -n,
})
return mockedPlayers[n]
end
function getAllPlayers()
return mockedPlayers
end
return {
createPlayer = createPlayer,
getAllPlayers = getA... | 85 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/__utils__/mockRemoteEvents.luau | luau | .luau | --!nocheck
local Signal = require("@dev-packages/Signal")
local clientRemotes = {}
local serverRemotes = {}
local ClientRemoteEvent = {}
ClientRemoteEvent.__index = ClientRemoteEvent
local mockPlayers = require("@yetanothernet/__utils__/mockPlayers")
function ClientRemoteEvent:FireServer(...: any)
local container... | 656 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/custom/identifier.luau | luau | .luau | --!native
local BUFFER_SIZE = 2
local nextIdentifier = 1
local function serialize(position: number?): buffer
if not position then
position = nextIdentifier
nextIdentifier += 1
end
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writeu16(_buffer, 0, position :: number)
return _buffer
end
local function ... | 128 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/primitive/boolean.luau | luau | .luau | --!native
local BUFFER_SIZE = 1
local _true = buffer.create(BUFFER_SIZE)
buffer.writei8(_true, 0, 1)
local _false = buffer.create(BUFFER_SIZE)
buffer.writei8(_false, 0, 0)
local _nil = buffer.create(BUFFER_SIZE)
buffer.writei8(_nil, 0, -1)
local function serialize(bool: boolean?): buffer
if bool == true then
re... | 188 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/primitive/buffer.luau | luau | .luau | --!native
--[[
This exists purely to add support for buffers into
Arrays, Dictionaries, and other custom types which may
contain a buffer.
Instead of defining unique behavior for buffers, this
module allows us to use the prexisting framework for
serializing/deserializing datatypes for buffers.... | 122 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/primitive/number.luau | luau | .luau | --!native
local BUFFER_SIZE = 4
local function serialize(number: number): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, number)
return _buffer
end
local function deserialize(_buffer: buffer): number
return buffer.readf32(_buffer, 0)
end
return {
serialize = serialize,
deseriali... | 94 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/primitive/string.luau | luau | .luau | --!native
local function serialize(_string: string): buffer
return buffer.fromstring(_string)
end
local function deserialize(_buffer: buffer): string
return buffer.tostring(_buffer)
end
return {
serialize = serialize,
deserialize = deserialize,
id = 5,
}
| 60 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/BrickColor.luau | luau | .luau | --!native
local BUFFER_SIZE = 2
local brickColorCache = {}
local function serialize(color: BrickColor): buffer
if brickColorCache[color.Number] then
return brickColorCache[color.Number]
end
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writeu16(_buffer, 0, color.Number)
brickColorCache[color.Number] = _... | 143 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/CFrame.luau | luau | .luau | --!native
local BUFFER_SIZE = 48
local function serialize(cframe: CFrame): buffer
local _buffer = buffer.create(BUFFER_SIZE)
local x, y, z, R00, R01, R02, R10, R11, R12, R20, R21, R22 = cframe:GetComponents()
buffer.writef32(_buffer, 0, x)
buffer.writef32(_buffer, 4, y)
buffer.writef32(_buffer, 8, z)
buffer.wri... | 468 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Color3.luau | luau | .luau | --!native
local BUFFER_SIZE = 12
local function serialize(color: Color3): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, color.R)
buffer.writef32(_buffer, 4, color.G)
buffer.writef32(_buffer, 8, color.B)
return _buffer
end
local function deserialize(_buffer: buffer): Color3
loca... | 161 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/DateTime.luau | luau | .luau | --!native
local BUFFER_SIZE = 8
local function serialize(dateTime: DateTime): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef64(_buffer, 0, dateTime.UnixTimestampMillis)
return _buffer
end
local function deserialize(_buffer: buffer): DateTime
return DateTime.fromUnixTimestampMillis(buffer.readf64... | 103 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/EnumItem.luau | luau | .luau | --!native
local enumMap = {}
for _, enum in Enum:GetEnums() do
enumMap[tostring(enum)] = {}
for _, enumItem in enum:GetEnumItems() do
enumMap[tostring(enum)][enumItem.Value] = enumItem
end
end
local enumItemCache = {}
local function serialize(enumItem: EnumItem): buffer
if enumItemCache[enumItem] then
retur... | 257 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Instance.luau | luau | .luau | --!native
local BUFFER_SIZE = 4
local nextIdentifer = 1
local instanceMap: { [number]: Instance } = {}
local function setIdentifier(identifier: number, instance: Instance)
instanceMap[tonumber(identifier) :: number] = instance
end
local function getInstanceMap()
return table.freeze(table.clone(instanceMap))
end
... | 222 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Rect.luau | luau | .luau | --!native
local vector2 = require("@serdes/datatypes/userdata/Vector2")
local BUFFER_SIZE = vector2.size * 2
local function serialize(rect: Rect): buffer
local min = vector2.serialize(rect.Min)
local max = vector2.serialize(rect.Max)
local _buffer = buffer.create(BUFFER_SIZE)
buffer.copy(_buffer, 0, min, 0, vec... | 226 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Region3.luau | luau | .luau | --!native
local cframe = require("@serdes/datatypes/userdata/CFrame")
local vector3 = require("@serdes/datatypes/userdata/Vector3")
local BUFFER_SIZE = cframe.size + vector3.size
local function serialize(region: Region3): buffer
local _cframe = cframe.serialize(region.CFrame)
local size = vector3.serialize(region.... | 283 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Region3int16.luau | luau | .luau | --!native
local vector3int16 = require("@serdes/datatypes/userdata/Vector3int16")
local BUFFER_SIZE = vector3int16.size * 2
local function serialize(region: Region3int16): buffer
local min = vector3int16.serialize(region.Min)
local max = vector3int16.serialize(region.Max)
local _buffer = buffer.create(BUFFER_SIZ... | 262 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/TweenInfo.luau | luau | .luau | --!native
local enumItem = require("@serdes/datatypes/userdata/EnumItem")
local number = require("@serdes/datatypes/primitive/number")
local boolean = require("@serdes/datatypes/primitive/boolean")
local _string = require("@serdes/datatypes/primitive/string")
local PARTIAL_BUFFER_SIZE = (number.size * 3) + boolean.si... | 866 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/UDim.luau | luau | .luau | --!native
local BUFFER_SIZE = 8
local function serialize(udim: UDim): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, udim.Scale)
buffer.writeu32(_buffer, 4, udim.Offset)
return _buffer
end
local function deserialize(_buffer: buffer): UDim
local scale = buffer.readf32(_buffer, 0)
... | 137 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/UDim2.luau | luau | .luau | --!native
local udim = require("@serdes/datatypes/userdata/UDim")
local BUFFER_SIZE = udim.size * 2
local function serialize(_udim: UDim2): buffer
local x = udim.serialize(_udim.X)
local y = udim.serialize(_udim.Y)
local _buffer = buffer.create(BUFFER_SIZE)
buffer.copy(_buffer, 0, x)
buffer.copy(_buffer, udim.... | 221 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Vector2.luau | luau | .luau | --!native
local BUFFER_SIZE = 8
local function serialize(vector: Vector2): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, vector.X)
buffer.writef32(_buffer, 4, vector.Y)
return _buffer
end
local function deserialize(_buffer: buffer): Vector2
local x = buffer.readf32(_buffer, 0)
... | 133 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Vector2int16.luau | luau | .luau | --!native
local BUFFER_SIZE = 4
local function serialize(vector: Vector2int16): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writei16(_buffer, 0, vector.X)
buffer.writei16(_buffer, 2, vector.Y)
return _buffer
end
local function deserialize(_buffer: buffer): Vector2int16
local x = buffer.readi16(_bu... | 139 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Vector3.luau | luau | .luau | --!native
local BUFFER_SIZE = 12
local function serialize(vector: Vector3): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writef32(_buffer, 0, vector.X)
buffer.writef32(_buffer, 4, vector.Y)
buffer.writef32(_buffer, 8, vector.Z)
return _buffer
end
local function deserialize(_buffer: buffer): Vector3... | 161 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/datatypes/userdata/Vector3int16.luau | luau | .luau | --!native
local BUFFER_SIZE = 6
local function serialize(vector: Vector3int16): buffer
local _buffer = buffer.create(BUFFER_SIZE)
buffer.writei16(_buffer, 0, vector.X)
buffer.writei16(_buffer, 2, vector.Y)
buffer.writei16(_buffer, 4, vector.Z)
return _buffer
end
local function deserialize(_buffer: buffer): Vec... | 167 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/lib/serdes/init.luau | luau | .luau | local array = require("@serdes/datatypes/custom/array")
local dictionary = require("@serdes/datatypes/custom/dictionary")
local boolean = require("@serdes/datatypes/primitive/boolean")
local number = require("@serdes/datatypes/primitive/number")
local _string = require("@serdes/datatypes/primitive/string")
local Bric... | 470 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/tests/jest.config.luau | luau | .luau | local Workspace = script.Parent
-- In case we need to specify a custom testSetupFile for a project, we need to do that in in a separate jest.config.lua file that's in the project's root folder.
-- Therefore we specify the project here and provide it to the "projects" field in this config file.
-- We also need to add t... | 209 |
YetAnotherClown/YetAnotherNet | YetAnotherClown-YetAnotherNet-a8f8f7e/tests/startJest.server.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Jest = require("@dev-packages/Jest")
Jest.runCLI(
script,
{
testPathPattern = { "\\.test$" },
testPathIgnorePatterns = { "DevPackages" },
verbose = true,
} :: any,
{
ReplicatedStorage,
}
):await()
| 79 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/lune/create-bindings-package.luau | luau | .luau | local fs = require("@lune/fs")
local serde = require("@lune/serde")
if fs.isDir("bindings-package") then
fs.removeDir("bindings-package")
end
fs.copy("src/Main/Bindings/Interface", "bindings-package")
-- fs.copy("LICENSE", "bindings-package/LICENSE")
local wallyToml = serde.decode("toml", fs.readFile("wally.toml"))... | 275 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/lune/create-uploader-standalone.luau | luau | .luau | local fs = require("@lune/fs")
local serde = require("@lune/serde")
if fs.isDir("uploader-src") then
fs.removeDir("uploader-src")
end
fs.copy("src", "uploader-src")
fs.removeFile("uploader-src/Builds/Plugin.luau")
fs.removeFile("uploader-src/Constants.luau")
fs.removeDir("uploader-src/Main/Bindings")
fs.removeDir(... | 232 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/lune/wally-install.luau | luau | .luau | local fs = require("@lune/fs")
local run = require("@utils/run")
run("wally", { "install" })
for _, folderName in { "Packages", "DevPackages", "ServerPackages" } do
if not fs.isDir(folderName) then
fs.writeDir(folderName)
end
end
run("rojo", { "sourcemap", "analysis.project.json", "-o", "sourcemap.json" })
for _... | 154 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Builds/Plugin.luau | luau | .luau | local RunService = game:GetService("RunService")
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local StudioMode = require(pluginRoot.Utilities.StudioMode)
local Constants = require(pluginRoot.Constants)
local StateManager = require(pluginRoot.Main.StateManager)
local Plugin = {}
local DISPLAY_SCALE_WARN... | 664 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Builds/Uploader.luau | luau | .luau | local RunService = game:GetService("RunService")
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Uploader = {}
-- Public
function Uploader.build(plugin: Plugin)
if not (RunService:IsStudio() and RunService:IsEdit()) then
return
end
local UploaderApp = require(pluginRoot.Main.UserInterface.Apps... | 123 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Constants.luau | luau | .luau | -- lune needs to be able to read this file
-- so do not use roblox data types
return {
CompactToolbarButton = false,
AllowExperimentalMode = true,
TileHighResImagesEnabled = true,
TileHighResImagesSize = { X = 1024, Y = 1024 },
MaxCaptureRectSize = { X = 2048, Y = 2048 },
GalleryImageControlsEnabled = true,
... | 125 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/Binding/init.luau | luau | .luau | local Binding = {}
local bindable = assert(script:FindFirstChild("Bindable") :: BindableFunction?)
-- Private
local function isConnected()
local pcallSuccess, invokeSuccess, result
local thread = task.spawn(function()
pcallSuccess = pcall(function()
invokeSuccess, result = bindable:Invoke("isConnected")
end)... | 343 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/Helpers/CachelessRequire.luau | luau | .luau | local ScriptEditorService = game:GetService("ScriptEditorService") :: ScriptEditorService
local CachelessRequire = {}
-- Private
local function getExecutionCallback(script: LuaSourceContainer, params: { string })
local tmpScript = Instance.new("ModuleScript")
tmpScript.Name = script.Name
tmpScript.Archivable = fa... | 459 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/Helpers/RenderRect.luau | luau | .luau | -- this module handles calculating rects as they would be rendered on a screen.
-- since there's no such thing as half a pixel, what's actually rendered
-- can change by a pixel or two.
local RenderRect = {}
function RenderRect.fromAbs(position: Vector2, size: Vector2)
local minX = math.round(position.X)
local minY... | 233 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/Helpers/Reversible.luau | luau | .luau | local SelectionService = game:GetService("Selection") :: Selection
local ChangeHistoryService = game:GetService("ChangeHistoryService") :: ChangeHistoryService
local Reversible = {}
-- Private
local pcall: <T...>((T...) -> (), T...) -> (boolean, string?) = pcall :: any
local function simpleFuture<T>()
local result... | 775 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/Templates/BatchUI/Action.luau | luau | .luau | --[[
Instructions:
1. Copy this template to the StarterGui.
2. Place all the UI elements you'd like to capture in the CaptureFolder.
3. Run `require(game.ServerStorage.Photobooth.Bindings).execute(game.StarterGui.BatchUI.Action)` in the command bar.
4. After completion your captures will be in a timestamped fo... | 369 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/Templates/FitToFrame/Action.luau | luau | .luau | --[[
Instructions:
1. Copy this template to the StarterGui.
2. Create a folder in the workspace named "FitToFrameTargets" and put all the models you want to capture in it.
3. Hide everything that is not in the target folder so that it is not visible in the workspace.
4. Resize the "CaptureFrame" to your desire... | 1,058 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/Templates/StaticFrame/Action.luau | luau | .luau | --[[
Instructions:
1. Copy this template to the StarterGui.
2. Create a folder in the workspace named "StaticFrameTargets" and put all the models you want to capture in it.
3. Hide everything that is not in the target folder so that it is not visible in the workspace.
4. Resize the "CaptureFrame" to your desir... | 642 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/Types.luau | luau | .luau | export type UICaptureTypes = "NoBackground" | "AlphaMask"
export type ViewportCaptureTypes = "Unmodified" | "NoSkybox"
export type CaptureViewportOptions = {
rect: Rect,
type: ViewportCaptureTypes,
delay: number?,
scale: Vector2?,
alphaBleed: boolean?,
}
export type CaptureUIOptions = {
subject: GuiObject,
ty... | 124 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Interface/src/init.luau | luau | .luau | local Types = require(script.Types)
local Wally = require(script.Wally)
local Binding = require(script.Binding)
local RenderRect = require(script.Helpers.RenderRect)
local Reversible = require(script.Helpers.Reversible)
local CachelessRequire = require(script.Helpers.CachelessRequire)
local Bindings = {}
export type... | 558 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/CaptureUI.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local gt = require(pluginRoot.Packages.GreenTea)
local Sift = require(pluginRoot.Packages.Sift)
local Captures = require(pluginRoot.Main.Photo.Captures)
local Photo = require(pluginRoot.Main.Photo)
local captureTypeLiterals = Sift.Array.map(Captures.UserInterf... | 227 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/CaptureViewport.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local gt = require(pluginRoot.Packages.GreenTea)
local Sift = require(pluginRoot.Packages.Sift)
local RenderRect = require(pluginRoot.Main.Bindings.Interface.Helpers.RenderRect)
local Captures = require(pluginRoot.Main.Photo.Captures)
local Camera = require(plu... | 678 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/CompatibilityCheck.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local CargoSemver = require(pluginRoot.Packages.CargoSemver)
local Semver = require(pluginRoot.Packages.Semver)
local gt = require(pluginRoot.Packages.GreenTea)
local Wally = require(pluginRoot.Wally)
-- stylua: ignore
local typechecker = gt.fn(
gt.args(gt.st... | 195 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/GetMeshPart.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local gt = require(pluginRoot.Packages.GreenTea)
local Photo = require(pluginRoot.Main.Photo)
-- stylua: ignore
local typechecker = gt.fn(
gt.args(),
gt.returns(gt.isA.MeshPart())
)
local function callback()
return Photo.getQuadMeshPart()
end
return {
id... | 97 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/GetOSScale.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local gt = require(pluginRoot.Packages.GreenTea)
local StateManager = require(pluginRoot.Main.StateManager)
-- stylua: ignore
local typechecker = gt.fn(
gt.args(),
gt.returns(gt.Vector2())
)
local function callback()
return StateManager.temporary:get().sca... | 101 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/GetVersion.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local gt = require(pluginRoot.Packages.GreenTea)
local Wally = require(pluginRoot.Wally)
-- stylua: ignore
local typechecker = gt.fn(
gt.args(),
gt.returns(gt.string())
)
local function callback()
return Wally.package.version
end
return {
identifier = "g... | 93 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/IsConnected.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local gt = require(pluginRoot.Packages.GreenTea)
-- stylua: ignore
local typechecker = gt.fn(
gt.args(),
gt.returns(gt.boolean())
)
local function callback()
return true
end
return {
identifier = "isConnected",
callback = gt.wrapFn(typechecker, callback)... | 80 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/RequestRect.luau | luau | .luau | local HttpService = game:GetService("HttpService")
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local gt = require(pluginRoot.Packages.GreenTea)
local ViewportApp = require(pluginRoot.Main.UserInterface.Apps.Viewport)
local strLimited = gt.string({ bytes = 200 })
local requestOptions = gt.table({
type... | 351 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/Invocations/YieldUntilNextFrame.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local gt = require(pluginRoot.Packages.GreenTea)
local SceneControl = require(pluginRoot.Main.Photo.SceneControl)
-- stylua: ignore
local typechecker = gt.fn(
gt.args(),
gt.returns()
)
local function callback()
SceneControl.yieldUntilNextFrame()
end
retur... | 98 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Bindings/init.luau | luau | .luau | local CaptureService = game:GetService("CaptureService") :: CaptureService
local ServerStorage = game:GetService("ServerStorage") :: ServerStorage
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Future = require(pluginRoot.Packages.Future)
local Trove = require(pluginRoot.Packages.Trove)
local StateMa... | 876 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/CaptureTypes/UserInterface/AlphaMask.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Types = require(pluginRoot.Main.Bindings.Interface.Types)
local Trove = require(pluginRoot.Packages.Trove)
local photoRoot = script:FindFirstAncestor("Photo")
local Screenshot = require(photoRoot.Captures.Screenshot)
local SceneControl = require(photoRoot... | 486 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/CaptureTypes/UserInterface/NoBackground.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Types = require(pluginRoot.Main.Bindings.Interface.Types)
local Trove = require(pluginRoot.Packages.Trove)
local photoRoot = script:FindFirstAncestor("Photo")
local Screenshot = require(photoRoot.Captures.Screenshot)
local SceneControl = require(photoRoot... | 477 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/CaptureTypes/Viewport/NoSkybox.luau | luau | .luau | local Lighting = game:GetService("Lighting") :: Lighting
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Types = require(pluginRoot.Main.Bindings.Interface.Types)
local Trove = require(pluginRoot.Packages.Trove)
local photoRoot = script:FindFirstAncestor("Photo")
local Screenshot = require(photoRoot.C... | 1,095 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/CaptureTypes/Viewport/Unmodified.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Trove = require(pluginRoot.Packages.Trove)
local Types = require(pluginRoot.Main.Bindings.Interface.Types)
local photoRoot = script:FindFirstAncestor("Photo")
local Screenshot = require(photoRoot.Captures.Screenshot)
local SceneControl = require(photoRoo... | 169 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/Composers/AlphaBleed/ApplyBleed/Worker.luau | luau | .luau | --!optimize 2
@native
local function worker(img: EditableImage, voronoi: EditableImage, crop: Rect)
local imgSize = img.Size
local imgWidth = imgSize.X
local cropSize = crop.Max - crop.Min
local cropWidth, _cropHeight = cropSize.X, cropSize.Y
local minX, maxX = crop.Min.X, crop.Max.X
local minY, maxY = crop.Min... | 421 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/Composers/AlphaBleed/ApplyBleed/init.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Parallel = require(pluginRoot.Packages.Parallel)
local ACTOR_COUNT = assert(script.Parent:GetAttribute("ActorCount") :: number?)
type WorkerAction = typeof(require(script.Worker))
local function applyBleed(img: EditableImage, voronoi: EditableImage, reg... | 256 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/Composers/AlphaBleed/init.luau | luau | .luau | local AssetService = game:GetService("AssetService")
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local RectSlicer = require(pluginRoot.Utilities.RectSlicer)
local SignedVectorField = require(pluginRoot.Main.Photo.Tools.SignedVectorField)
local ACTOR_COUNT = 32
local FIELD_OPTIONS: SignedVectorField.Opt... | 283 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/Composers/ReverseBlend/Worker.luau | luau | .luau | --!optimize 2
local COMPARE_MARGIN = 0
local WHITE = 0xFFFFFFFF
local BLACK = 0xFF000000
@native
local function worker(
rect: Rect,
onWhiteRetro: EditableImage,
onBlackRetro: EditableImage,
subjectOnBlack: EditableImage?,
backgroundOnBlack: EditableImage?,
colorCorrection: ColorCorrectionEffect
)
local rectS... | 1,068 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/Composers/ReverseBlend/init.luau | luau | .luau | local AssetService = game:GetService("AssetService") :: AssetService
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local RectSlicer = require(pluginRoot.Utilities.RectSlicer)
local Parallel = require(pluginRoot.Packages.Parallel)
type WorkerAction = typeof(require(script.Worker))
local scheduler = Parall... | 338 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/Composers/init.luau | luau | .luau | return {
reverseBlend = require(script.ReverseBlend),
alphaBleed = require(script.AlphaBleed),
}
| 24 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/Screenshot.luau | luau | .luau | local AssetService = game:GetService("AssetService") :: AssetService
local CaptureService = game:GetService("CaptureService") :: CaptureService
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Future = require(pluginRoot.Packages.Future)
local Constants = require(pluginRoot.Constants)
local StateManager... | 738 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Captures/init.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Sift = require(pluginRoot.Packages.Sift)
local StateManager = require(pluginRoot.Main.StateManager)
local Types = require(pluginRoot.Main.Bindings.Interface.Types)
local OPEN_GL_WARN =
"WARN: 'Studio Settings > Rendering > Graphics Mode = OpenGL' is uns... | 451 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/Background/BillboardBackground.luau | luau | .luau | local BillboardBackgroundClass = {}
BillboardBackgroundClass.__index = BillboardBackgroundClass
BillboardBackgroundClass.ClassName = "BillboardBackground"
export type BillboardBackground = typeof(setmetatable(
{} :: {
part: BasePart,
billboard: BillboardGui,
frame: Frame,
},
BillboardBackgroundClass
))
-- Co... | 883 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/Background/MeshPartFogBackground.luau | luau | .luau | local Lighting = game:GetService("Lighting") :: Lighting
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Trove = require(pluginRoot.Packages.Trove)
local RENDER_DISTANCE = 90_000
local MARGIN_OF_ERROR_DISTANCE = 1000
local PLANE_SCALE = 1_000_000_000
-- when yaw axis is world-aligned there's a bug th... | 1,172 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/Background/init.luau | luau | .luau | local _BillboardBackground = require(script.BillboardBackground)
local MeshPartFogBackground = require(script.MeshPartFogBackground)
export type Background = MeshPartFogBackground.MeshPartFogBackground
return MeshPartFogBackground
| 50 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/Blackout.luau | luau | .luau | local RunService = game:GetService("RunService") :: RunService
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Trove = require(pluginRoot.Packages.Trove)
local MeshPartFogBackground = require(script.Parent.Background.MeshPartFogBackground)
local Blackout = {}
local isDisabled = true
local disabledBy... | 303 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/SignedVectorField/JFAPasses/Worker.luau | luau | .luau | --!optimize 2
@native
local function worker(seedbed: EditableImage, voronoi: EditableImage, crop: Rect, step: number)
local seedbedSize = voronoi.Size
local seedbedWidth, seedbedHeight = seedbedSize.X, seedbedSize.Y
local cropSize = crop.Max - crop.Min
local cropWidth, cropHeight = cropSize.X, cropSize.Y
local m... | 827 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/SignedVectorField/JFAPasses/init.luau | luau | .luau | local AssetService = game:GetService("AssetService")
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Cancellation = require(pluginRoot.Utilities.Cancellation)
local Scheduler = require(script.Parent.Scheduler)
local ACTOR_COUNT = assert(script.Parent:GetAttribute("ActorCount") :: number?)
local PLUS_... | 571 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/SignedVectorField/PlantSeeds/Worker.luau | luau | .luau | --!optimize 2
@native
local function worker(img: EditableImage, crop: Rect, insideThreshold: number)
local imgSize = img.Size
local imgWidth, _imgHeight = imgSize.X, imgSize.Y
local imgBuffer = img:ReadPixelsBuffer(Vector2.zero, imgSize)
local cropSize = crop.Max - crop.Min
local cropWidth, cropHeight = cropSize... | 420 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/SignedVectorField/PlantSeeds/init.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Cancellation = require(pluginRoot.Utilities.Cancellation)
local Scheduler = require(script.Parent.Scheduler)
local ACTOR_COUNT = assert(script.Parent:GetAttribute("ActorCount") :: number?)
type WorkerAction = typeof(require(script.Worker))
local acquir... | 486 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/SignedVectorField/Scheduler.luau | luau | .luau | local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Cancellation = require(pluginRoot.Utilities.Cancellation)
local Parallel = require(pluginRoot.Packages.Parallel)
local Scheduler = {}
function Scheduler.pool<T..., U...>(actorCount: number, required: Parallel.Required<T..., U...>)
local pooled = Paralle... | 187 |
photobooth-rbx/photobooth-plugin | photobooth-rbx-photobooth-plugin-3982c97/src/Main/Photo/Tools/SignedVectorField/init.luau | luau | .luau | local AssetService = game:GetService("AssetService")
local pluginRoot = script:FindFirstAncestor("PluginRoot")
local Cancellation = require(pluginRoot.Utilities.Cancellation)
local RectSlicer = require(pluginRoot.Utilities.RectSlicer)
local ACTOR_COUNT = 32
local PLUS_ONE = true
local INSIDE_THRESHOLD = 127.5
scrip... | 730 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.