demo/editor/rainyday.js
function CollisionMatrix(x, y, r) {
    this.resolution = r;
    this.xc = x;
    this.yc = y;
    this.matrix = new Array(x);
    for (var i = 0; i <= (x + 5); i++) {
        this.matrix[i] = new Array(y);
        for (var j = 0; j <= (y + 5); ++j) {
            this.matrix[i][j] = new DropItem(null);
        }
    }
}
function CollisionMatrix(x, y, r) {
    this.resolution = r;
    this.xc = x;
    this.yc = y;
    this.matrix = new Array(x);
    for (var i = 0; i <= (x + 5); i++) {
        this.matrix[i] = new Array(y);
        for (var j = 0; j <= (y + 5); ++j) {
            this.matrix[i][j] = new DropItem(null);
        }
    }
}
function CollisionMatrix ( x , y , r ) { this . resolution = r ; this . xc = x ; this . yc = y ; this . matrix = new Array ( x ) ; for ( var i = 0 ; i <= ( x + 5 ) ; i ++ ) { this . matrix [ i ] = new Array ( y ) ; for ( var j = 0 ; j <= ( y + 5 ) ; ++ j ) { this . matrix [ i ] [ j ] = new DropItem ( null ) ; } } }
Defines a gravity matrix object which handles collision detection.
@param x number of columns in the matrix
@param y number of rows in the matrix
@param r grid size
Defines a gravity matrix object which handles collision detection .