-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from gdcc/develop
Releasing the 3D viewer in betatest
- Loading branch information
Showing
6 changed files
with
331 additions
and
9 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8"> | ||
<title class="textPreview">3D model Preview</title> | ||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> | ||
<script type="text/javascript" src="js/xss.js"></script> | ||
<script src="lib/jquery.i18n.js"></script> | ||
<script src="lib/jquery.i18n.messagestore.js"></script> | ||
<script src="lib/jquery.i18n.language.js"></script> | ||
<script type="text/javascript" src="js/retriever.js"></script> | ||
<!-- Latest compiled and minified CSS --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" | ||
integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"> | ||
<!-- Optional theme --> | ||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap-theme.min.css" | ||
integrity="sha384-6pzBo3FDv/PJ8r2KRkGHifhEocL+1X2rVCTTkUfGk7/0pbek5mMa1upzvWbrUbOZ" crossorigin="anonymous"> | ||
<link type="text/css" rel="stylesheet" href="css/preview.css" /> | ||
<!-- X_ITE, latest stable fixed version --> | ||
<script src="https://cdn.jsdelivr.net/npm/x_ite@9.5.2/dist/x_ite.min.js"></script> | ||
</head> | ||
|
||
<body class="container"> | ||
<main><img id='logo' alt='Site Logo'> | ||
<h1 class="page-title x3dPreview">3D model Preview</h1> | ||
<div class='preview-container'> | ||
<div class='preview-header'></div> | ||
<div class='preview'> | ||
<!-- Small because it is a preview, you can go full-screen via the menu if needed --> | ||
<x3d-canvas debug="true" id="x3dpreviewcanvas" style="width: 100%; height: 480px;"></x3d-canvas> | ||
</div> | ||
</div> | ||
</main> | ||
<script type="text/javascript" src="js/x3dview.js"></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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
$(document).ready(function() { | ||
startPreview(true); | ||
}); | ||
|
||
function translateBaseHtmlPage() { | ||
var x3dPreviewText = $.i18n( "x3dPreviewText" ); | ||
$( '.x3dPreviewText' ).text( x3dPreviewText ); | ||
} | ||
|
||
function writeContentAndData(data, fileUrl, file, title, authors) { | ||
addStandardPreviewHeader(file, title, authors); | ||
|
||
/** Human readable formats could also be displayed (as text or xml or json). | ||
options = {}; // Custom rules | ||
$('.preview').append($("<pre/>").html(filterXSS(data,options))); | ||
*/ | ||
|
||
var browser = X3D.getBrowser("x3d-canvas#x3dpreviewcanvas"); | ||
console.log("X3D Browser: " + browser.getName() + " " + browser.getVersion()); | ||
console.log("Start loading file: " + fileUrl); | ||
browser.loadURL(new X3D.MFString(fileUrl)); | ||
//browser.viewAll(); | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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