============= Code Snippets ============= 2D Mode ________ .. code-block:: javascript :linenos: var mg3d = new MosaicGallery(el, { useFullscreen:false, force2d:true, gal2d:{ maxScale:0.75, distance:300 } }); Enable autoplay ________________________ .. code-block:: javascript :linenos: var mg3d = new MosaicGallery(el, { useAutoplay:true }); Change gallery width and height _______________________________ .. code-block:: javascript :linenos: var mg3d = new MosaicGallery(el, { galleryWidth:1000, galleryHeight:600 }); Full Width __________ .. code-block:: css :linenos: Add event handlers __________________ .. code-block:: javascript :linenos: mg3d.addEventListener('target', function(e) { console.log(e.detail); }); mg3d.addEventListener('cload', function(e) { console.log(e.detail); }); mg3d.addEventListener('cloadcomplete', function(e) { console.log(e.detail); }); Create distributions ____________________ .. code-block:: html grunt dist Build example files ___________________ .. code-block:: html grunt examples Compile pug templates _____________________ .. code-block:: html grunt pug Compile SASS _____________ .. code-block:: html grunt compass Watch files for changes _______________________ .. code-block:: html grunt watch