XR Viewer Portable WebASM
- Last UpdatedSep 03, 2025
- 2 minute read
The XR Viewer Wasm is designed to emulate browser environment execution and enables you to test an XR app by loading it in a web page.
It is based on web assembly technology. A user can interact with a web page that communicates with the XR engine through a JRPC API contract.
-
Execution of XR Viewer Wasm is restricted to when XR Studio is running on the same machine.
-
Users can execute unpacked project data as well as packed project data.
-
It can be executed in development mode also to see log and provision to send JRPC commands.
-
Inspecting the app can be done by connecting with remote debugger.
Command line arguments
|
Argument |
Description |
|---|---|
|
-config |
Application Configuration File to be loaded. Automatically generated by XR Studio. |
|
-paks |
List of paks to be loaded. Automatically generated by XR Studio (ex. pakname1.pak|pakfolder1|pakname2.pak|pakfolder2). |
|
-port |
By default it is set to 60495, it can be reassigned using this parameter. |
|
-dev |
By default it is set to true, it can be reassigned using this argument. In dev mode, Webpage shows the following: 1. Log panel. 2. Textbox and button to send JRPC commands to engine. 3. Buttons to stop and restart the engine. |
Server application
When you start XR Viewer Wasm against a development project, you will see the following XRViewerNXWeb application.

Server interface
XR Viewer NX Web has a basic application interface with two buttons and a status bar.
-
Open Webpage. It copies the XR project and XR Wasm application into a folder _wwwroot, which resides at XR Project parent directory, and starts a local webserver from _wwwroot folder. When the server is ready, it opens a webpage in the default browser. All the project files are pre-loaded into the browser, then it starts running the project in browser.
-
Debug. Starts the debug server, which is prerequisite/bridge to connect XR Wasm application with Remote Debugger.
-
Status bar. Shows the current state of the application.
Code example
This is an XR Viewer Wasm code example.
WD: C:\dev\projects\XRViewerWasmSample
Cmd args: -config config.xml -param License.type XR_STUDIO -paks
mwpl_core.pak|C:\\dev\\source\\xr_framework\\_bundled_release_\\Package\\Core_0.0.0.0
\\ModulePaks|mwpl_media.pak|C:\\dev\\source\\xr_framework\\_bundled_release_\\Package\\Core_0.0.0.0\\ModulePaks
Executing a single PAK released application
To test a PAK application on the XR Viewer Wasm, it's enough to start the viewer without provisioning -pak argument. You can achieve by setting the Override mode for the additional command line arguments in the run configuration. For more information, see Managing configurations.
When running the server without passing the -pak list, it displays a different interface.
Select and drop a single PAK released application into the viewer to get to the standard interface.
