/
CommandLists.js
60 lines (53 loc) · 1.49 KB
/
CommandLists.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*global define*/
define(function() {
"use strict";
/**
* Represents lists of commands for drawing for each render pass.
*
* @alias CommandLists
* @constructor
*/
var CommandLists = function() {
/**
* The command list for a opaque color pass.
* @type {Array}
* @default []
*/
this.opaqueList = [];
/**
* The command list for a translucent color pass.
* @type {Array}
* @default []
*/
this.translucentList = [];
/**
* The command lists for a pick pass.
* @type {Object}
*/
this.pickList = {
opaqueList : [],
translucentList : []
};
/**
* The command list for an overlay pass.
* @type {Array}
* @default []
*/
this.overlayList = [];
};
CommandLists.prototype.empty = function() {
return this.opaqueList.length === 0 &&
this.translucentList.length === 0 &&
this.pickList.opaqueList.length === 0 &&
this.pickList.translucentList.length === 0 &&
this.overlayList.length === 0;
};
CommandLists.prototype.removeAll = function() {
this.opaqueList.length = 0;
this.translucentList.length = 0;
this.pickList.opaqueList.length = 0;
this.pickList.translucentList.length = 0;
this.overlayList.length = 0;
};
return CommandLists;
});