Hierarchy

  • WorldStartContext

Methods

  • Here you can load additional resources you need in the world.

    This is the perfect place to load custom map files.

    Note: Use the loader-prefix here:

    private async beforeWorldStart(loader:WorldStartContext) {
    const [mapJson] = await loader.requestResource([`json:path/to/myMap.json`])
    // ^^^^^
    // |
    // Loader Prefix
    }

    Note: If loading fails it WON'T THROW throw here but give null instead.

    Parameters

    • resUrls: string[]

    Returns Promise<any[]>

Generated using TypeDoc