Skip to content

CodeWhiteWeb/Kaleidoscope

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kaleidoscope

Working Kaleidoscope

Tilt your phone or hover with mouse

created using DeviceOrientationEvent in js

if (window.DeviceOrientationEvent) {
    window.addEventListener('deviceorientation', function(event) {
        var x = Math.round(event.beta);
        var y = Math.round(event.gamma);
        var factorx = y / $(window).width();
        var factory = x / $(window).height();
        scope.angleTarget = factorx + 2;
        scope.zoomTarget = 0.5 + 4.0 * factory;
    });
}

Check Out the Project online : here

About

Working Kaleidoscope

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages