I am trying to create a zooming image tool and for this I am using matrix3d with glMAtrix https://glmatrix.net/ I have the following components: canvas (black) which represents the final view smaller resizable rectangle (red) inside canvas an image inside a div (blue with text) behind the canvas which at the beginning has the same position and dimension as the