packages/prepare/src/BasePrepare.js
function findText(item, queue)
{
    if (item instanceof Text)
    {
        // push the text style to prepare it - this can be really expensive
        if (queue.indexOf(item.style) === -1)
        {
            queue.push(item.style);
        }
        // also push the text object so that we can render it (to canvas/texture) if needed
        if (queue.indexOf(item) === -1)
        {
            queue.push(item);
        }
        // also push the Text's texture for upload to GPU
        const texture = item._texture.baseTexture;

        if (queue.indexOf(texture) === -1)
        {
            queue.push(texture);
        }

        return true;
    }

    return false;
}
function findText(item, queue)
{
    if (item instanceof Text)
    {
        // push the text style to prepare it - this can be really expensive
        if (queue.indexOf(item.style) === -1)
        {
            queue.push(item.style);
        }
        // also push the text object so that we can render it (to canvas/texture) if needed
        if (queue.indexOf(item) === -1)
        {
            queue.push(item);
        }
        // also push the Text's texture for upload to GPU
        const texture = item._texture.baseTexture;

        if (queue.indexOf(texture) === -1)
        {
            queue.push(texture);
        }

        return true;
    }

    return false;
}
function findText ( item , queue ) { if ( item instanceof Text ) { // push the text style to prepare it - this can be really expensive if ( queue . indexOf ( item . style ) === - 1 ) { queue . push ( item . style ) ; } // also push the text object so that we can render it (to canvas/texture) if needed if ( queue . indexOf ( item ) === - 1 ) { queue . push ( item ) ; } // also push the Text's texture for upload to GPU const texture = item . _texture . baseTexture ; if ( queue . indexOf ( texture ) === - 1 ) { queue . push ( texture ) ; } return true ; } return false ; }
Built-in hook to find Text objects.

@private
@param {PIXI.DisplayObject} item - Display object to check
@param {Array<*>} queue - Collection of items to upload
@return {boolean} if a PIXI.Text object was found.
Built - in hook to find Text objects .