Class/Object

io.scalajs.dom.html.pixijs

Texture

Related Docs: object Texture | package pixijs

Permalink

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)

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. var baseTexture: BaseTexture

    Permalink

    The base texture source to create the texture from

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. var crop: Rectangle

    Permalink

    The area of original texture

  8. def destroy(): Unit

    Permalink

    Destroys this base texture

    Destroys this base texture

    Definition Classes
    BaseTexture
  9. def dispose(): Unit

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. var frame: Rectangle

    Permalink

    The rectangle frame of the texture to show

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hasLoaded: Boolean

    Permalink

    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

    Permalink
    Definition Classes
    Object
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. def height: Double

    Permalink

    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

    Permalink

    TODO

    TODO

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

    Permalink
    Definition Classes
    Any
  21. def isLoading: Boolean

    Permalink

    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

    Permalink
    Definition Classes
    Object
  23. def loadSource(source: |[Image, HTMLCanvasElement]): Unit

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. def on(event: String, callback: Function): Texture.this.type

    Permalink
    Definition Classes
    BaseTexture
  29. var premultipliedAlpha: Boolean

    Permalink

    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

    Permalink
    Definition Classes
    Object
  31. def realHeight: Double

    Permalink

    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

    Permalink

    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

    Permalink

    The Resolution of the texture.

    The Resolution of the texture.

    Definition Classes
    BaseTexture
  34. var rotate: Rectangle

    Permalink

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

  35. var scaleMode: Int

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef
  38. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  39. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  40. var trim: Rectangle

    Permalink

    Trimmed texture rectangle

  41. def update(): Unit

    Permalink

    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

    Permalink

    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

    Permalink
    Definition Classes
    Object
  44. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. def width: Double

    Permalink

    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