Skip to main content
Version: Phaser v3.88.2

OBJFile

A single Wavefront OBJ File suitable for loading by the Loader.

These are created when you use the Phaser.Loader.LoaderPlugin#obj method and are not typically created directly.

For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#obj.

Constructor

new OBJFile(loader, key, [objURL], [matURL], [flipUV], [xhrSettings])

Parameters

nametypeoptionaldescription
loaderPhaser.Loader.LoaderPluginNoA reference to the Loader that is responsible for this file.
keystring | Phaser.Types.Loader.FileTypes.OBJFileConfigNoThe key to use for this file, or a file configuration object.
objURLstringYesThe absolute or relative URL to load the obj file from. If undefined or null it will be set to <key>.obj, i.e. if key was "alien" then the URL will be "alien.obj".
matURLstringYesThe absolute or relative URL to load the material file from. If undefined or null it will be set to <key>.mat, i.e. if key was "alien" then the URL will be "alien.mat".
flipUVbooleanYesFlip the UV coordinates stored in the model data?
xhrSettingsPhaser.Types.Loader.XHRSettingsObjectYesExtra XHR Settings specifically for these files.

Scope: static

Extends

Phaser.Loader.MultiFile

Source: src/loader/filetypes/OBJFile.js#L16
Since: 3.50.0

Inherited Methods

From Phaser.Loader.MultiFile:


Public Methods

addToCache

<instance> addToCache()

Description:

Adds this file to its target cache upon successful loading and processing.

Source: src/loader/filetypes/OBJFile.js#L112
Since: 3.50.0


Inherited Members

From Phaser.Loader.MultiFile: