Core · interface
LoadTask
One thing being waited for.
Explained in The loop.
interface LoadTaskimport type { LoadTask } from '@driftengine/core';In depth
weight is what makes the total mean anything. A progress bar that treats "decode 58 audio
tracks" and "read a settings file" as half each spends most of its life at 50%, which is worse
than no bar: it teaches a viewer that the bar is decoration. Weights are in whatever unit the
caller likes as long as they are the same unit — bytes are the obvious one because they are
usually known in advance, and a rough guess in "seconds this normally takes" also works.
Properties
| Name | Type | Description |
|---|---|---|
idreadonly | string | Stable, and not for showing: a caller maps it to whatever words its audience needs. |
weightreadonly | number | |
fraction | number | 0 to 1. |
done | boolean |