public class ModelLoadOperation implements Runnable, AutoClosable
Background CPU model load with polling, cooperative cancellation and join. Only awaitResult publishes the final asset. Attach it to a GUI scene on the GUI thread. A Timer can poll progress; updates are coalesced, not queued. Example: operation = ModelLoader().loadAsync(path); asset = operation.awaitResult()
| Modifier and Type | Member | Description |
|---|---|---|
| public readonly property | isDoneisDone as Boolean |
Whether result or failure is ready. |
| public readonly property | phasephase as String |
Latest phase. |
| public readonly property | progressprogress as Double |
Latest coalesced progress. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | ModelLoadOperationModelLoadOperation(path as FilePath, format as ModelFormat = null) |
Starts a CPU worker. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | awaitResultawaitResult() as ModelAsset |
Joins the worker and returns the asset or rethrows its failure. |
| public | cancelcancel() as Void |
Requests cancellation; does not kill a native file read mid-call. |
| public | closeclose() as Void |
Cancels and joins; idempotent after completion. |
| public override | runrun() as Void |
Worker entry point; not for direct invocation. |