Loads the DVL library, wraps it, and makes the wrapper available for the application.
Example:
var oGraphicsCore = new GraphicsCore();
Constructor for a new GraphicsCore.
new sap.ui.vk.dvl.GraphicsCore(runtimeSettings, webGLContextAttributes)
Param | Type | Default Value | Description |
---|---|---|---|
runtimeSettings | object | The Emscripten runtime settings. |
|
totalMemory | int | The size of Emscripten module memory in bytes. |
|
logElementId | string | The ID of a textarea DOM element to write the log to. |
|
statusElementId | string | The ID of a DOM element to write the status messages to. |
|
webGLContextAttributes | object | The WebGL context attributes. See WebGL context attributes
|
Method | Description |
---|---|
buildSceneTree |
Builds a scene tree from the hierarchy of content resources. The content resources must be already downloaded. |
buildSceneTreeAsync |
Builds a scene tree from the hierarchy of content resources. The content resources must be already loaded. |
collectGarbage |
Collects and destroys unused objects and resources. |
createViewStateManager |
Creates a new ViewStateManager object. GraphicsCore owns the new ViewStateManager object. The object must be destroyed with the destroyViewStateManager method; |
destroyScene |
Destroys the scene object. |
destroyViewStateManager |
Destroys the ViewStateManager object created with the createViewStateManager method. |
sap.ui.vk.dvl.GraphicsCore.extend |
Creates a new subclass of class sap.ui.vk.dvl.GraphicsCore with name
|
getApi |
Gets one of APIs supported by the DVL library. |
getDecryptionHandler |
Gets an object that decrypts content of encrypted models. |
sap.ui.vk.dvl.GraphicsCore.getMetadata |
Returns a metadata object for class sap.ui.vk.dvl.GraphicsCore. |
loadContentResourcesAsync |
Loads content resources. Content resources can be downloaded from a URL or loaded from a local file. |
setDecryptionHandler |
Sets an object that decrypts content of encrypted models. |
setRetryCount |
Sets the maximum number of retry attempts for a download operation if the initial request to retrieve a model from a remote server could not be fulfilled and the error with which the request failed is considered recoverable. See sap.ui.vk.ContentConnector#setRetryCount for details. |
showDebugInfo |
Shows or hides debug information in the viewports. |
updateSceneTree |
Updates or rebuilds a scene tree from the hierarchy of content resources. The content resources must be already loaded. Some changes in the content resource hierarchy can lead to rebuilding the scene completely. In this case a new scene is created. |
updateSceneTreeAsync |
Updates or rebuilds a scene tree from the hierarchy of content resources. The content resources must be already loaded. Some changes in the content resource hierarchy can lead to rebuilding the scene completely. In this case a new scene is created. |
Builds a scene tree from the hierarchy of content resources. The content resources must be already downloaded.
Param | Type | DefaultValue | Description |
---|---|---|---|
contentResources | sap.ui.vk.ContentResource[] |
The array of content resources to build the scene from. |
Builds a scene tree from the hierarchy of content resources. The content resources must be already loaded.
Param | Type | DefaultValue | Description |
---|---|---|---|
contentResources | sap.ui.vk.ContentResource[] |
The array of content resources to build the scene from. |
Creates a new ViewStateManager object.
GraphicsCore owns the new ViewStateManager object. The object must be destroyed with the destroyViewStateManager method;
Param | Type | DefaultValue | Description |
---|---|---|---|
nodeHierarchy | sap.ui.vk.NodeHierarchy |
The NodeHierarchy object the view state manager is created for. |
|
shouldTrackVisibilityChanges | boolean |
Flag set by the application to decide whether the {sap.ui.vk.ViewStateManager} should track the visibility changes or not. |
Destroys the scene object.
Param | Type | DefaultValue | Description |
---|---|---|---|
vkScene | sap.ui.vk.dvl.Scene |
The scene to destroy. |
Destroys the ViewStateManager object created with the createViewStateManager method.
Param | Type | DefaultValue | Description |
---|---|---|---|
viewStateManager | sap.ui.vk.ViewStateManager |
The ViewStateManagerObject to destroy. |
Creates a new subclass of class sap.ui.vk.dvl.GraphicsCore 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.base.EventProvider.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 |
Gets one of APIs supported by the DVL library.
Param | Type | DefaultValue | Description |
---|---|---|---|
apiId | sap.ui.vk.dvl.GraphicsCoreApi |
The API identifier. |
Returns a metadata object for class sap.ui.vk.dvl.GraphicsCore.
Loads content resources.
Content resources can be downloaded from a URL or loaded from a local file.
Param | Type | DefaultValue | Description |
---|---|---|---|
contentResources | sap.ui.vk.ContentResource[] |
The content resources to build the scene from. |
|
onComplete | function |
The callback function to call when all content resources are processed. The onComplete callback parameter |
|
onProgress | function |
The callback function to call to report the file loading progress. |
Sets an object that decrypts content of encrypted models.
Param | Type | DefaultValue | Description |
---|---|---|---|
handler | sap.ui.vk.DecryptionHandler |
An object that decrypts content of encrypted models. |
Sets the maximum number of retry attempts for a download operation if the initial request to retrieve a model from a remote server could not be fulfilled and the error with which the request failed is considered recoverable.
See sap.ui.vk.ContentConnector#setRetryCount for details.
Param | Type | DefaultValue | Description |
---|---|---|---|
retryCount | int |
Maximum number of retry attempts. Value must be non-negative. The default number of retry attempts is 1, unless specified otherwise by calling this method and passing in the desired value. Specifying 0 disables any retry attempts. |
Shows or hides debug information in the viewports.
Param | Type | DefaultValue | Description |
---|---|---|---|
enable | boolean |
|
Updates or rebuilds a scene tree from the hierarchy of content resources.
The content resources must be already loaded. Some changes in the content resource hierarchy can lead to rebuilding the scene completely. In this case a new scene is created.
Param | Type | DefaultValue | Description |
---|---|---|---|
vkScene | sap.ui.vk.dvl.Scene |
The scene to update or null to force to create a new one. |
|
contentResources | sap.ui.vk.ContentResource[] |
The array of content resources to update or build the scene from. |
|
onError | function |
The callback function to call when an error happens. |
Updates or rebuilds a scene tree from the hierarchy of content resources.
The content resources must be already loaded. Some changes in the content resource hierarchy can lead to rebuilding the scene completely. In this case a new scene is created.
Param | Type | DefaultValue | Description |
---|---|---|---|
vkScene | sap.ui.vk.dvl.Scene |
The scene to update or null to force to create a new one. |
|
contentResources | sap.ui.vk.ContentResource[] |
The array of content resources to update or build the scene from. |