How to set performance and appearance settings in Autodesk Viewer?

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.

Answers:

Answer

I have figured out how to do this in my extension if anyone else was wondering

function MyExtension(viewer, options) {
    Autodesk.Viewing.Extension.call(this, viewer, options);
    // Preset performance settings
    viewer.setLightPreset(1);
    viewer.setQualityLevel(false, false);
    viewer.setGhosting(true);
    viewer.setGroundShadow(false);
    viewer.setGroundReflection(false);
    viewer.setEnvMapBackground(false);
    viewer.setProgressiveRendering(true);
}

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.