Skip to content

Overview

What follows is an overview of the libraries installable by RoStrap:

RoStrap-owned Libraries by category

Core

Resources - The core resource manager and library loader for RoStrap. Centralizes library loading and simplifies resource management.

Classes

Enumeration - A Lua implementation of Roblox Enums with the ability to declare new ones

Enumeration.SelectionControllerType = {"Checkbox", "Radio", "Switch"}
local Radio = Enumeration.SelectionControllerType.Radio

print(Radio) --> Enumeration.SelectionControllerType.Radio
print(Radio.EnumerationType) --> SelectionControllerType
print(Radio.Name) --> Radio
print(Radio.Value) --> 1
PseudoInstance - A library for declaring black-boxed classes similar to Roblox Instances
ReplicatedPseudoInstance - An extension of PseudoInstance with an automatic replication system

DataTypes

Array - A few utility functions which can operate on Arrays

SortedArray - A class for sorted arrays using the binary search algorithm
Table - A few utility functions which operate on Tables, notably Table.Lock

Debugging

Debug - Better error/warn functions and an implementation of TableToString

Typer - Type Checker and Function Signature Assigner
local AddPlayer = Typer.AssignSignature(Typer.InstanceWhichIsAPlayer, function(plr)
    print(plr)
end)

AddPlayer(game:GetService("Players").LocalPlayer) -- good!
AddPlayer(10) -- [Typer] {AddPlayer} bad argument #1: expected Instance which is a Player, got number 10

Events

Janitor - Light-weight, flexible object for cleaning up connections, instances, or anything. Intended to reach all use cases

Signal - A class for creating API-compatible Roblox Events

Helper

FastSpawn - Expensive method of running a function on a new thread without yielding a frame (like spawn) and works within Roblox's thread scheduler (coroutine.resume(coroutine.create(Func)) is now preferred)

Make - Shorthand for instance declarations

Input

Keys - Simplifies Key input bindings

local Q = Keys.Q -- returns a Key Object

Q.KeyDown:Connect(function()
    print("Q was pressed!")
end)

Q.KeyUp:Connect(function()
    print("Q was let go!")
end)

Interpolation

Bezier - Lua implementation of (2D) Bezier curves

local EasingFunc = Bezier.new(0.17, 0.67, 0.83, 0.67)
EasingFunctions - A bunch of reuseable Easing Functions, including those from the Material Design specification (Standard, Acceleration, and Deceleration)
Lerps - Holds all Lerp functions for Roblox objects, with a special visually-linear color lerping function

Tween - Tweening library modeled after the TweenPosition method built upon Lerps and EasingFunctions
Tween(workspace.Part, "Transparency", 1, Standard, 2, true)

Math

BigNum - A BigNum with Fractions implementation for big-integer calculations, optimized for DataStore storage and networking.

print(BigNum.new("1025123") ^ BigNum.new("9"))
--> 1250212389547080859766804627957328989496357747253559363
Leveler - Level and Experience class, because why not?
Normal - Random number generator along a Normal distribution curve
WeightedProbabilityFunction - A syntactically pleasing way of creating functions which randomly pick an option based upon its relative probability
local CoinToss = WeightedProbabilityFunction.new {
    Heads = 0.5;
    Tails = 0.5;
}

print(CoinToss()) --> Heads

RoStrapUI

AsymmetricTransformation - Transform function for Paper from the Material Design specifications

Checkbox - A Material Design checkbox element
ChoiceDialog - A Material Design ChoiceDialog element with built-in replication
Color - Material Design's 2014 Color Palette
Radio - A Material Design radio element
RadioGroup - A wrapper class for a group of radio elements
RippleButton - A Material Design button element
Rippler - A Material design class responsible for creating ripples
SelectionController - A class from which the checkbox and radio classes inherit
Shadow - A Shadow/Elevation rendering PseudoInstance
Snackbar - A Material Design Snackbar element with built-in replication

Time

Date - A reimplementation of the vanilla Lua os.date function built upon the one exposed by RobloxLua

print(Date("ISO 8601: %FT%T%#z")) --> ISO 8601: 2020-12-31T01:03:05-05:00
SyncedPoller - Calls functions on an interval along os.time (for cross-server simultaneous calls)

Sentry

Sentry - A library for reporting errors/warnings/messages to your Sentry account
Try - (DEPRECATED in favor of Promise) An asynchronous pcall-wrapper library for controlling the flow of error-prone, interdependent functions.

Roblox-owned Libraries

Roact - A declarative UI library similar to Facebook's React
Rodux - A state management library inspired by Redux
Roact-Rodux - An ergonomic binding between Roact and Rodux

Highly trusted Libraries

Promise - An implementation of Promise similar to Promise/A+
Aurora - Manages status effects (known as "Auras")
DataStoreService - An implementation of Roblox's DataStoreService in Lua for seamless offline development & testing
Cmdr - A fully extensible and type-safe admin command console

Demo video

EvLightning - Realistic-looking lightning bolt generator

RadialImage - A library which displays radial progress indicators using a sprite sheet generated by a nifty tool

Third-Party Libraries

Ready - A Library for yielding until an object's descendants have finished replicating

Libraries Lacking documentation

ConditionalPoller - A class that continually calls a callback as long as a condition is true

ReplicatedValue - A server-authoritative value replicated across the network
Spring - Simulates the motion of a critically damped spring

RoStrap Discord

Questions? Comments? Concerns? Join us!