Code Snippets

2D Mode

1
2
3
4
5
6
7
var pwa3d = new PhotoWall(el, {
  force2d:true,
  gal2d:{
    maxScale:0.75,
    distance:300
  }
});

Enable mouse drag

1
2
3
var pwa3d = new PhotoWall(el, {
  useMouseDrag:true
});

Curve outside wall

1
2
3
var pwa3d = new PhotoWall(el, {
  mode:'curveOutside'
});

Curve inside wall

1
2
3
var pwa3d = new PhotoWall(el, {
  mode:'curveInside'
});

General container size

1
2
3
4
5
6
var pwa3d = new PhotoWall(el, {
 mediaviewer:{
   containerWidth:500,
   containerHeight:300
 }
});

Custom AJAX processing

1
2
3
4
5
6
7
var pwa3d = new PhotoWall(el, {
 mediaviewer:{
   ajaxProcessor:function(con, req) {
     con.innerHTML = req.responseText;
   }
 }
});

Full width

1
2
3
4
5
<style>
   .rs-pwa3d {
      width:100%;
   }
</style>

Add event handlers

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
pwa3d.addEventListener('target', function(e) {
  console.log(e.detail);
});

pwa3d.addEventListener('cload', function(e) {
  console.log(e.detail);
});

pwa3d.addEventListener('cloadcomplete', function(e) {
  console.log(e.detail);
});

Create distributions

grunt dist

Build example files

grunt examples

Compile pug templates

grunt pug

Compile SASS

grunt compass

Watch files for changes

grunt watch