Resource Class

Module: Resources

Resource class is used to represent resources.

Resources store data that is used by objects.

Constructor

Resource

()

Item Index

Methods

Methods

toJSON

(
  • meta
)
Object

Serialize resource to json.

Only serializes name, uuid and type.

Parameters:

  • meta Object

Returns:

Object:

json

Properties

data

Object

Resource data.

encoding

String, ArrayBuffer, ...

Data encoding (MP3, JPEG, MP4, ...).

Indicates how the data is encoded.

format

Object

Data format (Base64, ArrayBuffer, ...).

Indicates in witch format the data is being stored.

name

String

Resource name. Not required to be unique.

type

String

Resrouce type. Used to identify the type of the resource, usefull for serialization.

uuid

String

UUID unique identifier.