HTML
<!--if you click on it, it'll change speed-->
<!--if you want to use the drag and drop option head over my codepen, codepad won't allow me to add the function in the html for some reason-->
<div id="kalos">
<div class="kaleidoscope">
</div>
<nav id="floating">
<ul>
<li><span id="fullscreen">Fullscreen</span></li>
</ul>
</nav>
</div>
SCSS
$default-prefixes: webkit moz ms o;
@mixin prefix-values($property, $value, $prefixes: $default-prefixes) {
@each $prefix in $prefixes {
-#{$prefix}-#{$property}: #{$value};
}
#{$property}: #{$value};
}
@mixin transform-origin ($x: left, $y: top) {
$values: #{$x} #{$y};
@include prefix-values('transform-origin', $values);
}
@mixin transform-rotate ($degrees) {
$value: rotate($degrees);
@include prefix-values('transform', $value);
}
@mixin transform-mirror-rotate ($degrees) {
$values: scale(-1, 1) rotate($degrees);
@include prefix-values('transform', $values);
}
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color: #111;
font-family: sans serif;
font-size: 10pt;
}
.kaleidoscope {
width: 100%;
height: 100%;
.tile {
display: none;
position: absolute;
top: 50%;
left: 0;
z-index: 0;
overflow: hidden;
height: 100%;
width: 50%;
@include transform-origin(right, top);
.image {
position: relative;
top: 0;
left: 100%;
height: 100%;
width: 100%;
background-image: url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUTExMVFhUXFRUYFxcXGBkXFRkVGBcWFxcYGBcYHiogGBolGxcWITEiJikrOi4vGh8zODMtOCgtLisBCgoKDg0OGxAQGzAlICYvLS8tLS0tLy0tMi0tLS0tLy8vLS0tLS0rLS0tLS0tLS0vLS0tLS0tLS0tLS0tLS0tLf/AABEIAK4BIgMBIgACEQEDEQH/xAAbAAACAwEBAQAAAAAAAAAAAAADBAIFBgcBAP/EAEYQAAIBAwMDAgMFBAYHBwUAAAECEQMSIQAEMQUiQRNRBjJhI0JxgZEUUqGxYpLB0eHwBxUzQ3KC0hYXJFNjk/E0RFSi4//EABkBAAMBAQEAAAAAAAAAAAAAAAABAgQDBf/EADMRAAICAQIFAgQDCAM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vN7096NJVSqzKIU3GKhEgz6oHsCIt4gSBqsr7XabtPVrUTUhQykuVYm60hrOFgpgGMcCBpdHTLvVuil6I/Tyjhdy9KkWBrBIvqMSAoLlLrSVDQJ+sZm3/wBZU2prTpeo6pVNJQLUUKuRa1FUUi2YFxnIjjWT6vR2+3r09rSoIWNYfaMB6qmo6WBagyVUMMMDmTnRqvxO21NRIvqAmcBadqs6EWpaZJtn6T7xp0CaL3q9BmSXotSUOq+rV3Jm1Vg2UzUMXEFQFEGOI5pNn1lPTLrR3NOmJanXV/VqA3faMyksAMnMEQoz50rtvjalRXu2xZqwWo49RmQkGpZAb5e4sTA88nAGLq7uyoW21SqKchlDnOVEhgCQYMgH2A86pITmbrf/ABLuKFUJt2bcIyhqYemf2kdyIy2rBX5pEAHGeI1S7r4w3FZzTqU9v9qh7xSHqTa4Xk/MHgHHzIM40z0v4oX1vWrI13pOgNOA47DdLE992ZmeBjkm7+IdstZKW8UKKdwAWLXDB+cSCIbycZjSZUd31OSmn/k86+1oT05TmFzng/36+1WpHPls/9k=);
@include transform-origin();
}
}
$max_segments: 32;
$segments: 0;
@while $segments <= $max_segments {
$step: 360deg / ($segments * 2);
$angle: 0 - $step;
$i: 0;
&.n#{$segments} {
.tile {
display: block;
@while $i < $segments * 2 {
&.t#{$i} {
@include transform-rotate($angle + $step);
}
&.t#{$i+1} {
@include transform-mirror-rotate($angle + $step);
}
$angle: $angle + ($step * 2);
$i: $i + 2;
}
.image {
@include transform-rotate($step);
}
}
}
$segments: $segments + 1;
}
}
nav {
position: absolute;
right: 0;
bottom: 0;
z-index: 1;
color: #666;
text-decoration: none;
font-family: Helvetica;
cursor: pointer;
text-align: center;
body.clean & {
opacity: 0;
&:hover {
opacity: 1;
}
}
ul{
list-style: none;
margin-right: 2em;
}
li{
background-color: white;
opacity: 0.6;
margin: 1em auto;
padding: 5px 10px;
text-align: center;
font-weight: bold;
transition: opacity 0.5s ease;
&:hover{
opacity: 1;
}
a:hover{
text-decoration: none;
}
}
}
JAVASCRIPT
$( document ).ready( function () {
var parameters = ( function ( src ) {
var params = {}, qryStr = src.split( '?' )[ 1 ];
if( qryStr ) {
$.each( qryStr.split( '&' ), function ( i, p ) {
var ps = p.replace( /\/$/, '' ).split( '=' );
var k = ps[ 0 ].replace( /^\?/, '' );
params[ k ] = ps[ 1 ] || true;
});
}
return params;
})( location.search );
var x = 0;
var y = 0;
var auto;
var auto_x = 0;
var auto_y = 0;
var auto_throttle;
var s = parameters.s || 3;
//segnmentation
var n = ~~parameters.n || 7;
var tiles = '';
if ( n ) {
for ( var i = 0; i <= n * 2; i++ ) {
tiles += [ '<div class="tile t', i, '"><div class="image"></div></div>' ].join( '' );
}
}
var $kaleidescope = $( '.kaleidoscope' )
.addClass( 'n' + n )
.append( tiles );
var $image = $kaleidescope.find( '.image' );
var $fullscreen = $( '#fullscreen' );
var k = $kaleidescope[ 0 ];
// image tracker
var src = parameters.src;
if ( src ) {
$image.css( 'background-image', [ 'url(',
decodeURIComponent( src ), ')' ].join( '' ) );
}
// hides link in fullscreen
var clean = parameters.clean;
if ( clean ) {
$( 'body' ).addClass('clean');
}
var opacity = parseFloat( parameters.opacity );
if ( opacity ) {
$kaleidescope.css('opacity', 0).fadeTo( 3000, opacity );
}
var mode = ~~parameters.mode || 2;
$kaleidescope.click( function ( e ) {
x++;
y++;
var nx = e.pageX, ny = e.pageY;
switch ( mode ) {
case 1:
nx = -x;
ny = e.pageY;
break;
case 2:
nx = e.pageX;
ny = -y;
break;
case 3:
nx = x;
ny = e.pageY;
break;
case 4:
nx = e.pageX;
ny = y;
break;
case 5:
nx = x;
ny = y;
break;
}
move( nx, ny );
auto = auto_throttle = false;
});
// full screen
$fullscreen.click( function() {
if ( document.fullscreenEnabled || document.mozFullScreenEnabled ||
document.webkitFullscreenEnabled ) {
if ( k.requestFullscreen ) k.requestFullscreen();
if ( k.mozRequestFullScreen ) k.mozRequestFullScreen();
if ( k.webkitRequestFullscreen ) k.webkitRequestFullscreen();
}
});
// Animation
window.requestAnimFrame = ( function( window ) {
var suffix = "equestAnimationFrame",
rAF = [ "r", "webkitR", "mozR" ].filter( function( val ) {
return val + suffix in window;
})[ 0 ] + suffix;
return window[ rAF ] || function( callback ) {
window.setTimeout( function() {
callback( +new Date() );
}, 1000 / 60 );
};
})( window );
function animate() {
var time = new Date().getTime() * [ '.0000', s ].join( '' );
auto_x = Math.sin( time ) * document.body.clientWidth;
auto_y++;
move( auto_x, auto_y );
if ( auto ) requestAnimFrame( animate );
}
function move( x, y ) {
$image.css( 'background-position', [ x + "px", y + "px" ].
join( ' ' ) );
}
// automatic start
(function timer() {
setTimeout( function() {
timer();
if( auto && !auto_throttle ) {
animate();
auto_throttle = true;
} else {
auto = true;
}
}, 0000 );
})();
});
$(document).ready(function(){
var kalos = document.getElementById('kalos');
kalos.addEventListener('drop', drop, false);
function drop(evt) {
evt.stopPropagation();
evt.preventDefault();
var imageUrl = evt.dataTransfer.getData('text/html');
if($(imageUrl).children().length > 0 ){
var url = $(imageUrl).find('img').attr('src');
}else{
var url = $(imageUrl).attr('src');
}
$('.image').css('background-image', 'url("' + url + '")');
//alert(url);
}
});