New Stuff

JSON Tool - 02/01/2023


v1.0

Sprite Tool - 27/12/2022


v2.0

Sprite Tool - 22/12/22


v1.0

Changes to the movie ratings page - 21/12/2022


Movie Page

Script Development

you can find the repo for the project plus instructions of how to use it by clicking here.

Resolution reduction for slower computers - 21/12/2022


To improve performance on slower computers, I added a feature that reduces the resolution of the render if the frames per second (fps) fall below a certain threshold.

Changes Made:

Example:

  
    // Declare this at the start of your script
    let fps = 0;
    let lastTime = Date.now();
    
    function animate() {
      // Calculate fps
      fps = 1000 / (Date.now() - lastTime);
      lastTime = Date.now();
    
      // Check if fps is below threshold and reduce resolution if necessary
      if (fps < 20) {
        renderer.setSize(window.innerWidth / 2, window.innerHeight / 2);
      } else {
        renderer.setSize(window.innerWidth, window.innerHeight);
      }
    
      // your animated functions
    
      // Delay the next frame by 33.3 milliseconds to achieve a target fps of 30
      setTimeout(function () {
        requestAnimationFrame(animate);
      }, 33.3);
    }
  

This will reduce the resolution by 50% if the fps falls below 20, and will cap the fps at 30. If You plan to use the code above for your proejcts, feel free to adjust the threshold and the amount of reduction to your liking.