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.
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);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With