some minor js code cleanup on 3d cube testcase