Edit;
Check out the working codepen (you'll need to provide a video file to avoid cross-origin policy)
https://codepen.io/bw1984/pen/pezOXm
I'm currently trying to adapt the amazing rutt etra example from to utilize video (using threejs), but I'm running into performance issues.
While my code seems to work smoothly on Chrome in my MacBook Pro, there's a noticeable slow memory leak, possibly due to the heavy processing required by getImageData. The issue becomes more prominent when I try to refresh the tab, indicating a possible relationship with Chrome's garbage collection. Is there a way to offload this heavy processing to the GPU instead of burdening the CPU?
I'm wondering if there are any obvious optimizations I might be missing in my code, or if the performance challenges I'm encountering are expected given the nature of my project.
I'm solely interested in WebGL/Chrome functionality, so I don't need to worry about browser compatibility issues.
<script>
// JavaScript code here
</script>
Any assistance or guidance would be greatly appreciated, as I'm still exploring this technology and have been struggling to grasp it fully.