ModelLoadTask

Extends: FileLoadTask

Loads a .obj or .stl model a slice at a time: downloads it if it's a URL, reads the file, parses it over as many steps as it needs, downloads any remote textures (a remote .obj's .mtl and every texture it names, or a URL texturePath), then adds it to the game (loading an .obj's textures).

Properties

  • loader (BGE.AssetLoader) — Makes this model's texture downloads. Set by AssetLoader.
  • downloadOptions (BGE.DownloadOptions) — Options for this model's texture downloads. Set by AssetLoader.

Constructor

new ModelLoadTask( game: BGE.Game, modelName: string, path: string, options: BGE.Model3dLoadOptions, ): ModelLoadTask

Parameters


Instance Methods

loadFile(budgetMs: integer): boolean

Parameters

  • budgetMs (integer)

Returns

  • boolean

getFileProgress(): float

Returns

  • float

isDownloadedFileBad(): boolean

Returns

  • boolean

abort(): void

Returns

  • void