
Demo.prototype.sceneFruitsVeggies = function () {

  this.setScene('fruitsVeggies');




      this.loader.addAnimation({
        image: ['backgroundEffect.color.fbo'],
        perspective: '3d',

        scale: [{ uniform3d: 18.0}],
        position:[{"x":0,"y":0,"z":45}],
        angle:[{
          degreesX:()=>180+2.5*Math.sin(-1.5*getSceneTimeFromStart()),
          degreesZ:()=>6.5*Math.sin(-1.5*getSceneTimeFromStart()*2.0)
         }],
        
        textureProperties: [{},{minFilter: 'LiunearFilter', magFilter: 'LinearFilter'}],
    });
  
    this.loader.addAnimation({
      image: ['bg/bg_overlay_1.png'],
      perspective: '3d',
      "color":[{
        "r":0.0,
        "g":0.0,
        "b":0.0
      }],
      scale: [{ uniform3d: ()=>18.0+2*Math.sin(-4*getSceneTimeFromStart())}],
      position:[{"x":5,"y":5,"z":42}],
      angle:[{
        degreesX:180,
        degreesZ:()=>66.5*Math.sin(.5*getSceneTimeFromStart()*2.0)
       }],
      
      textureProperties: [{},{minFilter: 'LiunearFilter', magFilter: 'LinearFilter'}],
  });

  this.loader.addAnimation({
    image: ['bg/bg_overlay_1.png'],
    perspective: '3d',

    scale: [{ uniform3d: ()=>18.0+2*Math.sin(4*getSceneTimeFromStart())}],
    position:[{"x":-5,"y":-5,"z":42}],
    angle:[{
      degreesX:180,
      degreesZ:()=>-66.5*Math.sin(.5*getSceneTimeFromStart()*2.0)
     }],
    
    textureProperties: [{},{minFilter: 'LiunearFilter', magFilter: 'LinearFilter'}],
});

    
      let objects = ["obj_kurk.obj", "obj_banana.obj", "obj_carrot.obj", "obj_myski.obj", "obj_munis.obj", "obj_peach.obj"];
      let objectSyncs = ["Kurk", "Bana", "Pork", "Mysk", "Muna", "Peach"];
      let syncNames = [];


  
        for (let i = 0; i<objects.length;i++)
        {
          let xSyncName = 'Veggies:'+objectSyncs[i]+'X';
          let ySyncName = 'Veggies:'+objectSyncs[i]+'Y';
          let zSyncName = 'Veggies:'+objectSyncs[i]+'Z';
          let xDegSyncName = 'Veggies:'+objectSyncs[i]+'XDeg';
          let zDegSyncName = 'Veggies:'+objectSyncs[i]+'ZDeg';
          let yDegSyncName = 'Veggies:'+objectSyncs[i]+'YDeg';
          this.loader.addAnimation([{
            "id":objectSyncs[i]+"Parent",
            "object":null,
            "position":[{
              "x":()=>Sync.get(xSyncName),
              "y":()=>Sync.get(ySyncName),
              "z":()=>Sync.get(zSyncName),
            }],
            "angle":[{
              "degreesX":()=>Sync.get(xDegSyncName),
              "degreesZ":()=>Sync.get(zDegSyncName),
              "degreesY":()=>Sync.get(yDegSyncName)
            }]
          }]);

          let sinRotName = 'Veggies:'+objectSyncs[i]+'SinRot';
          
          this.loader.addAnimation([{
            "parent":objectSyncs[i]+"Parent",
            "object":{
                "name":objects[i]
              }
            ,"position":[{
                "x":0,
                "y":1,
                "z":0,
            }]
            ,"color":[{
                "r":1.0,
                "g":1.0,
                "b":1.0
            }]
            ,"scale":[{"uniform3d":.75}]
            ,"angle":[{
             // "degreesX":()=>Sync.get(sinRotName)*(30),
              "degreesY":()=>Sync.get(sinRotName)*(60),
              "degreesZ":()=>Sync.get(sinRotName)*(120)
            }]
          }]);
      }
}
