Add fullscreen example.
This commit is contained in:
parent
01a2fb338a
commit
2241159502
56
embeddable/fullscreen.html
Normal file
56
embeddable/fullscreen.html
Normal file
@ -0,0 +1,56 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
|
||||
"http://www.w3.org/TR/html4/strict.dtd">
|
||||
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8">
|
||||
<script type="text/javascript" src="../../build/three.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="include/importer.css">
|
||||
<link rel="stylesheet" type="text/css" href="include/floatingdialog.css">
|
||||
|
||||
<style>
|
||||
html, body
|
||||
{
|
||||
width : 100%;
|
||||
height : 100%;
|
||||
margin : 0px;
|
||||
padding : 0px;
|
||||
}
|
||||
|
||||
canvas
|
||||
{
|
||||
display : block;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript" src="../jsmodeler/three.min.js"></script>
|
||||
<script type="text/javascript" src="../jsmodeler/jsmodeler.js"></script>
|
||||
<script type="text/javascript" src="include/online3dembedder.js"></script>
|
||||
<script type="text/javascript">
|
||||
function OnResize ()
|
||||
{
|
||||
var canvas = document.getElementById ('fullscreen');
|
||||
canvas.width = document.body.clientWidth;
|
||||
canvas.height = document.body.clientHeight;
|
||||
}
|
||||
|
||||
function OnLoad ()
|
||||
{
|
||||
OnResize ();
|
||||
LoadOnline3DModels ();
|
||||
}
|
||||
|
||||
window.addEventListener ('load', OnLoad, true);
|
||||
window.addEventListener ('resize', OnResize, true);
|
||||
</script>
|
||||
<title>Online 3D Viewer</title>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<canvas id="fullscreen" class="3dviewer" sourcefiles="testfiles/texturedcube.obj|testfiles/texturedcube.mtl|testfiles/texture.png" width="200" height="200"></canvas>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue
Block a user