Skip to content

Instantly share code, notes, and snippets.

--[[
This mesher only handles 16x16x16 chunks!
Uses a more optimal approach towards creating
chunks. Checks plane intersections of the chunk
for greedy meshing.
This type of plane-intersection greedy meshing is
useful for fixing certain problems w/ voxel based
greedy meshing, where transparent objects may be
see through.
@ALLAH-2
ALLAH-2 / pool.lua
Last active May 20, 2023 20:00
codget lua pool
local RunService = game:GetService("RunService");
local Effects = Instance.new("Folder");
Effects.Name = "Effects";
Effects.Parent = workspace;
--[[
this is ap ool
assumes that everything inserted
has the same lifetime
if not then ur gonna make ap riority queue LOL[tweaker shit cuh]!
@MaximumADHD
MaximumADHD / Animate.lua
Last active August 7, 2024 14:21
Rewrite of Roblox's Animate script to be more flexible/robust and easier to read.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Animate
-- maximum_adhd
-- September 21st, 2022
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
--!strict
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
@zeux
zeux / gctracker.lua
Last active September 5, 2024 20:24
GC tracker for Luau that provides more predicatable (compared to `__gc`...) destructor invocation for dead objects. Supports ~constant time update cost by limiting the iteration count such that update can be called every frame with a small n for negligible performance cost.
--!strict
--[[
BSD Zero Clause License
Copyright (c) 2022 Arseny Kapoulkine
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
@evaera
evaera / throttle.lua
Last active November 15, 2023 16:28
Roblox Lua throttle
function throttle(func, seconds)
local lastCalled = 0
local callNumber = 0
return function(...)
callNumber = callNumber + 1
local currentCallNumber = callNumber
if tick() - lastCalled < seconds then
wait(seconds - (tick() - lastCalled))
-- black frames not included
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local Camera = Workspace.CurrentCamera
local Module = {}
Module.Position = UDim2.new(0, 0, 0, 0)
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active November 19, 2024 19:30
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@Fraktality
Fraktality / LerpCIELUV.lua
Last active February 14, 2024 02:09
Perceptually uniform color interpolation
local LerpCIELUV do
-- Combines two colors in CIELUV space.
-- function<function<Color3 result>(float t)>(Color3 fromColor, Color3 toColor)
-- https://www.w3.org/Graphics/Color/srgb
local clamp = math.clamp
local C3 = Color3.new
local black = C3(0, 0, 0)