This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into sroberge/2_0_6
- Loading branch information
Showing
9 changed files
with
108 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<!-- | ||
Copyright (c) 2021 VIMaec LLC | ||
This code is licensed under MIT license | ||
This is a demonstration of the VIM 3D Model viewer and VIM file loader built using Three.JS | ||
For more information and the latest version see: http://www.github.com/vimaec/vim-webgl-viewer | ||
--> | ||
<html> | ||
<head> | ||
<style> | ||
/*Makes full screen and remove scrollbars*/ | ||
html, | ||
body { | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
overflow: hidden; | ||
/*This prevents touches from being eaten up by the browser.*/ | ||
touch-action: none; | ||
} | ||
</style> | ||
<title>VIM 3D Model Viewer</title> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" | ||
/> | ||
</head> | ||
<body> | ||
<div id="vim-app"></div> | ||
|
||
<script> | ||
window.process = { env: { NODE_ENV: 'development' } }; | ||
</script> | ||
<script src="https://unpkg.com/react@18.2.0/umd/react.development.js"></script> | ||
<script src="https://unpkg.com/react-dom@18.2.0/umd/react-dom.development.js"></script> | ||
<script src="https://unpkg.com/vim-ultra-viewer@0.0.21"></script> | ||
<script> | ||
const container = document.getElementById('vim-app'); | ||
|
||
// Parse URL for source file | ||
const params = new URLSearchParams(window.location.search) | ||
const url = params.has('vim') | ||
? params.get('vim') | ||
: null | ||
|
||
load(url ?? "https://vim02.azureedge.net/samples/residence.v1.2.75.vim") | ||
|
||
async function load (url) { | ||
const ref = await ULTRA.createComponent(container) | ||
await ref.connect() | ||
const request = ref.load(url) | ||
await request.wait() | ||
if(request.isSuccess()){ | ||
const vim = request.getVim() | ||
ref.viewer.frameAll(0) | ||
} | ||
if(request.isError()){ | ||
console.error('Could not open vim file at: ' + url) | ||
} | ||
} | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters