I have been having trouble using JavaScript to preset performance and appearance settings for the viewer. I wanted to pre-define some of the settings like anti-aliasing, and shadows to be off on load. I am new to this API and basically couldn't figure out how to instantiate the Viewer3D object.
finally I figured out the answer and posted it below.