| Package | org.ffilmation.engine.interfaces |
| Interface | public interface fEngineRenderEngine |
| Method | Defined by | ||
|---|---|---|---|
|
fEngineRenderEngine(scene:fScene, container:Sprite)
Class constructor
| fEngineRenderEngine | ||
|
disableElement(element:fRenderableElement):void
This method disables mouse events for an element
| fEngineRenderEngine | ||
|
dispose():void
Frees all allocated resources.
| fEngineRenderEngine | ||
|
enableElement(element:fRenderableElement):void
This method enables mouse events for an element
| fEngineRenderEngine | ||
|
getAssetFor(element:fRenderableElement):MovieClip
This method returns the asset from the library that was used to display the element.
| fEngineRenderEngine | ||
|
hideElement(element:fRenderableElement):void
This method renders an element invisible
| fEngineRenderEngine | ||
|
initialize():void
This method is called when the scene is to be displayed.
| fEngineRenderEngine | ||
|
This method initializes the render engine for an element in the scene.
| fEngineRenderEngine | ||
|
When a moving light reaches an element, this method is executed
| fEngineRenderEngine | ||
|
When a moving light moves out of an element, this method is executed
| fEngineRenderEngine | ||
|
When a light is to be reset ( new size )
| fEngineRenderEngine | ||
|
When an element is removed or hidden, or moves out of another element's range, its shadows need to be removed too
| fEngineRenderEngine | ||
|
Rendering occurs in two ways: a light changes or an element changes. | fEngineRenderEngine | ||
|
Rendering occurs in two ways: a light changes or an element changes. | fEngineRenderEngine | ||
|
Rendering occurs in two ways: a light changes or an element changes. | fEngineRenderEngine | ||
|
Rendering occurs in two ways: a light changes or an element changes. | fEngineRenderEngine | ||
|
resetShadows():void
When the quality settings for the engine's shadows are changed, this method is called so old shadows are removed.
| fEngineRenderEngine | ||
|
setCameraPosition(camera:fCamera):void
Updates the render to show a given camera's position
| fEngineRenderEngine | ||
|
setViewportSize(width:Number, height:Number):void
Updates the viewport size.
| fEngineRenderEngine | ||
|
showElement(element:fRenderableElement):void
This method renders an element visible
| fEngineRenderEngine | ||
|
Starts acclusion related to one character
| fEngineRenderEngine | ||
|
Stops acclusion related to one character
| fEngineRenderEngine | ||
|
stopRenderFor(element:fRenderableElement):void
This method removes an element from the render engine
| fEngineRenderEngine | ||
|
translateStageCoordsToElements(x:Number, y:Number):Array
This method returns the element under a Stage coordinate, and a 3D translation of the 2D coordinates passed as input.
| fEngineRenderEngine | ||
|
updateBulletPosition(bullet:fBullet):void
This method updates the position of a bullet's sprite
| fEngineRenderEngine | ||
|
updateCharacterPosition(char:fCharacter):void
This method updates the position of a character's sprite
| fEngineRenderEngine | ||
|
Updates acclusion related to one character
| fEngineRenderEngine | ||
|
Rendering occurs in two ways: a light changes or an element changes. | fEngineRenderEngine | ||
| disableElement | () | method |
public function disableElement(element:fRenderableElement):voidThis method disables mouse events for an element
Parameterselement:fRenderableElement — The element we want to hide
|
| dispose | () | method |
public function dispose():voidFrees all allocated resources. This is called when the scene is hidden or destroyed.
| enableElement | () | method |
public function enableElement(element:fRenderableElement):voidThis method enables mouse events for an element
Parameterselement:fRenderableElement — The element we want to show
|
| getAssetFor | () | method |
public function getAssetFor(element:fRenderableElement):MovieClipThis method returns the asset from the library that was used to display the element. It gets written as the "flashClip" property of the element.
Parameterselement:fRenderableElement — The element for which we want the asset
|
MovieClip — The flashClip that represents the element. It is not the same as the container. The flashClip is nested somewhere inside the container
|
See also
| hideElement | () | method |
public function hideElement(element:fRenderableElement):voidThis method renders an element invisible
Parameterselement:fRenderableElement — The element we want to hide
|
| initialize | () | method |
public function initialize():voidThis method is called when the scene is to be displayed.
| initRenderFor | () | method |
public function initRenderFor(element:fRenderableElement):fElementContainerThis method initializes the render engine for an element in the scene.
Parameterselement:fRenderableElement — The element we want to initialize
|
fElementContainer —
The container where the render for the element is displayed. This gets written as the "container" property of the element.
|
See also
| lightIn | () | method |
public function lightIn(element:fRenderableElement, light:fOmniLight):voidWhen a moving light reaches an element, this method is executed
Parameterselement:fRenderableElement — The element that has become affected by the light
|
|
light:fOmniLight — The light that we are rendering upon this element
|
| lightOut | () | method |
public function lightOut(element:fRenderableElement, light:fOmniLight):voidWhen a moving light moves out of an element, this method is executed
Parameterselement:fRenderableElement — The element that is no longer affected by the light
|
|
light:fOmniLight — The light
|
| lightReset | () | method |
public function lightReset(element:fRenderableElement, light:fOmniLight):voidWhen a light is to be reset ( new size )
Parameterselement:fRenderableElement — The element
|
|
light:fOmniLight — The light
|
| removeShadow | () | method |
public function removeShadow(element:fRenderableElement, light:fOmniLight, shadow:fRenderableElement):voidWhen an element is removed or hidden, or moves out of another element's range, its shadows need to be removed too
Parameterselement:fRenderableElement — The element to be updated
|
|
light:fOmniLight — The light that we are rendering upon this element
|
|
shadow:fRenderableElement — The element whose shadow is to be removed
|
| renderFinish | () | method |
public function renderFinish(element:fRenderableElement, light:fOmniLight):void
Rendering occurs in two ways: a light changes or an element changes. When a light changes this happens:
This is the renderFinish call.
Parameterselement:fRenderableElement — The element we are rendering
|
|
light:fOmniLight — The light that we are rendering upon this element
|
| renderLight | () | method |
public function renderLight(element:fRenderableElement, light:fOmniLight):void
Rendering occurs in two ways: a light changes or an element changes. When a light changes this happens:
This is the renderLight call.
Parameterselement:fRenderableElement — The element we are rendering
|
|
light:fOmniLight — The light that we are rendering upon this element
|
| renderShadow | () | method |
public function renderShadow(element:fRenderableElement, light:fOmniLight, shadow:fRenderableElement):void
Rendering occurs in two ways: a light changes or an element changes. When a light changes this happens:
This is the renderShadow call.
Parameterselement:fRenderableElement — The element we are rendering
|
|
light:fOmniLight — The light that we are rendering upon this element
|
|
shadow:fRenderableElement — The element whose shadow we are drawing
|
| renderStart | () | method |
public function renderStart(element:fRenderableElement, light:fOmniLight):void
Rendering occurs in two ways: a light changes or an element changes. When a light changes this happens:
This is the renderStart call.
Parameterselement:fRenderableElement — The element in the scene we want to start rendering
|
|
light:fOmniLight — The light that we are rendering upon this element
|
| resetShadows | () | method |
public function resetShadows():voidWhen the quality settings for the engine's shadows are changed, this method is called so old shadows are removed. There is no need for the renderer to redraw all shadows in this method: The engine rerenders the whole scene after this has been executed.
| setCameraPosition | () | method |
public function setCameraPosition(camera:fCamera):voidUpdates the render to show a given camera's position
Parameterscamera:fCamera |
| setViewportSize | () | method |
public function setViewportSize(width:Number, height:Number):voidUpdates the viewport size. This call will be immediately followed by a setCameraPosition call
Parameterswidth:Number |
|
height:Number |
See also
| showElement | () | method |
public function showElement(element:fRenderableElement):voidThis method renders an element visible
Parameterselement:fRenderableElement — The element we want to show
|
| startOcclusion | () | method |
public function startOcclusion(element:fRenderableElement, character:fCharacter):voidStarts acclusion related to one character
Parameterselement:fRenderableElement — Element where occlusion is applied
|
|
character:fCharacter — Character causing the occlusion
|
| stopOcclusion | () | method |
public function stopOcclusion(element:fRenderableElement, character:fCharacter):voidStops acclusion related to one character
Parameterselement:fRenderableElement — Element where occlusion is applied
|
|
character:fCharacter — Character causing the occlusion
|
| stopRenderFor | () | method |
public function stopRenderFor(element:fRenderableElement):voidThis method removes an element from the render engine
Parameterselement:fRenderableElement — The element we want to remove
|
See also
| translateStageCoordsToElements | () | method |
public function translateStageCoordsToElements(x:Number, y:Number):ArrayThis method returns the element under a Stage coordinate, and a 3D translation of the 2D coordinates passed as input. To achieve this it finds which visible elements are under the input pixel, ignoring the engine's internal coordinates. Now you can find out what did you click and which point of that element did you click.
Parametersx:Number — Stage horizontal coordinate
|
|
y:Number — Stage vertical coordinate
|
Array — An array of objects storing both the element under that point and a 3d coordinate corresponding to the 2d Point. This method returns null
if the coordinate is not occupied by any element.
Why an Array an not a single element ? Because you may want to search the Array for the element that better suits your intentions: for
example if you use it to walk around the scene, you will want to ignore trees to reach the floor behind. If you are shooting
people, you will want to ignore floors and look for objects and characters to target at.
|
See also
| updateBulletPosition | () | method |
public function updateBulletPosition(bullet:fBullet):voidThis method updates the position of a bullet's sprite
Parametersbullet:fBullet — The bullet that needs to be moved
|
| updateCharacterPosition | () | method |
public function updateCharacterPosition(char:fCharacter):voidThis method updates the position of a character's sprite
Parameterschar:fCharacter — The character that needs to be moved
|
| updateOcclusion | () | method |
public function updateOcclusion(element:fRenderableElement, character:fCharacter):voidUpdates acclusion related to one character
Parameterselement:fRenderableElement — Element where occlusion is applied
|
|
character:fCharacter — Character causing the occlusion
|
| updateShadow | () | method |
public function updateShadow(element:fRenderableElement, light:fOmniLight, shadow:fRenderableElement):void
Rendering occurs in two ways: a light changes or an element changes. When an element changes this happens:
This is the updateShadow call.
Parameterselement:fRenderableElement — The element to be updated
|
|
light:fOmniLight — The light that we are rendering upon this element
|
|
shadow:fRenderableElement — The element whose shadow is to be updated
|