Exemplo n.º 1
0
            var transform = Stream.lift(function(angle, scrollData, deleteShift){
                if (!scrollData) return false; // This is a bug, sorry!

                // Create the receding effect based on distance from the top tab
                var topShift = Math.exp(scrollData.index - options.index + scrollData.progress) - 1;
                topShift = Math.max(Math.min(topShift, 2), -0.2);

                var x = deleteShift;
                var y = 20 * topShift;
                var z = this.selected ? 0 : -100 * topShift;

                // Rotate the tab, then translate based on the receding effect and the deletion shift
                return Transform.thenMove(
                    Transform.rotateX(angle),
                    [x, y, z]
                );
            }.bind(this), [this.angle, this.input, this.deleteShift]);
Exemplo n.º 2
0
 transform: this.length.map(function (length) {
     return Transform.thenMove(
         Transform.rotateX(Math.PI),
         [0, 0, -length / 2]
     );
 })
Exemplo n.º 3
0
 transform: this.length.map(function (length) {
     return Transform.thenMove(
         Transform.rotateX(-Math.PI / 2),
         [0, length / 2, 0]
     )
 })
Exemplo n.º 4
0
 var rotation = angle.map(function (angle) {
     return Transform.compose(
         Transform.rotateX(angle),
         Transform.rotateY(angle)
     );
 });