Getting Started
pretty-fusion-utils
is an opinionated collection of modern Fusion 0.3
utilities.
This package assumes you are comfortable using Fusion, the Luau scripting language, and Roblox fundamentals. If you would like to learn, see the Fusion documentation and the Roblox creator documentation.
Installation
via Wally
-
Append this to your
wally.toml
configuration:[dependencies] fusionUtils = "znotfireman/pretty-fusion-utils@0.1"
-
Run
wally install
to installpretty-fusion-utils
-
Import
pretty-fusion-utils
into your code:local ReplicatedStorage = game:GetService("ReplicatedStorage") local fusionUtils = require(ReplicatedStorage.Packages.fusionUtils)
via Pesde
- Run
pesde add znotfireman/pretty_fusion_utils@0.1
to installpretty-fusion-utils
-
Import
pretty-fusion-utils
into your code:local ReplicatedStorage = game:GetService("ReplicatedStorage") local fusionUtils = require(ReplicatedStorage.packages.fusionUtils)
via Roblox
- Visit the
pretty-fusion-utils
GitHub Releases to find the target release - Click "Assets", then click
pretty-fusion-utils.rbxm
to download it - Open Roblox Studio to import the package, preferrably within ReplicatedStorage
- Rename the package to something that can be required, such as "fusionUtils"
-
Import
pretty-fusion-utils
into your code:local ReplicatedStorage = game:GetService("ReplicatedStorage") local fusionUtils = require(ReplicatedStorage.fusionUtils)
via Source
- Clone the
pretty-fusion-utils
GitHub repository - Install all tooling using Rokit via
rokit install
-
Run
lune run build
, choose not to release to Wally/Pesde when prompted:$ lune run build ✔ Create .rbxm models? · yes ✔ Release to Wally/Pesde? · no
-
Copy the generated
dist/lib
folder or use the generatedpretty-fusion-utils.rbxm
model
Usage
pretty-fusion-utils
can use any Fusion 0.3 package. It does not require a deep
scan of a game to find Fusion 0.3. Just provide it a scope with Fusion:
local scope = Fusion:scoped()
useInterval(scope, 0.5, function()
print("Hello!")
end)
For convenience, pretty-fusion-utils
can be passed into scope constructors:
local scope = Fusion:scoped(fusionUtils)
scope:useInterval(0.5, function()
print("Hello!")
end)
Components that use pretty-fusion-utils
can specify it as type information:
local function Button(
scope: Fusion.Scope<typeof(Fusion) & typeof(fusionUtils)>,
props: {
-- ...
}
)
Navigation
Using the sidebar to the left, you can browse all of the utilities by name.