*/
FlappDisplay = function() {
this.objs = {};
- this.places = {};
};
FlappDisplay.prototype = {
set: function(depth, obj, place) {
- if (obj) {
- this.objs[depth] = obj;
- if (place.matrix) {
- obj.matrix = place.matrix;
- }
- if (place.colorTransform) {
- obj.colorTransform = place.colorTransform;
- }
+ this.objs[depth] = obj;
+ obj.matrix = place.matrix;
+ obj.colorTransform = place.colorTransform;
+ obj.clipDepth = place.clipDepth;
+ console.log('this.objs');
+ console.log(this.objs);
+ },
+ move: function(depth, place)
+ {
+ var obj = this.objs[depth];
+ if (place.matrix) {
+ obj.matrix = place.matrix;
+ }
+ if (place.colorTransform) {
+ obj.colorTransform = place.colorTransform;
}
- this.places[depth] = place;
},
- getObj: function(depth) {
+ get: function(depth) {
+ console.log(this.objs);
+ console.debug("get: depth:"+depth);
return this.objs[depth];
},
- getPlace: function(depth) {
- return this.places[depth];
- },
del: function(depth) {
+ this.objs[depth].destroy();
delete this.objs[depth];
- delete this.places[depth];
},
descSortedDepth: function() {
var keys = Object.keys(this.objs);