iterami/Docs.htm/common HTM Projects/webgl.js/webgl_level_init(args)
- Calls webgl_init() if WebGL has not yet been set up.
- Creates a level from a parsed JSON Level Format file.
- The "character" arg can have certain values:
- -1: create a new level -1 camera character instead of a previously created character.
- 0: use previously created character of at least level -1, or otherwise fail to load.
- 1: use existing character in the level file with the same ID as "webgl_character_id", or set "webgl_character_id" to the first character in the file, or otherwise fail to load.
- object: delete current "webgl_characters[webgl_character_id]" and create a new character with the object properties.
- Calls optional repo-specific repo_level_load() function.
character
|
| number or object
|
json
| {}
| object
|