Handlers is the core event router for interactivity.
The handlers module implements the manners in which we want to resposnd to user and system events.
The handlers module implements the manners in which we want to resposnd to user and system events.
- Source:
- To Do:
-
- Confirm naming convention of object definitions and scopes.
Members
(private, static) context
The Context constant provides a neutral scope to use as part of the state handling tasks. see module:Context
- Source:
Methods
(static) SectionTween(target_id)
The Section Tween generates camera movement that does not interfere with the scene.
Section tweens
Section tweens
Parameters:
| Name | Type | Description |
|---|---|---|
target_id |
string | A convention of a given coordinates entry, see module:Context. |
- Source:
Returns:
void
(static) caseCharAnim(anim)
The case Char(acter) Anim(ation) handles an individual object state within context parameters,
using them to process logic for the animation requirement.
Parameters:
| Name | Type | Description |
|---|---|---|
anim |
string | A pre-established case animation. |
- Source:
Returns:
void
(static) changeSky(tex_)
Change Sky manipulates the texture of the skybox mesh.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
tex_ |
string | blender_1.jpg | A texture file name available in the default textures folder. |
- Source:
(private, static) checkAnimationIsExtended(spawnAnim)
Check if an animation has been rolled out to its extended position for a given prop.
Parameters:
| Name | Type | Description |
|---|---|---|
spawnAnim |
string | String that contains the name of a prop animation. |
- Source:
Returns:
void
(static) featureAnim(feature)
Feature Anim received a desired animation set to follow which is defined in its switch.
This feature is then built up of tweens and animations.
Parameters:
| Name | Type | Description |
|---|---|---|
feature |
string | A convention of a given feature. |
- Source:
Returns:
void
(static) getStarterView()
Console based tool that gives out re usable local coordinates for posing the camera.
- Source:
(static) iddleAnim()
Simple timeout manager, articulates the camera and starts auto rotate mode after a set period of time.
- Source:
(static) onColorTweenColor(color)
Response to the color-picker event. The function destructs the color and transfors it from 0-255 to 0-1 range per channel.
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
color |
object | A convention of a given color coordinate.
Properties
|
- Source:
Returns:
void
(static) onControlsEnd(e)
Receive the event from Orbit Controls when user starts interaction.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
object | Event object. |
- Source:
Listens to Events:
- event:end
(static) onControlsStart(e)
Receive the event from Orbit Controls when user starts interaction.
Parameters:
| Name | Type | Description |
|---|---|---|
e |
object |
- Source:
Listens to Events:
- event:start
(static) onMixerFinished(e)
Handler Animation clip finished event
Parameters:
| Name | Type | Description |
|---|---|---|
e |
object | Event object |
- Source:
(static) onMixerLoop(e)
Handler Animation clip loop event
Parameters:
| Name | Type | Description |
|---|---|---|
e |
object | Event object. |
- Source:
Listens to Events:
- event:loop
(static) onWindowResize()
Handler renderer reflog on window resize.
- Source:
Listens to Events:
- event:resize
(static) sceneStageAnim(stage)
The Scene Stage Anim(ation) function takes care of orchestrating the transition between scenes.
Scenes are described as Context entries that are scanned for "props".
Parameters:
| Name | Type | Description |
|---|---|---|
stage |
string | The name of a scene already existing as a record in the context environment. |
- Source:
Returns:
void
(private, static) sceneStageAnim_getCurrentStage(stage) → {array}
Fetches all props from all stages if no stage is defined
Parameters:
| Name | Type | Description |
|---|---|---|
stage |
string | The currently enabled stage. |
- Source:
Returns:
an array of prop pointers.
- Type
- array
(private, static) sceneStageAnim_getNextStage(stage) → {object}
Looks up the required props to instantiate the scene by the provided stage string.
Parameters:
| Name | Type | Description |
|---|---|---|
stage |
string | The name of a pre existing stage from the context config object. |
- Source:
Returns:
An object containing an array of prop names and a vector of the subject target for this scene.
- Type
- object
(private, static) sceneStageAnim_setTarget(coords)
Set Target is a private sub routine meant to place the camera rig and controls center of action along with the subject to a new position.
Parameters:
| Name | Type | Description |
|---|---|---|
coords |
THREE.Vector3 | A final destination for the target and subject. |
- Source:
(static) simpleAnim(anim)
Simple Anim executes parametrized animation strips or the content of a callback.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
anim |
string | function | false | An animation clip string to play, or a callback function. |
- Source:
(static) simpleTween(target, vector, speed, callback)
Simple Tween takes the movement, timing, and objective parameters to create TWEEN slerped animations, it can implement a callback as part of the tween on complete event.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
target |
object | Reference to a Scene instantiated 3D object tweenable property | |
vector |
THREE.Vector3 | THREE.color | The amount to tween, expressed in either color or Vector3 | |
speed |
number | 700 | Time in milliseconds to spend animating |
callback |
function | null | Callback code to be executed on completion. |
- Source: