lovr.data.newModelData

Loads a 3D model from a file. The supported 3D file formats are OBJ and glTF.


modelData = lovr.data.newModelData(filename)

Arguments

NameTypeDescription
filenamestring The filename of the model to load.

Returns

NameTypeDescription
modelDataModelData The new ModelData.

modelData = lovr.data.newModelData(blob)

Arguments

NameTypeDescription
blobBlob The Blob containing data for a model to decode.

Returns

NameTypeDescription
modelDataModelData The new ModelData.

See also