-
Notifications
You must be signed in to change notification settings - Fork 277
/
Copy pathopacity.js
53 lines (34 loc) · 1.14 KB
/
opacity.js
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
goog.provide('test.opacity');
goog.require('lime');
goog.require('lime.Circle');
goog.require('lime.CoverNode');
goog.require('lime.Director');
goog.require('lime.Layer');
goog.require('lime.Scene');
goog.require('lime.animation.FadeTo');
goog.require('lime.animation.Loop');
goog.require('lime.animation.MoveBy');
goog.require('lime.animation.Sequence');
test.WIDTH = 600;
test.HEIGHT = 400;
test.start = function() {
//director
test.director = new lime.Director(document.body, test.WIDTH, test.HEIGHT);
test.director.makeMobileWebAppCapable();
var gamescene = new lime.Scene;
var layer = new lime.Layer;
layer.setPosition(100, 0);
gamescene.appendChild(layer);
var ball = new lime.Circle;
layer.appendChild(ball);
// ball.setRenderer(lime.Renderer.CANVAS);
ball.setFill(100, 0, 0);
ball.setPosition(50, 100).setSize(100, 100);
ball.runAction(new lime.animation.Loop(new lime.animation.Sequence(
new lime.animation.FadeTo(0).setDuration(3),
new lime.animation.FadeTo(1).setDuration(3)
)));
// set active scene
test.director.replaceScene(gamescene);
};
goog.exportSymbol('test.start', test.start);