Sure, here's a simple 3D racing game implemented as a single HTML file with JavaScript:
In this game, you can control the car using the left and right arrow keys on your smartphone. The goal is to reach the finish line represented by a red line at the top of the canvas. The car is represented by a rectangle that moves horizontally within the canvas.