LS.Formats Class
Formats is the class where all the info about what is every format, how to parse it, etc, is located
Constructor
LS.Formats
(
-
id
Parameters:
-
id
Stringthe id (otherwise a random one is computed)
Methods
addFormat
()
Tells the system info about this file format Info should contain fields like type:"image", resource: "Mesh|Texture", format: "text|binary", parse: function, native: true|false
parse
(
-
filename
-
data
-
options
Parse some data and returns the resulting resource
Parameters:
-
filename
String -
data
could be a string, binary, arraybuffer, xml...
-
options
Objecthow the file should be parsed
Returns:
:
the final resource, could be a Texture, a Mesh, or an object