Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Update index-dev.html
Browse files Browse the repository at this point in the history
  • Loading branch information
vim-sroberge authored Aug 5, 2024
1 parent c7f2dc0 commit 24875bc
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions docs/index-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
? params.get('vim')
: null

VIMReact.createVimComponent(
loadVim,
undefined,
VIMReact.getLocalSettings(),
VIMReact.VIM.getViewerSettingsFromUrl(window.location.search)
)

async function loadVim (cmp) {
demo()
async function demo () {
await cmp = VIMReact.createVimComponent(
undefined,
VIMReact.getLocalSettings(),
VIMReact.VIM.getViewerSettingsFromUrl(window.location.search)
)

const time = Date.now()
const vim = await cmp.loader.open(
url ?? 'https://vim02.azureedge.net/samples/residence.v1.2.75.vim',
Expand All @@ -56,8 +56,6 @@
rotation: new VIMReact.THREE.Vector3(270, 0, 0)
}
)
vim.loadAll()

console.log(`Loading completed in ${((Date.now() - time)/1000).toFixed(2)} seconds`)
}
</script>
Expand Down

0 comments on commit 24875bc

Please sign in to comment.