Class

io.scalajs.dom.html.phaser

Frame

Related Doc: package phaser

Permalink

class Frame extends Object

A Frame is a single frame of an animation and is part of a FrameData collection.

Annotations
@RawJSType() @native() @JSName( "Phaser.Frame" )
See also

https://phaser.io/docs/2.6.2/Phaser.Frame.html

Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Frame
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Frame(index: Int, x: Double, y: Double, width: Double, height: Double, name: String)

    Permalink

    index

    The index of this Frame within the FrameData set it is being added to.

    x

    X position of the frame within the texture image.

    y

    Y position of the frame within the texture image.

    width

    Width of the frame within the texture image.

    height

    Height of the frame within the texture image.

    name

    The name of the frame. In Texture Atlas data this is usually set to the filename.

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 bottom: Double

    Permalink

    The bottom of the frame (y + height).

  6. var centerX: Double

    Permalink

    Center X position within the image to cut from.

  7. var centerY: Double

    Permalink

    Center Y position within the image to cut from.

  8. def clone(): Frame.this.type

    Permalink

    Clones this Frame into a new Phaser.Frame object and returns it.

    Clones this Frame into a new Phaser.Frame object and returns it. Note that all properties are cloned, including the name, index and UUID.

    returns

    An exact copy of this Frame object.

    Definition Classes
    Frame → AnyRef
  9. var distance: Double

    Permalink

    The distance from the top left to the bottom-right of this Frame.

  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. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. def getRect(out: Phaser.Rectangle = js.native): Phaser.Rectangle

    Permalink

    Returns a Rectangle set to the dimensions of this Frame.

    Returns a Rectangle set to the dimensions of this Frame.

    out

    A rectangle to copy the frame dimensions to.

    returns

    A rectangle.

  15. def hasOwnProperty(v: String): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  17. var height: Double

    Permalink

    Height of the frame within the texture image.

  18. var index: Int

    Permalink

    The index of this Frame within the FrameData set it is being added to.

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  21. var name: String

    Permalink

    The name of the frame.

    The name of the frame. In Texture Atlas data this is usually set to the filename.

  22. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  25. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  26. def resize(width: Double, height: Double): Unit

    Permalink

    Adjusts of all the Frame properties based on the given width and height values.

    Adjusts of all the Frame properties based on the given width and height values.

    width

    The new width of the Frame.

    height

    The new height of the Frame.

  27. var right: Double

    Permalink

    The right of the Frame (x + width).

  28. var rotated: Boolean

    Permalink

    Rotated? (not yet implemented)

  29. var rotationDirection: String

    Permalink

    Either 'cw' or 'ccw', rotation is always 90 degrees.

  30. def setTrim(trimmed: Boolean, actualWidth: Double, actualHeight: Double, destX: Double, destY: Double, destWidth: Double, destHeight: Double): Unit

    Permalink

    If the frame was trimmed when added to the Texture Atlas this records the trim and source data.

    If the frame was trimmed when added to the Texture Atlas this records the trim and source data.

    trimmed

    If this frame was trimmed or not.

    actualWidth

    The width of the frame before being trimmed.

    actualHeight

    The height of the frame before being trimmed.

    destX

    The destination X position of the trimmed frame for display.

    destY

    The destination Y position of the trimmed frame for display.

    destWidth

    The destination width of the trimmed frame for display.

    destHeight

    The destination height of the trimmed frame for display.

  31. var sourceSizeH: Double

    Permalink

    Height of the original sprite before it was trimmed.

  32. var sourceSizeW: Double

    Permalink

    Width of the original sprite before it was trimmed.

  33. var spriteSourceSizeH: Double

    Permalink

    Height of the trimmed sprite.

  34. var spriteSourceSizeW: Double

    Permalink

    Width of the trimmed sprite.

  35. var spriteSourceSizeX: Double

    Permalink

    X position of the trimmed sprite inside original sprite.

  36. var spriteSourceSizeY: Double

    Permalink

    Y position of the trimmed sprite inside original sprite.

  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 trimmed: Boolean

    Permalink

    Was it trimmed when packed?

  41. def valueOf(): Any

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. var width: Double

    Permalink

    Width of the frame within the texture image.

  46. var x: Double

    Permalink

    X position of the frame within the texture image.

  47. var y: Double

    Permalink

    Y position of the frame within the texture image.

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped