Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Hand positions in a circle
--lua 5.3 local colors = {} colors[1] = "White" colors[2] = "Blue" colors[3] = "Brown" colors[4] = "Green" colors[5] = "Orange" colors[6] = "Pink" colors[7] = "Purple" colors[8] = "Red" colors[9] = "Teal" colors[10] = "Yellow" local radius = 65 --distance for hand from center local heading = 180 --initial heading. We're going clockwise from the top-most point, so 90+(36/2) local sin, cos, rad = math.sin, math.cos, math.rad local positions = {} for k,v in ipairs(colors) do positions[k] = { x = sin(rad(heading))*radius, z = cos(rad(heading))*radius, h = heading, c = v, } heading = heading + (360/#colors) end for k,v in ipairs(positions) do local str = [[ { "Color": "]]..v.c..[[", "Transform": { "posX": ]]..v.x..[[, "posY": 5.0, "posZ": ]]..v.z..[[, "rotX": 0.0, "rotY": ]]..(v.h+180)..[[, "rotZ": 0.0, "scaleX": 20.0, "scaleY": 5.0, "scaleZ": 6.0 } },]] print(str) end
run
|
edit
|
history
|
help
0
Personal Use (Among Us)
missing element
Goalless DRAWS
Random numbers in Lua. Range: 1-49. Sets of numbers without duplicates
PAID HACK PuBG
quick sort
MXR
VERSION
hij
ok