├── .gitignore ├── Gruntfile.js ├── README.md ├── dist ├── css │ ├── image-gallery-three.min.css │ └── style.min.css ├── images │ ├── github.png │ ├── image1.jpg │ ├── image2.jpg │ ├── image3.jpg │ ├── image4.jpg │ ├── image5.jpg │ ├── image6.jpg │ └── image7.jpg ├── index.html └── js │ ├── assets.min.js │ └── image-gallery-three.min.js ├── package.json └── src ├── css ├── image-gallery-three.css └── style.css ├── images ├── github.png ├── image1.jpg ├── image2.jpg ├── image3.jpg ├── image4.jpg ├── image5.jpg ├── image6.jpg └── image7.jpg ├── index.html └── js ├── assets.js └── image-gallery-three.js /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /node_modules/ 3 | -------------------------------------------------------------------------------- /Gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 3 | grunt.initConfig({ 4 | pkg: grunt.file.readJSON('package.json'), 5 | replace: { 6 | example: { 7 | src: ['src/index.html'], // source files array (supports minimatch) 8 | dest: 'dist/', // destination directory or file 9 | replacements: [{ 10 | from: 'image-gallery-three.js', // string replacement 11 | to: 'image-gallery-three.min.js' 12 | },{ 13 | from: 'assets.js', // string replacement 14 | to: 'assets.min.js' 15 | },{ 16 | from: 'image-gallery-three.css', // string replacement 17 | to: 'image-gallery-three.min.css' 18 | },{ 19 | from: 'style.css', // string replacement 20 | to: 'style.min.css' 21 | }] 22 | } 23 | }, 24 | uglify: { 25 | dist: { 26 | files: { 27 | 'dist/js/image-gallery-three.min.js': ['src/js/image-gallery-three.js'], 28 | 'dist/js/assets.min.js': ['src/js/assets.js'] 29 | } 30 | } 31 | }, 32 | cssmin : { 33 | styles: { 34 | src: ['src/css/image-gallery-three.css'], 35 | dest: 'dist/css/image-gallery-three.min.css' 36 | }, 37 | styles: { 38 | src: ['src/css/style.css'], 39 | dest: 'dist/css/style.min.css' 40 | } 41 | } 42 | }); 43 | grunt.loadNpmTasks('grunt-text-replace'); 44 | grunt.loadNpmTasks('grunt-contrib-uglify'); 45 | grunt.loadNpmTasks('grunt-contrib-cssmin'); 46 | 47 | grunt.registerTask('default', ['replace', 'uglify', 'cssmin']); 48 | 49 | }; -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Image Gallery Threejs 2 | ===================== 3 | 4 | Threejs based Gallery/Slider Plugin for JQuery. 5 | This was forked from djankey's "WebGL Carousel - Three.js" http://jsdo.it/djankey/carousel_webgl it didn't have jquery handling on it as well as better handling of controls for customization. Works well on IOS ipad and iphone aswell ad desktop PCS. 6 | 7 | Required Libraries: 8 | ------- 9 | **Three.js** 10 | https://github.com/mrdoob/three.js/ 11 | 12 | **Stats.js** 13 | https://github.com/mrdoob/stats.js/ 14 | 15 | **TweenMax** 16 | http://www.greensock.com/gsap-js/ 17 | 18 | **PreloadJS** 19 | http://www.createjs.com/#!/PreloadJS 20 | 21 | Browser Compatibility 22 | ------ 23 | + Firefox - 30.0.0 + 24 | + Chrome - 35.0.0 + 25 | + Explorer: 9 + 26 | + Ipad Safari: 7.0.0 + 27 | + Iphone Safari: 7.0.0 + 28 | + IOS Safari: 7.0.0 + 29 | + Android Chrome: not tested help test :) 30 | + IOS Chrome: not tested help test :) 31 | 32 | [Demo](http://image-gallery-threejs.oso-link.com/) 33 | ------- 34 | 35 | Example 36 | ------- 37 | 38 | 54 |
55 | 56 | Options 57 | ------- 58 | 59 |62 | Name 63 | | 64 |65 | Type 66 | | 67 |68 | Default 69 | | 70 |71 | Description 72 | | 73 |74 | Example 75 | | 76 |||
---|---|---|---|---|---|---|
79 | manifest 80 | | 81 |82 | Array 83 | | 84 |85 | Null 86 | | 87 |88 | List of image paths 89 | | 90 |91 | [ 92 | {src:"image1.jpg", id:"image1"}, 93 | {src:"image2.jpg", id:"image2"}, 94 | {src:"image3.jpg", id:"image3"}, 95 | {src:"image4.jpg", id:"image4"}, 96 | {src:"image5.jpg", id:"image5"}, 97 | {src:"image6.jpg", id:"image6"}, 98 | {src:"image7.jpg", id:"image7"} 99 | ] 100 | | 101 |||
104 | | 105 |||||||
108 | imagePath 109 | | 110 |111 | String 112 | | 113 |114 | Null 115 | | 116 |117 | Path to the specific image listings 118 | | 119 ||||
122 | | 123 |||||||
126 | dx 127 | | 128 |129 | Number 130 | | 131 |132 | 300 133 | | 134 |135 | horizontal spacing of Images 136 | | 137 ||||
140 | | 141 |||||||
144 | dz 145 | | 146 |147 | Number 148 | | 149 |150 | 300 151 | | 152 |153 | Vertical spacing of Images 154 | | 155 ||||
158 | | 159 |||||||
162 | deltaRotation 163 | | 164 |165 | Number 166 | | 167 |168 | 45 169 | | 170 |171 | Degress Rotation of the non active images 172 | | 173 ||||
176 | | 177 |||||||
180 | planeSizeW 181 | | 182 |183 | Number 184 | | 185 |186 | 500 187 | | 188 |189 | Size of the plane Width 190 | | 191 ||||
194 | planeSizeH 195 | | 196 |197 | Number 198 | | 199 |200 | 500 201 | | 202 |203 | Size of the plane Height 204 | | 205 ||||
208 | | 209 |||||||
212 | alphaBackground 213 | | 214 |215 | Boolean 216 | | 217 |218 | true 219 | | 220 |221 | Setting if the background is transparent 222 | | 223 ||||
226 | | 227 |||||||
230 | antialias 231 | | 232 |233 | Boolean 234 | | 235 |236 | true 237 | | 238 |239 | Setting if the renderer processes the objects with antialias 240 | | 241 ||||
244 | | 245 |||||||
248 | progress 249 | | 250 |||||||
253 | - light 254 | | 255 |256 | Hex 257 | | 258 |259 | "#ff0000" 260 | | 261 |262 | Setting the color of the progress bar's light aspect 263 | | 264 ||||
267 | - ambientLight 268 | | 269 |270 | Hex 271 | | 272 |273 | "#ffffff" 274 | | 275 |276 | Setting the color of the progress bar's ambient light aspect 277 | | 278 ||||
281 | - position 282 | | 283 |284 | Array 285 | | 286 |287 | [0,100,0] 288 | | 289 |290 | Setting the position of the progress bar 291 | | 292 ||||
295 | | 296 |||||||
299 | stats 300 | | 301 |302 | Boolean 303 | | 304 |305 | false 306 | | 307 |308 | sets if stats is shown or hidden. 309 | | 310 ||||
313 | | 314 |||||||
317 | canvasWindow 318 | | 319 |320 | canvas 321 | | 322 |323 | sets canvas size 324 | | 325 |||||
328 | 329 | | 330 |331 | defaultWidth 332 | | 333 |334 | Integer 335 | | 336 |337 | 500 338 | | 339 ||||
342 | 343 | | 344 |345 | defaultHeight 346 | | 347 |348 | Integer 349 | | 350 |351 | 500 352 | | 353 |
362 | onImageLoadProgress 363 | | 364 |365 | Image load progress 366 | | 367 ||
370 | | 371 |||
374 | onImageLoadComplete 375 | | 376 |377 | Image load complete 378 | | 379 ||
382 | | 383 |||
386 | onImageLoad 387 | | 388 |389 | Image load initialization 390 | | 391 ||
394 | | 395 |||
398 | onNavigateComplete 399 | | 400 |401 | Navigation Complete 402 | | 403 ||
406 | | 407 |408 | Parameters 409 | | 410 ||
413 | | 414 |415 | obj 416 | | 417 |418 | active plane 419 | | 420 |
429 | Execution 430 | | 431 |432 | Description 433 | | 434 |||
---|---|---|---|
437 | <object>.next(); 438 | | 439 |440 | Animates to the next scene 441 | | 442 |||
445 | | 446 ||||
449 | <object>.prev(); 450 | | 451 |452 | Animates to the previous scene 453 | | 454 |||
457 | | 458 ||||
461 | <object>.goTo(<index>); 462 | | 463 |464 | Animates to the a specific scene 465 | | 466 |||
469 | | 470 |471 | Parameter 472 | | 473 |||
476 | | 477 |478 | index 479 | | 480 |481 | Number 482 | | 483 |484 | base zero position of the plane in an array. 485 | | 486 |
489 | | 490 |491 | Example 492 | | 493 |||
496 | | 497 |
498 | $(function(){ 499 | var box = $.ig3js({ 500 | manifest: [ 501 | {src:"image1.jpg", id:"image1"}, 502 | {src:"image2.jpg", id:"image2"}, 503 | {src:"image3.jpg", id:"image3"}, 504 | ], 505 | imagePath: 'images/', 506 | }); 507 | box.navigate.goTo(2); 508 | }); 509 | |
510 | ||
513 | | 514 ||||
517 | <object>.perspective.default(); 518 | | 519 |520 | Sets the camera perspective default 521 | | 522 |||
525 | | 526 ||||
529 | <object>.perspective.topRight(); 530 | | 531 |532 | Sets the camera perspective top right 533 | | 534 |||
537 | | 538 ||||
541 | <object>.perspective.topLeft(); 542 | | 543 |544 | Sets the camera perspective top left 545 | | 546 |