Provides a control for three js canvas.
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()
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 |
Event | Description |
---|---|
cameraChange |
This event is fired when camera positioning changed (whole movement has been finished) |
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 |
Method | Description |
---|---|
attachCameraChange |
Attaches event handler When called, the context of the event handler (its This event is fired when camera positioning changed (whole movement has been finished) |
detachCameraChange |
Detaches event handler 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
|
fireCameraChange |
Fires event cameraChange to attached listeners. |
getCameraHistoryLength |
Gets current value of property cameraHistoryLength. Camera history length (read only) Default value is |
getCameraHistoryPos |
Gets current value of property cameraHistoryPos. Camera history position |
getHeight |
Gets current value of property height. Viewport height Default value is |
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 |
setCameraHistoryLength |
Sets a new value for property cameraHistoryLength. Camera history length (read only) When called with a value of Default value is |
setCameraHistoryPos |
Sets a new value for property cameraHistoryPos. Camera history position When called with a value of |
setHeight |
Sets a new value for property height. Viewport height When called with a value of Default value is |
setWidth |
Sets a new value for property width. Viewport width When called with a value of Default value is |
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 |
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 |
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 |
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 |
Gets current value of property cameraHistoryLength.
Camera history length (read only)
Default value is 0
.
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 |
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 |
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 |
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 |