Class Index | File Index

Classes


Class ModelLoader


Defined in: ModelLoader.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ModelLoader(modelExtension)
Creates an instance of a model loader.
Method Summary
Method Attributes Method Name and Description
 
Clears the list of 3D models waiting to be parsed by this loader.
 
getModelContent(modelEntry)
Returns the content of the model stored in the given entry.
 
load(url, synchronous, modelObserver)
Loads the 3D model from the given URL.
 
parseDependencies(modelContent, modelEntryName, zip, modelContext)
Parses the dependencies of the model content if any and returns the materials it describes.
 
parseEntryScene(modelContent, modelEntryName, zip, modelContext, onmodelloaded, onprogression)
Parses the given model content and calls onmodelloaded asynchronously or returns the scene it describes if onmodelloaded is null.
Class Detail
ModelLoader(modelExtension)
Creates an instance of a model loader.
Author: Emmanuel Puybaret.
Parameters:
{string} modelExtension
Method Detail
clear()
Clears the list of 3D models waiting to be parsed by this loader.

getModelContent(modelEntry)
Returns the content of the model stored in the given entry.
Parameters:
modelEntry

load(url, synchronous, modelObserver)
Loads the 3D model from the given URL. This method is reentrant when run asynchronously.
Parameters:
{string} url
The URL of a zip file containing an entry with the extension given in constructor that will be loaded or an URL noted as jar:url!/modelEntry where modelEntry will be loaded.
{boolean} synchronous Optional
optional parameter equal to false by default
{{modelLoaded|modelError|progression}} modelObserver
An observer containing modelLoaded(model), modelError(error), progression(part, info, percentage) methods that will called at various phases.

parseDependencies(modelContent, modelEntryName, zip, modelContext)
Parses the dependencies of the model content if any and returns the materials it describes.
Parameters:
modelContent
modelEntryName
zip
modelContext

parseEntryScene(modelContent, modelEntryName, zip, modelContext, onmodelloaded, onprogression)
Parses the given model content and calls onmodelloaded asynchronously or returns the scene it describes if onmodelloaded is null.
Parameters:
modelContent
modelEntryName
zip
modelContext
onmodelloaded
onprogression

© Copyrights 2017 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Oct 25 2017 16:36:09 GMT+0200 (CEST)