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 2323 * THE POSSIBILITY OF SUCH DAMAGE.
2424 */
2525
26- function TemplateCanvasObject ( stage )
26+ class TemplateCanvasObject
2727{
28+ constructor ( stage )
29+ {
30+ super ( stage ) ;
31+ }
32+
2833 // For the canvas stage, most likely you will need to create your
2934 // animated object since it's only draw time thing.
3035
3136 // Fill in your object data.
32- }
33-
34- TemplateCanvasObject . prototype = {
35- _draw : function ( )
37+
38+ _draw ( )
3639 {
3740 // Draw your object.
38- } ,
41+ }
3942
40- animate : function ( timeDelta )
43+ animate ( timeDelta )
4144 {
4245 // Redraw the animated object. The last time this animated
4346 // item was drawn before 'timeDelta'.
@@ -47,7 +50,7 @@ TemplateCanvasObject.prototype = {
4750 // Redraw your object.
4851 this . _draw ( ) ;
4952 }
50- } ;
53+ }
5154
5255class TemplateCanvasStage extends Stage {
5356 constructor ( )
You can’t perform that action at this time.
0 commit comments