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
filenamestringThe filename of the model to load.

Returns

NameTypeDescription
modelDataModelDataThe new ModelData.

modelData = lovr.data.newModelData(blob)

Arguments

NameTypeDescription
blobBlobThe Blob containing data for a model to decode.

Returns

NameTypeDescription
modelDataModelDataThe new ModelData.

See also