uhm how can i get obj properties ?
What do you mean by obj?
Object, like a BasePart or a wedge, or your own custom object?
Here is a general tutorial on object-oriented programming.
https://www.lua.org/pil/2.5.html
you can use a period which means like so from the lua website:
When we write
io.read
, we mean “theread
entry from theio
package”. For Lua, that means “index the tableio
using the string"read"
as the key”.
pretty interesting I never really understood what the period meant until now
and in a roblox example it would be to access a basepart position property.
local part = workspace.Part
--prints the position of part in the workspace in the output console
print(part.Position)
Wavefront .obj file for creating 3d meshes?
Thank you for responding
i found how can i get obj properties way
local ClassProperties do
-- ClassProperties["Part"] example
-- returns table and enable http thing
ClassProperties = {}
local HttpService = game:GetService("HttpService")
local Data = HttpService:JSONDecode(HttpService:GetAsync("https://anaminus.github.io/rbx/json/api/latest.json"))
for i = 1, #Data do
local Table = Data[i]
local Type = Table.type
if Type == "Class" then
local ClassData = {}
local Superclass = ClassProperties[Table.Superclass]
if Superclass then
for j = 1, #Superclass do
ClassData[j] = Superclass[j]
end
end
ClassProperties[Table.Name] = ClassData
elseif Type == "Property" then
if not next(Table.tags) then
local Class = ClassProperties[Table.Class]
local Property = Table.Name
local Inserted
for j = 1, #Class do
if Property < Class[j] then -- Determine whether `Property` precedes `Class[j]` alphabetically
Inserted = true
table.insert(Class, j, Property)
break
end
end
if not Inserted then
table.insert(Class, Property)
end
end
elseif Type == "Function" then
elseif Type == "YieldFunction" then
elseif Type == "Event" then
elseif Type == "Callback" then
elseif Type == "Enum" then
elseif Type == "EnumItem" then
end
end
end
for _,v in pairs(ClassProperties["Part"]) do
print(tostring(v))
end