model formats (mca..x3d): comments are specs only
This commit is contained in:
1 parent
0bd7b87d2b
commit
b952c10222
49 files changed
+310
-936
No files matched your search
@@ -1,9 +1,8 @@
|
||||
--!strict
|
||||
--!native
|
||||
--!optimize 2
|
||||
-- model/robloxmesh/Write: a flat record (model/robloxmesh/Parse's shape) to a version 2.00 or 4.00 FileMesh. 2.00:
|
||||
-- header, 36- or 40-byte vertices (40 when col is set), faces. 4.00: the 24-byte header, 40-byte vertices, skinning
|
||||
-- (when there are bones), faces, LOD offsets, bones, the bone name table, subsets. Never throws.
|
||||
-- model/robloxmesh/Write: a flat record to FileMesh 2.00 (header, 36- or 40-byte vertices, faces) or 4.00 (24-byte
|
||||
-- header, 40-byte vertices, skinning, faces, LOD offsets, bones, bone names, subsets). Never throws.
|
||||
local Parse = require("@rosetta/model/robloxmesh/Parse")
|
||||
local Bytes = require("@rosetta/core/Bytes")
|
||||
|
||||
@@ -30,7 +29,6 @@ local function vertex(w: Bytes.Writer, r: Parse.Record, i: number, colors: boole
|
||||
w.pos = p + (if colors then 40 else 36)
|
||||
end
|
||||
|
||||
-- write(r, version) -> buffer ("2.00" | "4.00")
|
||||
function Write.write(r: Parse.Record, version: string): buffer
|
||||
local nv, nf = r.numVerts, r.numFaces
|
||||
local w = Bytes.writer(64 + nv * 48 + nf * 12)
|
||||
|
||||
Reference in new issue
Block a user