repo
stringclasses
302 values
file_path
stringlengths
18
241
language
stringclasses
2 values
file_type
stringclasses
4 values
code
stringlengths
76
697k
tokens
int64
10
271k
matter-ecs/matter
matter-ecs-matter-f31981b/lib/debugger/widgets/tooltip.luau
luau
.luau
local CollectionService = game:GetService("CollectionService") type Options = { tag: string, backgroundTransparency: number?, } return function(plasma) local create = plasma.create return plasma.widget(function(text, options: Options) local refs = plasma.useInstance(function(ref) local style = plasma.useSty...
337
matter-ecs/matter
matter-ecs-matter-f31981b/lib/debugger/widgets/valueInspect.luau
luau
.luau
local formatTableModule = require(script.Parent.Parent.formatTable) local formatTable = formatTableModule.formatTable return function(plasma) return plasma.widget(function(objectStack, custom) local closed = plasma .window({ title = "Inspect", closable = true, }, function() plasma.row({ padding = ...
432
matter-ecs/matter
matter-ecs-matter-f31981b/lib/debugger/widgets/worldInspect.luau
luau
.luau
local formatTableModule = require(script.Parent.Parent.formatTable) local getAllComponentData = require(script.Parent.Parent.getAllComponentData) local formatTable = formatTableModule.formatTable local BY_COMPONENT_NAME = "ComponentName" local BY_ENTITY_COUNT = "EntityCount" return function(plasma) return plasma.wid...
1,325
matter-ecs/matter
matter-ecs-matter-f31981b/lib/hooks/log.luau
luau
.luau
local topoRuntime = require(script.Parent.Parent.topoRuntime) local format = require(script.Parent.Parent.debugger.formatTable) --[=[ @within Matter :::info Topologically-aware function This function is only usable if called within the context of [`Loop:begin`](/api/Loop#begin). ::: @param ... any Logs some t...
212
matter-ecs/matter
matter-ecs-matter-f31981b/lib/hooks/useDeltaTime.luau
luau
.luau
local topoRuntime = require(script.Parent.Parent.topoRuntime) --[=[ @within Matter :::info Topologically-aware function This function is only usable if called within the context of [`Loop:begin`](/api/Loop#begin). ::: Returns the `os.clock()` time delta between the start of this and last frame. ]=] local functi...
99
matter-ecs/matter
matter-ecs-matter-f31981b/lib/hooks/useEvent.luau
luau
.luau
local topoRuntime = require(script.Parent.Parent.topoRuntime) local Queue = require(script.Parent.Parent.Queue) local EVENT_CONNECT_METHODS = { "Connect", "on", "connect" } local CONNECTION_DISCONNECT_METHODS = { "Disconnect", "Destroy", "disconnect", "destroy" } local function connect(object, callback, event) local...
1,389
matter-ecs/matter
matter-ecs-matter-f31981b/lib/hooks/useThrottle.luau
luau
.luau
local topoRuntime = require(script.Parent.Parent.topoRuntime) local function cleanup(storage) return os.clock() < storage.expiry end --[=[ @within Matter :::info Topologically-aware function This function is only usable if called within the context of [`Loop:begin`](/api/Loop#begin). ::: Utility for easy time...
374
matter-ecs/matter
matter-ecs-matter-f31981b/lib/init.luau
luau
.luau
--[=[ @class Matter Matter. It's what everything is made out of. ]=] --[=[ @within Matter @prop World World ]=] --[=[ @within Matter @prop Loop Loop ]=] --[=[ @within Matter @prop Debugger Debugger ]=] --[=[ @within Matter @prop None None A value should be interpreted as nil when merging dictionaries. ...
467
matter-ecs/matter
matter-ecs-matter-f31981b/lib/rollingAverage.luau
luau
.luau
local MAX_SAMPLES = 60 local function addSample(samples, value) samples[samples.index or 1] = value samples.index = if samples.index then (samples.index % MAX_SAMPLES) + 1 else 1 end local function getAverage(samples) local sum = 0 for i = 1, #samples do sum += samples[i] end return sum / #samples end retu...
104
matter-ecs/matter
matter-ecs-matter-f31981b/lib/topoRuntime.luau
luau
.luau
local stack = {} local function newStackFrame(node) return { node = node, accessedKeys = {}, } end local function cleanup() local currentFrame = stack[#stack] for baseKey, state in pairs(currentFrame.node.system) do for key, value in pairs(state.storage) do if not currentFrame.accessedKeys[baseKey] or n...
1,192
matter-ecs/matter
matter-ecs-matter-f31981b/tests.server.luau
luau
.luau
local ReplicatedStorage = game:GetService("ReplicatedStorage") require(ReplicatedStorage.TestEZ).TestBootstrap:run({ ReplicatedStorage.Matter, nil, { noXpcallByDefault = true, }, })
50
matter-ecs/matter
matter-ecs-matter-f31981b/tests/stressTest.client.luau
luau
.luau
local RunService = game:GetService("RunService") local ReplicatedStorage = game:GetService("ReplicatedStorage") local Matter = require(ReplicatedStorage.Matter) local immutable = require(ReplicatedStorage.Matter.immutable) -- 500 entities -- 2-30 components on each entity -- 300 unique components -- 200 systems -- 1-1...
761
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/CustomEngine.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
807
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/MiscWeld.luau
luau
.luau
--[[ ___ _____ / _ |/ ___/ Avxnturador | Novena midmm5 | / __ / /__ LuaInt | Novena /_/ |_\___/ Detomiks | Base Chassis Version 1.7 *Credit ...
676
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Aerodynamics.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
1,848
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Controls.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
2,109
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/GForces.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
1,093
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Gauges.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
5,432
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Ignition.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
423
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/MSteer Camera.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
643
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Sounds/README.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
371
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Sounds/Server.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
2,901
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Sounds/Sounds.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
3,486
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Tires/Simulated.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
5,786
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Plugins/Tires/Tune.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
1,138
lisphm/A-Chassis
lisphm-A-Chassis-61cbcfd/Scripts/Units.luau
luau
.luau
--[[ _____ _ _ /\ / ____| | (_) / \ ______| | | |__ __ _ ___ ___ _ ___ / /\ \______| | | '_ \ / _` / __/ __| / __| / ____ \ | |____| | | | (_| \__ \__ \ \__ \ /_/ \_\ \_____|_| |_|\__,_|___/___/_|___/ Version 1...
511
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/MainModule.luau
luau
.luau
--Wraps the Nexus VR Character Model main module for loading. --When required with an id, the main module's source isn't --included, which makes the client see an empty script. --!strict local REQUIRED_LIBRARIES = { Enigma = "enigma", NexusAppendage = "nexus-appendage", NexusBufferedReplication = "nexus-bu...
344
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Api.luau
luau
.luau
--Main module for creating the usable API. --!strict local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") return function() local NexusVRCharacterModel = script.Parent local TypedEvent = require(NexusVRCharacterModel:WaitForChild("Packages"):WaitForCh...
1,489
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Appendage.luau
luau
.luau
--Stores information about an appendage, such as an arm or a leg. --!strict local NexusAppendage = require(script.Parent.Parent:WaitForChild("Packages"):WaitForChild("NexusAppendage")) local Limb = NexusAppendage.Limb local Appendage = {} Appendage.__index = Appendage setmetatable(Appendage, Limb) export type Appe...
1,746
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Camera/CommonCamera.luau
luau
.luau
--Common camera functionality. --!strict local Workspace = game:GetService("Workspace") local VRService = game:GetService("VRService") local NexusVRCharacterModel = script.Parent.Parent.Parent local Settings = require(NexusVRCharacterModel:WaitForChild("State"):WaitForChild("Settings")).GetInstance() local CommonCam...
415
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Camera/DefaultCamera.luau
luau
.luau
--Default camera that follows the character. --!strict local BUMP_DEFAULT_TRANSPARENCY_WORKAROUND = true local HIDDEN_ACCESSORIES = { [Enum.AccessoryType.Hat] = true; [Enum.AccessoryType.Hair] = true; [Enum.AccessoryType.Face] = true; [Enum.AccessoryType.Eyebrow] = true; [Enum.AccessoryType.Eyelash...
1,172
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Camera/ThirdPersonTrackCamera.luau
luau
.luau
--Third person camera that moves with the player. --!strict local THIRD_PERSON_ZOOM = 10 local Players = game:GetService("Players") local NexusVRCharacterModel = script.Parent.Parent.Parent local CommonCamera = require(NexusVRCharacterModel:WaitForChild("Character"):WaitForChild("Camera"):WaitForChild("CommonCamera"...
606
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Controller/BaseController.luau
luau
.luau
--Base class for controlling the local character. --!strict local THUMBSTICK_INPUT_START_RADIUS = 0.6 local THUMBSTICK_INPUT_RELEASE_RADIUS = 0.4 local THUMBSTICK_SNAP_ROTATION_ANGLE = math.rad(30) --Roblox's snap rotation is 30 degrees. local THUMBSTICK_SMOOTH_LOCOMOTION_DEADZONE = 0.2 local THUMBSTICK_MANUAL_SMOOTH...
3,889
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Controller/SmoothLocomotionController.luau
luau
.luau
--Local character controller using teleporting. --!strict local BaseController = require(script.Parent:WaitForChild("BaseController")) local SmoothLocomotionController = {} SmoothLocomotionController.__index = SmoothLocomotionController setmetatable(SmoothLocomotionController, BaseController) export type SmoothLocom...
349
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Controller/TeleportController.luau
luau
.luau
--Local character controller using teleporting. --!strict local Workspace = game:GetService("Workspace") local NexusVRCharacterModel = script.Parent.Parent.Parent local NexusVRCharacterModelApi = require(NexusVRCharacterModel).Api local BaseController = require(script.Parent:WaitForChild("BaseController")) local Arc...
1,484
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Controller/Visual/Arc.luau
luau
.luau
--Visual indicator aiming with an arc. --!strict local MAX_SEGMENTS = 100 local SEGMENT_SEPARATION = 2 local BASE_POINTER_ANGLE = math.rad(60) local POINTER_PARABOLA_HEIGHT_MULTIPLIER = -0.2 local Workspace = game:GetService("Workspace") local Players = game:GetService("Players") local NexusVRCharacterModel = script...
1,492
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Controller/Visual/ArcWithBeacon.luau
luau
.luau
--Extension of the arc to add a beacon. --!strict local Arc = require(script.Parent:WaitForChild("Arc")) local Beacon = require(script.Parent:WaitForChild("Beacon")) local ArcWithBeacon = {} ArcWithBeacon.__index = ArcWithBeacon setmetatable(ArcWithBeacon, Arc) export type ArcWithBeacon = { Beacon: Beacon.Beacon...
409
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Controller/Visual/Beacon.luau
luau
.luau
--Visual indicator for the end of aiming. --!strict local BEACON_SPEED_MULTIPLIER = 2 local Workspace = game:GetService("Workspace") local Beacon = {} Beacon.__index = Beacon export type Beacon = { Sphere: Part, ConstantRing: ImageHandleAdornment, MovingRing: ImageHandleAdornment, } & typeof(setmetatabl...
874
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/FootPlanter.luau
luau
.luau
--[[ Attempts to solve footplanting. This code is heavily "zombified" off of a project by Stravant, and is taken from Nexus VR Character Model V1 with minimal changes. It really needs to be replaced by someone who better unstands foot placement. No automated tests are done on this code. --]] local FootPlanter = {} l...
5,274
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Head.luau
luau
.luau
--Stores information about the head of a character. --!strict local NexusVRCharacterModel = script.Parent.Parent local NexusAppendage = require(script.Parent.Parent:WaitForChild("Packages"):WaitForChild("NexusAppendage")) local Settings = require(NexusVRCharacterModel:WaitForChild("State"):WaitForChild("Settings")).Ge...
1,191
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/Torso.luau
luau
.luau
--Stores information about the torso of a character. --!strict local NexusVRCharacterModel = script.Parent.Parent local NexusAppendage = require(script.Parent.Parent:WaitForChild("Packages"):WaitForChild("NexusAppendage")) local Settings = require(NexusVRCharacterModel:WaitForChild("State"):WaitForChild("Settings"))....
677
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Character/init.luau
luau
.luau
--Manipulates a character model. --!strict local SMOOTHING_DURATION_SECONDS = 1 / 30 local Players = game:GetService("Players") local TweenService = game:GetService("TweenService") local VRService = game:GetService("VRService") local NexusVRCharacterModel = script.Parent local Head = require(NexusVRCharacterModel:Wa...
8,287
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/State/CameraService.luau
luau
.luau
--Manages the local camera. --!strict local NexusVRCharacterModel = script.Parent.Parent local CommonCamera = require(NexusVRCharacterModel:WaitForChild("Character"):WaitForChild("Camera"):WaitForChild("CommonCamera")) local DefaultCamera = require(NexusVRCharacterModel:WaitForChild("Character"):WaitForChild("Camera")...
618
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/State/CharacterService.luau
luau
.luau
--Manages VR characters. --!strict local Players = game:GetService("Players") local NexusVRCharacterModel = script.Parent.Parent local Character = require(NexusVRCharacterModel:WaitForChild("Character")) local CharacterService = {} CharacterService.__index = CharacterService local StaticInstance = nil export type C...
429
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/State/ControlService.luau
luau
.luau
--Manages controlling the local characters. --!strict local NexusVRCharacterModel = script.Parent.Parent local BaseController = require(NexusVRCharacterModel:WaitForChild("Character"):WaitForChild("Controller"):WaitForChild("BaseController")) local TeleportController = require(NexusVRCharacterModel:WaitForChild("Chara...
633
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/State/EnigmaService.luau
luau
.luau
--Manages reeading UserCframes from Enigma. --!strict local THUMBSTICK_DEADZONE = 0.2 local Workspace = game:GetService("Workspace") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local VRService = game:GetServic...
1,812
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/State/Settings.luau
luau
.luau
--Stores settings. --!strict local NexusVRCharacterModel = script.Parent.Parent local NexusInstance = require(NexusVRCharacterModel:WaitForChild("Packages"):WaitForChild("NexusInstance")) local TypedEvent = NexusInstance.TypedEvent local Settings ={} Settings.__index = Settings local StaticInstance = nil export typ...
879
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/State/VRInputService.luau
luau
.luau
--Manages VR inputs. This normalizes the inputs from --the headsets as the Y position of the inputs is arbitrary, --meaning it can be the floor, eye level, or random. --!strict local NexusVRCharacterModel = script.Parent.Parent local NexusInstance = require(NexusVRCharacterModel:WaitForChild("Packages"):WaitForChild("...
1,314
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/UI/MainMenu.luau
luau
.luau
--Main menu for Nexus VR Character Model. --!strict local MENU_OPEN_TIME_REQUIREMENT = 1 local MENU_OPEN_TIME = 0.25 local Workspace = game:GetService("Workspace") local Players = game:GetService("Players") local GuiService = game:GetService("GuiService") local RunService = game:GetService("RunService") local Tween...
5,889
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/UI/R6Message.luau
luau
.luau
--Displays a message if R6 is used. --!strict local MESSAGE_OPEN_TIME = 0.25 local Players = game:GetService("Players") local RunService = game:GetService("RunService") local NexusVRCharacterModel = script.Parent.Parent local NexusButton = require(NexusVRCharacterModel:WaitForChild("Packages"):WaitForChild("NexusBut...
1,196
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/UI/View/ApiBaseView.luau
luau
.luau
--Base view for the menu intended to be used with the API. --!strict local GuiService = game:GetService("GuiService") local NexusVRCharacterModel = script.Parent.Parent.Parent local NexusInstance = require(NexusVRCharacterModel:WaitForChild("Packages"):WaitForChild("NexusInstance")) local ApiBaseView = {} ApiBaseVie...
565
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/UI/View/EnigmaView.luau
luau
.luau
--View for the Enigma library. --!strict local SUPPORTED_PROTOCOL_VERSIONS = { ["1"] = true, ["2"] = true, } local Workspace = game:GetService("Workspace") local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") l...
3,183
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/UI/View/SettingsView.luau
luau
.luau
--View for the user settings. --!strict local UserInputService = game:GetService("UserInputService") local VRService = game:GetService("VRService") local NexusVRCharacterModel = script.Parent.Parent.Parent local NexusButton = require(NexusVRCharacterModel:WaitForChild("Packages"):WaitForChild("NexusButton")) local Ca...
2,646
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Util/BufferProtocol.luau
luau
.luau
--Serializes and deserializes buffers for Nexus Buffered Replication. --!strict local BUFFER_PROTOCOL_FIELDS = { --Normal. { Name = "UpdateTime", Type = "number", }, { Name = "CurrentWalkspeed", Type = "number", }, { Name = "HeadCFrame", Type = "C...
1,142
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Util/FindCollidablePartOnRay.luau
luau
.luau
--Helper function that ray casts to find a collidable part. --!strict local Workspace = game:GetService("Workspace") return function(StartPosition: Vector3, Direction: Vector3, IgnoreList: Instance | {Instance}?, CollisionGroup: string?): (BasePart?, Vector3) --Convert the collision group. if typeof(Collision...
347
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/Util/Warnings.luau
luau
.luau
--Displays warnings when loading Nexus VR Character Model. --!strict local HttpService = game:GetService("HttpService") return function(): () --Load the configuration. local ConfigurationValue = script.Parent.Parent:WaitForChild("Configuration") local Configuration = HttpService:JSONDecode(Configuration...
414
TheNexusAvenger/Nexus-VR-Character-Model
TheNexusAvenger-Nexus-VR-Character-Model-c6e3ad0/src/init.luau
luau
.luau
--Loads Nexus VR Character Model. --!strict --Version information should be set right before distribution (not committed). local VERSION_TAG = "dev" local VERSION_COMMIT = "00000000" local ReplicatedStorage = game:GetService("ReplicatedStorage") local HttpService = game:GetService("HttpService") local NexusBufferedR...
1,106
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/.vscode/vectorTypes.d.luau
luau
.luau
export type vector = Vector3 declare vector: { create: (x: number, y: number, z: number) -> vector, magnitude: (vec: vector | Vector3) -> number, normalize: (vec: vector | Vector3) -> vector, cross: (vec1: vector | Vector3, vec2: vector | Vector3) -> vector, dot: (vec1: vector | Vector3, vec2: vector | Vector3) -...
245
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/external/data/styles.luau
luau
.luau
local colorful = require("@vendor/lunePackages/colorful") local style = colorful.combineStyles local colors = colorful.color local modifiers = colorful.modifier return { header = style({ colors.blue, modifiers.bold }), detail = style({ colors.white, modifiers.dim }), success = style({ colors.green, modifiers.bold...
87
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/external/installWallyDependencies.luau
luau
.luau
local async = require("@vendor/lunePackages/async") local process = require("@lune/process") local spawnProcess = require("@vendor/lunePackages/spawnProcess") local spawnSourcemap = require("@ext/spawnSourcemap") local styles = require("./data/styles") return function() print(styles.header("Installing Wally dependenc...
161
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/external/makeDirectories.luau
luau
.luau
local fs = require("@lune/fs") local function reconcileDirectory(path: string) if not fs.isDir(path) then fs.writeDir(path) end end return function() reconcileDirectory("build/") reconcileDirectory("build/package/") reconcileDirectory("build/tests/") end
64
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/external/spawnDarklua.luau
luau
.luau
local spawnProcess = require("@vendor/lunePackages/spawnProcess") return function() spawnProcess("darklua", { "process", "src/", "build/package/", "--watch", }) spawnProcess("darklua", { "process", "tests/roblox/", "build/tests/", "--watch", }) end
84
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/external/spawnSourcemap.luau
luau
.luau
local spawnProcess = require("@vendor/lunePackages/spawnProcess") return function(watch: boolean?): thread local parameters = { "sourcemap", "test-source.project.json", "--output", "sourcemap.json", } if watch then table.insert(parameters, "--watch") end return spawnProcess("rojo", parameters) end
80
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/lune/dev.luau
luau
.luau
local async = require("@vendor/lunePackages/async") local colorful = require("@vendor/lunePackages/colorful") local spawnDarklua = require("@ext/spawnDarklua") local spawnProcess = require("@vendor/lunePackages/spawnProcess") local spawnSourcemap = require("@ext/spawnSourcemap") local task = require("@lune/task") local...
280
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/lune/installDependencies.luau
luau
.luau
local installGitDependencies = require("@ext/installGitDependencies") local installWallyDependencies = require("@ext/installWallyDependencies") local process = require("@lune/process") if #process.args == 0 then installGitDependencies() installWallyDependencies() elseif process.args[1] == "git" then installGitDepen...
93
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/lune/tests.luau
luau
.luau
local colorful = require("@vendor/lunePackages/colorful") local fs = require("@lune/fs") local luau = require("@lune/luau") local process = require("@lune/process") local roblox = require("@lune/roblox") local serde = require("@lune/serde") local task = require("@lune/task") local tests = fs.readDir("tests/lune/") loc...
592
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/client/bridge.luau
luau
.luau
local ClientBridge = {} local metatable = { __index = ClientBridge } export type Identity = typeof(setmetatable({} :: {}, metatable)) local function constructor(name: string): Identity local self = setmetatable({}, metatable) return self end function ClientBridge.Fire() end function ClientBridge.Connect() end fu...
114
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/client/identifiers.luau
luau
.luau
local dataModelTree = require("@src/dataModelTree") local logStrings = require("@src/logStrings") local logger = require("@src/logger").new() local identifierMap = require("@src/identifierMap") local client = {} function client.init(tree: dataModelTree.Identity) for name, id in tree.identifiers:GetAttributes() do ...
196
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/client/parallelBridge.luau
luau
.luau
local logger = require("@src/logger").new("client (parallel)") local logStrings = require("@src/logStrings") local identifierMap = require("@src/identifierMap") local dataModelTree = require("@src/dataModelTree") local tree: dataModelTree.Identity local function disallowed(name: string): never return logger:fatal(st...
397
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/client/process.luau
luau
.luau
local RunService = game:GetService("RunService") local serializer = require("@src/core/serializer") local deserializer = require("@src/core/deserializer") local types = require("@src/types") local dataModelTree = require("@src/dataModelTree") local logger = require("@src/logger").new("main client process") local logSt...
390
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/core/deserializer.luau
luau
.luau
--!native local signal = require("@pkg/signal") local idToSignal: { [number]: signal.Identity<...any> } = {} local deserializer = {} function deserializer.exists(id: number) return idToSignal[id] ~= nil end function deserializer.registerId(id: number): signal.Identity<...any> idToSignal[id] = signal() return idT...
408
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/core/serializer.luau
luau
.luau
--!native local types = require("@src/types") local function serializer(queue: types.Queue): types.SerializedPacket local outgoingEvents: types.SerializedPacket = { events = {}, buff = buffer.create(0), } local idToIndex: { number } = {} local indexToId: { number } = {} for i = 1, #queue, 2 do local id = ...
230
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/dataModelTree.luau
luau
.luau
local WFC_TIMEOUT = 3 local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local result = require("@src/util/result") local logStrings = require("@src/logStrings") local cached: Identity? = nil export type Identity = { container: Folder, remote: RemoteEve...
707
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/identifierMap.luau
luau
.luau
local idToName: { [number]: string } = {} local nameToId: { [string]: number } = {} export type Identifier = number local identifierMap = {} function identifierMap.addIdentifier(name: string, id: Identifier) idToName[id] = name nameToId[name] = id end function identifierMap.removeIdentifier(name: string) local i...
145
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/init.luau
luau
.luau
local RunService = game:GetService("RunService") local clientActor = require("@src/initialization/clientActor") local serverActor = require("@src/initialization/serverActor") local clientSerial = require("@src/initialization/clientSerial") local serverSerial = require("@src/initialization/serverSerial") local threadC...
196
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/initialization/clientSerial.luau
luau
.luau
local process = require("@src/client/process") local identifiers = require("@src/server/identifiers") local dataModelTree = require("@src/dataModelTree") local logger = require("@src/logger").new("client") local logStrings = require("@src/logStrings") return function() local treeRes = dataModelTree() if not treeRes....
137
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/initialization/serverSerial.luau
luau
.luau
local process = require("@src/server/process") local identifiers = require("@src/server/identifiers") local dataModelTree = require("@src/dataModelTree") local logger = require("@src/logger").new("server") local logStrings = require("@src/logStrings") return function(): () local treeRes = dataModelTree(true) if not ...
139
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/logStrings.luau
luau
.luau
local errorStrings = { INSTANCE_NOT_FOUND = "couldn't find instances under replicatedstorage, waitforchild timeout hit", INSTANCE_NOT_VALID = "bridgenet2's internal instance tree wasnt valid, was it modified?", ID_PROPERTY_INCORRECT_TYPE = "identifier [%*] has an invalid attribute type, was it modified?", ACCESS_...
259
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/logger.luau
luau
.luau
--!optimize 1 export type LogLevel = "trace" | "log" | "warn" | "fatal" | "halt" local function getNameFromStack() local name = debug.info(3, "s") local split = string.split(name, ".") return `{split[#split - 1]}/{split[#split]}` end local logger = {} local metatable = { __index = logger } export type Identity = ...
237
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/server/bridge.luau
luau
.luau
local signal = require("@pkg/signal") local process = require("@src/server/process") local identifiers = require("@src/server/identifiers") local identifierMap = require("@src/identifierMap") local deserializer = require("@src/core/deserializer") local ServerBridge = {} local metatable = { __index = ServerBridge } exp...
406
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/server/identifiers.luau
luau
.luau
local dataModelTree = require("@src/dataModelTree") local logger = require("@src/logger").new("server identifiers") local logStrings = require("@src/logStrings") local identifierMap = require("@src/identifierMap") local counter: Identifier = 1 local container: Folder export type Identifier = number local function as...
172
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/server/process.luau
luau
.luau
--!native local Players = game:GetService("Players") local RunService = game:GetService("RunService") local dataModelTree = require("@src/dataModelTree") local types = require("@src/types") local serializer = require("@src/core/serializer") local deserializer = require("@src/core/deserializer") local remote: RemoteEv...
539
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/types.luau
luau
.luau
--[[ Private ]] export type Content = unknown export type SerializedPacket = { events: { -- The numbers here don't cost anything, because it's an array. [number]: { -- Each value here is an individual call to an event. [number]: Content, }, }, -- The IDs are packed into this buffer buff: buffer, } --...
109
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/src/util/result.luau
luau
.luau
export type Identity<T> = { success: true, value: T, } | { success: false, err: string, trace: string, } return ( ( function<T>(success: boolean, resultOrError: T & string): Identity<T> if success then return { success = true, value = resultOrError, } else return { success = fa...
149
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/tests/roblox/clientRunner.client.luau
luau
.luau
if _G.__testmode__ == "benchmark" then return end local ReplicatedStorage = game:GetService("ReplicatedStorage") local _BridgeNet2 = require(ReplicatedStorage.Packages.BridgeNet2) local clientProcess = require("@src/client/process") clientProcess.registerEvent(1) clientProcess.connect(1, print)
73
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/tests/roblox/clientStress.client.luau
luau
.luau
if _G.__testmode__ ~= "benchmark" then return end local ReplicatedStorage = game:GetService("ReplicatedStorage") local _BridgeNet2 = require(ReplicatedStorage.Packages.BridgeNet2) local clientProcess = require("@src/client/process") clientProcess.registerEvent(1) clientProcess.connect(1, function(data) end)
76
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/tests/roblox/serverRunner.server.luau
luau
.luau
if _G.__testmode__ == "benchmark" then return end local ReplicatedStorage = game:GetService("ReplicatedStorage") local _BridgeNet2 = require(ReplicatedStorage.Packages.BridgeNet2) local serverProcess = require("@src/server/process") serverProcess.addEvent(1) serverProcess.connect(1, print) while true do serverPro...
94
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/tests/roblox/serverStress.server.luau
luau
.luau
if _G.__testmode__ ~= "benchmark" then return end print("running stress test") local ReplicatedStorage = game:GetService("ReplicatedStorage") local RunService = game:GetService("RunService") local _BridgeNet2 = require(ReplicatedStorage.Packages.BridgeNet2) local serverProcess = require("@src/server/process") serv...
132
ffrostfall/BridgeNet2
ffrostfall-BridgeNet2-d7fd18a/tests/utils.luau
luau
.luau
local function bufferToDecimal(buff: buffer): string return string.gsub(buffer.tostring(buff), ".", function(c) return string.format("%03i ", string.byte(c :: any)) end) end local isPrimitiveType = { string = true, number = true, boolean = true, buffer = true } local function isPrimitiveArray(array) local max, n...
1,107
real2nix/mineblox
real2nix-mineblox-ec774db/src/ReplicatedStorage/Shared/ChunkSettings.luau
luau
.luau
return { CHUNK_SIZE = 8, CHUNK_DISTANCE = 10, MAX_CHUNK_DISTANCE = 1000, MAX_CHUNK_LOADING_ACTORS = 24, BLOCK_SIZE = 3, }
46
real2nix/mineblox
real2nix-mineblox-ec774db/src/ReplicatedStorage/Shared/ChunksUtil.luau
luau
.luau
local ChunksUtil = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local CHUNK_SIZE: number = ChunkSettings['CHUNK_SIZE'] local BLOCK_SIZE: number = ChunkSettings['BLOCK_SIZE'] -- PUBLIC -- Converts [chunk_x][chunk_z][x][z][y] ...
983
real2nix/mineblox
real2nix-mineblox-ec774db/src/ReplicatedStorage/Shared/ItemsData.luau
luau
.luau
local itemsData = { Air = { isTransparent = true, }, Water = { isTransparent = true, }, Stone = { Hardness = 20, PreferredTool = 'Pickaxe', DropItem = 'Cobblestone', Type = 'Block', }, Cobblestone = { Hardness = 20, PreferredTool = 'Pickaxe', Type = 'Block', }, ['Grass Block'] = { Hardn...
1,058
real2nix/mineblox
real2nix-mineblox-ec774db/src/ReplicatedStorage/Shared/ItemsIDs.luau
luau
.luau
return { 'Air', 'Water', -- Everyday blocks 'Dirt', 'Grass Block', 'Stone', 'Cobblestone', 'Oak Wood Planks', 'Oak Leaves', 'Oak Log', 'Bedrock', 'Sand', 'Glass', -- Ore blocks 'Coal Ore', 'Gold Ore', 'Iron Ore', 'Diamond Ore', -- Tools 'Wooden Pickaxe', 'Wooden Axe', 'Wooden Shovel', 'W...
262
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/ParallelScripts/BiomeLoaderParallel.client.luau
luau
.luau
--!native local actor: Actor = script:GetActor() local ReplicatedStorage = game:GetService('ReplicatedStorage') local StarterPlayer = game:GetService('StarterPlayer') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local BiomeSelector = require(StarterPlayer.StarterPlayerScripts.Modules.Chunks.L...
259
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/ParallelScripts/TerrainLoaderParallel.client.luau
luau
.luau
--!native local actor: Actor = script:GetActor() local ReplicatedStorage = game:GetService('ReplicatedStorage') local StarterPlayer = game:GetService('StarterPlayer') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local ItemsData = require(ReplicatedStorage.Shared.ItemsData) local TerrainShapeG...
320
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Main.client.luau
luau
.luau
local Players = game:GetService('Players') local Modules = Players.LocalPlayer.PlayerScripts:WaitForChild('Modules') require(Modules.Chunks.ChunksManager) --require(Modules.Lighting) task.delay(.1, function() require(Modules.Break) require(Modules.CollisionsManager) end)
63
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Break.luau
luau
.luau
local Break = {} local Players = game:GetService('Players') local ReplicatedStorage = game:GetService('ReplicatedStorage') local UserInputService = game:GetService('UserInputService') local Player: Player = Players.LocalPlayer local PlayerScripts = Player.PlayerScripts local Modules = PlayerScripts:WaitForChild('Mod...
853
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/ChunksManager.luau
luau
.luau
--!native local ChunkLoading = {} local Players = game:GetService('Players') local ReplicatedStorage = game:GetService('ReplicatedStorage') local RunService = game:GetService('RunService') local Player: Player = Players.LocalPlayer local Character: Model = Player.Character or Player.CharacterAdded:Wait() local Humano...
4,901
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Data/ChunkGenerationStages.luau
luau
.luau
-- Represents what stage has been completed by a chunk return { ['none'] = 0, ['terrain'] = 1, ['biome'] = 2, ['done'] = 3 }
47
real2nix/mineblox
real2nix-mineblox-ec774db/src/StarterPlayer/StarterPlayerScripts/Modules/Chunks/Loading/Terrain/BedrockGenerator.luau
luau
.luau
--!native local BedrockGeneration = {} local ReplicatedStorage = game:GetService('ReplicatedStorage') local ChunkSettings = require(ReplicatedStorage.Shared.ChunkSettings) local ItemsData = require(ReplicatedStorage.Shared.ItemsData) local CHUNK_SIZE: number = ChunkSettings['CHUNK_SIZE'] local MAX_CHUNK_DISTANCE: nu...
233