This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| obj = | |
| x: 8 + 15 | |
| y: 8 + 15 | |
| width: 100 | |
| height: 200 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| obj2 = | |
| x: 10, y: 20 | |
| width: 300, height: 400 | |
| obj3 = { x: 2, y: 4, width: 6, height: 8 } | |
| obj4 = x: 2, y: 4, width: 6, height: 8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Размер экрана у девайса | |
| Screen.width | |
| Screen.height | |
| # Слой во весь экран | |
| rect = new Layer | |
| width: Screen.width | |
| height: Screen.height | |
| ellipse = new Layer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for i in [1...10] | |
| x = i * i | |
| print x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| background = new BackgroundLayer backgroundColor: "#DDD" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| square = new Layer | |
| width: 250, height: 250 | |
| backgroundColor: "#FFF", borderRadius: 25 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| square.states.animationOptions = | |
| curve: "spring(250,25,0)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| square.center() | |
| square.states.add | |
| second: scale: 1.5, rotation: 225 | |
| third: scale: 0.5, blur: 25, borderRadius: 250 | |
| square.on Events.Click, -> | |
| square.states.next() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var getDuration = function (speed, distance) { | |
| var time = distance / speed; | |
| return time; | |
| } | |
| var duration = getDuration(25, 300); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| getDuration = (speed, distance) -> | |
| speed / distance | |
| duration = getDuration 25, 300 |