starling-framework
Version:
A fast, productive library for 2D cross-platform development.
80 lines (62 loc) • 1.75 kB
JavaScript
// Class: starling.rendering.BatchToken
var $global = typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : this
$global.Object.defineProperty(exports, "__esModule", {value: true});
var __map_reserved = {};
// Imports
var $hxClasses = require("./../../hxClasses_stub").default;
var $hxEnums = require("./../../hxEnums_stub").default;
// Constructor
var BatchToken = function(batchID,vertexID,indexID) {
if(indexID == null) {
indexID = 0;
}
if(vertexID == null) {
vertexID = 0;
}
if(batchID == null) {
batchID = 0;
}
this.setTo(batchID,vertexID,indexID);
}
// Meta
BatchToken.__name__ = "starling.rendering.BatchToken";
BatchToken.__isInterface__ = false;
BatchToken.prototype = {
copyFrom: function(token) {
this.batchID = token.batchID;
this.vertexID = token.vertexID;
this.indexID = token.indexID;
},
setTo: function(batchID,vertexID,indexID) {
if(indexID == null) {
indexID = 0;
}
if(vertexID == null) {
vertexID = 0;
}
if(batchID == null) {
batchID = 0;
}
this.batchID = batchID;
this.vertexID = vertexID;
this.indexID = indexID;
},
reset: function() {
this.batchID = this.vertexID = this.indexID = 0;
},
equals: function(other) {
if(this.batchID == other.batchID && this.vertexID == other.vertexID) {
return this.indexID == other.indexID;
} else {
return false;
}
},
toString: function() {
return "[BatchToken batchID=" + this.batchID + " vertexID=" + this.vertexID + " indexID=" + this.indexID + "]";
}
};
BatchToken.prototype.__class__ = BatchToken.prototype.constructor = $hxClasses["starling.rendering.BatchToken"] = BatchToken;
// Init
// Statics
// Export
exports.default = BatchToken;