repo
stringclasses
302 values
file_path
stringlengths
18
241
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
76
697k
tokens
int64
10
271k
R-unic/serio
R-unic-serio-e1997cd/src/serializer.ts
roblox-ts
.ts
import { sizeOfNumberType, sign, CF__index, fuzzyEq, isNumberType, assertNumberRange, isNaN } from "./utility"; import { f8 } from "./utility/f8"; import { f16 } from "./utility/f16"; import { f24 } from "./utility/f24"; import { u12 } from "./utility/u12"; import { u24 } from "./utility/u24"; import { AXIS_ALIGNED_OR...
4,913
R-unic/serio
R-unic-serio-e1997cd/src/utility/fastcalls.luau
luau
.luau
local info = debug.info local identity = CFrame.identity local lune = string.sub(_VERSION, 1, 4) == "Lune" local _, CF__index = xpcall(function() return identity[nil] end, function() return info(2, "f") end) local _, CF__add = xpcall(function() return identity + nil end, function() return info(2, "f") end) i...
222
R-unic/serio
R-unic-serio-e1997cd/src/utility/index.ts
roblox-ts
.ts
import { IS_LUNE } from "../constants"; import type { NumberType, Primitive } from "../types"; const { sort } = table; const { magnitude } = vector; export * from "./fastcalls"; export function assertNumberRange(n: number, sizeInBytes: number, signed: boolean, note?: string): void { const sizeInBits = 8 * sizeInBy...
708
R-unic/serio
R-unic-serio-e1997cd/tests/src/run-tests.server.ts
roblox-ts
.ts
import { TestRunner } from "@rbxts/runit"; import { instrument, istanbul } from "@rbxts/coverage"; const http = game.GetService("HttpService"); const replicated = game.GetService("ReplicatedStorage"); instrument([replicated.WaitForChild("Library")]); const testRunner = new TestRunner(replicated.WaitForChild("Tests"))...
170
R-unic/serio
R-unic-serio-e1997cd/tests/src/utility.ts
roblox-ts
.ts
import type { Modding } from "@flamework/core"; import { Assert } from "@rbxts/runit"; import type { Serializer, SerializerMetadata, SerializedData, String, Vector, u8, i32, u16 } from "../src/index"; import createSerializer from "../src/index"; export type NullableLiteralUnion = TestLiteralUnion | undefined; export ...
991
roblox-aurora/rbxts-transform-debug
roblox-aurora-rbxts-transform-debug-9cc03b5/src/class/symbolProvider.ts
roblox-ts
.ts
import path from "path"; import ts from "typescript"; import { TransformState } from "./transformState"; import fs from "fs"; import { isPathDescendantOf } from "../util/isPathDescendantOf"; import assert from "assert"; export const moduleResolutionCache = new Map<string, string | false>(); class FileSymbol { privat...
885
daimond113/rbxts-transformer-jecs
daimond113-rbxts-transformer-jecs-e89f5c9/src/index.ts
roblox-ts
.ts
import ts from "typescript" import { type Config, TransformState } from "./transforms/index.js" import { transformFile } from "./transforms/file.js" const transformer: ( program: ts.Program, config?: Partial<Config> & { resolutionHost?: ts.ModuleResolutionHost }, ) => ts.TransformerFactory<ts.SourceFile> = (program,...
154
daimond113/rbxts-transformer-jecs
daimond113-rbxts-transformer-jecs-e89f5c9/test/index.ts
roblox-ts
.ts
/// <reference types="vite/client" /> import { VirtualProject } from "roblox-ts" import transformer from "../src/index.js" import { resolve } from "path/posix" export const compile = async (source: string): Promise<string> => { const project = new VirtualProject() project.tsTransformers.push((program) => transform...
458
techs-sus/azalea
techs-sus-azalea-4a65cd6/encoding/__tests__/expectedValueHelper.luau
luau
.luau
local ServerScriptService = game:GetService("ServerScriptService") local Decoder = require(ServerScriptService.Decoder.decoder) return function(expect) return function(payload: buffer, expectedClassName: string, expectedValue: any) return function(_, done) local root = Decoder(payload) expect(root).toEqual(ex...
127
techs-sus/azalea
techs-sus-azalea-4a65cd6/encoding/oldDecoder.luau
luau
.luau
--!native --!optimize 2 -- TODO: Ensure decoded output is sane and correct local TYPE_ID = table.freeze({ String = 0, Attributes = 1, Axes = 2, Bool = 3, BrickColor = 4, CFrame = 5, Color3 = 6, Color3uint8 = 7, ColorSequence = 8, Enum = 9, Faces = 10, Float32 = 11, Float64 = 12, Int32 = 13, MaterialCol...
5,940
techs-sus/azalea
techs-sus-azalea-4a65cd6/scripts/runTests.luau
luau
.luau
local ServerScriptService = game:GetService("ServerScriptService") local runCLI = require(ServerScriptService.DevPackages.Jest).runCLI local processServiceExists, ProcessService = pcall(function() return game:GetService("ProcessService") end) local status, result = runCLI(ServerScriptService.Decoder, { verbose = tr...
167
techs-sus/azalea
techs-sus-azalea-4a65cd6/src/luau/base122.luau
luau
.luau
--!native --!optimize 2 --!strict --[[ Base122 - A space efficent alternative to base-64. >>> https://blog.kevinalbs.com/base122 ]] -- to create Base123, we comment out ampersand being illegal... local kIllegals = { 0, -- null 10, -- newline 13, -- carriage return 34, -- double quote -- 38, -- SKIP! ampersand,...
1,230
techs-sus/azalea
techs-sus-azalea-4a65cd6/src/luau/mergedCombinator.luau
luau
.luau
--!native --!optimize 2 --!strict -- to create Base123, we comment out ampersand being illegal... local kIllegals = table.freeze({ 0, -- null 10, -- newline 13, -- carriage return 34, -- double quote -- 38, -- SKIP! ampersand, without this being illegal we have base123 92, -- backslash }) -- local kShortened = ...
639
techs-sus/azalea
techs-sus-azalea-4a65cd6/src/luau/minifiedCombinator.luau
luau
.luau
local a,b=table.freeze({0,10,13,34,92}),bit32 local c,d,e=b.lshift,b.rshift,b.band local f=function(f)local g,h,i=0,0,0 for j,k in utf8.codes(f)do if k>127 then local l=e(d(k,8),7)i+=if l~=0b111 then 1 else 0 end i+=1 while i~=0 do h+=7 if h>=8 then g+=1 h-=8 end i-=1 end end local j=buffer.create(g)g,h,i=0,0,0 local k...
235
R-unic/tether
R-unic-tether-1309867/.lune/mock-signal.luau
luau
.luau
--[[ Copyright © 2024 Stephen Leitnick Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
2,899
R-unic/tether
R-unic-tether-1309867/.lune/tests.luau
luau
.luau
local roblox = require("@lune/roblox") local fs = require("@lune/fs") local luau = require("@lune/luau") local process = require("@lune/process") local task = require("@lune/task") local signal = require("./mock-signal") local testPlacePath = process.args[1] local game = roblox.deserializePlace(fs.readFile(testPlaceP...
1,303
R-unic/tether
R-unic-tether-1309867/src/emitters/contextual-emitter.ts
roblox-ts
.ts
import type { MessageEmitter } from "./message-emitter"; import type { BaseMessage, MessageCallback, FunctionMessageCallback } from "../structs"; import { RunService } from "@rbxts/services"; import { Error } from "../logging"; type Cleanup = () => void; export abstract class ContextualEmitter<MessageData> { public...
584
R-unic/tether
R-unic-tether-1309867/src/relayer.ts
roblox-ts
.ts
import { ReplicatedStorage, RunService } from "@rbxts/services"; import { getAllPacketsWhich, isReliable, isUnreliable, shouldBatch } from "\./utility"; import type { BaseMessage, MessageEvent, PacketInfo, SerializedPacket } from "./structs"; import type { MessageEmitter } from "./emitters/message-emitter"; export ty...
1,439
R-unic/tether
R-unic-tether-1309867/src/serdes.ts
roblox-ts
.ts
import type { Modding } from "@flamework/core"; import type { Serializer, SerializerMetadata } from "@rbxts/serio"; import createSerializer from "@rbxts/serio"; import { createMessageBuffer } from "./utility"; import type { BaseMessage, SerializedPacket } from "./structs"; export class Serdes<MessageData> { public ...
486
R-unic/tether
R-unic-tether-1309867/src/structs.ts
roblox-ts
.ts
import type { Modding } from "@flamework/core"; import type { SerializerMetadata, SerializedData, StripMeta } from "@rbxts/serio"; export type MessageCallback<T = unknown> = ServerMessageCallback<T> | ClientMessageCallback<T>; export type FunctionMessageCallback<T = unknown, R = unknown> = ServerFunctionMessageCallbac...
317
R-unic/tether
R-unic-tether-1309867/tests/src/run-tests.server.ts
roblox-ts
.ts
import { TestRunner } from "@rbxts/runit"; const testRunner = new TestRunner(game.GetService("ReplicatedStorage").WaitForChild("Tests")); testRunner.run({ colors: true }).await();
43
R-unic/mechanism
R-unic-mechanism-39b6a97/src/axis-action.ts
roblox-ts
.ts
import Signal from "@rbxts/lemon-signal"; import { BaseAction } from "./base-action"; import { getRawInput, type RawInput } from "./common"; export abstract class AxisAction extends BaseAction { public readonly updated = this.trash.add(new Signal); public readonly axes: RawInput[]; public readonly delta = new V...
291
R-unic/mechanism
R-unic-mechanism-39b6a97/src/base-action.ts
roblox-ts
.ts
import { BaseID } from "@rbxts/id"; import Destroyable from "@rbxts/destroyable"; export abstract class BaseAction extends Destroyable implements BaseID<string | number> { public readonly id: string | number = "default"; public readonly processed: boolean = false; public readonly callbacks: Callback[] = []; /...
92
R-unic/mechanism
R-unic-mechanism-39b6a97/src/input-manager.ts
roblox-ts
.ts
import { UserInputService as InputService } from "@rbxts/services"; import Destroyable from "@rbxts/destroyable"; import { BaseAction } from "./base-action"; import { AxisAction } from "./axis-action"; import { gamepadInputs } from "./common"; type Maybe<T> = T | undefined; type AbstractConstructor<T = object> = abst...
568
R-unic/mechanism
R-unic-mechanism-39b6a97/src/standard-action.ts
roblox-ts
.ts
import Signal from "@rbxts/lemon-signal"; import { BaseAction } from "./base-action"; import { getInputEnum, type RawInput } from "./common"; export abstract class BaseStandardAction extends BaseAction { public readonly activated = this.trash.add(new Signal); public readonly deactivated = this.trash.add(new Signa...
764
fisherjacobc/rbxts-transformer-web2rblx
fisherjacobc-rbxts-transformer-web2rblx-0dae6ad/src/transformer.ts
roblox-ts
.ts
import * as fs from "node:fs"; // import * as path from "path"; import ts from "typescript"; import parseCss from "./parseCss"; /** * This is the transformer's configuration, the values are passed from the tsconfig. */ export interface TransformerConfig { cssFilePath: string; } enum RobloxEquivelantTags { body = ...
10,077
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/theme/context/ThemeProducer.tsx
roblox-ts
.tsx
import { createProducer } from "@rbxts/reflex"; import { DEFAULT_THEME } from "theme/constants"; import { Theme } from "../interfaces/theme"; export const themeProducer = createProducer(DEFAULT_THEME, { setTheme: (_state, theme: Theme) => theme }); export type ThemeProducer = typeof themeProducer;
66
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/theme/context/ThemeProvider.tsx
roblox-ts
.tsx
import React, { StrictMode, useEffect } from "@rbxts/react"; import { ReflexProvider } from "@rbxts/react-reflex"; import { DEFAULT_THEME } from "theme/constants"; import { Theme } from "theme/interfaces"; import { CustomizedProps } from "theme/types"; import { themeProducer } from "./ThemeProducer"; export interface...
175
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/theme/hooks/useTheme.ts
roblox-ts
.ts
import { useEffect, useMemo, useState } from "@rbxts/react"; import { themeProducer } from "../context/ThemeProducer"; import { Theme } from "theme/interfaces"; const useTheme = (): { theme: Theme; setTheme: (theme: Theme) => void; } => { const [theme, setTheme] = useState<Theme>(themeProducer.getState()); useEff...
169
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/theme/types/types.ts
roblox-ts
.ts
/* eslint-disable @typescript-eslint/no-explicit-any */ import React, { PropsWithChildren } from "@rbxts/react"; import { WriteableStyle } from "theme/interfaces"; export interface CommonProps<T extends Instance> extends PropsWithChildren { className?: WriteableStyle<T>; component?: T; id?: React.Key; ref?: React....
244
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/button/components/Button.tsx
roblox-ts
.tsx
import React, { useEffect, useRef, useState } from "@rbxts/react"; import { TweenService } from "@rbxts/services"; import { CustomizedProps, WriteableStyle } from "theme"; import { ButtonSize, ButtonColor, ButtonVariant } from "../types"; import useButtonStyles from "./Button.styles"; import { LoadingStroke } from "ui/...
891
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/divider/components/Divider.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { CustomizedProps } from "theme"; import { Orientations } from "ui/enums"; import useDividerStyles from "./Divider.styles"; type DefaultDividerComponent = Frame; export interface DividerProps { position?: UDim2; orientation?: Orientations; padding?: number; color?: Color3;...
167
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/errorBoundary/components/ErrorBoundary.tsx
roblox-ts
.tsx
import React, { Component, ErrorInfo, ReactComponent } from "@rbxts/react"; export interface ErrorBoundaryProps { fallback?: (error: unknown) => React.Element; } export interface ErrorBoundaryState { hasError: boolean; message?: unknown; } @ReactComponent export class ErrorBoundary extends Component<ErrorBoundary...
187
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/icon/components/Icon.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { Icons } from "ui/enums"; import { CustomizedProps, WriteableStyle } from "theme"; import useIconStyles from "./Icon.styles"; export interface IconProps { icon: Icons; size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl"; tint?: Color3; } type DefaultIconComponent = ImageLabel;...
205
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/iconButton/components/IconButton.tsx
roblox-ts
.tsx
import React, { useState } from "@rbxts/react"; import { Icons } from "ui/enums"; import { CustomizedProps, WriteableStyle } from "theme"; import useIconButtonStyles from "./IconButton.styles"; export interface IconButtonProps { icon: Icons; size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl"; tint: Color3; selected?:...
318
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/input/components/Input.tsx
roblox-ts
.tsx
import React, { useState } from "@rbxts/react"; import { classNames, CustomizedProps, WriteableStyle } from "theme"; import { Divider } from "../../divider"; import { Orientations } from "ui/enums"; import { InputColor, InputMargin, InputVariant } from "../types"; import useInputStyles from "./Input.styles"; export ty...
747
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/loadingStroke/components/LoadingStroke.tsx
roblox-ts
.tsx
import React, { useEffect, useRef } from "@rbxts/react"; import { CustomizedProps } from "theme"; import { TweenService } from "@rbxts/services"; export interface LoadingStrokeProps { animating?: boolean; } function LoadingStroke(props: CustomizedProps<UIStroke, LoadingStrokeProps>) { const { animating = false, ...
456
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/preloader/components/Preloader.tsx
roblox-ts
.tsx
import React, { useState, useMemo, ComponentType, useEffect } from "@rbxts/react"; import { useAsyncEffect, useDeferState } from "@rbxts/pretty-react-hooks"; import { ContentProvider } from "@rbxts/services"; import { ProgressBar } from "ui/packages/progressBar"; import { CustomizedProps } from "theme"; import usePrelo...
817
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/progressBar/components/ProgressBar.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { CustomizedProps, WriteableStyle } from "theme"; import useProgressBarStyles from "./ProgressBar.styles"; export interface ProgressBarProps { progress: number; } function ProgressBar(props: CustomizedProps<Frame, ProgressBarProps>) { const { progress, className, id, ref } =...
234
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/shadow/components/Shadow.tsx
roblox-ts
.tsx
import React, { useEffect, useState } from "@rbxts/react"; import { WriteableStyle } from "theme"; import useShadowStyles from "./Shadow.styles"; function Shadow() { const { container } = useShadowStyles(); const [parent, setParent] = useState<GuiObject | undefined>(undefined); const [cornerRadius, setCornerRadius]...
324
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/sidebar/components/Sidebar.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { CustomizedProps } from "theme"; import useSidebarStyles from "./Sidebar.styles"; export type DefaultSidebarComponent = Frame; export interface SidebarProps { size: "compact" | "large"; ignoreInset?: boolean; } function Sidebar<T extends DefaultSidebarComponent>(props: Cus...
162
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/toast/components/Toast.tsx
roblox-ts
.tsx
import { BoatTween } from "@rbxts/boat-tween"; import React, { useEffect, useRef } from "@rbxts/react"; import { CustomizedProps, DEFAULT_THEME, WriteableStyle } from "theme"; import { Directions } from "ui/enums"; import { Shadow } from "ui/packages/shadow"; import ToastVariants from "../enums/ToastVariants"; import u...
540
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/treeView/components/TreeView.tsx
roblox-ts
.tsx
import React, { useCallback, useEffect, useState } from "@rbxts/react"; import { CustomizedProps, DEFAULT_THEME, WriteableStyle } from "theme"; import { Icon } from "ui/packages/icon"; import { Typography } from "ui/packages/typography"; import { Icons } from "../../../enums"; import Branch from "../interfaces/Branch";...
1,570
bjlarouche/uiblox-rbxts
bjlarouche-uiblox-rbxts-7ef4ed6/src/ui/packages/typography/components/Typography.tsx
roblox-ts
.tsx
import React from "@rbxts/react"; import { CustomizedProps } from "theme"; import { FontFamilyVariant, FontSizeVariant } from "theme/interfaces/typography"; import { TypographyAlignment } from "../types/TypographyAlignment"; import { TypographyColor } from "../types/TypographyColor"; import { TypographyDisplay } from "...
240
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/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") local wallyToml = serde.decode("toml", fs.readFile("wally.toml")) local package = wallyToml.package package.name = ...
247
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/lune/wally-install.luau
luau
.luau
--!strict local fs = require("@lune/fs") local run = require("@root/lune/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", "sour...
161
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Builds/Plugin.luau
luau
.luau
--!strict local RunService = game:GetService("RunService") :: RunService local pluginRoot = script:FindFirstAncestor("PluginRoot") local StudioMode = require(pluginRoot.Utilities.StudioMode) local Constants = require(pluginRoot.Constants) local State = require(pluginRoot.Main.State) local Plugin = {} local DISPLAY_...
590
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Constants.luau
luau
.luau
--!strict -- lune needs to be able to read this file -- so do not use roblox data types return { AllowFullscreen = true, AllowExperimentalMode = true, TileHighResImagesEnabled = true, TileHighResImagesSize = { X = 1024, Y = 1024 }, MaxCaptureRectSize = { X = 2048, Y = 2048 }, DockWidgetSize = { X = 500, Y = 3...
120
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/Binding/init.luau
luau
.luau
--!strict 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("isConnect...
308
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/Helpers/CachelessRequire.luau
luau
.luau
--!strict 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.Arch...
463
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/Helpers/RenderRect.luau
luau
.luau
--!strict -- 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) ...
237
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/Helpers/Reversible.luau
luau
.luau
--!strict 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>() l...
779
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/Templates/BatchUI/Action.luau
luau
.luau
--!strict --[[ 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 tim...
373
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/Templates/FitToFrame/Action.luau
luau
.luau
--!strict --[[ 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 ...
1,062
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/Templates/StaticFrame/Action.luau
luau
.luau
--!strict --[[ 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...
646
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/Types.luau
luau
.luau
--!strict 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: Gui...
111
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Interface/src/init.luau
luau
.luau
--!strict 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 = {} ...
356
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Invocations/CaptureUI.luau
luau
.luau
--!strict 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...
232
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Invocations/CaptureViewport.luau
luau
.luau
--!strict 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 = ...
679
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Invocations/CompatibilityCheck.luau
luau
.luau
--!strict 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...
199
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Invocations/GetOSScale.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local gt = require(pluginRoot.Packages.GreenTea) local State = require(pluginRoot.Main.State) -- stylua: ignore local typechecker = gt.fn( gt.args(), gt.returns(gt.Vector2()) ) local function callback() return State.read().temporary.scaleOS end ...
101
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Invocations/GetVersion.luau
luau
.luau
--!strict 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 { iden...
97
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Invocations/IsConnected.luau
luau
.luau
--!strict 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...
84
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/Invocations/YieldUntilNextFrame.luau
luau
.luau
--!strict 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()...
102
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Bindings/init.luau
luau
.luau
--!strict local CaptureService = game:GetService("CaptureService") :: CaptureService local ServerStorage = game:GetService("ServerStorage") :: ServerStorage local pluginRoot = script:FindFirstAncestor("PluginRoot") local Trove = require(pluginRoot.Packages.Trove) local State = require(pluginRoot.Main.State) local B...
716
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/CaptureTypes/UserInterface/AlphaMask.luau
luau
.luau
--!strict local CoreGui = game:GetService("CoreGui") :: CoreGui 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(pho...
400
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/CaptureTypes/UserInterface/NoBackground.luau
luau
.luau
--!strict local CoreGui = game:GetService("CoreGui") :: CoreGui 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(pho...
391
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/CaptureTypes/Viewport/Experimental_NSB_A1.luau
luau
.luau
--!strict local Lighting = game:GetService("Lighting") :: Lighting local pluginRoot = script:FindFirstAncestor("PluginRoot") local Image = require(pluginRoot.Utilities.Image) local Trove = require(pluginRoot.Packages.Trove) local Types = require(pluginRoot.Main.Bindings.Interface.Types) local photoRoot = script:Fin...
663
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/CaptureTypes/Viewport/NoSkybox.luau
luau
.luau
--!strict local Lighting = game:GetService("Lighting") :: Lighting local pluginRoot = script:FindFirstAncestor("PluginRoot") local Image = require(pluginRoot.Utilities.Image) local Trove = require(pluginRoot.Packages.Trove) local Types = require(pluginRoot.Main.Bindings.Interface.Types) local photoRoot = script:Fin...
498
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/CaptureTypes/Viewport/Unmodified.luau
luau
.luau
--!strict 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 = requi...
184
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Parallel/AlphaBleed/Bleed/Worker.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Timeout = require(pluginRoot.Utilities.Timeout) local Image = require(pluginRoot.Utilities.Image) local function workerAction(imgBuffer: buffer, imgSize: Vector2, visited: buffer, pending: { number }) local img = Image.fromBuffer(imgBuffer, im...
421
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Parallel/AlphaBleed/Bleed/init.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Parallel = require(pluginRoot.Utilities.Parallel) local Image = require(pluginRoot.Utilities.Image) type WorkerAction = typeof(require(script.Worker)) local scheduler = Parallel.new(1, { script = script.Worker, typecast = (nil :: any) :: Wor...
183
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Parallel/AlphaBleed/FirstPass/Worker.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local IntegralImage = require(pluginRoot.Utilities.IntegralImage) local Timeout = require(pluginRoot.Utilities.Timeout) local Image = require(pluginRoot.Utilities.Image) local function workerAction(chunkBuffer: buffer, chunkSize: Vector2, crop: Rect,...
335
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Parallel/AlphaBleed/FirstPass/init.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Parallel = require(pluginRoot.Utilities.Parallel) local Timeout = require(pluginRoot.Utilities.Timeout) local Image = require(pluginRoot.Utilities.Image) type WorkerAction = typeof(require(script.Worker)) local scheduler = Parallel.new(32, { ...
267
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Parallel/AlphaBleed/init.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Image = require(pluginRoot.Utilities.Image) local FirstPass = require(script.FirstPass) local Bleed = require(script.Bleed) local function alphaBleedParallel(img: Image.Image) local visited, pending = FirstPass(img) local copy = Bleed(img, v...
90
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Parallel/ReverseBlend/Worker.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Timeout = require(pluginRoot.Utilities.Timeout) local Image = require(pluginRoot.Utilities.Image) local COMPARE_MARGIN = 0 local Wb = { 255, 255, 255, 255 } local Bb = { 0, 0, 0, 255 } local function compareByMargin(a: { number }, b: { number...
939
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Parallel/ReverseBlend/init.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Parallel = require(pluginRoot.Utilities.Parallel) local Image = require(pluginRoot.Utilities.Image) type WorkerAction = typeof(require(script.Worker)) local scheduler = Parallel.new(32, { script = script.Worker, typecast = (nil :: any) :: Wo...
394
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Serial/AlphaBleed.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local IntegralImage = require(pluginRoot.Utilities.IntegralImage) local Timeout = require(pluginRoot.Utilities.Timeout) local Image = require(pluginRoot.Utilities.Image) local function alphaBleedSerial(img: Image.Image) local alphaSignIntegralImg = ...
616
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Serial/FullyOpaque.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Timeout = require(pluginRoot.Utilities.Timeout) local Image = require(pluginRoot.Utilities.Image) local function fullyOpaque(img: Image.Image) local copy = img:Clone() local width, height = copy.size.X, copy.size.Y for y = 1, height do fo...
147
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/Serial/ReverseBlend.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Timeout = require(pluginRoot.Utilities.Timeout) local Image = require(pluginRoot.Utilities.Image) local COMPARE_MARGIN = 0 local Wb = { 255, 255, 255, 255 } local Bb = { 0, 0, 0, 255 } local function compareByMargin(a: { number }, b: { number...
890
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Composers/init.luau
luau
.luau
--!strict local serialFolder = script.Serial local parallelFolder = script.Parallel return { alphaBleed = require(parallelFolder.AlphaBleed), reverseBlend = require(parallelFolder.ReverseBlend), fullyOpaque = require(serialFolder.FullyOpaque), }
58
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/Screenshot.luau
luau
.luau
--!strict local AssetService = game:GetService("AssetService") :: AssetService local CaptureService = game:GetService("CaptureService") :: CaptureService local pluginRoot = script:FindFirstAncestor("PluginRoot") local Future = require(pluginRoot.Packages.Future) local Image = require(pluginRoot.Utilities.Image) local...
608
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Captures/init.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Image = require(pluginRoot.Utilities.Image) local Sift = require(pluginRoot.Packages.Sift) local State = require(pluginRoot.Main.State) local Types = require(pluginRoot.Main.Bindings.Interface.Types) -- Private local ticket = 0 local ticketLo...
407
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Tools/Background/BillboardBackground.luau
luau
.luau
--!strict local BillboardBackgroundClass = {} BillboardBackgroundClass.__index = BillboardBackgroundClass BillboardBackgroundClass.ClassName = "BillboardBackground" export type BillboardBackground = typeof(setmetatable( {} :: { part: BasePart, billboard: BillboardGui, frame: Frame, }, BillboardBackgroundClas...
888
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Tools/Background/MeshPartFogBackground.luau
luau
.luau
--!strict local Lighting = game:GetService("Lighting") :: Lighting local pluginRoot = script:FindFirstAncestor("PluginRoot") local Trove = require(pluginRoot.Packages.Trove) local MARGIN_OF_ERROR_DISTANCE = 1000 local MeshPartFogBackgroundClass = {} MeshPartFogBackgroundClass.__index = MeshPartFogBackgroundClass Me...
941
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Tools/Background/init.luau
luau
.luau
--!strict local _BillboardBackground = require(script.BillboardBackground) local MeshPartFogBackground = require(script.MeshPartFogBackground) export type Background = MeshPartFogBackground.MeshPartFogBackground return MeshPartFogBackground
54
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Tools/Skybox.luau
luau
.luau
--!strict local Lighting = game:GetService("Lighting") :: Lighting local pluginRoot = script:FindFirstAncestor("PluginRoot") local Icons = require(pluginRoot.Main.UserInterface.Icons) local SkyboxClass = {} SkyboxClass.__index = SkyboxClass SkyboxClass.ClassName = "Skybox" SkyboxClass.Textures = { White = Icons.sw...
335
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Tools/UIBounds.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local RenderRect = require(pluginRoot.Main.Bindings.Interface.Helpers.RenderRect) local State = require(pluginRoot.Main.State) local ALWAYS_CLIPPED = true local ALWAYS_CLIP_TEXT = true -- Class local UIBoundsClass = {} UIBoundsClass.__index = UIBou...
2,138
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/Tools/UIHider.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Signal = require(pluginRoot.Packages.Signal) local Trove = require(pluginRoot.Packages.Trove) local State = require(pluginRoot.Main.State) local photoRoot = script:FindFirstAncestor("Photo") local Screenshot = require(photoRoot.Captures.Screens...
1,073
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/Photo/init.luau
luau
.luau
--!strict local StudioService = game:GetService("StudioService") :: StudioService local AssetService = game:GetService("AssetService") :: AssetService local pluginRoot = script:FindFirstAncestor("PluginRoot") local Future = require(pluginRoot.Packages.Future) local Trove = require(pluginRoot.Packages.Trove) local Sif...
1,476
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/State/SaveVersions/V1.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Sift = require(pluginRoot.Packages.Sift) local SaveFormatV1 = {} export type Serialized = { alphaBleedingEnabled: boolean, bindingsEnabled: boolean, galleryListExpanded: boolean, experimentalModeEnabled: boolean, } export type Deserialize...
401
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/State/SaveVersions/init.luau
luau
.luau
--!strict local CurrentVersion = require(script.V1) local SaveVersions = {} export type Serialized = CurrentVersion.Serialized export type Deserialized = CurrentVersion.Deserialized export type VersionFormat = { migrate: (any) -> any, serialize: (any) -> any, deserialize: (any) -> any, version: number, index: ...
400
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/State/init.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local Signal = require(pluginRoot.Packages.Signal) local SaveVersions = require(script.SaveVersions) local PLUGIN_SAVED_KEY = "egomoose_photobooth_save" local State = {} local currentState: State local currentStateReadOnly: State local stateChange...
779
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/UserInterface/Components/CroppedViewport/ActionBar.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local StudioComponents = require(pluginRoot.Packages.StudioComponents) local Lucide = require(pluginRoot.Packages.Lucide) local React = require(pluginRoot.Packages.React) local uiRoot = script:FindFirstAncestor("UserInterface") local BaseButton = req...
2,418
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/UserInterface/Components/CroppedViewport/Blinder.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local React = require(pluginRoot.Packages.React) type Props = { AnchorPoint: Vector2, Position: UDim2, Size: UDim2, MarginBump: number, OverlapBump: number, Transparency: number, Color: Color3, ZIndex: number, } local function Blinder(pro...
867
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/UserInterface/Components/CroppedViewport/Grabbers.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local React = require(pluginRoot.Packages.React) local uiRoot = script:FindFirstAncestor("UserInterface") local Hooks = require(uiRoot.Hooks) -- stylua: ignore type OnDragCallback = ( rbx: GuiObject, input: InputObject, direction: Vector2 ) -> ()...
1,967
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/UserInterface/Components/CroppedViewport/init.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local StudioComponents = require(pluginRoot.Packages.StudioComponents) local React = require(pluginRoot.Packages.React) local Sift = require(pluginRoot.Packages.Sift) local RenderRect = require(pluginRoot.Main.Bindings.Interface.Helpers.RenderRect) l...
2,322
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/UserInterface/Components/FullViewport/FreeDrag.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local React = require(pluginRoot.Packages.React) local uiRoot = script:FindFirstAncestor("UserInterface") local Hooks = require(uiRoot.Hooks) export type Props = { SetIsDragging: (boolean) -> (), InitialPosition: UDim2, AnchorPoint: Vector2, Si...
833
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/UserInterface/Components/FullViewport/init.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local StudioComponents = require(pluginRoot.Packages.StudioComponents) local Lucide = require(pluginRoot.Packages.Lucide) local React = require(pluginRoot.Packages.React) local uiRoot = script:FindFirstAncestor("UserInterface") local BaseButton = req...
2,776
EgoMoose/photobooth-plugin
EgoMoose-photobooth-plugin-a533fe2/src/Main/UserInterface/Components/Gallery/ActionBar.luau
luau
.luau
--!strict local pluginRoot = script:FindFirstAncestor("PluginRoot") local StudioComponents = require(pluginRoot.Packages.StudioComponents) local Lucide = require(pluginRoot.Packages.Lucide) local React = require(pluginRoot.Packages.React) local uiRoot = script:FindFirstAncestor("UserInterface") local LucideButton = r...
1,276