Class GLGE.Document
Document class to load scene, object, mesh etc from an external XML file
Defined in: glge.js.
Constructor Attributes | Constructor Name and Description |
---|---|
GLGE.Document(url)
|
Method Attributes | Method Name and Description |
---|---|
addLoadListener(listener)
Adds a listener to be called when all documents have finished loading
|
|
getElement(ele)
Gets an object from the XML document based on the dom element
|
|
loadDocument(url, relativeto)
Loads an additional documents into the collection
|
|
removeLoadListener(listener)
Removes a load listener
|
Event Attributes | Event Name and Description |
---|---|
onLoad()
Called when all documents have finished loading
|
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)
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
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
removeLoadListener(listener)
Removes a load listener
- Parameters:
- {function} listener
- Listener to remove
Event Detail
onLoad()
Called when all documents have finished loading