API Docs for:
Show:

LS.Formats Class

Defined in: ../src/formats.js:2
Module: LS

Formats is the class where all the info about what is every format, how to parse it, etc, is located

Constructor

LS.Formats

(
  • id
)

Defined in ../src/formats.js:2

Parameters:

  • id String

    the id (otherwise a random one is computed)

Item Index

Methods

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 Object

    how the file should be parsed

Returns:

:

the final resource, could be a Texture, a Mesh, or an object