forked from gdcc/dataverse-previewers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
323 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -81,6 +81,9 @@ The Spreadsheet Previewer was contributed by [anncie-pcss](https://github.com/an | |
|
||
[Jan Range](https://github.com/JR-1991) contributed the H5Web Previewer, Rich Html Previewer. | ||
|
||
[Paul Boon](https://github.com/PaulBoon) contributed the 3D Previewer. | ||
|
||
|
||
## How can I help? | ||
|
||
If you are interested in adding additional previewers, or in maintaining/enhancing existing ones, contact us at [[email protected]](mailto:[email protected]) or work through github to fork/make pull-requests against the repository. | ||
|
@@ -94,8 +97,7 @@ By committing code to the repository, Contributors are agreeing to make it avail | |
## Example Curl commands to configure these tools with your Dataverse instance. | ||
The examples configure Previewers from the specified location within https://github.io/gdcc/ corresponding to a given branch. To use older versions or locally installed versions of the previewers, you can change the "toolUrl" being used. | ||
|
||
|
||
Previewers v1.4 (with betatest versions of newer previewers as noted) | ||
Previewers v1.4 (with betatest versions of newer previewers as noted, e.g. 3D Previewer) | ||
- [Dataverse 6.1+](6.1curlcommands.md) - using SignedUrls | ||
- [Dataverse 5.2+](5.2curlcommands.md) - using API tokens, not recommended beyond Dataverse 6.0 | ||
|
||
|
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/[email protected]/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(); | ||
} |