class Texture extends BaseTexture

A texture stores the information that represents an image or part of an image. It cannot be added to the display list directly. Instead use it as the texture for a Sprite. If no frame is provided then the whole image is used.

Annotations
@RawJSType() @native() @JSName( "Texture" )
Linear Supertypes
BaseTexture, Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Texture
  2. BaseTexture
  3. Object
  4. Any
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Texture(baseTexture: BaseTexture, frame: Rectangle = js.native, crop: Rectangle = js.native, trim: Rectangle = js.native, rotate: Rectangle = js.native)

    baseTexture

    The base texture source to create the texture from

    frame

    The rectangle frame of the texture to show

    crop

    The area of original texture

    trim

    Trimmed texture rectangle

    rotate

    indicates whether the texture should be rotated by 90 degrees ( used by texture packer )

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. var baseTexture: BaseTexture
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. var crop: Rectangle
  8. def destroy(): Unit

    Destroys this base texture

    Destroys this base texture

    Definition Classes
    BaseTexture
  9. def dispose(): Unit

    Frees the texture from WebGL memory without destroying this texture object.

    Frees the texture from WebGL memory without destroying this texture object. This means you can still use the texture later which will upload it to GPU memory again.

    Definition Classes
    BaseTexture
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. var frame: Rectangle
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  15. def hasLoaded: Boolean

    Set to true once the base texture has successfully loaded.

    Set to true once the base texture has successfully loaded. This is never true if the underlying source fails to load or has no texture data.

    Definition Classes
    BaseTexture
  16. def hasOwnProperty(v: String): Boolean
    Definition Classes
    Object
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  18. def height: Double

    The height of the base texture set when the image has loaded

    The height of the base texture set when the image has loaded

    Definition Classes
    BaseTexture
  19. var imageUrlstring: String

    TODO

    TODO

    Definition Classes
    BaseTexture
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def isLoading: Boolean

    Set to true if the source is currently loading.

    Set to true if the source is currently loading. If an Image source is loading the 'loaded' or 'error' event will be dispatched when the operation ends. An underyling source that is immediately-available bypasses loading entirely.

    Definition Classes
    BaseTexture
  22. def isPrototypeOf(v: Object): Boolean
    Definition Classes
    Object
  23. def loadSource(source: |[Image, HTMLCanvasElement]): Unit

    Load a source.

    Load a source. If the source is not-immediately-available, such as an image that needs to be downloaded, then the 'loaded' or 'error' event will be dispatched in the future and hasLoaded will remain false after this call.

    source

    the source object of the texture.

    Definition Classes
    BaseTexture
  24. var mipmap: Boolean

    Set this to true if a mipmap of this texture needs to be generated.

    Set this to true if a mipmap of this texture needs to be generated. This value needs to be set before the texture is used Also the texture must be a power of two size to work.

    Definition Classes
    BaseTexture
  25. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. final def notify(): Unit
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  28. def on(event: String, callback: Function): Texture.this.type
    Definition Classes
    BaseTexture
  29. var premultipliedAlpha: Boolean

    Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)

    Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)

    Definition Classes
    BaseTexture
  30. def propertyIsEnumerable(v: String): Boolean
    Definition Classes
    Object
  31. def realHeight: Double

    Used to store the actual height of the source of this texture

    Used to store the actual height of the source of this texture

    Definition Classes
    BaseTexture
  32. def realWidth: Double

    Used to store the actual width of the source of this texture

    Used to store the actual width of the source of this texture

    Definition Classes
    BaseTexture
  33. var resolution: Resolution

    The Resolution of the texture.

    The Resolution of the texture.

    Definition Classes
    BaseTexture
  34. var rotate: Rectangle
  35. var scaleMode: Int

    The scale mode to apply when scaling this texture

    The scale mode to apply when scaling this texture

    Definition Classes
    BaseTexture
    See also

    PIXI.SCALE_MODES

  36. def source: Any

    The image source that is used to create the texture.

    The image source that is used to create the texture.

    returns

    an image or the canvas

    Definition Classes
    BaseTexture
  37. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  38. def toLocaleString(): String
    Definition Classes
    Object
  39. def toString(): String
    Definition Classes
    AnyRef → Any
  40. var trim: Rectangle
  41. def update(): Unit

    Updates the texture on all the webgl renderers, this also assumes the src has changed.

    Updates the texture on all the webgl renderers, this also assumes the src has changed.

    Definition Classes
    BaseTexture
  42. def updateSourceImage(newSrc: String): Unit

    Changes the source image of the texture.

    Changes the source image of the texture. The original source must be an Image element.

    newSrc

    the path of the image

    Definition Classes
    BaseTexture
  43. def valueOf(): Any
    Definition Classes
    Object
  44. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. def width: Double

    The width of the base texture set when the image has loaded

    The width of the base texture set when the image has loaded

    Definition Classes
    BaseTexture

Inherited from BaseTexture

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped