API Docs for:
Show:

LS.Pack Class

Module: LS

Pack is an object that contain several resources, helpful when you want to carry a whole scene in one single file

Constructor

LS.Pack

()

Methods

addResource

(
  • filename
)

Adds a resource to the prefab

Parameters:

  • filename String

    filename of the resource

configure

(
  • data
)

configure the pack from an unpacked WBin

Parameters:

  • data Object

    an unpacked WBIN (object with every chunk)

Pack.createWBin

(
  • fullpath
  • resource_names
  • metadata
  • mark_them
)

to create a WBin containing all the resource and metadata

Parameters:

  • fullpath String

    for the pack

  • resource_names Array

    array with the names of all the resources to store

  • metadata Object

    [optional] extra data to store

  • mark_them Boolean

    [optional] marks all the resources as if they come from a pack

Returns:

object containing the pack data ready to be converted to WBin

removeResource

(
  • filename
)

Remove a resource to the prefab

Parameters:

  • filename String

    filename of the resource