We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 14392b4 commit eedd1f2Copy full SHA for eedd1f2
1 file changed
src/collision/Grid.js
@@ -12,18 +12,21 @@ var Grid = {};
12
/**
13
* Description
14
* @method create
15
- * @param {number} bucketWidth
16
- * @param {number} bucketHeight
+ * @param {} options
17
* @return {grid} A new grid
18
*/
19
- Grid.create = function(bucketWidth, bucketHeight) {
20
- return {
+ Grid.create = function(options) {
+ var defaults = {
+ controller: Grid,
21
+ detector: Detector.collisions,
22
buckets: {},
23
pairs: {},
24
pairsList: [],
- bucketWidth: bucketWidth || 48,
25
- bucketHeight: bucketHeight || 48
+ bucketWidth: 48,
26
+ bucketHeight: 48
27
};
28
+
29
+ return Common.extend(defaults, options);
30
31
32
0 commit comments