Prevented 3d canvas rendered when there is no display.