The X Toolkit API

X.texture

/**
* Create a texture using a two-dimensional image file or using raw-data.
*
* @constructor
* @extends X.base
* @mixin X.loadable
*/
var t = new X.texture();
/**
* The className of this class.
*
* @type {string}
* @protected
*/
t._classname = $_CLASSNAME;
/**
* The 'dirty' flag of this object.
*
* @type {boolean}
* @protected
*/
t._dirty = $_DIRTY;
/**
* The file of this texture.
*
* @type {?X.file}
* @protected
*/
t._file = $_FILE;
/**
* The file data.
*
* @type {?ArrayBuffer}
* @protected
*/
t._filedata = $_FILEDATA;
/**
* The uniqueId of this instance. Each class instance in XTK has a uniqueId.
*
* @type {number}
* @protected
*/
t._id = $_ID;
/**
* The (optional) HTML Image element.
*
* @type {?Element}
* @protected
*/
t._image = $_IMAGE;
/**
* The raw data of this texture as a uint8 array.
*
* @type {?Object}
* @protected
*/
t._rawData = $_RAWDATA;
/**
* The height of the raw data.
*
* @type {number}
* @protected
*/
t._rawDataHeight = $_RAWDATAHEIGHT;
/**
* The width of the raw data.
*
* @type {number}
* @protected
*/
t._rawDataWidth = $_RAWDATAWIDTH;
/**
* Get the className of this object.
*
* @return {string} The className of this object.
* @public
*/
var _classname = t.classname;
/**
* Get the associated X.file for this object.
*
* @return {string} The associated file path or null if no file is associated.
*/
var _file = t.file;
/**
* Load this object from a file path or reset the associated file path.
*
* @param {?string|Array} filepath The file path/URL to load. If null, reset the
*          associated file. If an array is given, load multiple files (this
*          only works for DICOM so far).
*/
t.file = $FILEPATH;
/**
* Get the possibly attached file data for this object.
*
* @return {?string} The associated file data or null if none is attached.
*/
var _filedata = t.filedata;
/**
* Set raw file data for this object. Doing so, skips any additional loading and
* just parses this raw data.
*
* @param {?string|Array} filedata The raw file data to parse.
*/
t.filedata = $FILEDATA;
/**
* Get the id of this instance.
*
* @return {string} The className of this object.
* @public
*/
var _id = t.id;


CONSTRUCTORS
X.texture

PROPERTIES
_classname
_dirty
_file
_filedata
_id
_image
_rawData
_rawDataHeight
_rawDataWidth

GETTERS/SETTERS
classname
file
filedata
id

FUNCTIONS

STATIC



SOURCECODE