3D mesh kodlaması Google Draco dosyasında

3D mesh alın ve Google Draco dosyasında kodlayın

The encode method exposed by the DracoFormat class can be used to encode a 3D mesh in the Google Draco file. It takes a Mesh and DracoSaveOptions objects as parameters. With the Draco save options, developers can also specify the position, texture coordinates, color and normal bits as well as the compression level before encoding a mesh.

Programming ample ample

Bu kod örneği, kürenin ağını alır ve daha sonra bir sıkıştırma seviyesi belirttikten sonra Google Draco dosyasında kodlanır.