File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
MotionMark/tests/template/resources Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 23
23
* THE POSSIBILITY OF SUCH DAMAGE.
24
24
*/
25
25
26
- function TemplateCanvasObject ( stage )
26
+ class TemplateCanvasObject
27
27
{
28
+ constructor ( stage )
29
+ {
30
+ super ( stage ) ;
31
+ }
32
+
28
33
// For the canvas stage, most likely you will need to create your
29
34
// animated object since it's only draw time thing.
30
35
31
36
// Fill in your object data.
32
- }
33
-
34
- TemplateCanvasObject . prototype = {
35
- _draw : function ( )
37
+
38
+ _draw ( )
36
39
{
37
40
// Draw your object.
38
- } ,
41
+ }
39
42
40
- animate : function ( timeDelta )
43
+ animate ( timeDelta )
41
44
{
42
45
// Redraw the animated object. The last time this animated
43
46
// item was drawn before 'timeDelta'.
@@ -47,7 +50,7 @@ TemplateCanvasObject.prototype = {
47
50
// Redraw your object.
48
51
this . _draw ( ) ;
49
52
}
50
- } ;
53
+ }
51
54
52
55
class TemplateCanvasStage extends Stage {
53
56
constructor ( )
You can’t perform that action at this time.
0 commit comments