Demo.prototype.sceneIntro7 = function () {
    this.setScene('intro7');
    Utils.setSeed(35);
    let amount = 25;
    // Generate sizes and sort from biggest to smallest
    let sizes = [];
    for (let i = 0; i < amount; i++) {
        sizes.push(Utils.random() * .55 + .05);
    }
    sizes.sort((a, b) => b - a);

    let directions = [];
    for (let i = 0; i < amount; i++) {
        let dir = Utils.random() < 0.5 ? -1 : 1;
        let strenght = Utils.random() * 1.0 + 1.0;
        directions.push(dir * strenght);
    }

    let yCoords = [];
    for (let i = 0; i < amount; i++) {
        yCoords.push(Utils.random() - 0.5);
    }
    for (let i = 0; i < amount; i++) {

        // Randomly assign one color below 0.25, one above 0.75, and one random
        let colors = [Utils.random(), Utils.random(), Utils.random()];
        let lowIndex = Math.floor(Utils.random() * 3);
        let highIndex = Math.floor(Utils.random() * 3);
        while (highIndex === lowIndex) {
            highIndex = Math.floor(Utils.random() * 3);
        }
        colors[lowIndex] = Utils.random() * 0.25;
        colors[highIndex] = 0.75 + Utils.random() * 0.25;

        let r = colors[0];
        let g = colors[1];
        let b = colors[2];
        let randomScaleTime = Utils.random() * 60;

        this.loader.addAnimation([{
            image: {
                name: 'scenes/flower.png'
            },
            perspective: '2d',
            position: [
                {
                    x: Utils.random() - 0.5,
                    y: () => yCoords[i] + Math.sin(getSceneTimeFromStart() + i) * .2,
                    z: 0
                }
            ],
            color: [{ r: r, g: g, b: b, a: 1.0 }],
            angle: [{ degreesZ: () => 90 * directions[i] * getSceneTimeFromStart() }],
            scale: [{ uniform2d: () => .1 * sizes[i] + sizes[i] * Math.abs(Math.sin(2.5 * getSceneTimeFromStart() + randomScaleTime)) }],

        }]);
    }
    this.cartoonText({ text: "JUMALAUTA", x: () => Math.sin(2 * getSceneTimeFromStart() + 1 -.1) * .5 , y: () => Math.sin(4 * getSceneTimeFromStart() + .1) * .5 + .15, scale: 3.0, start: 0, duration: 3 * window.pattern, invert:true });
    this.cartoonText({ text: "PRESENTS", x: () => Math.sin(2 * getSceneTimeFromStart() -.1) * .5 , y: () => Math.sin(4 * getSceneTimeFromStart()) * .5 - .15, scale: 3.0, start: 0, duration: 3 * window.pattern, invert:true });

    this.cartoonText({ text: "JUMALAUTA", x: () => Math.sin(2 * getSceneTimeFromStart() + 1) * .5 , y: () => Math.sin(4 * getSceneTimeFromStart() + .1) * .5 + .15, scale: 3.0, start: 0, duration: 3 * window.pattern });
    this.cartoonText({ text: "PRESENTS", x: () => Math.sin(2 * getSceneTimeFromStart()) * .5 , y: () => Math.sin(4 * getSceneTimeFromStart()) * .5 - .15, scale: 3.0, start: 0, duration: 3 * window.pattern });

    for (let i = 0; i < 8; i++) {
        let randomAngleOffset = Utils.random() * 360;
        this.loader.addAnimation([{
            object: {
                "name": "multiSceneEffects/obj_ak.obj"
            }
            , position: [{
                x:(Math.random() - 0.5)*4,
                y: (Math.random() - 0.5)*4,
                z: -2
            }]
            , scale: [{ "uniform3d": ()=> 1.0*Sync.get('Intro7:akScale') }]
            , angle: [{
                degreesZ: () => randomAngleOffset-145 * getSceneTimeFromStart(),
            }]
        }]);
    }
}