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:
-
object
Object3DObject3D that contains objects
load
-
url
-
onLoad
-
onProgress
-
onError
Load object file from URL.
Parameters:
-
url
String -
onLoad
Function -
onProgress
Function -
onError
Function
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:
-
json
ObjectJSON data to be loaded.
-
onLoad
FunctiononLoad callback.
Returns:
Program loaded from json data.
parseAudio
-
json
Parse audio on json.
Parameters:
-
json
Object
Returns:
audio
parseFonts
-
json
Parse fonts on json.
Parameters:
-
json
Object
Returns:
fonts
parseGeometries
-
array
Parse geometries on JSON.
Parameters:
-
array
Object
Returns:
geometries
parseImages
-
json
Parse images on json.
Parameters:
-
json
Object
Returns:
images
parseMaterials
-
json
Parse materials on json.
Parameters:
-
json
Object
Returns:
materials
parseObjects
()
Parse objects from json data,
parseResources
-
json
Parse resources on JSON.
Parameters:
-
json
Object
Returns:
resources
parseShape
-
json
Parse geometries on JSON.
Parameters:
-
json
Object
Returns:
geometries
parseSkeletons
-
json
-
object
Parse array of skeletons from JSON object.
Parameters:
-
json
Object -
object
Object
parseTextures
-
json
Parse textures on json.
Parameters:
-
json
Object
Returns:
textures
parseVideos
-
json
Parse videos on json.
Parameters:
-
json
Object
Returns:
videos
setCrossOrigin
-
origin
Set cross origin.
Parameters:
-
origin
String
setTexturePath
-
path
Define base path for external texture loading.
Parameters:
-
path
String