This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Config = { | |
colors: boolean?, | |
verbose: boolean?, | |
} | |
type Description = { | |
status: number, | |
name: string, | |
only: boolean, | |
skip: boolean, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Atom<State> { | |
listeners: Set<(value: State) => void>; | |
get<_Result>(selector?: undefined): State; | |
get<Result>(selector: (state: State) => Result): Result; | |
set(state: State): void; | |
set(updater: (previous: State) => State): void; | |
memoize(equality: (previous: State, current: State) => boolean): Atom<State>; | |
} | |
interface DerivedAtom<State> extends Atom<State> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useCamera, useDebounceState, useEventListener } from "@rbxts/pretty-react-hooks"; | |
import { useMemo } from "@rbxts/roact"; | |
interface ScaleFunction { | |
/** | |
* Scales `pixels` based on the current viewport size and rounds the result. | |
*/ | |
(pixels: number): number; | |
/** | |
* Scales `pixels` and rounds the result to the nearest even number. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useCamera, useEventListener } from "@rbxts/pretty-react-hooks"; | |
import Roact, { Portal, useRef, useState } from "@rbxts/roact"; | |
import { GuiService, RunService } from "@rbxts/services"; | |
import { useParentRadius } from "client/hooks/use-parent-radius"; | |
import { usePx } from "client/hooks/use-px"; | |
import { useQualityLevel } from "client/hooks/use-quality-level"; | |
const DISTANCE = 0.005; | |
const BLUR_QUALITY_LEVEL = 8; | |
const CYLINDER_ANGLE = CFrame.Angles(math.rad(90), 0, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { map, useDebounceState, useViewport } from "@rbxts/pretty-react-hooks"; | |
import Roact, { createContext } from "@rbxts/roact"; | |
export interface RemProviderProps extends Roact.PropsWithChildren { | |
baseRem?: number; | |
remOverride?: number; | |
minimumRem?: number; | |
maximumRem?: number; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Roact, { FunctionComponent, createElement } from "@rbxts/roact"; | |
export function profiler<P extends object>(name: string, render: FunctionComponent<P>): FunctionComponent<P> { | |
return (props: P) => { | |
debug.profilebegin(name); | |
const result = render(props); | |
debug.profileend(); | |
return result; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useBindingListener, useCamera } from "@rbxts/pretty-roact-hooks"; | |
import Roact from "@rbxts/roact"; | |
import { useState } from "@rbxts/roact-hooked"; | |
interface BackgroundBlurProps { | |
blurSize?: number | Roact.Binding<number>; | |
} | |
/** | |
* Wraps a BlurEffect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { joinAnyBindings, mapBinding } from "@rbxts/pretty-roact-hooks"; | |
import Roact from "@rbxts/roact"; | |
import { useMemo } from "@rbxts/roact-hooked"; | |
import { roundEven } from "client/utils/number-utils"; | |
import { Frame } from "./frame"; | |
interface BorderProps extends Roact.PropsWithChildren { | |
borderMode?: BorderMode; | |
borderColor?: Color3 | Roact.Binding<Color3>; | |
borderThickness?: number | Roact.Binding<number>; |