|
@@ -5086,6 +5086,7 @@ return {
|
|
description = "Creates a new Model from a file. The supported 3D file formats are `obj`, `fbx`, `gltf`, and collada. Models use normals and texture coordinates, if provided.\n\nThe following features are not supported yet: animations, materials, vertex colors.",
|
|
description = "Creates a new Model from a file. The supported 3D file formats are `obj`, `fbx`, `gltf`, and collada. Models use normals and texture coordinates, if provided.\n\nThe following features are not supported yet: animations, materials, vertex colors.",
|
|
key = "lovr.graphics.newModel",
|
|
key = "lovr.graphics.newModel",
|
|
module = "lovr.graphics",
|
|
module = "lovr.graphics",
|
|
|
|
+ notes = "Models loaded from glTF files do not currently import animations properly.",
|
|
variants = {
|
|
variants = {
|
|
{
|
|
{
|
|
arguments = {
|
|
arguments = {
|
|
@@ -5093,6 +5094,34 @@ return {
|
|
name = "filename",
|
|
name = "filename",
|
|
type = "string",
|
|
type = "string",
|
|
description = "The filename of the model to load."
|
|
description = "The filename of the model to load."
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name = "texture",
|
|
|
|
+ type = "string",
|
|
|
|
+ description = "The filename of the texture to apply to the model.",
|
|
|
|
+ default = "nil"
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ returns = {
|
|
|
|
+ {
|
|
|
|
+ name = "model",
|
|
|
|
+ type = "Model",
|
|
|
|
+ description = "The new Model."
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ arguments = {
|
|
|
|
+ {
|
|
|
|
+ name = "filename",
|
|
|
|
+ type = "string",
|
|
|
|
+ description = "The filename of the model to load."
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ name = "material",
|
|
|
|
+ type = "Material",
|
|
|
|
+ description = "The material to apply to the model. If nil, the materials will be loaded from the model file.",
|
|
|
|
+ default = "nil"
|
|
}
|
|
}
|
|
},
|
|
},
|
|
returns = {
|
|
returns = {
|
|
@@ -5103,8 +5132,7 @@ return {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- },
|
|
|
|
- notes = "Models loaded from glTF files do not currently import animations properly."
|
|
|
|
|
|
+ }
|
|
},
|
|
},
|
|
{
|
|
{
|
|
name = "newShader",
|
|
name = "newShader",
|