Loads the DVL library, wraps it, and makes the wrapper available for the application.
Example:
var oGraphicsCore = new GraphicsCore();
Experimental API:Since 1.32.0 This class is experimental and might be modified or removed in future versions.
Method Summary
sap.ui.vk.GraphicsCore.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vk.GraphicsCore with name sClassName
and enriches it with the information contained in oClassInfo
. buildSceneTree(contentResources)Builds a scene tree from the hierarchy of content resources. getApi(apiId)Gets one of APIs supported by the DVL library. showDebugInfo(enable)Shows or hides debug information in the viewports. updateSceneTree(vkScene, contentResources)Updates or rebuilds a scene tree from the hierarchy of content resources. Constructor Detail
new sap.ui.vk.GraphicsCore(runtimeSettings, webGLContextAttributes)
Constructor for a new GraphicsCore.
Parameters:
{object} | runtimeSettings | The Emscripten runtime settings. |
{int} | runtimeSettings.totalMemory | The size of Emscripten module memory in bytes. |
{string} | runtimeSettings.logElementId | The ID of a textarea DOM element to write the log to. |
{string} | runtimeSettings.statusElementId | The ID of a DOM element to write the status messages to. |
{object} | webGLContextAttributes | The WebGL context attributes. See WebGL context attributes. |
Method Detail
sap.ui.vk.GraphicsCore.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.vk.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.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.ui.vk.GraphicsCore.
Returns:
Builds a scene tree from the hierarchy of content resources. The content resources must be already loaded.
Parameters:
Returns:
Collects and destroys unused objects and resources.
Experimental API:since version 1.34.1. The behavior might change in the next version.
- Experimental:
- since version 1.34.1. The behavior might change in the next version.
Returns:
Creates a new ViewStateManager object.
GraphicsCore owns the new ViewStateManager object. The object must be destroyed with the destroyViewStateManager method;
Parameters:
Returns:
Destroys the scene object.
Parameters:
Returns:
getApi(apiId): object
Gets one of APIs supported by the DVL library.
Experimental API:since version 1.32.0. The behavior might change in the next version.
Parameters:
- Experimental:
- since version 1.32.0. The behavior might change in the next version.
Returns:
{object} | The object that implements the requested API or null if the API is not supported. |
Loads content resources.
Content resources can be downloaded from a URL or loaded from a local file.
Parameters:
{sap.ui.vk.ContentResource[]} | contentResources | The content resources to build the scene from. |
{function} | onComplete | The callback function to call when all content resources are processed. The callback takes one parameter sourcesFailedToLoad - an array of the 'source' attribute values that are failed to be loaded. |
Returns:
Shows or hides debug information in the viewports.
Experimental API:since version 1.32.0. The behavior might change in the next version.
Parameters:
{boolean} | enable | true to show debug information, false to hide debug information. |
- Experimental:
- since version 1.32.0. The behavior might change in the next version.
Returns:
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.
Parameters:
Returns: