Advanced Users

Further functionalities of VEB.js can be developed by modifying HTML and JavaScript code that is available in the folder named $vebjs. This folder may be provided as as a single .zip file to be unzipped.

Node.js and NPM are needed to run the application. If Node.js and NPM are not already installed, it is possible to download and run the latest (LTS) Node.js installer confirming the default settings . NPM (Node Package Manager) is a package manager for JavaScript language and is included in this installation. For installing the dependencies, open the command prompt, go to directory $vebjs/js and execute command npm install

It is important to keep the original structure of the $vebjs folder to guarantee a correct execution of the application, including the access to already available scenes in subfolder $vebjs/Scenes.

To easily access local files (e.g. 3D models) it is necessary to launch a local host server, as explained in the following for Windows and MacOS.

Run on Windows: launch the application by double-clicking vebjs_launch.bat in the $vebjs folder and a browser page will be opened automatically at the address: http://localhost/vebjs.html?inputscene=

Run on MacOS: first open the terminal and go to the folder $vebjs. Then run the command sh vebjs_launch.sh and a browser page will be opened automatically at the address: http://localhost/vebjs.html?inputscene=

Offline/Online use

The default setting of the package allows to run the application offline by exploiting the libraries (modules) installed in $vebjs/node_modules. However, if an internet connection is available, the most recent version of the libraries can be accessed by manually modifying the file $vebjs/vebjs.html; in this case it is necessary to comment the whole "LOCAL" block and uncomment the "ONLINE STABLE" block in the <head>.

VEB.js as a Tomcat service

The contents of the folder $vebjs can be compressed in a .war file and the application launched as a Tomcat service.

Last updated