-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrenderObject.js
More file actions
98 lines (60 loc) · 1.87 KB
/
renderObject.js
File metadata and controls
98 lines (60 loc) · 1.87 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
var RenderObject = (function(){
var proto_RenderObject;
proto_RenderObject = {};
function proto_update(self) {}
function proto_measure(self) {}
function proto_draw(self) {}
proto_RenderObject.create = function () {
var self;
var _x;
var _y;
var _w;
var _h;
self = {
properties_have_changed: false,
dimensions_have_changed: false,
};
Object.defineProperty(self, 'x', {
get: function () { return _x; },
set: function (proposed_x) {
_x = proposed_x;
dimensions_have_changed = true;
},
enumerable: true,
configurable: false
});
Object.defineProperty(self, 'y', {
get: function () { return _y; },
set: function (proposed_y) {
_y = proposed_y;
dimensions_have_changed = true;
},
enumerable: true,
configurable: false
});
Object.defineProperty(self, 'w', {
get: function () { return _w; },
set: function (proposed_w) {
_w = proposed_w;
dimensions_have_changed = true;
},
enumerable: true,
configurable: false
});
Object.defineProperty(self, 'h', {
get: function () { return _h; },
set: function (proposed_h) {
_h = proposed_h;
dimensions_have_changed = true;
},
enumerable: true,
configurable: false
});
// load methods with proto functions. These need to be overwritten.
self.update = proto_update;
self.measure = proto_measure;
self.draw = proto_draw;
return self
};
return proto_RenderObject;
}());