ObjectLoader Class
Objectloader can be used to load external objects from files.
Also loads all resources attached to the objects being loaded.
Can parse be used to load on runtime resources and objects from external project files.
Item Index
Methods
bindSkeletons
-
object
Auxiliar method to bind skeletons to loaded objects.
Look for skeletonUUID property, wich is a placeholder with the skeleton UUID and replace it with the skeleton object.
Parameters:
-
objectObject3DObject3D that contains objects
load
-
url -
onLoad -
onProgress -
onError
Load object file from URL.
Parameters:
-
urlString -
onLoadFunction -
onProgressFunction -
onErrorFunction
parse
-
json -
onLoad
Parse JSON object and create the correct Object structure.
Data can be loaded from a file and should be parsed into Object.
Parameters:
-
jsonObjectJSON data to be loaded.
-
onLoadFunctiononLoad callback.
Returns:
Program loaded from json data.
parseAudio
-
json
Parse audio on json.
Parameters:
-
jsonObject
Returns:
audio
parseFonts
-
json
Parse fonts on json.
Parameters:
-
jsonObject
Returns:
fonts
parseGeometries
-
array
Parse geometries on JSON.
Parameters:
-
arrayObject
Returns:
geometries
parseImages
-
json
Parse images on json.
Parameters:
-
jsonObject
Returns:
images
parseMaterials
-
json
Parse materials on json.
Parameters:
-
jsonObject
Returns:
materials
parseObjects
()
Parse objects from json data,
parseResources
-
json
Parse resources on JSON.
Parameters:
-
jsonObject
Returns:
resources
parseShape
-
json
Parse geometries on JSON.
Parameters:
-
jsonObject
Returns:
geometries
parseSkeletons
-
json -
object
Parse array of skeletons from JSON object.
Parameters:
-
jsonObject -
objectObject
parseTextures
-
json
Parse textures on json.
Parameters:
-
jsonObject
Returns:
textures
parseVideos
-
json
Parse videos on json.
Parameters:
-
jsonObject
Returns:
videos
setCrossOrigin
-
origin
Set cross origin.
Parameters:
-
originString
setTexturePath
-
path
Define base path for external texture loading.
Parameters:
-
pathString
