Static methods

staticload(name:String, ?extraShaderFlags:Array<String>, ?customShaderPath:String):{meshes:Array<FoxMesh>, materials:Map<String, FoxMaterial>}

Loads an OBJ file along with its materials if exists.

Note: You can assign the OBJ's meshes directly to a FoxModel and add it to the scene by doing this:

var model = new FoxModel();
model.loadOBJ("data/my model.obj");
scene.add(model);

Parameters:

name

The OBJ asset path

extraShaderFlags

(Optional) A String array containing additional flags you want to use for all the material shaders

customShaderPath

(Optional) The path to a custom shader if you need it. The default is foxlite/basic

Returns:

An Object containing an Array of meshes (with materials applied) and a Map containing the materials from the MTL file (if it exists).