gameforge - v0.1.12
    Preparing search index...

    Class BasePrepareAbstract

    The prepare manager provides functionality to upload content to the GPU.

    BasePrepare handles basic queuing functionality and is extended by PIXI.Prepare and PIXI.CanvasPrepare to provide preparation capabilities specific to their respective renderers.

    // Create a sprite
    const sprite = PIXI.Sprite.from('something.png');

    // Load object into GPU
    app.renderer.prepare.upload(sprite, () => {
    // Texture(s) has been uploaded to GPU
    app.stage.addChild(sprite);
    });
    @abstract

    PIXI

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    addHooks: any[]

    Collection of additional hooks for finding assets.

    completes: any[]

    Callback to call after completed.

    queue: any[]

    Collection of items to uploads at once.

    renderer: IRenderer

    Reference to the renderer.

    ticking: boolean

    If prepare is ticking (running).

    uploadHookHelper: any

    The only real difference between CanvasPrepare and Prepare is what they pass to upload hooks. That different parameter is stored here.

    uploadHooks: any[]

    Collection of additional hooks for processing assets.

    uploadsPerFrame: number

    The default maximum uploads per frame.

    Methods

    • Destroys the plugin, don't use after this.

      Returns void

    • Adds hooks for finding items.

      Parameters

      • addHook: IFindHook

        Function call that takes two parameters: item:*, queue:Array function must return true if it was able to add item to the queue.

      Returns this

      Instance of plugin for chaining.

    • Adds hooks for uploading items.

      Parameters

      • uploadHook: IUploadHook

        Function call that takes two parameters: prepare:CanvasPrepare, item:* and function must return true if it was able to handle upload of item.

      Returns this

      Instance of plugin for chaining.