Packageorg.flintparticles.threeD.renderers.controllers
Classpublic class KeyboardControllerBase
InheritanceKeyboardControllerBase Inheritance Object
Implements CameraController
Subclasses FirstPersonCamera, KeyboardControllerMxml, OrbitCamera

Base class for keyboard based camera controllers. Tracks the keyboard state for camera controllers.



Public Properties
 PropertyDefined By
  autoStart : Boolean = true
KeyboardControllerBase
  camera : Camera
The camera to control with this controller.
KeyboardControllerBase
  fixedFrameTime : Number
Indicates a fixed time (in seconds) to use for every frame.
KeyboardControllerBase
  maximumFrameTime : Number
The maximum duration for a single update frame, in seconds.
KeyboardControllerBase
  stage : DisplayObject
The stage - used for listening to keyboard events
KeyboardControllerBase
  useInternalTick : Boolean
Indicates whether the controller should manage its own internal update tick.
KeyboardControllerBase
Protected Properties
 PropertyDefined By
  aDown : Boolean = false
KeyboardControllerBase
  _camera : Camera
KeyboardControllerBase
  dDown : Boolean = false
KeyboardControllerBase
  downDown : Boolean = false
KeyboardControllerBase
  _fixedFrameTime : Number = 0
KeyboardControllerBase
  leftDown : Boolean = false
KeyboardControllerBase
  _maximumFrameTime : Number = 0.5
KeyboardControllerBase
  pgDownDown : Boolean = false
KeyboardControllerBase
  pgUpDown : Boolean = false
KeyboardControllerBase
  rightDown : Boolean = false
KeyboardControllerBase
  _running : Boolean = false
KeyboardControllerBase
  sDown : Boolean = false
KeyboardControllerBase
  _stage : DisplayObject
KeyboardControllerBase
  upDown : Boolean = false
KeyboardControllerBase
  _useInternalTick : Boolean = true
KeyboardControllerBase
  wDown : Boolean = false
KeyboardControllerBase
Public Methods
 MethodDefined By
  
The constructor creates an OrbitCamera controller.
KeyboardControllerBase
  
start():void
Starts the controller.
KeyboardControllerBase
  
stop():void
Stops the controller.
KeyboardControllerBase
  
update(time:Number):void
KeyboardControllerBase
Protected Methods
 MethodDefined By
  
updateCamera(time:Number):void
KeyboardControllerBase
Property Detail
_cameraproperty
protected var _camera:Camera

_fixedFrameTimeproperty 
protected var _fixedFrameTime:Number = 0

_maximumFrameTimeproperty 
protected var _maximumFrameTime:Number = 0.5

_runningproperty 
protected var _running:Boolean = false

_stageproperty 
protected var _stage:DisplayObject

_useInternalTickproperty 
protected var _useInternalTick:Boolean = true

aDownproperty 
protected var aDown:Boolean = false

autoStartproperty 
public var autoStart:Boolean = true

cameraproperty 
camera:Camera

The camera to control with this controller.


Implementation
    public function get camera():Camera
    public function set camera(value:Camera):void
dDownproperty 
protected var dDown:Boolean = false

downDownproperty 
protected var downDown:Boolean = false

fixedFrameTimeproperty 
fixedFrameTime:Number

Indicates a fixed time (in seconds) to use for every frame. Setting this property causes the controller to bypass its frame timing functionality and use the given time for every frame. This enables the particle system to be frame based rather than time based.

To return to time based animation, set this value to zero (the default).

This feature only works if useInternalTick is true (the default).


Implementation
    public function get fixedFrameTime():Number
    public function set fixedFrameTime(value:Number):void

See also

leftDownproperty 
protected var leftDown:Boolean = false

maximumFrameTimeproperty 
maximumFrameTime:Number

The maximum duration for a single update frame, in seconds.

Under some circumstances related to the Flash player (e.g. on MacOSX, when the user right-clicks on the flash movie) the flash movie will freeze for a period. When the freeze ends, the current frame of the particle system will be calculated as the time since the previous frame, which encompases the duration of the freeze. This could cause the system to generate a single frame update that compensates for a long period of time and hence moves the particles an unexpected long distance in one go. The result is usually visually unacceptable and certainly unexpected.

This property sets a maximum duration for a frame such that any frames longer than this duration are ignored. The default value is 0.5 seconds. Developers don't usually need to change this from the default value.


Implementation
    public function get maximumFrameTime():Number
    public function set maximumFrameTime(value:Number):void
pgDownDownproperty 
protected var pgDownDown:Boolean = false

pgUpDownproperty 
protected var pgUpDown:Boolean = false

rightDownproperty 
protected var rightDown:Boolean = false

sDownproperty 
protected var sDown:Boolean = false

stageproperty 
stage:DisplayObject

The stage - used for listening to keyboard events


Implementation
    public function get stage():DisplayObject
    public function set stage(value:DisplayObject):void
upDownproperty 
protected var upDown:Boolean = false

useInternalTickproperty 
useInternalTick:Boolean

Indicates whether the controller should manage its own internal update tick. The internal update tick is tied to the frame rate and updates the particle system every frame.

If users choose not to use the internal tick, they have to call the controller's update method with the appropriate time parameter every time they want the controller to update the camera.


Implementation
    public function get useInternalTick():Boolean
    public function set useInternalTick(value:Boolean):void
wDownproperty 
protected var wDown:Boolean = false

Constructor Detail
KeyboardControllerBase()Constructor
public function KeyboardControllerBase()

The constructor creates an OrbitCamera controller.

Method Detail
start()method
public function start():void

Starts the controller.

stop()method 
public function stop():void

Stops the controller.

update()method 
public function update(time:Number):void

Parameters

time:Number

updateCamera()method 
protected function updateCamera(time:Number):void

Parameters

time:Number