src/pixi/textures/Texture.js
function Texture(baseTexture, frame)
{
    EventTarget.call( this );

    if(!frame)
    {
        this.noFrame = true;
        frame = new Rectangle(0,0,1,1);
    }

    if(baseTexture instanceof Texture)
        baseTexture = baseTexture.baseTexture;

    /**
     * The base texture of this texture
     *
     * @property baseTexture
     * @type BaseTexture
     */
    this.baseTexture = baseTexture;

    /**
     * The frame specifies the region of the base texture that this texture uses
     *
     * @property frame
     * @type Rectangle
     */
    this.frame = frame;

    /**
     * The trim point
     *
     * @property trim
     * @type Point
     */
    this.trim = new Point();

    this.scope = this;

    if(baseTexture.hasLoaded)
    {
        if(this.noFrame)frame = new Rectangle(0,0, baseTexture.width, baseTexture.height);
        //console.log(frame)

        this.setFrame(frame);
    }
    else
    {
        var scope = this;
        baseTexture.addEventListener('loaded', function(){ scope.onBaseTextureLoaded(); });
    }
}
function Texture(baseTexture, frame)
{
    EventTarget.call( this );

    if(!frame)
    {
        this.noFrame = true;
        frame = new Rectangle(0,0,1,1);
    }

    if(baseTexture instanceof Texture)
        baseTexture = baseTexture.baseTexture;

    /**
     * The base texture of this texture
     *
     * @property baseTexture
     * @type BaseTexture
     */
    this.baseTexture = baseTexture;

    /**
     * The frame specifies the region of the base texture that this texture uses
     *
     * @property frame
     * @type Rectangle
     */
    this.frame = frame;

    /**
     * The trim point
     *
     * @property trim
     * @type Point
     */
    this.trim = new Point();

    this.scope = this;

    if(baseTexture.hasLoaded)
    {
        if(this.noFrame)frame = new Rectangle(0,0, baseTexture.width, baseTexture.height);
        //console.log(frame)

        this.setFrame(frame);
    }
    else
    {
        var scope = this;
        baseTexture.addEventListener('loaded', function(){ scope.onBaseTextureLoaded(); });
    }
}
function Texture ( baseTexture , frame ) { EventTarget . call ( this ) ; if ( ! frame ) { this . noFrame = true ; frame = new Rectangle ( 0 , 0 , 1 , 1 ) ; } if ( baseTexture instanceof Texture ) baseTexture = baseTexture . baseTexture ; /**
     * The base texture of this texture
     *
     * @property baseTexture
     * @type BaseTexture
     */ this . baseTexture = baseTexture ; /**
     * The frame specifies the region of the base texture that this texture uses
     *
     * @property frame
     * @type Rectangle
     */ this . frame = frame ; /**
     * The trim point
     *
     * @property trim
     * @type Point
     */ this . trim = new Point ( ) ; this . scope = this ; if ( baseTexture . hasLoaded ) { if ( this . noFrame ) frame = new Rectangle ( 0 , 0 , baseTexture . width , baseTexture . height ) ; //console.log(frame) this . setFrame ( frame ) ; } else { var scope = this ; baseTexture . addEventListener ( 'loaded' , function ( ) { scope . onBaseTextureLoaded ( ) ; } ) ; } }
A texture stores the information that represents an image or part of an image. It cannot be added
to the display list directly. To do this use Sprite. If no frame is provided then the whole image is used

@class Texture
@uses EventTarget
@constructor
@param baseTexture {BaseTexture} The base texture source to create the texture from
@param frame {Rectangle} The rectangle frame of the texture to show
A texture stores the information that represents an image or part of an image . It cannot be added to the display list directly . To do this use Sprite . If no frame is provided then the whole image is used