forked from phaserjs/phaser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRenderTargetBase.js
More file actions
43 lines (31 loc) · 806 Bytes
/
Copy pathRenderTargetBase.js
File metadata and controls
43 lines (31 loc) · 806 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
38
39
40
41
42
43
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
var Class = require('../../utils/Class');
var RenderTargetBase = new Class({
initialize:
function RenderTargetBase (width, height)
{
this.width = width;
this.height = height;
this.isRenderTarget = true;
},
resize: function (width, height)
{
if (this.width !== width || this.height !== height)
{
this.dispose();
this.width = width;
this.height = height;
return true;
}
return false;
},
dispose: function ()
{
// TODO - Event?
}
});
module.exports = RenderTargetBase;