merge ws/3d3

This commit is contained in:
4DBug committed 2026-10-31 15:39:55 -05:00
commit 47345b2c8f
96 files changed
+24729 -21

No files matched your search

+81
View File
@@ -0,0 +1,81 @@
-- codecs/model/Draco tests: Google's Draco test data (bitstreams 0.9 - 2.2) and files encoded by draco_encoder 1.5.7
-- at every compression level, quantization and as point clouds, decoded and compared byte for byte (points, faces,
-- every attribute's values per point, as CRCs) with libdraco's own decoder (tools/fixtures/_draco_dump.cc), kd-tree
-- point clouds included; argument errors; the fuzz no-throw pass (which also fails on any internal error the
-- decoder's safety net caught). Fixtures: tools/fixtures/draco.py.
local T = require("@tests/T")
local Draco = require("@formats/codecs/model/Draco")
local Err = require("@formats/core/Err")
local Crc32 = require("@formats/core/Crc32")
local Cases = require("@tests/gen/draco_cases")
local t = T.suite("draco")
local counts = { exact = 0, rejected = 0, kd = 0 }
local samples = {}
for _, c in Cases do
local g, err = Draco.decode(c.data)
if c.error then
t:check(g == nil and err ~= nil, c.name .. ": libdraco rejects it, so do we")
counts.rejected += 1
else
t:check(g, c.name .. ": decode: " .. tostring(err))
if g then
t:eq(g.numPoints, c.points, c.name .. ": points")
if c.faces then
t:eq(g.numFaces, c.faces, c.name .. ": faces")
t:eq(Crc32.of(g.indices :: buffer), c.indices, c.name .. ": indices")
end
t:eq(#g.attributes, #c.attrs, c.name .. ": attribute count")
for i, want in c.attrs do
local a = g.attributes[i]
if a then
t:eq(a.typeId, want.type, c.name .. ": attribute " .. i .. " type")
t:eq(a.type, Draco.DATA_TYPES[want.dataType], c.name .. ": attribute " .. i .. " data type")
t:eq(a.components, want.components, c.name .. ": attribute " .. i .. " components")
t:eq(a.normalized, want.normalized, c.name .. ": attribute " .. i .. " normalized")
t:eq(a.uniqueId, want.uniqueId, c.name .. ": attribute " .. i .. " unique id")
t:eq(Crc32.of(a.data), want.crc, c.name .. ": attribute " .. i .. " (" .. a.name .. ") values")
end
end
counts.exact += 1
if g.method == "kdtree" then
counts.kd += 1
end
if #c.data < 4000 then
table.insert(samples, c.data)
end
end
end
end
t:note("%d files decoded exactly like libdraco (%d kd-tree point clouds), %d rejected by both", counts.exact, counts.kd, counts.rejected)
-- the attribute lookup and the header
local first = Cases[1]
local info = Draco.info(first.data)
t:check(info and (info.kind == "mesh" or info.kind == "points"), "info")
t:check(Draco.sniff(buffer.fromstring(first.data)), "sniff")
t:check(not Draco.sniff(buffer.fromstring("DRAC")), "sniff short")
-- errors
local _, e1 = Draco.decode(buffer.fromstring("NOTDRACO......"))
t:check(e1 and e1.code == Err.CORRUPT, "not Draco data: " .. tostring(e1))
local _, e2 = Draco.decode(buffer.fromstring("DRACO\9\0\1\1\0\0"))
t:check(e2 and e2.code == Err.UNSUPPORTED, "future version: " .. tostring(e2))
local _, e3 = Draco.decode(42 :: any)
t:check(e3 and e3.code == Err.ARG, "bad argument")
-- fuzz: never throws, and the internal safety net never fires
local internal = 0
t:fuzz("decode", function(b: buffer)
local g, err = Draco.decode(b)
if not g and err and string.find(err.message, "internal error", 1, true) then
internal += 1
if internal <= 5 then
print(" internal error: " .. err.message)
end
end
return g
end, samples, { mutations = 12, keepHeader = 11 })
t:eq(internal, 0, "fuzz: internal errors")
t:done()
+93
View File
@@ -0,0 +1,93 @@
-- codecs/model/Rig tests: morph targets and weights animations from frames, skeletons in local and world space
-- (node TRS, inverse bind matrices against Mat4), influences (top four, normalised), joint TRS animations; and
-- Pixels.palette.
local T = require("@tests/T")
local Rig = require("@formats/codecs/model/Rig")
local Mat4 = require("@formats/codecs/model/Mat4")
local Pixels = require("@formats/codecs/image/Pixels")
local Types = require("@formats/Types")
local t = T.suite("codecs/rig")
local Scene = Types.Scene
local function f32s(list: { number }): buffer
local b = buffer.create(#list * 4)
for i, v in list do
buffer.writef32(b, (i - 1) * 4, v)
end
return b
end
local function near(a: number, b: number): boolean
return math.abs(a - b) < 1e-5
end
-- morph
do
local base = { 0, 0, 0, 1, 0, 0 }
local prim: Types.Primitive = { attributes = { POSITION = Scene.accessor(f32s(base), "f32", 3, 2) }, mode = "points" }
local frames = { f32s(base), f32s({ 0, 1, 0, 1, 2, 0 }), f32s({ 0, 0, 3, 1, 0, 3 }) }
t:check(Rig.morph(prim, frames), "morph")
local tg = prim.targets :: any
t:eq(#tg, 3, "one target per frame")
t:eq(buffer.readf32(tg[2].POSITION.data, 4), 1, "delta y")
t:eq(buffer.readf32(tg[3].POSITION.data, 20), 3, "delta z")
t:check(not Rig.morph(prim, { buffer.create(4) }), "short frame refused")
local s = Scene.new()
s.nodes[1] = { children = {}, mesh = 1 }
Rig.morphAnimation(s, 1, 3, { { name = "a", first = 2, last = 3, fps = 5 }, { name = "none", first = 9, last = 12 } })
t:eq(#s.animations, 1, "out-of-range range skipped")
local ch = s.animations[1].channels[1]
t:eq(ch.path, "weights", "weights channel")
t:eq(ch.input.count, 2, "two keys")
t:check(near(buffer.readf32(ch.input.data, 4), 0.2), "fps")
t:eq(buffer.readf32(ch.output.data, 1 * 4), 1, "key 1 -> target 2")
t:eq(buffer.readf32(ch.output.data, (3 + 2) * 4), 1, "key 2 -> target 3")
end
-- skeleton
do
local q = Mat4.axisAngle(0, 0, 1, 90)
local joints = {
{ name = "root", parent = 0, translation = { 1, 0, 0 }, rotation = q },
{ name = "child", parent = 1, translation = { 0, 2, 0 }, rotation = { 0, 0, 0, 1 } },
}
local s = Scene.new()
local nodes, skin = Rig.skeleton(s, joints, "local")
t:eq(#nodes, 2, "two joint nodes")
t:eq(s.roots[1], nodes[1], "root")
t:eq(s.nodes[nodes[1]].children[1], nodes[2], "parenting")
local ibm = s.skins[skin].inverseBindMatrices :: Types.Accessor
-- child world = T(1,0,0) R90 T(0,2,0): its origin is at (-1, 0, 0); the inverse maps it back to 0
local inv = {}
for k = 1, 16 do
inv[k] = buffer.readf32(ibm.data, (16 + k - 1) * 4)
end
local x, y, z = Mat4.point(inv, -1, 0, 0)
t:check(near(x, 0) and near(y, 0) and near(z, 0), "inverse bind matrix")
-- the same joints given in world space give the same local TRS
local w = Scene.new()
local wn = Rig.skeleton(w, {
joints[1],
{ name = "child", parent = 1, translation = { -1, 0, 0 }, rotation = q },
}, "world")
local c = w.nodes[wn[2]]
t:check(near(c.translation[1], 0) and near(c.translation[2], 2) and near(c.rotation[4], 1), "world -> local")
local j, wt = Rig.influences({ { 0, 1 }, { 1, 0.2, 2, 0.6, 3, 0.1, 4, 0.05, 5, 0.05 } })
t:eq(buffer.readu16(j.data, 8), 2, "largest weight first")
t:check(near(buffer.readf32(wt.data, 16) + buffer.readf32(wt.data, 20) + buffer.readf32(wt.data, 24) + buffer.readf32(wt.data, 28), 1), "normalised")
t:eq(buffer.readf32(wt.data, 0), 1, "single influence")
local ai = Rig.animation(s, "wave", nodes, { 0, 0.5 }, { [2] = { rotation = { 0, 0, 0, 1, 0, 0, 1, 0 }, translation = { 0 } } })
t:eq(#s.animations[ai].channels, 1, "short track skipped, rotation kept")
t:eq(s.animations[ai].channels[1].node, nodes[2], "channel node")
end
-- palette
do
local pal = Pixels.palette(buffer.fromstring("\1\2\3\4\5\6"), 0, 2)
t:eq(buffer.readu32(pal, 4), 0xFF060504, "rgb triples")
t:eq(buffer.readu32(pal, 8), 0xFF000000, "missing entries black")
t:eq(buffer.readu32(Pixels.palette(buffer.fromstring("\1\2\3"), 0, 1, true), 0), 0xFF010203, "bgr")
t:eq(buffer.readu32(Pixels.palette(buffer.create(3), -5, 1), 0), 0xFF000000, "bad base")
end
t:done()
+92
View File
@@ -0,0 +1,92 @@
-- codecs/model/Sampler tests: STEP / LINEAR / CUBICSPLINE channels (glTF's Hermite definition), quaternion slerp
-- (shortest path, unit length), clamping outside the keys, weights channels, Sampler.times and Sampler.pose; glTF's
-- InterpolationTest sample model (every interpolation) sampled at its keys gives the key values; bad channels.
local T = require("@tests/T")
local Sampler = require("@formats/codecs/model/Sampler")
local Gltf = require("@formats/model/gltf")
local Bytes = require("@formats/core/Bytes")
local Types = require("@formats/Types")
local Picks = require("@tests/gen/iqm_gltf")
local t = T.suite("codecs/sampler")
local S = Types.Scene
local function acc(list: { number }, comps: number): Types.Accessor
local b = buffer.create(#list * 4)
for i, v in list do
buffer.writef32(b, (i - 1) * 4, v)
end
return S.accessor(b, "f32", comps, #list // comps)
end
local function near(a: number, b: number, eps: number?): boolean
return math.abs(a - b) < (eps or 1e-5)
end
do
local ch: Types.Channel = { node = 1, path = "translation", input = acc({ 0, 1, 3 }, 1), output = acc({ 0, 0, 0, 2, 4, 6, 2, 0, 0 }, 3), interpolation = "LINEAR" }
local s = assert(Sampler.channel(ch))
t:check(near(s(0.5)[1], 1) and near(s(0.5)[2], 2), "linear: halfway")
t:check(near(s(2)[1], 2) and near(s(2)[2], 2), "linear: second span")
t:check(near(s(-1)[2], 0) and near(s(9)[1], 2), "linear: clamped outside the keys")
ch.interpolation = "STEP"
local st = assert(Sampler.channel(ch))
t:check(near(st(0.99)[1], 0) and near(st(1)[1], 2), "step")
end
do
-- rotation: 0 -> 90 degrees about z, and a key stored with the opposite sign (shortest path)
local h = math.sqrt(0.5)
local ch: Types.Channel = { node = 1, path = "rotation", input = acc({ 0, 1, 2 }, 1), output = acc({ 0, 0, 0, 1, 0, 0, h, h, 0, 0, -h, -h }, 4), interpolation = "LINEAR" }
local s = assert(Sampler.channel(ch))
local q = s(0.5)
local a = 2 * math.acos(q[4])
t:check(near(a, math.pi / 4, 1e-4) and near(q[1] ^ 2 + q[2] ^ 2 + q[3] ^ 2 + q[4] ^ 2, 1), "slerp: 45 degrees, unit length")
local q2 = s(1.5)
t:check(near(math.abs(q2[3]), h, 1e-4), "slerp: the same orientation stored negated stays put")
end
do
-- cubic spline: in-tangent, value, out-tangent per key; p(t) for p0 = 0, p1 = 1, m0 = m1 = 0 is smoothstep
local ch: Types.Channel = { node = 1, path = "scale", input = acc({ 0, 2 }, 1), output = acc({ 9, 9, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 9, 9, 9 }, 3), interpolation = "CUBICSPLINE" }
local s = assert(Sampler.channel(ch))
t:check(near(s(1)[1], 0.5) and near(s(0.5)[1], 3 * 0.25 ^ 2 - 2 * 0.25 ^ 3), "cubic: smoothstep")
t:check(near(s(2)[2], 1), "cubic: the last value")
-- tangents scale with the key spacing
local ch2: Types.Channel = { node = 1, path = "translation", input = acc({ 0, 2 }, 1), output = acc({ 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, 3), interpolation = "CUBICSPLINE" }
local s2 = assert(Sampler.channel(ch2))
-- h10(0.5) * dt * m0 = 0.125 * 2 * 1
t:check(near(s2(1)[1], 0.25), "cubic: tangents times the key spacing")
end
do
local ch: Types.Channel = { node = 2, path = "weights", input = acc({ 0, 1 }, 1), output = acc({ 1, 0, 0, 1 }, 1), interpolation = "LINEAR" }
local s = assert(Sampler.channel(ch))
local w = s(0.25)
t:check(#w == 2 and near(w[1], 0.75) and near(w[2], 0.25), "weights")
local anim: Types.Animation = { name = "a", channels = { ch, { node = 1, path = "translation", input = acc({ 0.5, 1 }, 1), output = acc({ 0, 0, 0, 1, 1, 1 }, 3), interpolation = "STEP" } } }
local times = Sampler.times(anim)
t:eq(table.concat(times, " "), "0 0.5 1", "times: sorted, unique")
local pose = Sampler.pose(S.new(), anim, 1)
t:check(pose[2].weights and pose[1].translation and near(pose[1].translation[1], 1), "pose")
t:check(Sampler.channel({ node = 1, path = "translation", input = acc({ 0, 1 }, 1), output = acc({ 1, 2 }, 1), interpolation = "LINEAR" }) == nil, "short output: nil")
t:check(Sampler.channel({ node = 1, path = "translation", input = {} :: any, output = {} :: any, interpolation = "LINEAR" }) == nil, "junk: nil")
end
do
-- a real file: sampling a glTF sample model's skin animation at its own keys returns the key values
local g = assert(Gltf.decode(Bytes.reader(buffer.fromstring(Picks[1].data)), { files = Picks[1].files }))
local ok, total = true, 0
for _, anim in g.animations do
for _, ch in anim.channels do
local s = assert(Sampler.channel(ch))
local IN, OUT = assert(S.reader(ch.input)), assert(S.reader(ch.output))
local comps = if ch.path == "rotation" then 4 else 3
for k = 0, ch.input.count - 1 do
local v = s(IN(k, 0))
for c = 1, comps do
ok = ok and near(v[c], OUT(k, c - 1), 1e-4)
end
total += 1
end
end
end
t:check(ok and total > 0, Picks[1].name .. ": samples at the keys are the keys (" .. total .. ")")
end
t:done()
+148
View File
@@ -0,0 +1,148 @@
-- codecs/model/Vrml tests: the classic-encoding lexer and parser (comments, commas, string escapes, hex / exponent
-- numbers, DEF / USE, PROTO with IS fields, nested PROTOs and ROUTEs in bodies, EXTERNPROTO, Script interfaces,
-- IMPORT / EXPORT, the X3D header statements), the XML encoding's adapter (containerField, ProtoDeclare /
-- ProtoInstance, IS / connect), typed field reads of raw XML attributes, detection, errors, the fuzz pass.
local T = require("@tests/T")
local Vrml = require("@formats/codecs/model/Vrml")
local Fields = require("@formats/codecs/model/Vrml/Fields")
local Err = require("@formats/core/Err")
local t = T.suite("vrml codec")
-- ------------------------------------------------------------------------------------------------ lexer / parser
do
local g = assert(Vrml.parse([[#VRML V2.0 utf8
# a comment, then commas as blanks
DEF A Transform { translation 1,2,3 # trailing comment
children [ Shape { geometry IndexedFaceSet { coordIndex [ 0, 1, 2, -1 ] coord Coordinate { point [ 0 0 0, 1e1 0 0, .5 -2.5E-1 +3 ] } } } ] }
WorldInfo { title "say \"hi\" \\ there" info [ "a" "b" ] }
DEF P PixelTexture { image 1 1 4 0xFF8000FF }
USE A
]]))
t:eq(#g.roots, 4, "statements")
t:eq(g.header.version, "2.0", "header")
local a = g.roots[1]
t:eq(a.def, "A", "DEF")
t:eq(table.concat(Fields.vec(a, "translation", { 0, 0, 0 }), " "), "1 2 3", "commas are blanks")
local coord = Fields.node(Fields.node(Fields.nodes(a, "children")[1], "geometry"), "coord")
t:eq(table.concat(Fields.nums(coord, "point") :: { number }, " "), "0 0 0 10 0 0 0.5 -0.25 3", "exponents, leading dot, plus sign")
t:eq(Fields.str(g.roots[2], "title"), 'say "hi" \\ there', "string escapes")
t:eq(#Fields.strs(g.roots[2], "info"), 2, "MFString")
t:eq((Fields.nums(g.roots[3], "image") :: { number })[4], 0xFF8000FF, "hex numbers")
t:check(g.roots[4] == a, "USE is the same node")
end
do
local g = assert(Vrml.parse([[#VRML V2.0 utf8
PROTO Outer [ field SFFloat size 1 exposedField SFColor tint 1 1 1 eventIn SFBool flip ] {
PROTO Inner [ field SFFloat r 1 ] { Sphere { radius IS r } }
DEF G Group { children [ Shape { geometry Inner { r IS size } appearance Appearance { material DEF M Material { diffuseColor IS tint } } } ] }
DEF Clock TimeSensor { }
DEF I PositionInterpolator { key [ 0 1 ] keyValue [ 0 0 0 1 1 1 ] }
ROUTE Clock.fraction_changed TO I.set_fraction
ROUTE I.value_changed TO G.set_translation
}
EXTERNPROTO Far [ field SFFloat x ] [ "far.wrl#Far" "urn:far" ]
DEF O1 Outer { size 3 tint 0 1 0 }
Outer { }
Far { x 2 }
DEF S Script { field SFNode target USE O1 eventIn SFTime touch url "javascript: function touch() {}" }
IMPORT inl.Thing AS Thing
EXPORT S AS Exported
]]))
t:eq(#g.roots, 4, "proto instances, extern instance, script")
local o1, o2 = g.roots[1], g.roots[2]
t:eq(o1.type, "Group", "an instance is its body's first node")
t:eq(o1.def, "O1", "the instance's DEF name")
local function radius(o: any): number
local sh = Fields.nodes(o, "children")[1]
return Fields.num(Fields.node(sh, "geometry"), "radius", -1)
end
t:eq(radius(o1), 3, "IS through a nested PROTO (instance value)")
t:eq(radius(o2), 1, "IS default")
local mat = Fields.node(Fields.node(Fields.nodes(o1, "children")[1], "appearance"), "material")
t:eq(table.concat(Fields.vec(mat, "diffuseColor", { 9, 9, 9 }), " "), "0 1 0", "IS on an SFColor")
local mat2 = Fields.node(Fields.node(Fields.nodes(o2, "children")[1], "appearance"), "material")
t:check(mat ~= mat2, "each instance has its own copy of the body")
t:eq(#g.routes, 4, "the body's ROUTEs, per instance")
t:check(g.routes[2].to == o1 or g.routes[2].to.fields == o1.fields, "routes point at the instance's nodes")
t:eq(g.roots[3].type, "Far", "EXTERNPROTO instance keeps its type")
t:check(g.roots[3].extern == true, "EXTERNPROTO instance flagged")
t:eq(Fields.node(g.roots[4], "target"), o1, "Script interface field with a USE value")
end
do
local g = assert(Vrml.parse("#X3D V3.3 utf8\nPROFILE Immersive\nCOMPONENT CADGeometry:2\nMETA \"author\" \"me\"\nUNIT length foot 0.3048\nGroup { }\n"))
t:check(g.header.x3d and g.header.version == "3.3" and g.header.profile == "Immersive", "X3D header, PROFILE")
t:eq(g.components[1], "CADGeometry:2", "COMPONENT")
t:eq(g.meta.author, "me", "META")
t:eq(g.units.length.factor, 0.3048, "UNIT")
local s = assert(Vrml.build(g))
t:eq(s.meta.unit, 0.3048, "UNIT length -> meta.unit")
end
-- ------------------------------------------------------------------------------------------------ XML adapter
do
local g = assert(Vrml.graph([[<?xml version="1.0"?>
<X3D profile="Interchange" version="4.0"><head><component name="Shaders" level="1"/></head><Scene>
<ProtoDeclare name="Ball"><ProtoInterface><field name="r" type="SFFloat" accessType="initializeOnly" value="2"/></ProtoInterface>
<ProtoBody><Shape><Sphere><IS><connect nodeField="radius" protoField="r"/></IS></Sphere></Shape></ProtoBody></ProtoDeclare>
<Group DEF="G"><ProtoInstance name="Ball"><fieldValue name="r" value="5"/></ProtoInstance>
<ProtoInstance name="Ball" containerField="children"/></Group>
<Shape><Appearance><ImageTexture url='"a.png" "b.png"'/></Appearance><Box containerField="geometry" size="1, 2, 3" solid="FALSE"/></Shape>
<Transform USE="G"/>
</Scene></X3D>]]))
t:check(g.header.xml and g.header.version == "4.0", "XML header")
t:eq(g.components[1], "Shaders:1", "head component")
local grp = g.roots[1]
local kids = Fields.nodes(grp, "children")
t:eq(#kids, 2, "ProtoInstances in children")
t:eq(Fields.num(Fields.node(kids[1], "geometry"), "radius", -1), 5, "fieldValue")
t:eq(Fields.num(Fields.node(kids[2], "geometry"), "radius", -1), 2, "ProtoInterface default")
local shape = g.roots[2]
local box = Fields.node(shape, "geometry")
t:eq(table.concat(Fields.vec(box, "size", { 9, 9, 9 }), " "), "1 2 3", "numbers with commas")
t:eq(Fields.bool(box, "solid", true), false, "XML booleans (any case)")
local tex = Fields.node(Fields.node(shape, "appearance"), "texture")
local urls = Fields.strs(tex, "url")
t:check(#urls == 2 and urls[2] == "b.png", "quoted MFString")
t:eq(g.roots[3], grp, "USE in XML")
local single = { type = "ImageTexture", fields = { url = "plain name.png" } }
t:eq(Fields.strs(single, "url")[1], "plain name.png", "unquoted single MFString")
end
-- ------------------------------------------------------------------------------------------------ errors
do
local function code(text: string): string?
local _, e = Vrml.graph(text)
return e and e.code
end
t:eq(code("#VRML V2.0 utf8\nShape { geometry Box { }"), Err.CORRUPT, "unclosed node")
t:eq(code("#VRML V2.0 utf8\nShape { geometry USE X }"), Err.CORRUPT, "undefined USE")
t:eq(code("#VRML V2.0 utf8\nROUTE A.b TO"), Err.CORRUPT, "bad ROUTE")
t:eq(code("#VRML V2.0 utf8\nWorldInfo { title \"x }"), Err.TRUNCATED, "unterminated string")
t:eq(code("#VRML V1.0 ascii\n"), Err.UNSUPPORTED, "VRML 1.0")
t:eq(code("\224\0\0\1rest"), Err.UNSUPPORTED, "Fast Infoset X3D")
t:eq(code("#VRML V2.0 utf8\n" .. string.rep("Group { children ", 250)), Err.LIMIT, "nesting limit")
t:eq(code("<X3D><Scene><Group></Scene></X3D>"), Err.CORRUPT, "bad XML")
local _, e = Vrml.encode({} :: any)
t:eq(e and e.code, Err.ARG, "encode junk")
end
-- ------------------------------------------------------------------------------------------------ fuzz
do
local samples = {
"#VRML V2.0 utf8\nPROTO P [ field SFFloat a 1 ] { Box { size IS a IS a } }\nDEF X P { a 2 } USE X ROUTE X.a TO X.b\n",
"#X3D V3.3 utf8\nPROFILE Full\nShape { geometry Extrusion { spine [ 0 0 0 0 1 0 1 1 1 ] crossSection [ 0 0 1 0 1 1 0 0 ] } }\n",
"<X3D><Scene><ProtoDeclare name='A'><ProtoBody><Box/></ProtoBody></ProtoDeclare><ProtoInstance name='A'/><Shape><IndexedFaceSet coordIndex='0 1 2 -1 2 3 0'><Coordinate point='0 0 0 1 0 0 1 1 0 0 1 0'/></IndexedFaceSet></Shape></Scene></X3D>",
}
t:fuzz("graph + build", function(b: buffer)
local g = Vrml.graph(b)
if g then
return Vrml.build(g)
end
return nil
end, samples, { mutations = 400 })
end
t:done()