Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/caviar/web/src/loader/Loader.ts>Loader

⚡ Blazing fast, modern, Game Engine powered by WebGPU for Deno and the browser
Go to Latest
class Loader
import { Loader } from "https://deno.land/x/caviar@2.5.0/web/src/loader/Loader.ts";

Constructors

new
Loader(world: World)

Properties

baseUrl: string
completed: Set<IFile>
crossOrigin: string
inflight: Set<RequestFileType>
isLoading: boolean
maxParallelDownloads
optional
onComplete: Function
optional
onError: Function
path: string
progress: number
queue: Set<RequestFileType>

Methods

add(...file: RequestFileType[])
nextFile(): void
reset(): void
setBaseUrl(url?): void
setCORS(crossOrigin: string): void
setMaxParallelDownloads(max: number): void
setPath(path?): void
start(): Promise<Loader> | null
stop(): void