Skip to content

Commit

Permalink
3DHOP 1.0
Browse files Browse the repository at this point in the history
3D Heritage Online Presenter
  • Loading branch information
potenziani committed Jul 2, 2015
0 parents commit 18bed78
Show file tree
Hide file tree
Showing 61 changed files with 23,033 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Auto detect text files and perform LF normalization
* text=auto

# Txt files CRLF normalization
*.txt eol=crlf

# Custom for Visual Studio
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
43 changes: 43 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
76 changes: 76 additions & 0 deletions 3dhop.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta content="charset=UTF-8"/>
<title>3DHOP</title>
<!--STYLESHEET-->
<link type="text/css" rel="stylesheet" href="stylesheet/3dhop.css"/>
<!--SPIDERGL-->
<script type="text/javascript" src="js/spidergl.js"></script>
<!--JQUERY-->
<script type="text/javascript" src="js/jquery-1.11.0.min.js"></script>
<!--PRESENTER-->
<script type="text/javascript" src="js/presenter.js"></script>
<!--3D MODELS LOADING AND RENDERING-->
<script type="text/javascript" src="js/nexus.js"></script>
<script type="text/javascript" src="js/ply.js"></script>
<!--TRACKBALLS-->
<script type="text/javascript" src="js/trackball_sphere.js"></script>
<script type="text/javascript" src="js/trackball_turntable.js"></script>
<script type="text/javascript" src="js/trackball_pantilt.js"></script>
<!--UTILITY-->
<script type="text/javascript" src="js/init.js"></script>
</head>
<body>
<div id="3dhop" class="tdhop" onmousedown="if (event.preventDefault) event.preventDefault()"><div id="tdhlg"></div>
<div id="toolbar">
<img id="home" title="Home Position" src="skins/dark/home.png"/><br/>
<img id="zoomin" title="Zoom In" src="skins/dark/zoomin.png"/><br/>
<img id="zoomout" title="Zoom Out" src="skins/dark/zoomout.png"/><br/>
<img id="light" title="Light Control" src="skins/dark/light.png"/><br/>
</div>
<canvas id="draw-canvas" style="background-image: url(skins/light/background.png)"/>
</div>
</body>

<script type="text/javascript">
var presenter = null;

function setup3dhop() {
presenter = new Presenter("draw-canvas");

presenter.setScene({
meshes: {
"Axis" : { url: "models/singleres/axis.ply" }
},
modelInstances : {
"Model1" : { mesh : "Axis" }
},
trackball: {
type : TurnTableTrackball
},
space: {
centerMode: "explicit",
radiusMode: "explicit",
explicitCenter: [0.0, 0.0, 0.0],
explicitRadius: 100.0
}
});
}

function actionsToolbar(action) {
switch(action) {
case 'home' : presenter.resetTrackball(); break;
case 'zoomin' : presenter.zoomIn(); break;
case 'zoomout': presenter.zoomOut(); break;
case 'light' : presenter.enableLightTrackball(!presenter.isLightTrackballEnabled()); lightSwitch(); break;
}
}

$(document).ready(function(){
init3dhop();

setup3dhop();
});
</script>
</html>
16 changes: 16 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
3DHOP - 3D Heritage Online Presenter
Copyright (c) 2014, Marco Callieri - Visual Computing Lab, ISTI - CNR
All rights reserved.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
94 changes: 94 additions & 0 deletions README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
3D Heritage Online Presenter - README FILE

3DHOP by Visual Computing Laboratory - ISTI - CNR [http://vcg.isti.cnr.it/]

Marco Callieri [marco[DOT]callieri[AT]isti[DOT]cnr[DOT]it]
Massimiliano Corsini [massimiliano[DOT]corsini[AT]isti[DOT]cnr[DOT]it]
Marco Potenziani [marco[DOT]potenziani[AT]isti[DOT]cnr[DOT]it]

27 January 2014

CONTENTS
I. CONTENTS LIST
II. HOW TO INSTALL
III. TECHNICAL INFO

I. CONTENTS LIST

Essential Version
------------
js folder with the 3DHOP necessary JavaScript files
models folder with the 3DHOP single and multi resolution models
skins folder with the 3DHOP toolbar and background graphic elements files
stylesheet folder with the 3DHOP CSS file
3dhop.html 3DHOP basic HTML file
README.txt This file

Full Version
------------
howto folder with the 3DHOP HTML HOW TO files list
js folder with the 3DHOP necessary JavaScript files
models folder with the 3DHOP single and multi resolution models
skins folder with the 3DHOP toolbar and background graphic elements files
stylesheet folder with the 3DHOP CSS file
3dhop.html 3DHOP basic HTML file
README.txt This file


II. HOW TO INSTALL

There is no installation: just copy the 3DHOP folder into your server project path
and link or embed the viewer in yours project pages.

3DHOP is a tool designed for the Web, so it requires to be embedded in an HTML environment to work.
However if you want to run 3DHop in local on your PC you can choose between two ways:

1. Web server
------------
The best way to test the 3DHOP features on your PC is to install a Web server (http://en.wikipedia.org/wiki/Web_server) .
Actually the most popular Web server on the Internet is the Apache HTTP Server ("httpd") by The Apache Software Foundation
(please refer to the project Web site http://httpd.apache.org/ to download and to know how to install it).
Once installed the Web server there are just a few step to run 3DHOP:
� download and unpack 3DHOP on your PC;
� copy the 3DHOP folder in the Web Server root directory;
� open your browser and with it go to the localhost IP address;
� browse the localhost directory and select the 3DHOP folder;
� click the desired HTML files inside 3DHOP and you are done!

[Tip: to install a Web server in a more simple way exist several applications, like XAMPP (http://www.apachefriends.org/index.html)
or BITNAMI WAMP Stack (http://bitnami.com/stack/wamp) , that can do this for you...]

2. Direct link
------------
The simplest way to test the 3DHOP features on your PC without install nothing is to allow
your browser to access local files on your file system (this practice is disabled by default due to security risk).
The trick to solve this issue is simple but restricted only at the Google CHROME or OPERA browsers.
So, let's look how to do this for these two browsers:
� browse to google CHROME (or OPERA) directory in your local file system;
� right click on the CHROME (or OPERA) executable file, and select "send to" Desktop as link in the contextual menu;
� browse to your desktop;
� right click on the just created CHROME (or OPERA) executable link, and select "properties" in the contextual menu;
� in the just opened properties window select the "shortcut" tab and edit the "target" field adding to the end
of the line " --allow-file-access-from-files", then click on "apply";
� open your browser from the just edited link on the desktop (now the browser should be enabled
to open local files);
� download and unpack 3DHOP on your PC;
� browse the 3DHOP folder and simply drag and drop the desired HTML files inside the opened browser and you are done!

[Tip: on the FIREFOX browser no simple way to enable the local files loading are provided
(so is recommended to install a Web browser if you can use only this browser).
However, by default it supports the use of 3D models in Ply format, so you can use 3DHOP in a limited mode,
restricted to single resolution models, but without to perform any procedure or to install nothing.]


III. TECHNICAL INFO

A WebGL-enabled browser is needed to run 3DHOP. Please refer to this page for a quick HOWTO:
http://www.khronos.org/webgl/wiki/Getting_a_WebGL_Implementation

If you need technical assistance about 3DHOP, visit the project website at
http://vcg.isti.cnr.it/3dhop/

3DHOP software is released under the GPL license.


52 changes: 52 additions & 0 deletions howto/0.0_html_environment.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta content="charset=UTF-8"/>
<title>3DHOP</title>
<!--STYLESHEET-->
<link type="text/css" rel="stylesheet" href="../stylesheet/3dhop.css"/>
<!--SPIDERGL-->
<script type="text/javascript" src="../js/spidergl.js"></script>
<!--JQUERY-->
<script type="text/javascript" src="../js/jquery-1.11.0.min.js"></script>
<!--PRESENTER-->
<script type="text/javascript" src="../js/presenter.js"></script>
<!--UTILITY-->
<script type="text/javascript" src="../js/init.js"></script>
<!--3D MODELS LOADING AND RENDERING-->
<script type="text/javascript" src="../js/nexus.js"></script>
<script type="text/javascript" src="../js/ply.js"></script>
<!--TRACKBALLS-->
<script type="text/javascript" src="../js/trackball_turntable.js"></script>
<script type="text/javascript" src="../js/trackball_pantilt.js"></script>
<script type="text/javascript" src="../js/trackball_sphere.js"></script>
</head>
<body>
<div id="3dhop" class="tdhop" onmousedown="if (event.preventDefault) event.preventDefault()"><div id="tdhlg"></div>
<canvas id="draw-canvas" style="background-image: url(../skins/light/background.png)"/>
</div>
</body>

<script type="text/javascript">
var presenter = null;

function setup3dhop() {
presenter = new Presenter("draw-canvas");

presenter.setScene({
meshes: {
"Gargoyle" : { url: "../models/singleres/gargo.ply" }
},
modelInstances : {
"Model1" : { mesh : "Gargoyle" }
}
});
}

$(document).ready(function(){
init3dhop();

setup3dhop();
});
</script>
</html>
71 changes: 71 additions & 0 deletions howto/1.0_canvas_personalization.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<!DOCTYPE>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta content="charset=UTF-8"/>
<title>3DHOP</title>
<!--STYLESHEET-->
<link type="text/css" rel="stylesheet" href="../stylesheet/3dhop.css"/>
<!--SPIDERGL-->
<script type="text/javascript" src="../js/spidergl.js"></script>
<!--JQUERY-->
<script type="text/javascript" src="../js/jquery-1.11.0.min.js"></script>
<!--PRESENTER-->
<script type="text/javascript" src="../js/presenter.js"></script>
<!--3D MODELS LOADING AND RENDERING-->
<script type="text/javascript" src="../js/nexus.js"></script>
<script type="text/javascript" src="../js/ply.js"></script>
<!--TRACKBALLS-->
<script type="text/javascript" src="../js/trackball_turntable.js"></script>
<script type="text/javascript" src="../js/trackball_pantilt.js"></script>
<script type="text/javascript" src="../js/trackball_sphere.js"></script>
<!--UTILITY-->
<script type="text/javascript" src="../js/init.js"></script>
</head>
<body>
<div id="3dhop" class="tdhop" onmousedown="if (event.preventDefault) event.preventDefault()"><div id="tdhlg"></div>
<div id="toolbar">
<img id="home" title="Home Position" src="../skins/dark/home.png"/><br/>
<img id="zoomin" title="Zoom In" src="../skins/dark/zoomin.png"/><br/>
<img id="zoomout" title="Zoom Out" src="../skins/dark/zoomout.png"/><br/>
<img id="light" title="Light Control" src="../skins/dark/light.png"/><br/>
</div>
<canvas id="draw-canvas" style="background-image: url(../skins/light/background.png)"/>
</div>
</body>

<script type="text/javascript">
var presenter = null;

function setup3dhop() {
presenter = new Presenter("draw-canvas");

presenter.setScene({
meshes: {
"Gargoyle" : { url: "../models/multires/gargo.nxs" }
},
modelInstances : {
"Model1" : { mesh : "Gargoyle" }
}
});
}

function actionsToolbar(action) {
switch(action) {
case 'home' : presenter.resetTrackball(); break;
case 'zoomin' : presenter.zoomIn(); break;
case 'zoomout': presenter.zoomOut(); break;
case 'light' : presenter.enableLightTrackball(!presenter.isLightTrackballEnabled()); lightSwitch(); break;
}
}

$(document).ready(function(){
init3dhop();

setup3dhop();

resizeCanvas(800,600); //optional [horizontal and vertical resolution (in pixel)] [default full screen]

moveToolbar(20,20); //optional [left and top margin (in pixel)] [default: 20,20 (px)]
});
</script>
</html>
Loading

0 comments on commit 18bed78

Please sign in to comment.