src/Elements/Serialization/glTF/GltfExtensions.cs
/// <summary>
/// Convert the Model to a base64 encoded string.
/// </summary>
/// <returns>A Base64 string representing the Model.</returns>
Convert the Model to a base64 encoded string.
Convert the Model to a base64 encoded string .
public static string ToBase64String(this Model model, bool drawEdges = false)
        {
            var buffer = new List<byte>();
            var tmp = Path.GetTempFileName();
            var gltf = InitializeGlTF(model, buffer, drawEdges);
            if (gltf == null)
            {
                return "";
            }
            gltf.SaveBinaryModel(buffer.ToArray(), tmp);
            var bytes = File.ReadAllBytes(tmp);
            return Convert.ToBase64String(bytes);
        }
public static string ToBase64String ( this Model model , bool drawEdges = false ) { var buffer = new List < byte > ( ) ; var tmp = Path . GetTempFileName ( ) ; var gltf = InitializeGlTF ( model , buffer , drawEdges ) ; if ( gltf == null ) { return " " ; } gltf . SaveBinaryModel ( buffer . ToArray ( ) , tmp ) ; var bytes = File . ReadAllBytes ( tmp ) ; return Convert . ToBase64String ( bytes ) ; }
Convert the Model to a base64 encoded string.
Convert the Model to a base64 encoded string .
A Base64 string representing the Model.
A Base64 string representing the Model .
Model
this
drawEdges
bool