cameronpcampbell/supercorner_fusion03
Fusion 0.3 wrapper for Supercorner (A figma-inspired alternative to Roblox's UICorner).
Supercorner Fusion 0.3
A Fusion 0.3 wrapper for Supercorner.
Installation
Install the Roblox package with Pesde:
pesde add cameronpcampbell/[email protected] -t roblox
Or add it directly to pesde.toml:
[dependencies]
supercorner_fusion03 = { name = "cameronpcampbell/supercorner_fusion03", version = "^0.1.1", target = "roblox" }
Usage
local Fusion = require(path.to.Fusion)
local Supercorner = require(path.to.SupercornerFusion03)
local Scoped = Fusion.scoped
local Scope = Scoped(Fusion)
local CornerRadiusState = Scope:Value(24)
Supercorner.new(Scope, {
CornerRadius = CornerRadiusState,
CornerSmoothing = 0.6,
MaxCornerRadius = 48,
Redrawable = true,
BackgroundColor3 = Color3.new(1, 1, 1),
Size = UDim2.fromOffset(200, 200),
})
Reactive Geometry
Set Redrawable = true when CornerRadius, CornerSmoothing, any individual
corner radius, PreserveSmoothing, AntiAlias, or StrokeThickness is
reactive. Configure MaxCornerRadius or the individual maximum-radius props for
the largest values the component will display.
Related geometry changes made together are coalesced into one deferred redraw,
so the component does not rasterize transient combinations of new and old
values. For predetermined animations between two geometries, prefer
Supercorner.atlas to pre-render discrete keypoints.
When all four effective corner radii are 0 and Redrawable is false,
Supercorner.new renders the shape with a regular Frame and an optional
UIStroke. This avoids allocating image content for a rectangular shape.
Fill color/transparency and stroke thickness/color/transparency remain reactive
in this mode; a fully transparent fill produces a hollow frame.
Fallback Behavior
If Supercorner fails to create (e.g. the editable memory budget is exhausted), the component automatically falls back to a standard UICorner.