Module: Context

The Context Module acts as a configuration and state manager and core file
Source:

Members

(inner) coords :object

A repository of coordinates.
Type:
  • object
Properties:
Name Type Description
target Vector3 Initial position of the subject used as target for orbit controls.
cam_offset Vector3 Initial camera position.
sbc_offset_jump Vector3 "Jump" height for case animations.
mainmenuitem_the_rspb5 Vector3 Menu item target: the raspberry pi 5 section.
mainmenuitem_choose_a_case Vector3 Menu item target: choose a case section.
mainmenuitem_choose_a_setting Vector3 Menu item target: choose a setting section.
mainmenuitem_get_the_dash Vector3 Menu item target: get the dashboard section.
OrbitControls Vector3 Default main menu "all items off" position.
Source:

(inner) get :object

get object is read writeable, but by convention we only use setter methods or static declarations.
Type:
  • object
Properties:
Name Type Description
config object Assorted configuration values.
Properties
Name Type Description
controlsMinDistance float Minimum distance from control's interest.
controlsMaxDistance float Maximum distance from control's interest.
controlsMaxPolarAngle float Maximum relative angle to target.
controlsOrbitScalar float A value used to amplify the camera position as a distance to target.
cameraFov number Amplitude of the camera's viewing angle.
cameraRatio number Calculated value of window height over window width.
cameraNearFrustum float Camera near clipping
cameraFarFrustum float Camera far clipping
scenesAllowed array List of 'sea', 'grassland', 'snow','icosphere'
sceneDefaultStage string The stage that will be presented on load.
sceneCurrentStage string The current stage, used to prevent stacking animations for the same scene.
sceneCurrentCase string The current case, used to prevent stacking animations for the case.
animStack array The animations stack/queue array.
tweenStack array The animations stack/queue array.
currentAnimation string The animations stack/queue array.
tweenCurrentAnimation string The current running animation.
sceneCurrentAnimation string The current running scene transition.
subject string The known center of atention of the scene.
transitionTarget string A location in space used to place the subject and control targets during scene transitions.
skydomeTexturesDefaultDir string The default dir to look for skydome textures.
skydome string A collection of equirectangular textures that can be used for sky and environment maps.
Source:

Methods

(static) add(refObj)

Add a properly formated object to the get context Object state
Parameters:
Name Type Description
refObj namedReference
Source:

(static) getByName(name) → {Object|false}

Parameters:
Name Type Description
name string The name of a stored Object.
Deprecated:
  • causes loss of linkage in deep objects.
Source:
Returns:
Type
Object | false

Type Definitions

namedReference

Type:
  • Object
Properties:
Name Type Description
name string The object's desired name for storage.
obj Object Link by reference to an instanced object.
Source: