Developer   API   Game Development   Particle System   Vector

  •  Config(0)
  •  Properties(4)
  •  Methods(13)
  •  Events(0)

Vector : BaseClass

Vector class defines attributes of vector.

Properties

  • defaults : Object
    Sets default controls options.
  • getMagnitude() : Float
    Get Magnitude of the vector
  • options : Object
    Position of navigation bar.
  • this
    Construct of the object calls following method in order.

Methods

  • add(vector) : Vector
    Add vector coordinates to current vector.
  • afterInitControls
    Method is executed after init controls.
  • beforeInitControls
    Method is executed before init controls.
  • copy() : Vector
    Create copy of the current vector.
  • fromAngle(angle, magnitude) : Vector
    Create new vector basd on an angle and a magnitude.
  • getAngle() : Float
    Return vector angle.
  • getAngleDegrees() : Float
    Return vector angle degree
  • init()
    Init instance.
  • jitter(jitterAmount) : Vector
    Create new vector based on jitter amount.
  • multiply(scaleFactor)
    Multyply vector coordinates by scaleFactor.
  • undefined(k,v)
    Special property executed when priperty is undefined. It can be that JSON format is in format "key" : "value". Key is an string, so if this is the case methot return "value". Ass well as k is a regular property of the class it returns getter of this property.
  • vectorTo(vector) : Vector
    Create new vector based on vector passed as parameter.
  • withinBounds(point, size) : Boolean
    Calculate if point with size is in vector bounds.