Skip to content
kevingadd edited this page Sep 11, 2012 · 14 revisions

The JSIL script loader (contained in JSIL.js) is responsible for loading the scripts necessary to run a JSIL game or application. The script loader (and other parts of JSIL) read configuration settings from a global variable named jsilConfig.

jsilConfig format

The jsilConfig object is a JSON-style dictionary. The following keys can be provided:

Search Paths
Key Type Default Value Description
libraryRoot String "../Libraries/" Where JSIL looks for libraries (like JSIL.Bootstrap).
manifestRoot String "" Where JSIL looks for manifests (like MyApp.manifest.js).
scriptRoot String "" Where JSIL looks for application scripts.
fileRoot String "" Where JSIL looks for raw files included with your application.
assetRoot String ""
contentRoot String "Content/" Where JSIL looks for XNA content (.xnb files and the like)
fileVirtualRoot String fileRoot or ""
Optional Features
Key Type Default Value Description
printStackTrace Boolean false If true, printStackTrace.js will be loaded to provide more detailed stack traces for errors in your application. This can be useful for debugging but comes with a performance penalty.
webgl2d Boolean false If true, webgl-2d will be loaded and used if available to accelerate graphics rendering (instead of HTML5 Canvas). WebGL-2D provides superior performance for games that use lots of color multiplication.
gamepad Boolean false If true, gamepad.js will be loaded to provide support for XBox 360 controllers in compatible browsers on compatible PCs.
winForms Boolean false If true, the JSIL support libraries for System.Windows.Forms and System.Drawing will be loaded.
xna Integer If an XNA version is specified, JSIL support libraries for that version of XNA will be loaded. Supported versions are 3 and 4.
Clone this wiki locally