Stacks the renderables on top of each other
with a z-translation of this.options.zIndexOffset.
function ViewStackLayout(context, options) {
        var set = {
            size: context.size,
            translate: [0, 0, 0]
        };
        this._size[0] = context.size[0];
        this._size[1] = context.size[1];
        var views = context.get('views');
        var transferables = context.get('transferables');
        var visibleCount = 0;
        for (var i = 0; i < views.length; i++) {
            var item = this._viewStack[i];
            switch (item.state) {
                case ItemState.HIDDEN:
                    context.set(views[i], {
                        size: context.size,
                        translate: [context.size[0] * 2, context.size[1] * 2, 0]
                    });
                    break;

                case ItemState.HIDE:
                case ItemState.HIDING:
                case ItemState.VISIBLE:
                case ItemState.SHOW:
                case ItemState.SHOWING:
                    if (visibleCount < 2) {
                        visibleCount++;

                        // Layout view
                        var view = views[i];
                        context.set(view, set);

                        // Layout any transferables
                        for (var j = 0; j < transferables.length; j++) {
                            for (var k = 0; k < item.transferables.length; k++) {
                                if (transferables[j].renderNode === item.transferables[k].renderNode) {
                                    context.set(transferables[j], {
                                        translate: [0, 0, set.translate[2]],
                                        size: [context.size[0], context.size[1]]
                                    });
                                }
                            }
                        }

                        // Increase z-index for next view
                        set.translate[2] += options.zIndexOffset;
                    }
                    break;
            }
        }
    }