This site works A LOT better with JavaScript enabled!
This is the beta version of this site! Some things may not be working.

Fade Out

Run
var sceneIndex = 0; var game = new tine.Game(null, { preload: function() { game.load.image('morning', 'assets/scene-morning.png'); game.load.image('evening', 'assets/scene-evening.png'); game.load.image('night', 'assets/scene-night.png'); }, create: function() { // Create the scenes var scene1 = new tine.Scene(); scene1.addChild(game.create.bitmap('morning')); var scene2 = new tine.Scene(); scene2.addChild(game.create.bitmap('evening')); var scene3 = new tine.Scene(); scene3.addChild(game.create.bitmap('night')); // Add the scenes to the director game.director.add('0', scene1); game.director.add('1', scene2); game.director.add('2', scene3); game.director.replace('0'); }, update: function() { if (game.mouse.isPressed(tine.buttons.LEFT)) { sceneIndex = (++sceneIndex)%3; var ease = eases[tine.randomInt(0, 12)]; var time = tine.randomInt(200, 1200); game.director.replace( ''+sceneIndex, new tine.transitions.FadeOut(ease, time) ); } }, }) var eases = [ createjs.Ease.circIn, createjs.Ease.circInOut, createjs.Ease.circOut, createjs.Ease.bounceIn, createjs.Ease.bounceInOut, createjs.Ease.bounceOut, createjs.Ease.elasticIn, createjs.Ease.elasticInOut, createjs.Ease.elasticOut, createjs.Ease.linear, createjs.Ease.sineIn, createjs.Ease.sineInOut, createjs.Ease.sineOut ]