Options

Stores states that determine GermaniumWeb behaviour, such as the background color.

You should not instantiate the Options class using the JavaScript keyword ‘new’.  Instead, use the function WebControl.GetOptions to get a handle to the Options.

Since

Version 0.0.10

See also

WebControl.GetOptions

Summary
Options Stores states that determine GermaniumWeb behaviour, such as the background color.
Background color
GetBackgroundColor Gets the solid Color of the background.
GetBackgroundColorWebRGB Gets the solid color of the background as a web color RGB hex triplet, without the prefix ‘#’.
GetBackgroundColorWebRGBA Gets the solid color of the background as a web color RGBA hex quartet, without the prefix ‘#’.
SetBackgroundColor Sets the solid Color of the background.
Skybox
SetUseSkybox Sets the value of the UseSkybox flag.
GetUseSkybox Gets the value of the UseSkybox flag.
Eye controls
SetEyeControlsVisible Sets the visibility of the Eye controls.
GetEyeControlsVisible Gets whether or not Eye controls are currently visible.
Grid settings
GetGridVisibility Gets the visibility of the grid.
SetGridVisibility Sets the visibility of the grid.
SetGridHeight Sets the height of grid.
GetGridHeight Gets the height of grid.
Disabled Navigation settings Enforced when Navigation mode is Germanium.Navigation.Disabled.
GetNoNavigationCursorEnabled Gets whether the cursor shows a disabled icon when a mouse button is pressed.
SetNoNavigationCursorEnabled Sets whether the cursor shows a disabled icon when a mouse button is pressed.
Orbit Navigation settings Enforced when Navigation mode is Germanium.Navigation.Orbit.
GetOrbitMaxTargetDistance Gets the maximum limit of target distance in meters.
SetOrbitMaxTargetDistance Sets the maximum limit of target distance in meters.
GetOrbitMinTilt Gets the minimum tilt angle of the Eye in radians.
SetOrbitMinTilt Sets the minimum tilt angle of the Eye in radians.
GetOrbitMaxTilt Gets the maximum tilt angle of the Eye in radians.
SetOrbitMaxTilt Sets the maximum tilt angle of the Eye in radians.
First Person Navigation settings Enforced when Navigation mode is Germanium.Navigation.FirstPerson.
GetFirstPersonEyeHeight Gets the distance from the user’s eye to the floor.
SetFirstPersonEyeHeight Sets the distance from the user’s eye to the floor.
GetFirstPersonFloorHeight Gets the distance from the user’s floor height (that is, his ‘feet’) to the ground.
SetFirstPersonFloorHeight Sets the distance from the user’s floor height (that is, his ‘feet’) to the ground.
Animated fading Enables/disables animated fading.
IsAnimatedFadingEnabled Returns true if the end-user enabled animated fading.
Auto-rotation settings Applicable for Eye.Auto-rotation property .
GetAutoRotationDirection Gets the direction of auto-rotation.
SetAutoRotationDirection Sets the direction of auto-rotation.
GetAutoRotationPeriod Gets the time (in seconds) it takes to complete one revolution.
SetAutoRotationPeriod Sets the time (in seconds) it takes to complete one revolution.
GetAutoRotationCancellable Gets if the user can cancel auto-rotation by pressing the Esc key.
SetAutoRotationCancellable Sets if the user can cancel auto-rotation by pressing the Esc key.

Background color

GetBackgroundColor

GetBackgroundColor : function ()

Gets the solid Color of the background.

Returns

Color

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.2.0.29

GetBackgroundColorWebRGB

GetBackgroundColorWebRGB : function ()

Gets the solid color of the background as a web color RGB hex triplet, without the prefix ‘#’.

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.19.2

GetBackgroundColorWebRGBA

GetBackgroundColorWebRGBA : function ()

Gets the solid color of the background as a web color RGBA hex quartet, without the prefix ‘#’.

Returns

string

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.3.19.2

SetBackgroundColor

SetBackgroundColor : function (R,
g,
b,
a)

Sets the solid Color of the background.  If UseSkybox is true, the background color is ignored.

Parameters

{mixed} Rred color component (an int) / a web color RGB hex triplet (a string) / a web color RGBA hex quartet (a string) / a Color object
{int} g(optional) green color component
{int} b(optional) blue color component
{int} a(optional) alpha color component

Returns

void

Throws

Usage

SetBackgroundColor( R )Specify background color as R, a web color RGB hex triplet or a web color RGBA hex quartet or a Color object.
SetBackgroundColor(R, g, b)Specify background color as RGB color components.
SetBackgroundColor(R, g, b, a)Specify background color as RGBA color components.

Since

Version 0.2.0.29

Skybox

SetUseSkybox

SetUseSkybox : function (bVal)

Sets the value of the UseSkybox flag.  If set to true, GermaniumWeb will use a sky box for background; otherwise, GermaniumWeb will use the solid background color.

Parameter

{bool} bValValue to assign to UseSkybox flag.

Returns

void

Throws

Since

Version 0.0.10

GetUseSkybox

GetUseSkybox : function ()

Gets the value of the UseSkybox flag.  If it is set to true, GermaniumWeb will use a sky box for the background; otherwise, GermaniumWeb will use the solid background color.

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.0.10

Eye controls

SetEyeControlsVisible

SetEyeControlsVisible : function (bVal)

Sets the visibility of the Eye controls.

Parameter

{bool} bValValue to assign as visibility of Eye controls.

Returns

void

Throws

Since

Version 0.1.0.16

GetEyeControlsVisible

GetEyeControlsVisible : function ()

Gets whether or not Eye controls are currently visible.

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 0.1.0.16

Grid settings

GetGridVisibility

GetGridVisibility : function()

Gets the visibility of the grid.

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.13.0

SetGridVisibility

SetGridVisibility : function(bVal)

Sets the visibility of the grid.

Parameter

{bool} bValvalue to be set as grid visibility

Returns

void

Throws

Since

Version 1.4.13.0

SetGridHeight

SetGridHeight : function (height)

Sets the height of grid.

Parameter

{float} heightthe value to set as grid height

Returns

void

Throws

Since

Version 1.4.5.3

GetGridHeight

GetGridHeight : function ()

Gets the height of grid.

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.5.3

Disabled Navigation settings

Enforced when Navigation mode is Germanium.Navigation.Disabled.

GetNoNavigationCursorEnabled

GetNoNavigationCursorEnabled : function ()

Gets whether the cursor shows a disabled icon when a mouse button is pressed.  This setting is applied when Navigation mode is Germanium.Navigation.Disabled.

Default value is true.

Returns

bool

Throws

”uninitialized_plugin_object” Exception

See also

Since

Version 1.4.7.3

SetNoNavigationCursorEnabled

SetNoNavigationCursorEnabled : function (bVal)

Sets whether the cursor shows a disabled icon when a mouse button is pressed.  This setting is applied when Navigation mode is Germanium.Navigation.Disabled.

Default value is true.  Set to false if you want the cursor to remain the default cursor.

Parameter

{bool} bVal

Returns

void

Throws

See also

Since

Version 1.4.7.3

Orbit Navigation settings

Enforced when Navigation mode is Germanium.Navigation.Orbit.

GetOrbitMaxTargetDistance

GetOrbitMaxTargetDistance : function ()

Gets the maximum limit of target distance in meters.

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.11.0

SetOrbitMaxTargetDistance

SetOrbitMaxTargetDistance : function (maxDist)

Sets the maximum limit of target distance in meters.  Default: 5000.  Clamped to minimum of 1.0.

This limit is useful to prevent application users from zooming out too far and getting lost.  Whenever the target distance exceeds this limit, (either by the user, or by calling Eye.SetTargetDistance ), the Eye will be elastically moved toward the target point until the target distance is within this limit.

Parameter

{float} maxDistthe value, in meters, to be set as maximum limit of target distance.

Returns

void

Throws

Since

Version 1.4.11.0

GetOrbitMinTilt

GetOrbitMinTilt : function ()

Gets the minimum tilt angle of the Eye in radians.

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.5.11.1

SetOrbitMinTilt

SetOrbitMinTilt : function (radAngle)

Sets the minimum tilt angle of the Eye in radians.  Tilt angle is the angle that the Eye is looking upwards or downwards, equal to Eye.GetOrientation .x

Default: -PI/2.  (i.e. straight down)

Parameter

{float} radAnglethe value, in radians, to be set as minimum tilt angle of the Eye .

Returns

void

Throws

Since

Version 1.5.11.1

GetOrbitMaxTilt

GetOrbitMaxTilt : function ()

Gets the maximum tilt angle of the Eye in radians.

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.5.11.1

SetOrbitMaxTilt

SetOrbitMaxTilt : function (radAngle)

Sets the maximum tilt angle of the Eye in radians.  Tilt angle is the angle that the Eye is looking upwards or downwards, equal to Eye.GetOrientation .x

Default: PI/2.  (i.e. straight up)

Parameter

{float} radAnglethe value, in radians, to be set as maximum tilt angle of the Eye .

Returns

void

Throws

Since

Version 1.5.11.1

First Person Navigation settings

Enforced when Navigation mode is Germanium.Navigation.FirstPerson.

GetFirstPersonEyeHeight

GetFirstPersonEyeHeight : function ()

Gets the distance from the user’s eye to the floor.

Returns

floatin meters

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.6.3

SetFirstPersonEyeHeight

SetFirstPersonEyeHeight : function (height)

Sets the distance from the user’s eye to the floor.

The default value is 1.5 meters.

Parameter

{float} heightvalue to set as eye height in meters

Returns

void

Throws

Since

Version 1.4.6.3

GetFirstPersonFloorHeight

GetFirstPersonFloorHeight : function ()

Gets the distance from the user’s floor height (that is, his ‘feet’) to the ground.

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.6.3

SetFirstPersonFloorHeight

SetFirstPersonFloorHeight : function (height)

Sets the distance from the user’s floor height (that is, his ‘feet’) to the ground.  Typically, this value is set to a Level ’s floor height.

The default value is 0 meter, which is on the ground.

Parameter

{float} heightvalue to set as floor height

Returns

void

Throws

Since

Version 1.4.6.3

Animated fading

Enables/disables animated fading.

The application user can enable/disable animated fading by :

  1. right-clicking on the 3D scene,
  2. clicking “Settings”,
  3. clicking the “Display” tab,
  4. checking/unchecking the “Enable animated fading” check box,
  5. clicking the check button to apply the change.

IsAnimatedFadingEnabled

IsAnimatedFadingEnabled : function ()

Returns true if the end-user enabled animated fading.

Returns

booltrue if animated fading is enabled; false otherwise

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.6.3

Auto-rotation settings

GetAutoRotationDirection

GetAutoRotationDirection : function ()

Gets the direction of auto-rotation.  See RotateDirection for possible values.

Default value is Germanium.RotateDirection.Clockwise.

Returns

intenumeration of rotate direction.  See RotateDirection .

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.11.0

SetAutoRotationDirection

SetAutoRotationDirection : function (direction)

Sets the direction of auto-rotation.  Changing this setting while auto-rotation is ongoing will cancel the current auto-rotation and start a new auto-rotation with the new direction.

Default value is Germanium.RotateDirection.Clockwise.

Parameter

{int} directionsee RotateDirection

Returns

void

Throws

Since

Version 1.4.11.0

GetAutoRotationPeriod

GetAutoRotationPeriod : function ()

Gets the time (in seconds) it takes to complete one revolution.

Default value is 40 s. Clamped to a minimum of 0.001 s.

Returns

float

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.7.3

SetAutoRotationPeriod

SetAutoRotationPeriod : function (period)

Sets the time (in seconds) it takes to complete one revolution.  Changing this setting while auto-rotation is ongoing will cancel the current auto-rotation, and start a new one with the new period.

Default value is 40 s. Clamped to a minimum of 0.001 s.

Parameter

{float} period

Returns

void

Throws

Since

Version 1.4.7.3

GetAutoRotationCancellable

GetAutoRotationCancellable : function ()

Gets if the user can cancel auto-rotation by pressing the Esc key.

Default value is true.

Returns

bool

Throws

”uninitialized_plugin_object” Exception

Since

Version 1.4.7.3

SetAutoRotationCancellable

SetAutoRotationCancellable : function (bVal)

Sets if the user can cancel auto-rotation by pressing the Esc key.  Changing this setting while auto-rotation is ongoing will cancel the current auto-rotation and start a new one the new setting.

Default value is true.

Parameter

{bool} bVal

Returns

void

Throws

Since

Version 1.4.7.3

GetBackgroundColor : function ()
Gets the solid Color of the background.
Represents a color.
GetBackgroundColorWebRGB : function ()
Gets the solid color of the background as a web color RGB hex triplet, without the prefix ‘#’.
GetBackgroundColorWebRGBA : function ()
Gets the solid color of the background as a web color RGBA hex quartet, without the prefix ‘#’.
SetBackgroundColor : function (R,
g,
b,
a)
Sets the solid Color of the background.
SetUseSkybox : function (bVal)
Sets the value of the UseSkybox flag.
GetUseSkybox : function ()
Gets the value of the UseSkybox flag.
SetEyeControlsVisible : function (bVal)
Sets the visibility of the Eye controls.
Represents the eye through which we see the scene.
GetEyeControlsVisible : function ()
Gets whether or not Eye controls are currently visible.
GetGridVisibility : function()
Gets the visibility of the grid.
SetGridVisibility : function(bVal)
Sets the visibility of the grid.
SetGridHeight : function (height)
Sets the height of grid.
GetGridHeight : function ()
Gets the height of grid.
Enumeration of navigation modes in GermaniumWeb.
GetNoNavigationCursorEnabled : function ()
Gets whether the cursor shows a disabled icon when a mouse button is pressed.
SetNoNavigationCursorEnabled : function (bVal)
Sets whether the cursor shows a disabled icon when a mouse button is pressed.
GetOrbitMaxTargetDistance : function ()
Gets the maximum limit of target distance in meters.
SetOrbitMaxTargetDistance : function (maxDist)
Sets the maximum limit of target distance in meters.
GetOrbitMinTilt : function ()
Gets the minimum tilt angle of the Eye in radians.
SetOrbitMinTilt : function (radAngle)
Sets the minimum tilt angle of the Eye in radians.
GetOrbitMaxTilt : function ()
Gets the maximum tilt angle of the Eye in radians.
SetOrbitMaxTilt : function (radAngle)
Sets the maximum tilt angle of the Eye in radians.
GetFirstPersonEyeHeight : function ()
Gets the distance from the user’s eye to the floor.
SetFirstPersonEyeHeight : function (height)
Sets the distance from the user’s eye to the floor.
GetFirstPersonFloorHeight : function ()
Gets the distance from the user’s floor height (that is, his ‘feet’) to the ground.
SetFirstPersonFloorHeight : function (height)
Sets the distance from the user’s floor height (that is, his ‘feet’) to the ground.
IsAnimatedFadingEnabled : function ()
Returns true if the end-user enabled animated fading.
GetAutoRotationDirection : function ()
Gets the direction of auto-rotation.
SetAutoRotationDirection : function (direction)
Sets the direction of auto-rotation.
GetAutoRotationPeriod : function ()
Gets the time (in seconds) it takes to complete one revolution.
SetAutoRotationPeriod : function (period)
Sets the time (in seconds) it takes to complete one revolution.
GetAutoRotationCancellable : function ()
Gets if the user can cancel auto-rotation by pressing the Esc key.
SetAutoRotationCancellable : function (bVal)
Sets if the user can cancel auto-rotation by pressing the Esc key.
this.GetOptions = function ()
Gets the Options object that controls the behaviour of GermaniumWeb plugin, such as using a sky box and showing the navigation buttons.
Contains information describing the cause of an error.
this.SetNavigationMode = function (mode)
Sets the navigation mode.
this.GetNavigationMode = function ()
Gets the navigation mode currently enabled.
SetTargetDistance : function (dist,
bMoveEye)
Sets the distance between the Eye and the target.
GetOrientation : function ()
Gets orientation of the Eye.
Represents a level (for example “basement level” of Tower 1 in Suntec City).
Enumeration of rotate directions.