Class: CameraShake

rune.camera.CameraShake()

The CameraShake class represents a subsystem for applying a shake effect to camera objects.

Constructor

new CameraShake()

Creates a new instance of CameraShake.
Source:

Members

(readonly) x :number

Current offset in the x axis.
Type:
  • number
Source:

(readonly) y :number

Current offset in the y axis.
Type:
  • number
Source:

Methods

start(duration, ammountXopt, ammountYopt, easingopt, callbackopt, scopeopt) → {undefined}

Activates the shake effect according to specified parameters.
Parameters:
Name Type Attributes Default Description
duration number Shake duration (in milliseconds).
ammountX number <optional>
5 Shake offset in x axis.
ammountY number <optional>
5 Shake offset in y axis.
easing boolean <optional>
false Shake easing.
callback function <optional>
Callback function.
scope Object <optional>
Scope of execution.
Source:
Returns:
Type
undefined

stop(triggerCallbackopt) → {undefined}

Stops ongoing effect.
Parameters:
Name Type Attributes Default Description
triggerCallback boolean <optional>
false If the callback is to be activated.
Source:
Returns:
Type
undefined