API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classLoadingQueue

@codexo/exojs / assets / stable

An awaitable, progress-aware load operation. Implements `PromiseLike<T>` so it can be `await`ed directly and composed with `Promise.all([queue1, queue2])` without wrapping. Progress is updated as individual items complete via _notifyItem. A load that is no longer wanted can be dropped with cancel.

2
props
4
methods
1
events
Import
import { LoadingQueue } from '@codexo/exojs'

An awaitable, progress-aware load operation.

Implements `PromiseLike<T>` so it can be `await`ed directly and composed with `Promise.all([queue1, queue2])` without wrapping.

Progress is updated as individual items complete via _notifyItem. A load that is no longer wanted can be dropped with cancel.

Methods4
cancel(): void
Gives up on this load: drops the claims it registered and, once no other claim scope still wants the same asset, aborts the in-flight network request behind it. Idempotent. This is a claim-level operation, so the underlying fetch survives as long as anyone else needs it - a second scene loading the same texture keeps it downloading, and only the last cancellation actually stops the request. The queue then rejects with the platform's AbortError; a cancelled load is deliberately NOT reported through Loader.onError, since nothing failed. Cancelling a load whose assets are already resident behaves like Loader.release(...) for the keys this call claimed: the result is no longer wanted, so it is freed at refcount 0.
catch(onrejected?: (reason: unknown) => Caught | PromiseLike<Caught> | null): Promise<Caught | T>
finally(onfinally?: () => void | null): Promise<T>
then(onfulfilled?: (value: T) => Fulfilled | PromiseLike<Fulfilled> | null, onrejected?: (reason: unknown) => PromiseLike<Rejected> | Rejected | null): Promise<Fulfilled | Rejected>
Attaches callbacks for the resolution and/or rejection of the Promise.
Properties2
cancelled: boolean
Whether cancel has been called on this queue.
progress: LoadingProgress
Events1
Source