It seems you draw everything every frame onto the canvas? The result is quite GPU heavy, for your next game I would recommend looking into a graphic libary like pixijs, to make use of the webgl/webgpu .. then it would run smooth even on old mobile phones.
It seems you draw everything every frame onto the canvas? The result is quite GPU heavy, for your next game I would recommend looking into a graphic libary like pixijs, to make use of the webgl/webgpu .. then it would run smooth even on old mobile phones.