Newer
Older
pixi.js / src / mesh / geometry / Attribute.js
@Mat Groves Mat Groves on 15 Nov 2016 460 bytes more tweaks and updates..
class Attribute
{

	constructor(buffer, size = 2, stride = 0, start = 0, normalised = false)
	{
	    this.buffer = buffer;
	    this.normalized = normalised;
	    this.size = size;
	    this.stride = stride;
	    this.start = start;
	    this.type = null;
	}

	destroy()
	{
	    this.buffer = null;
	}

}

Attribute.from = function (buffer, stride, start, normalised)
{
	return new Attribute(buffer, stride, start, normalised);
};

module.exports = Attribute;