fileformat-drako / FileFormat.Drako-for-.NET

MIT License
2 stars 0 forks source link

Encode glb file? #2

Open bertt opened 3 weeks ago

bertt commented 3 weeks ago

Hi, is there an option to encode using bytes from glb?

So this is possible:

var bytes = File.ReadAllBytes(file);
var opt = new DracoEncodeOptions();
var drcBytes = Draco.Encode(bytes, opt);
lexchou-aspose commented 2 weeks ago

Encode method turns a DracoMesh or DracoPointCloud instance into byte array, what you get in glb with draco compression is already byte array.