
Demo.prototype.sceneEnd = function () {
  this.setScene('end');



  this.loader.addAnimation([{
    image: {
      name: 'images/end_bg.png'
    },
    perspective: '2d',
    position: [{
      x: () => 0,
      y: () => 0,
      z: 0
    }],


  }]);

  let mouseOverScale = 0;
  this.loader.addAnimation([{
    image: {
      name: 'images/end_subscribe.png'
    },
    cursor:{
      onmouseover: () => {
        mouseOverScale = 0.3;
      }
    },
    perspective: '2d',
    position: [{
      x: () => 0,
      y: -.05,
      z: 0
    }],
    runPreFunction: () => {
      if ((new DemoEngine.LoadingBar()).isLoading() == false) {
        const canvas = document.getElementById('canvas');
        if (canvas) {
          canvas.style.margin = '0px';
          canvas.style.cursor = 'auto';
          canvas.onclick = () => {
            window.open('https://www.youtube.com/@jumalauta3853', '_blank');
          }
        }
      }
    },
    runFunction: () => {
       //if (Effect.loading === false) {
       // window.open('https://www.youtube.com/channel/UCWzFqLZL2G8nKXH8c9l7rQ', '_blank');
    },
    angle: [{
      degreesZ: () => Math.sin(getSceneTimeFromStart()*2) * -7
    }],
    scale: [{ uniform2d: ()=> 1 + Math.sin(getSceneTimeFromStart()*2) * 0.1 + mouseOverScale }],
    material: { blending: 'NormalBlending', transparent: true, depthWrite: false },
  }]);



};
