-
Notifications
You must be signed in to change notification settings - Fork 0
jsilConfig
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.
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. | |
| readOnlyStorage | Boolean | false | If true, the JSIL support libraries for read-only filesystem emulation will be loaded. Read-only filesystem emulation exposes all your application's files in a virtual filesystem that you can access with the standard .NET File APIs. |
| localStorage | Boolean | false | If true, the JSIL support libraries for localStorage filesystem emulation will be loaded. localStorage filesystem emulation provides a writable filesystem that you can access with the standard .NET File APIs that is automatically saved by the user's browser in localStorage. |