repo stringclasses 350
values | file_path stringlengths 29 200 | language stringclasses 2
values | file_type stringclasses 4
values | code stringlengths 2 1.01M | tokens int64 2 598k |
|---|---|---|---|---|---|
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 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/RobloxExternal.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
--[[
Roblox implementation for Fusion's abstract provider layer.
]]
local RunService = game:GetService("RunService")
local HttpService = game:GetService("HttpService")
local Package = script.Parent
local External = require(Package.External)
local RobloxExternal... | 504 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/Computed.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A specialised state object for tracking single values computed from a
user-defined computation.
https://elttob.uk/Fusion/0.3/api-reference/state/types/computed/
]]
local Package = script.Parent.... | 854 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/For/Disassembly.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Breaks down an input table into reactive sub-objects for each pair.
]]
local Package = script.Parent.Parent.Parent
local Types = require(Package.Types)
local External = require(Package.External)
--... | 1,581 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/For/ForTypes.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Stores types that are commonly used between For objects.
]]
local Package = script.Parent.Parent.Parent
local Types = require(Package.Types)
export type SubObject<S, KI, KO, VI, VO> = {
-- Not al... | 272 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/For/init.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
The generic implementation for all `For` objects.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
-- Graph
local depend = require(Package.Graph.depend)
-- State
local p... | 650 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/ForKeys.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Constructs and returns a new For state object which processes keys and
preserves values.
https://elttob.uk/Fusion/0.3/api-reference/state/members/forkeys/
TODO: the sub objects constructed here... | 645 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/ForPairs.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Constructs and returns a new For state object which processes keys and
values in pairs.
https://elttob.uk/Fusion/0.3/api-reference/state/members/forpairs/
TODO: the sub objects constructed here... | 725 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/ForValues.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Constructs and returns a new For state object which processes values and
preserves keys.
https://elttob.uk/Fusion/0.3/api-reference/state/members/forvalues/
TODO: the sub objects constructed he... | 633 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/Value.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A state object which allows regular Luau code to control its value.
https://elttob.uk/Fusion/0.3/api-reference/state/types/value/
]]
local Package = script.Parent.Parent
local Types = require(Pac... | 464 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/castToState.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 state object.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local function castToState<T>(
target: Types.UsedAs<T>
): Types.Stat... | 128 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/peek.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Extracts a value of type T from its input.
https://elttob.uk/Fusion/0.3/api-reference/state/members/peek/
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
-- State
loc... | 185 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/State/updateAll.luau | luau | .luau | return nil -- dummy file so I can write tests | 10 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Types.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Stores common public-facing type information for Fusion APIs.
]]
export type Error = {
type: "Error",
raw: string,
message: string,
trace: string,
context: string?
}
-- Types that can be expr... | 3,296 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Utility/Contextual.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Time-based contextual values, to allow for transparently passing values down
the call stack.
]]
local Package = script.Parent.Parent
local Types = require(Package.Types)
local External = requir... | 562 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Utility/Safe.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
A variant of xpcall() designed for inline usage, letting you define fallback
values based on caught errors.
]]
local Package = script.Parent.Parent
local function Safe<Success, Fail>(
callbac... | 128 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Utility/isSimilar.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Implements the 'similarity test' used to determine whether two values have
a meaningful difference.
https://elttob.uk/Fusion/0.3/tutorials/best-practices/optimisation/#similarity
]]
local functi... | 208 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Utility/merge.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Attempts to merge a variadic number of tables together.
]]
local Package = script.Parent.Parent
local External = require(Package.External)
local function merge(
overwrite: boolean,
into: {[unkno... | 196 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Utility/nameOf.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Returns the most specific custom name for the given object.
]]
local Package = script.Parent.Parent
-- Utility
local nicknames = require(Package.Utility.nicknames)
local function nameOf(
x: unkno... | 196 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Utility/never.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Never returns.
]]
local function never(): never
error("This codepath should not be reachable")
end
return never | 61 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Utility/nicknames.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Stores nicknames for values that don't support metatables, so that `nameOf`
can return values for them.
]]
return setmetatable({}, {__mode = "k"}) | 73 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/Utility/xtypeof.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
Extended typeof, designed for identifying custom objects.
If given a table with a `type` string, returns that.
Otherwise, returns `typeof()` the argument.
]]
local function xtypeof(
x: unknown
)... | 142 |
dphfox/Fusion | dphfox-Fusion-2790f7b/src/init.luau | luau | .luau | --!strict
--!nolint LocalUnused
--!nolint LocalShadow
local task = nil -- Disable usage of Roblox's task scheduler
--[[
The entry point for the Fusion library.
]]
local Types = require(script.Types)
local External = require(script.External)
type Fusion = Types.Fusion
export type Animatable = Types.Animatable
export... | 638 |
1Axen/blink | 1Axen-blink-73695d1/.lune/build.luau | luau | .luau | local fs = require("@lune/fs")
local log = require("./libs/log")
local process = require("@lune/process")
type Archs = | "aarch64" | "x86_64"
type Platforms = | "macos" | "linux" | "windows"
local EXE_NAME = "blink"
local RELEASE_DIR = "release"
local PLUGIN_SOURCE_DIR = `plugin/src`
local PLUGIN_RELEASE_DIR = `{RE... | 895 |
1Axen/blink | 1Axen-blink-73695d1/.lune/bump.luau | luau | .luau | local darklua_version = require("./libs/darklua_version")
local pesde_version = require("./libs/pesde_version")
local stdio = require("@lune/stdio")
local PESDE_CONFIG = "pesde.toml"
local DARKLUA_CONFIG = "build/.darklua.json"
local curr_version = darklua_version.read_from(DARKLUA_CONFIG)
local new_version = stdio.p... | 134 |
1Axen/blink | 1Axen-blink-73695d1/.lune/libs/darklua_version.luau | luau | .luau | local fs = require("@lune/fs")
local serde = require("@lune/serde")
local log = require("./log")
type DarkluaRules =
| "inject_global_value"
| "N/A"
type DarkluaConfig = {
rules: {
DarkluaRules | {
rule: DarkluaRules,
identifier: string,
value: any
}
... | 347 |
1Axen/blink | 1Axen-blink-73695d1/.lune/libs/log.luau | luau | .luau | local function log(text: string)
print(`* {text}`)
end
return log | 18 |
1Axen/blink | 1Axen-blink-73695d1/.lune/libs/pesde_version.luau | luau | .luau | local fs = require("@lune/fs")
local log = require("./log")
local serde = require("@lune/serde")
type PesdeConfig = {
version: string,
}
local function read_version(config_path: string): string
local contents = fs.readFile(config_path)
local config = serde.decode("toml", contents) :: PesdeConfig
return config.ver... | 172 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/run.luau | luau | .luau | local RunService = game:GetService("RunService")
if not RunService:IsRunning() then
print("Press F5 to start the benchmark.")
while task.wait(9e9) do
end
end
local Result: StringValue
while Result == nil do
Result = game:FindFirstChild("Result")
task.wait(1)
end
print("--RESULTS JSON--")
print(Result.Value)
| 82 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/client/init.client.luau | luau | .luau | local Benches = require("./shared/benches")
local Modes = require("./shared/modes")
local HttpService = game:GetService("HttpService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local StarterGui = game:GetSe... | 1,052 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/server/init.server.luau | luau | .luau | local HttpService = game:GetService("HttpService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Benches = require("./shared/benches")
local Modes = require("./shared/modes")
function CompareTables(a, b)
if a == b then
return true
end
if type(a) ~= type(b) then
return false
end
if ty... | 562 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/shared/benches/Booleans.luau | luau | .luau | return table.create(1000, true)
| 9 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/shared/benches/Entities.luau | luau | .luau | local Array = {}
for Index = 1, 100 do
table.insert(Array, {
id = math.random(1, 255),
x = math.random(1, 255),
y = math.random(1, 255),
z = math.random(1, 255),
orientation = math.random(1, 255),
animation = math.random(1, 255),
})
end
return Array
| 93 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/shared/benches/init.luau | luau | .luau | local Benches = {}
for Index, Bench in script:GetChildren() do
--> Reset random seed to a constant value
--> This results in the same values being generated on both server and client
math.randomseed(0)
Benches[Bench.Name] = require(Bench)
end
return Benches
| 67 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/shared/modes/blink.luau | luau | .luau | local RunService = game:GetService("RunService")
if RunService:IsServer() then
return require("../blink/Server")
elseif RunService:IsClient() then
return require("../blink/Client")
end
| 43 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/shared/modes/init.luau | luau | .luau | local DISABLED_MODES = {
warp = true,
}
local Modes = {}
for Index, Mode in script:GetChildren() do
if DISABLED_MODES[Mode.Name] then
continue
end
Modes[Mode.Name] = require(Mode)
end
return Modes
| 60 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/shared/modes/roblox.luau | luau | .luau | local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
local Benches = require("../benches")
local Events = {}
local IsServer = RunService:IsServer()
for Name in Benches do
local Event: RemoteEvent
if IsServer then
Event = Instance.new("RemoteEvent")
Eve... | 116 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/shared/modes/warp.luau | luau | .luau | local RunService = game:GetService("RunService")
local Benches = require("../benches")
local Warp = require("../../../packages/warp")
local Events = {}
local Method = RunService:IsServer() and "Server" or "Client"
for Name in Benches do
Events[Name] = Warp[Method](Name, {
interval = 0,
maxEntrance = math.huge,
... | 93 |
1Axen/blink | 1Axen-blink-73695d1/benchmark/src/shared/modes/zap.luau | luau | .luau | local RunService = game:GetService("RunService")
if RunService:IsServer() then
return require("../zap/Server")
elseif RunService:IsClient() then
return require("../zap/Client")
end
| 43 |
1Axen/blink | 1Axen-blink-73695d1/plugin/src/Editor/Styling/AutoBracket.luau | luau | .luau | local Hook = {}
local Brackets = {
["("] = ")",
["{"] = "}",
["["] = "]",
["<"] = ">",
}
local ClosingBrackets = {
[")"] = true,
["}"] = true,
["]"] = true,
[">"] = true,
}
local IgnoredCharacters = {
["\n"] = true,
[""] = true,
[")"] = true,
["}"] = true,
["]"] = true,
[">"] = true,
}
local function ... | 401 |
1Axen/blink | 1Axen-blink-73695d1/plugin/src/Editor/Styling/AutoIndent.luau | luau | .luau | local Utility = require("../Utility")
local Hook = {}
local IndentKeywords = {
"{\n",
}
local function ShouldAutoIndent(Text: string, Cursor: number): boolean
for Index, Keyword in IndentKeywords do
local Position = (Cursor - #Keyword)
if Position <= 0 then
continue
end
local Previous = string.sub(Text,... | 433 |
1Axen/blink | 1Axen-blink-73695d1/plugin/src/Editor/init.luau | luau | .luau | --!strict
-- ******************************* --
-- AX3NX / AXEN --
-- ******************************* --
---- Services ----
local ContentProvider = game:GetService("ContentProvider")
local RunService = game:GetService("RunService")
local TextService = game:GetService("TextService")
---- Imports ----
local S... | 6,263 |
1Axen/blink | 1Axen-blink-73695d1/plugin/src/Profiler.luau | luau | .luau | --!strict
---- Services ----
---- Imports ----
---- Settings ----
---- Constants ----
local Profiler = {}
--> Interface Instances
local Container: typeof(script.Parent.Widget) = script.Widget
local DebugContainer = Container.Debug
local MetricTemplate = DebugContainer.Metric:Clone()
type Profile = {
Label: stri... | 562 |
1Axen/blink | 1Axen-blink-73695d1/plugin/src/State.luau | luau | .luau | --!strict
-- ******************************* --
-- AX3NX / AXEN --
-- ******************************* --
---- Services ----
---- Imports ----
---- Settings ----
---- Constants ----
local State = {}
State.__index = State
export type Class<T> = typeof(setmetatable(
{} :: {
Value: T,
Observers: { [(T) -... | 302 |
1Axen/blink | 1Axen-blink-73695d1/plugin/src/Table.luau | luau | .luau | local Table = {}
function Table.MergeArrays(a: { any }, b: { any }): { any }
local Array = table.create(#a + #b)
for _, Element in a do
table.insert(Array, Element)
end
for _, Element in b do
table.insert(Array, Element)
end
return Array
end
function Table.MergeDictionaries(a: { [any]: any }, b: { [any]:... | 199 |
1Axen/blink | 1Axen-blink-73695d1/plugin/src/init.server.luau | luau | .luau | --!strict
-- ******************************* --
-- AX3NX / AXEN --
-- ******************************* --
---- Services ----
local RunService = game:GetService("RunService")
local ScriptEditorService = game:GetService("ScriptEditorService")
local Selection = game:GetService("Selection")
local ServerStorage = g... | 2,959 |
1Axen/blink | 1Axen-blink-73695d1/src/CLI/Utility/GetDefinitionFilePath.luau | luau | .luau | --!strict
---- Imports ----
local PathParser = require("../../Modules/Path")
local fs = require("@lune/fs")
---- Settings ----
local EXTENSIONS = { "", ".txt", ".blink" }
return function(Path: string): string
local Directory, Filename = PathParser.Components(Path)
Directory = Directory or "./"
assert(Filename, ... | 131 |
1Axen/blink | 1Axen-blink-73695d1/src/CLI/Utility/Watch.luau | luau | .luau | --!strict
---- Imports ----
local dateTime = require("@lune/datetime")
local fs = require("@lune/fs")
local stdio = require("@lune/stdio")
local task = require("@lune/task")
local Compile = require("./Compile")
local GetDefinitionFilePath = require("./GetDefinitionFilePath")
local PathParser = require("../../Modules... | 726 |
1Axen/blink | 1Axen-blink-73695d1/src/CLI/init.luau | luau | .luau | --!native
--!optimize 2
---- Imports ----
local process = require("@lune/process")
local stdio = require("@lune/stdio")
local Compile = require("@self/Utility/Compile")
local Watch = require("@self/Utility/Watch")
---- Settings ----
type Argument = {
Hidden: true?,
Aliases: { string },
Description: string,
}
l... | 821 |
1Axen/blink | 1Axen-blink-73695d1/src/Generator/Blocks.luau | luau | .luau | type BranchType = "Conditional" | "Default"
type EqualityOperator = "Not" | "Equals" | "Greater" | "Less" | "GreaterOrEquals" | "LessOrEquals"
type Method = "Read" | "Allocate" | "None"
type Operation = {
Method: Method,
Bytes: number,
Counts: number,
Variable: string?,
}
local DEFAULT_UNIQUE = "BLOCK_START"
loca... | 2,045 |
1Axen/blink | 1Axen-blink-73695d1/src/Generator/Prefabs.luau | luau | .luau | --!native
--!optimize 2
local Blocks = require("./Blocks")
local Parser = require("../Parser")
type Block = Blocks.Block
type Writer = (Value: string, Block: Block, Range: NumberRange?, Components: { string }?) -> ()
type Reader = (Variable: string, Block: Block, Range: NumberRange?, Components: { string }?) -> ()
ty... | 5,305 |
1Axen/blink | 1Axen-blink-73695d1/src/Modules/Builder.luau | luau | .luau | --!native
--!optimize 2
local Builder = {}
function Builder.new(): Builder
local Strings = table.create(512)
local function PushLines(Lines: { string }, Returns: number?, Tabs: number?)
local Size = #Lines
local Last = Lines[Size]
local Tabs = Tabs or 0
local Returns = Returns or 0
--> FAST PATH :SUNGL... | 459 |
1Axen/blink | 1Axen-blink-73695d1/src/Modules/Error.luau | luau | .luau | --!native
--!optimize 2
local IS_ROBLOX = (game ~= nil)
local stdio
local process
if not IS_ROBLOX then
stdio = require("@lune/stdio")
process = require("@lune/process")
end
type Slice = {
Line: number,
Text: string,
Spaces: number,
Underlines: number,
}
export type Label = {
Span: Span,
Text: string,
}
ty... | 1,872 |
1Axen/blink | 1Axen-blink-73695d1/src/Modules/Format.luau | luau | .luau | --!strict
local stdio = require("@lune/stdio")
local function Style(text: any, style: stdio.Style): string
return `{stdio.style(style)}{text}{stdio.style("reset")}`
end
local function Color(text: any, color: stdio.Color): string
return `{stdio.color(color)}{text}{stdio.color("reset")}`
end
local KEYWORDS = {
["a... | 786 |
1Axen/blink | 1Axen-blink-73695d1/src/Modules/Path.luau | luau | .luau | --!strict
---- Imports ----
---- Settings ----
---- Constants ----
local Utility = {}
---- Variables ----
---- Private Functions ----
---- Public Functions ----
function Utility.PathType(Path: string): "absolute" | "relative"
-- on unix-based systems, '/' is root
if string.sub(Path, 1, 1) == "/" then
return... | 355 |
1Axen/blink | 1Axen-blink-73695d1/src/Modules/Table.luau | luau | .luau | return {
Merge = function(...: { any }): { any }
local Tables = { ... }
local Allocate = 0
for _, Table in Tables do
Allocate += #Table
end
local Index = 1
local Merged = table.create(Allocate)
for _, Table in Tables do
table.move(Table, 1, #Table, Index, Merged)
Index += #Table
end
retu... | 230 |
1Axen/blink | 1Axen-blink-73695d1/src/Settings.luau | luau | .luau | type NumberRange = { Min: number, Max: number }
local NumberRange = {
new = function(Min: number, Max: number?): NumberRange
return {
Min = Min,
Max = Max or Min,
}
end,
}
export type Case = "Camel" | "Snake" | "Pascal"
export type Cases = {
Fire: string,
FireAll: string,
FireList: string,
FireExcept: ... | 1,444 |
1Axen/blink | 1Axen-blink-73695d1/src/Templates/Base.luau | luau | .luau | return [[local Invocations = 0
local SendSize = 64
local SendOffset = 0
local SendCursor = 0
local SendBuffer = buffer.create(64)
local SendInstances = {}
local RecieveCursor = 0
local RecieveBuffer = buffer.create(64)
local RecieveInstances = {}
local RecieveInstanceCursor = 0
local Null = newproxy()
type Entry =... | 658 |
1Axen/blink | 1Axen-blink-73695d1/src/Templates/Client.luau | luau | .luau | return [[local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
-- SPLIT --
if not RunService:IsClient() then
error("Client network module can only be required from the client.")
end
local Reliable: RemoteEvent = ReplicatedStorage:WaitForChild(BASE_EVENT_NA... | 216 |
1Axen/blink | 1Axen-blink-73695d1/src/Templates/Server.luau | luau | .luau | return [[local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")
-- SPLIT --
if not RunService:IsServer() then
error("Server network module can only be required from the server.")
end
local Reliable: RemoteEvent = R... | 380 |
ffrostfall/ByteNet | ffrostfall-ByteNet-fbdb156/src/data_types/array.luau | luau | .luau | local channel_state = require("../process/channel_state")
local types = require("../types")
--[[
Create a new array with the given dataTypeInterface
]]
@native
local function array<T>(value_ty: types.DataType<T>): types.DataType<{ T }>
local val_write = value_ty.write
local val_read = value_ty.read
return {
__T... | 252 |
ffrostfall/ByteNet | ffrostfall-ByteNet-fbdb156/src/data_types/bool.luau | luau | .luau | local types = require("../types")
local bool_modifier = {
[1] = true,
[0] = false,
}
local bool_modifier2 = {
[true] = 1,
[false] = 0,
}
local bool_data_type = {
__T = (nil :: any) :: boolean,
--[[
1 = true
0 = false
Write and read based off a uint8
]]
read = @native function(b: buffer, cursor: numb... | 172 |
ffrostfall/ByteNet | ffrostfall-ByteNet-fbdb156/src/data_types/buff.luau | luau | .luau | local types = require("../types")
local buff = {
read = @native function(b: buffer, cursor: number)
local length = buffer.readu16(b, cursor)
local freshBuffer = buffer.create(length)
-- copy the data from the main buffer to the new buffer with an offset of 2 because of length
buffer.copy(freshBuffer, 0, b, c... | 167 |
ffrostfall/ByteNet | ffrostfall-ByteNet-fbdb156/src/data_types/cframe.luau | luau | .luau | local types = require("../types")
local cframe: types.DataType<CFrame> = {
__T = ... :: CFrame,
read = @native function(b: buffer, cursor: number)
local x = buffer.readf32(b, cursor)
local y = buffer.readf32(b, cursor + 4)
local z = buffer.readf32(b, cursor + 8)
local rx = buffer.readf32(b, cursor + 12)
l... | 282 |
ffrostfall/ByteNet | ffrostfall-ByteNet-fbdb156/src/data_types/color3.luau | luau | .luau | local types = require("../types")
local color3 = {
__T = ... :: Color3,
write = @native function(input: Color3)
alloc(3)
uint8NoAlloc(input.R * 255)
uint8NoAlloc(input.G * 255)
uint8NoAlloc(input.B * 255)
end,
read = @native function(b: buffer, cursor: number)
return Color3.fromRGB(
buffer.readu8(b,... | 156 |
ffrostfall/ByteNet | ffrostfall-ByteNet-fbdb156/src/data_types/float32.luau | luau | .luau | local types = require("../types")
local float32: types.DataType<number> = {
__T = ... :: number,
write = f32,
read = @native function(b: buffer, cursor: number)
return buffer.readf32(b, cursor), 4
end,
}
return @native function(): types.DataType<number>
return float32
end
| 74 |
ffrostfall/ByteNet | ffrostfall-ByteNet-fbdb156/src/data_types/float64.luau | luau | .luau | local types = require("../types")
local float64: types.DataType<number> = {
__T = ... :: number,
write = writef64,
read = @native function(b: buffer, cursor: number)
return buffer.readf64(b, cursor), 8
end,
}
return @native function(): types.DataType<number>
return float64
end
| 75 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.