ModelLoadOperation
classin packageklyn.graphics3d.assets
public class ModelLoadOperation implements Runnable, AutoClosable
ModelLoadOperation
All Implemented Interfaces: 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()

Properties
Modifier and Type Member Description
public readonly property isDone
isDone as Boolean
Whether result or failure is ready.
public readonly property phase
phase as String
Latest phase.
public readonly property progress
progress as Double
Latest coalesced progress.
Constructors
Modifier and Type Member Description
public ModelLoadOperation
ModelLoadOperation(path as FilePath, format as ModelFormat = null)
Starts a CPU worker.
Methods
Modifier and Type Member Description
public awaitResult
awaitResult() as ModelAsset
Joins the worker and returns the asset or rethrows its failure.
public cancel
cancel() as Void
Requests cancellation; does not kill a native file read mid-call.
public close
close() as Void
Cancels and joins; idempotent after completion.
public override run
run() as Void
Worker entry point; not for direct invocation.
Inherited Methods
methodInherited Methods from Runnable: run
methodInherited Methods from AutoClosable: close