Engine API Reference - v2.6.1
    Preparing search index...

    Class MaterialHandler

    Resource handler used for loading Material resources.

    Hierarchy (View Summary)

    Index

    Properties

    Accessors

    Methods

    Properties

    _app: AppBase

    The running app instance.

    handlerType: string = ''

    Type of the resource the handler handles.

    Accessors

    • get maxRetries(): number

      Gets the number of times to retry a failed request for the resource.

      Returns number

    • set maxRetries(value: number): void

      Sets the number of times to retry a failed request for the resource.

      Parameters

      • value: number

      Returns void

    Methods

    • Load a resource from a remote URL. The base implementation does nothing.

      Parameters

      • url: any

        Either the URL of the resource to load or a structure containing the load and original URL.

      • callback: any

        The callback used when the resource is loaded or an error occurs.

      Returns void

    • The patch function performs any operations on a resource that requires a dependency on its asset data or any other asset data. The base implementation does nothing.

      Parameters

      • asset: any

        The asset to patch.

      • assets: any

        The asset registry.

      Returns void