Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add FastNavPlugin.defaultScaleCanvasResolutionFactor #1426

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

xeolabs
Copy link
Member

@xeolabs xeolabs commented Mar 28, 2024

This PR extends FastNavPlugin with a new option, defaultScaleCanvasResolutionFactor, which sets the factor to which we restore the canvas resolution scale when we stop interacting with the viewer.

This allows us to use canvas resolution scaling for anti aliasing when we're not in fast navigation mode.

Usage

    const fastNavPlugin = new FastNavPlugin(viewer, {
        hideEdges: true,
        hideSAO: true,
        hideColorTexture: true,
        hidePBR: true,
        hideTransparentObjects: false,
        scaleCanvasResolution: true,
        defaultScaleCanvasResolutionFactor: 0.5,
        scaleCanvasResolutionFactor: 0.25,
        delayBeforeRestore: true,
        delayBeforeRestoreSeconds: 0.4
    });

@xeolabs xeolabs added this to the 2.6.0 milestone Mar 28, 2024
@xeolabs xeolabs merged commit 577bafe into master Mar 28, 2024
2 of 4 checks passed
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>xeokit Example</title>
<link href="../css/pageStyle.css" rel="stylesheet"/>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/js/all.min.js"></script>

Check warning

Code scanning / CodeQL

Inclusion of functionality from an untrusted source Medium

Script loaded from content delivery network with no integrity check.
@xeolabs xeolabs changed the title Add FastNavPlugin.defaultScaleCanvasResolutionFactor [FEATURE] Add FastNavPlugin.defaultScaleCanvasResolutionFactor Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant