Files
imgui-luau/backends/roblox/worker.luau
T
4DBug 386b0c475e
Build & Release / build (push) Canceled after 0s
0.4.0
2026-10-16 22:53:18 -05:00

21 lines
651 B
Luau

-- Parallel raster worker (Actor LocalScript). The build inlines raster.lua for the Raster line.
local Actor = script:GetActor()
if not Actor then
return
end
local Raster = require(script.Parent:WaitForChild("Raster"))
local Done = Actor:WaitForChild("Done")
local Textures = {}
Actor:BindToMessageParallel("job", function(Id, Prims, Tiles, TexUpdates, TileLength)
for _, Texture in TexUpdates do
Textures[Texture[1]] = { Buffer = Texture[2], Width = Texture[3], Height = Texture[4] }
end
local Results = Raster.RasterJobs(Prims, Tiles, TileLength, Textures)
task.synchronize()
Done:Fire(Id, Results)
end)
Actor:SetAttribute("Ready", true)