class sap.ui.vbm.Viewport

Control sample: sap.ui.vbm.Viewport
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vbm/Viewport
Application Component: CA-GTF-VBZ

Provides a control for three js canvas.


Constructor

Constructor for a new three js viewport for Adapter3D.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.vbm.Viewport()

Properties

Name Type Default Value Description
cameraHistoryLength int 0

Camera history length (read only)

Visibility: public
cameraHistoryPos int

Camera history position

Visibility: public
height sap.ui.core.CSSSize 100%

Viewport height

Visibility: public
width sap.ui.core.CSSSize 100%

Viewport width

Visibility: public

Events Overview

Event Description
cameraChange

This event is fired when camera positioning changed (whole movement has been finished)

cameraChange

This event is fired when camera positioning changed (whole movement has been finished)

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
historyPos int

Current position in camera history

historyLength int

Camera history length


Methods Overview

Method Description
attachCameraChange

Attaches event handler fnFunction to the cameraChange event of this sap.ui.vbm.Viewport.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.vbm.Viewport itself.

This event is fired when camera positioning changed (whole movement has been finished)

detachCameraChange

Detaches event handler fnFunction from the cameraChange event of this sap.ui.vbm.Viewport.

The passed function and listener object must match the ones used for event registration.

sap.ui.vbm.Viewport.extend

Creates a new subclass of class sap.ui.vbm.Viewport with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

fireCameraChange

Fires event cameraChange to attached listeners.

getCameraHistoryLength

Gets current value of property cameraHistoryLength.

Camera history length (read only)

Default value is 0.

getCameraHistoryPos

Gets current value of property cameraHistoryPos.

Camera history position

getHeight

Gets current value of property height.

Viewport height

Default value is "100%".

sap.ui.vbm.Viewport.getMetadata

Returns a metadata object for class sap.ui.vbm.Viewport.

getWidth

Gets current value of property width.

Viewport width

Default value is "100%".

setCameraHistoryLength

Sets a new value for property cameraHistoryLength.

Camera history length (read only)

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

setCameraHistoryPos

Sets a new value for property cameraHistoryPos.

Camera history position

When called with a value of null or undefined, the default value of the property will be restored.

setHeight

Sets a new value for property height.

Viewport height

When called with a value of null or undefined, the default value of the property will be restored.

Default value is "100%".

setWidth

Sets a new value for property width.

Viewport width

When called with a value of null or undefined, the default value of the property will be restored.

Default value is "100%".

attachCameraChange

Attaches event handler fnFunction to the cameraChange event of this sap.ui.vbm.Viewport.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.vbm.Viewport itself.

This event is fired when camera positioning changed (whole movement has been finished)

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.vbm.Viewport itself

detachCameraChange

Detaches event handler fnFunction from the cameraChange event of this sap.ui.vbm.Viewport.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.vbm.Viewport.extend

Creates a new subclass of class sap.ui.vbm.Viewport with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

fireCameraChange

Fires event cameraChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

historyPos int

Current position in camera history

historyLength int

Camera history length

getCameraHistoryLength

Gets current value of property cameraHistoryLength.

Camera history length (read only)

Default value is 0.

getCameraHistoryPos

Gets current value of property cameraHistoryPos.

Camera history position

getHeight

Gets current value of property height.

Viewport height

Default value is "100%".

sap.ui.vbm.Viewport.getMetadata

Returns a metadata object for class sap.ui.vbm.Viewport.

getWidth

Gets current value of property width.

Viewport width

Default value is "100%".

setCameraHistoryLength

Sets a new value for property cameraHistoryLength.

Camera history length (read only)

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Param Type DefaultValue Description
iCameraHistoryLength int 0

New value for property cameraHistoryLength

setCameraHistoryPos

Sets a new value for property cameraHistoryPos.

Camera history position

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
iCameraHistoryPos int

New value for property cameraHistoryPos

setHeight

Sets a new value for property height.

Viewport height

When called with a value of null or undefined, the default value of the property will be restored.

Default value is "100%".

Param Type DefaultValue Description
sHeight sap.ui.core.CSSSize "100%"

New value for property height

setWidth

Sets a new value for property width.

Viewport width

When called with a value of null or undefined, the default value of the property will be restored.

Default value is "100%".

Param Type DefaultValue Description
sWidth sap.ui.core.CSSSize "100%"

New value for property width