repo stringclasses 341
values | file_path stringlengths 29 173 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 2 1.66M | tokens int64 2 598k |
|---|---|---|---|---|---|
littensy/ripple | littensy-ripple-c33bb8b/benchmarks/vide/source.luau | luau | .luau | --[[
MIT License
Copyright (c) 2022 centau
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,... | 448 |
littensy/ripple | littensy-ripple-c33bb8b/packages/react-ripple/React.luau | luau | .luau | type CoreReactBinding<T> = {
getValue: (self: CoreReactBinding<T>) -> T,
_source: string?,
}
type ReactBindingMap = {
map: <T, U>(self: CoreReactBinding<T> & ReactBindingMap, (T) -> U) -> ReactBindingMap & CoreReactBinding<U>,
}
export type Binding<T> = CoreReactBinding<T> & ReactBindingMap
return require(script.... | 104 |
littensy/ripple | littensy-ripple-c33bb8b/packages/react-ripple/Ripple.luau | luau | .luau | local Ripple = require(script.Parent.Parent.ripple.src)
export type Animatable = Ripple.Animatable
export type Easing = Ripple.Easing
export type Motion<T = any> = Ripple.Motion<T>
export type MotionOptions<T = any> = Ripple.MotionOptions<T>
export type Spring<T = any> = Ripple.Spring<T>
export type SpringOptions<T = ... | 113 |
littensy/ripple | littensy-ripple-c33bb8b/packages/react-ripple/src/__tests__/helpers.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ReactGlobals = require(ReplicatedStorage["@rbxts-js"].ReactGlobals)
ReactGlobals.__ROACT_17_MOCK_SCHEDULER__ = true
local ReactRoblox = require(ReplicatedStorage["@rbxts-js"].ReactRoblox)
local mountedContainers = {}
local function render(element... | 206 |
littensy/ripple | littensy-ripple-c33bb8b/packages/react-ripple/src/__tests__/useMotion.test.luau | luau | .luau | local React = require("../../React")
local Ripple = require("../../Ripple")
local helpers = require("./helpers")
local test = require("../../../../tests/test")
local useMotion = require("../useMotion")
local render = helpers.render
local cleanup = helpers.cleanup
test.afterEach(function()
cleanup()
end)
test("shoul... | 172 |
littensy/ripple | littensy-ripple-c33bb8b/packages/react-ripple/src/__tests__/useTween.test.luau | luau | .luau | local React = require("../../React")
local Ripple = require("../../Ripple")
local helpers = require("./helpers")
local test = require("../../../../tests/test")
local useTween = require("../useTween")
local render = helpers.render
local cleanup = helpers.cleanup
test.afterEach(function()
cleanup()
end)
test("should ... | 169 |
littensy/ripple | littensy-ripple-c33bb8b/packages/react-ripple/src/useMotion.luau | luau | .luau | local React = require(script.Parent.Parent.React)
local Ripple = require(script.Parent.Parent.Ripple)
type Binding<T> = React.Binding<T>
type Animatable = Ripple.Animatable
type Motion<T> = Ripple.Motion<T>
type MotionOptions<T> = Ripple.MotionOptions<T>
local function useMotion<T>(initialValue: T, initialOptions: Mo... | 218 |
littensy/ripple | littensy-ripple-c33bb8b/packages/react-ripple/src/useTween.luau | luau | .luau | local React = require(script.Parent.Parent.React)
local Ripple = require(script.Parent.Parent.Ripple)
type Binding<T> = React.Binding<T>
type Animatable = Ripple.Animatable
type Tween<T> = Ripple.Tween<T>
type TweenOptions<T> = Ripple.TweenOptions<T>
local function useTween<T>(initialValue: T, initialOptions: TweenOp... | 216 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/__tests__/easing.test.luau | luau | .luau | local easing = require("../easing")
local test = require("../../../../tests/test")
test("should have correct start and end", function()
for name, easingFunction in pairs(easing) do
local x0 = easingFunction(0)
local x1 = easingFunction(1)
assert(math.abs(x0) < 1e-4, `{name}(0) should be near 0, got {x0}`)
ass... | 237 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/__tests__/init.luau | luau | .luau | local test = require("../../../tests/test")
test.describe("spring", function()
require("@self/spring.test")
end)
test.describe("tween", function()
require("@self/tween.test")
end)
test.describe("motion", function()
require("@self/motion.test")
end)
test.describe("easing", function()
require("@self/easing.test")... | 126 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/__tests__/motion.test.luau | luau | .luau | local easing = require("../easing")
local motion = require("../motion")
local test = require("../../../../tests/test")
local createMotion = motion.createMotion
local scheduler = motion.scheduler
test("should have expected api", function()
local motion = createMotion(0)
assert(type(motion.setPosition) == "function"... | 4,046 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/__tests__/tween.test.luau | luau | .luau | local easing = require("../easing")
local test = require("../../../../tests/test")
local tween = require("../tween")
local createTween = tween.createTween
local scheduler = tween.scheduler
test("should have expected api", function()
local tween = createTween(0)
assert(type(tween.setPosition) == "function", "missin... | 2,171 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/__tests__/utils/interpolate.test.luau | luau | .luau | local interpolate = require("../../utils/interpolate")
local test = require("../../../../../tests/test")
local cases: { { any } } = {
{ 0, 1, 0.5 },
{ vector.zero, vector.one, vector.create(0.5, 0.5, 0.5) },
{ { 0, 0, 0 }, { 1, 1, 1 }, { 0.5, 0.5, 0.5 } },
}
if game then
table.insert(cases, { Color3.new(), Color3... | 588 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/__tests__/utils/oklab.test.luau | luau | .luau | local oklab = require("../../utils/oklab")
local test = require("../../../../../tests/test")
local function testColors(callback: (vector) -> ())
for r = 0, 4 do
for g = 0, 4 do
for b = 0, 4 do
callback(vector.create(r, g, b) / 4)
end
end
end
end
local function fuzzyEqual(a: vector, b: vector): boolean... | 301 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/config.luau | luau | .luau | local spring = require("./spring")
type SpringOptions = spring.SpringOptions
return {
default = { tension = 170, friction = 26 } :: SpringOptions,
gentle = { tension = 120, friction = 14 } :: SpringOptions,
wobbly = { tension = 180, friction = 12 } :: SpringOptions,
stiff = { tension = 210, friction = 20 } :: Spr... | 211 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/tween.luau | luau | .luau | local easing = require("./easing")
local interpolate = require("./utils/interpolate")
local merge = require("./utils/merge")
local scheduler = require("./utils/scheduler")
local signal = require("./utils/signal")
local types = require("./types")
type Animatable = types.Animatable
type Easing = easing.Easing
export ty... | 1,432 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/types.luau | luau | .luau | export type AnimatablePrimitive = number | vector | Vector3
export type AnimatableType = AnimatablePrimitive | Vector2 | CFrame | Color3 | UDim | UDim2 | Rect
export type Animatable = AnimatableType | { [any]: AnimatablePrimitive }
return {}
| 60 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/utils/intermediate.luau | luau | .luau | local merge = require("./merge")
local oklab = require("./oklab")
export type Components = { number | vector | Vector3 }
export type Intermediate<T = any> = {
components: Components,
value: T,
dirty: boolean?,
encode: (components: Components, value: T) -> (),
decode: (components: Components) -> T,
}
local encod... | 1,338 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/utils/interpolate.luau | luau | .luau | local oklab = require("./oklab")
local types = require("../types")
type Animatable = types.Animatable
local function interpolate<T>(from: any, to: any, alpha: number): any
local kind = typeof(from)
if kind == "number" or kind == "vector" or kind == "Vector3" or kind == "Vector2" then
return from + (to - from) * ... | 458 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/utils/merge.luau | luau | .luau | local function merge<T>(target: any, source: any): T
local result = target
for key, value in source do
if target[key] == value then
continue
end
if result == target then
result = table.clone(target)
end
result[key] = value
end
return result
end
return merge
| 77 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/utils/scheduler.luau | luau | .luau | export type Scheduler<State> = {
states: { State },
update: (state: State, time: number) -> any,
step: (deltaTime: number) -> (),
add: (state: State) -> (),
remove: (state: State) -> (),
clear: () -> (),
}
local function scheduler<State>(
label: string,
updater: (state: State, time: number, remove: (State) -> ... | 399 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/utils/signal.luau | luau | .luau | local spawn = require("./spawn")
export type FireSignal<T...> = (T...) -> ()
export type SubscribeSignal<T...> = (callback: FireSignal<T...>) -> () -> ()
local function signal<T...>(): (SubscribeSignal<T...>, FireSignal<T...>)
local listeners: { (...any) -> () } = {}
local count = 0
local function subscribe(callb... | 198 |
littensy/ripple | littensy-ripple-c33bb8b/packages/ripple/src/utils/spawn.luau | luau | .luau | local freeThread: thread?
local function run<T...>(thread: thread, fn: (T...) -> (), ...: T...)
freeThread = nil
fn(...)
freeThread = thread
end
local function runner()
while true do
run(coroutine.yield())
end
end
local function spawn<T...>(callback: (T...) -> (), ...: T...)
local thread = freeThread or task... | 134 |
littensy/ripple | littensy-ripple-c33bb8b/packages/vide-ripple/src/__tests__/useMotion.test.luau | luau | .luau | local Ripple = require("../../Ripple")
local Vide = require("../../Vide")
local test = require("../../../../tests/test")
local useMotion = require("../useMotion")
test("should update binding when goal is set", function()
local src, motion
Vide.root(function()
src, motion = useMotion(0)
motion:setGoal(1, { tween... | 117 |
littensy/ripple | littensy-ripple-c33bb8b/packages/vide-ripple/src/__tests__/useTween.test.luau | luau | .luau | local Ripple = require("../../Ripple")
local Vide = require("../../Vide")
local test = require("../../../../tests/test")
local useTween = require("../useTween")
test("should update binding when goal is set", function()
local src, tween
Vide.root(function()
src, tween = useTween(0)
tween:setGoal(1, { tween = { d... | 118 |
littensy/ripple | littensy-ripple-c33bb8b/packages/vide-ripple/src/useMotion.luau | luau | .luau | local Ripple = require(script.Parent.Parent.Ripple)
local Vide = require(script.Parent.Parent.Vide)
type Animatable = Ripple.Animatable
type Motion<T> = Ripple.Motion<T>
type MotionOptions<T> = Ripple.MotionOptions<T>
local function useMotion<T>(initialValue: T, initialOptions: MotionOptions<T>?): (() -> T, Motion<T>... | 154 |
littensy/ripple | littensy-ripple-c33bb8b/packages/vide-ripple/src/useTween.luau | luau | .luau | local Ripple = require(script.Parent.Parent.Ripple)
local Vide = require(script.Parent.Parent.Vide)
type Animatable = Ripple.Animatable
type Tween<T> = Ripple.Tween<T>
type TweenOptions<T> = Ripple.TweenOptions<T>
local function useTween<T>(initialValue: T, initialOptions: TweenOptions<T>?): (() -> T, Tween<T>)
loca... | 152 |
littensy/ripple | littensy-ripple-c33bb8b/storybook/components/Graph.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local React = require(ReplicatedStorage["@rbxts-js"].React)
type GraphProps = {
name: string,
precision: number,
step: (dt: number) -> number,
idle: () -> boolean,
showRuntime: boolean?,
}
local MAX_POINTS = 50
local function Graph(props: GraphProp... | 814 |
littensy/ripple | littensy-ripple-c33bb8b/storybook/stories/EasingFunctions.story.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Graph = require(script.Parent.Parent.components.Graph)
local React = require(ReplicatedStorage["@rbxts-js"].React)
local ReactRoblox = require(ReplicatedStorage["@rbxts-js"].ReactRoblox)
local Ripple = require(ReplicatedStorage.packages.ripple.src)
... | 434 |
littensy/ripple | littensy-ripple-c33bb8b/storybook/stories/SpringColor.story.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local React = require(ReplicatedStorage["@rbxts-js"].React)
local ReactRipple = require(ReplicatedStorage.packages["react-ripple"].src)
local ReactRoblox = require(ReplicatedStorage["@rbxts-js"].ReactRoblox)
local function Story()
local _, tween = ReactR... | 354 |
littensy/ripple | littensy-ripple-c33bb8b/tests/run.server.luau | luau | .luau | local test = require("./test")
local describeInRoblox = test.describeIf(function()
return game :: any ~= nil
end)
test.describe("ripple", function()
require("../packages/ripple/src/__tests__")
end)
describeInRoblox("react-ripple", function()
require("../packages/react-ripple/src/__tests__")
end)
describeInRoblox... | 104 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Action/Flags.lua | luau | .lua | --!strict
return {
STATIONARY = bit32.lshift(1, 9),
MOVING = bit32.lshift(1, 10),
AIR = bit32.lshift(1, 11),
INTANGIBLE = bit32.lshift(1, 12),
SWIMMING = bit32.lshift(1, 13),
METAL_WATER = bit32.lshift(1, 14),
SHORT_HITBOX = bit32.lshift(1, 15),
RIDING_SHELL = bit32.lshift(1, 16),
INVULNERABLE = bit32.lshift(... | 339 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Action/Groups.lua | luau | .lua | --!strict
return {
-- Group Flags
STATIONARY = bit32.lshift(0, 6),
MOVING = bit32.lshift(1, 6),
AIRBORNE = bit32.lshift(2, 6),
SUBMERGED = bit32.lshift(3, 6),
CUTSCENE = bit32.lshift(4, 6),
AUTOMATIC = bit32.lshift(5, 6),
OBJECT = bit32.lshift(6, 6),
-- Mask for capturing these Flags
GROUP_MASK = 0b_0000001... | 134 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Action/init.lua | luau | .lua | --!strict
return {
UNINITIALIZED = 0x00000000, -- (0x000)
-- group 0x000: stationary actions
IDLE = 0x0C400201, -- (0x001 | FLAG_STATIONARY | FLAG_IDLE | FLAG_ALLOW_FIRST_PERSON | FLAG_PAUSE_EXIT)
START_SLEEPING = 0x0C400202, -- (0x002 | FLAG_STATIONARY | FLAG_IDLE | FLAG_ALLOW_FIRST_PERSON | FLAG_PAUSE_EXIT)
SL... | 7,809 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Buttons.lua | luau | .lua | --!strict
return {
A_BUTTON = 0x8000,
B_BUTTON = 0x4000,
L_TRIG = 0x0020,
R_TRIG = 0x0010,
Z_TRIG = 0x2000,
START_BUTTON = 0x1000,
U_JPAD = 0x0800,
L_JPAD = 0x0200,
R_JPAD = 0x0100,
D_JPAD = 0x0400,
U_CBUTTONS = 0x0008,
L_CBUTTONS = 0x0002,
R_CBUTTONS = 0x0001,
D_CBUTTONS = 0x0004,
}
| 149 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/FloorType.lua | luau | .lua | --!strict
return {
-- TODO
}
| 11 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/InputFlags.lua | luau | .lua | --!strict
return {
NONZERO_ANALOG = 0x0001,
A_PRESSED = 0x0002,
OFF_FLOOR = 0x0004,
ABOVE_SLIDE = 0x0008,
FIRST_PERSON = 0x0010,
NO_MOVEMENT = 0x0020,
SQUISHED = 0x0040,
A_DOWN = 0x0080,
IN_POISON_GAS = 0x0100,
IN_WATER = 0x0200,
STOMPED = 0x0400,
INTERACT_OBJ_GRABBABLE = 0x0800,
UNKNOWN_12 = 0x1000,
B_P... | 177 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Mario/Cap.lua | luau | .lua | --!strict
return {
DEFAULT_CAP_ON = 0,
DEFAULT_CAP_OFF = 1,
WING_CAP_ON = 2,
WING_CAP_OFF = 3,
}
| 39 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Mario/Eyes.lua | luau | .lua | --!strict
return {
BLINK = 0,
OPEN = 1,
HALF_CLOSED = 2,
CLOSED = 3,
DEAD = 4,
}
| 41 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Mario/Flags.lua | luau | .lua | --!strict
local MarioFlags = {
NORMAL_CAP = 0x00000001,
VANISH_CAP = 0x00000002,
METAL_CAP = 0x00000004,
WING_CAP = 0x00000008,
CAP_ON_HEAD = 0x00000010,
CAP_IN_HAND = 0x00000020,
METAL_SHOCK = 0x00000040,
TELEPORTING = 0x00000080,
MOVING_UP_IN_AIR = 0x00000100,
ACTION_SOUND_PLAYED = 0x00010000,
MARIO_SOUND... | 239 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Mario/Hands.lua | luau | .lua | --!strict
return {
FISTS = 0,
OPEN = 1,
PEACE_SIGN = 2,
HOLDING_CAP = 3,
HOLDING_WING_CAP = 4,
RIGHT_OPEN = 5,
}
| 52 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Mario/Input.lua | luau | .lua | --!strict
return {
NONZERO_ANALOG = 0x0001,
A_PRESSED = 0x0002,
OFF_FLOOR = 0x0004,
ABOVE_SLIDE = 0x0008,
FIRST_PERSON = 0x0010,
NO_MOVEMENT = 0x0020,
SQUISHED = 0x0040,
A_DOWN = 0x0080,
IN_POISON_GAS = 0x0100,
IN_WATER = 0x0200,
STOMPED = 0x0400,
INTERACT_OBJ_GRABBABLE = 0x0800,
B_PRESSED = 0x2000,
Z_DO... | 166 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/ModelFlags.lua | luau | .lua | --!strict
return {
METAL = 0x1,
INVISIBLE = 0x2,
NOISE_ALPHA = 0x4,
}
| 34 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/ParticleFlags.lua | luau | .lua | --!strict
return {
DUST = bit32.lshift(1, 0),
VERTICAL_STAR = bit32.lshift(1, 1),
SPARKLES = bit32.lshift(1, 3),
HORIZONTAL_STAR = bit32.lshift(1, 4),
BUBBLE = bit32.lshift(1, 5),
WATER_SPLASH = bit32.lshift(1, 6),
IDLE_WATER_WAVE = bit32.lshift(1, 7),
SHALLOW_WATER_WAVE = bit32.lshift(1, 8),
PLUNGE_BUBBLE = ... | 272 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Steps/Air.lua | luau | .lua | --!strict
return {
NONE = 0,
LANDED = 1,
HIT_WALL = 2,
GRABBED_LEDGE = 3,
GRABBED_CEILING = 4,
HIT_LAVA_WALL = 6,
CHECK_LEDGE_GRAB = 1,
CHECK_HANG = 2,
}
| 72 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Steps/Ground.lua | luau | .lua | --!strict
return {
LEFT_GROUND = 0,
NONE = 1,
HIT_WALL = 2,
HIT_WALL_STOP_QSTEPS = 2,
HIT_WALL_CONTINUE_QSTEPS = 3,
}
| 49 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/Steps/Water.lua | luau | .lua | --!strict
return {
NONE = 0,
HIT_FLOOR = 1,
HIT_CEILING = 2,
CANCELLED = 3,
HIT_WALL = 4,
}
| 43 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/SurfaceClass.lua | luau | .lua | --!strict
return {
DEFAULT = 0x0000,
VERY_SLIPPERY = 0x0013,
SLIPPERY = 0x0014,
NOT_SLIPPERY = 0x0015,
}
| 54 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/TerrainType.lua | luau | .lua | --!strict
local TerrainType = {
DEFAULT = 0,
GRASS = 1,
WATER = 2,
STONE = 3,
SPOOKY = 4,
SNOW = 5,
ICE = 6,
SAND = 7,
METAL = 8,
}
TerrainType.FROM_MATERIAL = {
[Enum.Material.Mud] = TerrainType.GRASS,
[Enum.Material.Grass] = TerrainType.GRASS,
[Enum.Material.Ground] = TerrainType.GRASS,
[Enum.Material.... | 460 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Enums/init.lua | luau | .lua | --!strict
local Enums = {
Action = require(script.Action),
Buttons = require(script.Buttons),
ActionFlags = require(script.Action.Flags),
ActionGroups = require(script.Action.Groups),
MarioCap = require(script.Mario.Cap),
MarioEyes = require(script.Mario.Eyes),
MarioFlags = require(script.Mario.Flags),
MarioH... | 268 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Mario/Airborne/init.server.lua | luau | .lua | --!strict
local System = require(script.Parent)
local Animations = System.Animations
local Sounds = System.Sounds
local Enums = System.Enums
local Util = System.Util
local Action = Enums.Action
local ActionFlags = Enums.ActionFlags
local AirStep = Enums.AirStep
local MarioEyes = Enums.MarioEyes
local InputFlags = En... | 10,003 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Mario/Automatic/init.server.lua | luau | .lua | --!strict
local System = require(script.Parent)
local Animations = System.Animations
local Sounds = System.Sounds
local Enums = System.Enums
local Util = System.Util
local Action = Enums.Action
local ActionFlags = Enums.ActionFlags
local ActionGroup = Enums.ActionGroups
local AirStep = Enums.AirStep
local MarioEyes ... | 1,213 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Mario/Submerged/init.server.lua | luau | .lua | local System = require(script.Parent)
local Animations = System.Animations
local Sounds = System.Sounds
local Enums = System.Enums
local Util = System.Util
local Action = Enums.Action
local AirStep = Enums.AirStep
local WaterStep = Enums.WaterStep
local GroundStep = Enums.GroundStep
local InputFlags = Enums.InputFlags... | 6,401 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Types/Flags.lua | luau | .lua | --!strict
local Flags = {}
Flags.__index = Flags
export type Flags = { Value: number }
export type Class = typeof(setmetatable({} :: Flags, Flags))
function Flags.new(...: number): Class
local flags = { Value = bit32.bor(...) }
return setmetatable(flags, Flags)
end
function Flags.__call(self: Class): number
retu... | 278 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/Types/init.lua | luau | .lua | --!strict
local Flags = require(script.Flags)
export type Flags = Flags.Class
export type Controller = {
RawStickX: number,
RawStickY: number,
StickX: number,
StickY: number,
StickMag: number,
ButtonDown: Flags,
ButtonPressed: Flags,
}
export type BodyState = {
Action: number,
CapState: Flags,
EyeState: ... | 556 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/client/init.server.lua | luau | .lua | --!strict
local Core = script.Parent
if Core:GetAttribute("HotLoading") then
task.wait(3)
end
for i, desc in script:GetDescendants() do
if desc:IsA("BaseScript") then
desc.Enabled = true
end
end
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local StarterGui = game:G... | 5,022 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/server/LazyNetworking.server.lua | luau | .lua | --!strict
local Validators: { [string]: (Player, ...any) -> boolean } = {}
type Echo = () -> ()
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Core = script.Parent.Parent
local Shared = require(Core.Shared)
local Sounds = Shared.Sounds
local lazy = Instance.new("RemoteEvent")
lazy.Parent = Repl... | 348 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/server/StarterCharacter/Appearance/init.server.lua | luau | .lua | --!strict
local Players = game:GetService("Players")
local character: Instance = assert(script.Parent)
assert(character:IsA("Model"), "Not a character")
local player = Players:GetPlayerFromCharacter(character)
assert(player, "No player!")
local userId = player.UserId
local hDesc: HumanoidDescription?
local metalPoi... | 883 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/server/StarterCharacter/init.server.lua | luau | .lua | --!strict
local Players = game:GetService("Players")
local StarterPlayer = game:GetService("StarterPlayer")
local PhysicsService = game:GetService("PhysicsService")
local StarterCharacterScripts = StarterPlayer.StarterCharacterScripts
local hDesc = Instance.new("HumanoidDescription")
hDesc.HeightScale = 1.3
hDesc.Wid... | 376 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/tools/ImportAnimations.lua | luau | .lua | local AvatarImportService = game:GetService("AvatarImportService")
local resume = Instance.new("BindableEvent")
for i, anim in pairs(game.ReplicatedFirst.SM64.Assets.Animations:GetChildren()) do
local path = "C:/Users/clone/Desktop/MarioAnims/" .. anim.Name .. ".fbx"
print("Importing", anim)
task.defer(function()
... | 229 |
MaximumADHD/sm64-roblox | MaximumADHD-sm64-roblox-79d5372/tools/RetargetAnimations.lua | luau | .lua | -- This script was written (quite rigidly) for use in the provided RetargetAnimations.rbxl place.
-- KeyframeSequences are not provided as mentioned in the README, you'll have to extract them yourself :)
--!strict
local ServerStorage = game:GetService("ServerStorage")
local StarterCharacter = workspace.StarterCharacte... | 1,311 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/ExternalTime.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Outputs the current external time as a state object.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = require(Package.External)
-- Graph
local change = ... | 545 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/Stopwatch.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
State object for measuring time since an event using a reference timer.
TODO: this should not be exposed to users until it has a proper reactive API
surface
]]
local Package = script.Parent.Pare... | 743 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/Tween.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A specialised state object for following a goal state smoothly over time,
using a TweenInfo to shape the motion.
https://elttob.uk/Fusion/0.3/api-reference/animation/types/tween/
]]
local Packag... | 1,344 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/getTweenDuration.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Given a `tweenInfo`, returns how many seconds it will take before the tween
finishes moving. The result may be infinite if the tween repeats forever.
]]
local TweenService = game:GetService("Tween... | 174 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/getTweenRatio.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Given a `tweenInfo` and `currentTime`, returns a ratio which can be used to
tween between two values over time.
]]
local TweenService = game:GetService("TweenService")
local function getTweenRati... | 336 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/lerpType.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Linearly interpolates the given animatable types by a ratio.
If the types are different or not animatable, then the first value will be
returned for ratios below 0.5, and the second value for 0.5 ... | 1,523 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/packType.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Packs an array of numbers into a given animatable data type.
If the type is not animatable, nil will be returned.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local... | 842 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/springCoefficients.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Returns a 2x2 matrix of coefficients for a given time, damping and angular
frequency (aka 'speed').
Specifically, this returns four coefficients - posPos, posVel, velPos, and
velVel - which can... | 740 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Animation/unpackType.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Unpacks an animatable type into an array of numbers.
If the type is not animatable, an empty array will be returned.
]]
local Package = script.Parent.Parent
local Oklab = require(Package.Colour.Ok... | 856 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/External.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Abstraction layer between Fusion internals and external environments,
allowing for flexible integration with schedulers and test mocks.
]]
local Package = script.Parent
local formatError = require... | 860 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/ExternalDebug.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Abstraction layer between Fusion internals and external debuggers, allowing
for deep introspection using function hooks.
Unlike `External`, attaching a debugger is optional, and all debugger
fun... | 409 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Graph/Observer.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A graph object that runs user code when it's updated by the reactive graph.
http://elttob.uk/Fusion/0.3/api-reference/state/types/observer/
]]
local Package = script.Parent.Parent
local Types = r... | 635 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Graph/castToGraph.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Returns the input *only* if it is a graph object.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local function castToGraph(
target: any
): Types.GraphObject?
if
... | 165 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Graph/change.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Prompts a graph object to re-evaluate its own value. If it meaningfully
changes, then dependents will have to re-evaluate their own values in the
future.
https://fluff.blog/2024/04/16/monotonic-... | 592 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Graph/depend.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Forms a dependency on a graph object.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = require(Package.External)
local evaluate = require(Package.Graph.... | 245 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Graph/evaluate.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Evaluates the graph object if necessary, so that it is up to date.
Returns true if it meaningfully changed.
https://fluff.blog/2024/04/16/monotonic-painting.html
]]
local Package = script.Parent... | 378 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/Attribute.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A special key for property tables, which allows users to apply custom
attributes to instances
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
-- Memory
local checkLife... | 354 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/AttributeChange.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A special key for property tables, which allows users to connect to
an attribute change on an instance.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External ... | 294 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/AttributeOut.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A special key for property tables, which allows users to save instance attributes
into state objects
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = r... | 408 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/Child.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Helper function for type checking purposes. Casts the input to a `Child`
type, while constraining the input to be an array of `Child` - this prevents
Luau from erroneously inferring a different ar... | 126 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/Children.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A special key for property tables, which parents any given descendants into
an instance.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = require(Packa... | 1,058 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/Hydrate.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Processes and returns an existing instance, with options for setting
properties, event handlers and other attributes on the instance.
]]
local Package = script.Parent.Parent
local Types = require(... | 152 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/New.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Constructs and returns a new instance, with options for setting properties,
event handlers and other attributes on the instance right away.
]]
local Package = script.Parent.Parent
local Types = re... | 318 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/OnChange.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Constructs special keys for property tables which connect property change
listeners to an instance.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = re... | 319 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/OnEvent.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Constructs special keys for property tables which connect event listeners to
an instance.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = require(Pack... | 327 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/Out.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A special key for property tables, which allows users to extract values from
an instance into an automatically-updated Value object.
]]
local Package = script.Parent.Parent
local Types = require(P... | 439 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/Tag.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A special key for property tables, which allows users to apply custom
CollectionService tags to instances
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
-- Memory
loc... | 400 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/applyInstanceProps.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Applies a table of properties to an instance, including binding to any
given state objects and applying any special keys.
No strong reference is kept by default - special keys should take care no... | 1,039 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Instances/defaultProps.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Stores 'sensible default' properties to be applied to instances created by
the New function.
]]
return {
ScreenGui = {
ResetOnSpawn = false,
ZIndexBehavior = Enum.ZIndexBehavior.Sibling
},
... | 1,400 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Logging/formatError.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Formats a Fusion-specific error message.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local messages = require(Package.Logging.messages)
local ERROR_INFO_URL = "htt... | 394 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Logging/parseError.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
An xpcall() error handler to collect and parse useful information about
errors, such as clean messages and stack traces.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types... | 138 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Memory/checkLifetime.luau | luau | .luau |
--!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Procedures for checking lifetimes and printing helpful warnings about them.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = require(Package.External)... | 958 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Memory/deriveScope.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Creates an empty scope with the same metatables as the original scope. Used
for preserving access to constructors when creating inner scopes.
This is the public version of the function, which imp... | 156 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Memory/deriveScopeImpl.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Creates an empty scope with the same metatables as the original scope. Used
for preserving access to constructors when creating inner scopes.
This is the internal version of the function, which d... | 258 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Memory/doCleanup.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Cleans up the tasks passed in as the arguments.
A task can be any of the following:
- an Instance - will be destroyed
- an RBXScriptConnection - will be disconnected
- a function - will be run
... | 670 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Memory/innerScope.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Derives a new scope that's destroyed exactly once, whether by the user or by
the scope that it's inside of.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local Extern... | 211 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Memory/insert.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Inserts clean up tasks passed in to the scope.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local function insert<Tasks...>(
scope: Types.Scope<unknown>,
...: Task... | 117 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Memory/needsDestruction.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Returns true if the given value is not automatically memory managed, and
requires manual cleanup.
]]
local function needsDestruction(
x: unknown
): boolean
return typeof(x) == "Instance"
end
re... | 83 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Memory/scoped.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Creates cleanup tables with access to constructors as methods.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local ExternalDebug = require(Package.ExternalDebug)
loca... | 148 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.