Class Index | File Index

Classes


Class CAAT.Foundation.Scene


Extends CAAT.Foundation.ActorContainer.

Defined in: Scene.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Field Summary
Field Attributes Field Name and Description
<static>  
CAAT.Foundation.Scene.EASE_ROTATION
<static>  
CAAT.Foundation.Scene.EASE_SCALE
<static>  
CAAT.Foundation.Scene.EASE_TRANSLATE
<private>  
Behavior container used uniquely for Scene switching.
<private>  
Array of container behaviour events observer.
<private>  
When Scene switching, this boolean identifies whether the Scene is being brought in, or taken away.
<private>  
is this scene paused ?
<private>  
This scene´s timer manager.
Fields borrowed from class CAAT.Foundation.ActorContainer:
activeChildren, addHint, boundingBox, childrenList, layoutInvalidated, layoutManager, pendingChildrenList, runion
Fields borrowed from class CAAT.Foundation.Actor:
__super, AABB, alpha, backgroundImage, behaviorList, cached, clip, clipPath, dirty, discardable, duration, expired, fillStyle, frameAlpha, gestureEnabled, glEnabled, height, id, inFrame, invalid, isAA, isCachedActor, isGlobalAlpha, lifecycleListenerList, minimumSize, modelViewMatrix, modelViewMatrixI, mouseEnabled, oldX, oldY, parent, pointed, preferredSize, preventLayout, rotationAngle, rotationX, rotationY, scaleAnchor, scaleTX, scaleTY, scaleX, scaleY, size_active, size_total, start_time, strokeStyle, tAnchorX, tAnchorY, time, viewVertices, visible, wdirty, width, worldModelViewMatrix, worldModelViewMatrixI, x, y
Method Summary
Method Attributes Method Name and Description
<private>  
 
This method should be overriden in case the developer wants to do some special actions when the scene has just been brought in.
 
addActorToInputList(actor, index, position)
Add an actor to a given inputList.
 
addBehavior(behaviour)
Overriden method to disallow default behavior.
 
Private.
<private>  
Helper method to manage alpha transparency fading on Scene switch by the Director.
 
createTimer(startTime, duration, callback_timeout, callback_tick, callback_cancel)
 
easeRotation(time, alpha, anchor, interpolator, isIn)
Called from CAAT.Director to use Rotations for taking away or bringing Scenes in.
 
easeRotationIn(time, alpha, anchor, interpolator)
Called from CAAT.Director to use Rotations for bringing in.
 
easeRotationOut(time, alpha, anchor, interpolator)
Called from CAAT.Director to use Rotations for taking Scenes away.
 
easeScale(time, alpha, anchor, interpolator, starttime, isIn)
Called from CAAT.Foundation.Director to bring in ot take away an Scene.
 
easeScaleIn(time, alpha, anchor, interpolator, starttime)
Called from CAAT.Foundation.Director to bring in a Scene.
 
easeScaleOut(time, alpha, anchor, interpolator, starttime)
Called from CAAT.Foundation.Director to take away a Scene.
 
easeTranslation(time, alpha, anchor, isIn, interpolator)
This method will setup Scene behaviours to switch an Scene via a translation.
 
easeTranslationIn(time, alpha, anchor, interpolator)
Called from CAAT.Director to bring in an Scene.
 
easeTranslationOut(time, alpha, anchor, interpolator)
Called from CAAT.Director to bring in an Scene.
 
Remove all elements from an input list.
 
Enable a number of input lists.
 
Find a pointed actor at position point.
 
getIn(out_scene)
 
goOut(in_scene)
 
 
paint(director, time)
An scene by default does not paint anything because has not fillStyle set.
 
remove an actor from a given input list index.
 
setEaseListener(listener)
Registers a listener for listen for transitions events.
 
setExpired(bExpired)
Scenes, do not expire the same way Actors do.
 
setPaused(paused)
 
setTimeout(duration, callback_timeout, callback_tick, callback_cancel)
Methods borrowed from class CAAT.Foundation.ActorContainer:
__paintActor, __validateLayout, __validateTree, addActor, addActorImmediately, addChild, addChildAt, addChildDelayed, addChildImmediately, animate, destroy, drawScreenBoundingBox, emptyChildren, endAnimate, findActorById, findChild, getChildAt, getLayout, getNumActiveChildren, getNumChildren, invalidateLayout, paintActor, paintActorGL, recalcSize, removeChild, removeChildAt, removeFirstChild, removeLastChild, setBounds, setLayout, setZOrder
Methods borrowed from class CAAT.Foundation.Actor:
__scale1To, addAnimation, addListener, cacheAsBitmap, centerAt, centerOn, clean, contains, create, disableDrag, emptyBehaviorList, enableDrag, enableEvents, fireEvent, gestureChange, gestureEnd, gestureStart, getAnchor, getAnchorPercent, getBehavior, getId, getMinimumSize, getPreferredSize, getTextureGLPage, glNeedsFlush, glSetShader, initialize, invalidate, isCached, isGestureEnabled, isInAnimationFrame, isVisible, modelToModel, modelToView, mouseClick, mouseDblClick, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseOut, mouseOver, mouseUp, moveTo, playAnimation, removeBehaviorById, removeBehaviour, removeListener, resetAnimationTime, resetAsButton, resetTransform, rotateTo, scaleTo, scaleXTo, scaleYTo, setAlpha, setAnimationEndCallback, setAnimationImageIndex, setAsButton, setBackgroundImage, setBackgroundImageOffset, setButtonImageIndex, setCachedActor, setChangeFPS, setClip, setDiscardable, setFillStyle, setFrameTime, setGestureEnabled, setGLCoords, setGlobalAlpha, setGlobalAnchor, setId, setImageTransformation, setLocation, setMinimumSize, setModelViewMatrix, setOutOfFrameTime, setPaint, setParent, setPosition, setPositionAnchor, setPositionAnchored, setPreferredSize, setPreventLayout, setRotation, setRotationAnchor, setRotationAnchored, setScale, setScaleAnchor, setScaleAnchored, setScreenBounds, setSize, setSpriteIndex, setStrokeStyle, setUV, setVisible, stopCacheAsBitmap, touchEnd, touchMove, touchStart, viewToModel
Class Detail
CAAT.Foundation.Scene()
Field Detail
<static> CAAT.Foundation.Scene.EASE_ROTATION

<static> CAAT.Foundation.Scene.EASE_SCALE

<static> CAAT.Foundation.Scene.EASE_TRANSLATE

<private> easeContainerBehaviour
Behavior container used uniquely for Scene switching.

<private> easeContainerBehaviourListener
Array of container behaviour events observer.

<private> easeIn
When Scene switching, this boolean identifies whether the Scene is being brought in, or taken away.

<private> paused
is this scene paused ?

<private> timerManager
This scene´s timer manager.
Method Detail
<private> __init()

activated()
This method should be overriden in case the developer wants to do some special actions when the scene has just been brought in.

addActorToInputList(actor, index, position)
Add an actor to a given inputList.
Parameters:
actor
an actor instance
index
the inputList index to add the actor to. This value will be clamped to the number of available lists.
position
the position on the selected inputList to add the actor at. This value will be clamped to the number of available lists.

addBehavior(behaviour)
Overriden method to disallow default behavior. Do not use directly.
Parameters:
behaviour

behaviorExpired(actor)
Private. listener for the Scene's easeContainerBehaviour.
Parameters:
actor

<private> createAlphaBehaviour(time, isIn)
Helper method to manage alpha transparency fading on Scene switch by the Director.
Parameters:
time
{number} time in milliseconds then fading will taableIne.
isIn
{boolean} whether this Scene is being brought in.

createTimer(startTime, duration, callback_timeout, callback_tick, callback_cancel)
Parameters:
startTime
duration
callback_timeout
callback_tick
callback_cancel

easeRotation(time, alpha, anchor, interpolator, isIn)
Called from CAAT.Director to use Rotations for taking away or bringing Scenes in.
Parameters:
time
integer indicating time in milliseconds for the Scene to be taken away or brought in.
alpha
boolean indicating whether fading will be applied to the Scene.
anchor
integer indicating the Scene switch anchor.
interpolator
{CAAT.Interpolator} a CAAT.Interpolator to apply to the Scene transition.
isIn
boolean indicating whehter the Scene is brought in.

easeRotationIn(time, alpha, anchor, interpolator)
Called from CAAT.Director to use Rotations for bringing in. This method is a Helper for the method easeRotation.
Parameters:
time
integer indicating time in milliseconds for the Scene to be brought in.
alpha
boolean indicating whether fading will be applied to the Scene.
anchor
integer indicating the Scene switch anchor.
interpolator
{CAAT.Interpolator} a CAAT.Interpolator to apply to the Scene transition.

easeRotationOut(time, alpha, anchor, interpolator)
Called from CAAT.Director to use Rotations for taking Scenes away. This method is a Helper for the method easeRotation.
Parameters:
time
integer indicating time in milliseconds for the Scene to be taken away.
alpha
boolean indicating whether fading will be applied to the Scene.
anchor
integer indicating the Scene switch anchor.
interpolator
{CAAT.Interpolator} a CAAT.Interpolator to apply to the Scene transition.

easeScale(time, alpha, anchor, interpolator, starttime, isIn)
Called from CAAT.Foundation.Director to bring in ot take away an Scene.
Parameters:
time
{number} time in milliseconds for the Scene to be brought in.
alpha
{boolean} whether fading will be applied to the Scene.
anchor
{number} Scene switch anchor.
interpolator
{CAAT.Behavior.Interpolator} how to apply to the Scene transition.
starttime
{number} scene time milliseconds from which the behavior will be applied.
isIn
boolean indicating whether the Scene is being brought in.

easeScaleIn(time, alpha, anchor, interpolator, starttime)
Called from CAAT.Foundation.Director to bring in a Scene. A helper method for easeScale.
Parameters:
time
{number} time in milliseconds for the Scene to be brought in.
alpha
{boolean} whether fading will be applied to the Scene.
anchor
{number} Scene switch anchor.
interpolator
{CAAT.Behavior.Interpolator} how to apply to the Scene transition.
starttime
{number} scene time milliseconds from which the behavior will be applied.

easeScaleOut(time, alpha, anchor, interpolator, starttime)
Called from CAAT.Foundation.Director to take away a Scene. A helper method for easeScale.
Parameters:
time
{number} time in milliseconds for the Scene to be brought in.
alpha
{boolean} whether fading will be applied to the Scene.
anchor
{number} Scene switch anchor.
interpolator
{CAAT.Behavior.Interpolator} how to apply to the Scene transition.
starttime
{number} scene time milliseconds from which the behavior will be applied.

easeTranslation(time, alpha, anchor, isIn, interpolator)
This method will setup Scene behaviours to switch an Scene via a translation. The anchor value can only be
  • CAAT.Actor.ANCHOR_LEFT
  • CAAT.Actor.ANCHOR_RIGHT
  • CAAT.Actor.ANCHOR_TOP
  • CAAT.Actor.ANCHOR_BOTTOM if any other value is specified, any of the previous ones will be applied.
  • Parameters:
    time
    {number} time in milliseconds for the Scene.
    alpha
    {boolean} whether fading will be applied to the Scene.
    anchor
    {numnber} Scene switch anchor.
    isIn
    {boolean} whether the scene will be brought in.
    interpolator
    {CAAT.Behavior.Interpolator} how to apply to the Scene transition.

    easeTranslationIn(time, alpha, anchor, interpolator)
    Called from CAAT.Director to bring in an Scene. A helper method for easeTranslation.
    Parameters:
    time
    {number} time in milliseconds for the Scene to be brought in.
    alpha
    {boolean} whether fading will be applied to the Scene.
    anchor
    {number} Scene switch anchor.
    interpolator
    {CAAT.Behavior.Interpolator} how to apply to the Scene transition.

    easeTranslationOut(time, alpha, anchor, interpolator)
    Called from CAAT.Director to bring in an Scene. A helper method for easeTranslation.
    Parameters:
    time
    {number} time in milliseconds for the Scene to be taken away.
    alpha
    {boolean} fading will be applied to the Scene.
    anchor
    {number} Scene switch anchor.
    interpolator
    {CAAT.Behavior.Interpolator} how to apply to the Scene transition.

    emptyInputList(index)
    Remove all elements from an input list.
    Parameters:
    index
    the inputList index to add the actor to. This value will be clamped to the number of available lists so take care when emptying a non existant inputList index since you could end up emptying an undesired input list.

    enableInputList(size)
    Enable a number of input lists. These lists are set in case the developer doesn't want the to traverse the scene graph to find the pointed actor. The lists are a shortcut whete the developer can set what actors to look for input at first instance. The system will traverse the whole lists in order trying to find a pointed actor. Elements are added to each list either in head or tail.
    Parameters:
    size
    number of lists.

    findActorAtPosition(point)
    Find a pointed actor at position point. This method tries lo find the correctly pointed actor in two different ways. + first of all, if inputList is defined, it will look for an actor in it. + if no inputList is defined, it will traverse the scene graph trying to find a pointed actor.
    Parameters:
    point

    getIn(out_scene)
    Parameters:
    out_scene

    goOut(in_scene)
    Parameters:
    in_scene

    isPaused()

    paint(director, time)
    An scene by default does not paint anything because has not fillStyle set.
    Parameters:
    director
    time

    removeActorFromInputList(actor, index)
    remove an actor from a given input list index. If no index is supplied, the actor will be removed from every input list.
    Parameters:
    actor
    index
    an optional input list index. This value will be clamped to the number of available lists.

    setEaseListener(listener)
    Registers a listener for listen for transitions events. Al least, the Director registers himself as Scene easing transition listener. When the transition is done, it restores the Scene's capability of receiving events.
    Parameters:
    listener
    {function(caat_behavior,time,actor)} an object which contains a method of the form behaviorExpired( caat_behaviour, time, actor);

    setExpired(bExpired)
    Scenes, do not expire the same way Actors do. It simply will be set expired=true, but the frameTime won't be modified.
    Parameters:
    bExpired

    setPaused(paused)
    Parameters:
    paused

    setTimeout(duration, callback_timeout, callback_tick, callback_cancel)
    Parameters:
    duration
    callback_timeout
    callback_tick
    callback_cancel

    Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 01 2013 04:59:18 GMT-0700 (PDT)