Download
1. INCLUDE CSS AND JS FILES
<link rel="stylesheet" type="text/css" media="screen,print" href="css/image-gallery-three.css" />
<script type='text/javascript' src='//code.jquery.com/jquery-1.10.1.js'></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/three.js/r58/three.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/PreloadJS/0.3.1/preloadjs.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenMax.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/stats.js/r11/Stats.js"></script>
2. HTML
<div class="box"></div>
3. JAVASCRIPT
$(function(){
var box = $(".box").ig3js({
manifest: [
{src:"image1.jpg", id:"image1"},
{src:"image2.jpg", id:"image2"},
{src:"image3.jpg", id:"image3"},
{src:"image4.jpg", id:"image4"},
{src:"image5.jpg", id:"image5"},
{src:"image6.jpg", id:"image6"},
{src:"image7.jpg", id:"image7"}
],
imagePath: 'images/',
alphaBackground: true,
onNavigateComplete: function(obj){
// console.log("navigation complete");
// console.log(obj);
}
});
});
4. OPTIONS
Name |
Type |
Default |
Description |
Example |
manifest |
Array |
Null |
List of image paths |
[ {src:"image1.jpg", id:"image1"}, {src:"image2.jpg", id:"image2"}, {src:"image3.jpg", id:"image3"}, {src:"image4.jpg", id:"image4"}, {src:"image5.jpg", id:"image5"}, {src:"image6.jpg", id:"image6"}, {src:"image7.jpg", id:"image7"} ] |
|
imagePath |
String |
Null |
Path to the specific image listings |
|
dx |
Number |
300 |
horizontal spacing of Images |
|
dz |
Number |
300 |
Vertical spacing of Images |
|
deltaRotation |
Number |
45 |
Degress Rotation of the non active images |
|
planeSize |
Number |
500 |
Size of the active plane |
|
alphaBackground |
Boolean |
true |
Setting if the background is transparent |
|
antialias |
Boolean |
true |
Setting if the renderer processes the objects with antialias |
|
progress |
- light |
Hex |
"#ff0000" |
Setting the color of the progress bar's light aspect |
- ambientLight |
Hex |
"#ffffff" |
Setting the color of the progress bar's ambient light aspect |
- position |
Array |
[0,100,0] |
Setting the position of the progress bar |
|
stats |
Boolean |
false |
sets if stats is shown or hidden. |
5. EVENTS
onImageLoadProgress |
Image load progress |
|
onImageLoadComplete |
Image load complete |
|
onImageLoad |
Image load initialization |
|
onNavigateComplete |
Navigation Complete |
|
Parameters |
|
obj |
active plane |
6. METHODS
Execution |
Description |
<object>.next(); |
Animates to the next scene |
|
<object>.prev(); |
Animates to the previous scene |
|
<object>.goTo(<index>); |
Animates to the a specific scene |
|
Parameter |
|
index |
Number |
base zero position of the plane in an array. |
|
Example |
|
$(function(){
var box = $(".box").ig3js({
manifest: [
{src:"image1.jpg", id:"image1"},
{src:"image2.jpg", id:"image2"},
{src:"image3.jpg", id:"image3"},
],
imagePath: 'images/',
});
box.navigate.goTo(2);
});
|
|
<object>.perspective.default(); |
Sets the camera perspective default |
|
<object>.perspective.topRight(); |
Sets the camera perspective top right |
|
<object>.perspective.topLeft(); |
Sets the camera perspective top left |