Demo.prototype.sceneSigmaGoat = function () {
    this.setScene('sigmaGoat');


this.loader.addAnimation({
        image: 'goatbg.color.fbo',

    });

    this.loader.addAnimation({
        image: {
            name: 'images/goat_body.png'
        },
        perspective: '2d',
        position: [{
            x: -.14,
            y: () => -.14 + Math.sin(getSceneTimeFromStart() * 5) * .03,
            z: -1
        }],
        scale: [{ uniform2d: 1.5 }],
        color: [{
            r: 1.0,
            g: 1.0,
            b: 1.0,
            a: 1.0
        }],
        angle: [{
            degreesZ: ()=>  Math.sin(getSceneTimeFromStart() * 2) * 10
        }]
    });

    this.loader.addAnimation({
        image: {
            name: 'images/goat_head.png'
        },
        perspective: '2d',
        position: [{
            x: .03,
            y: () => -.02 + Math.sin(1 + getSceneTimeFromStart() * 5) * .03,
            z: 0
        }],
        scale: [{ uniform2d: 2 }],
        color: [{
            r: 1.0,
            g: 1.0,
            b: 1.0,
            a: 1.0
        }],
        angle: [{
            degreesZ: () => Sync.get('Goat:HeadRot') + Math.sin(getSceneTimeFromStart() * 5) * 10
        }]
    });



    this.loader.addAnimation({
        image: {
            name: 'images/sigma.png'
        },
        perspective: '2d',
        position: [{
            x: () => Sync.get('Goat:sigmaX')+.003,
            y: () => Sync.get('Goat:sigmaY'),
        }],
        scale: [{ uniform2d: 0.47 }],
        color: [{
            r: 0,
            g: 0,
            b: 0,
        }],
        angle: [{
            degreesZ: () => Sync.get('Goat:sigmaAngle')
        }]
    });
    this.loader.addAnimation({
        image: {
            name: 'images/sigma.png'
        },
        perspective: '2d',
        position: [{
            x: () => Sync.get('Goat:sigmaX')-.004,
            y: () => Sync.get('Goat:sigmaY'),
        }],
        scale: [{ uniform2d: 0.49 }],
        color: [{
            r: 0,
            g: 0,
            b: 0,
        }],
        angle: [{
            degreesZ: () => Sync.get('Goat:sigmaAngle')
        }]
    });
    this.loader.addAnimation({
        image: {
            name: 'images/sigma.png'
        },
        perspective: '2d',
        position: [{
            x: () => Sync.get('Goat:sigmaX'),
            y: () => Sync.get('Goat:sigmaY'),
        }],
        scale: [{ uniform2d: 0.48 }],
        color: [{
            r: () => {
                const changeIndex = Math.floor(getSceneTimeFromStart() / 0.1);
                Utils.setSeed(changeIndex * 1000);
                return Utils.random();
            },
            g: () => {
                const changeIndex = Math.floor(getSceneTimeFromStart() / 0.1);
                Utils.setSeed(changeIndex * 1000 + 10);
                return Utils.random();
            },
            b: () => {
                const changeIndex = Math.floor(getSceneTimeFromStart() / 0.1);
                Utils.setSeed(changeIndex * 1000 + 20);
                return Utils.random();
            },
        }],
        angle: [{
            degreesZ: () => Sync.get('Goat:sigmaAngle')
        }]
    });

    this.textWriter("SIGMA HITS the GOAT", {
        fontId: 0,
        y: .4,
        x: -.025,
        fontScale: 0.3,
        bgScaleY: .13,
        bgY: .04
    });

    this.addAnimationToMainScene({
        image: '💀',  // The emoji character itself
        perspective: '2d',
        position: [{ x: 0.18, y: .43, z: 0 }],
        scale: [{ uniform2d: 0.35 }],
        color: [{
            r: .0,
            g: .0,
            b: .0,
        }]
    });
    this.addAnimationToMainScene({
        image: '💀',  // The emoji character itself
        perspective: '2d',
        position: [{ x: 0.18, y: .43, z: 0 }],
        scale: [{ uniform2d: 0.33 }]
    });
};
