Fork me on GitHub

API Documentation

Document class to load scene, object, mesh etc from an external XML file
Defined in: glge_document.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Method Summary
Method Attributes Method Name and Description
 
addLoadListener(listener)
Adds a listener to be called when all documents have finished loading
 
getElement(ele, noerrors)
Gets an object from the XML document based on the dom element
 
load(url, preload)
Loads the root document
 
loadDocument(url, relativeto)
Loads an additional documents into the collection
 
loads xml from a script tag
 
Removes a load listener
 
usePreloader(object)
Use a preloader
Class Detail
GLGE.Document(url)
Parameters:
{string} url
URL of the resource to load
Method Detail
addLoadListener(listener)
Adds a listener to be called when all documents have finished loading
Parameters:
{function} listener
the function to call when all loading in complete

getElement(ele, noerrors)
Gets an object from the XML document based on the dom element
Parameters:
{string|domelement} ele
the id of the element to get or the dom node
noerrors

load(url, preload)
Loads the root document
Parameters:
{string} url
URL of the resource to load
{object} preload
Decides if a preloader is used. true: default preloader, object: specialized preloader

loadDocument(url, relativeto)
Loads an additional documents into the collection
Parameters:
{string} url
URL of the resource to load
{string} relativeto
the path the URL is relative to, null for default

parseScript(id)
loads xml from a script tag
Parameters:
{string} id
the id of the element to load

removeLoadListener(listener)
Removes a load listener
Parameters:
{function} listener
Listener to remove

usePreloader(object)
Use a preloader
Parameters:
{object} object Optional
This object contains optional parameters. Example1: {XMLQuota: 0.30, XMLBytes: 852605}, Example2: {XMLQuota: 0.13, numXMLFiles: 1}, Example3: true

Documentation generated by JsDoc Toolkit 2.4.0 on Sun Feb 12 2012 14:20:23 GMT+0000 (GMT)