Object/Class

io.scalajs.dom.html.phaser

Point

Related Docs: class Point | package phaser

Permalink

object Point extends Object

Point Singleton

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

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. def add(a: Point, b: Point, out: Point = null): Point

    Permalink

    Adds the coordinates of two points together to create a new point.

    Adds the coordinates of two points together to create a new point.

    a

    The first Point object.

    b

    The second Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  5. def angle(a: Point, b: Point): Double

    Permalink

    Returns the angle between two Point objects.

    Returns the angle between two Point objects.

    a

    The first Point object.

    b

    The second Point object.

    returns

    The angle between the two Points.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def centroid(points: Array[Point], out: Point = null): Point

    Permalink

    Calculates centroid (or midpoint) from an array of points.

    Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.

    points

    The array of one or more points.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def distance(a: Point, b: Point, round: Boolean = false): Double

    Permalink

    Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).

    Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).

    a

    The target object. Must have visible x and y properties that represent the center of the object.

    b

    The target object. Must have visible x and y properties that represent the center of the object.

    round

    Round the distance to the nearest integer.

    returns

    The distance between this Point object and the destination Point object.

  10. def divide(a: Point, b: Point, out: Point = null): Point

    Permalink

    Divides the coordinates of two points to create a new point.

    Divides the coordinates of two points to create a new point.

    a

    The first Point object.

    b

    The second Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(a: Point, b: Point): Boolean

    Permalink

    Determines whether the two given Point objects are equal.

    Determines whether the two given Point objects are equal. They are considered equal if they have the same x and y values.

    a

    The first Point object.

    b

    The second Point object.

    returns

    A value of true if the Points are equal, otherwise false.

  13. def equals(arg0: Any): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  18. def interpolate(a: Point, b: Point, f: Double, out: Point = null): Point

    Permalink

    Interpolates the two given Points, based on the f value (between 0 and 1) and returns a new Point.

    Interpolates the two given Points, based on the f value (between 0 and 1) and returns a new Point.

    a

    The first Point object.

    b

    The second Point object.

    f

    The level of interpolation between the two points. Indicates where the new point will be, along the line between pt1 and pt2. If f=1, pt1 is returned; if f=0, pt2 is returned.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  19. final def isInstanceOf[T0]: Boolean

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

    Permalink
    Definition Classes
    Object
  21. def multiply(a: Point, b: Point, out: Point = null): Point

    Permalink

    Multiplies the coordinates of two points to create a new point.

    Multiplies the coordinates of two points to create a new point.

    a

    The first Point object.

    b

    The second Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  22. def multiplyAdd(a: Point, b: Point, s: Double, out: Point = null): Point

    Permalink

    Adds two 2D Points together and multiplies the result by the given scalar.

    Adds two 2D Points together and multiplies the result by the given scalar.

    a

    The first Point object.

    b

    The second Point object.

    s

    The scaling value.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

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

    Permalink
    Definition Classes
    AnyRef
  24. def negative(a: Point, out: Point = null): Point

    Permalink

    Creates a negative Point.

    Creates a negative Point.

    a

    The first Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  25. def normalRightHand(a: Point, out: Point = null): Point

    Permalink

    Right-hand normalize (make unit length) a Point.

    Right-hand normalize (make unit length) a Point.

    a

    The Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  26. def normalize(a: Point, out: Point = null): Point

    Permalink

    Normalize (make unit length) a Point.

    Normalize (make unit length) a Point.

    a

    The Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  27. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  29. def parse(obj: Object, xProp: String, yProp: String): Point

    Permalink

    Parses an object for x and/or y properties and returns a new Phaser.Point with matching values.

    Parses an object for x and/or y properties and returns a new Phaser.Point with matching values. If the object doesn't contain those properties a Point with x/y of zero will be returned.

    obj

    The object to parse.

    xProp

    The property used to set the Point.x value.

    yProp

    The property used to set the Point.y value.

    returns

    The new Point object.

  30. def perp(a: Point, out: Point = null): Point

    Permalink

    Return a perpendicular vector (90 degrees rotation)

    Return a perpendicular vector (90 degrees rotation)

    a

    The Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  31. def project(a: Point, b: Point, out: Point = null): Point

    Permalink

    Project two Points onto another Point.

    Project two Points onto another Point.

    a

    The first Point object.

    b

    The second Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  32. def projectUnit(a: Point, b: Point, out: Point = null): Point

    Permalink

    Project two Points onto a Point of unit length.

    Project two Points onto a Point of unit length.

    a

    The first Point object.

    b

    The second Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  33. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  34. def rotate(a: Point, x: Double, y: Double, angle: Boolean, asDegrees: Double, distance: Double): Point

    Permalink

    Rotates a Point object, or any object with exposed x/y properties, around the given coordinates by the angle specified.

    Rotates a Point object, or any object with exposed x/y properties, around the given coordinates by the angle specified. If the angle between the point and coordinates was 45 deg and the angle argument is 45 deg then the resulting angle will be 90 deg, as the angle argument is added to the current angle. The distance allows you to specify a distance constraint for the rotation between the point and the coordinates. If none is given the distance between the two is calculated and used.

    a

    The Point object to rotate.

    x

    The x coordinate of the anchor point

    y

    The y coordinate of the anchor point

    angle

    The angle in radians (unless asDegrees is true) to rotate the Point by.

    asDegrees

    Is the given angle in radians (false) or degrees (true)?

    distance

    An optional distance constraint between the Point and the anchor.

    returns

    The modified point object.

  35. def rperp(a: Point, out: Point = null): Point

    Permalink

    Return a perpendicular vector (-90 degrees rotation)

    Return a perpendicular vector (-90 degrees rotation)

    a

    The Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  36. def subtract(a: Point, b: Point, out: Point = null): Point

    Permalink

    Subtracts the coordinates of two points to create a new point.

    Subtracts the coordinates of two points to create a new point.

    a

    The first Point object.

    b

    The second Point object.

    out

    Optional Point to store the value in, if not supplied a new Point object will be created.

    returns

    The new Point object.

  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. def valueOf(): Any

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. 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