I can haz Lua?

This commit is contained in:
2026-02-12 14:34:21 +01:00
parent dcb205394d
commit 4a56e7d1dd
7 changed files with 288 additions and 13 deletions

43
scripts/main.luau Normal file
View File

@@ -0,0 +1,43 @@
name = "DVD"
authors = {"AviiNL"}
description = "Bouncing 'dvd' Logo"
local width = g13.display_width
local height = g13.display_height
local x = 22.0
local y = 6.0
local x_direction = 1
local y_direction = 1
local speed = 20
local size = 3
function update(delta: number)
x = x + speed * delta * x_direction
y = y + speed * delta * y_direction
if x <= size or x >= width - size then
x_direction = -x_direction
end
if y <= size or y >= height - size then
y_direction = -y_direction
end
color_x = (x / width) * 255
color_y = (y / height) * 255
color_z = 255 - (color_x + color_y) / 2
g13.set_color(color_x/2, color_y/2, color_z/2)
g13.clear()
for sy = -size,size do
for sx = -size,size do
g13.set_pixel(x + sx, y + sy, true)
end
end
end