forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLight.js
More file actions
37 lines (31 loc) · 774 Bytes
/
Copy pathLight.js
File metadata and controls
37 lines (31 loc) · 774 Bytes
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
var Class = require('../../utils/Class');
var Light = new Class({
initialize:
function Light (x, y, z, radius, r, g, b, attenuation)
{
this.x = x;
this.y = y;
this.z = z;
this.radius = radius;
this.r = r;
this.g = g;
this.b = b;
this.attenuation = attenuation;
this.scrollFactorX = 1.0;
this.scrollFactorY = 1.0;
},
set: function (x, y, z, radius, r, g, b, attenuation)
{
this.x = x;
this.y = y;
this.z = z;
this.radius = radius;
this.r = r;
this.g = g;
this.b = b;
this.attenuation = attenuation;
this.scrollFactorX = 1.0;
this.scrollFactorY = 1.0;
}
});
module.exports = Light;