-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathworking.js
51 lines (31 loc) · 989 Bytes
/
working.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
// causes a frame rate dip?
function flashSpriteWhite(sprite, length, callback) {
sprite.filters = [whiteFilter];
setTimeout(function(){
sprite.filters = null;
if(callback) { callback(); }
}, length);
}
// creating the filters first seems to stop the frame rate dip
var whiteFilter = new PIXI.ColorMatrixFilter();
whiteFilter.matrix = [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255];
function testzone() {
if(rect.width < this.width) {
this.lockX = true;
}
if(rect.height < this.height) {
this.lockY = true;
}
}
PF.Grid.prototype.reset = function() {
var x, y, xl, yl, node;
for (y = 0, yl = this.nodes.length; y < yl; y++) {
for (x = 0, xl = this.nodes[y].length; x < xl; x++) {
node = this.nodes[y][x];
delete(node.closed);
delete(node.opened);
delete(node.f);
delete(node.g);
}
}
}