#Import "<mojo3d>"
#Import "<mojo3d-loaders>" ' for extended file formats
'
' Load a mesh
'
Local mesh:Mesh = Mesh.Load( "asset::model.obj" )
If mesh <> Null
'
' mesh loaded
'
' now create a material/texture for it.
'
' load a texture:
Local material:PbrMaterial = PbrMaterial.Load( "asset::texture.jpg" )
' or create a material yourself, if you don't have a texture
'material = New PbrMaterial( Color.Red, .1, .1 )
' change the material properties if you like
'material.MetalnessFactor = 0.1
'material.RoughnessFactor = 0.1
'material.ColorFactor = Color.Yellow
'material.AmbientFactor = Color.Chromium
'
' Create a Model from mesh + material
'
Local model:Model = New Model( mesh, material )
'
' READY.
'
EndIf