Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

loadRecast

const loadRecast: () => Promise<RecastLibrary> = recast.load

Loads recast’s library and its wasm on the first call, apart from the page’s entry chunk, and answers every later call with the same promise. Awaiting it is the caller’s job, because the bake below is synchronous: a bake that awaits resumes in a microtask after the commit that asked for it, which spends its cost in a frame rather than in the load the caller is already inside.

Promise<RecastLibrary>