forked from Chaospott/site
fixed high cpu consumption on mobile devices
This commit is contained in:
parent
2355d858d4
commit
a219eab24f
BIN
images/gekruessel.png
Normal file
BIN
images/gekruessel.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 930 KiB |
@ -1,5 +1,11 @@
|
||||
(function() {
|
||||
|
||||
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
|
||||
var element = document.getElementById('demo-canvas');
|
||||
element.style.backgroundImage="url('images/gekruessel.png')";
|
||||
element.style.backgroundPosition="center center";
|
||||
element.style.height="300px";
|
||||
} else {
|
||||
var width, height, largeHeader, canvas, ctx, points, target, animateHeader = true;
|
||||
|
||||
// Main
|
||||
@ -181,5 +187,5 @@
|
||||
function getDistance(p1, p2) {
|
||||
return Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2);
|
||||
}
|
||||
|
||||
}
|
||||
})();
|
||||
|
Loading…
Reference in New Issue
Block a user