Packagecom.asterisq.constellation.behaviors
Classpublic class VelocityLimitBehavior
InheritanceVelocityLimitBehavior Inheritance Behavior Inheritance flash.events.EventDispatcher

Behavior for limiting node renderer velocity.



Public Properties
 PropertyDefined by
 Inheritedconstellation : IConstellation
The constellation instance this behavior belongs to.
Behavior
 Inheritedenabled : Boolean
Indicates whether this behavior is currently enabled.
Behavior
 InheritednodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
Behavior
  velocityLimit : Number
The maximum allowed node renderer velocity.
VelocityLimitBehavior
Public Methods
 MethodDefined by
  
VelocityLimitBehavior(n:Number = 3)
Creates a new velocity limit behavior.
VelocityLimitBehavior
 Inherited
Indicates whether this class affects node renderers' acceleration.
Behavior
 Inherited
Determines whether this behavior affects the given node renderer.
Behavior
 Inherited
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
Behavior
  
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
VelocityLimitBehavior
 Inherited
fromXML(elem:XML):Behavior
[static] Creates an IBehavior instance and initializes it with the given XML data.
Behavior
 Inherited
stepEnd():void
Method called at the end of a step.
Behavior
 Inherited
stepStart():void
Method called at the beginning of a step.
Behavior
 Inherited
Modifies the given node renderer's acceleration.
Behavior
 Inherited
Modifies the given node renderer's position.
Behavior
  
Modifies the given node renderer's velocity.
VelocityLimitBehavior
Protected Methods
 MethodDefined by
  
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
VelocityLimitBehavior
Property detail
velocityLimitproperty
velocityLimit:Number  [read-write]

The maximum allowed node renderer velocity.

Implementation
    public function get velocityLimit():Number
    public function set velocityLimit(value:Number):void
Constructor detail
VelocityLimitBehavior()constructor
public function VelocityLimitBehavior(n:Number = 3)

Creates a new velocity limit behavior.

Parameters
n:Number (default = 3)
Method detail
affectsVelocity()method
public override function affectsVelocity():Boolean

Indicates whether this class affects node renderers' velocity. This function must return true if this behavior affects velocity.

Returns
Boolean
loadValuesFromXML()method 
protected override function loadValuesFromXML(behaviorElem:XML):void

Updates this behavior with values from the given XML element. This method should be overridden to update this Behavior.

Parameters
behaviorElem:XML
updateVelocity()method 
public override function updateVelocity(nodeRenderer:INodeRenderer):INodeRenderer

Modifies the given node renderer's velocity. This method will never be called if affectsVelocity() doesn't return true. This method should be overridden to affect the given node renderer's velocity.

Parameters
nodeRenderer:INodeRenderer

Returns
INodeRenderer