Namespace: Core

sap.ve.dvl~ Core

Methods

(static) CreateEmptyScene() → {string|sap.ve.dvl.DVLRESULT}

Creates a new scene.
Call the Release method once finished with it.
Returns:
The ID of the newly created scene or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(static) CreateFileFromArrayBuffer(buffer, url, sourceLocation) → {string}

Creates files in the virtual file system with the given ArrayBuffer.
Parameters:
Name Type Description
buffer ArrayBuffer The ArrayBuffer containing data.
url string The URL of the file.
sourceLocation sap.ve.dvl.SOURCELOCATION The source location of the file: "local" or "remote".
Returns:
The full file name in the Emscripten virtual file system.
Type
string

(static) CreateWebGLContext(canvas, webGLContextAttributes) → {WebGLRenderingContext}

Creates a WebGL context with the given cavas.
Parameters:
Name Type Description
canvas HTMLCanvasElement The canvas element in DOM.
webGLContextAttributes object See webGLContextAttributes.
Returns:
The WebGL context associated with the canvas element.
Type
WebGLRenderingContext

(static) DeleteFileByUrl(url, sourceLocation) → {sap.ve.dvl~Core}

Deletes the file from the Emscripten virtual file system.
Parameters:
Name Type Description
url string The URL of the file to delete.
sourceLocation sap.ve.dvl.SOURCELOCATION The source location of the file: "local" or "remote".
Returns:
this for chaining.
Type
sap.ve.dvl~Core

(static) DoneRenderer() → {sap.ve.dvl.DVLRESULT}

Deletes the current renderer, and releases all allocated resources (or JavaScript equivalent).
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) GetBuildNumber() → {number}

Returns the build number of DVL.
Returns:
Core build number.
Type
number

(static) GetFilename(url, sourceLocation) → {string}

Gets the full file name of the file stored in the Emscripten virtual file system.
Parameters:
Name Type Description
url string URL to the file.
sourceLocation sap.ve.dvl.SOURCELOCATION The source location of the file: "local" or "remote".
Returns:
The full name of the file in the Emscripten virtual file system.
Type
string

(static) GetLibraryPtr() → {string|sap.ve.dvl.DVLRESULT}

Returns the token that uniquely identifies the current Library instance.
Returns:
Library token or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(static) GetMajorVersion() → {number}

Returns the major version of DVL.
Returns:
Core major version.
Type
number

(static) GetMicroVersion() → {number}

Returns the micro version of DVL.
Returns:
Core micro version.
Type
number

(static) GetMinorVersion() → {number}

Returns the minor version of DVL.
Returns:
Core minor version.
Type
number

(static) GetRendererPtr() → {string|sap.ve.dvl.DVLRESULT}

Returns the token that uniquely identifies the current Renderer instance.
Returns:
Renderer token or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(static) GetVersion() → {string}

Returns the overall version of DVL.
Returns:
The string representation of the DVL version with the following structure: Major.Minor.Micro.BuildNumber.
Type
string

(static) Init(versionMajor, versionMinor) → {sap.ve.dvl.DVLRESULT}

Performs all class initialization, and verifies that the library is compatible (by checking major/minor version).
Parameters:
Name Type Description
versionMajor number Major version to check against build.
versionMinor number Minor version to check against build.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) InitRenderer() → {string}

Performs all renderer initialization.
Returns:
Renderer token.
Type
string

(static) LoadFileFromArrayBuffer(buffer, emscriptenFilename, password, sourceLocation) → {string|sap.ve.dvl.DVLRESULT}

Creates a new scene by loading it from ArrayBuffer.
Call the Release method once finished with it.
Parameters:
Name Type Description
buffer ArrayBuffer ArrayBuffer which has the file data.
emscriptenFilename string The buffer is stored under this filename in the Emscription virtual system.
password string Password to access the file. Required only if the file is encrypted.
sourceLocation sap.ve.dvl.SOURCELOCATION The source location of the file: "local" or "remote".
Returns:
The ID of the newly loaded scene or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(static) LoadScene(filename, optionalPasswordopt) → {string|sap.ve.dvl.DVLRESULT}

Creates a new scene by loading it from a file in the Emscripten virtual file system.
Call the Release method once finished with it.
Parameters:
Name Type Attributes Description
filename string The name of the file in the Emscripten virtual file system.
optionalPassword string <optional>
Password to access the file. Required only if the file is encrypted.
Returns:
The ID of the newly loaded scene or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(static) LoadSceneByUrl(url, optionalPassword, sourceLocation) → {string|sap.ve.dvl.DVLRESULT}

Creates a new scene by loading it from the specified URL.
Call the Release method once finished with it.
Parameters:
Name Type Description
url string The URL of the file to load.
optionalPassword string The password to access the file. Required only if the file is encrypted.
sourceLocation sap.ve.dvl.SOURCELOCATION The source location of the file: "local" or "remote".
Returns:
The ID of the newly loaded scene or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(static) LoadSceneFromVDSL(content, optionalPasswordopt) → {string|sap.ve.dvl.DVLRESULT}

Creates a new scene by loading a VDSL file from a specified URL.
Call the Release method once finished with it.
Parameters:
Name Type Attributes Description
content string The content of the VDSL file.
optionalPassword string <optional>
Password to access the file. Required only if the file is encrypted.
Returns:
The ID of the newly loaded scene or an error code if fails.
Type
string | sap.ve.dvl.DVLRESULT

(static) OnLowMemory()

Releases internal caches and any other information that can be recreated by DVL core when necessary (mainly targets iOS with limited relevance to dvl.js).

(static) Release()

Deletes the DVL instance.

(static) SetLocale(locale) → {sap.ve.dvl.DVLRESULT}

Sets the locale which is used for getting the text in viewports, layers, callouts, etc. during file load. Default is "neutral locale". Some examples of locale format include "en-US" and "de-DE". Use null or "" value to set a "neutral locale". Locale setting is only used during scene loading. If you change the locale setting on the fly, you will need to reload the file.
Parameters:
Name Type Description
locale string The locale to set.
Returns:
The result code of the operation.
Type
sap.ve.dvl.DVLRESULT

(static) StartRenderLoop()

Starts the render loop. Frames are rendered only if render loop is enabled.

(static) StopRenderLoop()

Stops the render loop. Frames are rendered only if render loop is enabled.