Members
- 
    acceleration :Vector
- 
    
    Camera acceleration speed. Type:
- 
    anchor :Vector
- 
    
    Anchor of the camera Type:
- 
    container :Container
- 
    
    Container that the camera is added to. Type:- Container
 
- 
    game :Game
- 
    
    Reference of the game added to. Type:
- 
    isShaking :boolean
- 
    
    Whether the camera is currently shaking Type:- boolean
 
- 
    maxSpeed :number
- 
    
    Camera maximum move speed. Type:- number
 
- 
    maxX :null|number
- 
    
    Camera position limit (right) Type:- null | number
 
- 
    maxY :null|number
- 
    
    Camera position limit (down) Type:- null | number
 
- 
    minX :null|number
- 
    
    Camera position limit (left) Type:- null | number
 
- 
    minY :null|number
- 
    
    Camera position limit (up) Type:- null | number
 
- 
    position :Vector
- 
    
    Camera position. Type:
- 
    rotation :number
- 
    
    Rotation of the camera. Type:- number
 
- 
    rounding :boolean
- 
    
    Use rounding on container position. Type:- boolean
 
- 
    sensor :Object
- 
    
    Sensor box Type:- Object
 
- 
    speed :Vector
- 
    
    Current speed of camera. Type:
- 
    target :Sprite
- 
    
    The Sprite this camera follows. Type:
- 
    threshold :number
- 
    
    
        Type:- number
 
- 
    zoom :Vector
- 
    
    Camera zoom. 
 (2, 2) => 2x
 (0.5, 0.5) => 0.5xType:
Methods
- 
    addTo(game, container)
- 
    
    Add camera to container. Parameters:Name Type Description gameGame Which game to add to containerContainer Which container to add to Returns:This for chaining - Type
- Camera
 
- 
    remove()
- 
    
    Remove camera from parent container. 
- 
    setPosition(x, y)
- 
    
    Set position of the camera Parameters:Name Type Description xNumber X coordinate yNumber Y coordinate 
- 
    setTarget(target, lerp)
- 
    
    Set target of camera. Parameters:Name Type Description targetDisplayObject The object to follow lerpBoolean Whether lerp to target instead of reseting camera position 
- 
    shake(force, duration, count, forward)
- 
    
    Shake camera Parameters:Name Type Description forceVector | Number Max shake distance in pixel durationNumber How long will the camera shake countNumber How many times will the camera shake forwardBoolean ONLY shake forward or not 
- 
    <protected> update(dt, delta)
- 
    
    Update method Parameters:Name Type Description dtNumber Delta time in millisecond deltaNumber Delta time in second