Class: xNavigationHome

xNavigationHome

This is a plugin for xViewer which renders interactive home button. It is customizable in terms of alpha behaviour and its position on the viewer canvas as well as definition of the distance and view direction. Use of plugin:

var home = new xNavigationHome();
viewer.addPlugin(home);

Constructor

new xNavigationHome(imageopt)

This is constructor of the Home plugin for xBIM Viewer. It gets optional Image object as an argument. If no image is specified there is a default one (which is not very prety).

Parameters:
Name Type Attributes Default Description
image Image <optional>
null

optional image to be used for a button.

Members

activeAlpha :Number

Navigation home button has two transparency states. One is when user hovers over the cube and the second when the cursor is anywhere else. This is for the hovering shate and it should be a positive number between [0,1]. If the value is less than 1 cube will be semitransparent when user hovers over. Default value is 1.0.

Type:
  • Number

distance :Number

Distance to be used for a home view. If null, default viewer distance for a full extent mode is used. Default value: null

Type:
  • Number

passiveAlpha :Number

Navigation home button has two transparency states. One is when user hovers over the cube and the second when the cursor is anywhere else. This is for the non-hovering shate and it should be a positive number between [0,1]. If the value is less than 1 cube will be semitransparent when user is not hovering over. Default value is 0.3.

Type:
  • Number

placementX :Number

Position of the the home button relative to the size of viewer canvas. This has to be a positive number between [0,1] Default value is 0.05.

Type:
  • Number

placementY :Number

Position of the the home button relative to the size of viewer canvas. This has to be a positive number between [0,1] Default value is 0.05.

Type:
  • Number

ratio :Number

Size of the the home button relative to the size of viewer canvas. This has to be a positive number between [0,1] Default value is 0.2.

Type:
  • Number

viewDirection :Number

View direction to be used for a home view. Default value: [1, 1, -1]

Type:
  • Number