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

Ability to cancel XKT model loading #565

Closed
xeolabs opened this issue Feb 3, 2021 · 0 comments
Closed

Ability to cancel XKT model loading #565

xeolabs opened this issue Feb 3, 2021 · 0 comments
Assignees
Milestone

Comments

@xeolabs
Copy link
Member

xeolabs commented Feb 3, 2021

When using XKTLoaderPlugin#load, make it possible to call PerformanceModel#destroy() on the model, while the model is still loading. This is effectively a "cancel loading" capability.

Previously, we needed to actually wait for a model to finish loading before we can call destroy() on it, as shown below. The problem here is that the whole model (and possibly metadata) needs to be loaded into the Viewer before we're allowed to destroy it, which is wasteful and might create a rough user experience.

const model = xktLoader.load(...);

model.on("loaded", ()=> {
    model.destroy();
});

Now we can just do this, if we need to:

const model = xktLoader.load(...);

model.destroy();
@xeolabs xeolabs self-assigned this Feb 3, 2021
@xeolabs xeolabs changed the title Allow call to PerformanceModel#destroy() while model still loading Ability to cancel XKT model loading Feb 4, 2021
xeolabs added a commit that referenced this issue Feb 4, 2021
@xeolabs xeolabs added this to the 1.7.0 milestone Feb 17, 2021
@xeolabs xeolabs closed this as completed Feb 17, 2021
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

No branches or pull requests

1 participant