ws-3d: model/vox (MagicaVoxel read/write: every chunk, scene graph, materials, layers, render objects, cameras, notes, IMAP, META, unknown chunks kept), ops/MeshOps (triangulate, transform, normals, tangents, weld/unweld, bounds, merge, scale/setUnit/setUp, greedy voxel meshing); Types: Scene.reader/mul/nodeMatrix/flatten helpers; compat: __iter visits t[0] on LuaJIT (was skipped by ipairs)
This commit is contained in:
1 parent
a55b58b102
commit
b37c61a96c
22 files changed
+3269
-1
No files matched your search
+1
-1
@@ -403,7 +403,7 @@ function M.__iter(t, s, c)
|
||||
local mt = getmetatable(t)
|
||||
if rawtype(mt) == "table" and mt.__iter then return mt.__iter(t) end
|
||||
local n = #t
|
||||
if n > 0 and next(t, n) == nil then return ipairs(t) end
|
||||
if n > 0 and t[0] == nil and next(t, n) == nil then return ipairs(t) end -- LuaJIT keeps t[0] in the array part
|
||||
return next, t, nil
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user