Object/Class

io.scalajs.dom.html.phaser.physics

P2

Related Docs: class P2 | package physics

Permalink

object P2 extends Object

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

Type Members

  1. class Body extends Object

    Permalink

    The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated.

    The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated. These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene. In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene. By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body. Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

    Annotations
    @RawJSType() @native()
  2. class BodyDebug extends Object

    Permalink

    Draws a P2 Body to a Graphics instance for visual debugging.

    Draws a P2 Body to a Graphics instance for visual debugging. Needless to say, for every body you enable debug drawing on, you are adding processor and graphical overhead. So use sparingly and rarely (if ever) in production code.

    Also be aware that the Debug body is only updated when the Sprite it is connected to changes position. If you manipulate the sprite in any other way (such as moving it to another Group or bringToTop, etc) then you will need to manually adjust its BodyDebug as well.

    Annotations
    @RawJSType() @native()

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. object Body extends Object

    Permalink
    Annotations
    @native()
  5. object BodyDebug extends Object

    Permalink
    Annotations
    @native()
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hasOwnProperty(v: String): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    Object
  16. final def ne(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    Object
  20. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  23. def valueOf(): Any

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped