You can configure the maximum size of the material sample sphere by placing a
body-end.html file in the scene directory containing:
WALK.MATERIAL_PICKER_BALL_MAX_SIZE = 0.1;
0.1 means that a sphere can take at most 10% of the screen width, but can be made smaller to fit all the spheres in a row. You can adjust the value to make the spheres smaller or larger.
Unfortunately, this behavior cannot be implemented using the viewer API.