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, loadingModelObserver)
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, loadingModelObserver)
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}} loadingModelObserver
the observer containing modelLoaded(model), modelError(error), progression(part, info, percentage) methods that will be called at various phases, with model being an instance of Node3D, error, part, info strings and percentage a number.

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

© Copyright 2024 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Thu Apr 04 2024 17:30:26 GMT+0200 (CEST)