public/js-roguelike-skeleton/src/renderer-layer.js
function(tileData1, tileData2){
            var result = {},
                key, val;
            for(key in tileData1){
                result[key] = tileData1[key];
            }
            for(key in tileData2){
                val = tileData2[key];
                if(val !== false && val !== void 0){
                    result[key] = val;
                }
            }
            return result;
        }
function(tileData1, tileData2){
            var result = {},
                key, val;
            for(key in tileData1){
                result[key] = tileData1[key];
            }
            for(key in tileData2){
                val = tileData2[key];
                if(val !== false && val !== void 0){
                    result[key] = val;
                }
            }
            return result;
        }
function ( tileData1 , tileData2 ) { var result = { } , key , val ; for ( key in tileData1 ) { result [ key ] = tileData1 [ key ] ; } for ( key in tileData2 ) { val = tileData2 [ key ] ; if ( val !== false && val !== void 0 ) { result [ key ] = val ; } } return result ; }
Merges 2 `tileData` objects.
Used to Merges layers of the same tile before drawing them.
@method mergeTileData
@param {TileData} tileData1 - `tileData` to merge to.
@param {TileData} tileData2 - `tileData` to merge from, properties with values on tileData2 replace matching properties on tileData1
@return {TileData} A new `tileData` object with merged values.
Merges 2 tileData objects . Used to Merges layers of the same tile before drawing them .