ModelParseTask

Extends: BGE.LoadTask

Base class for the step-by-step model parsers (OBJParseTask, STLAsciiParseTask, STLBinaryParseTask). model is set once step() returns true, and stays invalid if the content couldn't be parsed.

Properties


Constructor

new ModelParseTask(): ModelParseTask

Instance Methods

step(budgetMs: integer): boolean

Inherited from BGE.LoadTask#step

Does some of this task's work.

Parameters

  • budgetMs (integer) — roughly how many milliseconds this call may take

Returns

  • boolean — true once the task is finished (or has failed - set error)

getProgress(): float

Inherited from BGE.LoadTask#getProgress

How far through its work this task is.

Returns

  • float — 0 to 1

abort(): void

Inherited from BGE.LoadTask#abort

Called by the loader if step() throws, to release anything the task holds.

Returns

  • void

after(other: BGE.LoadTask): object

Inherited from BGE.LoadTask#after

Makes this task wait until another task has finished. If the other task fails, this one fails too without running.

Parameters

Returns

  • object — this task, so calls can be chained